diff --git a/CHANGELOG.md b/CHANGELOG.md index 756bd37..0517fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 1.2.2 - Fix module.json to remove v10 warnings (by @TooPick). +- Fix dependabot security warnings. # 1.2.1 diff --git a/modules/dungeondraw-bundle.min.js b/modules/dungeondraw-bundle.min.js index 81e02be..0bbaad4 100644 --- a/modules/dungeondraw-bundle.min.js +++ b/modules/dungeondraw-bundle.min.js @@ -1,9 +1,9 @@ -const e="dungeon-draw";class t{static register(){game.settings.register(e,"allowTrustedPlayer",{name:game.i18n.localize("DD.SettingAllowTrustedPlayers"),scope:"world",default:!0,type:Boolean,config:!0}),game.settings.register(e,"3DCanvasEnabled",{name:game.i18n.localize("DD.SettingSupport3DCanvas"),scope:"world",default:!0,type:Boolean,config:!0}),game.settings.register(e,"snapToGrid",{name:game.i18n.localize("DD.SettingSnapToGrid"),scope:"client",default:!0,type:Boolean,config:!0,onChange:e=>{canvas.dungeon.options.snapToGrid=e}}),game.settings.register(e,"releaseNotesVersion",{name:"Last version we showed release notes.",scope:"client",default:"",type:String,config:!1}),game.settings.register(e,"customThemes",{name:"Custom themes data.",scope:"client",default:"{}",type:String,config:!1}),game.settings.register(e,"themePainterTheme",{name:"Theme painter theme key.",scope:"client",default:"module.cavern",type:String,config:!1})}static threeDCanvasEnabled(){return game.settings.get(e,"3DCanvasEnabled")}static snapToGrid(){return game.settings.get(e,"snapToGrid")}}const n=()=>{try{const t=game.settings.get(e,"customThemes"),n=JSON.parse(t);return Object.keys(n).forEach((e=>{n[e].config=foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},n[e].config)})),n}catch(e){return console.log(e),{}}},i=t=>{const n=JSON.stringify(t);game.settings.set(e,"customThemes",n)},r=()=>game.settings.get(e,"themePainterTheme"),o=t=>game.settings.set(e,"themePainterTheme",t),s={default:{name:"Default",config:{doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8}},arcPavement:{name:"Arc Pavement",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#111111",floorTexture:"modules/dungeon-draw/assets/textures/Arc_Pavement_001_basecolor.jpg",invisibleWallThickness:10,wallColor:"#111111",wallThickness:12})},basicBlack:{name:"Basic Black",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#0D0D0D",doorFillOpacity:0,exteriorShadowOpacity:0,interiorShadowOpacity:0,invisibleWallColor:"#0D0D0D",floorColor:"#FFFFFF",sceneBackgroundColor:"#0D0D0D",sceneGridOpacity:1,secretDoorSColor:"#0D0D0D",wallColor:"#0D0D0D"})},cavern:{name:"Cavern",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#2B2D2F",invisibleWallThickness:10,floorTexture:"modules/dungeon-draw/assets/textures/Stylized_Stone_Floor_002_bw.jpg",wallColor:"#2B2D2F",wallThickness:12})},checkerboard:{name:"Checkerboard",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorFillColor:"#C2BFB0",floorTexture:"modules/dungeon-draw/assets/textures/sci_fi_texture_150_by_llexandro_d939vk9.png",invisibleWallFillColor:"#C2BFB0",invisibleWallThickness:8,secretDoorSColor:"#C2BFB0",wallThickness:10})},cobblestone:{name:"Cobblestone",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#222222",doorFillColor:"#FFFFFF",floorTexture:"modules/dungeon-draw/assets/textures/Cobblestone_001_COLOR.jpg",invisibleWallColor:"#222222",invisibleWallFillColor:"#FFFFFF",invisibleWallThickness:10,secretDoorSColor:"#FFFFFF",wallColor:"#222222",wallThickness:12})},dirt:{name:"Dirt",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#1a1714",doorFillColor:"#8d7862",floorTexture:"modules/dungeon-draw/assets/textures/Ground_Dirt_007_basecolor.jpg",invisibleWallColor:"#1a1714",invisibleWallFillColor:"#8d7862",invisibleWallThickness:8,secretDoorSColor:"#8d7862",wallColor:"#1a1714",wallThickness:10})},dungeonSquares:{name:"Dungeon Squares",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#111111",floorTexture:"modules/dungeon-draw/assets/textures/outdoor+stone+tiles+pavement.jpg",invisibleWallColor:"#111111",invisibleWallThickness:10,wallColor:"#111111",wallThickness:12})},grass:{name:"Grass",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#72471d",doorFillColor:"#eee8c1",floorTexture:"modules/dungeon-draw/assets/textures/Grass_001_COLOR.jpg",invisibleWallColor:"#72471d",invisibleWallFillColor:"#eee8c1",invisibleWallThickness:10,secretDoorSColor:"#eee8c1",wallColor:"#72471d",wallThickness:10})},groovyCarpet:{name:"Groovy Carpet",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#2B2D2F",floorTexture:"modules/dungeon-draw/assets/textures/Fabric_Rug_006_basecolor.jpg",invisibleWallColor:"#2B2D2F",invisibleWallThickness:10,wallColor:"#2B2D2F",wallThickness:12})},hexagon:{name:"Hexagons",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#282828",doorFillColor:"#D1BD8A",floorTexture:"modules/dungeon-draw/assets/textures/Rocks_Hexagons_002_basecolor.jpg",invisibleWallColor:"#282828",invisibleWallFillColor:"#D1BD8A",invisibleWallThickness:10,secretDoorSColor:"#D1BD8A",wallColor:"#282828",wallThickness:12})},marble:{name:"Marble",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#686882",floorTexture:"modules/dungeon-draw/assets/textures/Marble_Tiles_001_basecolor.jpg",invisibleWallColor:"#686882",wallColor:"#686882"})},metalGrid:{name:"Metal Grid",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#27251A",doorFillColor:"#AAAAAA",floorTexture:"modules/dungeon-draw/assets/textures/Sci-fi_Floor_002_basecolor.jpg",invisibleWallColor:"#27251A",invisibleWallFillColor:"#AAAAAA",secretDoorSColor:"#AAAAAA",wallColor:"#27251A"})},metalSquares:{name:"Metal Squares",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorFillColor:"#C0C0C0",floorTexture:"modules/dungeon-draw/assets/textures/sci_fi_texture_212_by_llexandro_dcuxgum.png",invisibleWallFillColor:"#C0C0C0",secretDoorSColor:"#C0C0C0"})},moldvayBlue:{name:"Moldvay Blue",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#3A9FF2",doorFillOpacity:0,doorThickness:35,exteriorShadowOpacity:0,floorColor:"#FFFFFF",interiorShadowOpacity:0,invisibleWallColor:"#3A9FF2",invisibleWallFillOpacity:0,sceneBackgroundColor:"#3A9FF2",sceneGridColor:"#3A9FF2",sceneGridOpacity:1,secretDoorSColor:"#3A9FF2",wallColor:"#3A9FF2"})},neonBlueprint:{name:"Neon Blueprint",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#3A9FF2",doorFillOpacity:0,doorThickness:35,exteriorShadowColor:"#18495E",floorColor:"#142A3B",interiorShadowColor:"#1B7FAB",invisibleWallColor:"#3A9FF2",invisibleWallFillOpacity:0,invisibleWallLineThickness:1,invisibleWallThickness:6,sceneBackgroundColor:"#171008",sceneGridColor:"#4C89A1",sceneGridOpacity:1,secretDoorSColor:"#3A9FF2",wallColor:"#63C9E6",wallThickness:4})},ruddyPaper:{name:"Ruddy Paper",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#913B55",doorFillColor:"#FADEE6",floorTexture:"modules/dungeon-draw/assets/textures/Paper_Recycled_001_COLOR.jpg",floorTextureTint:"#F9FAE6",exteriorShadowOpacity:0,interiorShadowOpacity:0,invisibleWallColor:"#913B55",invisibleWallFillColor:"#FADEE6",sceneBackgroundColor:"#EBD3BC",sceneGridColor:"#594026",sceneGridOpacity:1,secretDoorSColor:"#913B55",wallColor:"#9A6D54"})},water:{name:"Water",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#203246",floorTexture:"modules/dungeon-draw/assets/textures/Water_001_COLOR.jpg",invisibleWallColor:"#203246",invisibleWallLineThickness:1,invisibleWallThickness:4,wallColor:"#203246",wallThickness:5})},woodPlanks:{name:"Wood Planks",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#332211",floorTexture:"modules/dungeon-draw/assets/textures/Old_Wooden_Plank_Seamless_Texture_765.jpg",invisibleWallColor:"#332211",invisibleWallThickness:13,wallColor:"#332211",wallTexture:"modules/dungeon-draw/assets/textures/Bark_002_bw.jpg",wallTextureTint:"#7e5935",wallThickness:15})},xenomorph:{name:"Xenomorph",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#8AF0F0",doorFillColor:"#255151",doorLineThickness:5,doorThickness:20,exteriorShadowColor:"#00838C",floorColor:"#255151",interiorShadowColor:"#00838C",invisibleWallColor:"#8AF0F0",invisibleWallFillColor:"#255151",invisibleWallLineThickness:1,invisibleWallThickness:6,sceneBackgroundColor:"#002222",sceneGridColor:"#ffffff",sceneGridOpacity:1,secretDoorSColor:"#8AF0F0",wallColor:"#8AF0F0",wallThickness:4})}};class a extends FormApplication{constructor(e){super(),this.themeKey=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-theme-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/theme-sheet.html",width:480,height:t.threeDCanvasEnabled()?1160:1040,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.ThemeSheetTitle")}getData(){const e=n()[this.themeKey],i=t.threeDCanvasEnabled();return{config:e.config,themeName:e.name,threeDCanvasEnabled:i}}async _updateObject(e,t){const r=n(),o=t.themeName;delete t.themeName,r[this.themeKey]={name:o,config:t},i(r),await(canvas.dungeon.dungeon?.refresh())}}class l extends FormApplication{constructor(e="settings"){super(),this._tabs[0].active=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-config-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/config-sheet.html",width:480,height:t.threeDCanvasEnabled()?1220:1100,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.ConfigSheetTitle")}getData(){let e=canvas.dungeon.dungeon?.state().config;e||(e={doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8});const i=n(),o=Object.keys(i).sort(),a=Object.keys(s).sort(),l=r(),c=t.threeDCanvasEnabled();return{config:e,customThemes:i,customThemeKeys:o,themes:s,themeKeys:a,themePainterThemeKey:l,threeDCanvasEnabled:c}}async _updateObject(e,t){delete t.customThemeName,delete t.themePainterTheme,canvas.dungeon.dungeon?.setConfig(t),game.user.isGM&&await canvas.scene.update({backgroundColor:t.sceneBackgroundColor,gridAlpha:t.sceneGridAlpha,gridColor:t.sceneGridColor})}async close(e){await super.close(e),this.preview&&(this.preview.removeChildren(),this.preview=null)}activateListeners(e){super.activateListeners(e),e.find('button[name="resetDefault"]').click(this._onResetDefaults.bind(this)),e.find(".dd-theme-name").click(this._onThemeNameClick.bind(this)),e.find(".dd-save-as-theme-button").click(this._onSaveAsThemeClick.bind(this)),e.find(".dd-theme-edit").click(this._onEditThemeClick.bind(this)),e.find(".dd-theme-copy").click(this._onCopyThemeClick.bind(this)),e.find(".dd-theme-delete").click(this._onDeleteThemeClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this._onThemePainterThemeSelect.bind(this)),e.find(".dd-export-themes-button").click(this._onExportThemesClick.bind(this)),e.find(".dd-import-themes-button").click(this._onImportThemesClick.bind(this))}_onResetDefaults(e){e.preventDefault(),canvas.dungeon.dungeon?.setConfig({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8}),canvas.dungeon.dungeon.refresh(),this.render()}async _onThemeNameClick(e){e.preventDefault();const t=$(e.currentTarget).parent(".dd-theme-row"),i=t.data("theme");let r;if("custom"===t.data("themetype")){r=n()[i]}else r=s[i];const o={...r.config};await(canvas.dungeon.dungeon?.setConfig(o)),game.user.isGM&&await canvas.scene.update({backgroundColor:o.sceneBackgroundColor,gridAlpha:o.sceneGridAlpha,gridColor:o.sceneGridColor}),this.render()}async _onSaveAsThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".form-fields").children(".saveAsThemeName").val(),r=this._getSubmitData();delete r.saveAsThemeName,delete r.themePainterThemeKey;const o=n();o[t]={name:t,config:r},i(o),this._tabs[0].active="themes",this.render()}async _onEditThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme");new a(t).render(!0)}_onCopyThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme"),r=n(),o=r[t],s=JSON.parse(JSON.stringify(o));let a,l=1,c=!1;for(;!c;)a=`${o.name} (${l})`,a in r?l++:c=!0;s.name=a,r[a]=s,i(r),this.render()}_onDeleteThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme"),r=n();delete r[t],i(r),this.render()}_onExportThemesClick(e){e.preventDefault();const t=JSON.stringify(n(),null,2);saveDataToFile(t,"application/json","dd-custom-themes.json")}async _onImportThemesClick(e){e.preventDefault(),new Dialog({title:game.i18n.localize("DD.ImportCustomThemes"),content:await renderTemplate("modules/dungeon-draw/templates/import-data.html",{hint:game.i18n.localize("DD.ImportCustomThemesHint")}),buttons:{import:{icon:'',label:game.i18n.localize("DD.Import"),callback:e=>{const t=e.find("form")[0];if(!t.data.files.length)return ui.notifications.error("You did not upload a data file!");readTextFromFile(t.data.files[0]).then((e=>{const r=JSON.parse(e);if(t.wipe.checked)i(r);else{const e=n(),t=foundry.utils.mergeObject(e,r);i(t)}this.render()}))}},no:{icon:'',label:game.i18n.localize("DD.Cancel")}},default:"import"},{width:400}).render(!0)}_onThemePainterThemeSelect(e){const t=$(e.currentTarget).val();o(t)}}class c extends Error{constructor(e){super(e),this.name=Object.keys({Exception:c})[0]}toString(){return this.message}}class h extends c{constructor(e){super(e),this.name=Object.keys({IllegalArgumentException:h})[0]}}class u{filter(e){}}function d(){}function m(){}function g(){}class f{static equalsWithTolerance(e,t,n){return Math.abs(e-t)<=n}}class p{constructor(e,t){this.low=t||0,this.high=e||0}static toBinaryString(e){let t,n="";for(t=2147483648;t>0;t>>>=1)n+=(e.high&t)===t?"1":"0";for(t=2147483648;t>0;t>>>=1)n+=(e.low&t)===t?"1":"0";return n}}function _(){}function y(){}_.NaN=NaN,_.isNaN=e=>Number.isNaN(e),_.isInfinite=e=>!Number.isFinite(e),_.MAX_VALUE=Number.MAX_VALUE,_.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,_.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,"function"==typeof Float64Array&&"function"==typeof Int32Array?function(){const e=2146435072,t=new Float64Array(1),n=new Int32Array(t.buffer);_.doubleToLongBits=function(i){t[0]=i;let r=0|n[0],o=0|n[1];return(o&e)===e&&0!=(1048575&o)&&0!==r&&(r=0,o=2146959360),new p(o,r)},_.longBitsToDouble=function(e){return n[0]=e.low,n[1]=e.high,t[0]}}():function(){const e=1023,t=Math.log2,n=Math.floor,i=Math.pow,r=function(){for(let e=53;e>0;e--){const r=i(2,e)-1;if(n(t(r))+1===e)return r}return 0}();_.doubleToLongBits=function(o){let s,a,l,c,h,u,d,m,g;if(o<0||1/o===Number.NEGATIVE_INFINITY?(u=1<<31,o=-o):u=0,0===o)return g=0,m=u,new p(m,g);if(o===1/0)return g=0,m=2146435072|u,new p(m,g);if(o!=o)return g=0,m=2146959360,new p(m,g);if(c=0,g=0,s=n(o),s>1)if(s<=r)c=n(t(s)),c<=20?(g=0,m=s<<20-c&1048575):(l=c-20,a=i(2,l),g=s%a<<32-l,m=s/a&1048575);else for(l=s,g=0;a=l/2,l=n(a),0!==l;)c++,g>>>=1,g|=(1&m)<<31,m>>>=1,a!==l&&(m|=524288);if(d=c+e,h=0===s,s=o-s,c<52&&0!==s)for(l=0;;){if(a=2*s,a>=1?(s=a-1,h?(d--,h=!1):(l<<=1,l|=1,c++)):(s=a,h?0==--d&&(c++,h=!1):(l<<=1,c++)),20===c)m|=l,l=0;else if(52===c){g|=l;break}if(1===a){c<20?m|=l<<20-c:c<52&&(g|=l<<52-c);break}}return m|=d<<20,m|=u,new p(m,g)},_.longBitsToDouble=function(t){let n,r,o,s;const a=t.high,l=t.low,c=a&1<<31?-1:1;for(o=((2146435072&a)>>20)-e,s=0,r=1<<19,n=1;n<=20;n++)a&r&&(s+=i(2,-n)),r>>>=1;for(r=1<<31,n=21;n<=52;n++)l&r&&(s+=i(2,-n)),r>>>=1;if(-1023===o){if(0===s)return 0*c;o=-1022}else{if(1024===o)return 0===s?c/0:NaN;s+=1}return c*s*i(2,o)}}();class b extends c{constructor(e){super(e),this.name=Object.keys({RuntimeException:b})[0]}}class C extends b{constructor(){super(),C.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)b.constructor_.call(this);else if(1===arguments.length){const e=arguments[0];b.constructor_.call(this,e)}}}class x{static shouldNeverReachHere(){if(0===arguments.length)x.shouldNeverReachHere(null);else if(1===arguments.length){const e=arguments[0];throw new C("Should never reach here"+(null!==e?": "+e:""))}}static isTrue(){if(1===arguments.length){const e=arguments[0];x.isTrue(e,null)}else if(2===arguments.length){const e=arguments[1];if(!arguments[0])throw null===e?new C:new C(e)}}static equals(){if(2===arguments.length){const e=arguments[0],t=arguments[1];x.equals(e,t,null)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];if(!t.equals(e))throw new C("Expected "+e+" but encountered "+t+(null!==n?": "+n:""))}}}const v=new ArrayBuffer(8),S=new Float64Array(v),T=new Int32Array(v);class I{constructor(){I.constructor_.apply(this,arguments)}static constructor_(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)I.constructor_.call(this,0,0);else if(1===arguments.length){const e=arguments[0];I.constructor_.call(this,e.x,e.y,e.getZ())}else if(2===arguments.length){const e=arguments[0],t=arguments[1];I.constructor_.call(this,e,t,I.NULL_ORDINATE)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this.x=e,this.y=t,this.z=n}}static hashCode(e){return S[0]=e,T[0]^T[1]}getM(){return _.NaN}setOrdinate(e,t){switch(e){case I.X:this.x=t;break;case I.Y:this.y=t;break;case I.Z:this.setZ(t);break;default:throw new h("Invalid ordinate index: "+e)}}equals2D(){if(1===arguments.length){const e=arguments[0];return this.x===e.x&&this.y===e.y}if(2===arguments.length){const e=arguments[0],t=arguments[1];return!!f.equalsWithTolerance(this.x,e.x,t)&&!!f.equalsWithTolerance(this.y,e.y,t)}}setM(e){throw new h("Invalid ordinate index: "+I.M)}getZ(){return this.z}getOrdinate(e){switch(e){case I.X:return this.x;case I.Y:return this.y;case I.Z:return this.getZ()}throw new h("Invalid ordinate index: "+e)}equals3D(e){return this.x===e.x&&this.y===e.y&&(this.getZ()===e.getZ()||_.isNaN(this.getZ())&&_.isNaN(e.getZ()))}equals(e){return e instanceof I&&this.equals2D(e)}equalInZ(e,t){return f.equalsWithTolerance(this.getZ(),e.getZ(),t)}setX(e){this.x=e}compareTo(e){const t=e;return this.xt.x?1:this.yt.y?1:0}getX(){return this.x}setZ(e){this.z=e}clone(){try{return null}catch(e){if(e instanceof CloneNotSupportedException)return x.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw e}}copy(){return new I(this)}toString(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}distance3D(e){const t=this.x-e.x,n=this.y-e.y,i=this.getZ()-e.getZ();return Math.sqrt(t*t+n*n+i*i)}getY(){return this.y}setY(e){this.y=e}distance(e){const t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}hashCode(){let e=17;return e=37*e+I.hashCode(this.x),e=37*e+I.hashCode(this.y),e}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ()}get interfaces_(){return[d,m,g]}}class w{constructor(){w.constructor_.apply(this,arguments)}static constructor_(){if(this._dimensionsToTest=2,0===arguments.length)w.constructor_.call(this,2);else if(1===arguments.length){const e=arguments[0];if(2!==e&&3!==e)throw new h("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}static compare(e,t){return et?1:_.isNaN(e)?_.isNaN(t)?0:-1:_.isNaN(t)?1:0}compare(e,t){const n=w.compare(e.x,t.x);if(0!==n)return n;const i=w.compare(e.y,t.y);if(0!==i)return i;if(this._dimensionsToTest<=2)return 0;return w.compare(e.getZ(),t.getZ())}get interfaces_(){return[y]}}I.DimensionalComparator=w,I.NULL_ORDINATE=_.NaN,I.X=0,I.Y=1,I.Z=2,I.M=3;class E{constructor(){E.constructor_.apply(this,arguments)}static constructor_(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof E){const e=arguments[0];this.init(e)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e.x,t.x,e.y,t.y)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.init(e,t,n,i)}}static intersects(){if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.xt.x?e.x:t.x)&&n.y>=(e.yt.y?e.y:t.y)}if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];let r=Math.min(n.x,i.x),o=Math.max(n.x,i.x),s=Math.min(e.x,t.x),a=Math.max(e.x,t.x);return!(s>o)&&(!(ao)&&!(ae._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,i=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];return!this.isNull()&&(e>=this._minx&&e<=this._maxx&&t>=this._miny&&t<=this._maxy)}}intersects(){if(1===arguments.length){if(arguments[0]instanceof E){const e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxxthis._maxy||e._maxythis._maxx)return!1;if((e.x>t.x?e.x:t.x)this._maxy)return!1;return!((e.y>t.y?e.y:t.y)this._maxx||ethis._maxy||tthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.isNull()?(this._minx=e,this._maxx=e,this._miny=t,this._maxy=t):(ethis._maxx&&(this._maxx=e),tthis._maxy&&(this._maxy=t))}}minExtent(){if(this.isNull())return 0;const e=this.getWidth(),t=this.getHeight();return et._minx?1:this._minyt._miny?1:this._maxxt._maxx?1:this._maxyt._maxy?1:0}translate(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)}copy(){return new E(this)}toString(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}setToNull(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}disjoint(e){return!(!this.isNull()&&!e.isNull())||(e._minx>this._maxx||e._maxxthis._maxy||e._maxyt?e:t}expandBy(){if(1===arguments.length){const e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=t,this._maxy+=t,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}contains(){if(1===arguments.length){if(arguments[0]instanceof E){const e=arguments[0];return this.covers(e)}if(arguments[0]instanceof I){const e=arguments[0];return this.covers(e)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];return this.covers(e,t)}}centre(){return this.isNull()?null:new I((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}init(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof E){const e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e.x,t.x,e.y,t.y)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];ee._maxx&&(t=this._minx-e._maxx);let n=0;return this._maxye._maxy&&(n=this._miny-e._maxy),0===t?n:0===n?t:Math.sqrt(t*t+n*n)}hashCode(){let e=17;return e=37*e+I.hashCode(this._minx),e=37*e+I.hashCode(this._maxx),e=37*e+I.hashCode(this._miny),e=37*e+I.hashCode(this._maxy),e}get interfaces_(){return[d,g]}}class A{constructor(){A.constructor_.apply(this,arguments)}isGeometryCollection(){return this.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION}getFactory(){return this._factory}getGeometryN(e){return this}getArea(){return 0}isRectangle(){return!1}equalsExact(e){return this===e||this.equalsExact(e,0)}geometryChanged(){this.apply(A.geometryChangedFilter)}geometryChangedAction(){this._envelope=null}equalsNorm(e){return null!==e&&this.norm().equalsExact(e.norm())}getLength(){return 0}getNumGeometries(){return 1}compareTo(){let e;if(1===arguments.length){const t=arguments[0];return e=t,this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){const t=arguments[0],n=arguments[1];return e=t,this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t,n)}}getUserData(){return this._userData}getSRID(){return this._SRID}getEnvelope(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}checkNotGeometryCollection(e){if(e.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION)throw new h("This method does not support GeometryCollection arguments")}equal(e,t,n){return 0===n?e.equals(t):e.distance(t)<=n}norm(){const e=this.copy();return e.normalize(),e}reverse(){const e=this.reverseInternal();return null!=this.envelope&&(e.envelope=this.envelope.copy()),e.setSRID(this.getSRID()),e}copy(){const e=this.copyInternal();return e.envelope=null==this._envelope?null:this._envelope.copy(),e._SRID=this._SRID,e._userData=this._userData,e}getPrecisionModel(){return this._factory.getPrecisionModel()}getEnvelopeInternal(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new E(this._envelope)}setSRID(e){this._SRID=e}setUserData(e){this._userData=e}compare(e,t){const n=e.iterator(),i=t.iterator();for(;n.hasNext()&&i.hasNext();){const e=n.next(),t=i.next(),r=e.compareTo(t);if(0!==r)return r}return n.hasNext()?1:i.hasNext()?-1:0}hashCode(){return this.getEnvelopeInternal().hashCode()}isEquivalentClass(e){return this.getClass()===e.getClass()}isGeometryCollectionOrDerived(){return this.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===A.TYPECODE_MULTIPOINT||this.getTypeCode()===A.TYPECODE_MULTILINESTRING||this.getTypeCode()===A.TYPECODE_MULTIPOLYGON}get interfaces_(){return[m,d,g]}getClass(){return A}static hasNonEmptyElements(e){for(let t=0;t-1}class D{}class R{getM(e){if(this.hasM()){const t=this.getDimension()-this.getMeasures();return this.getOrdinate(e,t)}return _.NaN}setOrdinate(e,t,n){}getZ(e){return this.hasZ()?this.getOrdinate(e,2):_.NaN}size(){}getOrdinate(e,t){}getCoordinate(){}getCoordinateCopy(e){}createCoordinate(){}getDimension(){}hasM(){return this.getMeasures()>0}getX(e){}hasZ(){return this.getDimension()-this.getMeasures()>2}getMeasures(){return 0}expandEnvelope(e){}copy(){}getY(e){}toCoordinateArray(){}get interfaces_(){return[m]}}R.X=0,R.Y=1,R.Z=2,R.M=3;class P{static copyCoord(e,t,n,i){const r=Math.min(e.getDimension(),n.getDimension());for(let o=0;o0)&&(i=t,n=r)}return n}}static extend(e,t,n){const i=e.create(n,t.getDimension()),r=t.size();if(P.copy(t,0,i,0,r),r>0)for(let e=r;e0)&&(t=i)}return t}}class L extends c{constructor(e){super(e),this.name=Object.keys({UnsupportedOperationException:L})[0]}}class O{static isWhitespace(e){return e<=32&&e>=0||127===e}static toUpperCase(e){return e.toUpperCase()}}class F{static toDimensionSymbol(e){switch(e){case F.FALSE:return F.SYM_FALSE;case F.TRUE:return F.SYM_TRUE;case F.DONTCARE:return F.SYM_DONTCARE;case F.P:return F.SYM_P;case F.L:return F.SYM_L;case F.A:return F.SYM_A}throw new h("Unknown dimension value: "+e)}static toDimensionValue(e){switch(O.toUpperCase(e)){case F.SYM_FALSE:return F.FALSE;case F.SYM_TRUE:return F.TRUE;case F.SYM_DONTCARE:return F.DONTCARE;case F.SYM_P:return F.P;case F.SYM_L:return F.L;case F.SYM_A:return F.A}throw new h("Unknown dimension symbol: "+e)}}F.P=0,F.L=1,F.A=2,F.FALSE=-1,F.TRUE=-2,F.DONTCARE=-3,F.SYM_FALSE="F",F.SYM_TRUE="T",F.SYM_DONTCARE="*",F.SYM_P="0",F.SYM_L="1",F.SYM_A="2";class k{filter(e){}}class B{filter(e,t){}isDone(){}isGeometryChanged(){}}class G extends A{constructor(){super(),G.constructor_.apply(this,arguments)}static constructor_(){if(this._points=null,0===arguments.length);else if(2===arguments.length){const e=arguments[0],t=arguments[1];A.constructor_.call(this,t),this.init(e)}}computeEnvelopeInternal(){return this.isEmpty()?new E:this._points.expandEnvelope(new E)}isRing(){return this.isClosed()&&this.isSimple()}getCoordinates(){return this._points.toCoordinateArray()}copyInternal(){return new G(this._points.copy(),this._factory)}equalsExact(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof A){const e=arguments[0],t=arguments[1];if(!this.isEquivalentClass(e))return!1;const n=e;if(this._points.size()!==n._points.size())return!1;for(let e=0;e0){const e=this._points.copy();P.reverse(e),this._points=e}return null}}}getCoordinate(){return this.isEmpty()?null:this._points.getCoordinate(0)}getBoundaryDimension(){return this.isClosed()?F.FALSE:0}isClosed(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}reverseInternal(){const e=this._points.copy();return P.reverse(e),this.getFactory().createLineString(e)}getEndPoint(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}getTypeCode(){return A.TYPECODE_LINESTRING}getDimension(){return 1}getLength(){return class{static ofLine(e){const t=e.size();if(t<=1)return 0;let n=0;const i=new I;e.getCoordinate(0,i);let r=i.x,o=i.y;for(let s=1;s= 2)");this._points=e}isCoordinate(e){for(let t=0;t=this.size())throw new W;return this.array[e]}isEmpty(){return 0===this.array.length}sort(e){e?this.array.sort(((t,n)=>e.compare(t,n))):this.array.sort()}size(){return this.array.length}toArray(){return this.array.slice()}remove(e){for(let t=0,n=this.array.length;t=1){if(this.get(this.size()-1).equals2D(e))return null}super.add.call(this,e)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){const e=arguments[0],t=arguments[1];return this.add(e,t),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){const e=arguments[0],t=arguments[1];if(arguments[2])for(let n=0;n=0;n--)this.add(e[n],t);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];if(!arguments[2]){const n=this.size();if(n>0){if(e>0){if(this.get(e-1).equals2D(t))return null}if(ei&&(r=-1);for(let o=n;o!==i;o+=r)this.add(e[o],t);return!0}}closeRing(){if(this.size()>0){const e=this.get(0).copy();this.add(e,!1)}}}Y.coordArrayType=new Array(0).fill(null);class q{create(){if(1===arguments.length)arguments[0]instanceof Array||N(arguments[0],R);else if(2===arguments.length);else if(3===arguments.length){const e=arguments[0],t=arguments[1];return this.create(e,t)}}}class K{}class X extends A{constructor(){super(),X.constructor_.apply(this,arguments)}static constructor_(){this._coordinates=null;const e=arguments[0],t=arguments[1];A.constructor_.call(this,t),this.init(e)}computeEnvelopeInternal(){if(this.isEmpty())return new E;const e=new E;return e.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),e}getCoordinates(){return this.isEmpty()?[]:[this.getCoordinate()]}copyInternal(){return new X(this._coordinates.copy(),this._factory)}equalsExact(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof A){const e=arguments[0],t=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),t))}return super.equalsExact.apply(this,arguments)}normalize(){}getCoordinate(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null}getBoundaryDimension(){return F.FALSE}reverseInternal(){return this.getFactory().createPoint(this._coordinates.copy())}getTypeCode(){return A.TYPECODE_POINT}getDimension(){return 0}getNumPoints(){return this.isEmpty()?0:1}getX(){if(null===this.getCoordinate())throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x}compareToSameClass(){if(1===arguments.length){const e=arguments[0];return this.getCoordinate().compareTo(e.getCoordinate())}if(2===arguments.length){const e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}}apply(){if(N(arguments[0],M)){const e=arguments[0];if(this.isEmpty())return null;e.filter(this.getCoordinate())}else if(N(arguments[0],B)){const e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],k)){arguments[0].filter(this)}else if(N(arguments[0],u)){arguments[0].filter(this)}}getBoundary(){return this.getFactory().createGeometryCollection()}getGeometryType(){return A.TYPENAME_POINT}getCoordinateSequence(){return this._coordinates}getY(){if(null===this.getCoordinate())throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y}isEmpty(){return 0===this._coordinates.size()}init(e){null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),x.isTrue(e.size()<=1),this._coordinates=e}isSimple(){return!0}get interfaces_(){return[K]}}class J{static ofRing(){if(arguments[0]instanceof Array){const e=arguments[0];return Math.abs(J.ofRingSigned(e))}if(N(arguments[0],R)){const e=arguments[0];return Math.abs(J.ofRingSigned(e))}}static ofRingSigned(){if(arguments[0]instanceof Array){const e=arguments[0];if(e.length<3)return 0;let t=0;const n=e[0].x;for(let i=1;ie.compareTo(t)));else if(2===arguments.length)e.sort(((e,t)=>arguments[1].compare(e,t)));else if(3===arguments.length){const t=e.slice(arguments[1],arguments[2]);t.sort();const n=e.slice(0,arguments[1]).concat(t,e.slice(arguments[2],e.length));e.splice(0,e.length);for(const t of n)e.push(t)}else if(4===arguments.length){const t=e.slice(arguments[1],arguments[2]);t.sort(((e,t)=>arguments[3].compare(e,t)));const n=e.slice(0,arguments[1]).concat(t,e.slice(arguments[2],e.length));e.splice(0,e.length);for(const t of n)e.push(t)}}static asList(e){const t=new j;for(const n of e)t.add(n);return t}static copyOf(e,t){return e.slice(0,t)}}class Q{constructor(e){this.str=e}append(e){this.str+=e}setCharAt(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)}toString(){return this.str}}class ee{constructor(e){this.value=e}intValue(){return this.value}compareTo(e){return this.valuee?1:0}static compare(e,t){return et?1:0}static isNan(e){return Number.isNaN(e)}static valueOf(e){return new ee(e)}}class te{constructor(){te.constructor_.apply(this,arguments)}static constructor_(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){const e=arguments[0];this.init(e)}else if(arguments[0]instanceof te){const e=arguments[0];this.init(e)}else if("string"==typeof arguments[0]){const e=arguments[0];te.constructor_.call(this,te.parse(e))}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e,t)}}static determinant(){if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];return te.determinant(te.valueOf(e),te.valueOf(t),te.valueOf(n),te.valueOf(i))}if(arguments[3]instanceof te&&arguments[2]instanceof te&&arguments[0]instanceof te&&arguments[1]instanceof te){const e=arguments[1],t=arguments[2],n=arguments[3];return arguments[0].multiply(n).selfSubtract(e.multiply(t))}}static sqr(e){return te.valueOf(e).selfMultiply(e)}static valueOf(){if("string"==typeof arguments[0]){const e=arguments[0];return te.parse(e)}if("number"==typeof arguments[0]){return new te(arguments[0])}}static sqrt(e){return te.valueOf(e).sqrt()}static parse(e){let t=0;const n=e.length;for(;O.isWhitespace(e.charAt(t));)t++;let i=!1;if(t=n);){const n=e.charAt(t);if(t++,O.isDigit(n)){const e=n-"0";r.selfMultiply(te.TEN),r.selfAdd(e),o++}else{if("."!==n){if("e"===n||"E"===n){const n=e.substring(t);try{a=ee.parseInt(n)}catch(t){throw t instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+n+" in string "+e):t}break}throw new NumberFormatException("Unexpected character '"+n+"' at position "+t+" in string "+e)}s=o,l=!0}}let c=r;l||(s=o);const h=o-s-a;if(0===h)c=r;else if(h>0){const e=te.TEN.pow(h);c=r.divide(e)}else if(h<0){const e=te.TEN.pow(-h);c=r.multiply(e)}return i?c.negate():c}static createNaN(){return new te(_.NaN,_.NaN)}static copy(e){return new te(e)}static magnitude(e){const t=Math.abs(e),n=Math.log(t)/Math.log(10);let i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=t&&(i+=1),i}static stringOfChar(e,t){const n=new Q;for(let i=0;i9?(r=!0,l="9"):l="0"+i,s.append(l),n=n.subtract(te.valueOf(i)).multiply(te.TEN),r&&n.selfAdd(te.TEN);let c=!0;const h=te.magnitude(n._hi);if(h<0&&Math.abs(h)>=a-t&&(c=!1),!c)break}return t[0]=i,s.toString()}sqr(){return this.multiply(this)}doubleValue(){return this._hi+this._lo}subtract(){if(arguments[0]instanceof te){const e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){const e=arguments[0];return this.add(-e)}}equals(){if(1===arguments.length&&arguments[0]instanceof te){const e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}}isZero(){return 0===this._hi&&0===this._lo}selfSubtract(){if(arguments[0]instanceof te){const e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}}getSpecialNumberString(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}min(e){return this.le(e)?this:e}selfDivide(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;return s=this._hi/e,a=te.SPLIT*s,n=a-s,c=te.SPLIT*e,n=a-n,i=s-n,r=c-e,l=s*e,r=c-r,o=e-r,c=n*r-l+n*o+i*r+i*o,a=(this._hi-l-c+this._lo-s*t)/e,c=s+a,this._hi=c,this._lo=s-c+a,this}}dump(){return"DD<"+this._hi+", "+this._lo+">"}divide(){if(arguments[0]instanceof te){const e=arguments[0];let t=null,n=null,i=null,r=null,o=null,s=null,a=null,l=null;o=this._hi/e._hi,s=te.SPLIT*o,t=s-o,l=te.SPLIT*e._hi,t=s-t,n=o-t,i=l-e._hi,a=o*e._hi,i=l-i,r=e._hi-i,l=t*i-a+t*r+n*i+n*r,s=(this._hi-a-l+this._lo-o*e._lo)/e._hi,l=o+s;return new te(l,o-l+s)}if("number"==typeof arguments[0]){const e=arguments[0];return _.isNaN(e)?te.createNaN():te.copy(this).selfDivide(e,0)}}ge(e){return this._hi>e._hi||this._hi===e._hi&&this._lo>=e._lo}pow(e){if(0===e)return te.valueOf(1);let t=new te(this),n=te.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(t),i/=2,i>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n}ceil(){if(this.isNaN())return te.NaN;const e=Math.ceil(this._hi);let t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new te(e,t)}compareTo(e){const t=e;return this._hit._hi?1:this._lot._lo?1:0}rint(){if(this.isNaN())return this;return this.add(.5).floor()}setValue(){if(arguments[0]instanceof te){const e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){const e=arguments[0];return this.init(e),this}}max(e){return this.ge(e)?this:e}sqrt(){if(this.isZero())return te.valueOf(0);if(this.isNegative())return te.NaN;const e=1/Math.sqrt(this._hi),t=this._hi*e,n=te.valueOf(t),i=this.subtract(n.sqr())._hi*(.5*e);return n.add(i)}selfAdd(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];let t=null,n=null,i=null,r=null,o=null,s=null;return i=this._hi+e,o=i-this._hi,r=i-o,r=e-o+(this._hi-r),s=r+this._lo,t=i+s,n=s+(i-t),this._hi=t+n,this._lo=n+(t-this._hi),this}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;s=this._hi+e,r=this._lo+t,l=s-this._hi,c=r-this._lo,a=s-l,o=r-c,a=e-l+(this._hi-a),o=t-c+(this._lo-o),l=a+r,n=s+l,i=l+(s-n),l=o+i;const h=n+l,u=l+(n-h);return this._hi=h,this._lo=u,this}}selfMultiply(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null;s=te.SPLIT*this._hi,n=s-this._hi,a=te.SPLIT*e,n=s-n,i=this._hi-n,r=a-e,s=this._hi*e,r=a-r,o=e-r,a=n*r-s+n*o+i*r+i*o+(this._hi*t+this._lo*e);const l=s+a;n=s-l;const c=a+n;return this._hi=l,this._lo=c,this}}selfSqr(){return this.selfMultiply(this)}floor(){if(this.isNaN())return te.NaN;const e=Math.floor(this._hi);let t=0;return e===this._hi&&(t=Math.floor(this._lo)),new te(e,t)}negate(){return this.isNaN()?this:new te(-this._hi,-this._lo)}clone(){try{return null}catch(e){if(e instanceof CloneNotSupportedException)return null;throw e}}multiply(){if(arguments[0]instanceof te){const e=arguments[0];return e.isNaN()?te.createNaN():te.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){const e=arguments[0];return _.isNaN(e)?te.createNaN():te.copy(this).selfMultiply(e,0)}}isNaN(){return _.isNaN(this._hi)}intValue(){return Math.trunc(this._hi)}toString(){const e=te.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()}toStandardNotation(){const e=this.getSpecialNumberString();if(null!==e)return e;const t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),i=t[0]+1;let r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+te.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){const e=i-n.length;r=n+te.stringOfChar("0",e)+".0"}return this.isNegative()?"-"+r:r}reciprocal(){let e=null,t=null,n=null,i=null,r=null,o=null,s=null,a=null;r=1/this._hi,o=te.SPLIT*r,e=o-r,a=te.SPLIT*this._hi,e=o-e,t=r-e,n=a-this._hi,s=r*this._hi,n=a-n,i=this._hi-n,a=e*n-s+e*i+t*n+t*i,o=(1-s-a-r*this._lo)/this._hi;const l=r+o;return new te(l,r-l+o)}toSciNotation(){if(this.isZero())return te.SCI_NOT_ZERO;const e=this.getSpecialNumberString();if(null!==e)return e;const t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),i=te.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===n.charAt(0))throw new IllegalStateException("Found leading zero: "+n);let r="";n.length>1&&(r=n.substring(1));const o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i}abs(){return this.isNaN()?te.NaN:this.isNegative()?this.negate():new te(this)}isPositive(){return this._hi>0||0===this._hi&&this._lo>0}lt(e){return this._hie._hi||this._hi===e._hi&&this._lo>e._lo}isNegative(){return this._hi<0||0===this._hi&&this._lo<0}trunc(){return this.isNaN()?te.NaN:this.isPositive()?this.floor():this.ceil()}signum(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}get interfaces_(){return[g,d,m]}}te.PI=new te(3.141592653589793,12246467991473532e-32),te.TWO_PI=new te(6.283185307179586,24492935982947064e-32),te.PI_2=new te(1.5707963267948966,6123233995736766e-32),te.E=new te(2.718281828459045,14456468917292502e-32),te.NaN=new te(_.NaN,_.NaN),te.EPS=123259516440783e-46,te.SPLIT=134217729,te.MAX_PRINT_DIGITS=32,te.TEN=te.valueOf(10),te.ONE=te.valueOf(1),te.SCI_NOT_EXPONENT_CHAR="E",te.SCI_NOT_ZERO="0.0E0";class ne{static orientationIndex(e,t,n){const i=ne.orientationIndexFilter(e,t,n);if(i<=1)return i;const r=te.valueOf(t.x).selfAdd(-e.x),o=te.valueOf(t.y).selfAdd(-e.y),s=te.valueOf(n.x).selfAdd(-t.x),a=te.valueOf(n.y).selfAdd(-t.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()}static signOfDet2x2(){if(arguments[3]instanceof te&&arguments[2]instanceof te&&arguments[0]instanceof te&&arguments[1]instanceof te){const e=arguments[1],t=arguments[2],n=arguments[3];return arguments[0].multiply(n).selfSubtract(e.multiply(t)).signum()}if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=te.valueOf(e),o=te.valueOf(t),s=te.valueOf(n),a=te.valueOf(i);return r.multiply(a).selfSubtract(o.multiply(s)).signum()}}static intersection(e,t,n,i){const r=new te(e.y).selfSubtract(t.y),o=new te(t.x).selfSubtract(e.x),s=new te(e.x).selfMultiply(t.y).selfSubtract(new te(t.x).selfMultiply(e.y)),a=new te(n.y).selfSubtract(i.y),l=new te(i.x).selfSubtract(n.x),c=new te(n.x).selfMultiply(i.y).selfSubtract(new te(i.x).selfMultiply(n.y)),h=o.multiply(c).selfSubtract(l.multiply(s)),u=a.multiply(s).selfSubtract(r.multiply(c)),d=r.multiply(l).selfSubtract(a.multiply(o)),m=h.selfDivide(d).doubleValue(),g=u.selfDivide(d).doubleValue();return _.isNaN(m)||_.isInfinite(m)||_.isNaN(g)||_.isInfinite(g)?null:new I(m,g)}static orientationIndexFilter(e,t,n){let i=null;const r=(e.x-n.x)*(t.y-n.y),o=(e.y-n.y)*(t.x-n.x),s=r-o;if(r>0){if(o<=0)return ne.signum(s);i=r+o}else{if(!(r<0))return ne.signum(s);if(o>=0)return ne.signum(s);i=-r-o}const a=ne.DP_SAFE_EPSILON*i;return s>=a||-s>=a?ne.signum(s):2}static signum(e){return e>0?1:e<0?-1:0}}ne.DP_SAFE_EPSILON=1e-15;class ie{static index(e,t,n){return ne.orientationIndex(e,t,n)}static isCCW(){if(arguments[0]instanceof Array){const e=arguments[0],t=e.length-1;if(t<3)throw new h("Ring has fewer than 4 points, so orientation cannot be determined");let n=e[0],i=0;for(let r=1;r<=t;r++){const t=e[r];t.y>n.y&&(n=t,i=r)}let r=i;do{r-=1,r<0&&(r=t)}while(e[r].equals2D(n)&&r!==i);let o=i;do{o=(o+1)%t}while(e[o].equals2D(n)&&o!==i);const s=e[r],a=e[o];if(s.equals2D(n)||a.equals2D(n)||s.equals2D(a))return!1;const l=ie.index(s,n,a);let c=null;return c=0===l?s.x>a.x:l>0,c}if(N(arguments[0],R)){const e=arguments[0],t=e.size()-1;if(t<3)throw new h("Ring has fewer than 4 points, so orientation cannot be determined");let n=e.getCoordinate(0),i=0;for(let r=1;r<=t;r++){const t=e.getCoordinate(r);t.y>n.y&&(n=t,i=r)}let r=null,o=i;do{o-=1,o<0&&(o=t),r=e.getCoordinate(o)}while(r.equals2D(n)&&o!==i);let s=null,a=i;do{a=(a+1)%t,s=e.getCoordinate(a)}while(s.equals2D(n)&&a!==i);if(r.equals2D(n)||s.equals2D(n)||r.equals2D(s))return!1;const l=ie.index(r,n,s);let c=null;return c=0===l?r.x>s.x:l>0,c}}}ie.CLOCKWISE=-1,ie.RIGHT=ie.CLOCKWISE,ie.COUNTERCLOCKWISE=1,ie.LEFT=ie.COUNTERCLOCKWISE,ie.COLLINEAR=0,ie.STRAIGHT=ie.COLLINEAR;class re{}class oe extends A{constructor(){super(),oe.constructor_.apply(this,arguments)}static constructor_(){this._shell=null,this._holes=null;let e=arguments[0],t=arguments[1],n=arguments[2];if(A.constructor_.call(this,n),null===e&&(e=this.getFactory().createLinearRing()),null===t&&(t=[]),A.hasNullElements(t))throw new h("holes must not contain null elements");if(e.isEmpty()&&A.hasNonEmptyElements(t))throw new h("shell is empty but holes are not");this._shell=e,this._holes=t}computeEnvelopeInternal(){return this._shell.getEnvelopeInternal()}getCoordinates(){if(this.isEmpty())return[];const e=new Array(this.getNumPoints()).fill(null);let t=-1;const n=this._shell.getCoordinates();for(let i=0;i=1&&this.getCoordinateSequence().size()= 4)")}getGeometryType(){return A.TYPENAME_LINEARRING}}de.MINIMUM_VALID_SIZE=4;class me extends I{constructor(){super(),me.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)I.constructor_.call(this);else if(1===arguments.length){if(arguments[0]instanceof me){const e=arguments[0];I.constructor_.call(this,e.x,e.y)}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e.x,e.y)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];I.constructor_.call(this,e,t,I.NULL_ORDINATE)}}setOrdinate(e,t){switch(e){case me.X:this.x=t;break;case me.Y:this.y=t;break;default:throw new h("Invalid ordinate index: "+e)}}getZ(){return I.NULL_ORDINATE}getOrdinate(e){switch(e){case me.X:return this.x;case me.Y:return this.y}throw new h("Invalid ordinate index: "+e)}setZ(e){throw new h("CoordinateXY dimension 2 does not support z-ordinate")}copy(){return new me(this)}toString(){return"("+this.x+", "+this.y+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ()}}me.X=0,me.Y=1,me.Z=-1,me.M=-1;class ge extends I{constructor(){super(),ge.constructor_.apply(this,arguments)}static constructor_(){if(this._m=null,0===arguments.length)I.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof ge){const e=arguments[0];I.constructor_.call(this,e.x,e.y),this._m=e._m}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e.x,e.y),this._m=this.getM()}}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];I.constructor_.call(this,e,t,I.NULL_ORDINATE),this._m=n}}getM(){return this._m}setOrdinate(e,t){switch(e){case ge.X:this.x=t;break;case ge.Y:this.y=t;break;case ge.M:this._m=t;break;default:throw new h("Invalid ordinate index: "+e)}}setM(e){this._m=e}getZ(){return I.NULL_ORDINATE}getOrdinate(e){switch(e){case ge.X:return this.x;case ge.Y:return this.y;case ge.M:return this._m}throw new h("Invalid ordinate index: "+e)}setZ(e){throw new h("CoordinateXY dimension 2 does not support z-ordinate")}copy(){return new ge(this)}toString(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ(),this._m=e.getM()}}ge.X=0,ge.Y=1,ge.Z=-1,ge.M=2;class fe extends I{constructor(){super(),fe.constructor_.apply(this,arguments)}static constructor_(){if(this._m=null,0===arguments.length)I.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof fe){const e=arguments[0];I.constructor_.call(this,e),this._m=e._m}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e),this._m=this.getM()}}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];I.constructor_.call(this,e,t,n),this._m=i}}getM(){return this._m}setOrdinate(e,t){switch(e){case I.X:this.x=t;break;case I.Y:this.y=t;break;case I.Z:this.z=t;break;case I.M:this._m=t;break;default:throw new h("Invalid ordinate index: "+e)}}setM(e){this._m=e}getOrdinate(e){switch(e){case I.X:return this.x;case I.Y:return this.y;case I.Z:return this.getZ();case I.M:return this.getM()}throw new h("Invalid ordinate index: "+e)}copy(){return new fe(this)}toString(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ(),this._m=e.getM()}}class pe{static measures(e){return e instanceof me?0:e instanceof ge||e instanceof fe?1:0}static dimension(e){return e instanceof me?2:e instanceof ge?3:e instanceof fe?4:3}static create(){if(1===arguments.length){const e=arguments[0];return pe.create(e,0)}if(2===arguments.length){const e=arguments[0],t=arguments[1];return 2===e?new me:3===e&&0===t?new I:3===e&&1===t?new ge:4===e&&1===t?new fe:new I}}}class _e{static log10(e){const t=Math.log(e);return _.isInfinite(t)||_.isNaN(t)?t:t/_e.LOG_10}static min(e,t,n,i){let r=e;return tn?n:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){const e=arguments[0],t=arguments[1],n=arguments[2];return en?n:e}}static wrap(e,t){return e<0?t- -e%t:e%t}static max(){if(3===arguments.length){const e=arguments[1],t=arguments[2];let n=arguments[0];return e>n&&(n=e),t>n&&(n=t),n}if(4===arguments.length){const e=arguments[1],t=arguments[2],n=arguments[3];let i=arguments[0];return e>i&&(i=e),t>i&&(i=t),n>i&&(i=n),i}}static average(e,t){return(e+t)/2}}_e.LOG_10=Math.log(10);class ye{static arraycopy(e,t,n,i,r){let o=0;for(let s=t;s=e?t:[]}static indexOf(e,t){for(let n=0;n0)&&(t=e[n]);return t}static extract(e,t,n){t=_e.clamp(t,0,e.length);let i=(n=_e.clamp(n,-1,e.length))-t+1;n<0&&(i=0),t>=e.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;const r=be.compare(n,i);return be.isEqualReversed(n,i)?0:r}OLDcompare(e,t){const n=e,i=t;if(n.lengthi.length)return 1;if(0===n.length)return 0;const r=be.increasingDirection(n),o=be.increasingDirection(i);let s=r>0?0:n.length-1,a=o>0?0:n.length-1;for(let e=0;e0){const e=new Ce(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(let t=1;t3&&(e=3),e<2&&(e=2),new xe(arguments[0],e)}if(3===arguments.length){let e=arguments[2],t=arguments[1]-e;return e>1&&(e=1),t>3&&(t=3),t<2&&(t=2),new xe(arguments[0],t+e,e)}}}get interfaces_(){return[q,g]}}ve.instanceObject=new ve;class Se extends he{constructor(){super(),Se.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];he.constructor_.call(this,e,t)}copyInternal(){const e=new Array(this._geometries.length).fill(null);for(let t=0;te.add(t))),e}size(){return this.map.size()}}class Ae{constructor(){Ae.constructor_.apply(this,arguments)}static constructor_(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=Ae.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof Me){const e=arguments[0];this._modelType=e,e===Ae.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){const e=arguments[0];this._modelType=Ae.FIXED,this.setScale(e)}else if(arguments[0]instanceof Ae){const e=arguments[0];this._modelType=e._modelType,this._scale=e._scale}}static mostPrecise(e,t){return e.compareTo(t)>=0?e:t}equals(e){if(!(e instanceof Ae))return!1;const t=e;return this._modelType===t._modelType&&this._scale===t._scale}compareTo(e){const t=e,n=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return ee.compare(n,i)}getScale(){return this._scale}isFloating(){return this._modelType===Ae.FLOATING||this._modelType===Ae.FLOATING_SINGLE}getType(){return this._modelType}toString(){let e="UNKNOWN";return this._modelType===Ae.FLOATING?e="Floating":this._modelType===Ae.FLOATING_SINGLE?e="Floating-Single":this._modelType===Ae.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e}makePrecise(){if("number"==typeof arguments[0]){const e=arguments[0];if(_.isNaN(e))return e;if(this._modelType===Ae.FLOATING_SINGLE){return e}return this._modelType===Ae.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof I){const e=arguments[0];if(this._modelType===Ae.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}}getMaximumSignificantDigits(){let e=16;return this._modelType===Ae.FLOATING?e=16:this._modelType===Ae.FLOATING_SINGLE?e=6:this._modelType===Ae.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e}setScale(e){this._scale=Math.abs(e)}get interfaces_(){return[g,d]}}class Me{constructor(){Me.constructor_.apply(this,arguments)}static constructor_(){this._name=null;const e=arguments[0];this._name=e,Me.nameToTypeMap.put(e,this)}readResolve(){return Me.nameToTypeMap.get(this._name)}toString(){return this._name}get interfaces_(){return[g]}}Me.nameToTypeMap=new Ee,Ae.Type=Me,Ae.FIXED=new Me("FIXED"),Ae.FLOATING=new Me("FLOATING"),Ae.FLOATING_SINGLE=new Me("FLOATING SINGLE"),Ae.maximumPreciseValue=9007199254740992;class Ne extends he{constructor(){super(),Ne.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];he.constructor_.call(this,e,t)}copyInternal(){const e=new Array(this._geometries.length).fill(null);for(let t=0;t1){if(r instanceof oe)return this.createMultiPolygon(De.toPolygonArray(e));if(r instanceof G)return this.createMultiLineString(De.toLineStringArray(e));if(r instanceof X)return this.createMultiPoint(De.toPointArray(e));x.shouldNeverReachHere("Unhandled geometry type: "+r.getGeometryType())}return r}createMultiPointFromCoords(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}createPoint(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(N(arguments[0],R)){return new X(arguments[0],this)}}}getCoordinateSequenceFactory(){return this._coordinateSequenceFactory}createPolygon(){if(0===arguments.length)return this.createPolygon(null,null);if(1===arguments.length){if(N(arguments[0],R)){const e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){const e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof de){const e=arguments[0];return this.createPolygon(e,null)}}else if(2===arguments.length){return new oe(arguments[0],arguments[1],this)}}getSRID(){return this._SRID}createGeometryCollection(){if(0===arguments.length)return new he(null,this);if(1===arguments.length){return new he(arguments[0],this)}}getPrecisionModel(){return this._precisionModel}createLinearRing(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){const e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(N(arguments[0],R)){return new de(arguments[0],this)}}}createMultiPolygon(){if(0===arguments.length)return new Se(null,this);if(1===arguments.length){return new Se(arguments[0],this)}}createMultiPoint(){if(0===arguments.length)return new ue(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){return new ue(arguments[0],this)}if(N(arguments[0],R)){const e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));const t=new Array(e.size()).fill(null);for(let n=0;n0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)}}class Pe{static intersection(e,t,n,i){const r=e.xt.x?e.x:t.x,a=e.y>t.y?e.y:t.y,l=n.xi.x?n.x:i.x,u=n.y>i.y?n.y:i.y,d=((r>l?r:l)+(sc?o:c)+(a1||a<0||a>1)&&(r=!0)}}else r=!0;return r?_e.min(Le.pointToSegment(e,n,i),Le.pointToSegment(t,n,i),Le.pointToSegment(n,e,t),Le.pointToSegment(i,e,t)):0}static pointToSegment(e,t,n){if(t.x===n.x&&t.y===n.y)return e.distance(t);const i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),r=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/i;if(r<=0)return e.distance(t);if(r>=1)return e.distance(n);const o=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(o)*Math.sqrt(i)}static pointToLinePerpendicular(e,t,n){const i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),r=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(r)*Math.sqrt(i)}static pointToSegmentString(e,t){if(0===t.length)throw new h("Line array must contain at least one vertex");let n=e.distance(t[0]);for(let i=0;i="a"&&e<="z"||e>="A"&&e<="Z"}isNumeric_(e,t){return e>="0"&&e<="9"||"."==e&&!(void 0!==t&&t)}isWhiteSpace_(e){return" "==e||"\t"==e||"\r"==e||"\n"==e}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const e=this.nextChar_(),t=this.index_;let n,i=e;if("("==e)n=We;else if(","==e)n=je;else if(")"==e)n=He;else if(this.isNumeric_(e)||"-"==e)n=Ue,i=this.readNumber_();else if(this.isAlpha_(e))n=ze,i=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);n=Ve}return{position:t,value:i,type:n}}readNumber_(){let e;const t=this.index_;let n=!1,i=!1;do{"."==e?n=!0:"e"!=e&&"E"!=e||(i=!0),e=this.nextChar_()}while(this.isNumeric_(e,n)||!i&&("e"==e||"E"==e)||i&&("-"==e||"+"==e));return parseFloat(this.wkt.substring(t,this.index_--))}readText_(){let e;const t=this.index_;do{e=this.nextChar_()}while(this.isAlpha_(e));return this.wkt.substring(t,this.index_--).toUpperCase()}}class Ke{constructor(e,t){this.lexer_=e,this.token_,this.layout_=Oe,this.factory=t}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(e){return this.token_.type==e}match(e){const t=this.isTokenType(e);return t&&this.consume_(),t}parse(){this.consume_();return this.parseGeometry_()}parseGeometryLayout_(){let e=Oe;const t=this.token_;if(this.isTokenType(ze)){const n=t.value;"Z"===n?e=Fe:"M"===n?e=ke:"ZM"===n&&(e=Be),e!==Oe&&this.consume_()}return e}parseGeometryCollectionText_(){if(this.match(We)){const e=[];do{e.push(this.parseGeometry_())}while(this.match(je));if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(We)){const e=this.parsePoint_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(We)){const e=this.parsePointList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(We)){const e=this.parseLineStringTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(We)){let e;if(e=this.token_.type==We?this.parsePointTextList_():this.parsePointList_(),this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(We)){const e=this.parseLineStringTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(We)){const e=this.parsePolygonTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePoint_(){const e=[],t=this.layout_.length;for(let n=0;nnew I(...e),n=n=>{const i=n.map((n=>e.createLinearRing(n.map(t))));return i.length>1?e.createPolygon(i[0],i.slice(1)):e.createPolygon(i[0])},i=this.token_;if(this.match(ze)){const r=i.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==r){const t=this.parseGeometryCollectionText_();return e.createGeometryCollection(t)}switch(r){case"POINT":{const t=this.parsePointText_();return t?e.createPoint(new I(...t)):e.createPoint()}case"LINESTRING":{const n=this.parseLineStringText_().map(t);return e.createLineString(n)}case"LINEARRING":{const n=this.parseLineStringText_().map(t);return e.createLinearRing(n)}case"POLYGON":{const t=this.parsePolygonText_();return t&&0!==t.length?n(t):e.createPolygon()}case"MULTIPOINT":{const n=this.parseMultiPointText_();if(!n||0===n.length)return e.createMultiPoint();const i=n.map(t).map((t=>e.createPoint(t)));return e.createMultiPoint(i)}case"MULTILINESTRING":{const n=this.parseMultiLineStringText_().map((n=>e.createLineString(n.map(t))));return e.createMultiLineString(n)}case"MULTIPOLYGON":{const t=this.parseMultiPolygonText_();if(!t||0===t.length)return e.createMultiPolygon();const i=t.map(n);return e.createMultiPolygon(i)}default:throw new Error("Invalid geometry type: "+r)}}throw new Error(this.formatErrorMessage_())}}function Xe(e){if(e.isEmpty())return"";const t=e.getCoordinate(),n=[t.x,t.y];return void 0===t.z||Number.isNaN(t.z)||n.push(t.z),void 0===t.m||Number.isNaN(t.m)||n.push(t.m),n.join(" ")}function Je(e){const t=e.getCoordinates().map((e=>{const t=[e.x,e.y];return void 0===e.z||Number.isNaN(e.z)||t.push(e.z),void 0===e.m||Number.isNaN(e.m)||t.push(e.m),t})),n=[];for(let e=0,i=t.length;e0&&(t+=" "+i),e.isEmpty())return t+" EMPTY";return t+" ("+n(e)+")"}class et{constructor(e){this.geometryFactory=e||new De,this.precisionModel=this.geometryFactory.getPrecisionModel()}read(e){const t=new qe(e);return new Ke(t,this.geometryFactory).parse()}write(e){return $e(e)}}class tt{constructor(e){this.parser=new et(e)}write(e){return this.parser.write(e)}static toLineString(e,t){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"}}class nt{constructor(){nt.constructor_.apply(this,arguments)}static constructor_(){this._result=null,this._inputLines=Array(2).fill().map((()=>Array(2))),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new I,this._intPt[1]=new I,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}static computeEdgeDistance(e,t,n){const i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);let o=-1;if(e.equals(t))o=0;else if(e.equals(n))o=i>r?i:r;else{const n=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);o=i>r?n:s,0!==o||e.equals(t)||(o=Math.max(n,s))}return x.isTrue(!(0===o&&!e.equals(t)),"Bad distance calculation"),o}static nonRobustComputeEdgeDistance(e,t,n){const i=e.x-t.x,r=e.y-t.y,o=Math.sqrt(i*i+r*r);return x.isTrue(!(0===o&&!e.equals(t)),"Invalid distance calculation"),o}getIndexAlongSegment(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]}getTopologySummary(){const e=new Ce;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()}computeIntersection(e,t,n,i){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,t,n,i)}getIntersectionNum(){return this._result}computeIntLineIndex(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((()=>Array(2))),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){const e=arguments[0];this.getEdgeDistance(e,0)>this.getEdgeDistance(e,1)?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}}isProper(){return this.hasIntersection()&&this._isProper}setPrecisionModel(e){this._precisionModel=e}isInteriorIntersection(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){const e=arguments[0];for(let t=0;t1e-4&&ye.out.println("Distance = "+r.distance(o))}intersectionSafe(e,t,n,i){let r=Pe.intersection(e,t,n,i);return null===r&&(r=it.nearestEndpoint(e,t,n,i)),r}computeCollinearIntersection(e,t,n,i){const r=E.intersects(e,t,n),o=E.intersects(e,t,i),s=E.intersects(n,i,e),a=E.intersects(n,i,t);return r&&o?(this._intPt[0]=n,this._intPt[1]=i,nt.COLLINEAR_INTERSECTION):s&&a?(this._intPt[0]=e,this._intPt[1]=t,nt.COLLINEAR_INTERSECTION):r&&s?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||o||a?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):r&&a?(this._intPt[0]=n,this._intPt[1]=t,!n.equals(t)||o||s?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):o&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||r||a?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||r||s?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):nt.NO_INTERSECTION}computeIntersect(e,t,n,i){if(this._isProper=!1,!E.intersects(e,t,n,i))return nt.NO_INTERSECTION;const r=ie.index(e,t,n),o=ie.index(e,t,i);if(r>0&&o>0||r<0&&o<0)return nt.NO_INTERSECTION;const s=ie.index(n,i,e),a=ie.index(n,i,t);if(s>0&&a>0||s<0&&a<0)return nt.NO_INTERSECTION;return 0===r&&0===o&&0===s&&0===a?this.computeCollinearIntersection(e,t,n,i):(0===r||0===o||0===s||0===a?(this._isProper=!1,e.equals2D(n)||e.equals2D(i)?this._intPt[0]=e:t.equals2D(n)||t.equals2D(i)?this._intPt[0]=t:0===r?this._intPt[0]=new I(n):0===o?this._intPt[0]=new I(i):0===s?this._intPt[0]=new I(e):0===a&&(this._intPt[0]=new I(t))):(this._isProper=!0,this._intPt[0]=this.intersection(e,t,n,i)),nt.POINT_INTERSECTION)}}class rt{constructor(){rt.constructor_.apply(this,arguments)}static constructor_(){if(this.p0=null,this.p1=null,0===arguments.length)rt.constructor_.call(this,new I,new I);else if(1===arguments.length){const e=arguments[0];rt.constructor_.call(this,e.p0,e.p1)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.p0=e,this.p1=t}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];rt.constructor_.call(this,new I(e,t),new I(n,i))}}static midPoint(e,t){return new I((e.x+t.x)/2,(e.y+t.y)/2)}minX(){return Math.min(this.p0.x,this.p1.x)}orientationIndex(){if(arguments[0]instanceof rt){const e=arguments[0],t=ie.index(this.p0,this.p1,e.p0),n=ie.index(this.p0,this.p1,e.p1);return t>=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}if(arguments[0]instanceof I){const e=arguments[0];return ie.index(this.p0,this.p1,e)}}toGeometry(e){return e.createLineString([this.p0,this.p1])}isVertical(){return this.p0.x===this.p1.x}equals(e){if(!(e instanceof rt))return!1;const t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)}intersection(e){const t=new it;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null}project(){if(arguments[0]instanceof I){const e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new I(e);const t=this.projectionFactor(e),n=new I;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof rt){const e=arguments[0],t=this.projectionFactor(e.p0),n=this.projectionFactor(e.p1);if(t>=1&&n>=1)return null;if(t<=0&&n<=0)return null;let i=this.project(e.p0);t<0&&(i=this.p0),t>1&&(i=this.p1);let r=this.project(e.p1);return n<0&&(r=this.p0),n>1&&(r=this.p1),new rt(i,r)}}normalize(){this.p1.compareTo(this.p0)<0&&this.reverse()}angle(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}getCoordinate(e){return 0===e?this.p0:this.p1}distancePerpendicular(e){return Le.pointToLinePerpendicular(e,this.p0,this.p1)}minY(){return Math.min(this.p0.y,this.p1.y)}midPoint(){return rt.midPoint(this.p0,this.p1)}projectionFactor(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;const t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=t*t+n*n;if(i<=0)return _.NaN;return((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/i}closestPoints(e){const t=this.intersection(e);if(null!==t)return[t,t];const n=new Array(2).fill(null);let i=_.MAX_VALUE,r=null;const o=this.closestPoint(e.p0);i=o.distance(e.p0),n[0]=o,n[1]=e.p0;const s=this.closestPoint(e.p1);r=s.distance(e.p1),r0&&t<1)return this.project(e);return this.p0.distance(e)1||_.isNaN(t))&&(t=1),t}toString(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}isHorizontal(){return this.p0.y===this.p1.y}reflect(e){const t=this.p1.getY()-this.p0.getY(),n=this.p0.getX()-this.p1.getX(),i=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),r=t*t+n*n,o=t*t-n*n,s=e.getX(),a=e.getY();return new I((-o*s-2*t*n*a-2*t*i)/r,(o*a-2*t*n*s-2*n*i)/r)}distance(){if(arguments[0]instanceof rt){const e=arguments[0];return Le.segmentToSegment(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof I){const e=arguments[0];return Le.pointToSegment(e,this.p0,this.p1)}}pointAlong(e){const t=new I;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t}hashCode(){let e=_.doubleToLongBits(this.p0.x);e^=31*_.doubleToLongBits(this.p0.y);const t=Math.trunc(e)^Math.trunc(e>>32);let n=_.doubleToLongBits(this.p1.x);n^=31*_.doubleToLongBits(this.p1.y);return t^(Math.trunc(n)^Math.trunc(n>>32))}get interfaces_(){return[d,g]}}class ot{constructor(e){this.parser=new et(e||new De)}read(e){return this.parser.read(e)}}class st{constructor(){st.constructor_.apply(this,arguments)}static constructor_(){if(this._quadrantSegments=st.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=st.CAP_ROUND,this._joinStyle=st.JOIN_ROUND,this._mitreLimit=st.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=st.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){const e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(t)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.setQuadrantSegments(e),this.setEndCapStyle(t),this.setJoinStyle(n),this.setMitreLimit(i)}}static bufferDistanceError(e){const t=Math.PI/2/e;return 1-Math.cos(t/2)}getEndCapStyle(){return this._endCapStyle}isSingleSided(){return this._isSingleSided}setQuadrantSegments(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=st.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=st.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==st.JOIN_ROUND&&(this._quadrantSegments=st.DEFAULT_QUADRANT_SEGMENTS)}getJoinStyle(){return this._joinStyle}setJoinStyle(e){this._joinStyle=e}setSimplifyFactor(e){this._simplifyFactor=e<0?0:e}getSimplifyFactor(){return this._simplifyFactor}getQuadrantSegments(){return this._quadrantSegments}setEndCapStyle(e){this._endCapStyle=e}getMitreLimit(){return this._mitreLimit}setMitreLimit(e){this._mitreLimit=e}setSingleSided(e){this._isSingleSided=e}}st.CAP_ROUND=1,st.CAP_FLAT=2,st.CAP_SQUARE=3,st.JOIN_ROUND=1,st.JOIN_MITRE=2,st.JOIN_BEVEL=3,st.DEFAULT_QUADRANT_SEGMENTS=8,st.DEFAULT_MITRE_LIMIT=5,st.DEFAULT_SIMPLIFY_FACTOR=.01;class at{static toLocationSymbol(e){switch(e){case at.EXTERIOR:return"e";case at.BOUNDARY:return"b";case at.INTERIOR:return"i";case at.NONE:return"-"}throw new h("Unknown location value: "+e)}}at.INTERIOR=0,at.BOUNDARY=1,at.EXTERIOR=2,at.NONE=-1;class lt{static opposite(e){return e===lt.LEFT?lt.RIGHT:e===lt.RIGHT?lt.LEFT:e}}lt.ON=0,lt.LEFT=1,lt.RIGHT=2;class ct extends c{constructor(e){super(e),this.name=Object.keys({EmptyStackException:ct})[0]}}class ht extends H{constructor(){super(),this.array=[]}add(e){return this.array.push(e),!0}get(e){if(e<0||e>=this.size())throw new W;return this.array[e]}push(e){return this.array.push(e),e}pop(){if(0===this.array.length)throw new ct;return this.array.pop()}peek(){if(0===this.array.length)throw new ct;return this.array[this.array.length-1]}empty(){return 0===this.array.length}isEmpty(){return this.empty()}search(e){return this.array.indexOf(e)}size(){return this.array.length}toArray(){return this.array.slice()}}class ut{constructor(){ut.constructor_.apply(this,arguments)}static constructor_(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}getCoordinate(){return this._minCoord}getRightmostSide(e,t){let n=this.getRightmostSideOfSegment(e,t);return n<0&&(n=this.getRightmostSideOfSegment(e,t-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n}findRightmostEdgeAtVertex(){const e=this._minDe.getEdge().getCoordinates();x.isTrue(this._minIndex>0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&i===ie.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)}getRightmostSideOfSegment(e,t){const n=e.getEdge().getCoordinates();if(t<0||t+1>=n.length)return-1;if(n[t].y===n[t+1].y)return-1;let i=lt.LEFT;return n[t].ythis._minCoord.x)&&(this._minDe=e,this._minIndex=n,this._minCoord=t[n])}findRightmostEdgeAtNode(){const e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}findEdge(e){for(let t=e.iterator();t.hasNext();){const e=t.next();e.isForward()&&this.checkForRightmostCoordinate(e)}x.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;this.getRightmostSide(this._minDe,this._minIndex)===lt.LEFT&&(this._orientedDe=this._minDe.getSym())}}class dt extends b{constructor(e,t){super(t?e+" [ "+t+" ]":e),this.pt=t?new I(t):void 0,this.name=Object.keys({TopologyException:dt})[0]}getCoordinate(){return this.pt}}class mt{constructor(){this.array=[]}addLast(e){this.array.push(e)}removeFirst(){return this.array.shift()}isEmpty(){return 0===this.array.length}}class gt{constructor(){gt.constructor_.apply(this,arguments)}static constructor_(){this._finder=null,this._dirEdgeList=new j,this._nodes=new j,this._rightMostCoord=null,this._env=null,this._finder=new ut}clearVisitedEdges(){for(let e=this._dirEdgeList.iterator();e.hasNext();){e.next().setVisited(!1)}}getRightmostCoordinate(){return this._rightMostCoord}computeNodeDepth(e){let t=null;for(let n=e.getEdges().iterator();n.hasNext();){const e=n.next();if(e.isVisited()||e.getSym().isVisited()){t=e;break}}if(null===t)throw new dt("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(let t=e.getEdges().iterator();t.hasNext();){const e=t.next();e.setVisited(!0),this.copySymDepths(e)}}computeDepth(e){this.clearVisitedEdges();const t=this._finder.getEdge();t.getNode(),t.getLabel(),t.setEdgeDepths(lt.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)}create(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}findResultEdges(){for(let e=this._dirEdgeList.iterator();e.hasNext();){const t=e.next();t.getDepth(lt.RIGHT)>=1&&t.getDepth(lt.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}}computeDepths(e){const t=new Ie,n=new mt,i=e.getNode();for(n.addLast(i),t.add(i),e.setVisited(!0);!n.isEmpty();){const e=n.removeFirst();t.add(e),this.computeNodeDepth(e);for(let i=e.getEdges().iterator();i.hasNext();){const e=i.next().getSym();if(e.isVisited())continue;const r=e.getNode();t.contains(r)||(n.addLast(r),t.add(r))}}}compareTo(e){const t=e;return this._rightMostCoord.xt._rightMostCoord.x?1:0}getEnvelope(){if(null===this._env){const e=new E;for(let t=this._dirEdgeList.iterator();t.hasNext();){const n=t.next().getEdge().getCoordinates();for(let t=0;ti&&(n=t.x,i=e.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){let n=ie.index(e,t,this._p);if(n===ie.COLLINEAR)return this._isPointOnSegment=!0,null;t.ythis.location.length){const e=new Array(3).fill(null);e[lt.ON]=this.location[lt.ON],e[lt.LEFT]=at.NONE,e[lt.RIGHT]=at.NONE,this.location=e}for(let t=0;t1&&e.append(at.toLocationSymbol(this.location[lt.LEFT])),e.append(at.toLocationSymbol(this.location[lt.ON])),this.location.length>1&&e.append(at.toLocationSymbol(this.location[lt.RIGHT])),e.toString()}setLocations(e,t,n){this.location[lt.ON]=e,this.location[lt.LEFT]=t,this.location[lt.RIGHT]=n}get(e){return e1}isAnyNull(){for(let e=0;ethis._maxNodeDegree&&(this._maxNodeDegree=t),e=this.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2}addPoints(e,t,n){const i=e.getCoordinates();if(t){let e=1;n&&(e=0);for(let t=e;t=0;t--)this._pts.add(i[t])}}isHole(){return this._isHole}setInResult(){let e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)}containsPoint(e){const t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!pt.isInRing(e,t.getCoordinates()))return!1;for(let t=this._holes.iterator();t.hasNext();){if(t.next().containsPoint(e))return!1}return!0}addHole(e){this._holes.add(e)}isShell(){return null===this._shell}getLabel(){return this._label}getEdges(){return this._edges}getMaxNodeDegree(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}getShell(){return this._shell}mergeLabel(){if(1===arguments.length){const e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){const e=arguments[1],t=arguments[0].getLocation(e,lt.RIGHT);if(t===at.NONE)return null;if(this._label.getLocation(e)===at.NONE)return this._label.setLocation(e,t),null}}setShell(e){this._shell=e,null!==e&&e.addHole(this)}toPolygon(e){const t=new Array(this._holes.size()).fill(null);for(let e=0;e=2,"found partial label"),this.computeIM(e)}isInResult(){return this._isInResult}isVisited(){return this._isVisited}}class St extends vt{constructor(){super(),St.constructor_.apply(this,arguments)}static constructor_(){this._coord=null,this._edges=null;const e=arguments[0],t=arguments[1];this._coord=e,this._edges=t,this._label=new yt(0,at.NONE)}isIncidentEdgeInResult(){for(let e=this.getEdges().getEdges().iterator();e.hasNext();){if(e.next().getEdge().isInResult())return!0}return!1}isIsolated(){return 1===this._label.getGeometryCount()}getCoordinate(){return this._coord}print(e){e.println("node "+this._coord+" lbl: "+this._label)}computeIM(e){}computeMergedLocation(e,t){let n=at.NONE;if(n=this._label.getLocation(t),!e.isNull(t)){const i=e.getLocation(t);n!==at.BOUNDARY&&(n=i)}return n}setLabel(){if(2!==arguments.length||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return super.setLabel.apply(this,arguments);{const e=arguments[0],t=arguments[1];null===this._label?this._label=new yt(e,t):this._label.setLocation(e,t)}}getEdges(){return this._edges}mergeLabel(){if(arguments[0]instanceof St){const e=arguments[0];this.mergeLabel(e._label)}else if(arguments[0]instanceof yt){const e=arguments[0];for(let t=0;t<2;t++){const n=this.computeMergedLocation(e,t);this._label.getLocation(t)===at.NONE&&this._label.setLocation(t,n)}}}add(e){this._edges.insert(e),e.setNode(this)}setLabelBoundary(e){if(null===this._label)return null;let t=at.NONE;null!==this._label&&(t=this._label.getLocation(e));let n=null;switch(t){case at.BOUNDARY:n=at.INTERIOR;break;case at.INTERIOR:default:n=at.BOUNDARY}this._label.setLocation(e,n)}}class Tt extends Te{}function It(e){return null==e?0:e.color}function wt(e){return null==e?null:e.parent}function Et(e,t){null!==e&&(e.color=t)}function At(e){return null==e?null:e.left}function Mt(e){return null==e?null:e.right}class Nt extends Tt{constructor(){super(),this.root_=null,this.size_=0}get(e){let t=this.root_;for(;null!==t;){const n=e.compareTo(t.key);if(n<0)t=t.left;else{if(!(n>0))return t.value;t=t.right}}return null}put(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:0,getValue(){return this.value},getKey(){return this.key}},this.size_=1,null;let n,i,r=this.root_;do{if(n=r,i=e.compareTo(r.key),i<0)r=r.left;else{if(!(i>0)){const e=r.value;return r.value=t,e}r=r.right}}while(null!==r);const o={key:e,left:null,right:null,value:t,parent:n,color:0,getValue(){return this.value},getKey(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null}fixAfterInsertion(e){let t;for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)wt(e)===At(wt(wt(e)))?(t=Mt(wt(wt(e))),1===It(t)?(Et(wt(e),0),Et(t,0),Et(wt(wt(e)),1),e=wt(wt(e))):(e===Mt(wt(e))&&(e=wt(e),this.rotateLeft(e)),Et(wt(e),0),Et(wt(wt(e)),1),this.rotateRight(wt(wt(e))))):(t=At(wt(wt(e))),1===It(t)?(Et(wt(e),0),Et(t,0),Et(wt(wt(e)),1),e=wt(wt(e))):(e===At(wt(e))&&(e=wt(e),this.rotateRight(e)),Et(wt(e),0),Et(wt(wt(e)),1),this.rotateLeft(wt(wt(e)))));this.root_.color=0}values(){const e=new j;let t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=Nt.successor(t));)e.add(t.value);return e}entrySet(){const e=new Ie;let t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=Nt.successor(t));)e.add(t);return e}rotateLeft(e){if(null!=e){const t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null==e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}}rotateRight(e){if(null!=e){const t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null==e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}}getFirstEntry(){let e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e}static successor(e){let t;if(null===e)return null;if(null!==e.right){for(t=e.right;null!==t.left;)t=t.left;return t}{t=e.parent;let n=e;for(;null!==t&&n===t.right;)n=t,t=t.parent;return t}}size(){return this.size_}containsKey(e){let t=this.root_;for(;null!==t;){const n=e.compareTo(t.key);if(n<0)t=t.left;else{if(!(n>0))return!0;t=t.right}}return!1}}class Dt{constructor(){Dt.constructor_.apply(this,arguments)}static constructor_(){this.nodeMap=new Nt,this.nodeFact=null;const e=arguments[0];this.nodeFact=e}find(e){return this.nodeMap.get(e)}addNode(){if(arguments[0]instanceof I){const e=arguments[0];let t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof St){const e=arguments[0],t=this.nodeMap.get(e.getCoordinate());return null===t?(this.nodeMap.put(e.getCoordinate(),e),e):(t.mergeLabel(e),t)}}print(e){for(let t=this.iterator();t.hasNext();){t.next().print(e)}}iterator(){return this.nodeMap.values().iterator()}values(){return this.nodeMap.values()}getBoundaryNodes(e){const t=new j;for(let n=this.iterator();n.hasNext();){const i=n.next();i.getLabel().getLocation(e)===at.BOUNDARY&&t.add(i)}return t}add(e){const t=e.getCoordinate();this.addNode(t).add(e)}}class Rt{static isNorthern(e){return e===Rt.NE||e===Rt.NW}static isOpposite(e,t){if(e===t)return!1;return 2===(e-t+4)%4}static commonHalfPlane(e,t){if(e===t)return e;if(2===(e-t+4)%4)return-1;const n=et?e:t)?3:n}static isInHalfPlane(e,t){return t===Rt.SE?e===Rt.SE||e===Rt.SW:e===t||e===t+1}static quadrant(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new h("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Rt.NE:Rt.SE:t>=0?Rt.NW:Rt.SW}if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];if(t.x===e.x&&t.y===e.y)throw new h("Cannot compute the quadrant for two identical points "+e);return t.x>=e.x?t.y>=e.y?Rt.NE:Rt.SE:t.y>=e.y?Rt.NW:Rt.SW}}}Rt.NE=0,Rt.NW=1,Rt.SW=2,Rt.SE=3;class Pt{constructor(){Pt.constructor_.apply(this,arguments)}static constructor_(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){const e=arguments[0];this._edge=e}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];Pt.constructor_.call(this,e,t,n,null)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];Pt.constructor_.call(this,e),this.init(t,n),this._label=i}}compareDirection(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant2){e.linkDirectedEdgesForMinimalEdgeRings();const i=e.buildMinimalRings(),r=this.findShell(i);null!==r?(this.placePolygonHoles(r,i),t.add(r)):n.addAll(i)}else i.add(e)}return i}buildMaximalEdgeRings(e){const t=new j;for(let n=e.iterator();n.hasNext();){const e=n.next();if(e.isInResult()&&e.getLabel().isArea()&&null===e.getEdgeRing()){const n=new xt(e,this._geometryFactory);t.add(n),n.setInResult()}}return t}placePolygonHoles(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next();t.isHole()&&t.setShell(e)}}getPolygons(){return this.computePolygons(this._shellList)}findShell(e){let t=0,n=null;for(let i=e.iterator();i.hasNext();){const e=i.next();e.isHole()||(n=e,t++)}return x.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n}add(){if(1===arguments.length){const e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){const e=arguments[0],t=arguments[1];Ft.linkResultDirectedEdges(t);const n=this.buildMaximalEdgeRings(e),i=new j,r=this.buildMinimalEdgeRings(n,this._shellList,i);this.sortShellsAndHoles(r,this._shellList,i),this.placeFreeHoles(this._shellList,i)}}}class Bt{getBounds(){}}class Gt{constructor(){Gt.constructor_.apply(this,arguments)}static constructor_(){this._bounds=null,this._item=null;const e=arguments[0],t=arguments[1];this._bounds=e,this._item=t}getItem(){return this._item}getBounds(){return this._bounds}get interfaces_(){return[Bt,g]}}class zt{constructor(){zt.constructor_.apply(this,arguments)}static constructor_(){this._size=null,this._items=null,this._size=0,this._items=new j,this._items.add(null)}poll(){if(this.isEmpty())return null;const e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e}size(){return this._size}reorder(e){let t=null;const n=this._items.get(e);for(;2*e<=this._size&&(t=2*e,t!==this._size&&this._items.get(t+1).compareTo(this._items.get(t))<0&&t++,this._items.get(t).compareTo(n)<0);e=t)this._items.set(e,this._items.get(t));this._items.set(e,n)}clear(){this._size=0,this._items.clear()}peek(){if(this.isEmpty())return null;return this._items.get(1)}isEmpty(){return 0===this._size}add(e){this._items.add(null),this._size+=1;let t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)}}class Wt{insert(e,t){}remove(e,t){}query(){}}class Ht{constructor(){Ht.constructor_.apply(this,arguments)}static constructor_(){if(this._childBoundables=new j,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){const e=arguments[0];this._level=e}}getLevel(){return this._level}size(){return this._childBoundables.size()}getChildBoundables(){return this._childBoundables}addChildBoundable(e){x.isTrue(null===this._bounds),this._childBoundables.add(e)}isEmpty(){return this._childBoundables.isEmpty()}getBounds(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds}get interfaces_(){return[Bt,g]}}const Ut={reverseOrder:function(){return{compare:(e,t)=>t.compareTo(e)}},min:function(e){return Ut.sort(e),e.get(0)},sort:function(e,t){const n=e.toArray();t?Z.sort(n,t):Z.sort(n);const i=e.iterator();for(let e=0,t=n.length;eVt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,e,t),null):(this.expand(this._boundable2,this._boundable1,!0,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,!1,e,t),null;if(i)return this.expand(this._boundable2,this._boundable1,!0,e,t),null;throw new h("neither boundable is composite")}isLeaves(){return!(Vt.isComposite(this._boundable1)||Vt.isComposite(this._boundable2))}compareTo(e){const t=e;return this._distancet._distance?1:0}expand(e,t,n,i,r){for(let o=e.getChildBoundables().iterator();o.hasNext();){const e=o.next();let s=null;s=n?new Vt(t,e,this._itemDistance):new Vt(e,t,this._itemDistance),s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=e}}static compareDoubles(e,t){return e>t?1:e-2),t.getLevel()===e)return n.add(t),null;for(let i=t.getChildBoundables().iterator();i.hasNext();){const t=i.next();t instanceof Ht?this.boundablesAtLevel(e,t,n):(x.isTrue(t instanceof Gt),-1===e&&n.add(t))}return null}}query(){if(1===arguments.length){const e=arguments[0];this.build();const t=new j;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.queryInternal(e,this._root,t),t}if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.queryInternal(e,this._root,t)}}build(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}getRoot(){return this.build(),this._root}remove(){if(2===arguments.length){const e=arguments[0],t=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,t)}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];let i=this.removeItem(t,n);if(i)return!0;let r=null;for(let o=t.getChildBoundables().iterator();o.hasNext();){const t=o.next();if(this.getIntersectsOp().intersects(t.getBounds(),e)&&(t instanceof Ht&&(i=this.remove(e,t,n),i))){r=t;break}}return null!==r&&r.getChildBoundables().isEmpty()&&t.getChildBoundables().remove(r),i}}createHigherLevels(e,t){x.isTrue(!e.isEmpty());const n=this.createParentBoundables(e,t+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,t+1)}depth(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){let e=0;for(let t=arguments[0].getChildBoundables().iterator();t.hasNext();){const n=t.next();if(n instanceof Ht){const t=this.depth(n);t>e&&(e=t)}}return e+1}}createParentBoundables(e,t){x.isTrue(!e.isEmpty());const n=new j;n.add(this.createNode(t));const i=new j(e);Ut.sort(i,this.getComparator());for(let e=i.iterator();e.hasNext();){const i=e.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(t)),this.lastNode(n).addChildBoundable(i)}return n}isEmpty(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}get interfaces_(){return[g]}}qt.IntersectsOp=function(){},qt.DEFAULT_NODE_CAPACITY=10;class Kt{distance(e,t){}}class Xt extends qt{constructor(){super(),Xt.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)Xt.constructor_.call(this,Xt.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){const e=arguments[0];qt.constructor_.call(this,e)}}static centreX(e){return Xt.avg(e.getMinX(),e.getMaxX())}static avg(e,t){return(e+t)/2}static getItems(e){const t=new Array(e.size()).fill(null);let n=0;for(;!e.isEmpty();){const i=e.poll();t[n]=i.getBoundable(0).getItem(),n++}return t}static centreY(e){return Xt.avg(e.getMinY(),e.getMaxY())}createParentBoundablesFromVerticalSlices(e,t){x.isTrue(e.length>0);const n=new j;for(let i=0;i=0;){const e=i.poll(),o=e.getDistance();if(o>=n)break;if(e.isLeaves())if(r.size()o&&(r.poll(),r.add(e));n=r.peek().getDistance()}else e.expandToQueue(i,n)}return Xt.getItems(r)}}createNode(e){return new Jt(e)}size(){return 0===arguments.length?super.size.call(this):super.size.apply(this,arguments)}insert(){if(!(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof E))return super.insert.apply(this,arguments);{const e=arguments[0],t=arguments[1];if(e.isNull())return null;super.insert.call(this,e,t)}}getIntersectsOp(){return Xt.intersectsOp}verticalSlices(e,t){const n=Math.trunc(Math.ceil(e.size()/t)),i=new Array(t).fill(null),r=e.iterator();for(let e=0;e0;){const e=i.poll(),r=e.getDistance();if(r>=t)break;e.isLeaves()?(t=r,n=e):e.expandToQueue(i,t)}return null===n?null:[n.getBoundable(0).getItem(),n.getBoundable(1).getItem()]}}else{if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.isEmpty()||e.isEmpty())return null;const n=new Vt(this.getRoot(),e.getRoot(),t);return this.nearestNeighbour(n)}if(3===arguments.length){const e=arguments[2],t=new Gt(arguments[0],arguments[1]),n=new Vt(this.getRoot(),t,e);return this.nearestNeighbour(n)[0]}if(4===arguments.length){const e=arguments[2],t=arguments[3],n=new Gt(arguments[0],arguments[1]),i=new Vt(this.getRoot(),n,e);return this.nearestNeighbourK(i,t)}}}isWithinDistance(){if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=_.POSITIVE_INFINITY;const i=new zt;for(i.add(e);!i.isEmpty();){const e=i.poll(),r=e.getDistance();if(r>t)return!1;if(e.maximumDistance()<=t)return!0;if(e.isLeaves()){if(n=r,n<=t)return!0}else e.expandToQueue(i,n)}return!1}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=new Vt(this.getRoot(),e.getRoot(),t);return this.isWithinDistance(i,n)}}get interfaces_(){return[Wt,g]}}class Jt extends Ht{constructor(){super(),Jt.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0];Ht.constructor_.call(this,e)}computeBounds(){let e=null;for(let t=this.getChildBoundables().iterator();t.hasNext();){const n=t.next();null===e?e=new E(n.getBounds()):e.expandToInclude(n.getBounds())}return e}}Xt.STRtreeNode=Jt,Xt.xComparator=new class{get interfaces_(){return[y]}compare(e,t){return qt.compareDoubles(Xt.centreX(e.getBounds()),Xt.centreX(t.getBounds()))}},Xt.yComparator=new class{get interfaces_(){return[y]}compare(e,t){return qt.compareDoubles(Xt.centreY(e.getBounds()),Xt.centreY(t.getBounds()))}},Xt.intersectsOp=new class{get interfaces_(){return[IntersectsOp]}intersects(e,t){return e.intersects(t)}},Xt.DEFAULT_NODE_CAPACITY=10;class Zt{static relativeSign(e,t){return et?1:0}static compare(e,t,n){if(t.equals2D(n))return 0;const i=Zt.relativeSign(t.x,n.x),r=Zt.relativeSign(t.y,n.y);switch(e){case 0:return Zt.compareValue(i,r);case 1:return Zt.compareValue(r,i);case 2:return Zt.compareValue(r,-i);case 3:return Zt.compareValue(-i,r);case 4:return Zt.compareValue(-i,-r);case 5:return Zt.compareValue(-r,-i);case 6:return Zt.compareValue(-r,i);case 7:return Zt.compareValue(i,-r)}return x.shouldNeverReachHere("invalid octant value"),0}static compareValue(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0}}class Qt{constructor(){Qt.constructor_.apply(this,arguments)}static constructor_(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this._segString=e,this.coord=new I(t),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(n))}getCoordinate(){return this.coord}print(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)}compareTo(e){const t=e;return this.segmentIndext.segmentIndex?1:this.coord.equals2D(t.coord)?0:this._isInterior?t._isInterior?Zt.compare(this._segmentOctant,this.coord,t.coord):1:-1}isEndPoint(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e}toString(){return this.segmentIndex+":"+this.coord.toString()}isInterior(){return this._isInterior}get interfaces_(){return[d]}}class $t{hasNext(){}next(){}remove(){}}class en{constructor(){en.constructor_.apply(this,arguments)}static constructor_(){this._nodeMap=new Nt,this._edge=null;const e=arguments[0];this._edge=e}getSplitCoordinates(){const e=new Y;this.addEndpoints();const t=this.iterator();let n=t.next();for(;t.hasNext();){const i=t.next();this.addEdgeCoordinates(n,i,e),n=i}return e.toCoordinateArray()}addCollapsedNodes(){const e=new j;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(let t=e.iterator();t.hasNext();){const e=t.next().intValue();this.add(this._edge.getCoordinate(e),e)}}createSplitEdgePts(e,t){let n=t.segmentIndex-e.segmentIndex+2;if(2===n)return[new I(e.coord),new I(t.coord)];const i=this._edge.getCoordinate(t.segmentIndex),r=t.isInterior()||!t.coord.equals2D(i);r||n--;const o=new Array(n).fill(null);let s=0;o[s++]=new I(e.coord);for(let n=e.segmentIndex+1;n<=t.segmentIndex;n++)o[s++]=this._edge.getCoordinate(n);return r&&(o[s]=new I(t.coord)),o}print(e){e.println("Intersections:");for(let t=this.iterator();t.hasNext();){t.next().print(e)}}findCollapsesFromExistingVertices(e){for(let t=0;t=0?t>=0?n>=i?0:1:n>=i?7:6:t>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1],n=t.x-e.x,i=t.y-e.y;if(0===n&&0===i)throw new h("Cannot compute the octant for two identical points "+e);return tn.octant(n,i)}}}class nn{getCoordinates(){}size(){}getCoordinate(e){}isClosed(){}setData(e){}getData(){}}class rn{addIntersection(e,t){}get interfaces_(){return[nn]}}class on{constructor(){on.constructor_.apply(this,arguments)}static constructor_(){this._nodeList=new en(this),this._pts=null,this._data=null;const e=arguments[0],t=arguments[1];this._pts=e,this._data=t}static getNodedSubstrings(){if(1===arguments.length){const e=arguments[0],t=new j;return on.getNodedSubstrings(e,t),t}if(2===arguments.length){const e=arguments[1];for(let t=arguments[0].iterator();t.hasNext();){t.next().getNodeList().addSplitEdges(e)}}}getCoordinates(){return this._pts}size(){return this._pts.length}getCoordinate(e){return this._pts[e]}isClosed(){return this._pts[0].equals(this._pts[this._pts.length-1])}getSegmentOctant(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))}setData(e){this._data=e}safeOctant(e,t){return e.equals2D(t)?0:tn.octant(e,t)}getData(){return this._data}addIntersection(){if(2===arguments.length){const e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){const e=arguments[1],t=arguments[3],n=new I(arguments[0].getIntersection(t));this.addIntersection(n,e)}}toString(){return tt.toLineString(new xe(this._pts))}getNodeList(){return this._nodeList}addIntersectionNode(e,t){let n=t;const i=n+1;if(i=e.length-1)return e.length-1;const i=Rt.quadrant(e[n],e[n+1]);let r=t+1;for(;rn.getId()&&(n.computeOverlaps(i,e),this._nOverlaps++),this._segInt.isDone())return null}}}}class dn extends sn{constructor(){super(),dn.constructor_.apply(this,arguments)}static constructor_(){this._si=null;const e=arguments[0];this._si=e}overlap(){if(4!==arguments.length)return super.overlap.apply(this,arguments);{const e=arguments[1],t=arguments[2],n=arguments[3],i=arguments[0].getContext(),r=t.getContext();this._si.processIntersections(i,e,r,n)}}}un.SegmentOverlapAction=dn;class mn{constructor(){mn.constructor_.apply(this,arguments)}static constructor_(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=ie.COUNTERCLOCKWISE;const e=arguments[0];this._inputLine=e}static simplify(e,t){return new mn(e).simplify(t)}isDeletable(e,t,n,i){const r=this._inputLine[e],o=this._inputLine[t],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&(!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,e,n,i))}deleteShallowConcavities(){let e=1,t=this.findNextNonDeletedIndex(e),n=this.findNextNonDeletedIndex(t),i=!1;for(;n=0;t--)this.addPt(e[t])}isRedundant(e){if(this._ptList.size()<1)return!1;const t=this._ptList.get(this._ptList.size()-1);return e.distance(t)Math.PI;)e-=fn.PI_TIMES_2;for(;e<=-Math.PI;)e+=fn.PI_TIMES_2;return e}static angle(){if(1===arguments.length){const e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){const e=arguments[0],t=arguments[1],n=t.x-e.x,i=t.y-e.y;return Math.atan2(i,n)}}static isAcute(e,t,n){const i=e.x-t.x,r=e.y-t.y;return i*(n.x-t.x)+r*(n.y-t.y)>0}static isObtuse(e,t,n){const i=e.x-t.x,r=e.y-t.y;return i*(n.x-t.x)+r*(n.y-t.y)<0}static interiorAngle(e,t,n){const i=fn.angle(t,e),r=fn.angle(t,n);return Math.abs(r-i)}static normalizePositive(e){if(e<0){for(;e<0;)e+=fn.PI_TIMES_2;e>=fn.PI_TIMES_2&&(e=0)}else{for(;e>=fn.PI_TIMES_2;)e-=fn.PI_TIMES_2;e<0&&(e=0)}return e}static angleBetween(e,t,n){const i=fn.angle(t,e),r=fn.angle(t,n);return fn.diff(i,r)}static diff(e,t){let n=null;return n=eMath.PI&&(n=2*Math.PI-n),n}static toRadians(e){return e*Math.PI/180}static getTurn(e,t){const n=Math.sin(t-e);return n>0?fn.COUNTERCLOCKWISE:n<0?fn.CLOCKWISE:fn.NONE}static angleBetweenOriented(e,t,n){const i=fn.angle(t,e),r=fn.angle(t,n)-i;return r<=-Math.PI?r+fn.PI_TIMES_2:r>Math.PI?r-fn.PI_TIMES_2:r}}fn.PI_TIMES_2=2*Math.PI,fn.PI_OVER_2=Math.PI/2,fn.PI_OVER_4=Math.PI/4,fn.COUNTERCLOCKWISE=ie.COUNTERCLOCKWISE,fn.CLOCKWISE=ie.CLOCKWISE,fn.NONE=ie.COLLINEAR;class pn{constructor(){pn.constructor_.apply(this,arguments)}static constructor_(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new rt,this._seg1=new rt,this._offset0=new rt,this._offset1=new rt,this._side=0,this._hasNarrowConcaveAngle=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=t,this._li=new it,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===st.JOIN_ROUND&&(this._closingSegLengthFactor=pn.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}addNextSegment(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;const n=ie.index(this._s0,this._s1,this._s2),i=n===ie.CLOCKWISE&&this._side===lt.LEFT||n===ie.COUNTERCLOCKWISE&&this._side===lt.RIGHT;0===n?this.addCollinear(t):i?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)}addLineEndCap(e,t){const n=new rt(e,t),i=new rt;this.computeOffsetSegment(n,lt.LEFT,this._distance,i);const r=new rt;this.computeOffsetSegment(n,lt.RIGHT,this._distance,r);const o=t.x-e.x,s=t.y-e.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case st.CAP_ROUND:this._segList.addPt(i.p1),this.addDirectedFillet(t,a+Math.PI/2,a-Math.PI/2,ie.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case st.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case st.CAP_SQUARE:const e=new I;e.x=Math.abs(this._distance)*Math.cos(a),e.y=Math.abs(this._distance)*Math.sin(a);const n=new I(i.p1.x+e.x,i.p1.y+e.y),o=new I(r.p1.x+e.x,r.p1.y+e.y);this._segList.addPt(n),this._segList.addPt(o)}}getCoordinates(){return this._segList.getCoordinates()}addMitreJoin(e,t,n,i){const r=Pe.intersection(t.p0,t.p1,n.p0,n.p1);if(null!==r){if((i<=0?1:r.distance(e)/Math.abs(i))<=this._bufParams.getMitreLimit())return this._segList.addPt(r),null}this.addLimitedMitreJoin(t,n,i,this._bufParams.getMitreLimit())}addOutsideTurn(e,t){if(this._offset0.p1.distance(this._offset1.p0)=h&&(a-=2*Math.PI),this._segList.addPt(t),this.addDirectedFillet(e,a,h,i,r),this._segList.addPt(n)}addLastSegment(){this._segList.addPt(this._offset1.p1)}initSideSegments(e,t,n){this._s1=e,this._s2=t,this._side=n,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)}addLimitedMitreJoin(e,t,n,i){const r=this._seg0.p1,o=fn.angle(r,this._seg0.p0),s=fn.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=fn.normalize(o+s),l=fn.normalize(a+Math.PI),c=i*n,h=n-c*Math.abs(Math.sin(s)),u=r.x+c*Math.cos(l),d=r.y+c*Math.sin(l),m=new I(u,d),g=new rt(r,m),f=g.pointAlongOffset(1,h),p=g.pointAlongOffset(1,-h);this._side===lt.LEFT?(this._segList.addPt(f),this._segList.addPt(p)):(this._segList.addPt(p),this._segList.addPt(f))}addDirectedFillet(e,t,n,i,r){const o=i===ie.CLOCKWISE?-1:1,s=Math.abs(t-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;const l=s/a,c=new I;for(let n=0;n0){const e=new I((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(e);const t=new I((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(t)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}createCircle(e){const t=new I(e.x+this._distance,e.y);this._segList.addPt(t),this.addDirectedFillet(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}addBevelJoin(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)}init(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new gn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}addCollinear(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===st.JOIN_BEVEL||this._bufParams.getJoinStyle()===st.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ie.CLOCKWISE,this._distance))}closeRing(){this._segList.closeRing()}hasNarrowConcaveAngle(){return this._hasNarrowConcaveAngle}}pn.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,pn.MAX_CLOSING_SEG_LEN_FACTOR=80;class _n{constructor(){_n.constructor_.apply(this,arguments)}static constructor_(){this._distance=0,this._precisionModel=null,this._bufParams=null;const e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t}static copyCoordinates(e){const t=new Array(e.length).fill(null);for(let n=0;n=0;e--)n.addNextSegment(t[e],!0)}else{n.addSegments(e,!1);const t=mn.simplify(e,i),r=t.length-1;n.initSideSegments(t[0],t[1],lt.LEFT),n.addFirstSegment();for(let e=2;e<=r;e++)n.addNextSegment(t[e],!0)}n.addLastSegment(),n.closeRing()}computeRingBufferCurve(e,t,n){let i=this.simplifyTolerance(this._distance);t===lt.RIGHT&&(i=-i);const r=mn.simplify(e,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],t);for(let e=1;e<=o;e++){const t=1!==e;n.addNextSegment(r[e],t)}n.closeRing()}computeLineBufferCurve(e,t){const n=this.simplifyTolerance(this._distance),i=mn.simplify(e,n),r=i.length-1;t.initSideSegments(i[0],i[1],lt.LEFT);for(let e=2;e<=r;e++)t.addNextSegment(i[e],!0);t.addLastSegment(),t.addLineEndCap(i[r-1],i[r]);const o=mn.simplify(e,-n),s=o.length-1;t.initSideSegments(o[s],o[s-1],lt.LEFT);for(let e=s-2;e>=0;e--)t.addNextSegment(o[e],!0);t.addLastSegment(),t.addLineEndCap(o[1],o[0]),t.closeRing()}computePointCurve(e,t){switch(this._bufParams.getEndCapStyle()){case st.CAP_ROUND:t.createCircle(e);break;case st.CAP_SQUARE:t.createSquare(e)}}getLineCurve(e,t){if(this._distance=t,this.isLineOffsetEmpty(t))return null;const n=Math.abs(t),i=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){const n=t<0;this.computeSingleSidedBufferCurve(e,n,i)}else this.computeLineBufferCurve(e,i);return i.getCoordinates()}getBufferParameters(){return this._bufParams}simplifyTolerance(e){return e*this._bufParams.getSimplifyFactor()}getRingCurve(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(0===n)return _n.copyCoordinates(e);const i=this.getSegGen(n);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()}computeOffsetCurve(e,t,n){const i=this.simplifyTolerance(this._distance);if(t){const t=mn.simplify(e,-i),r=t.length-1;n.initSideSegments(t[r],t[r-1],lt.LEFT),n.addFirstSegment();for(let e=r-2;e>=0;e--)n.addNextSegment(t[e],!0)}else{const t=mn.simplify(e,i),r=t.length-1;n.initSideSegments(t[0],t[1],lt.LEFT),n.addFirstSegment();for(let e=2;e<=r;e++)n.addNextSegment(t[e],!0)}n.addLastSegment()}isLineOffsetEmpty(e){return 0===e||e<0&&!this._bufParams.isSingleSided()}getSegGen(e){return new pn(this._precisionModel,this._bufParams,e)}}class yn{constructor(){yn.constructor_.apply(this,arguments)}static constructor_(){this._subgraphs=null,this._seg=new rt;const e=arguments[0];this._subgraphs=e}findStabbedSegments(){if(1===arguments.length){const e=arguments[0],t=new j;for(let n=this._subgraphs.iterator();n.hasNext();){const i=n.next(),r=i.getEnvelope();e.yr.getMaxY()||this.findStabbedSegments(e,i.getDirectedEdges(),t)}return t}if(3===arguments.length)if(N(arguments[2],H)&&arguments[0]instanceof I&&arguments[1]instanceof Lt){const e=arguments[0],t=arguments[1],n=arguments[2],i=t.getEdge().getCoordinates();for(let r=0;rthis._seg.p1.y&&this._seg.reverse();if(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y)continue;if(ie.index(this._seg.p0,this._seg.p1,e)===ie.RIGHT)continue;let o=t.getDepth(lt.LEFT);this._seg.p0.equals(i[r])||(o=t.getDepth(lt.RIGHT));const s=new bn(this._seg,o);n.add(s)}}else if(N(arguments[2],H)&&arguments[0]instanceof I&&N(arguments[1],H)){const e=arguments[0],t=arguments[2];for(let n=arguments[1].iterator();n.hasNext();){const i=n.next();i.isForward()&&this.findStabbedSegments(e,i,t)}}}getDepth(e){const t=this.findStabbedSegments(e);if(0===t.size())return 0;return Ut.min(t)._leftDepth}}class bn{constructor(){bn.constructor_.apply(this,arguments)}static constructor_(){this._upwardSeg=null,this._leftDepth=null;const e=arguments[0],t=arguments[1];this._upwardSeg=new rt(e),this._leftDepth=t}compareTo(e){const t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;let n=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==n?n:(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg),0!==n?n:this._upwardSeg.compareTo(t._upwardSeg))}compareX(e,t){const n=e.p0.compareTo(t.p0);return 0!==n?n:e.p1.compareTo(t.p1)}toString(){return this._upwardSeg.toString()}get interfaces_(){return[d]}}yn.DepthSegment=bn;class Cn extends c{constructor(){super(),Cn.constructor_.apply(this,arguments)}static constructor_(){c.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}class xn{constructor(){xn.constructor_.apply(this,arguments)}static constructor_(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){const e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1];this.x=e,this.y=t,this.w=1}else if(arguments[0]instanceof xn&&arguments[1]instanceof xn){const e=arguments[0],t=arguments[1];this.x=e.y*t.w-t.y*e.w,this.y=t.x*e.w-e.x*t.w,this.w=e.x*t.y-t.x*e.y}else if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];this.x=e.y-t.y,this.y=t.x-e.x,this.w=e.x*t.y-t.x*e.y}}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this.x=e,this.y=t,this.w=n}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=e.y-t.y,o=t.x-e.x,s=e.x*t.y-t.x*e.y,a=n.y-i.y,l=i.x-n.x,c=n.x*i.y-i.x*n.y;this.x=o*c-l*s,this.y=a*s-r*c,this.w=r*l-a*o}}getY(){const e=this.y/this.w;if(_.isNaN(e)||_.isInfinite(e))throw new Cn;return e}getX(){const e=this.x/this.w;if(_.isNaN(e)||_.isInfinite(e))throw new Cn;return e}getCoordinate(){const e=new I;return e.x=this.getX(),e.y=this.getY(),e}}class vn{constructor(){vn.constructor_.apply(this,arguments)}static constructor_(){this.p0=null,this.p1=null,this.p2=null;const e=arguments[0],t=arguments[1],n=arguments[2];this.p0=e,this.p1=t,this.p2=n}static area(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)}static signedArea(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2}static det(e,t,n,i){return e*i-t*n}static interpolateZ(e,t,n,i){const r=t.x,o=t.y,s=n.x-r,a=i.x-r,l=n.y-o,c=i.y-o,h=s*c-a*l,u=e.x-r,d=e.y-o,m=(c*u-a*d)/h,g=(-l*u+s*d)/h;return t.getZ()+m*(n.getZ()-t.getZ())+g*(i.getZ()-t.getZ())}static longestSideLength(e,t,n){const i=e.distance(t),r=t.distance(n),o=n.distance(e);let s=i;return r>s&&(s=r),o>s&&(s=o),s}static circumcentreDD(e,t,n){const i=te.valueOf(e.x).subtract(n.x),r=te.valueOf(e.y).subtract(n.y),o=te.valueOf(t.x).subtract(n.x),s=te.valueOf(t.y).subtract(n.y),a=te.determinant(i,r,o,s).multiply(2),l=i.sqr().add(r.sqr()),c=o.sqr().add(s.sqr()),h=te.determinant(r,l,s,c),u=te.determinant(i,l,o,c),d=te.valueOf(n.x).subtract(h.divide(a)).doubleValue(),m=te.valueOf(n.y).add(u.divide(a)).doubleValue();return new I(d,m)}static isAcute(e,t,n){return!!fn.isAcute(e,t,n)&&(!!fn.isAcute(t,n,e)&&!!fn.isAcute(n,e,t))}static circumcentre(e,t,n){const i=n.x,r=n.y,o=e.x-i,s=e.y-r,a=t.x-i,l=t.y-r,c=2*vn.det(o,s,a,l),h=vn.det(s,o*o+s*s,l,a*a+l*l),u=vn.det(o,o*o+s*s,a,a*a+l*l);return new I(i-h/c,r+u/c)}static perpendicularBisector(e,t){const n=t.x-e.x,i=t.y-e.y,r=new xn(e.x+n/2,e.y+i/2,1),o=new xn(e.x-i+n/2,e.y+n+i/2,1);return new xn(r,o)}static angleBisector(e,t,n){const i=t.distance(e),r=i/(i+t.distance(n)),o=n.x-e.x,s=n.y-e.y;return new I(e.x+r*o,e.y+r*s)}static area3D(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=t.getZ()-e.getZ(),s=n.x-e.x,a=n.y-e.y,l=n.getZ()-e.getZ(),c=r*l-o*a,h=o*s-i*l,u=i*a-r*s,d=c*c+h*h+u*u;return Math.sqrt(d)/2}static centroid(e,t,n){const i=(e.x+t.x+n.x)/3,r=(e.y+t.y+n.y)/3;return new I(i,r)}static inCentre(e,t,n){const i=t.distance(n),r=e.distance(n),o=e.distance(t),s=i+r+o,a=(i*e.x+r*t.x+o*n.x)/s,l=(i*e.y+r*t.y+o*n.y)/s;return new I(a,l)}area(){return vn.area(this.p0,this.p1,this.p2)}signedArea(){return vn.signedArea(this.p0,this.p1,this.p2)}interpolateZ(e){if(null===e)throw new h("Supplied point is null.");return vn.interpolateZ(e,this.p0,this.p1,this.p2)}longestSideLength(){return vn.longestSideLength(this.p0,this.p1,this.p2)}isAcute(){return vn.isAcute(this.p0,this.p1,this.p2)}circumcentre(){return vn.circumcentre(this.p0,this.p1,this.p2)}area3D(){return vn.area3D(this.p0,this.p1,this.p2)}centroid(){return vn.centroid(this.p0,this.p1,this.p2)}inCentre(){return vn.inCentre(this.p0,this.p1,this.p2)}}class Sn{constructor(){Sn.constructor_.apply(this,arguments)}static constructor_(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new j;const e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n}addRingSide(e,t,n,i,r){if(0===t&&e.length=de.MINIMUM_VALID_SIZE&&ie.isCCW(e)&&(o=r,s=i,n=lt.opposite(n));const a=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(a,o,s)}addRingBothSides(e,t){this.addRingSide(e,t,lt.LEFT,at.EXTERIOR,at.INTERIOR),this.addRingSide(e,t,lt.RIGHT,at.INTERIOR,at.EXTERIOR)}addPoint(e){if(this._distance<=0)return null;const t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,at.EXTERIOR,at.INTERIOR)}addPolygon(e){let t=this._distance,n=lt.LEFT;this._distance<0&&(t=-this._distance,n=lt.RIGHT);const i=e.getExteriorRing(),r=be.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addRingSide(r,t,n,at.EXTERIOR,at.INTERIOR);for(let i=0;i0&&this.isErodedCompletely(r,-this._distance)||this.addRingSide(o,t,lt.opposite(n),at.INTERIOR,at.EXTERIOR)}}isTriangleErodedCompletely(e,t){const n=new vn(e[0],e[1],e[2]),i=n.inCentre();return Le.pointToSegment(i,n.p0,n.p1)r}addCollection(e){for(let t=0;t=this._max)throw new U;const e=this._parent.getGeometryN(this._index++);return e instanceof he?(this._subcollectionIterator=new In(e),this._subcollectionIterator.next()):e}remove(){throw new L(this.getClass().getName())}hasNext(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}get interfaces_(){return[$t]}}class wn{constructor(){wn.constructor_.apply(this,arguments)}static constructor_(){this._geom=null;const e=arguments[0];this._geom=e}static locatePointInPolygon(e,t){if(t.isEmpty())return at.EXTERIOR;const n=t.getExteriorRing(),i=wn.locatePointInRing(e,n);if(i!==at.INTERIOR)return i;for(let n=0;n=0;n--){const i=this._edgeList.get(n),r=i.getSym();null===t&&(t=r),null!==e&&r.setNext(e),e=i}t.setNext(e)}computeDepths(){if(1===arguments.length){const e=arguments[0],t=this.findIndex(e),n=e.getDepth(lt.LEFT),i=e.getDepth(lt.RIGHT),r=this.computeDepths(t+1,this._edgeList.size(),n);if(this.computeDepths(0,t,r)!==i)throw new dt("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){const e=arguments[1];let t=arguments[2];for(let n=arguments[0];n=0;r--){const o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===t&&o.getEdgeRing()===e&&(t=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==e)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==e)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(x.isTrue(null!==t,"found null for first outgoing dirEdge"),x.isTrue(t.getEdgeRing()===e,"unable to link last incoming dirEdge"),n.setNextMin(t))}getOutgoingDegree(){if(0===arguments.length){let e=0;for(let t=this.iterator();t.hasNext();){t.next().isInResult()&&e++}return e}if(1===arguments.length){const e=arguments[0];let t=0;for(let n=this.iterator();n.hasNext();){n.next().getEdgeRing()===e&&t++}return t}}getLabel(){return this._label}findCoveredLineEdges(){let e=at.NONE;for(let t=this.iterator();t.hasNext();){const n=t.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){e=at.INTERIOR;break}if(i.isInResult()){e=at.EXTERIOR;break}}}if(e===at.NONE)return null;let t=e;for(let e=this.iterator();e.hasNext();){const n=e.next(),i=n.getSym();n.isLineEdge()?n.getEdge().setCovered(t===at.INTERIOR):(n.isInResult()&&(t=at.EXTERIOR),i.isInResult()&&(t=at.INTERIOR))}}computeLabelling(e){super.computeLabelling.call(this,e),this._label=new yt(at.NONE);for(let e=this.iterator();e.hasNext();){const t=e.next().getEdge().getLabel();for(let e=0;e<2;e++){const n=t.getLocation(e);n!==at.INTERIOR&&n!==at.BOUNDARY||this._label.setLocation(e,at.INTERIOR)}}}}class Mn extends Ot{constructor(){super()}createNode(e){return new St(e,new An)}}class Nn{constructor(){Nn.constructor_.apply(this,arguments)}static constructor_(){this._pts=null,this._orientation=null;const e=arguments[0];this._pts=e,this._orientation=Nn.orientation(e)}static orientation(e){return 1===be.increasingDirection(e)}static compareOriented(e,t,n,i){const r=t?1:-1,o=i?1:-1,s=t?e.length:-1,a=i?n.length:-1;let l=t?0:e.length-1,c=i?0:n.length-1;for(;;){const t=e[l].compareTo(n[c]);if(0!==t)return t;l+=r,c+=o;const i=l===s,h=c===a;if(i&&!h)return-1;if(!i&&h)return 1;if(i&&h)return 0}}compareTo(e){const t=e;return Nn.compareOriented(this._pts,this._orientation,t._pts,t._orientation)}get interfaces_(){return[d]}}class Dn{constructor(){Dn.constructor_.apply(this,arguments)}static constructor_(){this._edges=new j,this._ocaMap=new Nt}print(e){e.print("MULTILINESTRING ( ");for(let t=0;t0&&e.print(","),e.print("(");const i=n.getCoordinates();for(let t=0;t0&&e.print(","),e.print(i[t].x+" "+i[t].y);e.println(")")}e.print(") ")}addAll(e){for(let t=e.iterator();t.hasNext();)this.add(t.next())}findEdgeIndex(e){for(let t=0;t0||!t.coord.equals2D(i);r||n--;const o=new Array(n).fill(null);let s=0;o[s++]=new I(e.coord);for(let n=e.segmentIndex+1;n<=t.segmentIndex;n++)o[s++]=this.edge.pts[n];return r&&(o[s]=t.coord),new Wn(o,new yt(this.edge._label))}add(e,t,n){const i=new Ln(e,t,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)}isIntersection(e){for(let t=this.iterator();t.hasNext();){if(t.next().coord.equals(e))return!0}return!1}}class Fn{constructor(){Fn.constructor_.apply(this,arguments)}static constructor_(){if(this._matrix=null,0===arguments.length)this._matrix=Array(3).fill().map((()=>Array(3))),this.setAll(F.FALSE);else if(1===arguments.length)if("string"==typeof arguments[0]){const e=arguments[0];Fn.constructor_.call(this),this.set(e)}else if(arguments[0]instanceof Fn){const e=arguments[0];Fn.constructor_.call(this),this._matrix[at.INTERIOR][at.INTERIOR]=e._matrix[at.INTERIOR][at.INTERIOR],this._matrix[at.INTERIOR][at.BOUNDARY]=e._matrix[at.INTERIOR][at.BOUNDARY],this._matrix[at.INTERIOR][at.EXTERIOR]=e._matrix[at.INTERIOR][at.EXTERIOR],this._matrix[at.BOUNDARY][at.INTERIOR]=e._matrix[at.BOUNDARY][at.INTERIOR],this._matrix[at.BOUNDARY][at.BOUNDARY]=e._matrix[at.BOUNDARY][at.BOUNDARY],this._matrix[at.BOUNDARY][at.EXTERIOR]=e._matrix[at.BOUNDARY][at.EXTERIOR],this._matrix[at.EXTERIOR][at.INTERIOR]=e._matrix[at.EXTERIOR][at.INTERIOR],this._matrix[at.EXTERIOR][at.BOUNDARY]=e._matrix[at.EXTERIOR][at.BOUNDARY],this._matrix[at.EXTERIOR][at.EXTERIOR]=e._matrix[at.EXTERIOR][at.EXTERIOR]}}static matches(){if(Number.isInteger(arguments[0])&&"string"==typeof arguments[1]){const e=arguments[0],t=arguments[1];return t===F.SYM_DONTCARE||(t===F.SYM_TRUE&&(e>=0||e===F.TRUE)||(t===F.SYM_FALSE&&e===F.FALSE||(t===F.SYM_P&&e===F.P||(t===F.SYM_L&&e===F.L||t===F.SYM_A&&e===F.A))))}if("string"==typeof arguments[0]&&"string"==typeof arguments[1]){const e=arguments[1];return new Fn(arguments[0]).matches(e)}}static isTrue(e){return e>=0||e===F.TRUE}isIntersects(){return!this.isDisjoint()}isCovers(){return(Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])||Fn.isTrue(this._matrix[at.INTERIOR][at.BOUNDARY])||Fn.isTrue(this._matrix[at.BOUNDARY][at.INTERIOR])||Fn.isTrue(this._matrix[at.BOUNDARY][at.BOUNDARY]))&&this._matrix[at.EXTERIOR][at.INTERIOR]===F.FALSE&&this._matrix[at.EXTERIOR][at.BOUNDARY]===F.FALSE}isCoveredBy(){return(Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])||Fn.isTrue(this._matrix[at.INTERIOR][at.BOUNDARY])||Fn.isTrue(this._matrix[at.BOUNDARY][at.INTERIOR])||Fn.isTrue(this._matrix[at.BOUNDARY][at.BOUNDARY]))&&this._matrix[at.INTERIOR][at.EXTERIOR]===F.FALSE&&this._matrix[at.BOUNDARY][at.EXTERIOR]===F.FALSE}set(){if(1===arguments.length){const e=arguments[0];for(let t=0;t=0&&t>=0&&this.setAtLeast(e,t,n)}isWithin(){return Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])&&this._matrix[at.INTERIOR][at.EXTERIOR]===F.FALSE&&this._matrix[at.BOUNDARY][at.EXTERIOR]===F.FALSE}isTouches(e,t){return e>t?this.isTouches(t,e):(e===F.A&&t===F.A||e===F.L&&t===F.L||e===F.L&&t===F.A||e===F.P&&t===F.A||e===F.P&&t===F.L)&&(this._matrix[at.INTERIOR][at.INTERIOR]===F.FALSE&&(Fn.isTrue(this._matrix[at.INTERIOR][at.BOUNDARY])||Fn.isTrue(this._matrix[at.BOUNDARY][at.INTERIOR])||Fn.isTrue(this._matrix[at.BOUNDARY][at.BOUNDARY])))}isOverlaps(e,t){return e===F.P&&t===F.P||e===F.A&&t===F.A?Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])&&Fn.isTrue(this._matrix[at.INTERIOR][at.EXTERIOR])&&Fn.isTrue(this._matrix[at.EXTERIOR][at.INTERIOR]):e===F.L&&t===F.L&&(1===this._matrix[at.INTERIOR][at.INTERIOR]&&Fn.isTrue(this._matrix[at.INTERIOR][at.EXTERIOR])&&Fn.isTrue(this._matrix[at.EXTERIOR][at.INTERIOR]))}isEquals(e,t){return e===t&&(Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])&&this._matrix[at.INTERIOR][at.EXTERIOR]===F.FALSE&&this._matrix[at.BOUNDARY][at.EXTERIOR]===F.FALSE&&this._matrix[at.EXTERIOR][at.INTERIOR]===F.FALSE&&this._matrix[at.EXTERIOR][at.BOUNDARY]===F.FALSE)}toString(){const e=new Ce("123456789");for(let t=0;t<3;t++)for(let n=0;n<3;n++)e.setCharAt(3*t+n,F.toDimensionSymbol(this._matrix[t][n]));return e.toString()}setAll(e){for(let t=0;t<3;t++)for(let n=0;n<3;n++)this._matrix[t][n]=e}get(e,t){return this._matrix[e][t]}transpose(){let e=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=e,e=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=e,e=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=e,this}matches(e){if(9!==e.length)throw new h("Should be length 9: "+e);for(let t=0;t<3;t++)for(let n=0;n<3;n++)if(!Fn.matches(this._matrix[t][n],e.charAt(3*t+n)))return!1;return!0}add(e){for(let t=0;t<3;t++)for(let n=0;n<3;n++)this.setAtLeast(t,n,e.get(t,n))}isDisjoint(){return this._matrix[at.INTERIOR][at.INTERIOR]===F.FALSE&&this._matrix[at.INTERIOR][at.BOUNDARY]===F.FALSE&&this._matrix[at.BOUNDARY][at.INTERIOR]===F.FALSE&&this._matrix[at.BOUNDARY][at.BOUNDARY]===F.FALSE}isCrosses(e,t){return e===F.P&&t===F.L||e===F.P&&t===F.A||e===F.L&&t===F.A?Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])&&Fn.isTrue(this._matrix[at.INTERIOR][at.EXTERIOR]):e===F.L&&t===F.P||e===F.A&&t===F.P||e===F.A&&t===F.L?Fn.isTrue(this._matrix[at.INTERIOR][at.INTERIOR])&&Fn.isTrue(this._matrix[at.EXTERIOR][at.INTERIOR]):e===F.L&&t===F.L&&0===this._matrix[at.INTERIOR][at.INTERIOR]}get interfaces_(){return[m]}}class kn{constructor(){kn.constructor_.apply(this,arguments)}static constructor_(){if(this._data=null,this._size=0,0===arguments.length)kn.constructor_.call(this,10);else if(1===arguments.length){const e=arguments[0];this._data=new Array(e).fill(null)}}size(){return this._size}addAll(e){return null===e||0===e.length?null:(this.ensureCapacity(this._size+e.length),ye.arraycopy(e,0,this._data,this._size,e.length),void(this._size+=e.length))}ensureCapacity(e){if(e<=this._data.length)return null;const t=Math.max(e,2*this._data.length);this._data=Z.copyOf(this._data,t)}toArray(){const e=new Array(this._size).fill(null);return ye.arraycopy(this._data,0,e,0,this._size),e}add(e){this.ensureCapacity(this._size+1),this._data[this._size]=e,++this._size}}class Bn{static toIntArray(e){const t=new Array(e.size()).fill(null);for(let n=0;nn?t:n}getMinX(e){const t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return tArray(3)));for(let e=0;e<2;e++)for(let t=0;t<3;t++)this._depth[e][t]=zn.NULL_VALUE}static depthAtLocation(e){return e===at.EXTERIOR?0:e===at.INTERIOR?1:zn.NULL_VALUE}getDepth(e,t){return this._depth[e][t]}setDepth(e,t,n){this._depth[e][t]=n}isNull(){if(0===arguments.length){for(let e=0;e<2;e++)for(let t=0;t<3;t++)if(this._depth[e][t]!==zn.NULL_VALUE)return!1;return!0}if(1===arguments.length){const e=arguments[0];return this._depth[e][1]===zn.NULL_VALUE}if(2===arguments.length){const e=arguments[0],t=arguments[1];return this._depth[e][t]===zn.NULL_VALUE}}normalize(){for(let e=0;e<2;e++)if(!this.isNull(e)){let t=this._depth[e][1];this._depth[e][2]t&&(i=1),this._depth[e][n]=i}}}getDelta(e){return this._depth[e][lt.RIGHT]-this._depth[e][lt.LEFT]}getLocation(e,t){return this._depth[e][t]<=0?at.EXTERIOR:at.INTERIOR}toString(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}add(){if(1===arguments.length){const e=arguments[0];for(let t=0;t<2;t++)for(let n=1;n<3;n++){const i=e.getLocation(t,n);i!==at.EXTERIOR&&i!==at.INTERIOR||(this.isNull(t,n)?this._depth[t][n]=zn.depthAtLocation(i):this._depth[t][n]+=zn.depthAtLocation(i))}}else if(3===arguments.length){const e=arguments[0],t=arguments[1];arguments[2]===at.INTERIOR&&this._depth[e][t]++}}}zn.NULL_VALUE=-1;class Wn extends vt{constructor(){super(),Wn.constructor_.apply(this,arguments)}static constructor_(){if(this.pts=null,this._env=null,this.eiList=new On(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new zn,this._depthDelta=0,1===arguments.length){const e=arguments[0];Wn.constructor_.call(this,e,null)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.pts=e,this._label=t}}static updateIM(){if(!(2===arguments.length&&arguments[1]instanceof Fn&&arguments[0]instanceof yt))return super.updateIM.apply(this,arguments);{const e=arguments[0],t=arguments[1];t.setAtLeastIfValid(e.getLocation(0,lt.ON),e.getLocation(1,lt.ON),1),e.isArea()&&(t.setAtLeastIfValid(e.getLocation(0,lt.LEFT),e.getLocation(1,lt.LEFT),2),t.setAtLeastIfValid(e.getLocation(0,lt.RIGHT),e.getLocation(1,lt.RIGHT),2))}}getDepth(){return this._depth}getCollapsedEdge(){const e=new Array(2).fill(null);e[0]=this.pts[0],e[1]=this.pts[1];return new Wn(e,yt.toLineLabel(this._label))}isIsolated(){return this._isIsolated}getCoordinates(){return this.pts}setIsolated(e){this._isIsolated=e}setName(e){this._name=e}equals(e){if(!(e instanceof Wn))return!1;const t=e;if(this.pts.length!==t.pts.length)return!1;let n=!0,i=!0,r=this.pts.length;for(let e=0;e0?this.pts[0]:null;if(1===arguments.length){const e=arguments[0];return this.pts[e]}}print(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(let t=0;t0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(") "+this._label+" "+this._depthDelta)}computeIM(e){Wn.updateIM(this._label,e)}isCollapsed(){return!!this._label.isArea()&&(3===this.pts.length&&!!this.pts[0].equals(this.pts[2]))}isClosed(){return this.pts[0].equals(this.pts[this.pts.length-1])}getMaximumSegmentIndex(){return this.pts.length-1}getDepthDelta(){return this._depthDelta}getNumPoints(){return this.pts.length}printReverse(e){e.print("edge "+this._name+": ");for(let t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")}getMonotoneChainEdge(){return null===this._mce&&(this._mce=new Gn(this)),this._mce}getEnvelope(){if(null===this._env){this._env=new E;for(let e=0;e0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(") "+this._label+" "+this._depthDelta),e.toString()}isPointwiseEqual(e){if(this.pts.length!==e.pts.length)return!1;for(let t=0;ti||this._maxyo;if(s)return!1;const a=this.intersectsToleranceSquare(e,t);return x.isTrue(!(s&&a),"Found bad envelope test"),a}initCorners(e){const t=.5;this._minx=e.x-t,this._maxx=e.x+t,this._miny=e.y-t,this._maxy=e.y+t,this._corner[0]=new I(this._maxx,this._maxy),this._corner[1]=new I(this._minx,this._maxy),this._corner[2]=new I(this._minx,this._miny),this._corner[3]=new I(this._maxx,this._miny)}intersects(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}scale(e){return Math.round(e*this._scaleFactor)}getCoordinate(){return this._originalPt}copyScaled(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)}getSafeEnvelope(){if(null===this._safeEnv){const e=Vn.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new E(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv}intersectsPixelClosure(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))}intersectsToleranceSquare(e,t){let n=!1,i=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!i)||(!!e.equals(this._pt)||!!t.equals(this._pt))))))}addSnappedNode(e,t){const n=e.getCoordinate(t),i=e.getCoordinate(t+1);return!!this.intersects(n,i)&&(e.addIntersection(this.getCoordinate(),t),!0)}}Vn.SAFE_ENV_EXPANSION_FACTOR=.75;class Yn{constructor(){Yn.constructor_.apply(this,arguments)}static constructor_(){this.selectedSegment=new rt}select(){if(1===arguments.length);else if(2===arguments.length){const e=arguments[1];arguments[0].getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}}class qn{constructor(){qn.constructor_.apply(this,arguments)}static constructor_(){this._index=null;const e=arguments[0];this._index=e}snap(){if(1===arguments.length){const e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=e.getSafeEnvelope(),r=new Kn(e,t,n);return this._index.query(i,new class{get interfaces_(){return[Yt]}visitItem(e){e.select(i,r)}}),r.isNodeAdded()}}}class Kn extends Yn{constructor(){super(),Kn.constructor_.apply(this,arguments)}static constructor_(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._hotPixel=e,this._parentEdge=t,this._hotPixelVertexIndex=n}isNodeAdded(){return this._isNodeAdded}select(){if(!(2===arguments.length&&Number.isInteger(arguments[1])&&arguments[0]instanceof an))return super.select.apply(this,arguments);{const e=arguments[1],t=arguments[0].getContext();if(this._parentEdge===t&&(e===this._hotPixelVertexIndex||e+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(t,e)}}}qn.HotPixelSnapAction=Kn;class Xn{constructor(){Xn.constructor_.apply(this,arguments)}static constructor_(){this._li=null,this._interiorIntersections=null;const e=arguments[0];this._li=e,this._interiorIntersections=new j}processIntersections(e,t,n,i){if(e===n&&t===i)return null;const r=e.getCoordinates()[t],o=e.getCoordinates()[t+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(let e=0;e0?t:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)}bufferFixedPrecision(e){const t=new Un(new Jn(new Ae(1)),e.getScale()),n=new Hn(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)}bufferReducedPrecision(){if(0===arguments.length){for(let e=Zn.MAX_PRECISION_DIGITS;e>=0;e--){try{this.bufferReducedPrecision(e)}catch(e){if(!(e instanceof dt))throw e;this._saveException=e}if(null!==this._resultGeometry)return null}throw this._saveException}if(1===arguments.length){const e=arguments[0],t=Zn.precisionScaleFactor(this._argGeom,this._distance,e),n=new Ae(t);this.bufferFixedPrecision(n)}}computeGeometry(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;const e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Ae.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()}setQuadrantSegments(e){this._bufParams.setQuadrantSegments(e)}bufferOriginalPrecision(){try{const e=new Hn(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof b))throw e;this._saveException=e}}getResultGeometry(e){return this._distance=e,this.computeGeometry(),this._resultGeometry}setEndCapStyle(e){this._bufParams.setEndCapStyle(e)}}Zn.CAP_ROUND=st.CAP_ROUND,Zn.CAP_BUTT=st.CAP_FLAT,Zn.CAP_FLAT=st.CAP_FLAT,Zn.CAP_SQUARE=st.CAP_SQUARE,Zn.MAX_PRECISION_DIGITS=12;class Qn{isInBoundary(e){}}class $n{isInBoundary(e){return e%2==1}get interfaces_(){return[Qn]}}class ei{isInBoundary(e){return e>0}get interfaces_(){return[Qn]}}class ti{isInBoundary(e){return e>1}get interfaces_(){return[Qn]}}class ni{isInBoundary(e){return 1===e}get interfaces_(){return[Qn]}}Qn.Mod2BoundaryNodeRule=$n,Qn.EndPointBoundaryNodeRule=ei,Qn.MultiValentEndPointBoundaryNodeRule=ti,Qn.MonoValentEndPointBoundaryNodeRule=ni,Qn.MOD2_BOUNDARY_RULE=new $n,Qn.ENDPOINT_BOUNDARY_RULE=new ei,Qn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE=new ti,Qn.MONOVALENT_ENDPOINT_BOUNDARY_RULE=new ni,Qn.OGC_SFS_BOUNDARY_RULE=Qn.MOD2_BOUNDARY_RULE;class ii{constructor(){ii.constructor_.apply(this,arguments)}static constructor_(){if(this._boundaryRule=Qn.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){const e=arguments[0];if(null===e)throw new h("Rule must be non-null");this._boundaryRule=e}}locateInPolygonRing(e,t){return t.getEnvelopeInternal().intersects(e)?pt.locateInRing(e,t.getCoordinates()):at.EXTERIOR}intersects(e,t){return this.locate(e,t)!==at.EXTERIOR}updateLocationInfo(e){e===at.INTERIOR&&(this._isIn=!0),e===at.BOUNDARY&&this._numBoundaries++}computeLocation(e,t){if(t instanceof X&&this.updateLocationInfo(this.locateOnPoint(e,t)),t instanceof G)this.updateLocationInfo(this.locateOnLineString(e,t));else if(t instanceof oe)this.updateLocationInfo(this.locateInPolygon(e,t));else if(t instanceof Ne){const n=t;for(let t=0;t0||this._isIn?at.INTERIOR:at.EXTERIOR)}}class ri{constructor(){ri.constructor_.apply(this,arguments)}static constructor_(){this._pts=null,this._data=null;const e=arguments[0],t=arguments[1];this._pts=e,this._data=t}getCoordinates(){return this._pts}size(){return this._pts.length}getCoordinate(e){return this._pts[e]}isClosed(){return this._pts[0].equals(this._pts[this._pts.length-1])}getSegmentOctant(e){return e===this._pts.length-1?-1:tn.octant(this.getCoordinate(e),this.getCoordinate(e+1))}setData(e){this._data=e}getData(){return this._data}toString(){return tt.toLineString(new xe(this._pts))}get interfaces_(){return[nn]}}class oi{constructor(){oi.constructor_.apply(this,arguments)}static constructor_(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._keepIntersections=!0,this._isInteriorIntersectionsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0;const e=arguments[0];this._li=e,this._interiorIntersection=null}static createAllIntersectionsFinder(e){const t=new oi(e);return t.setFindAllIntersections(!0),t}static isInteriorVertexIntersection(){if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[3];return(!arguments[2]||!n)&&!!e.equals2D(t)}if(8===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=arguments[4],o=arguments[5],s=arguments[6],a=arguments[7];return!!oi.isInteriorVertexIntersection(e,n,r,s)||(!!oi.isInteriorVertexIntersection(e,i,r,a)||(!!oi.isInteriorVertexIntersection(t,n,o,s)||!!oi.isInteriorVertexIntersection(t,i,o,a)))}}static createInteriorIntersectionCounter(e){const t=new oi(e);return t.setInteriorIntersectionsOnly(!0),t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t}static createIntersectionCounter(e){const t=new oi(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t}static isEndSegment(e,t){return 0===t||t>=e.size()-2}static createAnyIntersectionFinder(e){return new oi(e)}static createInteriorIntersectionsFinder(e){const t=new oi(e);return t.setFindAllIntersections(!0),t.setInteriorIntersectionsOnly(!0),t}setCheckEndSegmentsOnly(e){this._isCheckEndSegmentsOnly=e}getIntersectionSegments(){return this._intSegments}count(){return this._intersectionCount}getIntersections(){return this._intersections}setFindAllIntersections(e){this._findAllIntersections=e}setKeepIntersections(e){this._keepIntersections=e}getIntersection(){return this._interiorIntersection}processIntersections(e,t,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;const r=e===n;if(r&&t===i)return null;if(this._isCheckEndSegmentsOnly){if(!(oi.isEndSegment(e,t)||oi.isEndSegment(n,i)))return null}const o=e.getCoordinate(t),s=e.getCoordinate(t+1),a=n.getCoordinate(i),l=n.getCoordinate(i+1),c=0===t,h=t+2===e.size(),u=0===i,d=i+2===n.size();this._li.computeIntersection(o,s,a,l);const m=this._li.hasIntersection()&&this._li.isInteriorIntersection();let g=!1;if(!this._isInteriorIntersectionsOnly){g=!(r&&Math.abs(i-t)<=1)&&oi.isInteriorVertexIntersection(o,s,a,l,c,h,u,d)}(m||g)&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=s,this._intSegments[2]=a,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)}hasIntersection(){return null!==this._interiorIntersection}isDone(){return!this._findAllIntersections&&null!==this._interiorIntersection}setInteriorIntersectionsOnly(e){this._isInteriorIntersectionsOnly=e}get interfaces_(){return[Rn]}}class si{constructor(){si.constructor_.apply(this,arguments)}static constructor_(){this._li=new it,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;const e=arguments[0];this._segStrings=e}static computeIntersections(e){const t=new si(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()}execute(){if(null!==this._segInt)return null;this.checkInteriorIntersections()}getIntersections(){return this._segInt.getIntersections()}isValid(){return this.execute(),this._isValid}setFindAllIntersections(e){this._findAllIntersections=e}checkInteriorIntersections(){this._isValid=!0,this._segInt=new oi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);const e=new un;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null}checkValid(){if(this.execute(),!this._isValid)throw new dt(this.getErrorMessage(),this._segInt.getIntersection())}getErrorMessage(){if(this._isValid)return"no intersections found";const e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+tt.toLineString(e[0],e[1])+" and "+tt.toLineString(e[2],e[3])}}class ai{constructor(){ai.constructor_.apply(this,arguments)}static constructor_(){this._nv=null;const e=arguments[0];this._nv=new si(ai.toSegmentStrings(e))}static toSegmentStrings(e){const t=new j;for(let n=e.iterator();n.hasNext();){const e=n.next();t.add(new ri(e.getCoordinates(),e))}return t}static checkValid(e){new ai(e).checkValid()}checkValid(){this._nv.checkValid()}}class li{constructor(){li.constructor_.apply(this,arguments)}static constructor_(){this._mapOp=null;const e=arguments[0];this._mapOp=e}static map(e,t){return new li(t).map(e)}map(e){const t=new j;for(let n=0;n=0&&e.add(r+1,new I(n),!1)}}findSegmentIndexToSnap(e,t){let n=_.MAX_VALUE,i=-1;for(let r=0;rt&&(t=e)}return t}if(2===arguments.length){const e=arguments[0],t=arguments[1];return Math.min(mi.computeOverlaySnapTolerance(e),mi.computeOverlaySnapTolerance(t))}}static computeSizeBasedSnapTolerance(e){const t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*mi.SNAP_PRECISION_FACTOR}static snapToSelf(e,t,n){return new mi(e).snapToSelf(t,n)}snapTo(e,t){const n=this.extractTargetCoordinates(e);return new gi(t,n).transform(this._srcGeom)}snapToSelf(e,t){const n=this.extractTargetCoordinates(this._srcGeom),i=new gi(e,n,!0).transform(this._srcGeom);let r=i;return t&&N(r,re)&&(r=i.buffer(0)),r}computeSnapTolerance(e){return this.computeMinimumSegmentLength(e)/10}extractTargetCoordinates(e){const t=new le,n=e.getCoordinates();for(let e=0;e>>20}static zeroLowerBits(e,t){let n="low";if(t>32&&(e.low=0,t%=32,n="high"),t>0){const i=t<32?~((1<=0;i--){if(fi.getBit(e,i)!==fi.getBit(t,i))return n;n++}return 52}}class pi{constructor(){pi.constructor_.apply(this,arguments)}static constructor_(){this._commonCoord=null,this._ccFilter=new _i}addCommonBits(e){const t=new yi(this._commonCoord);e.apply(t),e.geometryChanged()}removeCommonBits(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;const t=new I(this._commonCoord);t.x=-t.x,t.y=-t.y;const n=new yi(t);return e.apply(n),e.geometryChanged(),e}getCommonCoordinate(){return this._commonCoord}add(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()}}class _i{constructor(){_i.constructor_.apply(this,arguments)}static constructor_(){this._commonBitsX=new fi,this._commonBitsY=new fi}filter(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)}getCommonCoordinate(){return new I(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())}get interfaces_(){return[M]}}class yi{constructor(){yi.constructor_.apply(this,arguments)}static constructor_(){this.trans=null;const e=arguments[0];this.trans=e}filter(e,t){const n=e.getOrdinate(t,0)+this.trans.x,i=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,i)}isDone(){return!1}isGeometryChanged(){return!0}get interfaces_(){return[B]}}pi.CommonCoordinateFilter=_i,pi.Translater=yi;class bi{constructor(){bi.constructor_.apply(this,arguments)}static constructor_(){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null;const e=arguments[0],t=arguments[1];this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()}static overlayOp(e,t,n){return new bi(e,t).getResultGeometry(n)}static union(e,t){return bi.overlayOp(e,t,Fi.UNION)}static intersection(e,t){return bi.overlayOp(e,t,Fi.INTERSECTION)}static symDifference(e,t){return bi.overlayOp(e,t,Fi.SYMDIFFERENCE)}static difference(e,t){return bi.overlayOp(e,t,Fi.DIFFERENCE)}selfSnap(e){return new mi(e).snapTo(e,this._snapTolerance)}removeCommonBits(e){this._cbr=new pi,this._cbr.add(e[0]),this._cbr.add(e[1]);const t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t}prepareResult(e){return this._cbr.addCommonBits(e),e}getResultGeometry(e){const t=this.snap(this._geom),n=Fi.overlayOp(t[0],t[1],e);return this.prepareResult(n)}checkValid(e){e.isValid()||ye.out.println("Snapped geometry is invalid")}computeSnapTolerance(){this._snapTolerance=mi.computeOverlaySnapTolerance(this._geom[0],this._geom[1])}snap(e){const t=this.removeCommonBits(e);return mi.snap(t[0],t[1],this._snapTolerance)}}class Ci{constructor(){Ci.constructor_.apply(this,arguments)}static constructor_(){this._geom=new Array(2).fill(null);const e=arguments[0],t=arguments[1];this._geom[0]=e,this._geom[1]=t}static overlayOp(e,t,n){return new Ci(e,t).getResultGeometry(n)}static union(e,t){return Ci.overlayOp(e,t,Fi.UNION)}static intersection(e,t){return Ci.overlayOp(e,t,Fi.INTERSECTION)}static symDifference(e,t){return Ci.overlayOp(e,t,Fi.SYMDIFFERENCE)}static difference(e,t){return Ci.overlayOp(e,t,Fi.DIFFERENCE)}getResultGeometry(e){let t=null,n=!1,i=null;try{t=Fi.overlayOp(this._geom[0],this._geom[1],e);!0&&(n=!0)}catch(e){if(!(e instanceof b))throw e;i=e}if(!n)try{t=bi.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof b?i:e}return t}}class xi{constructor(){xi.constructor_.apply(this,arguments)}static constructor_(){this.mce=null,this.chainIndex=null;const e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t}computeIntersections(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)}}class vi{constructor(){vi.constructor_.apply(this,arguments)}static constructor_(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){const e=arguments[0],t=arguments[1];this._eventType=vi.DELETE,this._xValue=e,this._insertEvent=t}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this._eventType=vi.INSERT,this._label=e,this._xValue=t,this._obj=n}}isDelete(){return this._eventType===vi.DELETE}setDeleteEventIndex(e){this._deleteEventIndex=e}getObject(){return this._obj}compareTo(e){const t=e;return this._xValuet._xValue?1:this._eventTypet._eventType?1:0}getInsertEvent(){return this._insertEvent}isInsert(){return this._eventType===vi.INSERT}isSameLabel(e){return null!==this._label&&this._label===e._label}getDeleteEventIndex(){return this._deleteEventIndex}get interfaces_(){return[d]}}vi.INSERT=1,vi.DELETE=2;class Si{constructor(){Si.constructor_.apply(this,arguments)}static constructor_(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n}static isAdjacentSegments(e,t){return 1===Math.abs(e-t)}isTrivialIntersection(e,t,n,i){if(e===n&&1===this._li.getIntersectionNum()){if(Si.isAdjacentSegments(t,i))return!0;if(e.isClosed()){const n=e.getNumPoints()-1;if(0===t&&i===n||0===i&&t===n)return!0}}return!1}getProperIntersectionPoint(){return this._properIntersectionPoint}setIsDoneIfProperInt(e){this._isDoneWhenProperInt=e}hasProperInteriorIntersection(){return this._hasProperInterior}isBoundaryPointInternal(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next().getCoordinate();if(e.isIntersection(t))return!0}return!1}hasProperIntersection(){return this._hasProper}hasIntersection(){return this._hasIntersection}isDone(){return this._isDone}isBoundaryPoint(e,t){return null!==t&&(!!this.isBoundaryPointInternal(e,t[0])||!!this.isBoundaryPointInternal(e,t[1]))}setBoundaryNodes(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t}addIntersections(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;const r=e.getCoordinates()[t],o=e.getCoordinates()[t+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))}}class Ti extends class{}{constructor(){super(),Ti.constructor_.apply(this,arguments)}static constructor_(){this.events=new j,this.nOverlaps=null}prepareEvents(){Ut.sort(this.events);for(let e=0;et||this._maxo?1:0}get interfaces_(){return[y]}};class wi extends Ii{constructor(){super(),wi.constructor_.apply(this,arguments)}static constructor_(){this._item=null;const e=arguments[0],t=arguments[1],n=arguments[2];this._min=e,this._max=t,this._item=n}query(e,t,n){if(!this.intersects(e,t))return null;n.visitItem(this._item)}}class Ei extends Ii{constructor(){super(),Ei.constructor_.apply(this,arguments)}static constructor_(){this._node1=null,this._node2=null;const e=arguments[0],t=arguments[1];this._node1=e,this._node2=t,this.buildExtent(this._node1,this._node2)}buildExtent(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)}query(e,t,n){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,n),null!==this._node2&&this._node2.query(e,t,n)}}class Ai{constructor(){Ai.constructor_.apply(this,arguments)}static constructor_(){this._leaves=new j,this._root=null,this._level=0}buildTree(){Ut.sort(this._leaves,new Ii.NodeComparator);let e=this._leaves,t=null,n=new j;for(;;){if(this.buildLevel(e,n),1===n.size())return n.get(0);t=e,e=n,n=t}}insert(e,t,n){if(null!==this._root)throw new IllegalStateException("Index cannot be added to once it has been queried");this._leaves.add(new wi(e,t,n))}query(e,t,n){if(this.init(),null===this._root)return null;this._root.query(e,t,n)}buildRoot(){if(null!==this._root)return null;this._root=this.buildTree()}printNode(e){ye.out.println(tt.toLineString(new I(e._min,this._level),new I(e._max,this._level)))}init(){return null!==this._root||0===this._leaves.size()?null:void this.buildRoot()}buildLevel(e,t){this._level++,t.clear();for(let n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])}getInvalidPoint(){return this._invalidPoint}getBoundaryPoints(){const e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null);let n=0;for(let i=e.iterator();i.hasNext();){const e=i.next();t[n++]=e.getCoordinate().copy()}return t}getBoundaryNodes(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes}addSelfIntersectionNode(e,t,n){if(this.isBoundaryNode(e,t))return null;n===at.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,n)}addPolygonRing(e,t,n){if(e.isEmpty())return null;const i=be.removeRepeatedPoints(e.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;let r=t,o=n;ie.isCCW(i)&&(r=n,o=t);const s=new Wn(i,new yt(this._argIndex,at.BOUNDARY,r,o));this._lineEdgeMap.put(e,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],at.BOUNDARY)}insertPoint(e,t,n){const i=this._nodes.addNode(t),r=i.getLabel();null===r?i._label=new yt(e,n):r.setLocation(e,n)}createEdgeSetIntersector(){return new Ti}addSelfIntersectionNodes(e){for(let t=this._edges.iterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.eiList.iterator();t.hasNext();){const n=t.next();this.addSelfIntersectionNode(e,n.coord,i)}}}add(){if(!(1===arguments.length&&arguments[0]instanceof A))return super.add.apply(this,arguments);{const e=arguments[0];if(e.isEmpty())return null;if(e instanceof Se&&(this._useBoundaryDeterminationRule=!1),e instanceof oe)this.addPolygon(e);else if(e instanceof G)this.addLineString(e);else if(e instanceof X)this.addPoint(e);else if(e instanceof ue)this.addCollection(e);else if(e instanceof Ne)this.addCollection(e);else if(e instanceof Se)this.addCollection(e);else{if(!(e instanceof he))throw new L(e.getGeometryType());this.addCollection(e)}}}addCollection(e){for(let t=0;t50?(null===this._areaPtLocator&&(this._areaPtLocator=new Di(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)}findEdge(){if(1===arguments.length&&arguments[0]instanceof G){const e=arguments[0];return this._lineEdgeMap.get(e)}return super.findEdge.apply(this,arguments)}}class Oi{constructor(){Oi.constructor_.apply(this,arguments)}static constructor_(){if(this._li=new it,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){const e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Li(0,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];Oi.constructor_.call(this,e,t,Qn.OGC_SFS_BOUNDARY_RULE)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];e.getPrecisionModel().compareTo(t.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Li(0,e,n),this._arg[1]=new Li(1,t,n)}}getArgGeometry(e){return this._arg[e].getGeometry()}setComputationPrecision(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)}}class Fi extends Oi{constructor(){super(),Fi.constructor_.apply(this,arguments)}static constructor_(){this._ptLocator=new ii,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Dn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j;const e=arguments[0],t=arguments[1];Oi.constructor_.call(this,e,t),this._graph=new Ft(new Mn),this._geomFact=e.getFactory()}static overlayOp(e,t,n){return new Fi(e,t).getResultGeometry(n)}static union(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Fi.createEmptyResult(Fi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return Ci.overlayOp(e,t,Fi.UNION)}static intersection(e,t){if(e.isEmpty()||t.isEmpty())return Fi.createEmptyResult(Fi.INTERSECTION,e,t,e.getFactory());if(e.isGeometryCollection()){const n=t;return li.map(e,new class{get interfaces_(){return[MapOp]}map(e){return Fi.intersection(e,n)}})}return Ci.overlayOp(e,t,Fi.INTERSECTION)}static symDifference(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Fi.createEmptyResult(Fi.SYMDIFFERENCE,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return Ci.overlayOp(e,t,Fi.SYMDIFFERENCE)}static resultDimension(e,t,n){const i=t.getDimension(),r=n.getDimension();let o=-1;switch(e){case Fi.INTERSECTION:o=Math.min(i,r);break;case Fi.UNION:o=Math.max(i,r);break;case Fi.DIFFERENCE:o=i;break;case Fi.SYMDIFFERENCE:o=Math.max(i,r)}return o}static createEmptyResult(e,t,n,i){const r=Fi.resultDimension(e,t,n);return i.createEmpty(r)}static difference(e,t){if(e.isEmpty())return Fi.createEmptyResult(Fi.DIFFERENCE,e,t,e.getFactory());if(t.isEmpty())return e.copy();if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return Ci.overlayOp(e,t,Fi.DIFFERENCE)}static isResultOfOp(){if(2===arguments.length){const e=arguments[0],t=arguments[1],n=e.getLocation(0),i=e.getLocation(1);return Fi.isResultOfOp(n,i,t)}if(3===arguments.length){let e=arguments[0],t=arguments[1],n=arguments[2];switch(e===at.BOUNDARY&&(e=at.INTERIOR),t===at.BOUNDARY&&(t=at.INTERIOR),n){case Fi.INTERSECTION:return e===at.INTERIOR&&t===at.INTERIOR;case Fi.UNION:return e===at.INTERIOR||t===at.INTERIOR;case Fi.DIFFERENCE:return e===at.INTERIOR&&t!==at.INTERIOR;case Fi.SYMDIFFERENCE:return e===at.INTERIOR&&t!==at.INTERIOR||e!==at.INTERIOR&&t===at.INTERIOR}return!1}}insertUniqueEdge(e){const t=this._edgeList.findEqualEdge(e);if(null!==t){const n=t.getLabel();let i=e.getLabel();t.isPointwiseEqual(e)||(i=new yt(e.getLabel()),i.flip());const r=t.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(e)}getGraph(){return this._graph}cancelDuplicateResultEdges(){for(let e=this._graph.getEdgeEnds().iterator();e.hasNext();){const t=e.next(),n=t.getSym();t.isInResult()&&n.isInResult()&&(t.setInResult(!1),n.setInResult(!1))}}isCoveredByLA(e){return!!this.isCovered(e,this._resultLineList)||!!this.isCovered(e,this._resultPolyList)}computeGeometry(e,t,n,i){const r=new j;return r.addAll(e),r.addAll(t),r.addAll(n),r.isEmpty()?Fi.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(r)}mergeSymLabels(){for(let e=this._graph.getNodes().iterator();e.hasNext();){e.next().getEdges().mergeSymLabels()}}isCovered(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next();if(this._ptLocator.locate(e,t)!==at.EXTERIOR)return!0}return!1}replaceCollapsedEdges(){const e=new j;for(let t=this._edgeList.iterator();t.hasNext();){const n=t.next();n.isCollapsed()&&(t.remove(),e.add(n.getCollapsedEdge()))}this._edgeList.addAll(e)}updateNodeLabelling(){for(let e=this._graph.getNodes().iterator();e.hasNext();){const t=e.next(),n=t.getEdges().getLabel();t.getLabel().merge(n)}}getResultGeometry(e){return this.computeOverlay(e),this._resultGeom}insertUniqueEdges(e){for(let t=e.iterator();t.hasNext();){const e=t.next();this.insertUniqueEdge(e)}}computeOverlay(e){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);const t=new j;this._arg[0].computeSplitEdges(t),this._arg[1].computeSplitEdges(t),this.insertUniqueEdges(t),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),ai.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(e),this.cancelDuplicateResultEdges();const n=new kt(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();const i=new ci(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(e);const r=new hi(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(e),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,e)}labelIncompleteNode(e,t){const n=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setLocation(t,n)}copyPoints(e){for(let t=this._arg[e].getNodeIterator();t.hasNext();){const n=t.next();this._graph.addNode(n.getCoordinate()).setLabel(e,n.getLabel().getLocation(e))}}findResultAreaEdges(e){for(let t=this._graph.getEdgeEnds().iterator();t.hasNext();){const n=t.next(),i=n.getLabel();i.isArea()&&!n.isInteriorAreaEdge()&&Fi.isResultOfOp(i.getLocation(0,lt.RIGHT),i.getLocation(1,lt.RIGHT),e)&&n.setInResult(!0)}}computeLabelsFromDepths(){for(let e=this._edgeList.iterator();e.hasNext();){const t=e.next(),n=t.getLabel(),i=t.getDepth();if(!i.isNull()){i.normalize();for(let e=0;e<2;e++)n.isNull(e)||!n.isArea()||i.isNull(e)||(0===i.getDelta(e)?n.toLine(e):(x.isTrue(!i.isNull(e,lt.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(e,lt.LEFT,i.getLocation(e,lt.LEFT)),x.isTrue(!i.isNull(e,lt.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(e,lt.RIGHT,i.getLocation(e,lt.RIGHT))))}}}computeLabelling(){for(let e=this._graph.getNodes().iterator();e.hasNext();){e.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()}labelIncompleteNodes(){for(let e=this._graph.getNodes().iterator();e.hasNext();){const t=e.next(),n=t.getLabel();t.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(t,0):this.labelIncompleteNode(t,1)),t.getEdges().updateLabelling(n)}}isCoveredByA(e){return!!this.isCovered(e,this._resultPolyList)}}Fi.INTERSECTION=1,Fi.UNION=2,Fi.DIFFERENCE=3,Fi.SYMDIFFERENCE=4;class ki{createEdgeEndForNext(e,t,n,i){const r=n.segmentIndex+1;if(r>=e.getNumPoints()&&null===i)return null;let o=e.getCoordinate(r);null!==i&&i.segmentIndex===n.segmentIndex&&(o=i.coord);const s=new Pt(e,n.coord,o,new yt(e.getLabel()));t.add(s)}createEdgeEndForPrev(e,t,n,i){let r=n.segmentIndex;if(0===n.dist){if(0===r)return null;r--}let o=e.getCoordinate(r);null!==i&&i.segmentIndex>=r&&(o=i.coord);const s=new yt(e.getLabel());s.flip();const a=new Pt(e,n.coord,o,s);t.add(a)}computeEdgeEnds(){if(1===arguments.length){const e=arguments[0],t=new j;for(let n=e;n.hasNext();){const e=n.next();this.computeEdgeEnds(e,t)}return t}if(2===arguments.length){const e=arguments[0],t=arguments[1],n=e.getEdgeIntersectionList();n.addEndpoints();const i=n.iterator();let r=null,o=null;if(!i.hasNext())return null;let s=i.next();do{r=o,o=s,s=null,i.hasNext()&&(s=i.next()),null!==o&&(this.createEdgeEndForPrev(e,t,o,r),this.createEdgeEndForNext(e,t,o,s))}while(null!==o)}}}class Bi extends Pt{constructor(){super(),Bi.constructor_.apply(this,arguments)}static constructor_(){if(this._edgeEnds=new j,1===arguments.length){const e=arguments[0];Bi.constructor_.call(this,null,e)}else if(2===arguments.length){const e=arguments[1];Pt.constructor_.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new yt(e.getLabel())),this.insert(e)}}insert(e){this._edgeEnds.add(e)}print(e){e.println("EdgeEndBundle--\x3e Label: "+this._label);for(let t=this.iterator();t.hasNext();){t.next().print(e),e.println()}}iterator(){return this._edgeEnds.iterator()}getEdgeEnds(){return this._edgeEnds}computeLabelOn(e,t){let n=0,i=!1;for(let t=this.iterator();t.hasNext();){const r=t.next().getLabel().getLocation(e);r===at.BOUNDARY&&n++,r===at.INTERIOR&&(i=!0)}let r=at.NONE;i&&(r=at.INTERIOR),n>0&&(r=Li.determineBoundary(t,n)),this._label.setLocation(e,r)}computeLabelSide(e,t){for(let n=this.iterator();n.hasNext();){const i=n.next();if(i.getLabel().isArea()){const n=i.getLabel().getLocation(e,t);if(n===at.INTERIOR)return this._label.setLocation(e,t,at.INTERIOR),null;n===at.EXTERIOR&&this._label.setLocation(e,t,at.EXTERIOR)}}}getLabel(){return this._label}computeLabelSides(e){this.computeLabelSide(e,lt.LEFT),this.computeLabelSide(e,lt.RIGHT)}updateIM(e){Wn.updateIM(this._label,e)}computeLabel(e){let t=!1;for(let e=this.iterator();e.hasNext();){e.next().getLabel().isArea()&&(t=!0)}this._label=t?new yt(at.NONE,at.NONE,at.NONE):new yt(at.NONE);for(let n=0;n<2;n++)this.computeLabelOn(n,e),t&&this.computeLabelSides(n)}}class Gi extends En{constructor(){super()}updateIM(e){for(let t=this.iterator();t.hasNext();){t.next().updateIM(e)}}insert(e){let t=this._edgeMap.get(e);null===t?(t=new Bi(e),this.insertEdgeEnd(e,t)):t.insert(e)}}class zi extends St{constructor(){super(),zi.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];St.constructor_.call(this,e,t)}updateIMFromEdges(e){this._edges.updateIM(e)}computeIM(e){e.setAtLeastIfValid(this._label.getLocation(0),this._label.getLocation(1),0)}}class Wi extends Ot{constructor(){super()}createNode(e){return new zi(e,new Gi)}}class Hi{constructor(){Hi.constructor_.apply(this,arguments)}static constructor_(){this._li=new it,this._ptLocator=new ii,this._arg=null,this._nodes=new Dt(new Wi),this._im=null,this._isolatedEdges=new j,this._invalidPoint=null;const e=arguments[0];this._arg=e}insertEdgeEnds(e){for(let t=e.iterator();t.hasNext();){const e=t.next();this._nodes.add(e)}}computeProperIntersectionIM(e,t){const n=this._arg[0].getGeometry().getDimension(),i=this._arg[1].getGeometry().getDimension(),r=e.hasProperIntersection(),o=e.hasProperInteriorIntersection();2===n&&2===i?r&&t.setAtLeast("212101212"):2===n&&1===i?(r&&t.setAtLeast("FFF0FFFF2"),o&&t.setAtLeast("1FFFFF1FF")):1===n&&2===i?(r&&t.setAtLeast("F0FFFFFF2"),o&&t.setAtLeast("1F1FFFFFF")):1===n&&1===i&&o&&t.setAtLeast("0FFFFFFFF")}labelIsolatedEdges(e,t){for(let n=this._arg[e].getEdgeIterator();n.hasNext();){const e=n.next();e.isIsolated()&&(this.labelIsolatedEdge(e,t,this._arg[t].getGeometry()),this._isolatedEdges.add(e))}}labelIsolatedEdge(e,t,n){if(n.getDimension()>0){const i=this._ptLocator.locate(e.getCoordinate(),n);e.getLabel().setAllLocations(t,i)}else e.getLabel().setAllLocations(t,at.EXTERIOR)}computeIM(){const e=new Fn;if(e.set(at.EXTERIOR,at.EXTERIOR,2),!this._arg[0].getGeometry().getEnvelopeInternal().intersects(this._arg[1].getGeometry().getEnvelopeInternal()))return this.computeDisjointIM(e),e;this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1);const t=this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!1);this.computeIntersectionNodes(0),this.computeIntersectionNodes(1),this.copyNodesAndLabels(0),this.copyNodesAndLabels(1),this.labelIsolatedNodes(),this.computeProperIntersectionIM(t,e);const n=new ki,i=n.computeEdgeEnds(this._arg[0].getEdgeIterator());this.insertEdgeEnds(i);const r=n.computeEdgeEnds(this._arg[1].getEdgeIterator());return this.insertEdgeEnds(r),this.labelNodeEdges(),this.labelIsolatedEdges(0,1),this.labelIsolatedEdges(1,0),this.updateIM(e),e}labelNodeEdges(){for(let e=this._nodes.iterator();e.hasNext();){e.next().getEdges().computeLabelling(this._arg)}}copyNodesAndLabels(e){for(let t=this._arg[e].getNodeIterator();t.hasNext();){const n=t.next();this._nodes.addNode(n.getCoordinate()).setLabel(e,n.getLabel().getLocation(e))}}labelIntersectionNodes(e){for(let t=this._arg[e].getEdgeIterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.getEdgeIntersectionList().iterator();t.hasNext();){const n=t.next(),r=this._nodes.find(n.coord);r.getLabel().isNull(e)&&(i===at.BOUNDARY?r.setLabelBoundary(e):r.setLabel(e,at.INTERIOR))}}}labelIsolatedNode(e,t){const n=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setAllLocations(t,n)}computeIntersectionNodes(e){for(let t=this._arg[e].getEdgeIterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.getEdgeIntersectionList().iterator();t.hasNext();){const n=t.next(),r=this._nodes.addNode(n.coord);i===at.BOUNDARY?r.setLabelBoundary(e):r.getLabel().isNull(e)&&r.setLabel(e,at.INTERIOR)}}}labelIsolatedNodes(){for(let e=this._nodes.iterator();e.hasNext();){const t=e.next(),n=t.getLabel();x.isTrue(n.getGeometryCount()>0,"node with empty label found"),t.isIsolated()&&(n.isNull(0)?this.labelIsolatedNode(t,0):this.labelIsolatedNode(t,1))}}updateIM(e){for(let t=this._isolatedEdges.iterator();t.hasNext();){t.next().updateIM(e)}for(let t=this._nodes.iterator();t.hasNext();){const n=t.next();n.updateIM(e),n.updateIMFromEdges(e)}}computeDisjointIM(e){const t=this._arg[0].getGeometry();t.isEmpty()||(e.set(at.INTERIOR,at.EXTERIOR,t.getDimension()),e.set(at.BOUNDARY,at.EXTERIOR,t.getBoundaryDimension()));const n=this._arg[1].getGeometry();n.isEmpty()||(e.set(at.EXTERIOR,at.INTERIOR,n.getDimension()),e.set(at.EXTERIOR,at.BOUNDARY,n.getBoundaryDimension()))}}class Ui{constructor(){Ui.constructor_.apply(this,arguments)}static constructor_(){this._rectEnv=null;const e=arguments[0];this._rectEnv=e.getEnvelopeInternal()}static contains(e,t){return new Ui(e).contains(t)}isContainedInBoundary(e){if(e instanceof oe)return!1;if(e instanceof X)return this.isPointContainedInBoundary(e);if(e instanceof G)return this.isLineStringContainedInBoundary(e);for(let t=0;t0){const n=e;e=t,t=n}let i=!1;return t.y>e.y&&(i=!0),i?this._li.computeIntersection(e,t,this._diagDown0,this._diagDown1):this._li.computeIntersection(e,t,this._diagUp0,this._diagUp1),!!this._li.hasIntersection()}}class Vi{constructor(){Vi.constructor_.apply(this,arguments)}static constructor_(){this._isDone=!1}applyTo(e){for(let t=0;t=this._rectEnv.getMinX()&&t.getMaxX()<=this._rectEnv.getMaxX()||t.getMinY()>=this._rectEnv.getMinY()&&t.getMaxY()<=this._rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null}intersects(){return this._intersects}}class Ki extends Vi{constructor(){super(),Ki.constructor_.apply(this,arguments)}static constructor_(){this._rectSeq=null,this._rectEnv=null,this._containsPoint=!1;const e=arguments[0];this._rectSeq=e.getExteriorRing().getCoordinateSequence(),this._rectEnv=e.getEnvelopeInternal()}isDone(){return!0===this._containsPoint}visit(e){if(!(e instanceof oe))return null;const t=e.getEnvelopeInternal();if(!this._rectEnv.intersects(t))return null;const n=new I;for(let i=0;i<4;i++)if(this._rectSeq.getCoordinate(i,n),t.contains(n)&&wn.containsPointInPolygon(n,e))return this._containsPoint=!0,null}containsPoint(){return this._containsPoint}}class Xi extends Vi{constructor(){super(),Xi.constructor_.apply(this,arguments)}static constructor_(){this._rectEnv=null,this._rectIntersector=null,this._hasIntersection=!1,this._p0=new I,this._p1=new I;const e=arguments[0];this._rectEnv=e.getEnvelopeInternal(),this._rectIntersector=new ji(this._rectEnv)}intersects(){return this._hasIntersection}isDone(){return!0===this._hasIntersection}visit(e){const t=e.getEnvelopeInternal();if(!this._rectEnv.intersects(t))return null;const n=Mi.getLines(e);this.checkIntersectionWithLineStrings(n)}checkIntersectionWithLineStrings(e){for(let t=e.iterator();t.hasNext();){const e=t.next();if(this.checkIntersectionWithSegments(e),this._hasIntersection)return null}}checkIntersectionWithSegments(e){const t=e.getCoordinateSequence();for(let e=1;e0)&&(!!e.getEnvelopeInternal().covers(t.getEnvelopeInternal())&&(!!e.isRectangle()||new Ji(e,t).getIntersectionMatrix().isCovers())))}static intersects(e,t){if(!e.getEnvelopeInternal().intersects(t.getEnvelopeInternal()))return!1;if(e.isRectangle())return Yi.intersects(e,t);if(t.isRectangle())return Yi.intersects(t,e);if(e.isGeometryCollection()||t.isGeometryCollection()){for(let n=0;n0)&&(!!e.getEnvelopeInternal().contains(t.getEnvelopeInternal())&&(e.isRectangle()?Ui.contains(e,t):new Ji(e,t).getIntersectionMatrix().isContains())))}getIntersectionMatrix(){return this._relate.computeIM()}}class Zi{get interfaces_(){return[]}getClass(){return Zi}static union(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Fi.createEmptyResult(Fi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Ci.overlayOp(e,t,Fi.UNION)}}class Qi{constructor(){Qi.constructor_.apply(this,arguments)}static constructor_(){this._geometryFactory=new De,this._geomGraph=null,this._disconnectedRingcoord=null;const e=arguments[0];this._geomGraph=e}static findDifferentPoint(e,t){for(let n=0;n1)return this._invalidPoint=e.getEdge().getCoordinate(0),!0}}return!1}isNodeConsistentArea(){const e=this._geomGraph.computeSelfNodes(this._li,!0,!0);return e.hasProperIntersection()?(this._invalidPoint=e.getProperIntersectionPoint(),!1):(this._nodeGraph.build(this._geomGraph),this.isNodeEdgeAreaLabelsConsistent())}}class tr{constructor(){tr.constructor_.apply(this,arguments)}static constructor_(){this._graph=null,this._rings=new j,this._totalEnv=new E,this._index=null,this._nestedPt=null;const e=arguments[0];this._graph=e}buildIndex(){this._index=new Xt;for(let e=0;e=1&&(t=e.getCoordinateN(0)),this._validErr=new nr(nr.RING_NOT_CLOSED,t)}}checkShellsNotNested(e,t){for(let n=0;n=t&&(e.getMinY()>=n&&(i=3),e.getMaxY()<=n&&(i=1)),e.getMaxX()<=t&&(e.getMinY()>=n&&(i=2),e.getMaxY()<=n&&(i=0)),i}hasChildren(){for(let e=0;e<4;e++)if(null!==this._subnode[e])return!0;return!1}isPrunable(){return!(this.hasChildren()||this.hasItems())}addAllItems(e){e.addAll(this._items);for(let t=0;t<4;t++)null!==this._subnode[t]&&this._subnode[t].addAllItems(e);return e}getNodeCount(){let e=0;for(let t=0;t<4;t++)null!==this._subnode[t]&&(e+=this._subnode[t].size());return e+1}size(){let e=0;for(let t=0;t<4;t++)null!==this._subnode[t]&&(e+=this._subnode[t].size());return e+this._items.size()}addAllItemsFromOverlapping(e,t){if(!this.isSearchMatch(e))return null;t.addAll(this._items);for(let n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].addAllItemsFromOverlapping(e,t)}visitItems(e,t){for(let e=this._items.iterator();e.hasNext();)t.visitItem(e.next())}hasItems(){return!this._items.isEmpty()}remove(e,t){if(!this.isSearchMatch(e))return!1;let n=!1;for(let i=0;i<4;i++)if(null!==this._subnode[i]&&(n=this._subnode[i].remove(e,t),n)){this._subnode[i].isPrunable()&&(this._subnode[i]=null);break}return n||(n=this._items.remove(t),n)}visit(e,t){if(!this.isSearchMatch(e))return null;this.visitItems(e,t);for(let n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].visit(e,t)}getItems(){return this._items}depth(){let e=0;for(let t=0;t<4;t++)if(null!==this._subnode[t]){const n=this._subnode[t].depth();n>e&&(e=n)}return e+1}isEmpty(){let e=!0;if(this._items.isEmpty()){for(let t=0;t<4;t++)if(null!==this._subnode[t]&&!this._subnode[t].isEmpty()){e=!1;break}}else e=!1;return e}add(e){this._items.add(e)}get interfaces_(){return[g]}}function or(){}or.exponent=function(e){return function(e,t){let n,i,r,o;const s={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}},a={32:8,64:11}[e];o||(n=t<0||1/t<0,isFinite(t)||(o=s[e],n&&(o.d+=1<=2;)i++,r/=2;for(;r<1&&i>0;)i--,r*=2;i<=0&&(r/=2),32===e&&i>254&&(o={d:n?255:127,c:128,b:0,a:0},i=Math.pow(2,a)-1,r=0)}return i}(64,e)-1023},or.powerOf2=function(e){return Math.pow(2,e)};class sr{constructor(){sr.constructor_.apply(this,arguments)}static constructor_(){this._pt=new I,this._level=0,this._env=null;const e=arguments[0];this.computeKey(e)}static computeQuadLevel(e){const t=e.getWidth(),n=e.getHeight(),i=t>n?t:n;return or.exponent(i)+1}getLevel(){return this._level}computeKey(){if(1===arguments.length){const e=arguments[0];for(this._level=sr.computeQuadLevel(e),this._env=new E,this.computeKey(this._level,e);!this._env.contains(e);)this._level+=1,this.computeKey(this._level,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1],n=or.powerOf2(e);this._pt.x=Math.floor(t.getMinX()/n)*n,this._pt.y=Math.floor(t.getMinY()/n)*n,this._env.init(this._pt.x,this._pt.x+n,this._pt.y,this._pt.y+n)}}getEnvelope(){return this._env}getCentre(){return new I((this._env.getMinX()+this._env.getMaxX())/2,(this._env.getMinY()+this._env.getMaxY())/2)}getPoint(){return this._pt}}class ar extends rr{constructor(){super(),ar.constructor_.apply(this,arguments)}static constructor_(){this._env=null,this._centrex=null,this._centrey=null,this._level=null;const e=arguments[0],t=arguments[1];this._env=e,this._level=t,this._centrex=(e.getMinX()+e.getMaxX())/2,this._centrey=(e.getMinY()+e.getMaxY())/2}static createNode(e){const t=new sr(e);return new ar(t.getEnvelope(),t.getLevel())}static createExpanded(e,t){const n=new E(t);null!==e&&n.expandToInclude(e._env);const i=ar.createNode(n);return null!==e&&i.insertNode(e),i}find(e){const t=rr.getSubnodeIndex(e,this._centrex,this._centrey);if(-1===t)return this;if(null!==this._subnode[t]){return this._subnode[t].find(e)}return this}isSearchMatch(e){return null!==e&&this._env.intersects(e)}getSubnode(e){return null===this._subnode[e]&&(this._subnode[e]=this.createSubnode(e)),this._subnode[e]}getEnvelope(){return this._env}getNode(e){const t=rr.getSubnodeIndex(e,this._centrex,this._centrey);if(-1!==t){return this.getSubnode(t).getNode(e)}return this}createSubnode(e){let t=0,n=0,i=0,r=0;switch(e){case 0:t=this._env.getMinX(),n=this._centrex,i=this._env.getMinY(),r=this._centrey;break;case 1:t=this._centrex,n=this._env.getMaxX(),i=this._env.getMinY(),r=this._centrey;break;case 2:t=this._env.getMinX(),n=this._centrex,i=this._centrey,r=this._env.getMaxY();break;case 3:t=this._centrex,n=this._env.getMaxX(),i=this._centrey,r=this._env.getMaxY()}const o=new E(t,n,i,r);return new ar(o,this._level-1)}insertNode(e){x.isTrue(null===this._env||this._env.contains(e._env));const t=rr.getSubnodeIndex(e._env,this._centrex,this._centrey);if(e._level===this._level-1)this._subnode[t]=e;else{const n=this.createSubnode(t);n.insertNode(e),this._subnode[t]=n}}}class lr{static isZeroWidth(e,t){const n=t-e;if(0===n)return!0;const i=n/Math.max(Math.abs(e),Math.abs(t));return or.exponent(i)<=lr.MIN_BINARY_EXPONENT}}lr.MIN_BINARY_EXPONENT=-50;class cr extends rr{constructor(){super()}insert(e,t){const n=rr.getSubnodeIndex(e,cr.origin.x,cr.origin.y);if(-1===n)return this.add(t),null;const i=this._subnode[n];if(null===i||!i.getEnvelope().contains(e)){const t=ar.createExpanded(i,e);this._subnode[n]=t}this.insertContained(this._subnode[n],e,t)}isSearchMatch(e){return!0}insertContained(e,t,n){x.isTrue(e.getEnvelope().contains(t));const i=lr.isZeroWidth(t.getMinX(),t.getMaxX()),r=lr.isZeroWidth(t.getMinY(),t.getMaxY());let o=null;o=i||r?e.find(t):e.getNode(t),o.add(n)}}cr.origin=new I(0,0);class hr{constructor(){hr.constructor_.apply(this,arguments)}static constructor_(){this._root=null,this._minExtent=1,this._root=new cr}static ensureExtent(e,t){let n=e.getMinX(),i=e.getMaxX(),r=e.getMinY(),o=e.getMaxY();return n!==i&&r!==o?e:(n===i&&(n-=t/2,i+=t/2),r===o&&(r-=t/2,o+=t/2),new E(n,i,r,o))}size(){return null!==this._root?this._root.size():0}insert(e,t){this.collectStats(e);const n=hr.ensureExtent(e,this._minExtent);this._root.insert(n,t)}query(){if(1===arguments.length){const e=arguments[0],t=new Ni;return this.query(e,t),t.getItems()}if(2===arguments.length){const e=arguments[0],t=arguments[1];this._root.visit(e,t)}}queryAll(){const e=new j;return this._root.addAllItems(e),e}remove(e,t){const n=hr.ensureExtent(e,this._minExtent);return this._root.remove(n,t)}collectStats(e){const t=e.getWidth();t0&&(this._minExtent=t);const n=e.getHeight();n0&&(this._minExtent=n)}depth(){return null!==this._root?this._root.depth():0}isEmpty(){return null===this._root||this._root.isEmpty()}get interfaces_(){return[Wt,g]}}class ur extends rt{constructor(){super(),ur.constructor_.apply(this,arguments)}static constructor_(){if(this._parent=null,this._index=null,2===arguments.length){const e=arguments[0],t=arguments[1];ur.constructor_.call(this,e,t,null,-1)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];rt.constructor_.call(this,e,t),this._parent=n,this._index=i}}getIndex(){return this._index}getParent(){return this._parent}}class dr{constructor(){dr.constructor_.apply(this,arguments)}static constructor_(){if(this._parentLine=null,this._segs=null,this._resultSegs=new j,this._minimumSize=null,1===arguments.length){const e=arguments[0];dr.constructor_.call(this,e,2)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this._parentLine=e,this._minimumSize=t,this.init()}}static extractCoordinates(e){const t=new Array(e.size()+1).fill(null);let n=null;for(let i=0;i=t[0]&&ithis._distanceTolerance&&(r=!1);const a=new rt;if(a.p0=this._linePts[e],a.p1=this._linePts[t],i[0]=e,i[1]=t,this.hasBadIntersection(this._line,i,a)&&(r=!1),r){const n=this.flatten(e,t);return this._line.addToResult(n),null}this.simplifySection(e,s,n),this.simplifySection(s,t,n)}hasBadOutputIntersection(e){for(let t=this._outputIndex.query(e).iterator();t.hasNext();){const n=t.next();if(this.hasInteriorIntersection(n,e))return!0}return!1}findFurthestPoint(e,t,n,i){const r=new rt;r.p0=e[t],r.p1=e[n];let o=-1,s=t;for(let i=t+1;io&&(o=n,s=i)}return i[0]=o,s}simplify(e){this._line=e,this._linePts=e.getParentCoordinates(),this.simplifySection(0,this._linePts.length-1,0)}remove(e,t,n){for(let i=t;i2*Math.PI)&&(a=2*Math.PI);const l=a/(this._nPts-1),c=new Array(this._nPts).fill(null);let h=0;for(let t=0;t2*Math.PI)&&(a=2*Math.PI);const l=a/(this._nPts-1),c=new Array(this._nPts+2).fill(null);let h=0;c[h++]=this.coord(o,s);for(let t=0;tir.isValid(e),Ir=(e,t)=>Ji.intersects(e,t),wr=(e,t)=>Zi.union(e,t),Er=(e,t)=>Ji.contains(e,t),Ar=(e,t)=>Zn.bufferOp(e,t).norm(),Mr=e=>{if(!e)return null;const t=new Ae,n=new De(t);return new tt(n).write(e)},Nr=e=>{const t=new ot,n=Dr(e);return t.read(n)},Dr=e=>{const t=[e.x,e.y,e.x+e.width,e.y,e.x+e.width,e.y+e.height,e.x,e.y+e.height,e.x,e.y];return`POLYGON((${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]}, ${t[6]} ${t[7]}, ${t[8]} ${t[9]}))`},Rr=(e,t,n,i)=>(new De).createLineString([new I(e,t),new I(n,i)]),Pr=e=>{const t=e.map((e=>new I(e[0],e[1])));return(new De).createPolygon(t)},Lr=(e,t,n,i)=>{const r=new vr,o=r.coord(e,t);return r.setCentre(o),r.setWidth(n),r.setHeight(i),r.createEllipse()},Or=(e,t,n,i)=>Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2)),Fr=(e,t,n,i)=>e-1===Fr(e,t,n,i)?[e,t]:[n,i],Br=(e,t,n,i)=>-1!==Fr(e,t,n,i)?[e,t]:[n,i],Gr=(e,t,n,i,r)=>{const o=((e,t,n,i)=>e===n?1/0:(i-t)/(n-e))(t,n,i,r),s=e/2;if(0===o)return[t,n+s,i,n+s,i,n-s,t,n-s];if(o===1/0)return[t-s,n,t-s,r,i+s,r,i+s,n];const a=Math.atan(o),l=s*Math.cos(a),c=s*Math.sin(a);return[t-c,n+l,i-c,r+l,i+c,r-l,t+c,n-l,t+l,n-c]},zr=(e,t=5)=>_r.simplify(e,t),Wr=e=>{const t=[];for(let n=0;n{const t=e.getCoordinates(),n=[];n.push(t[0]);for(let e=0;e{const o=Rr(e,t,n,i);for(const s of r){const r=Rr(s[0],s[1],s[2],s[3]);if(Er(o,r)){const r=kr(e,t,n,i),o=Br(e,t,n,i),a=kr(s[0],s[1],s[2],s[3]),l=Br(s[0],s[1],s[2],s[3]);return[[r[0],r[1],a[0],a[1]],[l[0],l[1],o[0],o[1]]]}}return[[e,t,n,i]]},jr=(e,t)=>e.c.length==t.c.length&&e.c[0]==t.c[0]&&e.c[1]==t.c[1]&&e.c[2]==t.c[2]&&e.c[3]==t.c[3]&&e.door==t.door&&JSON.stringify(e.flags)==JSON.stringify(t.flags),Vr=()=>{const t=canvas.scene.getEmbeddedCollection("Wall"),n=[];for(const i of t){i.getFlag(e,"dungeonVersion")&&n.push(i)}return n},Yr=(e,t,n)=>{let i=[];for(let r=0;r{const i=[],r=t.getExteriorRing().getCoordinates();for(let t=0;t{const n=[];for(const i of t){const t=Qr(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Xr=(e,t)=>{const n=[];for(const i of t){const t=to(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Jr=(e,t)=>{const n=[];for(const i of t){const t=$r(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Zr=(e,t)=>{const n=[];for(const i of t){const t=eo(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Qr=(n,i,r,o,s)=>{const a={c:[i,r,o,s],door:0,flags:{}};return a.flags[e]={},a.flags[e].dungeonVersion="1.0",t.threeDCanvasEnabled()&&(a.flags["levels-3d-preview"]={joinWall:!0,wallDepth:n.wallThickness,wallSidesTexture:n.threeDWallSidesTexture,wallSidesTint:n.threeDWallSidesTextureTint,wallTexture:n.threeDWallTexture,wallTint:n.threeDWallTextureTint}),a},$r=(e,n,i,r,o)=>{const s=Qr(e,n,i,r,o);return s.door=1,t.threeDCanvasEnabled()&&(s.flags["levels-3d-preview"].joinWall=!1,s.flags["levels-3d-preview"].wallTexture=e.threeDDoorTexture,s.flags["levels-3d-preview"].wallTint=e.threeDDoorTextureTint),s},eo=(e,t,n,i,r)=>{const o=Qr(e,t,n,i,r);return o.door=2,o},to=(e,t,n,i,r)=>{const o=Qr(e,t,n,i,r);return o.door=0,o.light=0,o.sight=0,o};class no{static FLAG_KEY="dungeonState";constructor(e,t,n,i,r,o,s){this.geometry=e,this.themeAreas=t,this.doors=n,this.secretDoors=i,this.interiorWalls=r,this.invisibleWalls=o,this.config=s}static startState(){return new no(null,[],[],[],[],[],{doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8})}clone(){return new no(this.geometry?this.geometry.copy():null,JSON.parse(JSON.stringify(this.themeAreas)),JSON.parse(JSON.stringify(this.doors)),this.secretDoors?[...this.secretDoors]:[],this.interiorWalls?[...this.interiorWalls]:[],this.invisibleWalls?[...this.invisibleWalls]:[],JSON.parse(JSON.stringify(this.config)))}toString(){return JSON.stringify({wkt:Mr(this.geometry),themeAreas:this.themeAreas,doors:this.doors,secretDoors:this.secretDoors,interiorWalls:this.interiorWalls,invisibleWalls:this.invisibleWalls,config:this.config})}static fromString(e){if(!e)return no.startState();const t=JSON.parse(e),n=(i=t.wkt)?(new ot).read(i):null;var i;const r=t.themeAreas?t.themeAreas:[],o=t.doors?t.doors:[],s=t.secretDoors?t.secretDoors:[],a=t.interiorWalls?t.interiorWalls:[],l=t.invisibleWalls?t.invisibleWalls:[],c=foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},t.config);return new no(n,r,o,s,a,l,c)}async saveToJournalEntry(t){const n=this.toString();await(async e=>{if(!game.user.isGM)return;let t=[];if(e.geometry){const n=zr(e.geometry,10),i=e.doors.concat(e.secretDoors,e.invisibleWalls);t=Yr(e.config,n,i)}const n=Kr(e.config,e.interiorWalls),i=Xr(e.config,e.invisibleWalls),r=Jr(e.config,e.doors),o=Zr(e.config,e.secretDoors),s=t.concat(n,i,r,o),a=Vr(),l=[],c=[];for(const e of s){let t=!1;for(const n of a)if(jr(e,n)){l.push(n),t=!0;break}t||c.push(e)}const h=l.map((e=>e.id)),u=a.filter((e=>!h.includes(e.id))).map((e=>e.id));if(c.length&&await canvas.scene.createEmbeddedDocuments("Wall",c),u.length)try{await canvas.scene.deleteEmbeddedDocuments("Wall",u)}catch(e){console.error(e)}})(this),await t.setFlag(e,"dungeonState",n)}static async loadFromJournalEntry(t){await this.maybeMigrateJournalEntry(t);const n=t.getFlag(e,"dungeonState");return no.fromString(n)}static async maybeMigrateJournalEntry(e){if(game.user.isGM)if(e.pages){const t=e.pages.find((e=>"text"===e.type));if(t?.text?.content){console.log("Migrating v10 page.text.content");const n=no.fromString(t.text.content);await n.saveToJournalEntry(e),await t.delete()}}else if(e.data.content){console.log("Migrating v9 journalEntry.data.content");const t=no.fromString(e.data.content);await t.saveToJournalEntry(e),await e.update({content:null})}}} +const e="dungeon-draw";class t{static register(){game.settings.register(e,"allowTrustedPlayer",{name:game.i18n.localize("DD.SettingAllowTrustedPlayers"),scope:"world",default:!0,type:Boolean,config:!0}),game.settings.register(e,"3DCanvasEnabled",{name:game.i18n.localize("DD.SettingSupport3DCanvas"),scope:"world",default:!0,type:Boolean,config:!0}),game.settings.register(e,"snapToGrid",{name:game.i18n.localize("DD.SettingSnapToGrid"),scope:"client",default:!0,type:Boolean,config:!0,onChange:e=>{canvas.dungeon.options.snapToGrid=e}}),game.settings.register(e,"releaseNotesVersion",{name:"Last version we showed release notes.",scope:"client",default:"",type:String,config:!1}),game.settings.register(e,"customThemes",{name:"Custom themes data.",scope:"client",default:"{}",type:String,config:!1}),game.settings.register(e,"themePainterTheme",{name:"Theme painter theme key.",scope:"client",default:"module.cavern",type:String,config:!1})}static threeDCanvasEnabled(){return game.settings.get(e,"3DCanvasEnabled")}static snapToGrid(){return game.settings.get(e,"snapToGrid")}}const n=()=>{try{const t=game.settings.get(e,"customThemes"),n=JSON.parse(t);return Object.keys(n).forEach((e=>{n[e].config=foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},n[e].config)})),n}catch(e){return console.log(e),{}}},i=t=>{const n=JSON.stringify(t);game.settings.set(e,"customThemes",n)},r=()=>game.settings.get(e,"themePainterTheme"),o=t=>game.settings.set(e,"themePainterTheme",t),s={default:{name:"Default",config:{doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8}},arcPavement:{name:"Arc Pavement",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#111111",floorTexture:"modules/dungeon-draw/assets/textures/Arc_Pavement_001_basecolor.jpg",invisibleWallThickness:10,wallColor:"#111111",wallThickness:12})},basicBlack:{name:"Basic Black",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#0D0D0D",doorFillOpacity:0,exteriorShadowOpacity:0,interiorShadowOpacity:0,invisibleWallColor:"#0D0D0D",floorColor:"#FFFFFF",sceneBackgroundColor:"#0D0D0D",sceneGridOpacity:1,secretDoorSColor:"#0D0D0D",wallColor:"#0D0D0D"})},cavern:{name:"Cavern",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#2B2D2F",invisibleWallThickness:10,floorTexture:"modules/dungeon-draw/assets/textures/Stylized_Stone_Floor_002_bw.jpg",wallColor:"#2B2D2F",wallThickness:12})},checkerboard:{name:"Checkerboard",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorFillColor:"#C2BFB0",floorTexture:"modules/dungeon-draw/assets/textures/sci_fi_texture_150_by_llexandro_d939vk9.png",invisibleWallFillColor:"#C2BFB0",invisibleWallThickness:8,secretDoorSColor:"#C2BFB0",wallThickness:10})},cobblestone:{name:"Cobblestone",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#222222",doorFillColor:"#FFFFFF",floorTexture:"modules/dungeon-draw/assets/textures/Cobblestone_001_COLOR.jpg",invisibleWallColor:"#222222",invisibleWallFillColor:"#FFFFFF",invisibleWallThickness:10,secretDoorSColor:"#FFFFFF",wallColor:"#222222",wallThickness:12})},dirt:{name:"Dirt",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#1a1714",doorFillColor:"#8d7862",floorTexture:"modules/dungeon-draw/assets/textures/Ground_Dirt_007_basecolor.jpg",invisibleWallColor:"#1a1714",invisibleWallFillColor:"#8d7862",invisibleWallThickness:8,secretDoorSColor:"#8d7862",wallColor:"#1a1714",wallThickness:10})},dungeonSquares:{name:"Dungeon Squares",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#111111",floorTexture:"modules/dungeon-draw/assets/textures/outdoor+stone+tiles+pavement.jpg",invisibleWallColor:"#111111",invisibleWallThickness:10,wallColor:"#111111",wallThickness:12})},grass:{name:"Grass",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#72471d",doorFillColor:"#eee8c1",floorTexture:"modules/dungeon-draw/assets/textures/Grass_001_COLOR.jpg",invisibleWallColor:"#72471d",invisibleWallFillColor:"#eee8c1",invisibleWallThickness:10,secretDoorSColor:"#eee8c1",wallColor:"#72471d",wallThickness:10})},groovyCarpet:{name:"Groovy Carpet",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#2B2D2F",floorTexture:"modules/dungeon-draw/assets/textures/Fabric_Rug_006_basecolor.jpg",invisibleWallColor:"#2B2D2F",invisibleWallThickness:10,wallColor:"#2B2D2F",wallThickness:12})},hexagon:{name:"Hexagons",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#282828",doorFillColor:"#D1BD8A",floorTexture:"modules/dungeon-draw/assets/textures/Rocks_Hexagons_002_basecolor.jpg",invisibleWallColor:"#282828",invisibleWallFillColor:"#D1BD8A",invisibleWallThickness:10,secretDoorSColor:"#D1BD8A",wallColor:"#282828",wallThickness:12})},marble:{name:"Marble",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#686882",floorTexture:"modules/dungeon-draw/assets/textures/Marble_Tiles_001_basecolor.jpg",invisibleWallColor:"#686882",wallColor:"#686882"})},metalGrid:{name:"Metal Grid",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#27251A",doorFillColor:"#AAAAAA",floorTexture:"modules/dungeon-draw/assets/textures/Sci-fi_Floor_002_basecolor.jpg",invisibleWallColor:"#27251A",invisibleWallFillColor:"#AAAAAA",secretDoorSColor:"#AAAAAA",wallColor:"#27251A"})},metalSquares:{name:"Metal Squares",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorFillColor:"#C0C0C0",floorTexture:"modules/dungeon-draw/assets/textures/sci_fi_texture_212_by_llexandro_dcuxgum.png",invisibleWallFillColor:"#C0C0C0",secretDoorSColor:"#C0C0C0"})},moldvayBlue:{name:"Moldvay Blue",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#3A9FF2",doorFillOpacity:0,doorThickness:35,exteriorShadowOpacity:0,floorColor:"#FFFFFF",interiorShadowOpacity:0,invisibleWallColor:"#3A9FF2",invisibleWallFillOpacity:0,sceneBackgroundColor:"#3A9FF2",sceneGridColor:"#3A9FF2",sceneGridOpacity:1,secretDoorSColor:"#3A9FF2",wallColor:"#3A9FF2"})},neonBlueprint:{name:"Neon Blueprint",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#3A9FF2",doorFillOpacity:0,doorThickness:35,exteriorShadowColor:"#18495E",floorColor:"#142A3B",interiorShadowColor:"#1B7FAB",invisibleWallColor:"#3A9FF2",invisibleWallFillOpacity:0,invisibleWallLineThickness:1,invisibleWallThickness:6,sceneBackgroundColor:"#171008",sceneGridColor:"#4C89A1",sceneGridOpacity:1,secretDoorSColor:"#3A9FF2",wallColor:"#63C9E6",wallThickness:4})},ruddyPaper:{name:"Ruddy Paper",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#913B55",doorFillColor:"#FADEE6",floorTexture:"modules/dungeon-draw/assets/textures/Paper_Recycled_001_COLOR.jpg",floorTextureTint:"#F9FAE6",exteriorShadowOpacity:0,interiorShadowOpacity:0,invisibleWallColor:"#913B55",invisibleWallFillColor:"#FADEE6",sceneBackgroundColor:"#EBD3BC",sceneGridColor:"#594026",sceneGridOpacity:1,secretDoorSColor:"#913B55",wallColor:"#9A6D54"})},water:{name:"Water",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#203246",floorTexture:"modules/dungeon-draw/assets/textures/Water_001_COLOR.jpg",invisibleWallColor:"#203246",invisibleWallLineThickness:1,invisibleWallThickness:4,wallColor:"#203246",wallThickness:5})},woodPlanks:{name:"Wood Planks",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#332211",floorTexture:"modules/dungeon-draw/assets/textures/Old_Wooden_Plank_Seamless_Texture_765.jpg",invisibleWallColor:"#332211",invisibleWallThickness:13,wallColor:"#332211",wallTexture:"modules/dungeon-draw/assets/textures/Bark_002_bw.jpg",wallTextureTint:"#7e5935",wallThickness:15})},xenomorph:{name:"Xenomorph",config:foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},{doorColor:"#8AF0F0",doorFillColor:"#255151",doorLineThickness:5,doorThickness:20,exteriorShadowColor:"#00838C",floorColor:"#255151",interiorShadowColor:"#00838C",invisibleWallColor:"#8AF0F0",invisibleWallFillColor:"#255151",invisibleWallLineThickness:1,invisibleWallThickness:6,sceneBackgroundColor:"#002222",sceneGridColor:"#ffffff",sceneGridOpacity:1,secretDoorSColor:"#8AF0F0",wallColor:"#8AF0F0",wallThickness:4})}};class a extends FormApplication{constructor(e){super(),this.themeKey=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-theme-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/theme-sheet.html",width:480,height:t.threeDCanvasEnabled()?1160:1040,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.ThemeSheetTitle")}getData(){const e=n()[this.themeKey],i=t.threeDCanvasEnabled();return{config:e.config,themeName:e.name,threeDCanvasEnabled:i}}async _updateObject(e,t){const r=n(),o=t.themeName;delete t.themeName,r[this.themeKey]={name:o,config:t},i(r),await(canvas.dungeon.dungeon?.refresh())}}class l extends FormApplication{constructor(e="settings"){super(),this._tabs[0].active=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-config-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/config-sheet.html",width:480,height:t.threeDCanvasEnabled()?1220:1100,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.ConfigSheetTitle")}getData(){let e=canvas.dungeon.dungeon?.state().config;e||(e={doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8});const i=n(),o=Object.keys(i).sort(),a=Object.keys(s).sort(),l=r(),c=t.threeDCanvasEnabled();return{config:e,customThemes:i,customThemeKeys:o,themes:s,themeKeys:a,themePainterThemeKey:l,threeDCanvasEnabled:c}}async _updateObject(e,t){delete t.customThemeName,delete t.themePainterTheme,canvas.dungeon.dungeon?.setConfig(t),game.user.isGM&&await canvas.scene.update({backgroundColor:t.sceneBackgroundColor,gridAlpha:t.sceneGridAlpha,gridColor:t.sceneGridColor})}async close(e){await super.close(e),this.preview&&(this.preview.removeChildren(),this.preview=null)}activateListeners(e){super.activateListeners(e),e.find('button[name="resetDefault"]').click(this._onResetDefaults.bind(this)),e.find(".dd-theme-name").click(this._onThemeNameClick.bind(this)),e.find(".dd-save-as-theme-button").click(this._onSaveAsThemeClick.bind(this)),e.find(".dd-theme-edit").click(this._onEditThemeClick.bind(this)),e.find(".dd-theme-copy").click(this._onCopyThemeClick.bind(this)),e.find(".dd-theme-delete").click(this._onDeleteThemeClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this._onThemePainterThemeSelect.bind(this)),e.find(".dd-export-themes-button").click(this._onExportThemesClick.bind(this)),e.find(".dd-import-themes-button").click(this._onImportThemesClick.bind(this))}_onResetDefaults(e){e.preventDefault(),canvas.dungeon.dungeon?.setConfig({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8}),canvas.dungeon.dungeon.refresh(),this.render()}async _onThemeNameClick(e){e.preventDefault();const t=$(e.currentTarget).parent(".dd-theme-row"),i=t.data("theme");let r;if("custom"===t.data("themetype")){r=n()[i]}else r=s[i];const o={...r.config};await(canvas.dungeon.dungeon?.setConfig(o)),game.user.isGM&&await canvas.scene.update({backgroundColor:o.sceneBackgroundColor,gridAlpha:o.sceneGridAlpha,gridColor:o.sceneGridColor}),this.render()}async _onSaveAsThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".form-fields").children(".saveAsThemeName").val(),r=this._getSubmitData();delete r.saveAsThemeName,delete r.themePainterThemeKey;const o=n();o[t]={name:t,config:r},i(o),this._tabs[0].active="themes",this.render()}async _onEditThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme");new a(t).render(!0)}_onCopyThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme"),r=n(),o=r[t],s=JSON.parse(JSON.stringify(o));let a,l=1,c=!1;for(;!c;)a=`${o.name} (${l})`,a in r?l++:c=!0;s.name=a,r[a]=s,i(r),this.render()}_onDeleteThemeClick(e){e.preventDefault();const t=$(e.currentTarget).closest(".dd-theme-row").data("theme"),r=n();delete r[t],i(r),this.render()}_onExportThemesClick(e){e.preventDefault();const t=JSON.stringify(n(),null,2);saveDataToFile(t,"application/json","dd-custom-themes.json")}async _onImportThemesClick(e){e.preventDefault(),new Dialog({title:game.i18n.localize("DD.ImportCustomThemes"),content:await renderTemplate("modules/dungeon-draw/templates/import-data.html",{hint:game.i18n.localize("DD.ImportCustomThemesHint")}),buttons:{import:{icon:'',label:game.i18n.localize("DD.Import"),callback:e=>{const t=e.find("form")[0];if(!t.data.files.length)return ui.notifications.error("You did not upload a data file!");readTextFromFile(t.data.files[0]).then((e=>{const r=JSON.parse(e);if(t.wipe.checked)i(r);else{const e=n(),t=foundry.utils.mergeObject(e,r);i(t)}this.render()}))}},no:{icon:'',label:game.i18n.localize("DD.Cancel")}},default:"import"},{width:400}).render(!0)}_onThemePainterThemeSelect(e){const t=$(e.currentTarget).val();o(t)}}class c extends Error{constructor(e){super(e),this.name=Object.keys({Exception:c})[0]}toString(){return this.message}}class h extends c{constructor(e){super(e),this.name=Object.keys({IllegalArgumentException:h})[0]}}class u{filter(e){}}function d(){}function m(){}function g(){}class f{static equalsWithTolerance(e,t,n){return Math.abs(e-t)<=n}}class p{constructor(e,t){this.low=t||0,this.high=e||0}static toBinaryString(e){let t,n="";for(t=2147483648;t>0;t>>>=1)n+=(e.high&t)===t?"1":"0";for(t=2147483648;t>0;t>>>=1)n+=(e.low&t)===t?"1":"0";return n}}function _(){}function y(){}_.NaN=NaN,_.isNaN=e=>Number.isNaN(e),_.isInfinite=e=>!Number.isFinite(e),_.MAX_VALUE=Number.MAX_VALUE,_.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,_.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,"function"==typeof Float64Array&&"function"==typeof Int32Array?function(){const e=2146435072,t=new Float64Array(1),n=new Int32Array(t.buffer);_.doubleToLongBits=function(i){t[0]=i;let r=0|n[0],o=0|n[1];return(o&e)===e&&0!=(1048575&o)&&0!==r&&(r=0,o=2146959360),new p(o,r)},_.longBitsToDouble=function(e){return n[0]=e.low,n[1]=e.high,t[0]}}():function(){const e=1023,t=Math.log2,n=Math.floor,i=Math.pow,r=function(){for(let e=53;e>0;e--){const r=i(2,e)-1;if(n(t(r))+1===e)return r}return 0}();_.doubleToLongBits=function(o){let s,a,l,c,h,u,d,m,g;if(o<0||1/o===Number.NEGATIVE_INFINITY?(u=1<<31,o=-o):u=0,0===o)return g=0,m=u,new p(m,g);if(o===1/0)return g=0,m=2146435072|u,new p(m,g);if(o!=o)return g=0,m=2146959360,new p(m,g);if(c=0,g=0,s=n(o),s>1)if(s<=r)c=n(t(s)),c<=20?(g=0,m=s<<20-c&1048575):(l=c-20,a=i(2,l),g=s%a<<32-l,m=s/a&1048575);else for(l=s,g=0;a=l/2,l=n(a),0!==l;)c++,g>>>=1,g|=(1&m)<<31,m>>>=1,a!==l&&(m|=524288);if(d=c+e,h=0===s,s=o-s,c<52&&0!==s)for(l=0;;){if(a=2*s,a>=1?(s=a-1,h?(d--,h=!1):(l<<=1,l|=1,c++)):(s=a,h?0==--d&&(c++,h=!1):(l<<=1,c++)),20===c)m|=l,l=0;else if(52===c){g|=l;break}if(1===a){c<20?m|=l<<20-c:c<52&&(g|=l<<52-c);break}}return m|=d<<20,m|=u,new p(m,g)},_.longBitsToDouble=function(t){let n,r,o,s;const a=t.high,l=t.low,c=a&1<<31?-1:1;for(o=((2146435072&a)>>20)-e,s=0,r=1<<19,n=1;n<=20;n++)a&r&&(s+=i(2,-n)),r>>>=1;for(r=1<<31,n=21;n<=52;n++)l&r&&(s+=i(2,-n)),r>>>=1;if(-1023===o){if(0===s)return 0*c;o=-1022}else{if(1024===o)return 0===s?c/0:NaN;s+=1}return c*s*i(2,o)}}();class b extends c{constructor(e){super(e),this.name=Object.keys({RuntimeException:b})[0]}}class C extends b{constructor(){super(),C.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)b.constructor_.call(this);else if(1===arguments.length){const e=arguments[0];b.constructor_.call(this,e)}}}class x{static shouldNeverReachHere(){if(0===arguments.length)x.shouldNeverReachHere(null);else if(1===arguments.length){const e=arguments[0];throw new C("Should never reach here"+(null!==e?": "+e:""))}}static isTrue(){if(1===arguments.length){const e=arguments[0];x.isTrue(e,null)}else if(2===arguments.length){const e=arguments[1];if(!arguments[0])throw null===e?new C:new C(e)}}static equals(){if(2===arguments.length){const e=arguments[0],t=arguments[1];x.equals(e,t,null)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];if(!t.equals(e))throw new C("Expected "+e+" but encountered "+t+(null!==n?": "+n:""))}}}const v=new ArrayBuffer(8),S=new Float64Array(v),T=new Int32Array(v);class I{constructor(){I.constructor_.apply(this,arguments)}static constructor_(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)I.constructor_.call(this,0,0);else if(1===arguments.length){const e=arguments[0];I.constructor_.call(this,e.x,e.y,e.getZ())}else if(2===arguments.length){const e=arguments[0],t=arguments[1];I.constructor_.call(this,e,t,I.NULL_ORDINATE)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this.x=e,this.y=t,this.z=n}}static hashCode(e){return S[0]=e,T[0]^T[1]}getM(){return _.NaN}setOrdinate(e,t){switch(e){case I.X:this.x=t;break;case I.Y:this.y=t;break;case I.Z:this.setZ(t);break;default:throw new h("Invalid ordinate index: "+e)}}equals2D(){if(1===arguments.length){const e=arguments[0];return this.x===e.x&&this.y===e.y}if(2===arguments.length){const e=arguments[0],t=arguments[1];return!!f.equalsWithTolerance(this.x,e.x,t)&&!!f.equalsWithTolerance(this.y,e.y,t)}}setM(e){throw new h("Invalid ordinate index: "+I.M)}getZ(){return this.z}getOrdinate(e){switch(e){case I.X:return this.x;case I.Y:return this.y;case I.Z:return this.getZ()}throw new h("Invalid ordinate index: "+e)}equals3D(e){return this.x===e.x&&this.y===e.y&&(this.getZ()===e.getZ()||_.isNaN(this.getZ())&&_.isNaN(e.getZ()))}equals(e){return e instanceof I&&this.equals2D(e)}equalInZ(e,t){return f.equalsWithTolerance(this.getZ(),e.getZ(),t)}setX(e){this.x=e}compareTo(e){const t=e;return this.xt.x?1:this.yt.y?1:0}getX(){return this.x}setZ(e){this.z=e}clone(){try{return null}catch(e){if(e instanceof CloneNotSupportedException)return x.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw e}}copy(){return new I(this)}toString(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}distance3D(e){const t=this.x-e.x,n=this.y-e.y,i=this.getZ()-e.getZ();return Math.sqrt(t*t+n*n+i*i)}getY(){return this.y}setY(e){this.y=e}distance(e){const t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}hashCode(){let e=17;return e=37*e+I.hashCode(this.x),e=37*e+I.hashCode(this.y),e}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ()}get interfaces_(){return[d,m,g]}}class w{constructor(){w.constructor_.apply(this,arguments)}static constructor_(){if(this._dimensionsToTest=2,0===arguments.length)w.constructor_.call(this,2);else if(1===arguments.length){const e=arguments[0];if(2!==e&&3!==e)throw new h("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}static compare(e,t){return et?1:_.isNaN(e)?_.isNaN(t)?0:-1:_.isNaN(t)?1:0}compare(e,t){const n=w.compare(e.x,t.x);if(0!==n)return n;const i=w.compare(e.y,t.y);if(0!==i)return i;if(this._dimensionsToTest<=2)return 0;return w.compare(e.getZ(),t.getZ())}get interfaces_(){return[y]}}I.DimensionalComparator=w,I.NULL_ORDINATE=_.NaN,I.X=0,I.Y=1,I.Z=2,I.M=3;class E{constructor(){E.constructor_.apply(this,arguments)}static constructor_(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof E){const e=arguments[0];this.init(e)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e.x,t.x,e.y,t.y)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.init(e,t,n,i)}}static intersects(){if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.xt.x?e.x:t.x)&&n.y>=(e.yt.y?e.y:t.y)}if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];let r=Math.min(n.x,i.x),o=Math.max(n.x,i.x),s=Math.min(e.x,t.x),a=Math.max(e.x,t.x);return!(s>o)&&(!(ao)&&!(ae._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,i=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];return!this.isNull()&&(e>=this._minx&&e<=this._maxx&&t>=this._miny&&t<=this._maxy)}}intersects(){if(1===arguments.length){if(arguments[0]instanceof E){const e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxxthis._maxy||e._maxythis._maxx)return!1;if((e.x>t.x?e.x:t.x)this._maxy)return!1;return!((e.y>t.y?e.y:t.y)this._maxx||ethis._maxy||tthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.isNull()?(this._minx=e,this._maxx=e,this._miny=t,this._maxy=t):(ethis._maxx&&(this._maxx=e),tthis._maxy&&(this._maxy=t))}}minExtent(){if(this.isNull())return 0;const e=this.getWidth(),t=this.getHeight();return et._minx?1:this._minyt._miny?1:this._maxxt._maxx?1:this._maxyt._maxy?1:0}translate(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)}copy(){return new E(this)}toString(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}setToNull(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}disjoint(e){return!(!this.isNull()&&!e.isNull())||(e._minx>this._maxx||e._maxxthis._maxy||e._maxyt?e:t}expandBy(){if(1===arguments.length){const e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=t,this._maxy+=t,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}contains(){if(1===arguments.length){if(arguments[0]instanceof E){const e=arguments[0];return this.covers(e)}if(arguments[0]instanceof I){const e=arguments[0];return this.covers(e)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];return this.covers(e,t)}}centre(){return this.isNull()?null:new I((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}init(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof E){const e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e.x,t.x,e.y,t.y)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];ee._maxx&&(t=this._minx-e._maxx);let n=0;return this._maxye._maxy&&(n=this._miny-e._maxy),0===t?n:0===n?t:Math.sqrt(t*t+n*n)}hashCode(){let e=17;return e=37*e+I.hashCode(this._minx),e=37*e+I.hashCode(this._maxx),e=37*e+I.hashCode(this._miny),e=37*e+I.hashCode(this._maxy),e}get interfaces_(){return[d,g]}}class A{constructor(){A.constructor_.apply(this,arguments)}isGeometryCollection(){return this.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION}getFactory(){return this._factory}getGeometryN(e){return this}getArea(){return 0}isRectangle(){return!1}equalsExact(e){return this===e||this.equalsExact(e,0)}geometryChanged(){this.apply(A.geometryChangedFilter)}geometryChangedAction(){this._envelope=null}equalsNorm(e){return null!==e&&this.norm().equalsExact(e.norm())}getLength(){return 0}getNumGeometries(){return 1}compareTo(){let e;if(1===arguments.length){const t=arguments[0];return e=t,this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){const t=arguments[0],n=arguments[1];return e=t,this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t,n)}}getUserData(){return this._userData}getSRID(){return this._SRID}getEnvelope(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}checkNotGeometryCollection(e){if(e.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION)throw new h("This method does not support GeometryCollection arguments")}equal(e,t,n){return 0===n?e.equals(t):e.distance(t)<=n}norm(){const e=this.copy();return e.normalize(),e}reverse(){const e=this.reverseInternal();return null!=this.envelope&&(e.envelope=this.envelope.copy()),e.setSRID(this.getSRID()),e}copy(){const e=this.copyInternal();return e.envelope=null==this._envelope?null:this._envelope.copy(),e._SRID=this._SRID,e._userData=this._userData,e}getPrecisionModel(){return this._factory.getPrecisionModel()}getEnvelopeInternal(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new E(this._envelope)}setSRID(e){this._SRID=e}setUserData(e){this._userData=e}compare(e,t){const n=e.iterator(),i=t.iterator();for(;n.hasNext()&&i.hasNext();){const e=n.next(),t=i.next(),r=e.compareTo(t);if(0!==r)return r}return n.hasNext()?1:i.hasNext()?-1:0}hashCode(){return this.getEnvelopeInternal().hashCode()}isEquivalentClass(e){return this.getClass()===e.getClass()}isGeometryCollectionOrDerived(){return this.getTypeCode()===A.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===A.TYPECODE_MULTIPOINT||this.getTypeCode()===A.TYPECODE_MULTILINESTRING||this.getTypeCode()===A.TYPECODE_MULTIPOLYGON}get interfaces_(){return[m,d,g]}getClass(){return A}static hasNonEmptyElements(e){for(let t=0;t-1}class D{}class R{getM(e){if(this.hasM()){const t=this.getDimension()-this.getMeasures();return this.getOrdinate(e,t)}return _.NaN}setOrdinate(e,t,n){}getZ(e){return this.hasZ()?this.getOrdinate(e,2):_.NaN}size(){}getOrdinate(e,t){}getCoordinate(){}getCoordinateCopy(e){}createCoordinate(){}getDimension(){}hasM(){return this.getMeasures()>0}getX(e){}hasZ(){return this.getDimension()-this.getMeasures()>2}getMeasures(){return 0}expandEnvelope(e){}copy(){}getY(e){}toCoordinateArray(){}get interfaces_(){return[m]}}R.X=0,R.Y=1,R.Z=2,R.M=3;class P{static copyCoord(e,t,n,i){const r=Math.min(e.getDimension(),n.getDimension());for(let o=0;o0)&&(i=t,n=r)}return n}}static extend(e,t,n){const i=e.create(n,t.getDimension()),r=t.size();if(P.copy(t,0,i,0,r),r>0)for(let e=r;e0)&&(t=i)}return t}}class L extends c{constructor(e){super(e),this.name=Object.keys({UnsupportedOperationException:L})[0]}}class O{static isWhitespace(e){return e<=32&&e>=0||127===e}static toUpperCase(e){return e.toUpperCase()}}class F{static toDimensionSymbol(e){switch(e){case F.FALSE:return F.SYM_FALSE;case F.TRUE:return F.SYM_TRUE;case F.DONTCARE:return F.SYM_DONTCARE;case F.P:return F.SYM_P;case F.L:return F.SYM_L;case F.A:return F.SYM_A}throw new h("Unknown dimension value: "+e)}static toDimensionValue(e){switch(O.toUpperCase(e)){case F.SYM_FALSE:return F.FALSE;case F.SYM_TRUE:return F.TRUE;case F.SYM_DONTCARE:return F.DONTCARE;case F.SYM_P:return F.P;case F.SYM_L:return F.L;case F.SYM_A:return F.A}throw new h("Unknown dimension symbol: "+e)}}F.P=0,F.L=1,F.A=2,F.FALSE=-1,F.TRUE=-2,F.DONTCARE=-3,F.SYM_FALSE="F",F.SYM_TRUE="T",F.SYM_DONTCARE="*",F.SYM_P="0",F.SYM_L="1",F.SYM_A="2";class k{filter(e){}}class B{filter(e,t){}isDone(){}isGeometryChanged(){}}class G extends A{constructor(){super(),G.constructor_.apply(this,arguments)}static constructor_(){if(this._points=null,0===arguments.length);else if(2===arguments.length){const e=arguments[0],t=arguments[1];A.constructor_.call(this,t),this.init(e)}}computeEnvelopeInternal(){return this.isEmpty()?new E:this._points.expandEnvelope(new E)}isRing(){return this.isClosed()&&this.isSimple()}getCoordinates(){return this._points.toCoordinateArray()}copyInternal(){return new G(this._points.copy(),this._factory)}equalsExact(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof A){const e=arguments[0],t=arguments[1];if(!this.isEquivalentClass(e))return!1;const n=e;if(this._points.size()!==n._points.size())return!1;for(let e=0;e0){const e=this._points.copy();P.reverse(e),this._points=e}return null}}}getCoordinate(){return this.isEmpty()?null:this._points.getCoordinate(0)}getBoundaryDimension(){return this.isClosed()?F.FALSE:0}isClosed(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}reverseInternal(){const e=this._points.copy();return P.reverse(e),this.getFactory().createLineString(e)}getEndPoint(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}getTypeCode(){return A.TYPECODE_LINESTRING}getDimension(){return 1}getLength(){return class{static ofLine(e){const t=e.size();if(t<=1)return 0;let n=0;const i=new I;e.getCoordinate(0,i);let r=i.x,o=i.y;for(let s=1;s= 2)");this._points=e}isCoordinate(e){for(let t=0;t=this.size())throw new W;return this.array[e]}isEmpty(){return 0===this.array.length}sort(e){e?this.array.sort(((t,n)=>e.compare(t,n))):this.array.sort()}size(){return this.array.length}toArray(){return this.array.slice()}remove(e){for(let t=0,n=this.array.length;t=1){if(this.get(this.size()-1).equals2D(e))return null}super.add.call(this,e)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){const e=arguments[0],t=arguments[1];return this.add(e,t),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){const e=arguments[0],t=arguments[1];if(arguments[2])for(let n=0;n=0;n--)this.add(e[n],t);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];if(!arguments[2]){const n=this.size();if(n>0){if(e>0){if(this.get(e-1).equals2D(t))return null}if(ei&&(r=-1);for(let o=n;o!==i;o+=r)this.add(e[o],t);return!0}}closeRing(){if(this.size()>0){const e=this.get(0).copy();this.add(e,!1)}}}Y.coordArrayType=new Array(0).fill(null);class q{create(){if(1===arguments.length)arguments[0]instanceof Array||N(arguments[0],R);else if(2===arguments.length);else if(3===arguments.length){const e=arguments[0],t=arguments[1];return this.create(e,t)}}}class K{}class X extends A{constructor(){super(),X.constructor_.apply(this,arguments)}static constructor_(){this._coordinates=null;const e=arguments[0],t=arguments[1];A.constructor_.call(this,t),this.init(e)}computeEnvelopeInternal(){if(this.isEmpty())return new E;const e=new E;return e.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),e}getCoordinates(){return this.isEmpty()?[]:[this.getCoordinate()]}copyInternal(){return new X(this._coordinates.copy(),this._factory)}equalsExact(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof A){const e=arguments[0],t=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),t))}return super.equalsExact.apply(this,arguments)}normalize(){}getCoordinate(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null}getBoundaryDimension(){return F.FALSE}reverseInternal(){return this.getFactory().createPoint(this._coordinates.copy())}getTypeCode(){return A.TYPECODE_POINT}getDimension(){return 0}getNumPoints(){return this.isEmpty()?0:1}getX(){if(null===this.getCoordinate())throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x}compareToSameClass(){if(1===arguments.length){const e=arguments[0];return this.getCoordinate().compareTo(e.getCoordinate())}if(2===arguments.length){const e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}}apply(){if(N(arguments[0],M)){const e=arguments[0];if(this.isEmpty())return null;e.filter(this.getCoordinate())}else if(N(arguments[0],B)){const e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],k)){arguments[0].filter(this)}else if(N(arguments[0],u)){arguments[0].filter(this)}}getBoundary(){return this.getFactory().createGeometryCollection()}getGeometryType(){return A.TYPENAME_POINT}getCoordinateSequence(){return this._coordinates}getY(){if(null===this.getCoordinate())throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y}isEmpty(){return 0===this._coordinates.size()}init(e){null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),x.isTrue(e.size()<=1),this._coordinates=e}isSimple(){return!0}get interfaces_(){return[K]}}class J{static ofRing(){if(arguments[0]instanceof Array){const e=arguments[0];return Math.abs(J.ofRingSigned(e))}if(N(arguments[0],R)){const e=arguments[0];return Math.abs(J.ofRingSigned(e))}}static ofRingSigned(){if(arguments[0]instanceof Array){const e=arguments[0];if(e.length<3)return 0;let t=0;const n=e[0].x;for(let i=1;ie.compareTo(t)));else if(2===arguments.length)e.sort(((e,t)=>arguments[1].compare(e,t)));else if(3===arguments.length){const t=e.slice(arguments[1],arguments[2]);t.sort();const n=e.slice(0,arguments[1]).concat(t,e.slice(arguments[2],e.length));e.splice(0,e.length);for(const t of n)e.push(t)}else if(4===arguments.length){const t=e.slice(arguments[1],arguments[2]);t.sort(((e,t)=>arguments[3].compare(e,t)));const n=e.slice(0,arguments[1]).concat(t,e.slice(arguments[2],e.length));e.splice(0,e.length);for(const t of n)e.push(t)}}static asList(e){const t=new j;for(const n of e)t.add(n);return t}static copyOf(e,t){return e.slice(0,t)}}class Q{constructor(e){this.str=e}append(e){this.str+=e}setCharAt(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)}toString(){return this.str}}class ee{constructor(e){this.value=e}intValue(){return this.value}compareTo(e){return this.valuee?1:0}static compare(e,t){return et?1:0}static isNan(e){return Number.isNaN(e)}static valueOf(e){return new ee(e)}}class te{constructor(){te.constructor_.apply(this,arguments)}static constructor_(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){const e=arguments[0];this.init(e)}else if(arguments[0]instanceof te){const e=arguments[0];this.init(e)}else if("string"==typeof arguments[0]){const e=arguments[0];te.constructor_.call(this,te.parse(e))}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.init(e,t)}}static determinant(){if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];return te.determinant(te.valueOf(e),te.valueOf(t),te.valueOf(n),te.valueOf(i))}if(arguments[3]instanceof te&&arguments[2]instanceof te&&arguments[0]instanceof te&&arguments[1]instanceof te){const e=arguments[1],t=arguments[2],n=arguments[3];return arguments[0].multiply(n).selfSubtract(e.multiply(t))}}static sqr(e){return te.valueOf(e).selfMultiply(e)}static valueOf(){if("string"==typeof arguments[0]){const e=arguments[0];return te.parse(e)}if("number"==typeof arguments[0]){return new te(arguments[0])}}static sqrt(e){return te.valueOf(e).sqrt()}static parse(e){let t=0;const n=e.length;for(;O.isWhitespace(e.charAt(t));)t++;let i=!1;if(t=n);){const n=e.charAt(t);if(t++,O.isDigit(n)){const e=n-"0";r.selfMultiply(te.TEN),r.selfAdd(e),o++}else{if("."!==n){if("e"===n||"E"===n){const n=e.substring(t);try{a=ee.parseInt(n)}catch(t){throw t instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+n+" in string "+e):t}break}throw new NumberFormatException("Unexpected character '"+n+"' at position "+t+" in string "+e)}s=o,l=!0}}let c=r;l||(s=o);const h=o-s-a;if(0===h)c=r;else if(h>0){const e=te.TEN.pow(h);c=r.divide(e)}else if(h<0){const e=te.TEN.pow(-h);c=r.multiply(e)}return i?c.negate():c}static createNaN(){return new te(_.NaN,_.NaN)}static copy(e){return new te(e)}static magnitude(e){const t=Math.abs(e),n=Math.log(t)/Math.log(10);let i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=t&&(i+=1),i}static stringOfChar(e,t){const n=new Q;for(let i=0;i9?(r=!0,l="9"):l="0"+i,s.append(l),n=n.subtract(te.valueOf(i)).multiply(te.TEN),r&&n.selfAdd(te.TEN);let c=!0;const h=te.magnitude(n._hi);if(h<0&&Math.abs(h)>=a-t&&(c=!1),!c)break}return t[0]=i,s.toString()}sqr(){return this.multiply(this)}doubleValue(){return this._hi+this._lo}subtract(){if(arguments[0]instanceof te){const e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){const e=arguments[0];return this.add(-e)}}equals(){if(1===arguments.length&&arguments[0]instanceof te){const e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}}isZero(){return 0===this._hi&&0===this._lo}selfSubtract(){if(arguments[0]instanceof te){const e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}}getSpecialNumberString(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}min(e){return this.le(e)?this:e}selfDivide(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;return s=this._hi/e,a=te.SPLIT*s,n=a-s,c=te.SPLIT*e,n=a-n,i=s-n,r=c-e,l=s*e,r=c-r,o=e-r,c=n*r-l+n*o+i*r+i*o,a=(this._hi-l-c+this._lo-s*t)/e,c=s+a,this._hi=c,this._lo=s-c+a,this}}dump(){return"DD<"+this._hi+", "+this._lo+">"}divide(){if(arguments[0]instanceof te){const e=arguments[0];let t=null,n=null,i=null,r=null,o=null,s=null,a=null,l=null;o=this._hi/e._hi,s=te.SPLIT*o,t=s-o,l=te.SPLIT*e._hi,t=s-t,n=o-t,i=l-e._hi,a=o*e._hi,i=l-i,r=e._hi-i,l=t*i-a+t*r+n*i+n*r,s=(this._hi-a-l+this._lo-o*e._lo)/e._hi,l=o+s;return new te(l,o-l+s)}if("number"==typeof arguments[0]){const e=arguments[0];return _.isNaN(e)?te.createNaN():te.copy(this).selfDivide(e,0)}}ge(e){return this._hi>e._hi||this._hi===e._hi&&this._lo>=e._lo}pow(e){if(0===e)return te.valueOf(1);let t=new te(this),n=te.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(t),i/=2,i>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n}ceil(){if(this.isNaN())return te.NaN;const e=Math.ceil(this._hi);let t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new te(e,t)}compareTo(e){const t=e;return this._hit._hi?1:this._lot._lo?1:0}rint(){if(this.isNaN())return this;return this.add(.5).floor()}setValue(){if(arguments[0]instanceof te){const e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){const e=arguments[0];return this.init(e),this}}max(e){return this.ge(e)?this:e}sqrt(){if(this.isZero())return te.valueOf(0);if(this.isNegative())return te.NaN;const e=1/Math.sqrt(this._hi),t=this._hi*e,n=te.valueOf(t),i=this.subtract(n.sqr())._hi*(.5*e);return n.add(i)}selfAdd(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];let t=null,n=null,i=null,r=null,o=null,s=null;return i=this._hi+e,o=i-this._hi,r=i-o,r=e-o+(this._hi-r),s=r+this._lo,t=i+s,n=s+(i-t),this._hi=t+n,this._lo=n+(t-this._hi),this}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;s=this._hi+e,r=this._lo+t,l=s-this._hi,c=r-this._lo,a=s-l,o=r-c,a=e-l+(this._hi-a),o=t-c+(this._lo-o),l=a+r,n=s+l,i=l+(s-n),l=o+i;const h=n+l,u=l+(n-h);return this._hi=h,this._lo=u,this}}selfMultiply(){if(1===arguments.length){if(arguments[0]instanceof te){const e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){const e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=null,i=null,r=null,o=null,s=null,a=null;s=te.SPLIT*this._hi,n=s-this._hi,a=te.SPLIT*e,n=s-n,i=this._hi-n,r=a-e,s=this._hi*e,r=a-r,o=e-r,a=n*r-s+n*o+i*r+i*o+(this._hi*t+this._lo*e);const l=s+a;n=s-l;const c=a+n;return this._hi=l,this._lo=c,this}}selfSqr(){return this.selfMultiply(this)}floor(){if(this.isNaN())return te.NaN;const e=Math.floor(this._hi);let t=0;return e===this._hi&&(t=Math.floor(this._lo)),new te(e,t)}negate(){return this.isNaN()?this:new te(-this._hi,-this._lo)}clone(){try{return null}catch(e){if(e instanceof CloneNotSupportedException)return null;throw e}}multiply(){if(arguments[0]instanceof te){const e=arguments[0];return e.isNaN()?te.createNaN():te.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){const e=arguments[0];return _.isNaN(e)?te.createNaN():te.copy(this).selfMultiply(e,0)}}isNaN(){return _.isNaN(this._hi)}intValue(){return Math.trunc(this._hi)}toString(){const e=te.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()}toStandardNotation(){const e=this.getSpecialNumberString();if(null!==e)return e;const t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),i=t[0]+1;let r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+te.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){const e=i-n.length;r=n+te.stringOfChar("0",e)+".0"}return this.isNegative()?"-"+r:r}reciprocal(){let e=null,t=null,n=null,i=null,r=null,o=null,s=null,a=null;r=1/this._hi,o=te.SPLIT*r,e=o-r,a=te.SPLIT*this._hi,e=o-e,t=r-e,n=a-this._hi,s=r*this._hi,n=a-n,i=this._hi-n,a=e*n-s+e*i+t*n+t*i,o=(1-s-a-r*this._lo)/this._hi;const l=r+o;return new te(l,r-l+o)}toSciNotation(){if(this.isZero())return te.SCI_NOT_ZERO;const e=this.getSpecialNumberString();if(null!==e)return e;const t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),i=te.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===n.charAt(0))throw new IllegalStateException("Found leading zero: "+n);let r="";n.length>1&&(r=n.substring(1));const o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i}abs(){return this.isNaN()?te.NaN:this.isNegative()?this.negate():new te(this)}isPositive(){return this._hi>0||0===this._hi&&this._lo>0}lt(e){return this._hie._hi||this._hi===e._hi&&this._lo>e._lo}isNegative(){return this._hi<0||0===this._hi&&this._lo<0}trunc(){return this.isNaN()?te.NaN:this.isPositive()?this.floor():this.ceil()}signum(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}get interfaces_(){return[g,d,m]}}te.PI=new te(3.141592653589793,12246467991473532e-32),te.TWO_PI=new te(6.283185307179586,24492935982947064e-32),te.PI_2=new te(1.5707963267948966,6123233995736766e-32),te.E=new te(2.718281828459045,14456468917292502e-32),te.NaN=new te(_.NaN,_.NaN),te.EPS=123259516440783e-46,te.SPLIT=134217729,te.MAX_PRINT_DIGITS=32,te.TEN=te.valueOf(10),te.ONE=te.valueOf(1),te.SCI_NOT_EXPONENT_CHAR="E",te.SCI_NOT_ZERO="0.0E0";class ne{static orientationIndex(e,t,n){const i=ne.orientationIndexFilter(e,t,n);if(i<=1)return i;const r=te.valueOf(t.x).selfAdd(-e.x),o=te.valueOf(t.y).selfAdd(-e.y),s=te.valueOf(n.x).selfAdd(-t.x),a=te.valueOf(n.y).selfAdd(-t.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()}static signOfDet2x2(){if(arguments[3]instanceof te&&arguments[2]instanceof te&&arguments[0]instanceof te&&arguments[1]instanceof te){const e=arguments[1],t=arguments[2],n=arguments[3];return arguments[0].multiply(n).selfSubtract(e.multiply(t)).signum()}if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=te.valueOf(e),o=te.valueOf(t),s=te.valueOf(n),a=te.valueOf(i);return r.multiply(a).selfSubtract(o.multiply(s)).signum()}}static intersection(e,t,n,i){const r=new te(e.y).selfSubtract(t.y),o=new te(t.x).selfSubtract(e.x),s=new te(e.x).selfMultiply(t.y).selfSubtract(new te(t.x).selfMultiply(e.y)),a=new te(n.y).selfSubtract(i.y),l=new te(i.x).selfSubtract(n.x),c=new te(n.x).selfMultiply(i.y).selfSubtract(new te(i.x).selfMultiply(n.y)),h=o.multiply(c).selfSubtract(l.multiply(s)),u=a.multiply(s).selfSubtract(r.multiply(c)),d=r.multiply(l).selfSubtract(a.multiply(o)),m=h.selfDivide(d).doubleValue(),g=u.selfDivide(d).doubleValue();return _.isNaN(m)||_.isInfinite(m)||_.isNaN(g)||_.isInfinite(g)?null:new I(m,g)}static orientationIndexFilter(e,t,n){let i=null;const r=(e.x-n.x)*(t.y-n.y),o=(e.y-n.y)*(t.x-n.x),s=r-o;if(r>0){if(o<=0)return ne.signum(s);i=r+o}else{if(!(r<0))return ne.signum(s);if(o>=0)return ne.signum(s);i=-r-o}const a=ne.DP_SAFE_EPSILON*i;return s>=a||-s>=a?ne.signum(s):2}static signum(e){return e>0?1:e<0?-1:0}}ne.DP_SAFE_EPSILON=1e-15;class ie{static index(e,t,n){return ne.orientationIndex(e,t,n)}static isCCW(){if(arguments[0]instanceof Array){const e=arguments[0],t=e.length-1;if(t<3)throw new h("Ring has fewer than 4 points, so orientation cannot be determined");let n=e[0],i=0;for(let r=1;r<=t;r++){const t=e[r];t.y>n.y&&(n=t,i=r)}let r=i;do{r-=1,r<0&&(r=t)}while(e[r].equals2D(n)&&r!==i);let o=i;do{o=(o+1)%t}while(e[o].equals2D(n)&&o!==i);const s=e[r],a=e[o];if(s.equals2D(n)||a.equals2D(n)||s.equals2D(a))return!1;const l=ie.index(s,n,a);let c=null;return c=0===l?s.x>a.x:l>0,c}if(N(arguments[0],R)){const e=arguments[0],t=e.size()-1;if(t<3)throw new h("Ring has fewer than 4 points, so orientation cannot be determined");let n=e.getCoordinate(0),i=0;for(let r=1;r<=t;r++){const t=e.getCoordinate(r);t.y>n.y&&(n=t,i=r)}let r=null,o=i;do{o-=1,o<0&&(o=t),r=e.getCoordinate(o)}while(r.equals2D(n)&&o!==i);let s=null,a=i;do{a=(a+1)%t,s=e.getCoordinate(a)}while(s.equals2D(n)&&a!==i);if(r.equals2D(n)||s.equals2D(n)||r.equals2D(s))return!1;const l=ie.index(r,n,s);let c=null;return c=0===l?r.x>s.x:l>0,c}}}ie.CLOCKWISE=-1,ie.RIGHT=ie.CLOCKWISE,ie.COUNTERCLOCKWISE=1,ie.LEFT=ie.COUNTERCLOCKWISE,ie.COLLINEAR=0,ie.STRAIGHT=ie.COLLINEAR;class re{}class oe extends A{constructor(){super(),oe.constructor_.apply(this,arguments)}static constructor_(){this._shell=null,this._holes=null;let e=arguments[0],t=arguments[1],n=arguments[2];if(A.constructor_.call(this,n),null===e&&(e=this.getFactory().createLinearRing()),null===t&&(t=[]),A.hasNullElements(t))throw new h("holes must not contain null elements");if(e.isEmpty()&&A.hasNonEmptyElements(t))throw new h("shell is empty but holes are not");this._shell=e,this._holes=t}computeEnvelopeInternal(){return this._shell.getEnvelopeInternal()}getCoordinates(){if(this.isEmpty())return[];const e=new Array(this.getNumPoints()).fill(null);let t=-1;const n=this._shell.getCoordinates();for(let i=0;i=1&&this.getCoordinateSequence().size()= 4)")}getGeometryType(){return A.TYPENAME_LINEARRING}}de.MINIMUM_VALID_SIZE=4;class me extends I{constructor(){super(),me.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)I.constructor_.call(this);else if(1===arguments.length){if(arguments[0]instanceof me){const e=arguments[0];I.constructor_.call(this,e.x,e.y)}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e.x,e.y)}}else if(2===arguments.length){const e=arguments[0],t=arguments[1];I.constructor_.call(this,e,t,I.NULL_ORDINATE)}}setOrdinate(e,t){switch(e){case me.X:this.x=t;break;case me.Y:this.y=t;break;default:throw new h("Invalid ordinate index: "+e)}}getZ(){return I.NULL_ORDINATE}getOrdinate(e){switch(e){case me.X:return this.x;case me.Y:return this.y}throw new h("Invalid ordinate index: "+e)}setZ(e){throw new h("CoordinateXY dimension 2 does not support z-ordinate")}copy(){return new me(this)}toString(){return"("+this.x+", "+this.y+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ()}}me.X=0,me.Y=1,me.Z=-1,me.M=-1;class ge extends I{constructor(){super(),ge.constructor_.apply(this,arguments)}static constructor_(){if(this._m=null,0===arguments.length)I.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof ge){const e=arguments[0];I.constructor_.call(this,e.x,e.y),this._m=e._m}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e.x,e.y),this._m=this.getM()}}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];I.constructor_.call(this,e,t,I.NULL_ORDINATE),this._m=n}}getM(){return this._m}setOrdinate(e,t){switch(e){case ge.X:this.x=t;break;case ge.Y:this.y=t;break;case ge.M:this._m=t;break;default:throw new h("Invalid ordinate index: "+e)}}setM(e){this._m=e}getZ(){return I.NULL_ORDINATE}getOrdinate(e){switch(e){case ge.X:return this.x;case ge.Y:return this.y;case ge.M:return this._m}throw new h("Invalid ordinate index: "+e)}setZ(e){throw new h("CoordinateXY dimension 2 does not support z-ordinate")}copy(){return new ge(this)}toString(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ(),this._m=e.getM()}}ge.X=0,ge.Y=1,ge.Z=-1,ge.M=2;class fe extends I{constructor(){super(),fe.constructor_.apply(this,arguments)}static constructor_(){if(this._m=null,0===arguments.length)I.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof fe){const e=arguments[0];I.constructor_.call(this,e),this._m=e._m}else if(arguments[0]instanceof I){const e=arguments[0];I.constructor_.call(this,e),this._m=this.getM()}}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];I.constructor_.call(this,e,t,n),this._m=i}}getM(){return this._m}setOrdinate(e,t){switch(e){case I.X:this.x=t;break;case I.Y:this.y=t;break;case I.Z:this.z=t;break;case I.M:this._m=t;break;default:throw new h("Invalid ordinate index: "+e)}}setM(e){this._m=e}getOrdinate(e){switch(e){case I.X:return this.x;case I.Y:return this.y;case I.Z:return this.getZ();case I.M:return this.getM()}throw new h("Invalid ordinate index: "+e)}copy(){return new fe(this)}toString(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}setCoordinate(e){this.x=e.x,this.y=e.y,this.z=e.getZ(),this._m=e.getM()}}class pe{static measures(e){return e instanceof me?0:e instanceof ge||e instanceof fe?1:0}static dimension(e){return e instanceof me?2:e instanceof ge?3:e instanceof fe?4:3}static create(){if(1===arguments.length){const e=arguments[0];return pe.create(e,0)}if(2===arguments.length){const e=arguments[0],t=arguments[1];return 2===e?new me:3===e&&0===t?new I:3===e&&1===t?new ge:4===e&&1===t?new fe:new I}}}class _e{static log10(e){const t=Math.log(e);return _.isInfinite(t)||_.isNaN(t)?t:t/_e.LOG_10}static min(e,t,n,i){let r=e;return tn?n:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){const e=arguments[0],t=arguments[1],n=arguments[2];return en?n:e}}static wrap(e,t){return e<0?t- -e%t:e%t}static max(){if(3===arguments.length){const e=arguments[1],t=arguments[2];let n=arguments[0];return e>n&&(n=e),t>n&&(n=t),n}if(4===arguments.length){const e=arguments[1],t=arguments[2],n=arguments[3];let i=arguments[0];return e>i&&(i=e),t>i&&(i=t),n>i&&(i=n),i}}static average(e,t){return(e+t)/2}}_e.LOG_10=Math.log(10);class ye{static arraycopy(e,t,n,i,r){let o=0;for(let s=t;s=e?t:[]}static indexOf(e,t){for(let n=0;n0)&&(t=e[n]);return t}static extract(e,t,n){t=_e.clamp(t,0,e.length);let i=(n=_e.clamp(n,-1,e.length))-t+1;n<0&&(i=0),t>=e.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;const r=be.compare(n,i);return be.isEqualReversed(n,i)?0:r}OLDcompare(e,t){const n=e,i=t;if(n.lengthi.length)return 1;if(0===n.length)return 0;const r=be.increasingDirection(n),o=be.increasingDirection(i);let s=r>0?0:n.length-1,a=o>0?0:n.length-1;for(let e=0;e0){const e=new Ce(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(let t=1;t3&&(e=3),e<2&&(e=2),new xe(arguments[0],e)}if(3===arguments.length){let e=arguments[2],t=arguments[1]-e;return e>1&&(e=1),t>3&&(t=3),t<2&&(t=2),new xe(arguments[0],t+e,e)}}}get interfaces_(){return[q,g]}}ve.instanceObject=new ve;class Se extends he{constructor(){super(),Se.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];he.constructor_.call(this,e,t)}copyInternal(){const e=new Array(this._geometries.length).fill(null);for(let t=0;te.add(t))),e}size(){return this.map.size()}}class Ae{constructor(){Ae.constructor_.apply(this,arguments)}static constructor_(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=Ae.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof Me){const e=arguments[0];this._modelType=e,e===Ae.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){const e=arguments[0];this._modelType=Ae.FIXED,this.setScale(e)}else if(arguments[0]instanceof Ae){const e=arguments[0];this._modelType=e._modelType,this._scale=e._scale}}static mostPrecise(e,t){return e.compareTo(t)>=0?e:t}equals(e){if(!(e instanceof Ae))return!1;const t=e;return this._modelType===t._modelType&&this._scale===t._scale}compareTo(e){const t=e,n=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return ee.compare(n,i)}getScale(){return this._scale}isFloating(){return this._modelType===Ae.FLOATING||this._modelType===Ae.FLOATING_SINGLE}getType(){return this._modelType}toString(){let e="UNKNOWN";return this._modelType===Ae.FLOATING?e="Floating":this._modelType===Ae.FLOATING_SINGLE?e="Floating-Single":this._modelType===Ae.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e}makePrecise(){if("number"==typeof arguments[0]){const e=arguments[0];if(_.isNaN(e))return e;if(this._modelType===Ae.FLOATING_SINGLE){return e}return this._modelType===Ae.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof I){const e=arguments[0];if(this._modelType===Ae.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}}getMaximumSignificantDigits(){let e=16;return this._modelType===Ae.FLOATING?e=16:this._modelType===Ae.FLOATING_SINGLE?e=6:this._modelType===Ae.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e}setScale(e){this._scale=Math.abs(e)}get interfaces_(){return[g,d]}}class Me{constructor(){Me.constructor_.apply(this,arguments)}static constructor_(){this._name=null;const e=arguments[0];this._name=e,Me.nameToTypeMap.put(e,this)}readResolve(){return Me.nameToTypeMap.get(this._name)}toString(){return this._name}get interfaces_(){return[g]}}Me.nameToTypeMap=new Ee,Ae.Type=Me,Ae.FIXED=new Me("FIXED"),Ae.FLOATING=new Me("FLOATING"),Ae.FLOATING_SINGLE=new Me("FLOATING SINGLE"),Ae.maximumPreciseValue=9007199254740992;class Ne extends he{constructor(){super(),Ne.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];he.constructor_.call(this,e,t)}copyInternal(){const e=new Array(this._geometries.length).fill(null);for(let t=0;t1){if(r instanceof oe)return this.createMultiPolygon(De.toPolygonArray(e));if(r instanceof G)return this.createMultiLineString(De.toLineStringArray(e));if(r instanceof X)return this.createMultiPoint(De.toPointArray(e));x.shouldNeverReachHere("Unhandled geometry type: "+r.getGeometryType())}return r}createMultiPointFromCoords(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}createPoint(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof I){const e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(N(arguments[0],R)){return new X(arguments[0],this)}}}getCoordinateSequenceFactory(){return this._coordinateSequenceFactory}createPolygon(){if(0===arguments.length)return this.createPolygon(null,null);if(1===arguments.length){if(N(arguments[0],R)){const e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){const e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof de){const e=arguments[0];return this.createPolygon(e,null)}}else if(2===arguments.length){return new oe(arguments[0],arguments[1],this)}}getSRID(){return this._SRID}createGeometryCollection(){if(0===arguments.length)return new he(null,this);if(1===arguments.length){return new he(arguments[0],this)}}getPrecisionModel(){return this._precisionModel}createLinearRing(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){const e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(N(arguments[0],R)){return new de(arguments[0],this)}}}createMultiPolygon(){if(0===arguments.length)return new Se(null,this);if(1===arguments.length){return new Se(arguments[0],this)}}createMultiPoint(){if(0===arguments.length)return new ue(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){return new ue(arguments[0],this)}if(N(arguments[0],R)){const e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));const t=new Array(e.size()).fill(null);for(let n=0;n0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)}}class Pe{static intersection(e,t,n,i){const r=e.xt.x?e.x:t.x,a=e.y>t.y?e.y:t.y,l=n.xi.x?n.x:i.x,u=n.y>i.y?n.y:i.y,d=((r>l?r:l)+(sc?o:c)+(a1||a<0||a>1)&&(r=!0)}}else r=!0;return r?_e.min(Le.pointToSegment(e,n,i),Le.pointToSegment(t,n,i),Le.pointToSegment(n,e,t),Le.pointToSegment(i,e,t)):0}static pointToSegment(e,t,n){if(t.x===n.x&&t.y===n.y)return e.distance(t);const i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),r=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/i;if(r<=0)return e.distance(t);if(r>=1)return e.distance(n);const o=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(o)*Math.sqrt(i)}static pointToLinePerpendicular(e,t,n){const i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),r=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(r)*Math.sqrt(i)}static pointToSegmentString(e,t){if(0===t.length)throw new h("Line array must contain at least one vertex");let n=e.distance(t[0]);for(let i=0;i="a"&&e<="z"||e>="A"&&e<="Z"}isNumeric_(e,t){return e>="0"&&e<="9"||"."==e&&!(void 0!==t&&t)}isWhiteSpace_(e){return" "==e||"\t"==e||"\r"==e||"\n"==e}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const e=this.nextChar_(),t=this.index_;let n,i=e;if("("==e)n=We;else if(","==e)n=je;else if(")"==e)n=He;else if(this.isNumeric_(e)||"-"==e)n=Ue,i=this.readNumber_();else if(this.isAlpha_(e))n=ze,i=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);n=Ve}return{position:t,value:i,type:n}}readNumber_(){let e;const t=this.index_;let n=!1,i=!1;do{"."==e?n=!0:"e"!=e&&"E"!=e||(i=!0),e=this.nextChar_()}while(this.isNumeric_(e,n)||!i&&("e"==e||"E"==e)||i&&("-"==e||"+"==e));return parseFloat(this.wkt.substring(t,this.index_--))}readText_(){let e;const t=this.index_;do{e=this.nextChar_()}while(this.isAlpha_(e));return this.wkt.substring(t,this.index_--).toUpperCase()}}class qe{constructor(e,t){this.lexer_=e,this.token_,this.layout_=Oe,this.factory=t}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(e){return this.token_.type==e}match(e){const t=this.isTokenType(e);return t&&this.consume_(),t}parse(){this.consume_();return this.parseGeometry_()}parseGeometryLayout_(){let e=Oe;const t=this.token_;if(this.isTokenType(ze)){const n=t.value;"Z"===n?e=Fe:"M"===n?e=ke:"ZM"===n&&(e=Be),e!==Oe&&this.consume_()}return e}parseGeometryCollectionText_(){if(this.match(We)){const e=[];do{e.push(this.parseGeometry_())}while(this.match(je));if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(We)){const e=this.parsePoint_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(We)){const e=this.parsePointList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(We)){const e=this.parseLineStringTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(We)){let e;if(e=this.token_.type==We?this.parsePointTextList_():this.parsePointList_(),this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(We)){const e=this.parseLineStringTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(We)){const e=this.parsePolygonTextList_();if(this.match(He))return e}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}parsePoint_(){const e=[],t=this.layout_.length;for(let n=0;nnew I(...e),n=n=>{const i=n.map((n=>e.createLinearRing(n.map(t))));return i.length>1?e.createPolygon(i[0],i.slice(1)):e.createPolygon(i[0])},i=this.token_;if(this.match(ze)){const r=i.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==r){const t=this.parseGeometryCollectionText_();return e.createGeometryCollection(t)}switch(r){case"POINT":{const t=this.parsePointText_();return t?e.createPoint(new I(...t)):e.createPoint()}case"LINESTRING":{const n=this.parseLineStringText_().map(t);return e.createLineString(n)}case"LINEARRING":{const n=this.parseLineStringText_().map(t);return e.createLinearRing(n)}case"POLYGON":{const t=this.parsePolygonText_();return t&&0!==t.length?n(t):e.createPolygon()}case"MULTIPOINT":{const n=this.parseMultiPointText_();if(!n||0===n.length)return e.createMultiPoint();const i=n.map(t).map((t=>e.createPoint(t)));return e.createMultiPoint(i)}case"MULTILINESTRING":{const n=this.parseMultiLineStringText_().map((n=>e.createLineString(n.map(t))));return e.createMultiLineString(n)}case"MULTIPOLYGON":{const t=this.parseMultiPolygonText_();if(!t||0===t.length)return e.createMultiPolygon();const i=t.map(n);return e.createMultiPolygon(i)}default:throw new Error("Invalid geometry type: "+r)}}throw new Error(this.formatErrorMessage_())}}function Ke(e){if(e.isEmpty())return"";const t=e.getCoordinate(),n=[t.x,t.y];return void 0===t.z||Number.isNaN(t.z)||n.push(t.z),void 0===t.m||Number.isNaN(t.m)||n.push(t.m),n.join(" ")}function Xe(e){const t=e.getCoordinates().map((e=>{const t=[e.x,e.y];return void 0===e.z||Number.isNaN(e.z)||t.push(e.z),void 0===e.m||Number.isNaN(e.m)||t.push(e.m),t})),n=[];for(let e=0,i=t.length;e0&&(t+=" "+i),e.isEmpty())return t+" EMPTY";return t+" ("+n(e)+")"}class $e{constructor(e){this.geometryFactory=e||new De,this.precisionModel=this.geometryFactory.getPrecisionModel()}read(e){const t=new Ye(e);return new qe(t,this.geometryFactory).parse()}write(e){return Qe(e)}}class et{constructor(e){this.parser=new $e(e)}write(e){return this.parser.write(e)}static toLineString(e,t){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"}}class tt{constructor(){tt.constructor_.apply(this,arguments)}static constructor_(){this._result=null,this._inputLines=Array(2).fill().map((()=>Array(2))),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new I,this._intPt[1]=new I,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}static computeEdgeDistance(e,t,n){const i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);let o=-1;if(e.equals(t))o=0;else if(e.equals(n))o=i>r?i:r;else{const n=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);o=i>r?n:s,0!==o||e.equals(t)||(o=Math.max(n,s))}return x.isTrue(!(0===o&&!e.equals(t)),"Bad distance calculation"),o}static nonRobustComputeEdgeDistance(e,t,n){const i=e.x-t.x,r=e.y-t.y,o=Math.sqrt(i*i+r*r);return x.isTrue(!(0===o&&!e.equals(t)),"Invalid distance calculation"),o}getIndexAlongSegment(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]}getTopologySummary(){const e=new Ce;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()}computeIntersection(e,t,n,i){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,t,n,i)}getIntersectionNum(){return this._result}computeIntLineIndex(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((()=>Array(2))),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){const e=arguments[0];this.getEdgeDistance(e,0)>this.getEdgeDistance(e,1)?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}}isProper(){return this.hasIntersection()&&this._isProper}setPrecisionModel(e){this._precisionModel=e}isInteriorIntersection(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){const e=arguments[0];for(let t=0;t1e-4&&ye.out.println("Distance = "+r.distance(o))}intersectionSafe(e,t,n,i){let r=Pe.intersection(e,t,n,i);return null===r&&(r=nt.nearestEndpoint(e,t,n,i)),r}computeCollinearIntersection(e,t,n,i){const r=E.intersects(e,t,n),o=E.intersects(e,t,i),s=E.intersects(n,i,e),a=E.intersects(n,i,t);return r&&o?(this._intPt[0]=n,this._intPt[1]=i,tt.COLLINEAR_INTERSECTION):s&&a?(this._intPt[0]=e,this._intPt[1]=t,tt.COLLINEAR_INTERSECTION):r&&s?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||o||a?tt.COLLINEAR_INTERSECTION:tt.POINT_INTERSECTION):r&&a?(this._intPt[0]=n,this._intPt[1]=t,!n.equals(t)||o||s?tt.COLLINEAR_INTERSECTION:tt.POINT_INTERSECTION):o&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||r||a?tt.COLLINEAR_INTERSECTION:tt.POINT_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||r||s?tt.COLLINEAR_INTERSECTION:tt.POINT_INTERSECTION):tt.NO_INTERSECTION}computeIntersect(e,t,n,i){if(this._isProper=!1,!E.intersects(e,t,n,i))return tt.NO_INTERSECTION;const r=ie.index(e,t,n),o=ie.index(e,t,i);if(r>0&&o>0||r<0&&o<0)return tt.NO_INTERSECTION;const s=ie.index(n,i,e),a=ie.index(n,i,t);if(s>0&&a>0||s<0&&a<0)return tt.NO_INTERSECTION;return 0===r&&0===o&&0===s&&0===a?this.computeCollinearIntersection(e,t,n,i):(0===r||0===o||0===s||0===a?(this._isProper=!1,e.equals2D(n)||e.equals2D(i)?this._intPt[0]=e:t.equals2D(n)||t.equals2D(i)?this._intPt[0]=t:0===r?this._intPt[0]=new I(n):0===o?this._intPt[0]=new I(i):0===s?this._intPt[0]=new I(e):0===a&&(this._intPt[0]=new I(t))):(this._isProper=!0,this._intPt[0]=this.intersection(e,t,n,i)),tt.POINT_INTERSECTION)}}class it{constructor(){it.constructor_.apply(this,arguments)}static constructor_(){if(this.p0=null,this.p1=null,0===arguments.length)it.constructor_.call(this,new I,new I);else if(1===arguments.length){const e=arguments[0];it.constructor_.call(this,e.p0,e.p1)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.p0=e,this.p1=t}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];it.constructor_.call(this,new I(e,t),new I(n,i))}}static midPoint(e,t){return new I((e.x+t.x)/2,(e.y+t.y)/2)}minX(){return Math.min(this.p0.x,this.p1.x)}orientationIndex(){if(arguments[0]instanceof it){const e=arguments[0],t=ie.index(this.p0,this.p1,e.p0),n=ie.index(this.p0,this.p1,e.p1);return t>=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}if(arguments[0]instanceof I){const e=arguments[0];return ie.index(this.p0,this.p1,e)}}toGeometry(e){return e.createLineString([this.p0,this.p1])}isVertical(){return this.p0.x===this.p1.x}equals(e){if(!(e instanceof it))return!1;const t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)}intersection(e){const t=new nt;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null}project(){if(arguments[0]instanceof I){const e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new I(e);const t=this.projectionFactor(e),n=new I;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof it){const e=arguments[0],t=this.projectionFactor(e.p0),n=this.projectionFactor(e.p1);if(t>=1&&n>=1)return null;if(t<=0&&n<=0)return null;let i=this.project(e.p0);t<0&&(i=this.p0),t>1&&(i=this.p1);let r=this.project(e.p1);return n<0&&(r=this.p0),n>1&&(r=this.p1),new it(i,r)}}normalize(){this.p1.compareTo(this.p0)<0&&this.reverse()}angle(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}getCoordinate(e){return 0===e?this.p0:this.p1}distancePerpendicular(e){return Le.pointToLinePerpendicular(e,this.p0,this.p1)}minY(){return Math.min(this.p0.y,this.p1.y)}midPoint(){return it.midPoint(this.p0,this.p1)}projectionFactor(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;const t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=t*t+n*n;if(i<=0)return _.NaN;return((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/i}closestPoints(e){const t=this.intersection(e);if(null!==t)return[t,t];const n=new Array(2).fill(null);let i=_.MAX_VALUE,r=null;const o=this.closestPoint(e.p0);i=o.distance(e.p0),n[0]=o,n[1]=e.p0;const s=this.closestPoint(e.p1);r=s.distance(e.p1),r0&&t<1)return this.project(e);return this.p0.distance(e)1||_.isNaN(t))&&(t=1),t}toString(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}isHorizontal(){return this.p0.y===this.p1.y}reflect(e){const t=this.p1.getY()-this.p0.getY(),n=this.p0.getX()-this.p1.getX(),i=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),r=t*t+n*n,o=t*t-n*n,s=e.getX(),a=e.getY();return new I((-o*s-2*t*n*a-2*t*i)/r,(o*a-2*t*n*s-2*n*i)/r)}distance(){if(arguments[0]instanceof it){const e=arguments[0];return Le.segmentToSegment(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof I){const e=arguments[0];return Le.pointToSegment(e,this.p0,this.p1)}}pointAlong(e){const t=new I;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t}hashCode(){let e=_.doubleToLongBits(this.p0.x);e^=31*_.doubleToLongBits(this.p0.y);const t=Math.trunc(e)^Math.trunc(e>>32);let n=_.doubleToLongBits(this.p1.x);n^=31*_.doubleToLongBits(this.p1.y);return t^(Math.trunc(n)^Math.trunc(n>>32))}get interfaces_(){return[d,g]}}class rt{constructor(e){this.parser=new $e(e||new De)}read(e){return this.parser.read(e)}}class ot{constructor(){ot.constructor_.apply(this,arguments)}static constructor_(){if(this._quadrantSegments=ot.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=ot.CAP_ROUND,this._joinStyle=ot.JOIN_ROUND,this._mitreLimit=ot.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=ot.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){const e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(t)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.setQuadrantSegments(e),this.setEndCapStyle(t),this.setJoinStyle(n),this.setMitreLimit(i)}}static bufferDistanceError(e){const t=Math.PI/2/e;return 1-Math.cos(t/2)}getEndCapStyle(){return this._endCapStyle}isSingleSided(){return this._isSingleSided}setQuadrantSegments(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=ot.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=ot.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==ot.JOIN_ROUND&&(this._quadrantSegments=ot.DEFAULT_QUADRANT_SEGMENTS)}getJoinStyle(){return this._joinStyle}setJoinStyle(e){this._joinStyle=e}setSimplifyFactor(e){this._simplifyFactor=e<0?0:e}getSimplifyFactor(){return this._simplifyFactor}getQuadrantSegments(){return this._quadrantSegments}setEndCapStyle(e){this._endCapStyle=e}getMitreLimit(){return this._mitreLimit}setMitreLimit(e){this._mitreLimit=e}setSingleSided(e){this._isSingleSided=e}}ot.CAP_ROUND=1,ot.CAP_FLAT=2,ot.CAP_SQUARE=3,ot.JOIN_ROUND=1,ot.JOIN_MITRE=2,ot.JOIN_BEVEL=3,ot.DEFAULT_QUADRANT_SEGMENTS=8,ot.DEFAULT_MITRE_LIMIT=5,ot.DEFAULT_SIMPLIFY_FACTOR=.01;class st{static toLocationSymbol(e){switch(e){case st.EXTERIOR:return"e";case st.BOUNDARY:return"b";case st.INTERIOR:return"i";case st.NONE:return"-"}throw new h("Unknown location value: "+e)}}st.INTERIOR=0,st.BOUNDARY=1,st.EXTERIOR=2,st.NONE=-1;class at{static opposite(e){return e===at.LEFT?at.RIGHT:e===at.RIGHT?at.LEFT:e}}at.ON=0,at.LEFT=1,at.RIGHT=2;class lt extends c{constructor(e){super(e),this.name=Object.keys({EmptyStackException:lt})[0]}}class ct extends H{constructor(){super(),this.array=[]}add(e){return this.array.push(e),!0}get(e){if(e<0||e>=this.size())throw new W;return this.array[e]}push(e){return this.array.push(e),e}pop(){if(0===this.array.length)throw new lt;return this.array.pop()}peek(){if(0===this.array.length)throw new lt;return this.array[this.array.length-1]}empty(){return 0===this.array.length}isEmpty(){return this.empty()}search(e){return this.array.indexOf(e)}size(){return this.array.length}toArray(){return this.array.slice()}}class ht{constructor(){ht.constructor_.apply(this,arguments)}static constructor_(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}getCoordinate(){return this._minCoord}getRightmostSide(e,t){let n=this.getRightmostSideOfSegment(e,t);return n<0&&(n=this.getRightmostSideOfSegment(e,t-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n}findRightmostEdgeAtVertex(){const e=this._minDe.getEdge().getCoordinates();x.isTrue(this._minIndex>0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&i===ie.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)}getRightmostSideOfSegment(e,t){const n=e.getEdge().getCoordinates();if(t<0||t+1>=n.length)return-1;if(n[t].y===n[t+1].y)return-1;let i=at.LEFT;return n[t].ythis._minCoord.x)&&(this._minDe=e,this._minIndex=n,this._minCoord=t[n])}findRightmostEdgeAtNode(){const e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}findEdge(e){for(let t=e.iterator();t.hasNext();){const e=t.next();e.isForward()&&this.checkForRightmostCoordinate(e)}x.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;this.getRightmostSide(this._minDe,this._minIndex)===at.LEFT&&(this._orientedDe=this._minDe.getSym())}}class ut extends b{constructor(e,t){super(t?e+" [ "+t+" ]":e),this.pt=t?new I(t):void 0,this.name=Object.keys({TopologyException:ut})[0]}getCoordinate(){return this.pt}}class dt{constructor(){this.array=[]}addLast(e){this.array.push(e)}removeFirst(){return this.array.shift()}isEmpty(){return 0===this.array.length}}class mt{constructor(){mt.constructor_.apply(this,arguments)}static constructor_(){this._finder=null,this._dirEdgeList=new j,this._nodes=new j,this._rightMostCoord=null,this._env=null,this._finder=new ht}clearVisitedEdges(){for(let e=this._dirEdgeList.iterator();e.hasNext();){e.next().setVisited(!1)}}getRightmostCoordinate(){return this._rightMostCoord}computeNodeDepth(e){let t=null;for(let n=e.getEdges().iterator();n.hasNext();){const e=n.next();if(e.isVisited()||e.getSym().isVisited()){t=e;break}}if(null===t)throw new ut("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(let t=e.getEdges().iterator();t.hasNext();){const e=t.next();e.setVisited(!0),this.copySymDepths(e)}}computeDepth(e){this.clearVisitedEdges();const t=this._finder.getEdge();t.getNode(),t.getLabel(),t.setEdgeDepths(at.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)}create(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}findResultEdges(){for(let e=this._dirEdgeList.iterator();e.hasNext();){const t=e.next();t.getDepth(at.RIGHT)>=1&&t.getDepth(at.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}}computeDepths(e){const t=new Ie,n=new dt,i=e.getNode();for(n.addLast(i),t.add(i),e.setVisited(!0);!n.isEmpty();){const e=n.removeFirst();t.add(e),this.computeNodeDepth(e);for(let i=e.getEdges().iterator();i.hasNext();){const e=i.next().getSym();if(e.isVisited())continue;const r=e.getNode();t.contains(r)||(n.addLast(r),t.add(r))}}}compareTo(e){const t=e;return this._rightMostCoord.xt._rightMostCoord.x?1:0}getEnvelope(){if(null===this._env){const e=new E;for(let t=this._dirEdgeList.iterator();t.hasNext();){const n=t.next().getEdge().getCoordinates();for(let t=0;ti&&(n=t.x,i=e.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){let n=ie.index(e,t,this._p);if(n===ie.COLLINEAR)return this._isPointOnSegment=!0,null;t.ythis.location.length){const e=new Array(3).fill(null);e[at.ON]=this.location[at.ON],e[at.LEFT]=st.NONE,e[at.RIGHT]=st.NONE,this.location=e}for(let t=0;t1&&e.append(st.toLocationSymbol(this.location[at.LEFT])),e.append(st.toLocationSymbol(this.location[at.ON])),this.location.length>1&&e.append(st.toLocationSymbol(this.location[at.RIGHT])),e.toString()}setLocations(e,t,n){this.location[at.ON]=e,this.location[at.LEFT]=t,this.location[at.RIGHT]=n}get(e){return e1}isAnyNull(){for(let e=0;ethis._maxNodeDegree&&(this._maxNodeDegree=t),e=this.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2}addPoints(e,t,n){const i=e.getCoordinates();if(t){let e=1;n&&(e=0);for(let t=e;t=0;t--)this._pts.add(i[t])}}isHole(){return this._isHole}setInResult(){let e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)}containsPoint(e){const t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!ft.isInRing(e,t.getCoordinates()))return!1;for(let t=this._holes.iterator();t.hasNext();){if(t.next().containsPoint(e))return!1}return!0}addHole(e){this._holes.add(e)}isShell(){return null===this._shell}getLabel(){return this._label}getEdges(){return this._edges}getMaxNodeDegree(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}getShell(){return this._shell}mergeLabel(){if(1===arguments.length){const e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){const e=arguments[1],t=arguments[0].getLocation(e,at.RIGHT);if(t===st.NONE)return null;if(this._label.getLocation(e)===st.NONE)return this._label.setLocation(e,t),null}}setShell(e){this._shell=e,null!==e&&e.addHole(this)}toPolygon(e){const t=new Array(this._holes.size()).fill(null);for(let e=0;e=2,"found partial label"),this.computeIM(e)}isInResult(){return this._isInResult}isVisited(){return this._isVisited}}class vt extends xt{constructor(){super(),vt.constructor_.apply(this,arguments)}static constructor_(){this._coord=null,this._edges=null;const e=arguments[0],t=arguments[1];this._coord=e,this._edges=t,this._label=new _t(0,st.NONE)}isIncidentEdgeInResult(){for(let e=this.getEdges().getEdges().iterator();e.hasNext();){if(e.next().getEdge().isInResult())return!0}return!1}isIsolated(){return 1===this._label.getGeometryCount()}getCoordinate(){return this._coord}print(e){e.println("node "+this._coord+" lbl: "+this._label)}computeIM(e){}computeMergedLocation(e,t){let n=st.NONE;if(n=this._label.getLocation(t),!e.isNull(t)){const i=e.getLocation(t);n!==st.BOUNDARY&&(n=i)}return n}setLabel(){if(2!==arguments.length||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return super.setLabel.apply(this,arguments);{const e=arguments[0],t=arguments[1];null===this._label?this._label=new _t(e,t):this._label.setLocation(e,t)}}getEdges(){return this._edges}mergeLabel(){if(arguments[0]instanceof vt){const e=arguments[0];this.mergeLabel(e._label)}else if(arguments[0]instanceof _t){const e=arguments[0];for(let t=0;t<2;t++){const n=this.computeMergedLocation(e,t);this._label.getLocation(t)===st.NONE&&this._label.setLocation(t,n)}}}add(e){this._edges.insert(e),e.setNode(this)}setLabelBoundary(e){if(null===this._label)return null;let t=st.NONE;null!==this._label&&(t=this._label.getLocation(e));let n=null;switch(t){case st.BOUNDARY:n=st.INTERIOR;break;case st.INTERIOR:default:n=st.BOUNDARY}this._label.setLocation(e,n)}}class St extends Te{}function Tt(e){return null==e?0:e.color}function It(e){return null==e?null:e.parent}function wt(e,t){null!==e&&(e.color=t)}function Et(e){return null==e?null:e.left}function At(e){return null==e?null:e.right}class Mt extends St{constructor(){super(),this.root_=null,this.size_=0}get(e){let t=this.root_;for(;null!==t;){const n=e.compareTo(t.key);if(n<0)t=t.left;else{if(!(n>0))return t.value;t=t.right}}return null}put(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:0,getValue(){return this.value},getKey(){return this.key}},this.size_=1,null;let n,i,r=this.root_;do{if(n=r,i=e.compareTo(r.key),i<0)r=r.left;else{if(!(i>0)){const e=r.value;return r.value=t,e}r=r.right}}while(null!==r);const o={key:e,left:null,right:null,value:t,parent:n,color:0,getValue(){return this.value},getKey(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null}fixAfterInsertion(e){let t;for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)It(e)===Et(It(It(e)))?(t=At(It(It(e))),1===Tt(t)?(wt(It(e),0),wt(t,0),wt(It(It(e)),1),e=It(It(e))):(e===At(It(e))&&(e=It(e),this.rotateLeft(e)),wt(It(e),0),wt(It(It(e)),1),this.rotateRight(It(It(e))))):(t=Et(It(It(e))),1===Tt(t)?(wt(It(e),0),wt(t,0),wt(It(It(e)),1),e=It(It(e))):(e===Et(It(e))&&(e=It(e),this.rotateRight(e)),wt(It(e),0),wt(It(It(e)),1),this.rotateLeft(It(It(e)))));this.root_.color=0}values(){const e=new j;let t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=Mt.successor(t));)e.add(t.value);return e}entrySet(){const e=new Ie;let t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=Mt.successor(t));)e.add(t);return e}rotateLeft(e){if(null!=e){const t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null==e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}}rotateRight(e){if(null!=e){const t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null==e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}}getFirstEntry(){let e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e}static successor(e){let t;if(null===e)return null;if(null!==e.right){for(t=e.right;null!==t.left;)t=t.left;return t}{t=e.parent;let n=e;for(;null!==t&&n===t.right;)n=t,t=t.parent;return t}}size(){return this.size_}containsKey(e){let t=this.root_;for(;null!==t;){const n=e.compareTo(t.key);if(n<0)t=t.left;else{if(!(n>0))return!0;t=t.right}}return!1}}class Nt{constructor(){Nt.constructor_.apply(this,arguments)}static constructor_(){this.nodeMap=new Mt,this.nodeFact=null;const e=arguments[0];this.nodeFact=e}find(e){return this.nodeMap.get(e)}addNode(){if(arguments[0]instanceof I){const e=arguments[0];let t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof vt){const e=arguments[0],t=this.nodeMap.get(e.getCoordinate());return null===t?(this.nodeMap.put(e.getCoordinate(),e),e):(t.mergeLabel(e),t)}}print(e){for(let t=this.iterator();t.hasNext();){t.next().print(e)}}iterator(){return this.nodeMap.values().iterator()}values(){return this.nodeMap.values()}getBoundaryNodes(e){const t=new j;for(let n=this.iterator();n.hasNext();){const i=n.next();i.getLabel().getLocation(e)===st.BOUNDARY&&t.add(i)}return t}add(e){const t=e.getCoordinate();this.addNode(t).add(e)}}class Dt{static isNorthern(e){return e===Dt.NE||e===Dt.NW}static isOpposite(e,t){if(e===t)return!1;return 2===(e-t+4)%4}static commonHalfPlane(e,t){if(e===t)return e;if(2===(e-t+4)%4)return-1;const n=et?e:t)?3:n}static isInHalfPlane(e,t){return t===Dt.SE?e===Dt.SE||e===Dt.SW:e===t||e===t+1}static quadrant(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new h("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Dt.NE:Dt.SE:t>=0?Dt.NW:Dt.SW}if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];if(t.x===e.x&&t.y===e.y)throw new h("Cannot compute the quadrant for two identical points "+e);return t.x>=e.x?t.y>=e.y?Dt.NE:Dt.SE:t.y>=e.y?Dt.NW:Dt.SW}}}Dt.NE=0,Dt.NW=1,Dt.SW=2,Dt.SE=3;class Rt{constructor(){Rt.constructor_.apply(this,arguments)}static constructor_(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){const e=arguments[0];this._edge=e}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];Rt.constructor_.call(this,e,t,n,null)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];Rt.constructor_.call(this,e),this.init(t,n),this._label=i}}compareDirection(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant2){e.linkDirectedEdgesForMinimalEdgeRings();const i=e.buildMinimalRings(),r=this.findShell(i);null!==r?(this.placePolygonHoles(r,i),t.add(r)):n.addAll(i)}else i.add(e)}return i}buildMaximalEdgeRings(e){const t=new j;for(let n=e.iterator();n.hasNext();){const e=n.next();if(e.isInResult()&&e.getLabel().isArea()&&null===e.getEdgeRing()){const n=new Ct(e,this._geometryFactory);t.add(n),n.setInResult()}}return t}placePolygonHoles(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next();t.isHole()&&t.setShell(e)}}getPolygons(){return this.computePolygons(this._shellList)}findShell(e){let t=0,n=null;for(let i=e.iterator();i.hasNext();){const e=i.next();e.isHole()||(n=e,t++)}return x.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n}add(){if(1===arguments.length){const e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){const e=arguments[0],t=arguments[1];Ot.linkResultDirectedEdges(t);const n=this.buildMaximalEdgeRings(e),i=new j,r=this.buildMinimalEdgeRings(n,this._shellList,i);this.sortShellsAndHoles(r,this._shellList,i),this.placeFreeHoles(this._shellList,i)}}}class kt{getBounds(){}}class Bt{constructor(){Bt.constructor_.apply(this,arguments)}static constructor_(){this._bounds=null,this._item=null;const e=arguments[0],t=arguments[1];this._bounds=e,this._item=t}getItem(){return this._item}getBounds(){return this._bounds}get interfaces_(){return[kt,g]}}class Gt{constructor(){Gt.constructor_.apply(this,arguments)}static constructor_(){this._size=null,this._items=null,this._size=0,this._items=new j,this._items.add(null)}poll(){if(this.isEmpty())return null;const e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e}size(){return this._size}reorder(e){let t=null;const n=this._items.get(e);for(;2*e<=this._size&&(t=2*e,t!==this._size&&this._items.get(t+1).compareTo(this._items.get(t))<0&&t++,this._items.get(t).compareTo(n)<0);e=t)this._items.set(e,this._items.get(t));this._items.set(e,n)}clear(){this._size=0,this._items.clear()}peek(){if(this.isEmpty())return null;return this._items.get(1)}isEmpty(){return 0===this._size}add(e){this._items.add(null),this._size+=1;let t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)}}class zt{insert(e,t){}remove(e,t){}query(){}}class Wt{constructor(){Wt.constructor_.apply(this,arguments)}static constructor_(){if(this._childBoundables=new j,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){const e=arguments[0];this._level=e}}getLevel(){return this._level}size(){return this._childBoundables.size()}getChildBoundables(){return this._childBoundables}addChildBoundable(e){x.isTrue(null===this._bounds),this._childBoundables.add(e)}isEmpty(){return this._childBoundables.isEmpty()}getBounds(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds}get interfaces_(){return[kt,g]}}const Ht={reverseOrder:function(){return{compare:(e,t)=>t.compareTo(e)}},min:function(e){return Ht.sort(e),e.get(0)},sort:function(e,t){const n=e.toArray();t?Z.sort(n,t):Z.sort(n);const i=e.iterator();for(let e=0,t=n.length;ejt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,e,t),null):(this.expand(this._boundable2,this._boundable1,!0,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,!1,e,t),null;if(i)return this.expand(this._boundable2,this._boundable1,!0,e,t),null;throw new h("neither boundable is composite")}isLeaves(){return!(jt.isComposite(this._boundable1)||jt.isComposite(this._boundable2))}compareTo(e){const t=e;return this._distancet._distance?1:0}expand(e,t,n,i,r){for(let o=e.getChildBoundables().iterator();o.hasNext();){const e=o.next();let s=null;s=n?new jt(t,e,this._itemDistance):new jt(e,t,this._itemDistance),s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=e}}static compareDoubles(e,t){return e>t?1:e-2),t.getLevel()===e)return n.add(t),null;for(let i=t.getChildBoundables().iterator();i.hasNext();){const t=i.next();t instanceof Wt?this.boundablesAtLevel(e,t,n):(x.isTrue(t instanceof Bt),-1===e&&n.add(t))}return null}}query(){if(1===arguments.length){const e=arguments[0];this.build();const t=new j;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.queryInternal(e,this._root,t),t}if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.queryInternal(e,this._root,t)}}build(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}getRoot(){return this.build(),this._root}remove(){if(2===arguments.length){const e=arguments[0],t=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,t)}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];let i=this.removeItem(t,n);if(i)return!0;let r=null;for(let o=t.getChildBoundables().iterator();o.hasNext();){const t=o.next();if(this.getIntersectsOp().intersects(t.getBounds(),e)&&(t instanceof Wt&&(i=this.remove(e,t,n),i))){r=t;break}}return null!==r&&r.getChildBoundables().isEmpty()&&t.getChildBoundables().remove(r),i}}createHigherLevels(e,t){x.isTrue(!e.isEmpty());const n=this.createParentBoundables(e,t+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,t+1)}depth(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){let e=0;for(let t=arguments[0].getChildBoundables().iterator();t.hasNext();){const n=t.next();if(n instanceof Wt){const t=this.depth(n);t>e&&(e=t)}}return e+1}}createParentBoundables(e,t){x.isTrue(!e.isEmpty());const n=new j;n.add(this.createNode(t));const i=new j(e);Ht.sort(i,this.getComparator());for(let e=i.iterator();e.hasNext();){const i=e.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(t)),this.lastNode(n).addChildBoundable(i)}return n}isEmpty(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}get interfaces_(){return[g]}}Yt.IntersectsOp=function(){},Yt.DEFAULT_NODE_CAPACITY=10;class qt{distance(e,t){}}class Kt extends Yt{constructor(){super(),Kt.constructor_.apply(this,arguments)}static constructor_(){if(0===arguments.length)Kt.constructor_.call(this,Kt.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){const e=arguments[0];Yt.constructor_.call(this,e)}}static centreX(e){return Kt.avg(e.getMinX(),e.getMaxX())}static avg(e,t){return(e+t)/2}static getItems(e){const t=new Array(e.size()).fill(null);let n=0;for(;!e.isEmpty();){const i=e.poll();t[n]=i.getBoundable(0).getItem(),n++}return t}static centreY(e){return Kt.avg(e.getMinY(),e.getMaxY())}createParentBoundablesFromVerticalSlices(e,t){x.isTrue(e.length>0);const n=new j;for(let i=0;i=0;){const e=i.poll(),o=e.getDistance();if(o>=n)break;if(e.isLeaves())if(r.size()o&&(r.poll(),r.add(e));n=r.peek().getDistance()}else e.expandToQueue(i,n)}return Kt.getItems(r)}}createNode(e){return new Xt(e)}size(){return 0===arguments.length?super.size.call(this):super.size.apply(this,arguments)}insert(){if(!(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof E))return super.insert.apply(this,arguments);{const e=arguments[0],t=arguments[1];if(e.isNull())return null;super.insert.call(this,e,t)}}getIntersectsOp(){return Kt.intersectsOp}verticalSlices(e,t){const n=Math.trunc(Math.ceil(e.size()/t)),i=new Array(t).fill(null),r=e.iterator();for(let e=0;e0;){const e=i.poll(),r=e.getDistance();if(r>=t)break;e.isLeaves()?(t=r,n=e):e.expandToQueue(i,t)}return null===n?null:[n.getBoundable(0).getItem(),n.getBoundable(1).getItem()]}}else{if(2===arguments.length){const e=arguments[0],t=arguments[1];if(this.isEmpty()||e.isEmpty())return null;const n=new jt(this.getRoot(),e.getRoot(),t);return this.nearestNeighbour(n)}if(3===arguments.length){const e=arguments[2],t=new Bt(arguments[0],arguments[1]),n=new jt(this.getRoot(),t,e);return this.nearestNeighbour(n)[0]}if(4===arguments.length){const e=arguments[2],t=arguments[3],n=new Bt(arguments[0],arguments[1]),i=new jt(this.getRoot(),n,e);return this.nearestNeighbourK(i,t)}}}isWithinDistance(){if(2===arguments.length){const e=arguments[0],t=arguments[1];let n=_.POSITIVE_INFINITY;const i=new Gt;for(i.add(e);!i.isEmpty();){const e=i.poll(),r=e.getDistance();if(r>t)return!1;if(e.maximumDistance()<=t)return!0;if(e.isLeaves()){if(n=r,n<=t)return!0}else e.expandToQueue(i,n)}return!1}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=new jt(this.getRoot(),e.getRoot(),t);return this.isWithinDistance(i,n)}}get interfaces_(){return[zt,g]}}class Xt extends Wt{constructor(){super(),Xt.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0];Wt.constructor_.call(this,e)}computeBounds(){let e=null;for(let t=this.getChildBoundables().iterator();t.hasNext();){const n=t.next();null===e?e=new E(n.getBounds()):e.expandToInclude(n.getBounds())}return e}}Kt.STRtreeNode=Xt,Kt.xComparator=new class{get interfaces_(){return[y]}compare(e,t){return Yt.compareDoubles(Kt.centreX(e.getBounds()),Kt.centreX(t.getBounds()))}},Kt.yComparator=new class{get interfaces_(){return[y]}compare(e,t){return Yt.compareDoubles(Kt.centreY(e.getBounds()),Kt.centreY(t.getBounds()))}},Kt.intersectsOp=new class{get interfaces_(){return[IntersectsOp]}intersects(e,t){return e.intersects(t)}},Kt.DEFAULT_NODE_CAPACITY=10;class Jt{static relativeSign(e,t){return et?1:0}static compare(e,t,n){if(t.equals2D(n))return 0;const i=Jt.relativeSign(t.x,n.x),r=Jt.relativeSign(t.y,n.y);switch(e){case 0:return Jt.compareValue(i,r);case 1:return Jt.compareValue(r,i);case 2:return Jt.compareValue(r,-i);case 3:return Jt.compareValue(-i,r);case 4:return Jt.compareValue(-i,-r);case 5:return Jt.compareValue(-r,-i);case 6:return Jt.compareValue(-r,i);case 7:return Jt.compareValue(i,-r)}return x.shouldNeverReachHere("invalid octant value"),0}static compareValue(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0}}class Zt{constructor(){Zt.constructor_.apply(this,arguments)}static constructor_(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this._segString=e,this.coord=new I(t),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(n))}getCoordinate(){return this.coord}print(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)}compareTo(e){const t=e;return this.segmentIndext.segmentIndex?1:this.coord.equals2D(t.coord)?0:this._isInterior?t._isInterior?Jt.compare(this._segmentOctant,this.coord,t.coord):1:-1}isEndPoint(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e}toString(){return this.segmentIndex+":"+this.coord.toString()}isInterior(){return this._isInterior}get interfaces_(){return[d]}}class Qt{hasNext(){}next(){}remove(){}}class $t{constructor(){$t.constructor_.apply(this,arguments)}static constructor_(){this._nodeMap=new Mt,this._edge=null;const e=arguments[0];this._edge=e}getSplitCoordinates(){const e=new Y;this.addEndpoints();const t=this.iterator();let n=t.next();for(;t.hasNext();){const i=t.next();this.addEdgeCoordinates(n,i,e),n=i}return e.toCoordinateArray()}addCollapsedNodes(){const e=new j;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(let t=e.iterator();t.hasNext();){const e=t.next().intValue();this.add(this._edge.getCoordinate(e),e)}}createSplitEdgePts(e,t){let n=t.segmentIndex-e.segmentIndex+2;if(2===n)return[new I(e.coord),new I(t.coord)];const i=this._edge.getCoordinate(t.segmentIndex),r=t.isInterior()||!t.coord.equals2D(i);r||n--;const o=new Array(n).fill(null);let s=0;o[s++]=new I(e.coord);for(let n=e.segmentIndex+1;n<=t.segmentIndex;n++)o[s++]=this._edge.getCoordinate(n);return r&&(o[s]=new I(t.coord)),o}print(e){e.println("Intersections:");for(let t=this.iterator();t.hasNext();){t.next().print(e)}}findCollapsesFromExistingVertices(e){for(let t=0;t=0?t>=0?n>=i?0:1:n>=i?7:6:t>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1],n=t.x-e.x,i=t.y-e.y;if(0===n&&0===i)throw new h("Cannot compute the octant for two identical points "+e);return en.octant(n,i)}}}class tn{getCoordinates(){}size(){}getCoordinate(e){}isClosed(){}setData(e){}getData(){}}class nn{addIntersection(e,t){}get interfaces_(){return[tn]}}class rn{constructor(){rn.constructor_.apply(this,arguments)}static constructor_(){this._nodeList=new $t(this),this._pts=null,this._data=null;const e=arguments[0],t=arguments[1];this._pts=e,this._data=t}static getNodedSubstrings(){if(1===arguments.length){const e=arguments[0],t=new j;return rn.getNodedSubstrings(e,t),t}if(2===arguments.length){const e=arguments[1];for(let t=arguments[0].iterator();t.hasNext();){t.next().getNodeList().addSplitEdges(e)}}}getCoordinates(){return this._pts}size(){return this._pts.length}getCoordinate(e){return this._pts[e]}isClosed(){return this._pts[0].equals(this._pts[this._pts.length-1])}getSegmentOctant(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))}setData(e){this._data=e}safeOctant(e,t){return e.equals2D(t)?0:en.octant(e,t)}getData(){return this._data}addIntersection(){if(2===arguments.length){const e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){const e=arguments[1],t=arguments[3],n=new I(arguments[0].getIntersection(t));this.addIntersection(n,e)}}toString(){return et.toLineString(new xe(this._pts))}getNodeList(){return this._nodeList}addIntersectionNode(e,t){let n=t;const i=n+1;if(i=e.length-1)return e.length-1;const i=Dt.quadrant(e[n],e[n+1]);let r=t+1;for(;rn.getId()&&(n.computeOverlaps(i,e),this._nOverlaps++),this._segInt.isDone())return null}}}}class un extends on{constructor(){super(),un.constructor_.apply(this,arguments)}static constructor_(){this._si=null;const e=arguments[0];this._si=e}overlap(){if(4!==arguments.length)return super.overlap.apply(this,arguments);{const e=arguments[1],t=arguments[2],n=arguments[3],i=arguments[0].getContext(),r=t.getContext();this._si.processIntersections(i,e,r,n)}}}hn.SegmentOverlapAction=un;class dn{constructor(){dn.constructor_.apply(this,arguments)}static constructor_(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=ie.COUNTERCLOCKWISE;const e=arguments[0];this._inputLine=e}static simplify(e,t){return new dn(e).simplify(t)}isDeletable(e,t,n,i){const r=this._inputLine[e],o=this._inputLine[t],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&(!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,e,n,i))}deleteShallowConcavities(){let e=1,t=this.findNextNonDeletedIndex(e),n=this.findNextNonDeletedIndex(t),i=!1;for(;n=0;t--)this.addPt(e[t])}isRedundant(e){if(this._ptList.size()<1)return!1;const t=this._ptList.get(this._ptList.size()-1);return e.distance(t)Math.PI;)e-=gn.PI_TIMES_2;for(;e<=-Math.PI;)e+=gn.PI_TIMES_2;return e}static angle(){if(1===arguments.length){const e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){const e=arguments[0],t=arguments[1],n=t.x-e.x,i=t.y-e.y;return Math.atan2(i,n)}}static isAcute(e,t,n){const i=e.x-t.x,r=e.y-t.y;return i*(n.x-t.x)+r*(n.y-t.y)>0}static isObtuse(e,t,n){const i=e.x-t.x,r=e.y-t.y;return i*(n.x-t.x)+r*(n.y-t.y)<0}static interiorAngle(e,t,n){const i=gn.angle(t,e),r=gn.angle(t,n);return Math.abs(r-i)}static normalizePositive(e){if(e<0){for(;e<0;)e+=gn.PI_TIMES_2;e>=gn.PI_TIMES_2&&(e=0)}else{for(;e>=gn.PI_TIMES_2;)e-=gn.PI_TIMES_2;e<0&&(e=0)}return e}static angleBetween(e,t,n){const i=gn.angle(t,e),r=gn.angle(t,n);return gn.diff(i,r)}static diff(e,t){let n=null;return n=eMath.PI&&(n=2*Math.PI-n),n}static toRadians(e){return e*Math.PI/180}static getTurn(e,t){const n=Math.sin(t-e);return n>0?gn.COUNTERCLOCKWISE:n<0?gn.CLOCKWISE:gn.NONE}static angleBetweenOriented(e,t,n){const i=gn.angle(t,e),r=gn.angle(t,n)-i;return r<=-Math.PI?r+gn.PI_TIMES_2:r>Math.PI?r-gn.PI_TIMES_2:r}}gn.PI_TIMES_2=2*Math.PI,gn.PI_OVER_2=Math.PI/2,gn.PI_OVER_4=Math.PI/4,gn.COUNTERCLOCKWISE=ie.COUNTERCLOCKWISE,gn.CLOCKWISE=ie.CLOCKWISE,gn.NONE=ie.COLLINEAR;class fn{constructor(){fn.constructor_.apply(this,arguments)}static constructor_(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new it,this._seg1=new it,this._offset0=new it,this._offset1=new it,this._side=0,this._hasNarrowConcaveAngle=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=t,this._li=new nt,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===ot.JOIN_ROUND&&(this._closingSegLengthFactor=fn.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}addNextSegment(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;const n=ie.index(this._s0,this._s1,this._s2),i=n===ie.CLOCKWISE&&this._side===at.LEFT||n===ie.COUNTERCLOCKWISE&&this._side===at.RIGHT;0===n?this.addCollinear(t):i?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)}addLineEndCap(e,t){const n=new it(e,t),i=new it;this.computeOffsetSegment(n,at.LEFT,this._distance,i);const r=new it;this.computeOffsetSegment(n,at.RIGHT,this._distance,r);const o=t.x-e.x,s=t.y-e.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case ot.CAP_ROUND:this._segList.addPt(i.p1),this.addDirectedFillet(t,a+Math.PI/2,a-Math.PI/2,ie.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case ot.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case ot.CAP_SQUARE:const e=new I;e.x=Math.abs(this._distance)*Math.cos(a),e.y=Math.abs(this._distance)*Math.sin(a);const n=new I(i.p1.x+e.x,i.p1.y+e.y),o=new I(r.p1.x+e.x,r.p1.y+e.y);this._segList.addPt(n),this._segList.addPt(o)}}getCoordinates(){return this._segList.getCoordinates()}addMitreJoin(e,t,n,i){const r=Pe.intersection(t.p0,t.p1,n.p0,n.p1);if(null!==r){if((i<=0?1:r.distance(e)/Math.abs(i))<=this._bufParams.getMitreLimit())return this._segList.addPt(r),null}this.addLimitedMitreJoin(t,n,i,this._bufParams.getMitreLimit())}addOutsideTurn(e,t){if(this._offset0.p1.distance(this._offset1.p0)=h&&(a-=2*Math.PI),this._segList.addPt(t),this.addDirectedFillet(e,a,h,i,r),this._segList.addPt(n)}addLastSegment(){this._segList.addPt(this._offset1.p1)}initSideSegments(e,t,n){this._s1=e,this._s2=t,this._side=n,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)}addLimitedMitreJoin(e,t,n,i){const r=this._seg0.p1,o=gn.angle(r,this._seg0.p0),s=gn.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=gn.normalize(o+s),l=gn.normalize(a+Math.PI),c=i*n,h=n-c*Math.abs(Math.sin(s)),u=r.x+c*Math.cos(l),d=r.y+c*Math.sin(l),m=new I(u,d),g=new it(r,m),f=g.pointAlongOffset(1,h),p=g.pointAlongOffset(1,-h);this._side===at.LEFT?(this._segList.addPt(f),this._segList.addPt(p)):(this._segList.addPt(p),this._segList.addPt(f))}addDirectedFillet(e,t,n,i,r){const o=i===ie.CLOCKWISE?-1:1,s=Math.abs(t-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;const l=s/a,c=new I;for(let n=0;n0){const e=new I((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(e);const t=new I((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(t)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}createCircle(e){const t=new I(e.x+this._distance,e.y);this._segList.addPt(t),this.addDirectedFillet(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}addBevelJoin(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)}init(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new mn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*fn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}addCollinear(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===ot.JOIN_BEVEL||this._bufParams.getJoinStyle()===ot.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ie.CLOCKWISE,this._distance))}closeRing(){this._segList.closeRing()}hasNarrowConcaveAngle(){return this._hasNarrowConcaveAngle}}fn.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,fn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,fn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,fn.MAX_CLOSING_SEG_LEN_FACTOR=80;class pn{constructor(){pn.constructor_.apply(this,arguments)}static constructor_(){this._distance=0,this._precisionModel=null,this._bufParams=null;const e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t}static copyCoordinates(e){const t=new Array(e.length).fill(null);for(let n=0;n=0;e--)n.addNextSegment(t[e],!0)}else{n.addSegments(e,!1);const t=dn.simplify(e,i),r=t.length-1;n.initSideSegments(t[0],t[1],at.LEFT),n.addFirstSegment();for(let e=2;e<=r;e++)n.addNextSegment(t[e],!0)}n.addLastSegment(),n.closeRing()}computeRingBufferCurve(e,t,n){let i=this.simplifyTolerance(this._distance);t===at.RIGHT&&(i=-i);const r=dn.simplify(e,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],t);for(let e=1;e<=o;e++){const t=1!==e;n.addNextSegment(r[e],t)}n.closeRing()}computeLineBufferCurve(e,t){const n=this.simplifyTolerance(this._distance),i=dn.simplify(e,n),r=i.length-1;t.initSideSegments(i[0],i[1],at.LEFT);for(let e=2;e<=r;e++)t.addNextSegment(i[e],!0);t.addLastSegment(),t.addLineEndCap(i[r-1],i[r]);const o=dn.simplify(e,-n),s=o.length-1;t.initSideSegments(o[s],o[s-1],at.LEFT);for(let e=s-2;e>=0;e--)t.addNextSegment(o[e],!0);t.addLastSegment(),t.addLineEndCap(o[1],o[0]),t.closeRing()}computePointCurve(e,t){switch(this._bufParams.getEndCapStyle()){case ot.CAP_ROUND:t.createCircle(e);break;case ot.CAP_SQUARE:t.createSquare(e)}}getLineCurve(e,t){if(this._distance=t,this.isLineOffsetEmpty(t))return null;const n=Math.abs(t),i=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){const n=t<0;this.computeSingleSidedBufferCurve(e,n,i)}else this.computeLineBufferCurve(e,i);return i.getCoordinates()}getBufferParameters(){return this._bufParams}simplifyTolerance(e){return e*this._bufParams.getSimplifyFactor()}getRingCurve(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(0===n)return pn.copyCoordinates(e);const i=this.getSegGen(n);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()}computeOffsetCurve(e,t,n){const i=this.simplifyTolerance(this._distance);if(t){const t=dn.simplify(e,-i),r=t.length-1;n.initSideSegments(t[r],t[r-1],at.LEFT),n.addFirstSegment();for(let e=r-2;e>=0;e--)n.addNextSegment(t[e],!0)}else{const t=dn.simplify(e,i),r=t.length-1;n.initSideSegments(t[0],t[1],at.LEFT),n.addFirstSegment();for(let e=2;e<=r;e++)n.addNextSegment(t[e],!0)}n.addLastSegment()}isLineOffsetEmpty(e){return 0===e||e<0&&!this._bufParams.isSingleSided()}getSegGen(e){return new fn(this._precisionModel,this._bufParams,e)}}class _n{constructor(){_n.constructor_.apply(this,arguments)}static constructor_(){this._subgraphs=null,this._seg=new it;const e=arguments[0];this._subgraphs=e}findStabbedSegments(){if(1===arguments.length){const e=arguments[0],t=new j;for(let n=this._subgraphs.iterator();n.hasNext();){const i=n.next(),r=i.getEnvelope();e.yr.getMaxY()||this.findStabbedSegments(e,i.getDirectedEdges(),t)}return t}if(3===arguments.length)if(N(arguments[2],H)&&arguments[0]instanceof I&&arguments[1]instanceof Pt){const e=arguments[0],t=arguments[1],n=arguments[2],i=t.getEdge().getCoordinates();for(let r=0;rthis._seg.p1.y&&this._seg.reverse();if(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y)continue;if(ie.index(this._seg.p0,this._seg.p1,e)===ie.RIGHT)continue;let o=t.getDepth(at.LEFT);this._seg.p0.equals(i[r])||(o=t.getDepth(at.RIGHT));const s=new yn(this._seg,o);n.add(s)}}else if(N(arguments[2],H)&&arguments[0]instanceof I&&N(arguments[1],H)){const e=arguments[0],t=arguments[2];for(let n=arguments[1].iterator();n.hasNext();){const i=n.next();i.isForward()&&this.findStabbedSegments(e,i,t)}}}getDepth(e){const t=this.findStabbedSegments(e);if(0===t.size())return 0;return Ht.min(t)._leftDepth}}class yn{constructor(){yn.constructor_.apply(this,arguments)}static constructor_(){this._upwardSeg=null,this._leftDepth=null;const e=arguments[0],t=arguments[1];this._upwardSeg=new it(e),this._leftDepth=t}compareTo(e){const t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;let n=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==n?n:(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg),0!==n?n:this._upwardSeg.compareTo(t._upwardSeg))}compareX(e,t){const n=e.p0.compareTo(t.p0);return 0!==n?n:e.p1.compareTo(t.p1)}toString(){return this._upwardSeg.toString()}get interfaces_(){return[d]}}_n.DepthSegment=yn;class bn extends c{constructor(){super(),bn.constructor_.apply(this,arguments)}static constructor_(){c.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}class Cn{constructor(){Cn.constructor_.apply(this,arguments)}static constructor_(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){const e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){const e=arguments[0],t=arguments[1];this.x=e,this.y=t,this.w=1}else if(arguments[0]instanceof Cn&&arguments[1]instanceof Cn){const e=arguments[0],t=arguments[1];this.x=e.y*t.w-t.y*e.w,this.y=t.x*e.w-e.x*t.w,this.w=e.x*t.y-t.x*e.y}else if(arguments[0]instanceof I&&arguments[1]instanceof I){const e=arguments[0],t=arguments[1];this.x=e.y-t.y,this.y=t.x-e.x,this.w=e.x*t.y-t.x*e.y}}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this.x=e,this.y=t,this.w=n}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=e.y-t.y,o=t.x-e.x,s=e.x*t.y-t.x*e.y,a=n.y-i.y,l=i.x-n.x,c=n.x*i.y-i.x*n.y;this.x=o*c-l*s,this.y=a*s-r*c,this.w=r*l-a*o}}getY(){const e=this.y/this.w;if(_.isNaN(e)||_.isInfinite(e))throw new bn;return e}getX(){const e=this.x/this.w;if(_.isNaN(e)||_.isInfinite(e))throw new bn;return e}getCoordinate(){const e=new I;return e.x=this.getX(),e.y=this.getY(),e}}class xn{constructor(){xn.constructor_.apply(this,arguments)}static constructor_(){this.p0=null,this.p1=null,this.p2=null;const e=arguments[0],t=arguments[1],n=arguments[2];this.p0=e,this.p1=t,this.p2=n}static area(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)}static signedArea(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2}static det(e,t,n,i){return e*i-t*n}static interpolateZ(e,t,n,i){const r=t.x,o=t.y,s=n.x-r,a=i.x-r,l=n.y-o,c=i.y-o,h=s*c-a*l,u=e.x-r,d=e.y-o,m=(c*u-a*d)/h,g=(-l*u+s*d)/h;return t.getZ()+m*(n.getZ()-t.getZ())+g*(i.getZ()-t.getZ())}static longestSideLength(e,t,n){const i=e.distance(t),r=t.distance(n),o=n.distance(e);let s=i;return r>s&&(s=r),o>s&&(s=o),s}static circumcentreDD(e,t,n){const i=te.valueOf(e.x).subtract(n.x),r=te.valueOf(e.y).subtract(n.y),o=te.valueOf(t.x).subtract(n.x),s=te.valueOf(t.y).subtract(n.y),a=te.determinant(i,r,o,s).multiply(2),l=i.sqr().add(r.sqr()),c=o.sqr().add(s.sqr()),h=te.determinant(r,l,s,c),u=te.determinant(i,l,o,c),d=te.valueOf(n.x).subtract(h.divide(a)).doubleValue(),m=te.valueOf(n.y).add(u.divide(a)).doubleValue();return new I(d,m)}static isAcute(e,t,n){return!!gn.isAcute(e,t,n)&&(!!gn.isAcute(t,n,e)&&!!gn.isAcute(n,e,t))}static circumcentre(e,t,n){const i=n.x,r=n.y,o=e.x-i,s=e.y-r,a=t.x-i,l=t.y-r,c=2*xn.det(o,s,a,l),h=xn.det(s,o*o+s*s,l,a*a+l*l),u=xn.det(o,o*o+s*s,a,a*a+l*l);return new I(i-h/c,r+u/c)}static perpendicularBisector(e,t){const n=t.x-e.x,i=t.y-e.y,r=new Cn(e.x+n/2,e.y+i/2,1),o=new Cn(e.x-i+n/2,e.y+n+i/2,1);return new Cn(r,o)}static angleBisector(e,t,n){const i=t.distance(e),r=i/(i+t.distance(n)),o=n.x-e.x,s=n.y-e.y;return new I(e.x+r*o,e.y+r*s)}static area3D(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=t.getZ()-e.getZ(),s=n.x-e.x,a=n.y-e.y,l=n.getZ()-e.getZ(),c=r*l-o*a,h=o*s-i*l,u=i*a-r*s,d=c*c+h*h+u*u;return Math.sqrt(d)/2}static centroid(e,t,n){const i=(e.x+t.x+n.x)/3,r=(e.y+t.y+n.y)/3;return new I(i,r)}static inCentre(e,t,n){const i=t.distance(n),r=e.distance(n),o=e.distance(t),s=i+r+o,a=(i*e.x+r*t.x+o*n.x)/s,l=(i*e.y+r*t.y+o*n.y)/s;return new I(a,l)}area(){return xn.area(this.p0,this.p1,this.p2)}signedArea(){return xn.signedArea(this.p0,this.p1,this.p2)}interpolateZ(e){if(null===e)throw new h("Supplied point is null.");return xn.interpolateZ(e,this.p0,this.p1,this.p2)}longestSideLength(){return xn.longestSideLength(this.p0,this.p1,this.p2)}isAcute(){return xn.isAcute(this.p0,this.p1,this.p2)}circumcentre(){return xn.circumcentre(this.p0,this.p1,this.p2)}area3D(){return xn.area3D(this.p0,this.p1,this.p2)}centroid(){return xn.centroid(this.p0,this.p1,this.p2)}inCentre(){return xn.inCentre(this.p0,this.p1,this.p2)}}class vn{constructor(){vn.constructor_.apply(this,arguments)}static constructor_(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new j;const e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n}addRingSide(e,t,n,i,r){if(0===t&&e.length=de.MINIMUM_VALID_SIZE&&ie.isCCW(e)&&(o=r,s=i,n=at.opposite(n));const a=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(a,o,s)}addRingBothSides(e,t){this.addRingSide(e,t,at.LEFT,st.EXTERIOR,st.INTERIOR),this.addRingSide(e,t,at.RIGHT,st.INTERIOR,st.EXTERIOR)}addPoint(e){if(this._distance<=0)return null;const t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,st.EXTERIOR,st.INTERIOR)}addPolygon(e){let t=this._distance,n=at.LEFT;this._distance<0&&(t=-this._distance,n=at.RIGHT);const i=e.getExteriorRing(),r=be.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addRingSide(r,t,n,st.EXTERIOR,st.INTERIOR);for(let i=0;i0&&this.isErodedCompletely(r,-this._distance)||this.addRingSide(o,t,at.opposite(n),st.INTERIOR,st.EXTERIOR)}}isTriangleErodedCompletely(e,t){const n=new xn(e[0],e[1],e[2]),i=n.inCentre();return Le.pointToSegment(i,n.p0,n.p1)r}addCollection(e){for(let t=0;t=this._max)throw new U;const e=this._parent.getGeometryN(this._index++);return e instanceof he?(this._subcollectionIterator=new Tn(e),this._subcollectionIterator.next()):e}remove(){throw new L(this.getClass().getName())}hasNext(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}get interfaces_(){return[Qt]}}class In{constructor(){In.constructor_.apply(this,arguments)}static constructor_(){this._geom=null;const e=arguments[0];this._geom=e}static locatePointInPolygon(e,t){if(t.isEmpty())return st.EXTERIOR;const n=t.getExteriorRing(),i=In.locatePointInRing(e,n);if(i!==st.INTERIOR)return i;for(let n=0;n=0;n--){const i=this._edgeList.get(n),r=i.getSym();null===t&&(t=r),null!==e&&r.setNext(e),e=i}t.setNext(e)}computeDepths(){if(1===arguments.length){const e=arguments[0],t=this.findIndex(e),n=e.getDepth(at.LEFT),i=e.getDepth(at.RIGHT),r=this.computeDepths(t+1,this._edgeList.size(),n);if(this.computeDepths(0,t,r)!==i)throw new ut("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){const e=arguments[1];let t=arguments[2];for(let n=arguments[0];n=0;r--){const o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===t&&o.getEdgeRing()===e&&(t=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==e)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==e)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(x.isTrue(null!==t,"found null for first outgoing dirEdge"),x.isTrue(t.getEdgeRing()===e,"unable to link last incoming dirEdge"),n.setNextMin(t))}getOutgoingDegree(){if(0===arguments.length){let e=0;for(let t=this.iterator();t.hasNext();){t.next().isInResult()&&e++}return e}if(1===arguments.length){const e=arguments[0];let t=0;for(let n=this.iterator();n.hasNext();){n.next().getEdgeRing()===e&&t++}return t}}getLabel(){return this._label}findCoveredLineEdges(){let e=st.NONE;for(let t=this.iterator();t.hasNext();){const n=t.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){e=st.INTERIOR;break}if(i.isInResult()){e=st.EXTERIOR;break}}}if(e===st.NONE)return null;let t=e;for(let e=this.iterator();e.hasNext();){const n=e.next(),i=n.getSym();n.isLineEdge()?n.getEdge().setCovered(t===st.INTERIOR):(n.isInResult()&&(t=st.EXTERIOR),i.isInResult()&&(t=st.INTERIOR))}}computeLabelling(e){super.computeLabelling.call(this,e),this._label=new _t(st.NONE);for(let e=this.iterator();e.hasNext();){const t=e.next().getEdge().getLabel();for(let e=0;e<2;e++){const n=t.getLocation(e);n!==st.INTERIOR&&n!==st.BOUNDARY||this._label.setLocation(e,st.INTERIOR)}}}}class An extends Lt{constructor(){super()}createNode(e){return new vt(e,new En)}}class Mn{constructor(){Mn.constructor_.apply(this,arguments)}static constructor_(){this._pts=null,this._orientation=null;const e=arguments[0];this._pts=e,this._orientation=Mn.orientation(e)}static orientation(e){return 1===be.increasingDirection(e)}static compareOriented(e,t,n,i){const r=t?1:-1,o=i?1:-1,s=t?e.length:-1,a=i?n.length:-1;let l=t?0:e.length-1,c=i?0:n.length-1;for(;;){const t=e[l].compareTo(n[c]);if(0!==t)return t;l+=r,c+=o;const i=l===s,h=c===a;if(i&&!h)return-1;if(!i&&h)return 1;if(i&&h)return 0}}compareTo(e){const t=e;return Mn.compareOriented(this._pts,this._orientation,t._pts,t._orientation)}get interfaces_(){return[d]}}class Nn{constructor(){Nn.constructor_.apply(this,arguments)}static constructor_(){this._edges=new j,this._ocaMap=new Mt}print(e){e.print("MULTILINESTRING ( ");for(let t=0;t0&&e.print(","),e.print("(");const i=n.getCoordinates();for(let t=0;t0&&e.print(","),e.print(i[t].x+" "+i[t].y);e.println(")")}e.print(") ")}addAll(e){for(let t=e.iterator();t.hasNext();)this.add(t.next())}findEdgeIndex(e){for(let t=0;t0||!t.coord.equals2D(i);r||n--;const o=new Array(n).fill(null);let s=0;o[s++]=new I(e.coord);for(let n=e.segmentIndex+1;n<=t.segmentIndex;n++)o[s++]=this.edge.pts[n];return r&&(o[s]=t.coord),new zn(o,new _t(this.edge._label))}add(e,t,n){const i=new Pn(e,t,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)}isIntersection(e){for(let t=this.iterator();t.hasNext();){if(t.next().coord.equals(e))return!0}return!1}}class On{constructor(){On.constructor_.apply(this,arguments)}static constructor_(){if(this._matrix=null,0===arguments.length)this._matrix=Array(3).fill().map((()=>Array(3))),this.setAll(F.FALSE);else if(1===arguments.length)if("string"==typeof arguments[0]){const e=arguments[0];On.constructor_.call(this),this.set(e)}else if(arguments[0]instanceof On){const e=arguments[0];On.constructor_.call(this),this._matrix[st.INTERIOR][st.INTERIOR]=e._matrix[st.INTERIOR][st.INTERIOR],this._matrix[st.INTERIOR][st.BOUNDARY]=e._matrix[st.INTERIOR][st.BOUNDARY],this._matrix[st.INTERIOR][st.EXTERIOR]=e._matrix[st.INTERIOR][st.EXTERIOR],this._matrix[st.BOUNDARY][st.INTERIOR]=e._matrix[st.BOUNDARY][st.INTERIOR],this._matrix[st.BOUNDARY][st.BOUNDARY]=e._matrix[st.BOUNDARY][st.BOUNDARY],this._matrix[st.BOUNDARY][st.EXTERIOR]=e._matrix[st.BOUNDARY][st.EXTERIOR],this._matrix[st.EXTERIOR][st.INTERIOR]=e._matrix[st.EXTERIOR][st.INTERIOR],this._matrix[st.EXTERIOR][st.BOUNDARY]=e._matrix[st.EXTERIOR][st.BOUNDARY],this._matrix[st.EXTERIOR][st.EXTERIOR]=e._matrix[st.EXTERIOR][st.EXTERIOR]}}static matches(){if(Number.isInteger(arguments[0])&&"string"==typeof arguments[1]){const e=arguments[0],t=arguments[1];return t===F.SYM_DONTCARE||(t===F.SYM_TRUE&&(e>=0||e===F.TRUE)||(t===F.SYM_FALSE&&e===F.FALSE||(t===F.SYM_P&&e===F.P||(t===F.SYM_L&&e===F.L||t===F.SYM_A&&e===F.A))))}if("string"==typeof arguments[0]&&"string"==typeof arguments[1]){const e=arguments[1];return new On(arguments[0]).matches(e)}}static isTrue(e){return e>=0||e===F.TRUE}isIntersects(){return!this.isDisjoint()}isCovers(){return(On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])||On.isTrue(this._matrix[st.INTERIOR][st.BOUNDARY])||On.isTrue(this._matrix[st.BOUNDARY][st.INTERIOR])||On.isTrue(this._matrix[st.BOUNDARY][st.BOUNDARY]))&&this._matrix[st.EXTERIOR][st.INTERIOR]===F.FALSE&&this._matrix[st.EXTERIOR][st.BOUNDARY]===F.FALSE}isCoveredBy(){return(On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])||On.isTrue(this._matrix[st.INTERIOR][st.BOUNDARY])||On.isTrue(this._matrix[st.BOUNDARY][st.INTERIOR])||On.isTrue(this._matrix[st.BOUNDARY][st.BOUNDARY]))&&this._matrix[st.INTERIOR][st.EXTERIOR]===F.FALSE&&this._matrix[st.BOUNDARY][st.EXTERIOR]===F.FALSE}set(){if(1===arguments.length){const e=arguments[0];for(let t=0;t=0&&t>=0&&this.setAtLeast(e,t,n)}isWithin(){return On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])&&this._matrix[st.INTERIOR][st.EXTERIOR]===F.FALSE&&this._matrix[st.BOUNDARY][st.EXTERIOR]===F.FALSE}isTouches(e,t){return e>t?this.isTouches(t,e):(e===F.A&&t===F.A||e===F.L&&t===F.L||e===F.L&&t===F.A||e===F.P&&t===F.A||e===F.P&&t===F.L)&&(this._matrix[st.INTERIOR][st.INTERIOR]===F.FALSE&&(On.isTrue(this._matrix[st.INTERIOR][st.BOUNDARY])||On.isTrue(this._matrix[st.BOUNDARY][st.INTERIOR])||On.isTrue(this._matrix[st.BOUNDARY][st.BOUNDARY])))}isOverlaps(e,t){return e===F.P&&t===F.P||e===F.A&&t===F.A?On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])&&On.isTrue(this._matrix[st.INTERIOR][st.EXTERIOR])&&On.isTrue(this._matrix[st.EXTERIOR][st.INTERIOR]):e===F.L&&t===F.L&&(1===this._matrix[st.INTERIOR][st.INTERIOR]&&On.isTrue(this._matrix[st.INTERIOR][st.EXTERIOR])&&On.isTrue(this._matrix[st.EXTERIOR][st.INTERIOR]))}isEquals(e,t){return e===t&&(On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])&&this._matrix[st.INTERIOR][st.EXTERIOR]===F.FALSE&&this._matrix[st.BOUNDARY][st.EXTERIOR]===F.FALSE&&this._matrix[st.EXTERIOR][st.INTERIOR]===F.FALSE&&this._matrix[st.EXTERIOR][st.BOUNDARY]===F.FALSE)}toString(){const e=new Ce("123456789");for(let t=0;t<3;t++)for(let n=0;n<3;n++)e.setCharAt(3*t+n,F.toDimensionSymbol(this._matrix[t][n]));return e.toString()}setAll(e){for(let t=0;t<3;t++)for(let n=0;n<3;n++)this._matrix[t][n]=e}get(e,t){return this._matrix[e][t]}transpose(){let e=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=e,e=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=e,e=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=e,this}matches(e){if(9!==e.length)throw new h("Should be length 9: "+e);for(let t=0;t<3;t++)for(let n=0;n<3;n++)if(!On.matches(this._matrix[t][n],e.charAt(3*t+n)))return!1;return!0}add(e){for(let t=0;t<3;t++)for(let n=0;n<3;n++)this.setAtLeast(t,n,e.get(t,n))}isDisjoint(){return this._matrix[st.INTERIOR][st.INTERIOR]===F.FALSE&&this._matrix[st.INTERIOR][st.BOUNDARY]===F.FALSE&&this._matrix[st.BOUNDARY][st.INTERIOR]===F.FALSE&&this._matrix[st.BOUNDARY][st.BOUNDARY]===F.FALSE}isCrosses(e,t){return e===F.P&&t===F.L||e===F.P&&t===F.A||e===F.L&&t===F.A?On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])&&On.isTrue(this._matrix[st.INTERIOR][st.EXTERIOR]):e===F.L&&t===F.P||e===F.A&&t===F.P||e===F.A&&t===F.L?On.isTrue(this._matrix[st.INTERIOR][st.INTERIOR])&&On.isTrue(this._matrix[st.EXTERIOR][st.INTERIOR]):e===F.L&&t===F.L&&0===this._matrix[st.INTERIOR][st.INTERIOR]}get interfaces_(){return[m]}}class Fn{constructor(){Fn.constructor_.apply(this,arguments)}static constructor_(){if(this._data=null,this._size=0,0===arguments.length)Fn.constructor_.call(this,10);else if(1===arguments.length){const e=arguments[0];this._data=new Array(e).fill(null)}}size(){return this._size}addAll(e){return null===e||0===e.length?null:(this.ensureCapacity(this._size+e.length),ye.arraycopy(e,0,this._data,this._size,e.length),void(this._size+=e.length))}ensureCapacity(e){if(e<=this._data.length)return null;const t=Math.max(e,2*this._data.length);this._data=Z.copyOf(this._data,t)}toArray(){const e=new Array(this._size).fill(null);return ye.arraycopy(this._data,0,e,0,this._size),e}add(e){this.ensureCapacity(this._size+1),this._data[this._size]=e,++this._size}}class kn{static toIntArray(e){const t=new Array(e.size()).fill(null);for(let n=0;nn?t:n}getMinX(e){const t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return tArray(3)));for(let e=0;e<2;e++)for(let t=0;t<3;t++)this._depth[e][t]=Gn.NULL_VALUE}static depthAtLocation(e){return e===st.EXTERIOR?0:e===st.INTERIOR?1:Gn.NULL_VALUE}getDepth(e,t){return this._depth[e][t]}setDepth(e,t,n){this._depth[e][t]=n}isNull(){if(0===arguments.length){for(let e=0;e<2;e++)for(let t=0;t<3;t++)if(this._depth[e][t]!==Gn.NULL_VALUE)return!1;return!0}if(1===arguments.length){const e=arguments[0];return this._depth[e][1]===Gn.NULL_VALUE}if(2===arguments.length){const e=arguments[0],t=arguments[1];return this._depth[e][t]===Gn.NULL_VALUE}}normalize(){for(let e=0;e<2;e++)if(!this.isNull(e)){let t=this._depth[e][1];this._depth[e][2]t&&(i=1),this._depth[e][n]=i}}}getDelta(e){return this._depth[e][at.RIGHT]-this._depth[e][at.LEFT]}getLocation(e,t){return this._depth[e][t]<=0?st.EXTERIOR:st.INTERIOR}toString(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}add(){if(1===arguments.length){const e=arguments[0];for(let t=0;t<2;t++)for(let n=1;n<3;n++){const i=e.getLocation(t,n);i!==st.EXTERIOR&&i!==st.INTERIOR||(this.isNull(t,n)?this._depth[t][n]=Gn.depthAtLocation(i):this._depth[t][n]+=Gn.depthAtLocation(i))}}else if(3===arguments.length){const e=arguments[0],t=arguments[1];arguments[2]===st.INTERIOR&&this._depth[e][t]++}}}Gn.NULL_VALUE=-1;class zn extends xt{constructor(){super(),zn.constructor_.apply(this,arguments)}static constructor_(){if(this.pts=null,this._env=null,this.eiList=new Ln(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Gn,this._depthDelta=0,1===arguments.length){const e=arguments[0];zn.constructor_.call(this,e,null)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this.pts=e,this._label=t}}static updateIM(){if(!(2===arguments.length&&arguments[1]instanceof On&&arguments[0]instanceof _t))return super.updateIM.apply(this,arguments);{const e=arguments[0],t=arguments[1];t.setAtLeastIfValid(e.getLocation(0,at.ON),e.getLocation(1,at.ON),1),e.isArea()&&(t.setAtLeastIfValid(e.getLocation(0,at.LEFT),e.getLocation(1,at.LEFT),2),t.setAtLeastIfValid(e.getLocation(0,at.RIGHT),e.getLocation(1,at.RIGHT),2))}}getDepth(){return this._depth}getCollapsedEdge(){const e=new Array(2).fill(null);e[0]=this.pts[0],e[1]=this.pts[1];return new zn(e,_t.toLineLabel(this._label))}isIsolated(){return this._isIsolated}getCoordinates(){return this.pts}setIsolated(e){this._isIsolated=e}setName(e){this._name=e}equals(e){if(!(e instanceof zn))return!1;const t=e;if(this.pts.length!==t.pts.length)return!1;let n=!0,i=!0,r=this.pts.length;for(let e=0;e0?this.pts[0]:null;if(1===arguments.length){const e=arguments[0];return this.pts[e]}}print(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(let t=0;t0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(") "+this._label+" "+this._depthDelta)}computeIM(e){zn.updateIM(this._label,e)}isCollapsed(){return!!this._label.isArea()&&(3===this.pts.length&&!!this.pts[0].equals(this.pts[2]))}isClosed(){return this.pts[0].equals(this.pts[this.pts.length-1])}getMaximumSegmentIndex(){return this.pts.length-1}getDepthDelta(){return this._depthDelta}getNumPoints(){return this.pts.length}printReverse(e){e.print("edge "+this._name+": ");for(let t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")}getMonotoneChainEdge(){return null===this._mce&&(this._mce=new Bn(this)),this._mce}getEnvelope(){if(null===this._env){this._env=new E;for(let e=0;e0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(") "+this._label+" "+this._depthDelta),e.toString()}isPointwiseEqual(e){if(this.pts.length!==e.pts.length)return!1;for(let t=0;ti||this._maxyo;if(s)return!1;const a=this.intersectsToleranceSquare(e,t);return x.isTrue(!(s&&a),"Found bad envelope test"),a}initCorners(e){const t=.5;this._minx=e.x-t,this._maxx=e.x+t,this._miny=e.y-t,this._maxy=e.y+t,this._corner[0]=new I(this._maxx,this._maxy),this._corner[1]=new I(this._minx,this._maxy),this._corner[2]=new I(this._minx,this._miny),this._corner[3]=new I(this._maxx,this._miny)}intersects(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}scale(e){return Math.round(e*this._scaleFactor)}getCoordinate(){return this._originalPt}copyScaled(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)}getSafeEnvelope(){if(null===this._safeEnv){const e=jn.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new E(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv}intersectsPixelClosure(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))}intersectsToleranceSquare(e,t){let n=!1,i=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!i)||(!!e.equals(this._pt)||!!t.equals(this._pt))))))}addSnappedNode(e,t){const n=e.getCoordinate(t),i=e.getCoordinate(t+1);return!!this.intersects(n,i)&&(e.addIntersection(this.getCoordinate(),t),!0)}}jn.SAFE_ENV_EXPANSION_FACTOR=.75;class Vn{constructor(){Vn.constructor_.apply(this,arguments)}static constructor_(){this.selectedSegment=new it}select(){if(1===arguments.length);else if(2===arguments.length){const e=arguments[1];arguments[0].getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}}class Yn{constructor(){Yn.constructor_.apply(this,arguments)}static constructor_(){this._index=null;const e=arguments[0];this._index=e}snap(){if(1===arguments.length){const e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=e.getSafeEnvelope(),r=new qn(e,t,n);return this._index.query(i,new class{get interfaces_(){return[Vt]}visitItem(e){e.select(i,r)}}),r.isNodeAdded()}}}class qn extends Vn{constructor(){super(),qn.constructor_.apply(this,arguments)}static constructor_(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._hotPixel=e,this._parentEdge=t,this._hotPixelVertexIndex=n}isNodeAdded(){return this._isNodeAdded}select(){if(!(2===arguments.length&&Number.isInteger(arguments[1])&&arguments[0]instanceof sn))return super.select.apply(this,arguments);{const e=arguments[1],t=arguments[0].getContext();if(this._parentEdge===t&&(e===this._hotPixelVertexIndex||e+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(t,e)}}}Yn.HotPixelSnapAction=qn;class Kn{constructor(){Kn.constructor_.apply(this,arguments)}static constructor_(){this._li=null,this._interiorIntersections=null;const e=arguments[0];this._li=e,this._interiorIntersections=new j}processIntersections(e,t,n,i){if(e===n&&t===i)return null;const r=e.getCoordinates()[t],o=e.getCoordinates()[t+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(let e=0;e0?t:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)}bufferFixedPrecision(e){const t=new Hn(new Xn(new Ae(1)),e.getScale()),n=new Wn(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)}bufferReducedPrecision(){if(0===arguments.length){for(let e=Jn.MAX_PRECISION_DIGITS;e>=0;e--){try{this.bufferReducedPrecision(e)}catch(e){if(!(e instanceof ut))throw e;this._saveException=e}if(null!==this._resultGeometry)return null}throw this._saveException}if(1===arguments.length){const e=arguments[0],t=Jn.precisionScaleFactor(this._argGeom,this._distance,e),n=new Ae(t);this.bufferFixedPrecision(n)}}computeGeometry(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;const e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Ae.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()}setQuadrantSegments(e){this._bufParams.setQuadrantSegments(e)}bufferOriginalPrecision(){try{const e=new Wn(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof b))throw e;this._saveException=e}}getResultGeometry(e){return this._distance=e,this.computeGeometry(),this._resultGeometry}setEndCapStyle(e){this._bufParams.setEndCapStyle(e)}}Jn.CAP_ROUND=ot.CAP_ROUND,Jn.CAP_BUTT=ot.CAP_FLAT,Jn.CAP_FLAT=ot.CAP_FLAT,Jn.CAP_SQUARE=ot.CAP_SQUARE,Jn.MAX_PRECISION_DIGITS=12;class Zn{isInBoundary(e){}}class Qn{isInBoundary(e){return e%2==1}get interfaces_(){return[Zn]}}class $n{isInBoundary(e){return e>0}get interfaces_(){return[Zn]}}class ei{isInBoundary(e){return e>1}get interfaces_(){return[Zn]}}class ti{isInBoundary(e){return 1===e}get interfaces_(){return[Zn]}}Zn.Mod2BoundaryNodeRule=Qn,Zn.EndPointBoundaryNodeRule=$n,Zn.MultiValentEndPointBoundaryNodeRule=ei,Zn.MonoValentEndPointBoundaryNodeRule=ti,Zn.MOD2_BOUNDARY_RULE=new Qn,Zn.ENDPOINT_BOUNDARY_RULE=new $n,Zn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE=new ei,Zn.MONOVALENT_ENDPOINT_BOUNDARY_RULE=new ti,Zn.OGC_SFS_BOUNDARY_RULE=Zn.MOD2_BOUNDARY_RULE;class ni{constructor(){ni.constructor_.apply(this,arguments)}static constructor_(){if(this._boundaryRule=Zn.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){const e=arguments[0];if(null===e)throw new h("Rule must be non-null");this._boundaryRule=e}}locateInPolygonRing(e,t){return t.getEnvelopeInternal().intersects(e)?ft.locateInRing(e,t.getCoordinates()):st.EXTERIOR}intersects(e,t){return this.locate(e,t)!==st.EXTERIOR}updateLocationInfo(e){e===st.INTERIOR&&(this._isIn=!0),e===st.BOUNDARY&&this._numBoundaries++}computeLocation(e,t){if(t instanceof X&&this.updateLocationInfo(this.locateOnPoint(e,t)),t instanceof G)this.updateLocationInfo(this.locateOnLineString(e,t));else if(t instanceof oe)this.updateLocationInfo(this.locateInPolygon(e,t));else if(t instanceof Ne){const n=t;for(let t=0;t0||this._isIn?st.INTERIOR:st.EXTERIOR)}}class ii{constructor(){ii.constructor_.apply(this,arguments)}static constructor_(){this._pts=null,this._data=null;const e=arguments[0],t=arguments[1];this._pts=e,this._data=t}getCoordinates(){return this._pts}size(){return this._pts.length}getCoordinate(e){return this._pts[e]}isClosed(){return this._pts[0].equals(this._pts[this._pts.length-1])}getSegmentOctant(e){return e===this._pts.length-1?-1:en.octant(this.getCoordinate(e),this.getCoordinate(e+1))}setData(e){this._data=e}getData(){return this._data}toString(){return et.toLineString(new xe(this._pts))}get interfaces_(){return[tn]}}class ri{constructor(){ri.constructor_.apply(this,arguments)}static constructor_(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._keepIntersections=!0,this._isInteriorIntersectionsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0;const e=arguments[0];this._li=e,this._interiorIntersection=null}static createAllIntersectionsFinder(e){const t=new ri(e);return t.setFindAllIntersections(!0),t}static isInteriorVertexIntersection(){if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[3];return(!arguments[2]||!n)&&!!e.equals2D(t)}if(8===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3],r=arguments[4],o=arguments[5],s=arguments[6],a=arguments[7];return!!ri.isInteriorVertexIntersection(e,n,r,s)||(!!ri.isInteriorVertexIntersection(e,i,r,a)||(!!ri.isInteriorVertexIntersection(t,n,o,s)||!!ri.isInteriorVertexIntersection(t,i,o,a)))}}static createInteriorIntersectionCounter(e){const t=new ri(e);return t.setInteriorIntersectionsOnly(!0),t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t}static createIntersectionCounter(e){const t=new ri(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t}static isEndSegment(e,t){return 0===t||t>=e.size()-2}static createAnyIntersectionFinder(e){return new ri(e)}static createInteriorIntersectionsFinder(e){const t=new ri(e);return t.setFindAllIntersections(!0),t.setInteriorIntersectionsOnly(!0),t}setCheckEndSegmentsOnly(e){this._isCheckEndSegmentsOnly=e}getIntersectionSegments(){return this._intSegments}count(){return this._intersectionCount}getIntersections(){return this._intersections}setFindAllIntersections(e){this._findAllIntersections=e}setKeepIntersections(e){this._keepIntersections=e}getIntersection(){return this._interiorIntersection}processIntersections(e,t,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;const r=e===n;if(r&&t===i)return null;if(this._isCheckEndSegmentsOnly){if(!(ri.isEndSegment(e,t)||ri.isEndSegment(n,i)))return null}const o=e.getCoordinate(t),s=e.getCoordinate(t+1),a=n.getCoordinate(i),l=n.getCoordinate(i+1),c=0===t,h=t+2===e.size(),u=0===i,d=i+2===n.size();this._li.computeIntersection(o,s,a,l);const m=this._li.hasIntersection()&&this._li.isInteriorIntersection();let g=!1;if(!this._isInteriorIntersectionsOnly){g=!(r&&Math.abs(i-t)<=1)&&ri.isInteriorVertexIntersection(o,s,a,l,c,h,u,d)}(m||g)&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=s,this._intSegments[2]=a,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)}hasIntersection(){return null!==this._interiorIntersection}isDone(){return!this._findAllIntersections&&null!==this._interiorIntersection}setInteriorIntersectionsOnly(e){this._isInteriorIntersectionsOnly=e}get interfaces_(){return[Dn]}}class oi{constructor(){oi.constructor_.apply(this,arguments)}static constructor_(){this._li=new nt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;const e=arguments[0];this._segStrings=e}static computeIntersections(e){const t=new oi(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()}execute(){if(null!==this._segInt)return null;this.checkInteriorIntersections()}getIntersections(){return this._segInt.getIntersections()}isValid(){return this.execute(),this._isValid}setFindAllIntersections(e){this._findAllIntersections=e}checkInteriorIntersections(){this._isValid=!0,this._segInt=new ri(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);const e=new hn;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null}checkValid(){if(this.execute(),!this._isValid)throw new ut(this.getErrorMessage(),this._segInt.getIntersection())}getErrorMessage(){if(this._isValid)return"no intersections found";const e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+et.toLineString(e[0],e[1])+" and "+et.toLineString(e[2],e[3])}}class si{constructor(){si.constructor_.apply(this,arguments)}static constructor_(){this._nv=null;const e=arguments[0];this._nv=new oi(si.toSegmentStrings(e))}static toSegmentStrings(e){const t=new j;for(let n=e.iterator();n.hasNext();){const e=n.next();t.add(new ii(e.getCoordinates(),e))}return t}static checkValid(e){new si(e).checkValid()}checkValid(){this._nv.checkValid()}}class ai{constructor(){ai.constructor_.apply(this,arguments)}static constructor_(){this._mapOp=null;const e=arguments[0];this._mapOp=e}static map(e,t){return new ai(t).map(e)}map(e){const t=new j;for(let n=0;n=0&&e.add(r+1,new I(n),!1)}}findSegmentIndexToSnap(e,t){let n=_.MAX_VALUE,i=-1;for(let r=0;rt&&(t=e)}return t}if(2===arguments.length){const e=arguments[0],t=arguments[1];return Math.min(di.computeOverlaySnapTolerance(e),di.computeOverlaySnapTolerance(t))}}static computeSizeBasedSnapTolerance(e){const t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*di.SNAP_PRECISION_FACTOR}static snapToSelf(e,t,n){return new di(e).snapToSelf(t,n)}snapTo(e,t){const n=this.extractTargetCoordinates(e);return new mi(t,n).transform(this._srcGeom)}snapToSelf(e,t){const n=this.extractTargetCoordinates(this._srcGeom),i=new mi(e,n,!0).transform(this._srcGeom);let r=i;return t&&N(r,re)&&(r=i.buffer(0)),r}computeSnapTolerance(e){return this.computeMinimumSegmentLength(e)/10}extractTargetCoordinates(e){const t=new le,n=e.getCoordinates();for(let e=0;e>>20}static zeroLowerBits(e,t){let n="low";if(t>32&&(e.low=0,t%=32,n="high"),t>0){const i=t<32?~((1<=0;i--){if(gi.getBit(e,i)!==gi.getBit(t,i))return n;n++}return 52}}class fi{constructor(){fi.constructor_.apply(this,arguments)}static constructor_(){this._commonCoord=null,this._ccFilter=new pi}addCommonBits(e){const t=new _i(this._commonCoord);e.apply(t),e.geometryChanged()}removeCommonBits(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;const t=new I(this._commonCoord);t.x=-t.x,t.y=-t.y;const n=new _i(t);return e.apply(n),e.geometryChanged(),e}getCommonCoordinate(){return this._commonCoord}add(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()}}class pi{constructor(){pi.constructor_.apply(this,arguments)}static constructor_(){this._commonBitsX=new gi,this._commonBitsY=new gi}filter(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)}getCommonCoordinate(){return new I(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())}get interfaces_(){return[M]}}class _i{constructor(){_i.constructor_.apply(this,arguments)}static constructor_(){this.trans=null;const e=arguments[0];this.trans=e}filter(e,t){const n=e.getOrdinate(t,0)+this.trans.x,i=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,i)}isDone(){return!1}isGeometryChanged(){return!0}get interfaces_(){return[B]}}fi.CommonCoordinateFilter=pi,fi.Translater=_i;class yi{constructor(){yi.constructor_.apply(this,arguments)}static constructor_(){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null;const e=arguments[0],t=arguments[1];this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()}static overlayOp(e,t,n){return new yi(e,t).getResultGeometry(n)}static union(e,t){return yi.overlayOp(e,t,Oi.UNION)}static intersection(e,t){return yi.overlayOp(e,t,Oi.INTERSECTION)}static symDifference(e,t){return yi.overlayOp(e,t,Oi.SYMDIFFERENCE)}static difference(e,t){return yi.overlayOp(e,t,Oi.DIFFERENCE)}selfSnap(e){return new di(e).snapTo(e,this._snapTolerance)}removeCommonBits(e){this._cbr=new fi,this._cbr.add(e[0]),this._cbr.add(e[1]);const t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t}prepareResult(e){return this._cbr.addCommonBits(e),e}getResultGeometry(e){const t=this.snap(this._geom),n=Oi.overlayOp(t[0],t[1],e);return this.prepareResult(n)}checkValid(e){e.isValid()||ye.out.println("Snapped geometry is invalid")}computeSnapTolerance(){this._snapTolerance=di.computeOverlaySnapTolerance(this._geom[0],this._geom[1])}snap(e){const t=this.removeCommonBits(e);return di.snap(t[0],t[1],this._snapTolerance)}}class bi{constructor(){bi.constructor_.apply(this,arguments)}static constructor_(){this._geom=new Array(2).fill(null);const e=arguments[0],t=arguments[1];this._geom[0]=e,this._geom[1]=t}static overlayOp(e,t,n){return new bi(e,t).getResultGeometry(n)}static union(e,t){return bi.overlayOp(e,t,Oi.UNION)}static intersection(e,t){return bi.overlayOp(e,t,Oi.INTERSECTION)}static symDifference(e,t){return bi.overlayOp(e,t,Oi.SYMDIFFERENCE)}static difference(e,t){return bi.overlayOp(e,t,Oi.DIFFERENCE)}getResultGeometry(e){let t=null,n=!1,i=null;try{t=Oi.overlayOp(this._geom[0],this._geom[1],e);!0&&(n=!0)}catch(e){if(!(e instanceof b))throw e;i=e}if(!n)try{t=yi.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof b?i:e}return t}}class Ci{constructor(){Ci.constructor_.apply(this,arguments)}static constructor_(){this.mce=null,this.chainIndex=null;const e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t}computeIntersections(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)}}class xi{constructor(){xi.constructor_.apply(this,arguments)}static constructor_(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){const e=arguments[0],t=arguments[1];this._eventType=xi.DELETE,this._xValue=e,this._insertEvent=t}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];this._eventType=xi.INSERT,this._label=e,this._xValue=t,this._obj=n}}isDelete(){return this._eventType===xi.DELETE}setDeleteEventIndex(e){this._deleteEventIndex=e}getObject(){return this._obj}compareTo(e){const t=e;return this._xValuet._xValue?1:this._eventTypet._eventType?1:0}getInsertEvent(){return this._insertEvent}isInsert(){return this._eventType===xi.INSERT}isSameLabel(e){return null!==this._label&&this._label===e._label}getDeleteEventIndex(){return this._deleteEventIndex}get interfaces_(){return[d]}}xi.INSERT=1,xi.DELETE=2;class vi{constructor(){vi.constructor_.apply(this,arguments)}static constructor_(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;const e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n}static isAdjacentSegments(e,t){return 1===Math.abs(e-t)}isTrivialIntersection(e,t,n,i){if(e===n&&1===this._li.getIntersectionNum()){if(vi.isAdjacentSegments(t,i))return!0;if(e.isClosed()){const n=e.getNumPoints()-1;if(0===t&&i===n||0===i&&t===n)return!0}}return!1}getProperIntersectionPoint(){return this._properIntersectionPoint}setIsDoneIfProperInt(e){this._isDoneWhenProperInt=e}hasProperInteriorIntersection(){return this._hasProperInterior}isBoundaryPointInternal(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next().getCoordinate();if(e.isIntersection(t))return!0}return!1}hasProperIntersection(){return this._hasProper}hasIntersection(){return this._hasIntersection}isDone(){return this._isDone}isBoundaryPoint(e,t){return null!==t&&(!!this.isBoundaryPointInternal(e,t[0])||!!this.isBoundaryPointInternal(e,t[1]))}setBoundaryNodes(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t}addIntersections(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;const r=e.getCoordinates()[t],o=e.getCoordinates()[t+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))}}class Si extends class{}{constructor(){super(),Si.constructor_.apply(this,arguments)}static constructor_(){this.events=new j,this.nOverlaps=null}prepareEvents(){Ht.sort(this.events);for(let e=0;et||this._maxo?1:0}get interfaces_(){return[y]}};class Ii extends Ti{constructor(){super(),Ii.constructor_.apply(this,arguments)}static constructor_(){this._item=null;const e=arguments[0],t=arguments[1],n=arguments[2];this._min=e,this._max=t,this._item=n}query(e,t,n){if(!this.intersects(e,t))return null;n.visitItem(this._item)}}class wi extends Ti{constructor(){super(),wi.constructor_.apply(this,arguments)}static constructor_(){this._node1=null,this._node2=null;const e=arguments[0],t=arguments[1];this._node1=e,this._node2=t,this.buildExtent(this._node1,this._node2)}buildExtent(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)}query(e,t,n){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,n),null!==this._node2&&this._node2.query(e,t,n)}}class Ei{constructor(){Ei.constructor_.apply(this,arguments)}static constructor_(){this._leaves=new j,this._root=null,this._level=0}buildTree(){Ht.sort(this._leaves,new Ti.NodeComparator);let e=this._leaves,t=null,n=new j;for(;;){if(this.buildLevel(e,n),1===n.size())return n.get(0);t=e,e=n,n=t}}insert(e,t,n){if(null!==this._root)throw new IllegalStateException("Index cannot be added to once it has been queried");this._leaves.add(new Ii(e,t,n))}query(e,t,n){if(this.init(),null===this._root)return null;this._root.query(e,t,n)}buildRoot(){if(null!==this._root)return null;this._root=this.buildTree()}printNode(e){ye.out.println(et.toLineString(new I(e._min,this._level),new I(e._max,this._level)))}init(){return null!==this._root||0===this._leaves.size()?null:void this.buildRoot()}buildLevel(e,t){this._level++,t.clear();for(let n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])}getInvalidPoint(){return this._invalidPoint}getBoundaryPoints(){const e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null);let n=0;for(let i=e.iterator();i.hasNext();){const e=i.next();t[n++]=e.getCoordinate().copy()}return t}getBoundaryNodes(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes}addSelfIntersectionNode(e,t,n){if(this.isBoundaryNode(e,t))return null;n===st.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,n)}addPolygonRing(e,t,n){if(e.isEmpty())return null;const i=be.removeRepeatedPoints(e.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;let r=t,o=n;ie.isCCW(i)&&(r=n,o=t);const s=new zn(i,new _t(this._argIndex,st.BOUNDARY,r,o));this._lineEdgeMap.put(e,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],st.BOUNDARY)}insertPoint(e,t,n){const i=this._nodes.addNode(t),r=i.getLabel();null===r?i._label=new _t(e,n):r.setLocation(e,n)}createEdgeSetIntersector(){return new Si}addSelfIntersectionNodes(e){for(let t=this._edges.iterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.eiList.iterator();t.hasNext();){const n=t.next();this.addSelfIntersectionNode(e,n.coord,i)}}}add(){if(!(1===arguments.length&&arguments[0]instanceof A))return super.add.apply(this,arguments);{const e=arguments[0];if(e.isEmpty())return null;if(e instanceof Se&&(this._useBoundaryDeterminationRule=!1),e instanceof oe)this.addPolygon(e);else if(e instanceof G)this.addLineString(e);else if(e instanceof X)this.addPoint(e);else if(e instanceof ue)this.addCollection(e);else if(e instanceof Ne)this.addCollection(e);else if(e instanceof Se)this.addCollection(e);else{if(!(e instanceof he))throw new L(e.getGeometryType());this.addCollection(e)}}}addCollection(e){for(let t=0;t50?(null===this._areaPtLocator&&(this._areaPtLocator=new Ni(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)}findEdge(){if(1===arguments.length&&arguments[0]instanceof G){const e=arguments[0];return this._lineEdgeMap.get(e)}return super.findEdge.apply(this,arguments)}}class Li{constructor(){Li.constructor_.apply(this,arguments)}static constructor_(){if(this._li=new nt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){const e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Pi(0,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];Li.constructor_.call(this,e,t,Zn.OGC_SFS_BOUNDARY_RULE)}else if(3===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2];e.getPrecisionModel().compareTo(t.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Pi(0,e,n),this._arg[1]=new Pi(1,t,n)}}getArgGeometry(e){return this._arg[e].getGeometry()}setComputationPrecision(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)}}class Oi extends Li{constructor(){super(),Oi.constructor_.apply(this,arguments)}static constructor_(){this._ptLocator=new ni,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Nn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j;const e=arguments[0],t=arguments[1];Li.constructor_.call(this,e,t),this._graph=new Ot(new An),this._geomFact=e.getFactory()}static overlayOp(e,t,n){return new Oi(e,t).getResultGeometry(n)}static union(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Oi.createEmptyResult(Oi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return bi.overlayOp(e,t,Oi.UNION)}static intersection(e,t){if(e.isEmpty()||t.isEmpty())return Oi.createEmptyResult(Oi.INTERSECTION,e,t,e.getFactory());if(e.isGeometryCollection()){const n=t;return ai.map(e,new class{get interfaces_(){return[MapOp]}map(e){return Oi.intersection(e,n)}})}return bi.overlayOp(e,t,Oi.INTERSECTION)}static symDifference(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Oi.createEmptyResult(Oi.SYMDIFFERENCE,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return bi.overlayOp(e,t,Oi.SYMDIFFERENCE)}static resultDimension(e,t,n){const i=t.getDimension(),r=n.getDimension();let o=-1;switch(e){case Oi.INTERSECTION:o=Math.min(i,r);break;case Oi.UNION:o=Math.max(i,r);break;case Oi.DIFFERENCE:o=i;break;case Oi.SYMDIFFERENCE:o=Math.max(i,r)}return o}static createEmptyResult(e,t,n,i){const r=Oi.resultDimension(e,t,n);return i.createEmpty(r)}static difference(e,t){if(e.isEmpty())return Oi.createEmptyResult(Oi.DIFFERENCE,e,t,e.getFactory());if(t.isEmpty())return e.copy();if(e.isGeometryCollection()||t.isGeometryCollection())throw new h("This method does not support GeometryCollection arguments");return bi.overlayOp(e,t,Oi.DIFFERENCE)}static isResultOfOp(){if(2===arguments.length){const e=arguments[0],t=arguments[1],n=e.getLocation(0),i=e.getLocation(1);return Oi.isResultOfOp(n,i,t)}if(3===arguments.length){let e=arguments[0],t=arguments[1],n=arguments[2];switch(e===st.BOUNDARY&&(e=st.INTERIOR),t===st.BOUNDARY&&(t=st.INTERIOR),n){case Oi.INTERSECTION:return e===st.INTERIOR&&t===st.INTERIOR;case Oi.UNION:return e===st.INTERIOR||t===st.INTERIOR;case Oi.DIFFERENCE:return e===st.INTERIOR&&t!==st.INTERIOR;case Oi.SYMDIFFERENCE:return e===st.INTERIOR&&t!==st.INTERIOR||e!==st.INTERIOR&&t===st.INTERIOR}return!1}}insertUniqueEdge(e){const t=this._edgeList.findEqualEdge(e);if(null!==t){const n=t.getLabel();let i=e.getLabel();t.isPointwiseEqual(e)||(i=new _t(e.getLabel()),i.flip());const r=t.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(e)}getGraph(){return this._graph}cancelDuplicateResultEdges(){for(let e=this._graph.getEdgeEnds().iterator();e.hasNext();){const t=e.next(),n=t.getSym();t.isInResult()&&n.isInResult()&&(t.setInResult(!1),n.setInResult(!1))}}isCoveredByLA(e){return!!this.isCovered(e,this._resultLineList)||!!this.isCovered(e,this._resultPolyList)}computeGeometry(e,t,n,i){const r=new j;return r.addAll(e),r.addAll(t),r.addAll(n),r.isEmpty()?Oi.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(r)}mergeSymLabels(){for(let e=this._graph.getNodes().iterator();e.hasNext();){e.next().getEdges().mergeSymLabels()}}isCovered(e,t){for(let n=t.iterator();n.hasNext();){const t=n.next();if(this._ptLocator.locate(e,t)!==st.EXTERIOR)return!0}return!1}replaceCollapsedEdges(){const e=new j;for(let t=this._edgeList.iterator();t.hasNext();){const n=t.next();n.isCollapsed()&&(t.remove(),e.add(n.getCollapsedEdge()))}this._edgeList.addAll(e)}updateNodeLabelling(){for(let e=this._graph.getNodes().iterator();e.hasNext();){const t=e.next(),n=t.getEdges().getLabel();t.getLabel().merge(n)}}getResultGeometry(e){return this.computeOverlay(e),this._resultGeom}insertUniqueEdges(e){for(let t=e.iterator();t.hasNext();){const e=t.next();this.insertUniqueEdge(e)}}computeOverlay(e){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);const t=new j;this._arg[0].computeSplitEdges(t),this._arg[1].computeSplitEdges(t),this.insertUniqueEdges(t),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),si.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(e),this.cancelDuplicateResultEdges();const n=new Ft(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();const i=new li(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(e);const r=new ci(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(e),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,e)}labelIncompleteNode(e,t){const n=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setLocation(t,n)}copyPoints(e){for(let t=this._arg[e].getNodeIterator();t.hasNext();){const n=t.next();this._graph.addNode(n.getCoordinate()).setLabel(e,n.getLabel().getLocation(e))}}findResultAreaEdges(e){for(let t=this._graph.getEdgeEnds().iterator();t.hasNext();){const n=t.next(),i=n.getLabel();i.isArea()&&!n.isInteriorAreaEdge()&&Oi.isResultOfOp(i.getLocation(0,at.RIGHT),i.getLocation(1,at.RIGHT),e)&&n.setInResult(!0)}}computeLabelsFromDepths(){for(let e=this._edgeList.iterator();e.hasNext();){const t=e.next(),n=t.getLabel(),i=t.getDepth();if(!i.isNull()){i.normalize();for(let e=0;e<2;e++)n.isNull(e)||!n.isArea()||i.isNull(e)||(0===i.getDelta(e)?n.toLine(e):(x.isTrue(!i.isNull(e,at.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(e,at.LEFT,i.getLocation(e,at.LEFT)),x.isTrue(!i.isNull(e,at.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(e,at.RIGHT,i.getLocation(e,at.RIGHT))))}}}computeLabelling(){for(let e=this._graph.getNodes().iterator();e.hasNext();){e.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()}labelIncompleteNodes(){for(let e=this._graph.getNodes().iterator();e.hasNext();){const t=e.next(),n=t.getLabel();t.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(t,0):this.labelIncompleteNode(t,1)),t.getEdges().updateLabelling(n)}}isCoveredByA(e){return!!this.isCovered(e,this._resultPolyList)}}Oi.INTERSECTION=1,Oi.UNION=2,Oi.DIFFERENCE=3,Oi.SYMDIFFERENCE=4;class Fi{createEdgeEndForNext(e,t,n,i){const r=n.segmentIndex+1;if(r>=e.getNumPoints()&&null===i)return null;let o=e.getCoordinate(r);null!==i&&i.segmentIndex===n.segmentIndex&&(o=i.coord);const s=new Rt(e,n.coord,o,new _t(e.getLabel()));t.add(s)}createEdgeEndForPrev(e,t,n,i){let r=n.segmentIndex;if(0===n.dist){if(0===r)return null;r--}let o=e.getCoordinate(r);null!==i&&i.segmentIndex>=r&&(o=i.coord);const s=new _t(e.getLabel());s.flip();const a=new Rt(e,n.coord,o,s);t.add(a)}computeEdgeEnds(){if(1===arguments.length){const e=arguments[0],t=new j;for(let n=e;n.hasNext();){const e=n.next();this.computeEdgeEnds(e,t)}return t}if(2===arguments.length){const e=arguments[0],t=arguments[1],n=e.getEdgeIntersectionList();n.addEndpoints();const i=n.iterator();let r=null,o=null;if(!i.hasNext())return null;let s=i.next();do{r=o,o=s,s=null,i.hasNext()&&(s=i.next()),null!==o&&(this.createEdgeEndForPrev(e,t,o,r),this.createEdgeEndForNext(e,t,o,s))}while(null!==o)}}}class ki extends Rt{constructor(){super(),ki.constructor_.apply(this,arguments)}static constructor_(){if(this._edgeEnds=new j,1===arguments.length){const e=arguments[0];ki.constructor_.call(this,null,e)}else if(2===arguments.length){const e=arguments[1];Rt.constructor_.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new _t(e.getLabel())),this.insert(e)}}insert(e){this._edgeEnds.add(e)}print(e){e.println("EdgeEndBundle--\x3e Label: "+this._label);for(let t=this.iterator();t.hasNext();){t.next().print(e),e.println()}}iterator(){return this._edgeEnds.iterator()}getEdgeEnds(){return this._edgeEnds}computeLabelOn(e,t){let n=0,i=!1;for(let t=this.iterator();t.hasNext();){const r=t.next().getLabel().getLocation(e);r===st.BOUNDARY&&n++,r===st.INTERIOR&&(i=!0)}let r=st.NONE;i&&(r=st.INTERIOR),n>0&&(r=Pi.determineBoundary(t,n)),this._label.setLocation(e,r)}computeLabelSide(e,t){for(let n=this.iterator();n.hasNext();){const i=n.next();if(i.getLabel().isArea()){const n=i.getLabel().getLocation(e,t);if(n===st.INTERIOR)return this._label.setLocation(e,t,st.INTERIOR),null;n===st.EXTERIOR&&this._label.setLocation(e,t,st.EXTERIOR)}}}getLabel(){return this._label}computeLabelSides(e){this.computeLabelSide(e,at.LEFT),this.computeLabelSide(e,at.RIGHT)}updateIM(e){zn.updateIM(this._label,e)}computeLabel(e){let t=!1;for(let e=this.iterator();e.hasNext();){e.next().getLabel().isArea()&&(t=!0)}this._label=t?new _t(st.NONE,st.NONE,st.NONE):new _t(st.NONE);for(let n=0;n<2;n++)this.computeLabelOn(n,e),t&&this.computeLabelSides(n)}}class Bi extends wn{constructor(){super()}updateIM(e){for(let t=this.iterator();t.hasNext();){t.next().updateIM(e)}}insert(e){let t=this._edgeMap.get(e);null===t?(t=new ki(e),this.insertEdgeEnd(e,t)):t.insert(e)}}class Gi extends vt{constructor(){super(),Gi.constructor_.apply(this,arguments)}static constructor_(){const e=arguments[0],t=arguments[1];vt.constructor_.call(this,e,t)}updateIMFromEdges(e){this._edges.updateIM(e)}computeIM(e){e.setAtLeastIfValid(this._label.getLocation(0),this._label.getLocation(1),0)}}class zi extends Lt{constructor(){super()}createNode(e){return new Gi(e,new Bi)}}class Wi{constructor(){Wi.constructor_.apply(this,arguments)}static constructor_(){this._li=new nt,this._ptLocator=new ni,this._arg=null,this._nodes=new Nt(new zi),this._im=null,this._isolatedEdges=new j,this._invalidPoint=null;const e=arguments[0];this._arg=e}insertEdgeEnds(e){for(let t=e.iterator();t.hasNext();){const e=t.next();this._nodes.add(e)}}computeProperIntersectionIM(e,t){const n=this._arg[0].getGeometry().getDimension(),i=this._arg[1].getGeometry().getDimension(),r=e.hasProperIntersection(),o=e.hasProperInteriorIntersection();2===n&&2===i?r&&t.setAtLeast("212101212"):2===n&&1===i?(r&&t.setAtLeast("FFF0FFFF2"),o&&t.setAtLeast("1FFFFF1FF")):1===n&&2===i?(r&&t.setAtLeast("F0FFFFFF2"),o&&t.setAtLeast("1F1FFFFFF")):1===n&&1===i&&o&&t.setAtLeast("0FFFFFFFF")}labelIsolatedEdges(e,t){for(let n=this._arg[e].getEdgeIterator();n.hasNext();){const e=n.next();e.isIsolated()&&(this.labelIsolatedEdge(e,t,this._arg[t].getGeometry()),this._isolatedEdges.add(e))}}labelIsolatedEdge(e,t,n){if(n.getDimension()>0){const i=this._ptLocator.locate(e.getCoordinate(),n);e.getLabel().setAllLocations(t,i)}else e.getLabel().setAllLocations(t,st.EXTERIOR)}computeIM(){const e=new On;if(e.set(st.EXTERIOR,st.EXTERIOR,2),!this._arg[0].getGeometry().getEnvelopeInternal().intersects(this._arg[1].getGeometry().getEnvelopeInternal()))return this.computeDisjointIM(e),e;this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1);const t=this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!1);this.computeIntersectionNodes(0),this.computeIntersectionNodes(1),this.copyNodesAndLabels(0),this.copyNodesAndLabels(1),this.labelIsolatedNodes(),this.computeProperIntersectionIM(t,e);const n=new Fi,i=n.computeEdgeEnds(this._arg[0].getEdgeIterator());this.insertEdgeEnds(i);const r=n.computeEdgeEnds(this._arg[1].getEdgeIterator());return this.insertEdgeEnds(r),this.labelNodeEdges(),this.labelIsolatedEdges(0,1),this.labelIsolatedEdges(1,0),this.updateIM(e),e}labelNodeEdges(){for(let e=this._nodes.iterator();e.hasNext();){e.next().getEdges().computeLabelling(this._arg)}}copyNodesAndLabels(e){for(let t=this._arg[e].getNodeIterator();t.hasNext();){const n=t.next();this._nodes.addNode(n.getCoordinate()).setLabel(e,n.getLabel().getLocation(e))}}labelIntersectionNodes(e){for(let t=this._arg[e].getEdgeIterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.getEdgeIntersectionList().iterator();t.hasNext();){const n=t.next(),r=this._nodes.find(n.coord);r.getLabel().isNull(e)&&(i===st.BOUNDARY?r.setLabelBoundary(e):r.setLabel(e,st.INTERIOR))}}}labelIsolatedNode(e,t){const n=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setAllLocations(t,n)}computeIntersectionNodes(e){for(let t=this._arg[e].getEdgeIterator();t.hasNext();){const n=t.next(),i=n.getLabel().getLocation(e);for(let t=n.getEdgeIntersectionList().iterator();t.hasNext();){const n=t.next(),r=this._nodes.addNode(n.coord);i===st.BOUNDARY?r.setLabelBoundary(e):r.getLabel().isNull(e)&&r.setLabel(e,st.INTERIOR)}}}labelIsolatedNodes(){for(let e=this._nodes.iterator();e.hasNext();){const t=e.next(),n=t.getLabel();x.isTrue(n.getGeometryCount()>0,"node with empty label found"),t.isIsolated()&&(n.isNull(0)?this.labelIsolatedNode(t,0):this.labelIsolatedNode(t,1))}}updateIM(e){for(let t=this._isolatedEdges.iterator();t.hasNext();){t.next().updateIM(e)}for(let t=this._nodes.iterator();t.hasNext();){const n=t.next();n.updateIM(e),n.updateIMFromEdges(e)}}computeDisjointIM(e){const t=this._arg[0].getGeometry();t.isEmpty()||(e.set(st.INTERIOR,st.EXTERIOR,t.getDimension()),e.set(st.BOUNDARY,st.EXTERIOR,t.getBoundaryDimension()));const n=this._arg[1].getGeometry();n.isEmpty()||(e.set(st.EXTERIOR,st.INTERIOR,n.getDimension()),e.set(st.EXTERIOR,st.BOUNDARY,n.getBoundaryDimension()))}}class Hi{constructor(){Hi.constructor_.apply(this,arguments)}static constructor_(){this._rectEnv=null;const e=arguments[0];this._rectEnv=e.getEnvelopeInternal()}static contains(e,t){return new Hi(e).contains(t)}isContainedInBoundary(e){if(e instanceof oe)return!1;if(e instanceof X)return this.isPointContainedInBoundary(e);if(e instanceof G)return this.isLineStringContainedInBoundary(e);for(let t=0;t0){const n=e;e=t,t=n}let i=!1;return t.y>e.y&&(i=!0),i?this._li.computeIntersection(e,t,this._diagDown0,this._diagDown1):this._li.computeIntersection(e,t,this._diagUp0,this._diagUp1),!!this._li.hasIntersection()}}class ji{constructor(){ji.constructor_.apply(this,arguments)}static constructor_(){this._isDone=!1}applyTo(e){for(let t=0;t=this._rectEnv.getMinX()&&t.getMaxX()<=this._rectEnv.getMaxX()||t.getMinY()>=this._rectEnv.getMinY()&&t.getMaxY()<=this._rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null}intersects(){return this._intersects}}class qi extends ji{constructor(){super(),qi.constructor_.apply(this,arguments)}static constructor_(){this._rectSeq=null,this._rectEnv=null,this._containsPoint=!1;const e=arguments[0];this._rectSeq=e.getExteriorRing().getCoordinateSequence(),this._rectEnv=e.getEnvelopeInternal()}isDone(){return!0===this._containsPoint}visit(e){if(!(e instanceof oe))return null;const t=e.getEnvelopeInternal();if(!this._rectEnv.intersects(t))return null;const n=new I;for(let i=0;i<4;i++)if(this._rectSeq.getCoordinate(i,n),t.contains(n)&&In.containsPointInPolygon(n,e))return this._containsPoint=!0,null}containsPoint(){return this._containsPoint}}class Ki extends ji{constructor(){super(),Ki.constructor_.apply(this,arguments)}static constructor_(){this._rectEnv=null,this._rectIntersector=null,this._hasIntersection=!1,this._p0=new I,this._p1=new I;const e=arguments[0];this._rectEnv=e.getEnvelopeInternal(),this._rectIntersector=new Ui(this._rectEnv)}intersects(){return this._hasIntersection}isDone(){return!0===this._hasIntersection}visit(e){const t=e.getEnvelopeInternal();if(!this._rectEnv.intersects(t))return null;const n=Ai.getLines(e);this.checkIntersectionWithLineStrings(n)}checkIntersectionWithLineStrings(e){for(let t=e.iterator();t.hasNext();){const e=t.next();if(this.checkIntersectionWithSegments(e),this._hasIntersection)return null}}checkIntersectionWithSegments(e){const t=e.getCoordinateSequence();for(let e=1;e0)&&(!!e.getEnvelopeInternal().covers(t.getEnvelopeInternal())&&(!!e.isRectangle()||new Xi(e,t).getIntersectionMatrix().isCovers())))}static intersects(e,t){if(!e.getEnvelopeInternal().intersects(t.getEnvelopeInternal()))return!1;if(e.isRectangle())return Vi.intersects(e,t);if(t.isRectangle())return Vi.intersects(t,e);if(e.isGeometryCollection()||t.isGeometryCollection()){for(let n=0;n0)&&(!!e.getEnvelopeInternal().contains(t.getEnvelopeInternal())&&(e.isRectangle()?Hi.contains(e,t):new Xi(e,t).getIntersectionMatrix().isContains())))}getIntersectionMatrix(){return this._relate.computeIM()}}class Ji{get interfaces_(){return[]}getClass(){return Ji}static union(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Oi.createEmptyResult(Oi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),bi.overlayOp(e,t,Oi.UNION)}}class Zi{constructor(){Zi.constructor_.apply(this,arguments)}static constructor_(){this._geometryFactory=new De,this._geomGraph=null,this._disconnectedRingcoord=null;const e=arguments[0];this._geomGraph=e}static findDifferentPoint(e,t){for(let n=0;n1)return this._invalidPoint=e.getEdge().getCoordinate(0),!0}}return!1}isNodeConsistentArea(){const e=this._geomGraph.computeSelfNodes(this._li,!0,!0);return e.hasProperIntersection()?(this._invalidPoint=e.getProperIntersectionPoint(),!1):(this._nodeGraph.build(this._geomGraph),this.isNodeEdgeAreaLabelsConsistent())}}class er{constructor(){er.constructor_.apply(this,arguments)}static constructor_(){this._graph=null,this._rings=new j,this._totalEnv=new E,this._index=null,this._nestedPt=null;const e=arguments[0];this._graph=e}buildIndex(){this._index=new Kt;for(let e=0;e=1&&(t=e.getCoordinateN(0)),this._validErr=new tr(tr.RING_NOT_CLOSED,t)}}checkShellsNotNested(e,t){for(let n=0;n=t&&(e.getMinY()>=n&&(i=3),e.getMaxY()<=n&&(i=1)),e.getMaxX()<=t&&(e.getMinY()>=n&&(i=2),e.getMaxY()<=n&&(i=0)),i}hasChildren(){for(let e=0;e<4;e++)if(null!==this._subnode[e])return!0;return!1}isPrunable(){return!(this.hasChildren()||this.hasItems())}addAllItems(e){e.addAll(this._items);for(let t=0;t<4;t++)null!==this._subnode[t]&&this._subnode[t].addAllItems(e);return e}getNodeCount(){let e=0;for(let t=0;t<4;t++)null!==this._subnode[t]&&(e+=this._subnode[t].size());return e+1}size(){let e=0;for(let t=0;t<4;t++)null!==this._subnode[t]&&(e+=this._subnode[t].size());return e+this._items.size()}addAllItemsFromOverlapping(e,t){if(!this.isSearchMatch(e))return null;t.addAll(this._items);for(let n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].addAllItemsFromOverlapping(e,t)}visitItems(e,t){for(let e=this._items.iterator();e.hasNext();)t.visitItem(e.next())}hasItems(){return!this._items.isEmpty()}remove(e,t){if(!this.isSearchMatch(e))return!1;let n=!1;for(let i=0;i<4;i++)if(null!==this._subnode[i]&&(n=this._subnode[i].remove(e,t),n)){this._subnode[i].isPrunable()&&(this._subnode[i]=null);break}return n||(n=this._items.remove(t),n)}visit(e,t){if(!this.isSearchMatch(e))return null;this.visitItems(e,t);for(let n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].visit(e,t)}getItems(){return this._items}depth(){let e=0;for(let t=0;t<4;t++)if(null!==this._subnode[t]){const n=this._subnode[t].depth();n>e&&(e=n)}return e+1}isEmpty(){let e=!0;if(this._items.isEmpty()){for(let t=0;t<4;t++)if(null!==this._subnode[t]&&!this._subnode[t].isEmpty()){e=!1;break}}else e=!1;return e}add(e){this._items.add(e)}get interfaces_(){return[g]}}function rr(){}rr.exponent=function(e){return function(e,t){let n,i,r,o;const s={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}},a={32:8,64:11}[e];o||(n=t<0||1/t<0,isFinite(t)||(o=s[e],n&&(o.d+=1<=2;)i++,r/=2;for(;r<1&&i>0;)i--,r*=2;i<=0&&(r/=2),32===e&&i>254&&(o={d:n?255:127,c:128,b:0,a:0},i=Math.pow(2,a)-1,r=0)}return i}(64,e)-1023},rr.powerOf2=function(e){return Math.pow(2,e)};class or{constructor(){or.constructor_.apply(this,arguments)}static constructor_(){this._pt=new I,this._level=0,this._env=null;const e=arguments[0];this.computeKey(e)}static computeQuadLevel(e){const t=e.getWidth(),n=e.getHeight(),i=t>n?t:n;return rr.exponent(i)+1}getLevel(){return this._level}computeKey(){if(1===arguments.length){const e=arguments[0];for(this._level=or.computeQuadLevel(e),this._env=new E,this.computeKey(this._level,e);!this._env.contains(e);)this._level+=1,this.computeKey(this._level,e)}else if(2===arguments.length){const e=arguments[0],t=arguments[1],n=rr.powerOf2(e);this._pt.x=Math.floor(t.getMinX()/n)*n,this._pt.y=Math.floor(t.getMinY()/n)*n,this._env.init(this._pt.x,this._pt.x+n,this._pt.y,this._pt.y+n)}}getEnvelope(){return this._env}getCentre(){return new I((this._env.getMinX()+this._env.getMaxX())/2,(this._env.getMinY()+this._env.getMaxY())/2)}getPoint(){return this._pt}}class sr extends ir{constructor(){super(),sr.constructor_.apply(this,arguments)}static constructor_(){this._env=null,this._centrex=null,this._centrey=null,this._level=null;const e=arguments[0],t=arguments[1];this._env=e,this._level=t,this._centrex=(e.getMinX()+e.getMaxX())/2,this._centrey=(e.getMinY()+e.getMaxY())/2}static createNode(e){const t=new or(e);return new sr(t.getEnvelope(),t.getLevel())}static createExpanded(e,t){const n=new E(t);null!==e&&n.expandToInclude(e._env);const i=sr.createNode(n);return null!==e&&i.insertNode(e),i}find(e){const t=ir.getSubnodeIndex(e,this._centrex,this._centrey);if(-1===t)return this;if(null!==this._subnode[t]){return this._subnode[t].find(e)}return this}isSearchMatch(e){return null!==e&&this._env.intersects(e)}getSubnode(e){return null===this._subnode[e]&&(this._subnode[e]=this.createSubnode(e)),this._subnode[e]}getEnvelope(){return this._env}getNode(e){const t=ir.getSubnodeIndex(e,this._centrex,this._centrey);if(-1!==t){return this.getSubnode(t).getNode(e)}return this}createSubnode(e){let t=0,n=0,i=0,r=0;switch(e){case 0:t=this._env.getMinX(),n=this._centrex,i=this._env.getMinY(),r=this._centrey;break;case 1:t=this._centrex,n=this._env.getMaxX(),i=this._env.getMinY(),r=this._centrey;break;case 2:t=this._env.getMinX(),n=this._centrex,i=this._centrey,r=this._env.getMaxY();break;case 3:t=this._centrex,n=this._env.getMaxX(),i=this._centrey,r=this._env.getMaxY()}const o=new E(t,n,i,r);return new sr(o,this._level-1)}insertNode(e){x.isTrue(null===this._env||this._env.contains(e._env));const t=ir.getSubnodeIndex(e._env,this._centrex,this._centrey);if(e._level===this._level-1)this._subnode[t]=e;else{const n=this.createSubnode(t);n.insertNode(e),this._subnode[t]=n}}}class ar{static isZeroWidth(e,t){const n=t-e;if(0===n)return!0;const i=n/Math.max(Math.abs(e),Math.abs(t));return rr.exponent(i)<=ar.MIN_BINARY_EXPONENT}}ar.MIN_BINARY_EXPONENT=-50;class lr extends ir{constructor(){super()}insert(e,t){const n=ir.getSubnodeIndex(e,lr.origin.x,lr.origin.y);if(-1===n)return this.add(t),null;const i=this._subnode[n];if(null===i||!i.getEnvelope().contains(e)){const t=sr.createExpanded(i,e);this._subnode[n]=t}this.insertContained(this._subnode[n],e,t)}isSearchMatch(e){return!0}insertContained(e,t,n){x.isTrue(e.getEnvelope().contains(t));const i=ar.isZeroWidth(t.getMinX(),t.getMaxX()),r=ar.isZeroWidth(t.getMinY(),t.getMaxY());let o=null;o=i||r?e.find(t):e.getNode(t),o.add(n)}}lr.origin=new I(0,0);class cr{constructor(){cr.constructor_.apply(this,arguments)}static constructor_(){this._root=null,this._minExtent=1,this._root=new lr}static ensureExtent(e,t){let n=e.getMinX(),i=e.getMaxX(),r=e.getMinY(),o=e.getMaxY();return n!==i&&r!==o?e:(n===i&&(n-=t/2,i+=t/2),r===o&&(r-=t/2,o+=t/2),new E(n,i,r,o))}size(){return null!==this._root?this._root.size():0}insert(e,t){this.collectStats(e);const n=cr.ensureExtent(e,this._minExtent);this._root.insert(n,t)}query(){if(1===arguments.length){const e=arguments[0],t=new Mi;return this.query(e,t),t.getItems()}if(2===arguments.length){const e=arguments[0],t=arguments[1];this._root.visit(e,t)}}queryAll(){const e=new j;return this._root.addAllItems(e),e}remove(e,t){const n=cr.ensureExtent(e,this._minExtent);return this._root.remove(n,t)}collectStats(e){const t=e.getWidth();t0&&(this._minExtent=t);const n=e.getHeight();n0&&(this._minExtent=n)}depth(){return null!==this._root?this._root.depth():0}isEmpty(){return null===this._root||this._root.isEmpty()}get interfaces_(){return[zt,g]}}class hr extends it{constructor(){super(),hr.constructor_.apply(this,arguments)}static constructor_(){if(this._parent=null,this._index=null,2===arguments.length){const e=arguments[0],t=arguments[1];hr.constructor_.call(this,e,t,null,-1)}else if(4===arguments.length){const e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];it.constructor_.call(this,e,t),this._parent=n,this._index=i}}getIndex(){return this._index}getParent(){return this._parent}}class ur{constructor(){ur.constructor_.apply(this,arguments)}static constructor_(){if(this._parentLine=null,this._segs=null,this._resultSegs=new j,this._minimumSize=null,1===arguments.length){const e=arguments[0];ur.constructor_.call(this,e,2)}else if(2===arguments.length){const e=arguments[0],t=arguments[1];this._parentLine=e,this._minimumSize=t,this.init()}}static extractCoordinates(e){const t=new Array(e.size()+1).fill(null);let n=null;for(let i=0;i=t[0]&&ithis._distanceTolerance&&(r=!1);const a=new it;if(a.p0=this._linePts[e],a.p1=this._linePts[t],i[0]=e,i[1]=t,this.hasBadIntersection(this._line,i,a)&&(r=!1),r){const n=this.flatten(e,t);return this._line.addToResult(n),null}this.simplifySection(e,s,n),this.simplifySection(s,t,n)}hasBadOutputIntersection(e){for(let t=this._outputIndex.query(e).iterator();t.hasNext();){const n=t.next();if(this.hasInteriorIntersection(n,e))return!0}return!1}findFurthestPoint(e,t,n,i){const r=new it;r.p0=e[t],r.p1=e[n];let o=-1,s=t;for(let i=t+1;io&&(o=n,s=i)}return i[0]=o,s}simplify(e){this._line=e,this._linePts=e.getParentCoordinates(),this.simplifySection(0,this._linePts.length-1,0)}remove(e,t,n){for(let i=t;i2*Math.PI)&&(a=2*Math.PI);const l=a/(this._nPts-1),c=new Array(this._nPts).fill(null);let h=0;for(let t=0;t2*Math.PI)&&(a=2*Math.PI);const l=a/(this._nPts-1),c=new Array(this._nPts+2).fill(null);let h=0;c[h++]=this.coord(o,s);for(let t=0;tnr.isValid(e),Tr=(e,t)=>Xi.intersects(e,t),Ir=(e,t)=>Ji.union(e,t),wr=(e,t)=>Xi.contains(e,t),Er=(e,t)=>Jn.bufferOp(e,t).norm(),Ar=e=>{if(!e)return null;const t=new Ae,n=new De(t);return new et(n).write(e)},Mr=e=>{const t=new rt,n=Nr(e);return t.read(n)},Nr=e=>{const t=[e.x,e.y,e.x+e.width,e.y,e.x+e.width,e.y+e.height,e.x,e.y+e.height,e.x,e.y];return`POLYGON((${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]}, ${t[6]} ${t[7]}, ${t[8]} ${t[9]}))`},Dr=(e,t,n,i)=>(new De).createLineString([new I(e,t),new I(n,i)]),Rr=e=>{const t=e.map((e=>new I(e[0],e[1])));return(new De).createPolygon(t)},Pr=(e,t,n,i)=>{const r=new xr,o=r.coord(e,t);return r.setCentre(o),r.setWidth(n),r.setHeight(i),r.createEllipse()},Lr=(e,t,n,i)=>Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2)),Or=(e,t,n,i)=>e-1===Or(e,t,n,i)?[e,t]:[n,i],kr=(e,t,n,i)=>-1!==Or(e,t,n,i)?[e,t]:[n,i],Br=(e,t,n,i,r)=>{const o=((e,t,n,i)=>e===n?1/0:(i-t)/(n-e))(t,n,i,r),s=e/2;if(0===o)return[t,n+s,i,n+s,i,n-s,t,n-s];if(o===1/0)return[t-s,n,t-s,r,i+s,r,i+s,n];const a=Math.atan(o),l=s*Math.cos(a),c=s*Math.sin(a);return[t-c,n+l,i-c,r+l,i+c,r-l,t+c,n-l,t+l,n-c]},Gr=(e,t=5)=>pr.simplify(e,t),zr=e=>{const t=[];for(let n=0;n{const t=e.getCoordinates(),n=[];n.push(t[0]);for(let e=0;e{const o=Dr(e,t,n,i);for(const s of r){const r=Dr(s[0],s[1],s[2],s[3]);if(wr(o,r)){const r=Fr(e,t,n,i),o=kr(e,t,n,i),a=Fr(s[0],s[1],s[2],s[3]),l=kr(s[0],s[1],s[2],s[3]);return[[r[0],r[1],a[0],a[1]],[l[0],l[1],o[0],o[1]]]}}return[[e,t,n,i]]},Ur=(e,t)=>e.c.length==t.c.length&&e.c[0]==t.c[0]&&e.c[1]==t.c[1]&&e.c[2]==t.c[2]&&e.c[3]==t.c[3]&&e.door==t.door&&JSON.stringify(e.flags)==JSON.stringify(t.flags),jr=()=>{const t=canvas.scene.getEmbeddedCollection("Wall"),n=[];for(const i of t){i.getFlag(e,"dungeonVersion")&&n.push(i)}return n},Vr=(e,t,n)=>{let i=[];for(let r=0;r{const i=[],r=t.getExteriorRing().getCoordinates();for(let t=0;t{const n=[];for(const i of t){const t=Zr(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Kr=(e,t)=>{const n=[];for(const i of t){const t=eo(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Xr=(e,t)=>{const n=[];for(const i of t){const t=Qr(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Jr=(e,t)=>{const n=[];for(const i of t){const t=$r(e,i[0],i[1],i[2],i[3]);n.push(t)}return n},Zr=(n,i,r,o,s)=>{const a={c:[i,r,o,s],door:0,flags:{}};return a.flags[e]={},a.flags[e].dungeonVersion="1.0",t.threeDCanvasEnabled()&&(a.flags["levels-3d-preview"]={joinWall:!0,wallDepth:n.wallThickness,wallSidesTexture:n.threeDWallSidesTexture,wallSidesTint:n.threeDWallSidesTextureTint,wallTexture:n.threeDWallTexture,wallTint:n.threeDWallTextureTint}),a},Qr=(e,n,i,r,o)=>{const s=Zr(e,n,i,r,o);return s.door=1,t.threeDCanvasEnabled()&&(s.flags["levels-3d-preview"].joinWall=!1,s.flags["levels-3d-preview"].wallTexture=e.threeDDoorTexture,s.flags["levels-3d-preview"].wallTint=e.threeDDoorTextureTint),s},$r=(e,t,n,i,r)=>{const o=Zr(e,t,n,i,r);return o.door=2,o},eo=(e,t,n,i,r)=>{const o=Zr(e,t,n,i,r);return o.door=0,o.light=0,o.sight=0,o};class to{static FLAG_KEY="dungeonState";constructor(e,t,n,i,r,o,s){this.geometry=e,this.themeAreas=t,this.doors=n,this.secretDoors=i,this.interiorWalls=r,this.invisibleWalls=o,this.config=s}static startState(){return new to(null,[],[],[],[],[],{doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8})}clone(){return new to(this.geometry?this.geometry.copy():null,JSON.parse(JSON.stringify(this.themeAreas)),JSON.parse(JSON.stringify(this.doors)),this.secretDoors?[...this.secretDoors]:[],this.interiorWalls?[...this.interiorWalls]:[],this.invisibleWalls?[...this.invisibleWalls]:[],JSON.parse(JSON.stringify(this.config)))}toString(){return JSON.stringify({wkt:Ar(this.geometry),themeAreas:this.themeAreas,doors:this.doors,secretDoors:this.secretDoors,interiorWalls:this.interiorWalls,invisibleWalls:this.invisibleWalls,config:this.config})}static fromString(e){if(!e)return to.startState();const t=JSON.parse(e),n=(i=t.wkt)?(new rt).read(i):null;var i;const r=t.themeAreas?t.themeAreas:[],o=t.doors?t.doors:[],s=t.secretDoors?t.secretDoors:[],a=t.interiorWalls?t.interiorWalls:[],l=t.invisibleWalls?t.invisibleWalls:[],c=foundry.utils.mergeObject({doorColor:"#000000",doorFillColor:"#ffffff",doorFillOpacity:1,doorLineThickness:8,doorThickness:25,exteriorShadowColor:"#000000",exteriorShadowThickness:20,exteriorShadowOpacity:.5,floorColor:"#F2EDDF",floorOpacity:1,floorTexture:"",floorTextureRotation:0,floorTextureTint:"",interiorShadowColor:"#000000",interiorShadowThickness:8,interiorShadowOpacity:.5,invisibleWallColor:"#000000",invisibleWallFillColor:"#ffffff",invisibleWallLineThickness:2,invisibleWallFillOpacity:1,invisibleWallThickness:6,matchBaseWalls:!0,sceneBackgroundColor:"#999999",sceneGridColor:"#000000",sceneGridOpacity:.2,secretDoorSColor:"#ffffff",secretDoorStyleGM:"secret",secretDoorStylePlayer:"wall",threeDDoorTexture:"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp",threeDDoorTextureTint:"",threeDWallTexture:"",threeDWallTextureTint:"",threeDWallSidesTexture:"",threeDWallSidesTextureTint:"",wallColor:"#000000",wallTexture:"",wallTextureTint:"",wallThickness:8},t.config);return new to(n,r,o,s,a,l,c)}async saveToJournalEntry(t){const n=this.toString();await(async e=>{if(!game.user.isGM)return;let t=[];if(e.geometry){const n=Gr(e.geometry,10),i=e.doors.concat(e.secretDoors,e.invisibleWalls);t=Vr(e.config,n,i)}const n=qr(e.config,e.interiorWalls),i=Kr(e.config,e.invisibleWalls),r=Xr(e.config,e.doors),o=Jr(e.config,e.secretDoors),s=t.concat(n,i,r,o),a=jr(),l=[],c=[];for(const e of s){let t=!1;for(const n of a)if(Ur(e,n)){l.push(n),t=!0;break}t||c.push(e)}const h=l.map((e=>e.id)),u=a.filter((e=>!h.includes(e.id))).map((e=>e.id));if(c.length&&await canvas.scene.createEmbeddedDocuments("Wall",c),u.length)try{await canvas.scene.deleteEmbeddedDocuments("Wall",u)}catch(e){console.error(e)}})(this),await t.setFlag(e,"dungeonState",n)}static async loadFromJournalEntry(t){await this.maybeMigrateJournalEntry(t);const n=t.getFlag(e,"dungeonState");return to.fromString(n)}static async maybeMigrateJournalEntry(e){if(game.user.isGM)if(e.pages){const t=e.pages.find((e=>"text"===e.type));if(t?.text?.content){console.log("Migrating v10 page.text.content");const n=to.fromString(t.text.content);await n.saveToJournalEntry(e),await t.delete()}}else if(e.data.content){console.log("Migrating v9 journalEntry.data.content");const t=to.fromString(e.data.content);await t.saveToJournalEntry(e),await e.update({content:null})}}} /*! * pixi-filters - v4.1.5 * Compiled Wed, 29 Sep 2021 14:05:57 UTC * * pixi-filters is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var io=function(e,t,n,i,r,o,s,a){var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function c(e,t){function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=arguments,i=1,r=arguments.length;i 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n")||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,i)},t}(t.Filter),m=function(e){function t(t){void 0===t&&(t=.5);var n=e.call(this,u,"\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n")||this;return n.threshold=t,n}return c(t,e),Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(t.Filter),g=function(e){function t(t,i,r){void 0===t&&(t=4),void 0===i&&(i=3),void 0===r&&(r=!1);var o=e.call(this,u,r?"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n":"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}")||this;return o._kernels=[],o._blur=4,o._quality=3,o.uniforms.uOffset=new Float32Array(2),o._pixelSize=new n.Point,o.pixelSize=1,o._clamp=r,Array.isArray(t)?o.kernels=t:(o._blur=t,o.quality=i),o}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o=this._pixelSize.x/t._frame.width,s=this._pixelSize.y/t._frame.height;if(1===this._quality||0===this._blur)r=this._kernels[0]+.5,this.uniforms.uOffset[0]=r*o,this.uniforms.uOffset[1]=r*s,e.applyFilter(this,t,n,i);else{for(var a=e.getFilterTexture(),l=t,c=a,h=void 0,u=this._quality-1,d=0;d0)for(var i=e,r=e/t,o=1;o0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(e){"number"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof n.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(t.Filter),f=function(e){function t(n){var r=e.call(this,u,"uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n")||this;r.bloomScale=1,r.brightness=1,r._resolution=i.settings.FILTER_RESOLUTION,"number"==typeof n&&(n={threshold:n});var o=Object.assign(t.defaults,n);r.bloomScale=o.bloomScale,r.brightness=o.brightness;var s=o.kernels,a=o.blur,l=o.quality,c=o.pixelSize,h=o.resolution;return r._extractFilter=new m(o.threshold),r._extractFilter.resolution=h,r._blurFilter=s?new g(s):new g(a,l),r.pixelSize=c,r.resolution=h,r}return c(t,e),t.prototype.apply=function(e,t,n,i,r){var o=e.getFilterTexture();this._extractFilter.apply(e,t,o,1,r);var s=e.getFilterTexture();this._blurFilter.apply(e,o,s,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=s,e.applyFilter(this,t,n,i),e.returnFilterTexture(s),e.returnFilterTexture(o)},Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},t}(t.Filter),p=function(e){function t(t){void 0===t&&(t=8);var n=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n")||this;return n.size=t,n}return c(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t}(t.Filter),_=function(e){function t(t){var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n")||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return c(t,e),t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._angle/n.DEG_TO_RAD},set:function(e){this._angle=e*n.DEG_TO_RAD,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return r.rgb2hex(this.uniforms.lightColor)},set:function(e){r.hex2rgb(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowColor",{get:function(){return r.rgb2hex(this.uniforms.shadowColor)},set:function(e){r.hex2rgb(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t}(t.Filter),y=function(e){function t(t,r,l,c){void 0===t&&(t=2),void 0===r&&(r=4),void 0===l&&(l=i.settings.FILTER_RESOLUTION),void 0===c&&(c=5);var h,u,d=e.call(this)||this;return"number"==typeof t?(h=t,u=t):t instanceof n.Point?(h=t.x,u=t.y):Array.isArray(t)&&(h=t[0],u=t[1]),d.blurXFilter=new a.BlurFilterPass(!0,h,r,l,c),d.blurYFilter=new a.BlurFilterPass(!1,u,r,l,c),d.blurYFilter.blendMode=o.BLEND_MODES.SCREEN,d.defaultFilter=new s.AlphaFilter,d}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this.defaultFilter.apply(e,t,n,i),this.blurXFilter.apply(e,t,r,1),this.blurYFilter.apply(e,r,n,0),e.returnFilterTexture(r)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),t}(t.Filter),b=function(e){function t(n){var i=e.call(this,u,"uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n")||this;return i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),t.defaults={center:[.5,.5],radius:100,strength:1},t}(t.Filter),C=function(e){function n(t,n,i){void 0===n&&(n=!1),void 0===i&&(i=1);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}")||this;return r.mix=1,r._size=0,r._sliceSize=0,r._slicePixelSize=0,r._sliceInnerSize=0,r._nearest=!1,r._scaleMode=null,r._colorMap=null,r._scaleMode=null,r.nearest=n,r.mix=i,r.colorMap=t,r}return c(n,e),n.prototype.apply=function(e,t,n,i){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,i)},Object.defineProperty(n.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"colorMap",{get:function(){return this._colorMap},set:function(e){var n;e&&(e instanceof t.Texture||(e=t.Texture.from(e)),(null===(n=e)||void 0===n?void 0:n.baseTexture)&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=o.MIPMAP_MODES.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nearest",{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?o.SCALE_MODES.NEAREST:o.SCALE_MODES.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=o.MIPMAP_MODES.OFF,t._updateID++,t.baseTexture.emit("update",t.baseTexture))},enumerable:!1,configurable:!0}),n.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)},n.prototype.destroy=function(t){void 0===t&&(t=!1),this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},n}(t.Filter),x=function(e){function t(t,n){void 0===t&&(t=0),void 0===n&&(n=1);var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 color;\nuniform float alpha;\n\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a);\n}\n")||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=t,i.alpha=n,i}return c(t,e),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){var t=this.uniforms.color;"number"==typeof e?(r.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._color=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),t}(t.Filter),v=function(e){function t(t,n,i){void 0===t&&(t=16711680),void 0===n&&(n=0),void 0===i&&(i=.4);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n")||this;return r._originalColor=16711680,r._newColor=0,r.uniforms.originalColor=new Float32Array(3),r.uniforms.newColor=new Float32Array(3),r.originalColor=t,r.newColor=n,r.epsilon=i,r}return c(t,e),Object.defineProperty(t.prototype,"originalColor",{get:function(){return this._originalColor},set:function(e){var t=this.uniforms.originalColor;"number"==typeof e?(r.hex2rgb(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"newColor",{get:function(){return this._newColor},set:function(e){var t=this.uniforms.newColor;"number"==typeof e?(r.hex2rgb(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),t}(t.Filter),S=function(e){function t(t,n,i){void 0===n&&(n=200),void 0===i&&(i=200);var r=e.call(this,u,"precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n")||this;return r.uniforms.texelSize=new Float32Array(2),r.uniforms.matrix=new Float32Array(9),void 0!==t&&(r.matrix=t),r.width=n,r.height=i,r}return c(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(e){var t=this;e.forEach((function(e,n){t.uniforms.matrix[n]=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),t}(t.Filter),T=function(e){function t(){return e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")||this}return c(t,e),t}(t.Filter),I=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 dir = vec2(vTextureCoord.xy - vec2(0.5, 0.5)) * filterArea.xy / dimensions;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0)\n {\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n")||this;return i.time=0,i.seed=0,i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t}(t.Filter),w=function(e){function t(t,n){void 0===t&&(t=1),void 0===n&&(n=5);var i=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n")||this;return i.scale=t,i.angle=n,i}return c(t,e),Object.defineProperty(t.prototype,"scale",{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t}(t.Filter),E=function(e){function o(r){var s=e.call(this)||this;s.angle=45,s._distance=5,s._resolution=i.settings.FILTER_RESOLUTION;var a=r?h(h({},o.defaults),r):o.defaults,l=a.kernels,c=a.blur,d=a.quality,m=a.pixelSize,f=a.resolution;s._tintFilter=new t.Filter(u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\n\nuniform vec2 shift;\nuniform vec4 inputSize;\n\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\n\n // Premultiply alpha\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}"),s._tintFilter.uniforms.color=new Float32Array(4),s._tintFilter.uniforms.shift=new n.Point,s._tintFilter.resolution=f,s._blurFilter=l?new g(l):new g(c,d),s.pixelSize=m,s.resolution=f;var p=a.shadowOnly,_=a.rotation,y=a.distance,b=a.alpha,C=a.color;return s.shadowOnly=p,s.rotation=_,s.distance=y,s.alpha=b,s.color=C,s._updatePadding(),s}return c(o,e),o.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this._tintFilter.apply(e,t,r,1),this._blurFilter.apply(e,r,n,i),!0!==this.shadowOnly&&e.applyFilter(this,t,n,0),e.returnFilterTexture(r)},o.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},o.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(o.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"distance",{get:function(){return this._distance},set:function(e){this._distance=e,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"rotation",{get:function(){return this.angle/n.DEG_TO_RAD},set:function(e){this.angle=e*n.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"alpha",{get:function(){return this._tintFilter.uniforms.alpha},set:function(e){this._tintFilter.uniforms.alpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"color",{get:function(){return r.rgb2hex(this._tintFilter.uniforms.color)},set:function(e){r.hex2rgb(e,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),o.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},o}(t.Filter),A=function(e){function t(t){void 0===t&&(t=5);var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n")||this;return n.strength=t,n}return c(t,e),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),t}(t.Filter),M=function(e){function i(n){var r=e.call(this,u,"// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n")||this;return r.offset=100,r.fillMode=i.TRANSPARENT,r.average=!1,r.seed=0,r.minSize=8,r.sampleSize=512,r._slices=0,r._offsets=new Float32Array(1),r._sizes=new Float32Array(1),r._direction=-1,r.uniforms.dimensions=new Float32Array(2),r._canvas=document.createElement("canvas"),r._canvas.width=4,r._canvas.height=r.sampleSize,r.texture=t.Texture.from(r._canvas,{scaleMode:o.SCALE_MODES.NEAREST}),Object.assign(r,i.defaults,n),r}return c(i,e),i.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.aspect=s/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,i)},i.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var r=this._slices,o=1,s=0;s0;t--){var n=Math.random()*t>>0,i=e[t];e[t]=e[n],e[n]=i}},i.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,l=e<0?-e:0;i.fillStyle="rgba("+a+", "+l+", 0, 1)",i.fillRect(0,r>>0,t,s+1>>0),r+=s}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(i.prototype,"sizes",{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n>0)},Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t}(t.Filter),P=function(e){function t(t,n,i){void 0===n&&(n=.05),void 0===i&&(i=t.length);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n".replace(/%maxColors%/g,i.toFixed(0)))||this;return r._replacements=[],r._maxColors=0,r.epsilon=n,r._maxColors=i,r.uniforms.originalColors=new Float32Array(3*i),r.uniforms.targetColors=new Float32Array(3*i),r.replacements=t,r}return c(t,e),Object.defineProperty(t.prototype,"replacements",{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,n=this.uniforms.targetColors,i=e.length;if(i>this._maxColors)throw new Error("Length of replacements ("+i+") exceeds the maximum colors length ("+this._maxColors+")");t[3*i]=-1;for(var o=0;o 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n")||this;return r.seed=0,r.uniforms.dimensions=new Float32Array(2),"number"==typeof n?(r.seed=n,n=void 0):r.seed=i,Object.assign(r,t.defaults,n),r}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"sepia",{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratch",{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchDensity",{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchWidth",{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t}(t.Filter),O=function(e){function t(n,i,r){void 0===n&&(n=1),void 0===i&&(i=0),void 0===r&&(r=.1);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n".replace(/\$\{angleStep\}/,t.getAngleStep(r)))||this;return o._thickness=1,o.uniforms.thickness=new Float32Array([0,0]),o.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(o,{thickness:n,color:i,quality:r}),o}return c(t,e),t.getAngleStep=function(e){var n=Math.max(e*t.MAX_SAMPLES,t.MIN_SAMPLES);return(2*Math.PI/n).toFixed(7)},t.prototype.apply=function(e,t,n,i){this.uniforms.thickness[0]=this._thickness/t._frame.width,this.uniforms.thickness[1]=this._thickness/t._frame.height,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"color",{get:function(){return r.rgb2hex(this.uniforms.outlineColor)},set:function(e){r.hex2rgb(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),t.MIN_SAMPLES=1,t.MAX_SAMPLES=100,t}(t.Filter),F=function(e){function t(t){void 0===t&&(t=10);var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n")||this;return n.size=t,n}return c(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this.uniforms.size},set:function(e){"number"==typeof e&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),t}(t.Filter),k=function(e){function t(t,n,i,r){void 0===t&&(t=0),void 0===n&&(n=[0,0]),void 0===i&&(i=5),void 0===r&&(r=-1);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n")||this;return o._angle=0,o.angle=t,o.center=n,o.kernelSize=i,o.radius=r,o}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t}(t.Filter),B=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n")||this;return i.time=0,i.uniforms.amplitude=new Float32Array(2),i.uniforms.waveLength=new Float32Array(2),i.uniforms.alpha=new Float32Array(2),i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"mirror",{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"boundary",{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"waveLength",{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),t.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t}(t.Filter),G=function(e){function t(t,n,i){void 0===t&&(t=[-10,0]),void 0===n&&(n=[0,10]),void 0===i&&(i=[0,0]);var r=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n")||this;return r.red=t,r.green=n,r.blue=i,r}return c(t,e),Object.defineProperty(t.prototype,"red",{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"green",{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blue",{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),t}(t.Filter),z=function(e){function t(n,i,r){void 0===n&&(n=[0,0]),void 0===r&&(r=0);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n")||this;return o.center=n,Object.assign(o,t.defaults,i),o.time=r,o}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wavelength",{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"brightness",{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),t.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t}(t.Filter),W=function(e){function t(t,n,i){void 0===n&&(n=0),void 0===i&&(i=1);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n")||this;return r._color=0,r.uniforms.dimensions=new Float32Array(2),r.uniforms.ambientColor=new Float32Array([0,0,0,i]),r.texture=t,r.color=n,r}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"texture",{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){var t=this.uniforms.ambientColor;"number"==typeof e?(r.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),t}(t.Filter),H=function(e){function t(t,i,r,o){void 0===t&&(t=100),void 0===i&&(i=600);var s=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n")||this;return s.uniforms.blur=t,s.uniforms.gradientBlur=i,s.uniforms.start=r||new n.Point(0,window.innerHeight/2),s.uniforms.end=o||new n.Point(600,window.innerHeight/2),s.uniforms.delta=new n.Point(30,30),s.uniforms.texSize=new n.Point(window.innerWidth,window.innerHeight),s.updateDelta(),s}return c(t,e),t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(t.prototype,"blur",{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),t}(t.Filter),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(H),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(H),V=function(e){function t(t,n,i,r){void 0===t&&(t=100),void 0===n&&(n=600);var o=e.call(this)||this;return o.tiltShiftXFilter=new U(t,n,i,r),o.tiltShiftYFilter=new j(t,n,i,r),o}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,r,1),this.tiltShiftYFilter.apply(e,r,n,i),e.returnFilterTexture(r)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),t}(t.Filter),Y=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n")||this;return Object.assign(i,t.defaults,n),i}return c(t,e),Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t.defaults={radius:200,angle:4,padding:20,offset:new n.Point},t}(t.Filter),q=function(e){function t(n){var i,r=Object.assign(t.defaults,n),o=r.maxKernelSize,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n".replace("${maxKernelSize}",o.toFixed(1)))||this,Object.assign(i,s),i}return c(t,e),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerRadius",{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t}(t.Filter);return e.AdjustmentFilter=d,e.AdvancedBloomFilter=f,e.AsciiFilter=p,e.BevelFilter=_,e.BloomFilter=y,e.BulgePinchFilter=b,e.CRTFilter=I,e.ColorMapFilter=C,e.ColorOverlayFilter=x,e.ColorReplaceFilter=v,e.ConvolutionFilter=S,e.CrossHatchFilter=T,e.DotFilter=w,e.DropShadowFilter=E,e.EmbossFilter=A,e.GlitchFilter=M,e.GlowFilter=N,e.GodrayFilter=D,e.KawaseBlurFilter=g,e.MotionBlurFilter=R,e.MultiColorReplaceFilter=P,e.OldFilmFilter=L,e.OutlineFilter=O,e.PixelateFilter=F,e.RGBSplitFilter=G,e.RadialBlurFilter=k,e.ReflectionFilter=B,e.ShockwaveFilter=z,e.SimpleLightmapFilter=W,e.TiltShiftAxisFilter=H,e.TiltShiftFilter=V,e.TiltShiftXFilter=U,e.TiltShiftYFilter=j,e.TwistFilter=Y,e.ZoomBlurFilter=q,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,io);const ro=e=>{const t=e?.baseTexture?.resource?.source;t&&"VIDEO"===t.tagName&&(t.loop=!0,t.muted=!0,game.video.play(t))},oo=async(e,t)=>{if(!t.geometry)return;const n=new PIXI.Graphics,i=new PIXI.Graphics,r=new PIXI.Graphics,o=new PIXI.Graphics;lo(e,t.config,t.geometry);const s=new PIXI.Graphics;uo(s,t.geometry),e.addChild(s),i.mask=s;const a=new PIXI.filters.AlphaFilter(t.config.interiorShadowOpacity),l=new PIXI.filters.BlurFilter;i.filters=[a,l],fo(n,i,r,t.config,t.geometry);const c=new PIXI.Graphics,h=JSON.parse(JSON.stringify(t.config));h.wallColor="#000000";for(const e of t.interiorWalls)bo(i,t.config,e),t.config.wallTexture?_o(c,h,e):_o(r,t.config,e);for(const e of t.invisibleWalls)vo(i,t.config,e),yo(o,r,c,t.config,e);for(const e of t.doors)So(i,t.config,e),Co(o,r,c,t.config,e);for(const e of t.secretDoors)bo(i,t.config,e),xo(o,r,c,t.config,e);if(e.addChild(n),e.addChild(i),t.config.wallTexture){go(c,t.geometry,t.config.wallThickness),e.addChild(c);const n=Ar(t.geometry,t.config.wallThickness/2),i=await ao(t.config.wallTexture);if(i?.valid){let e=null;t.config.wallTextureRotation&&(e=PIXI.Matrix.IDENTITY.clone(),e.rotate(t.config.wallTextureRotation*PIXI.DEG_TO_RAD)),ro(i),r.beginTextureFill({texture:i,alpha:1,matrix:e});const o=n.getCoordinates().map((e=>[e.x,e.y])).flat();r.drawPolygon(o),r.endFill(),r.mask=c,t.config.wallTextureTint&&(r.tint=PIXI.utils.string2hex(t.config.wallTextureTint))}}e.addChild(r),e.addChild(o)},so=async(e,t)=>{for(const n of t.themeAreas){const i=t.clone();i.config=n.config,i.config.doorColor=t.config.doorColor,i.config.doorFillColor=t.config.doorFillColor,i.config.doorFillOpacity=t.config.doorFillOpacity,i.config.doorThickness=t.config.doorThickness,i.config.matchBaseWalls&&(i.config.wallColor=t.config.wallColor,i.config.wallTexture=t.config.wallTexture,i.config.wallTextureTint=t.config.wallTextureTint,i.config.wallThickness=t.config.wallThickness),i.config.exteriorShadowOpacity=0;const r=new PIXI.Container,o=new PIXI.Graphics;o.beginFill(16777215,1),o.drawPolygon(n.points.flat()),o.endFill(),r.mask=o,Pr(n.points),await oo(r,i),e.addChild(o),e.addChild(r)}},ao=async e=>{try{const t=await loadTexture(e);return t||ui.notifications.error(`${game.i18n.localize("DD.TextureLoadFailure")}: ${e}`),t}catch(e){console.log(e)}},lo=(e,t,n)=>{if(!t.exteriorShadowThickness||!t.exteriorShadowOpacity||!n)return;const i=new PIXI.Graphics;i.lineStyle({width:t.wallThickness+t.exteriorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"});for(let e=0;e{const i=n.getExteriorRing();e.drawPolygon(i.getCoordinates().map((e=>[e.x,e.y])).flat());const r=n.getNumInteriorRing();for(let t=0;t[e.x,e.y])).flat())}},ho=(e,t)=>{const n=t.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();e.beginFill(16777215,1),e.drawPolygon(n),e.endFill();const i=t.getNumInteriorRing();for(let n=0;n[e.x,e.y])).flat();e.lineStyle(0,0,1,1,.5),e.beginHole(),e.drawPolygon(i),e.endHole()}},uo=(e,t)=>{for(let n=0;n{const i=t.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();e.lineStyle(n,PIXI.utils.string2hex("#000000"),1,.5),e.drawPolygon(i);const r=t.getNumInteriorRing();for(let i=0;i[e.x,e.y])).flat();e.lineStyle(n,PIXI.utils.string2hex("#000000"),1),e.drawPolygon(r)}},go=(e,t,n)=>{for(let i=0;i{for(let o=0;o{const o=r.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();if(i.floorTexture){const t=await ao(i.floorTexture);if(t?.valid){let n=null;i.floorTextureRotation&&(n=PIXI.Matrix.IDENTITY.clone(),n.rotate(i.floorTextureRotation*PIXI.DEG_TO_RAD)),ro(t),e.beginTextureFill({texture:t,alpha:i.floorOpacity,matrix:n}),e.drawPolygon(o),e.endFill(),i.floorTextureTint&&(e.tint=PIXI.utils.string2hex(i.floorTextureTint))}}else e.beginFill(PIXI.utils.string2hex(i.floorColor),i.floorOpacity),e.drawPolygon(o),e.endFill();const s=r.getNumInteriorRing();for(let t=0;t[e.x,e.y])).flat();e.lineStyle(0,0,1,1,.5),e.beginHole(),e.drawPolygon(n),e.endHole()}i.interiorShadowOpacity&&(t.lineStyle({width:i.wallThickness+i.interiorShadowThickness,color:PIXI.utils.string2hex(i.interiorShadowColor),alignment:.5,join:"round"}),t.drawPolygon(o)),i.wallTexture||(n.lineStyle(i.wallThickness,PIXI.utils.string2hex(i.wallColor),1,.5),n.drawPolygon(o));for(let e=0;e[e.x,e.y])).flat();t.drawPolygon(o),i.wallTexture||(n.lineStyle(i.wallThickness,PIXI.utils.string2hex(i.wallColor),1),n.drawPolygon(o))}},_o=(e,t,n)=>{e.lineStyle({width:t.wallThickness,color:PIXI.utils.string2hex(t.wallColor),alpha:1,alignment:.5,cap:"round"}),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3])},yo=(e,t,n,i,r)=>{const o={doorColor:i.invisibleWallColor,doorLineThickness:i.invisibleWallLineThickness,doorFillColor:i.invisibleWallFillColor,doorFillOpacity:i.invisibleWallFillOpacity,doorThickness:i.invisibleWallThickness,wallColor:i.wallColor,wallTexture:i.wallTexture,wallThickness:i.wallThickness};Co(e,t,n,o,r),e.lineStyle({width:i.invisibleWallLineThickness,color:PIXI.utils.string2hex(i.invisibleWallColor),alpha:1,alignment:.5}),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3])},bo=(e,t,n)=>{e.lineStyle({width:t.wallThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round",cap:"round"}),e.moveTo(n[2],n[3]),e.lineTo(n[0],n[1])},Co=(e,t,n,i,r)=>{const o=Or(r[0],r[1],r[2],r[3]),s=20/o,a=s+(o-40)/o,l=r[2]-r[0],c=r[3]-r[1],h=[r[0]+l*s,r[1]+c*s],u=[r[0]+l*a,r[1]+c*a],d=Gr(i.doorThickness,h[0],h[1],u[0],u[1]);i.wallTexture?(n.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),n.moveTo(r[0],r[1]),n.lineTo(h[0],h[1]),n.moveTo(u[0],u[1]),n.lineTo(r[2],r[3])):(t.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(u[0],u[1]),t.lineTo(r[2],r[3])),i.doorFillOpacity&&e.beginFill(PIXI.utils.string2hex(i.doorFillColor),i.doorFillOpacity),e.lineStyle(i.doorLineThickness,PIXI.utils.string2hex(i.doorColor),1,.5),e.drawPolygon(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[0],d[1]),i.doorFillColor&&e.endFill()},xo=(e,t,n,i,r)=>{const o=game.user.isGM;if(o&&"door"===i.secretDoorStyleGM||!o&&"door"===i.secretDoorStylePlayer)return void Co(e,t,n,i,r);const s=Or(r[0],r[1],r[2],r[3]),a=(s-40)/2/s,l=a+40/s,c=r[2]-r[0],h=r[3]-r[1],u=[r[0]+c*a,r[1]+h*a],d=[r[0]+.5*c,r[1]+.5*h],m=[r[0]+c*l,r[1]+h*l],g=Gr(30,u[0],u[1],m[0],m[1]);if(i.wallTexture?(n.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex("#000000"),alpha:1,alignment:.5,cap:"round"}),n.moveTo(r[0],r[1]),n.lineTo(r[2],r[3])):(t.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3])),o&&"secret"===i.secretDoorStyleGM||!o&&"secret"===i.secretDoorStylePlayer){const t=Gr(50,u[0],u[1],d[0],d[1]),n=Gr(50,d[0],d[1],m[0],m[1]);e.lineStyle({width:5,color:PIXI.utils.string2hex(i.secretDoorSColor),alpha:1,alignment:.5,cap:"round"}),e.moveTo(g[6],g[7]),e.bezierCurveTo(t[0],t[1],t[2],t[3],d[0],d[1]),e.bezierCurveTo(n[6],n[7],n[4],n[5],g[2],g[3])}},vo=(e,t,n)=>{const i={doorLineThickness:t.invisibleWallLineThickness,doorThickness:t.invisibleWallThickness,interiorShadowColor:t.interiorShadowColor,interiorShadowThickness:t.interiorShadowThickness,wallThickness:t.wallThickness};So(e,i,n)},So=(e,t,n)=>{const i=Or(n[0],n[1],n[2],n[3]),r=20/i,o=r+(i-40)/i,s=n[2]-n[0],a=n[3]-n[1],l=[n[0]+s*r,n[1]+a*r],c=[n[0]+s*o,n[1]+a*o],h=Gr(t.doorThickness,l[0],l[1],c[0],c[1]);e.lineStyle({width:t.wallThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"}),e.moveTo(n[2],n[3]),e.lineTo(c[0],c[1]),e.moveTo(l[0],l[1]),e.lineTo(n[0],n[1]),e.lineStyle({width:t.doorLineThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"}),e.drawPolygon(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[0],h[1])};class To extends PlaceableObject{constructor(e,t){super(t),this.journalEntry=e,this.history=[no.startState()],this.historyIndex=0}static embeddedName="Drawing";state(){return this.history[this.historyIndex]}async deleteAll(){const e=this.state(),t=no.startState();t.config=e.config,this.history=[t],this.historyIndex=0,await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),this.refresh()}async saveToSceneBackground(){const e=new PIXI.Container,t=new PIXI.Graphics,n=Math.ceil(canvas.scene.width*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,i=Math.ceil(canvas.scene.height*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,r=[n,i,n+canvas.scene.width,i,n+canvas.scene.width,i+canvas.scene.height,n,i+canvas.scene.height,n,i];t.beginFill(PIXI.utils.string2hex("#FFFFFF"),1),t.drawPolygon(r),t.endFill(),e.mask=t,this.mask=t;const o=new PIXI.Sprite;o.height=canvas.scene.height,o.width=canvas.scene.width,o.position.x=n,o.position.y=i,e.addChild(o),e.addChild(this);const s=`${canvas.scene.name}-dungeon.png`,a=await canvas.app.renderer.extract.base64(e),l=await fetch(a),c=await l.blob(),h=new File([c],s,{type:"image/png"});await FilePicker.upload("data","",h,{});const u=s;console.log(u),canvas.scene.img===u&&await canvas.scene.update({img:null},{render:!1}),await canvas.scene.update({img:u}),this.mask=null}draw(){return this.refresh(),this}refresh(){(async(e,t)=>{e.clear(),await oo(e,t),await so(e,t)})(this,this.state())}async maybeRefresh(e){if(e.id===this.journalEntry.id){const e=await no.loadFromJournalEntry(this.journalEntry);await this.pushState(e,!1)}}async loadFromJournalEntry(){const e=await no.loadFromJournalEntry(this.journalEntry);this.history=[e],this.historyIndex=0,this.refresh()}async undo(){this.historyIndex=Math.max(0,this.historyIndex-1),await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),await this.refresh()}async redo(){this.historyIndex=Math.min(this.history.length-1,this.historyIndex+1),await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),await this.refresh()}async pushState(e,t=!0){for(let e=this.history.length-1;e>this.historyIndex;e--)this.history.pop();this.history.push(e),this.historyIndex++,t&&await e.saveToJournalEntry(this.journalEntry),await this.refresh()}async setConfig(e){const t=this.state().clone();t.config=e,await this.pushState(t)}async addDoor(e,t,n,i){await this._addDoor(e,t,n,i,"doors")}async addSecretDoor(e,t,n,i){await this._addDoor(e,t,n,i,"secretDoors")}async addInvisibleWall(e,t,n,i){await this._addDoor(e,t,n,i,"invisibleWalls")}async _addDoor(e,t,n,i,r){const o=this.history[this.historyIndex].clone(),s=Rr(e,t,n,i),a=[],l=[];for(const r of o.interiorWalls){const o=Rr(r[0],r[1],r[2],r[3]);if(Er(o,s)){a.push(r);const o=kr(r[0],r[1],r[2],r[3]),s=Br(r[0],r[1],r[2],r[3]),c=kr(e,t,n,i),h=Br(e,t,n,i);l.push([o[0],o[1],c[0],c[1]]),l.push([h[0],h[1],s[0],s[1]])}}o.interiorWalls=o.interiorWalls.filter((e=>-1===a.indexOf(e))),o.interiorWalls=o.interiorWalls.concat(l),o[r].push([e,t,n,i]),await this.pushState(o)}async addInteriorWall(e,t,n,i){const r=this.history[this.historyIndex].clone(),o=Ur(e,t,n,i,r.doors);r.interiorWalls=r.interiorWalls.concat(o),await this.pushState(r)}async removeInteriorWalls(e){const t=Nr(e),n=this.history[this.historyIndex].interiorWalls.filter((e=>{const n=Rr(e[0],e[1],e[2],e[3]);return!Ir(t,n)}));if(n.length!=this.history[this.historyIndex].interiorWalls.length){const e=this.history[this.historyIndex].clone();e.interiorWalls=n,await this.pushState(e)}}async removeInvisibleWalls(e){const t=Nr(e),n=this.history[this.historyIndex].invisibleWalls.filter((e=>{const n=Rr(e[0],e[1],e[2],e[3]);return!Ir(t,n)}));if(n.length!=this.history[this.historyIndex].invisibleWalls.length){const e=this.history[this.historyIndex].clone();e.invisibleWalls=n,await this.pushState(e)}}async removeDoors(e){const t=Nr(e),n=this.history[this.historyIndex],i=n.doors.filter((e=>{const n=Rr(e[0],e[1],e[2],e[3]);return!Ir(t,n)}));if(i.length!=n.doors.length){const e=n.clone();e.doors=i,await this.pushState(e)}}async removeSecretDoors(e){const t=Nr(e),n=this.history[this.historyIndex],i=n.secretDoors.filter((e=>{const n=Rr(e[0],e[1],e[2],e[3]);return!Ir(t,n)}));if(i.length!=n.secretDoors.length){const e=n.clone();e.secretDoors=i,await this.pushState(e)}}async _addPoly(e){const t=this.history[this.historyIndex],n=t.clone();if(n.geometry){n.geometry=wr(n.geometry,e);if(i=t.geometry,r=e,Ji.touches(i,r)){const i=((e,t)=>Fi.intersection(e,t))(t.geometry,e),r=i.getCoordinates();if(r.length>1&&r.length%2==0)for(let e=0;e{const n=Rr(t[0],t[1],t[2],t[3]);return!Ir(e,n)}));t.length!=n.interiorWalls.length&&(n.interiorWalls=t)}}else n.geometry=e;var i,r;await this.pushState(n)}async addRectangle(e){const t=Nr(e);this._addPoly(t)}async removeRectangle(e){const t=Nr(e);await this._removePoly(t)}async _removePoly(e){if(!this.history[this.historyIndex].geometry)return;if(!Ir(this.history[this.historyIndex].geometry,e))return;const t=this.history[this.historyIndex].clone();var n,i;t.geometry=(n=t.geometry,i=e,Fi.difference(n,i)),await this.pushState(t)}async addPolygon(e){console.log(e);const t=Pr(e);if(Tr(t))try{await this._addPoly(t)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorAddingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async removePolygon(e){const t=Pr(e);if(Tr(t))try{await this._removePoly(t)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorRemovingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async addEllipse(e,t,n,i){const r=Lr(e,t,n,i);if(Tr(r))try{await this._addPoly(r)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorAddingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async removeEllipse(e,t,n,i){const r=Lr(e,t,n,i);if(Tr(r))try{await this._removePoly(r)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorRemovingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async addThemeArea(e){const t=Pr(e);if(!Tr(t))return void ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"));const i=(e=>{const t=e.split("."),i=t[0],r=t[1];if("custom"===i)return n()[r];return s[r]})(r()),o={points:e,config:i.config},a=this.history[this.historyIndex].clone();a.themeAreas.push(o),await this.pushState(a)}async removeThemeAreas(e){const t=Nr(e),n=this.history[this.historyIndex].themeAreas.filter((e=>{try{const n=Pr(e.points);return!Ir(t,n)}catch(e){return console.log(e),!1}}));if(n.length!=this.history[this.historyIndex].themeAreas.length){const e=this.history[this.historyIndex].clone();e.themeAreas=n,await this.pushState(e)}}}function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wo(e,t){return e(t={exports:{}},t.exports),t.exports}var Eo=wo((function(e,t){function n(e,t){var n=[],i=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]"}),function(r,o){if(n.length>0){var s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,r):i.push(r),~n.indexOf(o)&&(o=t.call(this,r,o))}else n.push(o);return null==e?o:e.call(this,r,o)}}(e.exports=function(e,t,i,r){return JSON.stringify(e,n(t,r),i)}).getSerialize=n}));Eo.getSerialize;var Ao=function(){var e=4022871197;return function(t){if(t){t=t.toString();for(var n=0;n>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 2.3283064365386963e-10*(e>>>0)}e=4022871197}},Mo=function(e){return function(){var t,n,i=48,r=1,o=i,s=new Array(i),a=0,l=new Ao;for(t=0;t=i&&(o=0);var e=1768863*s[o]+2.3283064365386963e-10*r;return s[o]=e-(r=0|e)},h=function(e){return Math.floor(e*(c()+11102230246251565e-32*(2097152*c()|0)))};h.string=function(e){var t,n="";for(t=0;t0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.rng.floatBetween(e,t)}},{key:"vec",value:function(e,t){return[this.int(e[0],t[0]),this.int(e[1],t[1])]}},{key:"choose",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.rng.intBetween(0,e.length-1);return t?e.splice(n,1)[0]:e[n]}},{key:"maybe",value:function(e){return this.float()<=e}}]),e}();t.default=o}));Io(Do);var Ro=wo((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[0,0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r(this,e),this.rows=[],this.size=[];for(var i=0;i3&&void 0!==arguments[3]&&arguments[3];if(h)for(var u=0;uthis.x+this.width&&(this.width=e+n-this.x),t+i>this.y+this.height&&(this.height=t+i-this.y),e=this.x&&e+n<=this.x+this.width&&t>=this.y&&t+i<=this.y+this.height},r.union=function(e){return this.clone().extend(e.x,e.y,e.width,e.height)},r.intersection=function(e){var t=e.x,n=e.y,r=t+e.width,o=n+e.height;return this.x>t&&(t=this.x),this.y>n&&(n=this.y),this.x+this.widthe[0]+t[0]||n[0]+i[0]e[1]+t[1]||n[1]+i[1]1&&void 0!==arguments[1]?arguments[1]:null;(0,Oo.array_test)(this.children,(function(t){return t.id===e.id}))||(e.parent=this,t&&(e.position=t),this.children.push(e),this.paste_in(e))}},{key:"paste_in",value:function(e){var t=this;(0,Oo.iter_2d)(e.size,(function(n){e.walls.get(n)||t.walls.set(e.parent_pos(n),!1)}))}},{key:"add_exit",value:function(e,t){this.walls.set(e[0],!1),this.parent&&this.parent.paste_in(this),this.exits.push([e[0],e[1],t])}},{key:"print",value:function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,i=void 0,r=void 0;if(n)r=n,n=null;else{if(!(i=this.get_open_pieces(this.children))||!i.length)return console.log("ran out of choices connecting"),!1;r=this.random.choose(i)}if(t){if(this.join(r,t,e))return!0}else for(var o=e.perimeter.slice();o.length;)if(this.join(r,this.random.choose(o,!0),e))return!0;return!1}},{key:"new_corridor",value:function(){return new r.default({length:this.random.int(this.min_corridor_length,this.max_corridor_length),facing:this.random.choose(Lo.FACING)})}},{key:"add_interconnect",value:function(){var e={},t=void 0,n=void 0,i=void 0;this.children.forEach((function(n){n.exits.length=0)if((o=this.children[c]).exits.length-1?(a=new r.default({length:s,facing:n[1]}),!!this.join(o,a.perimeter[0],a,n)&&(this.join_exits(l,e[t][0],a,a.perimeter[a.perimeter.length-1]),!0)):(this.join_exits(l,e[t][0],o,n),!0);i=(0,Oo.shift)(i,n[1]),s++}}},{key:"new_room",value:function(e){e=e||this.random.choose(this.room_tags,!1);var t=this.options.rooms[e],n=new o.default({size:this.random.vec(t.min_size,t.max_size),max_exits:t.max_exits,symmetric:this.symmetric_rooms,tag:e});return this.room_tags.splice(this.room_tags.indexOf(e),1),"initial"===e&&(this.initial_room=n),n}},{key:"generate",value:function(){var e=this.options.room_count-1,t=this.new_room(this.options.rooms.initial?"initial":void 0),n=Math.round(this.corridor_density*e);this.add_piece(t,this.options.rooms.initial&&this.options.rooms.initial.position?this.options.rooms.initial.position:this.get_center_pos());for(var i=void 0,r=this.max_iterations;(n||e)&&--r;)if((i=this.random.int(1,e+n))<=n){var o=this.new_corridor(),s=this.add_room(o,o.perimeter[0]);n--,e>0&&s&&(this.add_room(this.new_room(),null,o),e--)}else this.add_room(this.new_room()),e--;for(i=0;i0}}]),t}(i.default);t.default=a}));Io(zo);var Wo=zo.default,Ho=wo((function(e,t){!function(){var n=9007199254740992,i="0123456789",r="abcdefghijklmnopqrstuvwxyz",o=r.toUpperCase(),s=i+"abcdef";function a(e){this.name="UnsupportedError",this.message=e||"This feature is not supported on this platform"}a.prototype=new Error,a.prototype.constructor=a;var l=Array.prototype.slice;function c(e){if(!(this instanceof c))return e||(e=null),null===e?new c:new c(e);if("function"==typeof e)return this.random=e,this;arguments.length&&(this.seed=0);for(var t=0;t100,"Chance: Likelihood accepts values from 0 to 100."),100*this.random()i,"Chance: Max specified is out of range with fixed. Max should be, at most, "+i),e=h(e,{min:r,max:i});var o=(this.integer({min:e.min*t,max:e.max*t})/t).toFixed(e.fixed);return parseFloat(o)},c.prototype.integer=function(e){return u((e=h(e,{min:-9007199254740992,max:n})).min>e.max,"Chance: Min cannot be greater than Max."),Math.floor(this.random()*(e.max-e.min+1)+e.min)},c.prototype.natural=function(e){if("number"==typeof(e=h(e,{min:0,max:n})).numerals&&(u(e.numerals<1,"Chance: Numerals cannot be less than one."),e.min=Math.pow(10,e.numerals-1),e.max=Math.pow(10,e.numerals)-1),u(e.min<0,"Chance: Min cannot be less than zero."),e.exclude){for(var t in u(!Array.isArray(e.exclude),"Chance: exclude must be an array."),e.exclude)u(!Number.isInteger(e.exclude[t]),"Chance: exclude must be numbers.");var i=e.min+this.natural({max:e.max-e.min-e.exclude.length}),r=e.exclude.sort();for(var o in r){if(ie.max,"Chance: Min cannot be greater than Max.");var t=_.primes[_.primes.length-1];if(e.max>t)for(var n=t+2;n<=e.max;++n)this.is_prime(n)&&_.primes.push(n);var i=_.primes.filter((function(t){return t>=e.min&&t<=e.max}));return this.pick(i)},c.prototype.is_prime=function(e){if(e%1||e<2)return!1;if(e%2==0)return 2===e;if(e%3==0)return 3===e;for(var t=Math.sqrt(e),n=5;n<=t;n+=6)if(e%n==0||e%(n+2)==0)return!1;return!0},c.prototype.hex=function(e){u((e=h(e,{min:0,max:n,casing:"lower"})).min<0,"Chance: Min cannot be less than zero.");var t=this.natural({min:e.min,max:e.max});return"upper"===e.casing?t.toString(16).toUpperCase():t.toString(16)},c.prototype.letter=function(e){e=h(e,{casing:"lower"});var t=this.character({pool:"abcdefghijklmnopqrstuvwxyz"});return"upper"===e.casing&&(t=t.toUpperCase()),t},c.prototype.string=function(e){(e=h(e,{min:5,max:20})).length||(e.length=this.natural({min:e.min,max:e.max})),u(e.length<0,"Chance: Length cannot be less than zero.");var t=e.length;return this.n(this.character,t,e).join("")},m.prototype={substitute:function(){return this.c}},g.prototype={substitute:function(){if(!/[{}\\]/.test(this.c))throw new Error('Invalid escape sequence: "\\'+this.c+'".');return this.c}},f.prototype={replacers:{"#":function(e){return e.character({pool:i})},A:function(e){return e.character({pool:o})},a:function(e){return e.character({pool:r})}},substitute:function(e){var t=this.replacers[this.c];if(!t)throw new Error('Invalid replacement character: "'+this.c+'".');return t(e)}},c.prototype.template=function(e){if(!e)throw new Error("Template string is required");var t=this;return function(e){for(var t=[],n="identity",i=0;ia)throw new RangeError("Chance: num is likely too large for sample set")}return o},c.prototype.n=function(e,t){u("function"!=typeof e,"Chance: The first argument must be a function."),void 0===t&&(t=1);var n=t,i=[],r=l.call(arguments,2);for(n=Math.max(0,n);n--;null)i.push(e.apply(this,r));return i},c.prototype.pad=function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e},c.prototype.pick=function(e,t){if(0===e.length)throw new RangeError("Chance: Cannot pick() from an empty array");return t&&1!==t?this.shuffle(e).slice(0,t):e[this.natural({max:e.length-1})]},c.prototype.pickone=function(e){if(0===e.length)throw new RangeError("Chance: Cannot pickone() from an empty array");return e[this.natural({max:e.length-1})]},c.prototype.pickset=function(e,t){if(0===t)return[];if(0===e.length)throw new RangeError("Chance: Cannot pickset() from an empty array");if(t<0)throw new RangeError("Chance: Count must be a positive number");if(t&&1!==t){var n=e.slice(0),i=n.length;return this.n((function(){var e=this.natural({max:--i}),t=n[e];return n[e]=n[i],t}),Math.min(i,t))}return[this.pickone(e)]},c.prototype.shuffle=function(e){for(var t,n=[],i=0,r=Number(e.length),o=function(e){return Array.apply(null,Array(e)).map((function(e,t){return t}))}(r),s=r-1,a=0;a0&&(r+=i)}if(0===r)throw new RangeError("Chance: No valid entries in array weights");var s,a=this.random()*r,l=0,c=-1;for(o=0;o0){if(a<=l){s=o;break}c=o}o===t.length-1&&(s=c)}var h=e[s];return(n=void 0!==n&&n)&&(e.splice(s,1),t.splice(s,1)),h},c.prototype.paragraph=function(e){var t=(e=h(e)).sentences||this.natural({min:3,max:7}),n=this.n(this.sentence,t),i=!0===e.linebreak?"\n":" ";return n.join(i)},c.prototype.sentence=function(e){var t,n=(e=h(e)).words||this.natural({min:12,max:18}),i=e.punctuation;return t=this.n(this.word,n).join(" "),t=this.capitalize(t),!1===i||/^[.?;!:]$/.test(i)||(i="."),i&&(t+=i),t},c.prototype.syllable=function(e){for(var t,n=(e=h(e)).length||this.natural({min:2,max:3}),i="bcdfghjklmnprstvwz",r="aeiou",o="",s=0;s=10&&(n=0);var i=2*n+3*t[8]+4*t[7]+5*t[6]+6*t[5]+7*t[4]+8*t[3]+9*t[2]+10*t[1]+11*t[0];(i=11-i%11)>=10&&(i=0);var r=""+t[0]+t[1]+t[2]+"."+t[3]+t[4]+t[5]+"."+t[6]+t[7]+t[8]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},c.prototype.cnpj=function(e){e=h(e,{formatted:!0});var t=this.n(this.natural,12,{max:12}),n=2*t[11]+3*t[10]+4*t[9]+5*t[8]+6*t[7]+7*t[6]+8*t[5]+9*t[4]+2*t[3]+3*t[2]+4*t[1]+5*t[0];(n=11-n%11)<2&&(n=0);var i=2*n+3*t[11]+4*t[10]+5*t[9]+6*t[8]+7*t[7]+8*t[6]+9*t[5]+2*t[4]+3*t[3]+4*t[2]+5*t[1]+6*t[0];(i=11-i%11)<2&&(i=0);var r=""+t[0]+t[1]+"."+t[2]+t[3]+t[4]+"."+t[5]+t[6]+t[7]+"/"+t[8]+t[9]+t[10]+t[11]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},c.prototype.first=function(e){return e=h(e,{gender:this.gender(),nationality:"en"}),this.pick(this.get("firstNames")[e.gender.toLowerCase()][e.nationality.toLowerCase()])},c.prototype.profession=function(e){return(e=h(e)).rank?this.pick(["Apprentice ","Junior ","Senior ","Lead "])+this.pick(this.get("profession")):this.pick(this.get("profession"))},c.prototype.company=function(){return this.pick(this.get("company"))},c.prototype.gender=function(e){return e=h(e,{extraGenders:[]}),this.pick(["Male","Female"].concat(e.extraGenders))},c.prototype.last=function(e){if("*"===(e=h(e,{nationality:"*"})).nationality){var t=[],n=this.get("lastNames");return Object.keys(n).forEach((function(e){t=t.concat(n[e])})),this.pick(t)}return this.pick(this.get("lastNames")[e.nationality.toLowerCase()])},c.prototype.israelId=function(){for(var e=this.string({pool:"0123456789",length:8}),t=0,n=0;n","<=",">=","="]);e.range&&(t=e.range);var n="";return e.include_prerelease&&(n=this.weighted(["","-dev","-beta","-alpha"],[50,10,5,1])),t+this.rpg("3d10").join(".")+n},c.prototype.tlds=function(){return["com","org","edu","gov","co.uk","net","io","ac","ad","ae","af","ag","ai","al","am","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bm","bn","bo","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","eu","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","ss","st","su","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tp","tr","tt","tv","tw","tz","ua","ug","uk","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","za","zm","zw"]},c.prototype.tld=function(){return this.pick(this.tlds())},c.prototype.twitter=function(){return"@"+this.word()},c.prototype.url=function(e){var t=(e=h(e,{protocol:"http",domain:this.domain(e),domain_prefix:"",path:this.word(),extensions:[]})).extensions.length>0?"."+this.pick(e.extensions):"",n=e.domain_prefix?e.domain_prefix+"."+e.domain:e.domain;return e.protocol+"://"+n+"/"+e.path+t},c.prototype.port=function(){return this.integer({min:0,max:65535})},c.prototype.locale=function(e){return(e=h(e)).region?this.pick(this.get("locale_regions")):this.pick(this.get("locale_languages"))},c.prototype.locales=function(e){return(e=h(e)).region?this.get("locale_regions"):this.get("locale_languages")},c.prototype.loremPicsum=function(e){var t=(e=h(e,{width:500,height:500,greyscale:!1,blurred:!1})).greyscale?"g/":"",n=e.blurred?"/?blur":"/?random";return"https://picsum.photos/"+t+e.width+"/"+e.height+n},c.prototype.address=function(e){return e=h(e),this.natural({min:5,max:2e3})+" "+this.street(e)},c.prototype.altitude=function(e){return e=h(e,{fixed:5,min:0,max:8848}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},c.prototype.areacode=function(e){var t=(e=h(e,{parens:!0})).exampleNumber?"555":this.natural({min:2,max:9}).toString()+this.natural({min:0,max:8}).toString()+this.natural({min:0,max:9}).toString();return e.parens?"("+t+")":t},c.prototype.city=function(){return this.capitalize(this.word({syllables:3}))},c.prototype.coordinates=function(e){return this.latitude(e)+", "+this.longitude(e)},c.prototype.countries=function(){return this.get("countries")},c.prototype.country=function(e){e=h(e);var t=this.pick(this.countries());return e.raw?t:e.full?t.name:t.abbreviation},c.prototype.depth=function(e){return e=h(e,{fixed:5,min:-10994,max:0}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},c.prototype.geohash=function(e){return e=h(e,{length:7}),this.string({length:e.length,pool:"0123456789bcdefghjkmnpqrstuvwxyz"})},c.prototype.geojson=function(e){return this.latitude(e)+", "+this.longitude(e)+", "+this.altitude(e)},c.prototype.latitude=function(e){var[t,n,i]=["ddm","dms","dd"],r=(e=h(e,e&&e.format&&[t,n].includes(e.format.toLowerCase())?{min:0,max:89,fixed:4}:{fixed:5,min:-90,max:90,format:i})).format.toLowerCase();switch(r!==t&&r!==n||(u(e.min<0||e.min>89,"Chance: Min specified is out of range. Should be between 0 - 89"),u(e.max<0||e.max>89,"Chance: Max specified is out of range. Should be between 0 - 89"),u(e.fixed>4,"Chance: Fixed specified should be below or equal to 4")),r){case t:return this.integer({min:e.min,max:e.max})+"°"+this.floating({min:0,max:59,fixed:e.fixed});case n:return this.integer({min:e.min,max:e.max})+"°"+this.integer({min:0,max:59})+"’"+this.floating({min:0,max:59,fixed:e.fixed})+"”";default:return this.floating({min:e.min,max:e.max,fixed:e.fixed})}},c.prototype.longitude=function(e){var[t,n,i]=["ddm","dms","dd"],r=(e=h(e,e&&e.format&&[t,n].includes(e.format.toLowerCase())?{min:0,max:179,fixed:4}:{fixed:5,min:-180,max:180,format:i})).format.toLowerCase();switch(r!==t&&r!==n||(u(e.min<0||e.min>179,"Chance: Min specified is out of range. Should be between 0 - 179"),u(e.max<0||e.max>179,"Chance: Max specified is out of range. Should be between 0 - 179"),u(e.fixed>4,"Chance: Fixed specified should be below or equal to 4")),r){case t:return this.integer({min:e.min,max:e.max})+"°"+this.floating({min:0,max:59.9999,fixed:e.fixed});case n:return this.integer({min:e.min,max:e.max})+"°"+this.integer({min:0,max:59})+"’"+this.floating({min:0,max:59.9999,fixed:e.fixed})+"”";default:return this.floating({min:e.min,max:e.max,fixed:e.fixed})}},c.prototype.phone=function(e){var t,n,i=this,r=function(e){var t=[];return e.sections.forEach((function(e){t.push(i.string({pool:"0123456789",length:e}))})),e.area+t.join(" ")};switch((e=h(e,{formatted:!0,country:"us",mobile:!1,exampleNumber:!1})).formatted||(e.parens=!1),e.country){case"fr":e.mobile?(t=this.pick(["06","07"])+i.string({pool:"0123456789",length:8}),n=e.formatted?t.match(/../g).join(" "):t):(t=this.pick(["01"+this.pick(["30","34","39","40","41","42","43","44","45","46","47","48","49","53","55","56","58","60","64","69","70","72","73","74","75","76","77","78","79","80","81","82","83"])+i.string({pool:"0123456789",length:6}),"02"+this.pick(["14","18","22","23","28","29","30","31","32","33","34","35","36","37","38","40","41","43","44","45","46","47","48","49","50","51","52","53","54","56","57","61","62","69","72","76","77","78","85","90","96","97","98","99"])+i.string({pool:"0123456789",length:6}),"03"+this.pick(["10","20","21","22","23","24","25","26","27","28","29","39","44","45","51","52","54","55","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","80","81","82","83","84","85","86","87","88","89","90"])+i.string({pool:"0123456789",length:6}),"04"+this.pick(["11","13","15","20","22","26","27","30","32","34","37","42","43","44","50","56","57","63","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","88","89","90","91","92","93","94","95","97","98"])+i.string({pool:"0123456789",length:6}),"05"+this.pick(["08","16","17","19","24","31","32","33","34","35","40","45","46","47","49","53","55","56","57","58","59","61","62","63","64","65","67","79","81","82","86","87","90","94"])+i.string({pool:"0123456789",length:6}),"09"+i.string({pool:"0123456789",length:8})]),n=e.formatted?t.match(/../g).join(" "):t);break;case"uk":e.mobile?(t=this.pick([{area:"07"+this.pick(["4","5","7","8","9"]),sections:[2,6]},{area:"07624 ",sections:[6]}]),n=e.formatted?r(t):r(t).replace(" ","")):(t=this.pick([{area:"01"+this.character({pool:"234569"})+"1 ",sections:[3,4]},{area:"020 "+this.character({pool:"378"}),sections:[3,4]},{area:"023 "+this.character({pool:"89"}),sections:[3,4]},{area:"024 7",sections:[3,4]},{area:"028 "+this.pick(["25","28","37","71","82","90","92","95"]),sections:[2,4]},{area:"012"+this.pick(["04","08","54","76","97","98"])+" ",sections:[6]},{area:"013"+this.pick(["63","64","84","86"])+" ",sections:[6]},{area:"014"+this.pick(["04","20","60","61","80","88"])+" ",sections:[6]},{area:"015"+this.pick(["24","27","62","66"])+" ",sections:[6]},{area:"016"+this.pick(["06","29","35","47","59","95"])+" ",sections:[6]},{area:"017"+this.pick(["26","44","50","68"])+" ",sections:[6]},{area:"018"+this.pick(["27","37","84","97"])+" ",sections:[6]},{area:"019"+this.pick(["00","05","35","46","49","63","95"])+" ",sections:[6]}]),n=e.formatted?r(t):r(t).replace(" ","","g"));break;case"za":e.mobile?(t=this.pick(["060"+this.pick(["3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"061"+this.pick(["0","1","2","3","4","5","8"])+i.string({pool:"0123456789",length:6}),"06"+i.string({pool:"0123456789",length:7}),"071"+this.pick(["0","1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"07"+this.pick(["2","3","4","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"08"+this.pick(["0","1","2","3","4","5"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||t):(t=this.pick(["01"+this.pick(["0","1","2","3","4","5","6","7","8"])+i.string({pool:"0123456789",length:7}),"02"+this.pick(["1","2","3","4","7","8"])+i.string({pool:"0123456789",length:7}),"03"+this.pick(["1","2","3","5","6","9"])+i.string({pool:"0123456789",length:7}),"04"+this.pick(["1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"05"+this.pick(["1","3","4","6","7","8"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||t);break;case"us":var o=this.areacode(e).toString(),s=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:9}).toString()+this.natural({min:0,max:9}).toString(),a=this.natural({min:1e3,max:9999}).toString();n=e.formatted?o+" "+s+"-"+a:o+s+a;break;case"br":var l,c=this.pick(["11","12","13","14","15","16","17","18","19","21","22","24","27","28","31","32","33","34","35","37","38","41","42","43","44","45","46","47","48","49","51","53","54","55","61","62","63","64","65","66","67","68","69","71","73","74","75","77","79","81","82","83","84","85","86","87","88","89","91","92","93","94","95","96","97","98","99"]);l=e.mobile?"9"+i.string({pool:"0123456789",length:4}):this.natural({min:2e3,max:5999}).toString();var u=i.string({pool:"0123456789",length:4});n=e.formatted?"("+c+") "+l+"-"+u:c+l+u}return n},c.prototype.postal=function(){return this.character({pool:"XVTSRPNKLMHJGECBA"})+this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+" "+(this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+this.natural({max:9}))},c.prototype.postcode=function(){return this.pick(this.get("postcodeAreas")).code+this.natural({max:9})+(this.bool()?this.character({alpha:!0,casing:"upper"}):"")+" "+(this.natural({max:9})+(this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})))},c.prototype.counties=function(e){return e=h(e,{country:"uk"}),this.get("counties")[e.country.toLowerCase()]},c.prototype.county=function(e){return this.pick(this.counties(e)).name},c.prototype.provinces=function(e){return e=h(e,{country:"ca"}),this.get("provinces")[e.country.toLowerCase()]},c.prototype.province=function(e){return e&&e.full?this.pick(this.provinces(e)).name:this.pick(this.provinces(e)).abbreviation},c.prototype.state=function(e){return e&&e.full?this.pick(this.states(e)).name:this.pick(this.states(e)).abbreviation},c.prototype.states=function(e){var t;switch((e=h(e,{country:"us",us_states_and_dc:!0})).country.toLowerCase()){case"us":var n=this.get("us_states_and_dc"),i=this.get("territories"),r=this.get("armed_forces");t=[],e.us_states_and_dc&&(t=t.concat(n)),e.territories&&(t=t.concat(i)),e.armed_forces&&(t=t.concat(r));break;case"it":case"mx":t=this.get("country_regions")[e.country.toLowerCase()];break;case"uk":t=this.get("counties")[e.country.toLowerCase()]}return t},c.prototype.street=function(e){var t;switch((e=h(e,{country:"us",syllables:2})).country.toLowerCase()){case"us":t=this.word({syllables:e.syllables}),t=this.capitalize(t),t+=" ",t+=e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name;break;case"it":t=this.word({syllables:e.syllables}),t=this.capitalize(t),t=(e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name)+" "+t}return t},c.prototype.street_suffix=function(e){return e=h(e,{country:"us"}),this.pick(this.street_suffixes(e))},c.prototype.street_suffixes=function(e){return e=h(e,{country:"us"}),this.get("street_suffixes")[e.country.toLowerCase()]},c.prototype.zip=function(e){var t=this.n(this.natural,5,{max:9});return e&&!0===e.plusfour&&(t.push("-"),t=t.concat(this.n(this.natural,4,{max:9}))),t.join("")},c.prototype.ampm=function(){return this.bool()?"am":"pm"},c.prototype.date=function(e){var t,n;if(e&&(e.min||e.max)){var i=void 0!==(e=h(e,{american:!0,string:!1})).min?e.min.getTime():1,r=void 0!==e.max?e.max.getTime():864e13;n=new Date(this.integer({min:i,max:r}))}else{var o=this.month({raw:!0}),s=o.days;e&&e.month&&(s=this.get("months")[(e.month%12+12)%12].days),e=h(e,{year:parseInt(this.year(),10),month:o.numeric-1,day:this.natural({min:1,max:s}),hour:this.hour({twentyfour:!0}),minute:this.minute(),second:this.second(),millisecond:this.millisecond(),american:!0,string:!1}),n=new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}return t=e.american?n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear():n.getDate()+"/"+(n.getMonth()+1)+"/"+n.getFullYear(),e.string?t:n},c.prototype.hammertime=function(e){return this.date(e).getTime()},c.prototype.hour=function(e){return u((e=h(e,{min:e&&e.twentyfour?0:1,max:e&&e.twentyfour?23:12})).min<0,"Chance: Min cannot be less than 0."),u(e.twentyfour&&e.max>23,"Chance: Max cannot be greater than 23 for twentyfour option."),u(!e.twentyfour&&e.max>12,"Chance: Max cannot be greater than 12."),u(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},c.prototype.millisecond=function(){return this.natural({max:999})},c.prototype.minute=c.prototype.second=function(e){return u((e=h(e,{min:0,max:59})).min<0,"Chance: Min cannot be less than 0."),u(e.max>59,"Chance: Max cannot be greater than 59."),u(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},c.prototype.month=function(e){u((e=h(e,{min:1,max:12})).min<1,"Chance: Min cannot be less than 1."),u(e.max>12,"Chance: Max cannot be greater than 12."),u(e.min>e.max,"Chance: Min cannot be greater than Max.");var t=this.pick(this.months().slice(e.min-1,e.max));return e.raw?t:t.name},c.prototype.months=function(){return this.get("months")},c.prototype.second=function(){return this.natural({max:59})},c.prototype.timestamp=function(){return this.natural({min:1,max:parseInt((new Date).getTime()/1e3,10)})},c.prototype.weekday=function(e){var t=["Monday","Tuesday","Wednesday","Thursday","Friday"];return(e=h(e,{weekday_only:!1})).weekday_only||(t.push("Saturday"),t.push("Sunday")),this.pickone(t)},c.prototype.year=function(e){return(e=h(e,{min:(new Date).getFullYear()})).max=void 0!==e.max?e.max:e.min+100,this.natural(e).toString()},c.prototype.cc=function(e){var t,n,i;return n=(t=(e=h(e)).type?this.cc_type({name:e.type,raw:!0}):this.cc_type({raw:!0})).prefix.split(""),i=t.length-t.prefix.length-1,(n=n.concat(this.n(this.integer,i,{min:0,max:9}))).push(this.luhn_calculate(n.join(""))),n.join("")},c.prototype.cc_types=function(){return this.get("cc_types")},c.prototype.cc_type=function(e){e=h(e);var t=this.cc_types(),n=null;if(e.name){for(var i=0;i3&&(n=t?n.substr(0,3):n[0]+n.substr(2,2)),n.length<3&&(i=n,n=e.toUpperCase().split("").map((function(e){return-1!=="AEIOU".indexOf(e)?e:void 0})).join("").substr(0,3-i.length)),i+=n),i};return s=s.concat(a(i,!0),a(n),function(e,t,n){return e.getFullYear().toString().substr(2)+["A","B","C","D","E","H","L","M","P","R","S","T"][e.getMonth()]+n.pad(e.getDate()+("female"===t.toLowerCase()?40:0),2)}(r,t,this),o.toUpperCase().split("")).join(""),(s+=function(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n="ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ",i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0,o=0;o<15;o++)r+=o%2!=0?i.indexOf(n[t.indexOf(e[o])]):"BAKPLCQDREVOSFTGUHMINJWZYX".indexOf(n[t.indexOf(e[o])]);return i[r%26]}(s.toUpperCase())).toUpperCase()},c.prototype.pl_pesel=function(){for(var e=this.natural({min:1,max:9999999999}),t=this.pad(e,10).split(""),n=0;n0;r--)i[r-1]=this.natural({min:1,max:n[1]});return void 0!==t.sum&&t.sum?i.reduce((function(e,t){return e+t})):i}throw new RangeError("Chance: A type of die roll must be included")},c.prototype.guid=function(e){e=h(e,{version:5});var t="abcdef1234567890";return this.string({pool:t,length:8})+"-"+this.string({pool:t,length:4})+"-"+e.version+this.string({pool:t,length:3})+"-"+this.string({pool:"ab89",length:1})+this.string({pool:t,length:3})+"-"+this.string({pool:t,length:12})},c.prototype.hash=function(e){var t="upper"===(e=h(e,{length:40,casing:"lower"})).casing?s.toUpperCase():s;return this.string({pool:t,length:e.length})},c.prototype.luhn_check=function(e){var t=e.toString();return+t.substring(t.length-1)===this.luhn_calculate(+t.substring(0,t.length-1))},c.prototype.luhn_calculate=function(e){for(var t,n=e.toString().split("").reverse(),i=0,r=0,o=n.length;o>r;++r)t=+n[r],r%2==0&&(t*=2)>9&&(t-=9),i+=t;return 9*i%10},c.prototype.md5=function(e){var t={str:"",key:null,raw:!1};if(e)if("string"==typeof e)t.str=e,e={};else{if("object"!=typeof e)return null;if("Array"===e.constructor)return null}else t.str=this.string(),e={};if(!(t=h(e,t)).str)throw new Error("A parameter is required to return an md5 hash.");return this.bimd5.md5(t.str,t.key,t.raw)},c.prototype.file=function(e){var t,n=e||{},i="fileExtension",r=Object.keys(this.get("fileExtension"));if(t=this.word({length:n.length}),n.extension)return t+"."+n.extension;if(n.extensions){if(Array.isArray(n.extensions))return t+"."+this.pickone(n.extensions);if(n.extensions.constructor===Object){var o=n.extensions,s=Object.keys(o);return t+"."+this.pickone(o[this.pickone(s)])}throw new Error("Chance: Extensions must be an Array or Object")}if(n.fileType){var a=n.fileType;if(-1!==r.indexOf(a))return t+"."+this.pickone(this.get(i)[a]);throw new RangeError("Chance: Expect file type value to be 'raster', 'vector', '3d' or 'document'")}return t+"."+this.pickone(this.get(i)[this.pickone(r)])};var _={firstNames:{male:{en:["James","John","Robert","Michael","William","David","Richard","Joseph","Charles","Thomas","Christopher","Daniel","Matthew","George","Donald","Anthony","Paul","Mark","Edward","Steven","Kenneth","Andrew","Brian","Joshua","Kevin","Ronald","Timothy","Jason","Jeffrey","Frank","Gary","Ryan","Nicholas","Eric","Stephen","Jacob","Larry","Jonathan","Scott","Raymond","Justin","Brandon","Gregory","Samuel","Benjamin","Patrick","Jack","Henry","Walter","Dennis","Jerry","Alexander","Peter","Tyler","Douglas","Harold","Aaron","Jose","Adam","Arthur","Zachary","Carl","Nathan","Albert","Kyle","Lawrence","Joe","Willie","Gerald","Roger","Keith","Jeremy","Terry","Harry","Ralph","Sean","Jesse","Roy","Louis","Billy","Austin","Bruce","Eugene","Christian","Bryan","Wayne","Russell","Howard","Fred","Ethan","Jordan","Philip","Alan","Juan","Randy","Vincent","Bobby","Dylan","Johnny","Phillip","Victor","Clarence","Ernest","Martin","Craig","Stanley","Shawn","Travis","Bradley","Leonard","Earl","Gabriel","Jimmy","Francis","Todd","Noah","Danny","Dale","Cody","Carlos","Allen","Frederick","Logan","Curtis","Alex","Joel","Luis","Norman","Marvin","Glenn","Tony","Nathaniel","Rodney","Melvin","Alfred","Steve","Cameron","Chad","Edwin","Caleb","Evan","Antonio","Lee","Herbert","Jeffery","Isaac","Derek","Ricky","Marcus","Theodore","Elijah","Luke","Jesus","Eddie","Troy","Mike","Dustin","Ray","Adrian","Bernard","Leroy","Angel","Randall","Wesley","Ian","Jared","Mason","Hunter","Calvin","Oscar","Clifford","Jay","Shane","Ronnie","Barry","Lucas","Corey","Manuel","Leo","Tommy","Warren","Jackson","Isaiah","Connor","Don","Dean","Jon","Julian","Miguel","Bill","Lloyd","Charlie","Mitchell","Leon","Jerome","Darrell","Jeremiah","Alvin","Brett","Seth","Floyd","Jim","Blake","Micheal","Gordon","Trevor","Lewis","Erik","Edgar","Vernon","Devin","Gavin","Jayden","Chris","Clyde","Tom","Derrick","Mario","Brent","Marc","Herman","Chase","Dominic","Ricardo","Franklin","Maurice","Max","Aiden","Owen","Lester","Gilbert","Elmer","Gene","Francisco","Glen","Cory","Garrett","Clayton","Sam","Jorge","Chester","Alejandro","Jeff","Harvey","Milton","Cole","Ivan","Andre","Duane","Landon"],it:["Adolfo","Alberto","Aldo","Alessandro","Alessio","Alfredo","Alvaro","Andrea","Angelo","Angiolo","Antonino","Antonio","Attilio","Benito","Bernardo","Bruno","Carlo","Cesare","Christian","Claudio","Corrado","Cosimo","Cristian","Cristiano","Daniele","Dario","David","Davide","Diego","Dino","Domenico","Duccio","Edoardo","Elia","Elio","Emanuele","Emiliano","Emilio","Enrico","Enzo","Ettore","Fabio","Fabrizio","Federico","Ferdinando","Fernando","Filippo","Francesco","Franco","Gabriele","Giacomo","Giampaolo","Giampiero","Giancarlo","Gianfranco","Gianluca","Gianmarco","Gianni","Gino","Giorgio","Giovanni","Giuliano","Giulio","Giuseppe","Graziano","Gregorio","Guido","Iacopo","Jacopo","Lapo","Leonardo","Lorenzo","Luca","Luciano","Luigi","Manuel","Marcello","Marco","Marino","Mario","Massimiliano","Massimo","Matteo","Mattia","Maurizio","Mauro","Michele","Mirko","Mohamed","Nello","Neri","Niccolò","Nicola","Osvaldo","Otello","Paolo","Pier Luigi","Piero","Pietro","Raffaele","Remo","Renato","Renzo","Riccardo","Roberto","Rolando","Romano","Salvatore","Samuele","Sandro","Sergio","Silvano","Simone","Stefano","Thomas","Tommaso","Ubaldo","Ugo","Umberto","Valerio","Valter","Vasco","Vincenzo","Vittorio"],nl:["Aaron","Abel","Adam","Adriaan","Albert","Alexander","Ali","Arjen","Arno","Bart","Bas","Bastiaan","Benjamin","Bob","Boris","Bram","Brent","Cas","Casper","Chris","Christiaan","Cornelis","Daan","Daley","Damian","Dani","Daniel","Daniël","David","Dean","Dirk","Dylan","Egbert","Elijah","Erik","Erwin","Evert","Ezra","Fabian","Fedde","Finn","Florian","Floris","Frank","Frans","Frederik","Freek","Geert","Gerard","Gerben","Gerrit","Gijs","Guus","Hans","Hendrik","Henk","Herman","Hidde","Hugo","Jaap","Jan Jaap","Jan-Willem","Jack","Jacob","Jan","Jason","Jasper","Jayden","Jelle","Jelte","Jens","Jeroen","Jesse","Jim","Job","Joep","Johannes","John","Jonathan","Joris","Joshua","Joël","Julian","Kees","Kevin","Koen","Lars","Laurens","Leendert","Lennard","Lodewijk","Luc","Luca","Lucas","Lukas","Luuk","Maarten","Marcus","Martijn","Martin","Matthijs","Maurits","Max","Mees","Melle","Mick","Mika","Milan","Mohamed","Mohammed","Morris","Muhammed","Nathan","Nick","Nico","Niek","Niels","Noah","Noud","Olivier","Oscar","Owen","Paul","Pepijn","Peter","Pieter","Pim","Quinten","Reinier","Rens","Robin","Ruben","Sam","Samuel","Sander","Sebastiaan","Sem","Sep","Sepp","Siem","Simon","Stan","Stef","Steven","Stijn","Sven","Teun","Thijmen","Thijs","Thomas","Tijn","Tim","Timo","Tobias","Tom","Victor","Vince","Willem","Wim","Wouter","Yusuf"],fr:["Aaron","Abdon","Abel","Abélard","Abelin","Abondance","Abraham","Absalon","Acace","Achaire","Achille","Adalard","Adalbald","Adalbéron","Adalbert","Adalric","Adam","Adegrin","Adel","Adelin","Andelin","Adelphe","Adam","Adéodat","Adhémar","Adjutor","Adolphe","Adonis","Adon","Adrien","Agapet","Agathange","Agathon","Agilbert","Agénor","Agnan","Aignan","Agrippin","Aimable","Aimé","Alain","Alban","Albin","Aubin","Albéric","Albert","Albertet","Alcibiade","Alcide","Alcée","Alcime","Aldonce","Aldric","Aldéric","Aleaume","Alexandre","Alexis","Alix","Alliaume","Aleaume","Almine","Almire","Aloïs","Alphée","Alphonse","Alpinien","Alverède","Amalric","Amaury","Amandin","Amant","Ambroise","Amédée","Amélien","Amiel","Amour","Anaël","Anastase","Anatole","Ancelin","Andéol","Andoche","André","Andoche","Ange","Angelin","Angilbe","Anglebert","Angoustan","Anicet","Anne","Annibal","Ansbert","Anselme","Anthelme","Antheaume","Anthime","Antide","Antoine","Antonius","Antonin","Apollinaire","Apollon","Aquilin","Arcade","Archambaud","Archambeau","Archange","Archibald","Arian","Ariel","Ariste","Aristide","Armand","Armel","Armin","Arnould","Arnaud","Arolde","Arsène","Arsinoé","Arthaud","Arthème","Arthur","Ascelin","Athanase","Aubry","Audebert","Audouin","Audran","Audric","Auguste","Augustin","Aurèle","Aurélien","Aurian","Auxence","Axel","Aymard","Aymeric","Aymon","Aymond","Balthazar","Baptiste","Barnabé","Barthélemy","Bartimée","Basile","Bastien","Baudouin","Bénigne","Benjamin","Benoît","Bérenger","Bérard","Bernard","Bertrand","Blaise","Bon","Boniface","Bouchard","Brice","Brieuc","Bruno","Brunon","Calixte","Calliste","Camélien","Camille","Camillien","Candide","Caribert","Carloman","Cassandre","Cassien","Cédric","Céleste","Célestin","Célien","Césaire","César","Charles","Charlemagne","Childebert","Chilpéric","Chrétien","Christian","Christodule","Christophe","Chrysostome","Clarence","Claude","Claudien","Cléandre","Clément","Clotaire","Côme","Constance","Constant","Constantin","Corentin","Cyprien","Cyriaque","Cyrille","Cyril","Damien","Daniel","David","Delphin","Denis","Désiré","Didier","Dieudonné","Dimitri","Dominique","Dorian","Dorothée","Edgard","Edmond","Édouard","Éleuthère","Élie","Élisée","Émeric","Émile","Émilien","Emmanuel","Enguerrand","Épiphane","Éric","Esprit","Ernest","Étienne","Eubert","Eudes","Eudoxe","Eugène","Eusèbe","Eustache","Évariste","Évrard","Fabien","Fabrice","Falba","Félicité","Félix","Ferdinand","Fiacre","Fidèle","Firmin","Flavien","Flodoard","Florent","Florentin","Florestan","Florian","Fortuné","Foulques","Francisque","François","Français","Franciscus","Francs","Frédéric","Fulbert","Fulcran","Fulgence","Gabin","Gabriel","Gaël","Garnier","Gaston","Gaspard","Gatien","Gaud","Gautier","Gédéon","Geoffroy","Georges","Géraud","Gérard","Gerbert","Germain","Gervais","Ghislain","Gilbert","Gilles","Girart","Gislebert","Gondebaud","Gonthier","Gontran","Gonzague","Grégoire","Guérin","Gui","Guillaume","Gustave","Guy","Guyot","Hardouin","Hector","Hédelin","Hélier","Henri","Herbert","Herluin","Hervé","Hilaire","Hildebert","Hincmar","Hippolyte","Honoré","Hubert","Hugues","Innocent","Isabeau","Isidore","Jacques","Japhet","Jason","Jean","Jeannel","Jeannot","Jérémie","Jérôme","Joachim","Joanny","Job","Jocelyn","Joël","Johan","Jonas","Jonathan","Joseph","Josse","Josselin","Jourdain","Jude","Judicaël","Jules","Julien","Juste","Justin","Lambert","Landry","Laurent","Lazare","Léandre","Léon","Léonard","Léopold","Leu","Loup","Leufroy","Libère","Liétald","Lionel","Loïc","Longin","Lorrain","Lorraine","Lothaire","Louis","Loup","Luc","Lucas","Lucien","Ludolphe","Ludovic","Macaire","Malo","Mamert","Manassé","Marc","Marceau","Marcel","Marcelin","Marius","Marseille","Martial","Martin","Mathurin","Matthias","Mathias","Matthieu","Maugis","Maurice","Mauricet","Maxence","Maxime","Maximilien","Mayeul","Médéric","Melchior","Mence","Merlin","Mérovée","Michaël","Michel","Moïse","Morgan","Nathan","Nathanaël","Narcisse","Néhémie","Nestor","Nestor","Nicéphore","Nicolas","Noé","Noël","Norbert","Normand","Normands","Octave","Odilon","Odon","Oger","Olivier","Oury","Pacôme","Palémon","Parfait","Pascal","Paterne","Patrice","Paul","Pépin","Perceval","Philémon","Philibert","Philippe","Philothée","Pie","Pierre","Pierrick","Prosper","Quentin","Raoul","Raphaël","Raymond","Régis","Réjean","Rémi","Renaud","René","Reybaud","Richard","Robert","Roch","Rodolphe","Rodrigue","Roger","Roland","Romain","Romuald","Roméo","Rome","Ronan","Roselin","Salomon","Samuel","Savin","Savinien","Scholastique","Sébastien","Séraphin","Serge","Séverin","Sidoine","Sigebert","Sigismond","Silvère","Simon","Siméon","Sixte","Stanislas","Stéphane","Stephan","Sylvain","Sylvestre","Tancrède","Tanguy","Taurin","Théodore","Théodose","Théophile","Théophraste","Thibault","Thibert","Thierry","Thomas","Timoléon","Timothée","Titien","Tonnin","Toussaint","Trajan","Tristan","Turold","Tim","Ulysse","Urbain","Valentin","Valère","Valéry","Venance","Venant","Venceslas","Vianney","Victor","Victorien","Victorin","Vigile","Vincent","Vital","Vitalien","Vivien","Waleran","Wandrille","Xavier","Xénophon","Yves","Zacharie","Zaché","Zéphirin"]},female:{en:["Mary","Emma","Elizabeth","Minnie","Margaret","Ida","Alice","Bertha","Sarah","Annie","Clara","Ella","Florence","Cora","Martha","Laura","Nellie","Grace","Carrie","Maude","Mabel","Bessie","Jennie","Gertrude","Julia","Hattie","Edith","Mattie","Rose","Catherine","Lillian","Ada","Lillie","Helen","Jessie","Louise","Ethel","Lula","Myrtle","Eva","Frances","Lena","Lucy","Edna","Maggie","Pearl","Daisy","Fannie","Josephine","Dora","Rosa","Katherine","Agnes","Marie","Nora","May","Mamie","Blanche","Stella","Ellen","Nancy","Effie","Sallie","Nettie","Della","Lizzie","Flora","Susie","Maud","Mae","Etta","Harriet","Sadie","Caroline","Katie","Lydia","Elsie","Kate","Susan","Mollie","Alma","Addie","Georgia","Eliza","Lulu","Nannie","Lottie","Amanda","Belle","Charlotte","Rebecca","Ruth","Viola","Olive","Amelia","Hannah","Jane","Virginia","Emily","Matilda","Irene","Kathryn","Esther","Willie","Henrietta","Ollie","Amy","Rachel","Sara","Estella","Theresa","Augusta","Ora","Pauline","Josie","Lola","Sophia","Leona","Anne","Mildred","Ann","Beulah","Callie","Lou","Delia","Eleanor","Barbara","Iva","Louisa","Maria","Mayme","Evelyn","Estelle","Nina","Betty","Marion","Bettie","Dorothy","Luella","Inez","Lela","Rosie","Allie","Millie","Janie","Cornelia","Victoria","Ruby","Winifred","Alta","Celia","Christine","Beatrice","Birdie","Harriett","Mable","Myra","Sophie","Tillie","Isabel","Sylvia","Carolyn","Isabelle","Leila","Sally","Ina","Essie","Bertie","Nell","Alberta","Katharine","Lora","Rena","Mina","Rhoda","Mathilda","Abbie","Eula","Dollie","Hettie","Eunice","Fanny","Ola","Lenora","Adelaide","Christina","Lelia","Nelle","Sue","Johanna","Lilly","Lucinda","Minerva","Lettie","Roxie","Cynthia","Helena","Hilda","Hulda","Bernice","Genevieve","Jean","Cordelia","Marian","Francis","Jeanette","Adeline","Gussie","Leah","Lois","Lura","Mittie","Hallie","Isabella","Olga","Phoebe","Teresa","Hester","Lida","Lina","Winnie","Claudia","Marguerite","Vera","Cecelia","Bess","Emilie","Rosetta","Verna","Myrtie","Cecilia","Elva","Olivia","Ophelia","Georgie","Elnora","Violet","Adele","Lily","Linnie","Loretta","Madge","Polly","Virgie","Eugenia","Lucile","Lucille","Mabelle","Rosalie"],it:["Ada","Adriana","Alessandra","Alessia","Alice","Angela","Anna","Anna Maria","Annalisa","Annita","Annunziata","Antonella","Arianna","Asia","Assunta","Aurora","Barbara","Beatrice","Benedetta","Bianca","Bruna","Camilla","Carla","Carlotta","Carmela","Carolina","Caterina","Catia","Cecilia","Chiara","Cinzia","Clara","Claudia","Costanza","Cristina","Daniela","Debora","Diletta","Dina","Donatella","Elena","Eleonora","Elisa","Elisabetta","Emanuela","Emma","Eva","Federica","Fernanda","Fiorella","Fiorenza","Flora","Franca","Francesca","Gabriella","Gaia","Gemma","Giada","Gianna","Gina","Ginevra","Giorgia","Giovanna","Giulia","Giuliana","Giuseppa","Giuseppina","Grazia","Graziella","Greta","Ida","Ilaria","Ines","Iolanda","Irene","Irma","Isabella","Jessica","Laura","Lea","Letizia","Licia","Lidia","Liliana","Lina","Linda","Lisa","Livia","Loretta","Luana","Lucia","Luciana","Lucrezia","Luisa","Manuela","Mara","Marcella","Margherita","Maria","Maria Cristina","Maria Grazia","Maria Luisa","Maria Pia","Maria Teresa","Marina","Marisa","Marta","Martina","Marzia","Matilde","Melissa","Michela","Milena","Mirella","Monica","Natalina","Nella","Nicoletta","Noemi","Olga","Paola","Patrizia","Piera","Pierina","Raffaella","Rebecca","Renata","Rina","Rita","Roberta","Rosa","Rosanna","Rossana","Rossella","Sabrina","Sandra","Sara","Serena","Silvana","Silvia","Simona","Simonetta","Sofia","Sonia","Stefania","Susanna","Teresa","Tina","Tiziana","Tosca","Valentina","Valeria","Vanda","Vanessa","Vanna","Vera","Veronica","Vilma","Viola","Virginia","Vittoria"],nl:["Ada","Arianne","Afke","Amanda","Amber","Amy","Aniek","Anita","Anja","Anna","Anne","Annelies","Annemarie","Annette","Anouk","Astrid","Aukje","Barbara","Bianca","Carla","Carlijn","Carolien","Chantal","Charlotte","Claudia","Daniëlle","Debora","Diane","Dora","Eline","Elise","Ella","Ellen","Emma","Esmee","Evelien","Esther","Erica","Eva","Femke","Fleur","Floor","Froukje","Gea","Gerda","Hanna","Hanneke","Heleen","Hilde","Ilona","Ina","Inge","Ingrid","Iris","Isabel","Isabelle","Janneke","Jasmijn","Jeanine","Jennifer","Jessica","Johanna","Joke","Julia","Julie","Karen","Karin","Katja","Kim","Lara","Laura","Lena","Lianne","Lieke","Lilian","Linda","Lisa","Lisanne","Lotte","Louise","Maaike","Manon","Marga","Maria","Marissa","Marit","Marjolein","Martine","Marleen","Melissa","Merel","Miranda","Michelle","Mirjam","Mirthe","Naomi","Natalie","Nienke","Nina","Noortje","Olivia","Patricia","Paula","Paulien","Ramona","Ria","Rianne","Roos","Rosanne","Ruth","Sabrina","Sandra","Sanne","Sara","Saskia","Silvia","Sofia","Sophie","Sonja","Suzanne","Tamara","Tess","Tessa","Tineke","Valerie","Vanessa","Veerle","Vera","Victoria","Wendy","Willeke","Yvonne","Zoë"],fr:["Abdon","Abel","Abigaëlle","Abigaïl","Acacius","Acanthe","Adalbert","Adalsinde","Adegrine","Adélaïde","Adèle","Adélie","Adeline","Adeltrude","Adolphe","Adonis","Adrastée","Adrehilde","Adrienne","Agathe","Agilbert","Aglaé","Aignan","Agneflète","Agnès","Agrippine","Aimé","Alaine","Alaïs","Albane","Albérade","Alberte","Alcide","Alcine","Alcyone","Aldegonde","Aleth","Alexandrine","Alexine","Alice","Aliénor","Aliette","Aline","Alix","Alizé","Aloïse","Aloyse","Alphonsine","Althée","Amaliane","Amalthée","Amande","Amandine","Amant","Amarande","Amaranthe","Amaryllis","Ambre","Ambroisie","Amélie","Améthyste","Aminte","Anaël","Anaïs","Anastasie","Anatole","Ancelin","Andrée","Anémone","Angadrême","Angèle","Angeline","Angélique","Angilbert","Anicet","Annabelle","Anne","Annette","Annick","Annie","Annonciade","Ansbert","Anstrudie","Anthelme","Antigone","Antoinette","Antonine","Aphélie","Apolline","Apollonie","Aquiline","Arabelle","Arcadie","Archange","Argine","Ariane","Aricie","Ariel","Arielle","Arlette","Armance","Armande","Armandine","Armelle","Armide","Armelle","Armin","Arnaud","Arsène","Arsinoé","Artémis","Arthur","Ascelin","Ascension","Assomption","Astarté","Astérie","Astrée","Astrid","Athalie","Athanasie","Athina","Aube","Albert","Aude","Audrey","Augustine","Aure","Aurélie","Aurélien","Aurèle","Aurore","Auxence","Aveline","Abigaëlle","Avoye","Axelle","Aymard","Azalée","Adèle","Adeline","Barbe","Basilisse","Bathilde","Béatrice","Béatrix","Bénédicte","Bérengère","Bernadette","Berthe","Bertille","Beuve","Blanche","Blanc","Blandine","Brigitte","Brune","Brunehilde","Callista","Camille","Capucine","Carine","Caroline","Cassandre","Catherine","Cécile","Céleste","Célestine","Céline","Chantal","Charlène","Charline","Charlotte","Chloé","Christelle","Christiane","Christine","Claire","Clara","Claude","Claudine","Clarisse","Clémence","Clémentine","Cléo","Clio","Clotilde","Coline","Conception","Constance","Coralie","Coraline","Corentine","Corinne","Cyrielle","Daniel","Daniel","Daphné","Débora","Delphine","Denise","Diane","Dieudonné","Dominique","Doriane","Dorothée","Douce","Édith","Edmée","Éléonore","Éliane","Élia","Éliette","Élisabeth","Élise","Ella","Élodie","Éloïse","Elsa","Émeline","Émérance","Émérentienne","Émérencie","Émilie","Emma","Emmanuelle","Emmelie","Ernestine","Esther","Estelle","Eudoxie","Eugénie","Eulalie","Euphrasie","Eusébie","Évangéline","Eva","Ève","Évelyne","Fanny","Fantine","Faustine","Félicie","Fernande","Flavie","Fleur","Flore","Florence","Florie","Fortuné","France","Francia","Françoise","Francine","Gabrielle","Gaëlle","Garance","Geneviève","Georgette","Gerberge","Germaine","Gertrude","Gisèle","Guenièvre","Guilhemine","Guillemette","Gustave","Gwenael","Hélène","Héloïse","Henriette","Hermine","Hermione","Hippolyte","Honorine","Hortense","Huguette","Ines","Irène","Irina","Iris","Isabeau","Isabelle","Iseult","Isolde","Ismérie","Jacinthe","Jacqueline","Jade","Janine","Jeanne","Jocelyne","Joëlle","Joséphine","Judith","Julia","Julie","Jules","Juliette","Justine","Katy","Kathy","Katie","Laura","Laure","Laureline","Laurence","Laurene","Lauriane","Laurianne","Laurine","Léa","Léna","Léonie","Léon","Léontine","Lorraine","Lucie","Lucienne","Lucille","Ludivine","Lydie","Lydie","Megane","Madeleine","Magali","Maguelone","Mallaury","Manon","Marceline","Margot","Marguerite","Marianne","Marie","Myriam","Marie","Marine","Marion","Marlène","Marthe","Martine","Mathilde","Maud","Maureen","Mauricette","Maxime","Mélanie","Melissa","Mélissandre","Mélisande","Mélodie","Michel","Micheline","Mireille","Miriam","Moïse","Monique","Morgane","Muriel","Mylène","Nadège","Nadine","Nathalie","Nicole","Nicolette","Nine","Noël","Noémie","Océane","Odette","Odile","Olive","Olivia","Olympe","Ombline","Ombeline","Ophélie","Oriande","Oriane","Ozanne","Pascale","Pascaline","Paule","Paulette","Pauline","Priscille","Prisca","Prisque","Pécine","Pélagie","Pénélope","Perrine","Pétronille","Philippine","Philomène","Philothée","Primerose","Prudence","Pulchérie","Quentine","Quiéta","Quintia","Quintilla","Rachel","Raphaëlle","Raymonde","Rebecca","Régine","Réjeanne","René","Rita","Rita","Rolande","Romane","Rosalie","Rose","Roseline","Sabine","Salomé","Sandra","Sandrine","Sarah","Ségolène","Séverine","Sibylle","Simone","Sixt","Solange","Soline","Solène","Sophie","Stéphanie","Suzanne","Sylvain","Sylvie","Tatiana","Thaïs","Théodora","Thérèse","Tiphaine","Ursule","Valentine","Valérie","Véronique","Victoire","Victorine","Vinciane","Violette","Virginie","Viviane","Xavière","Yolande","Ysaline","Yvette","Yvonne","Zélie","Zita","Zoé"]}},lastNames:{en:["Smith","Johnson","Williams","Jones","Brown","Davis","Miller","Wilson","Moore","Taylor","Anderson","Thomas","Jackson","White","Harris","Martin","Thompson","Garcia","Martinez","Robinson","Clark","Rodriguez","Lewis","Lee","Walker","Hall","Allen","Young","Hernandez","King","Wright","Lopez","Hill","Scott","Green","Adams","Baker","Gonzalez","Nelson","Carter","Mitchell","Perez","Roberts","Turner","Phillips","Campbell","Parker","Evans","Edwards","Collins","Stewart","Sanchez","Morris","Rogers","Reed","Cook","Morgan","Bell","Murphy","Bailey","Rivera","Cooper","Richardson","Cox","Howard","Ward","Torres","Peterson","Gray","Ramirez","James","Watson","Brooks","Kelly","Sanders","Price","Bennett","Wood","Barnes","Ross","Henderson","Coleman","Jenkins","Perry","Powell","Long","Patterson","Hughes","Flores","Washington","Butler","Simmons","Foster","Gonzales","Bryant","Alexander","Russell","Griffin","Diaz","Hayes","Myers","Ford","Hamilton","Graham","Sullivan","Wallace","Woods","Cole","West","Jordan","Owens","Reynolds","Fisher","Ellis","Harrison","Gibson","McDonald","Cruz","Marshall","Ortiz","Gomez","Murray","Freeman","Wells","Webb","Simpson","Stevens","Tucker","Porter","Hunter","Hicks","Crawford","Henry","Boyd","Mason","Morales","Kennedy","Warren","Dixon","Ramos","Reyes","Burns","Gordon","Shaw","Holmes","Rice","Robertson","Hunt","Black","Daniels","Palmer","Mills","Nichols","Grant","Knight","Ferguson","Rose","Stone","Hawkins","Dunn","Perkins","Hudson","Spencer","Gardner","Stephens","Payne","Pierce","Berry","Matthews","Arnold","Wagner","Willis","Ray","Watkins","Olson","Carroll","Duncan","Snyder","Hart","Cunningham","Bradley","Lane","Andrews","Ruiz","Harper","Fox","Riley","Armstrong","Carpenter","Weaver","Greene","Lawrence","Elliott","Chavez","Sims","Austin","Peters","Kelley","Franklin","Lawson","Fields","Gutierrez","Ryan","Schmidt","Carr","Vasquez","Castillo","Wheeler","Chapman","Oliver","Montgomery","Richards","Williamson","Johnston","Banks","Meyer","Bishop","McCoy","Howell","Alvarez","Morrison","Hansen","Fernandez","Garza","Harvey","Little","Burton","Stanley","Nguyen","George","Jacobs","Reid","Kim","Fuller","Lynch","Dean","Gilbert","Garrett","Romero","Welch","Larson","Frazier","Burke","Hanson","Day","Mendoza","Moreno","Bowman","Medina","Fowler","Brewer","Hoffman","Carlson","Silva","Pearson","Holland","Douglas","Fleming","Jensen","Vargas","Byrd","Davidson","Hopkins","May","Terry","Herrera","Wade","Soto","Walters","Curtis","Neal","Caldwell","Lowe","Jennings","Barnett","Graves","Jimenez","Horton","Shelton","Barrett","Obrien","Castro","Sutton","Gregory","McKinney","Lucas","Miles","Craig","Rodriquez","Chambers","Holt","Lambert","Fletcher","Watts","Bates","Hale","Rhodes","Pena","Beck","Newman","Haynes","McDaniel","Mendez","Bush","Vaughn","Parks","Dawson","Santiago","Norris","Hardy","Love","Steele","Curry","Powers","Schultz","Barker","Guzman","Page","Munoz","Ball","Keller","Chandler","Weber","Leonard","Walsh","Lyons","Ramsey","Wolfe","Schneider","Mullins","Benson","Sharp","Bowen","Daniel","Barber","Cummings","Hines","Baldwin","Griffith","Valdez","Hubbard","Salazar","Reeves","Warner","Stevenson","Burgess","Santos","Tate","Cross","Garner","Mann","Mack","Moss","Thornton","Dennis","McGee","Farmer","Delgado","Aguilar","Vega","Glover","Manning","Cohen","Harmon","Rodgers","Robbins","Newton","Todd","Blair","Higgins","Ingram","Reese","Cannon","Strickland","Townsend","Potter","Goodwin","Walton","Rowe","Hampton","Ortega","Patton","Swanson","Joseph","Francis","Goodman","Maldonado","Yates","Becker","Erickson","Hodges","Rios","Conner","Adkins","Webster","Norman","Malone","Hammond","Flowers","Cobb","Moody","Quinn","Blake","Maxwell","Pope","Floyd","Osborne","Paul","McCarthy","Guerrero","Lindsey","Estrada","Sandoval","Gibbs","Tyler","Gross","Fitzgerald","Stokes","Doyle","Sherman","Saunders","Wise","Colon","Gill","Alvarado","Greer","Padilla","Simon","Waters","Nunez","Ballard","Schwartz","McBride","Houston","Christensen","Klein","Pratt","Briggs","Parsons","McLaughlin","Zimmerman","French","Buchanan","Moran","Copeland","Roy","Pittman","Brady","McCormick","Holloway","Brock","Poole","Frank","Logan","Owen","Bass","Marsh","Drake","Wong","Jefferson","Park","Morton","Abbott","Sparks","Patrick","Norton","Huff","Clayton","Massey","Lloyd","Figueroa","Carson","Bowers","Roberson","Barton","Tran","Lamb","Harrington","Casey","Boone","Cortez","Clarke","Mathis","Singleton","Wilkins","Cain","Bryan","Underwood","Hogan","McKenzie","Collier","Luna","Phelps","McGuire","Allison","Bridges","Wilkerson","Nash","Summers","Atkins"],it:["Acciai","Aglietti","Agostini","Agresti","Ahmed","Aiazzi","Albanese","Alberti","Alessi","Alfani","Alinari","Alterini","Amato","Ammannati","Ancillotti","Andrei","Andreini","Andreoni","Angeli","Anichini","Antonelli","Antonini","Arena","Ariani","Arnetoli","Arrighi","Baccani","Baccetti","Bacci","Bacherini","Badii","Baggiani","Baglioni","Bagni","Bagnoli","Baldassini","Baldi","Baldini","Ballerini","Balli","Ballini","Balloni","Bambi","Banchi","Bandinelli","Bandini","Bani","Barbetti","Barbieri","Barchielli","Bardazzi","Bardelli","Bardi","Barducci","Bargellini","Bargiacchi","Barni","Baroncelli","Baroncini","Barone","Baroni","Baronti","Bartalesi","Bartoletti","Bartoli","Bartolini","Bartoloni","Bartolozzi","Basagni","Basile","Bassi","Batacchi","Battaglia","Battaglini","Bausi","Becagli","Becattini","Becchi","Becucci","Bellandi","Bellesi","Belli","Bellini","Bellucci","Bencini","Benedetti","Benelli","Beni","Benini","Bensi","Benucci","Benvenuti","Berlincioni","Bernacchioni","Bernardi","Bernardini","Berni","Bernini","Bertelli","Berti","Bertini","Bessi","Betti","Bettini","Biagi","Biagini","Biagioni","Biagiotti","Biancalani","Bianchi","Bianchini","Bianco","Biffoli","Bigazzi","Bigi","Biliotti","Billi","Binazzi","Bindi","Bini","Biondi","Bizzarri","Bocci","Bogani","Bolognesi","Bonaiuti","Bonanni","Bonciani","Boncinelli","Bondi","Bonechi","Bongini","Boni","Bonini","Borchi","Boretti","Borghi","Borghini","Borgioli","Borri","Borselli","Boschi","Bottai","Bracci","Braccini","Brandi","Braschi","Bravi","Brazzini","Breschi","Brilli","Brizzi","Brogelli","Brogi","Brogioni","Brunelli","Brunetti","Bruni","Bruno","Brunori","Bruschi","Bucci","Bucciarelli","Buccioni","Bucelli","Bulli","Burberi","Burchi","Burgassi","Burroni","Bussotti","Buti","Caciolli","Caiani","Calabrese","Calamai","Calamandrei","Caldini","Calo'","Calonaci","Calosi","Calvelli","Cambi","Camiciottoli","Cammelli","Cammilli","Campolmi","Cantini","Capanni","Capecchi","Caponi","Cappelletti","Cappelli","Cappellini","Cappugi","Capretti","Caputo","Carbone","Carboni","Cardini","Carlesi","Carletti","Carli","Caroti","Carotti","Carrai","Carraresi","Carta","Caruso","Casalini","Casati","Caselli","Casini","Castagnoli","Castellani","Castelli","Castellucci","Catalano","Catarzi","Catelani","Cavaciocchi","Cavallaro","Cavallini","Cavicchi","Cavini","Ceccarelli","Ceccatelli","Ceccherelli","Ceccherini","Cecchi","Cecchini","Cecconi","Cei","Cellai","Celli","Cellini","Cencetti","Ceni","Cenni","Cerbai","Cesari","Ceseri","Checcacci","Checchi","Checcucci","Cheli","Chellini","Chen","Cheng","Cherici","Cherubini","Chiaramonti","Chiarantini","Chiarelli","Chiari","Chiarini","Chiarugi","Chiavacci","Chiesi","Chimenti","Chini","Chirici","Chiti","Ciabatti","Ciampi","Cianchi","Cianfanelli","Cianferoni","Ciani","Ciapetti","Ciappi","Ciardi","Ciatti","Cicali","Ciccone","Cinelli","Cini","Ciobanu","Ciolli","Cioni","Cipriani","Cirillo","Cirri","Ciucchi","Ciuffi","Ciulli","Ciullini","Clemente","Cocchi","Cognome","Coli","Collini","Colombo","Colzi","Comparini","Conforti","Consigli","Conte","Conti","Contini","Coppini","Coppola","Corsi","Corsini","Corti","Cortini","Cosi","Costa","Costantini","Costantino","Cozzi","Cresci","Crescioli","Cresti","Crini","Curradi","D'Agostino","D'Alessandro","D'Amico","D'Angelo","Daddi","Dainelli","Dallai","Danti","Davitti","De Angelis","De Luca","De Marco","De Rosa","De Santis","De Simone","De Vita","Degl'Innocenti","Degli Innocenti","Dei","Del Lungo","Del Re","Di Marco","Di Stefano","Dini","Diop","Dobre","Dolfi","Donati","Dondoli","Dong","Donnini","Ducci","Dumitru","Ermini","Esposito","Evangelisti","Fabbri","Fabbrini","Fabbrizzi","Fabbroni","Fabbrucci","Fabiani","Facchini","Faggi","Fagioli","Failli","Faini","Falciani","Falcini","Falcone","Fallani","Falorni","Falsini","Falugiani","Fancelli","Fanelli","Fanetti","Fanfani","Fani","Fantappie'","Fantechi","Fanti","Fantini","Fantoni","Farina","Fattori","Favilli","Fedi","Fei","Ferrante","Ferrara","Ferrari","Ferraro","Ferretti","Ferri","Ferrini","Ferroni","Fiaschi","Fibbi","Fiesoli","Filippi","Filippini","Fini","Fioravanti","Fiore","Fiorentini","Fiorini","Fissi","Focardi","Foggi","Fontana","Fontanelli","Fontani","Forconi","Formigli","Forte","Forti","Fortini","Fossati","Fossi","Francalanci","Franceschi","Franceschini","Franchi","Franchini","Franci","Francini","Francioni","Franco","Frassineti","Frati","Fratini","Frilli","Frizzi","Frosali","Frosini","Frullini","Fusco","Fusi","Gabbrielli","Gabellini","Gagliardi","Galanti","Galardi","Galeotti","Galletti","Galli","Gallo","Gallori","Gambacciani","Gargani","Garofalo","Garuglieri","Gashi","Gasperini","Gatti","Gelli","Gensini","Gentile","Gentili","Geri","Gerini","Gheri","Ghini","Giachetti","Giachi","Giacomelli","Gianassi","Giani","Giannelli","Giannetti","Gianni","Giannini","Giannoni","Giannotti","Giannozzi","Gigli","Giordano","Giorgetti","Giorgi","Giovacchini","Giovannelli","Giovannetti","Giovannini","Giovannoni","Giuliani","Giunti","Giuntini","Giusti","Gonnelli","Goretti","Gori","Gradi","Gramigni","Grassi","Grasso","Graziani","Grazzini","Greco","Grifoni","Grillo","Grimaldi","Grossi","Gualtieri","Guarducci","Guarino","Guarnieri","Guasti","Guerra","Guerri","Guerrini","Guidi","Guidotti","He","Hoxha","Hu","Huang","Iandelli","Ignesti","Innocenti","Jin","La Rosa","Lai","Landi","Landini","Lanini","Lapi","Lapini","Lari","Lascialfari","Lastrucci","Latini","Lazzeri","Lazzerini","Lelli","Lenzi","Leonardi","Leoncini","Leone","Leoni","Lepri","Li","Liao","Lin","Linari","Lippi","Lisi","Livi","Lombardi","Lombardini","Lombardo","Longo","Lopez","Lorenzi","Lorenzini","Lorini","Lotti","Lu","Lucchesi","Lucherini","Lunghi","Lupi","Madiai","Maestrini","Maffei","Maggi","Maggini","Magherini","Magini","Magnani","Magnelli","Magni","Magnolfi","Magrini","Malavolti","Malevolti","Manca","Mancini","Manetti","Manfredi","Mangani","Mannelli","Manni","Mannini","Mannucci","Manuelli","Manzini","Marcelli","Marchese","Marchetti","Marchi","Marchiani","Marchionni","Marconi","Marcucci","Margheri","Mari","Mariani","Marilli","Marinai","Marinari","Marinelli","Marini","Marino","Mariotti","Marsili","Martelli","Martinelli","Martini","Martino","Marzi","Masi","Masini","Masoni","Massai","Materassi","Mattei","Matteini","Matteucci","Matteuzzi","Mattioli","Mattolini","Matucci","Mauro","Mazzanti","Mazzei","Mazzetti","Mazzi","Mazzini","Mazzocchi","Mazzoli","Mazzoni","Mazzuoli","Meacci","Mecocci","Meini","Melani","Mele","Meli","Mengoni","Menichetti","Meoni","Merlini","Messeri","Messina","Meucci","Miccinesi","Miceli","Micheli","Michelini","Michelozzi","Migliori","Migliorini","Milani","Miniati","Misuri","Monaco","Montagnani","Montagni","Montanari","Montelatici","Monti","Montigiani","Montini","Morandi","Morandini","Morelli","Moretti","Morganti","Mori","Morini","Moroni","Morozzi","Mugnai","Mugnaini","Mustafa","Naldi","Naldini","Nannelli","Nanni","Nannini","Nannucci","Nardi","Nardini","Nardoni","Natali","Ndiaye","Nencetti","Nencini","Nencioni","Neri","Nesi","Nesti","Niccolai","Niccoli","Niccolini","Nigi","Nistri","Nocentini","Noferini","Novelli","Nucci","Nuti","Nutini","Oliva","Olivieri","Olmi","Orlandi","Orlandini","Orlando","Orsini","Ortolani","Ottanelli","Pacciani","Pace","Paci","Pacini","Pagani","Pagano","Paggetti","Pagliai","Pagni","Pagnini","Paladini","Palagi","Palchetti","Palloni","Palmieri","Palumbo","Pampaloni","Pancani","Pandolfi","Pandolfini","Panerai","Panichi","Paoletti","Paoli","Paolini","Papi","Papini","Papucci","Parenti","Parigi","Parisi","Parri","Parrini","Pasquini","Passeri","Pecchioli","Pecorini","Pellegrini","Pepi","Perini","Perrone","Peruzzi","Pesci","Pestelli","Petri","Petrini","Petrucci","Pettini","Pezzati","Pezzatini","Piani","Piazza","Piazzesi","Piazzini","Piccardi","Picchi","Piccini","Piccioli","Pieraccini","Pieraccioni","Pieralli","Pierattini","Pieri","Pierini","Pieroni","Pietrini","Pini","Pinna","Pinto","Pinzani","Pinzauti","Piras","Pisani","Pistolesi","Poggesi","Poggi","Poggiali","Poggiolini","Poli","Pollastri","Porciani","Pozzi","Pratellesi","Pratesi","Prosperi","Pruneti","Pucci","Puccini","Puccioni","Pugi","Pugliese","Puliti","Querci","Quercioli","Raddi","Radu","Raffaelli","Ragazzini","Ranfagni","Ranieri","Rastrelli","Raugei","Raveggi","Renai","Renzi","Rettori","Ricci","Ricciardi","Ridi","Ridolfi","Rigacci","Righi","Righini","Rinaldi","Risaliti","Ristori","Rizzo","Rocchi","Rocchini","Rogai","Romagnoli","Romanelli","Romani","Romano","Romei","Romeo","Romiti","Romoli","Romolini","Rontini","Rosati","Roselli","Rosi","Rossetti","Rossi","Rossini","Rovai","Ruggeri","Ruggiero","Russo","Sabatini","Saccardi","Sacchetti","Sacchi","Sacco","Salerno","Salimbeni","Salucci","Salvadori","Salvestrini","Salvi","Salvini","Sanesi","Sani","Sanna","Santi","Santini","Santoni","Santoro","Santucci","Sardi","Sarri","Sarti","Sassi","Sbolci","Scali","Scarpelli","Scarselli","Scopetani","Secci","Selvi","Senatori","Senesi","Serafini","Sereni","Serra","Sestini","Sguanci","Sieni","Signorini","Silvestri","Simoncini","Simonetti","Simoni","Singh","Sodi","Soldi","Somigli","Sorbi","Sorelli","Sorrentino","Sottili","Spina","Spinelli","Staccioli","Staderini","Stefanelli","Stefani","Stefanini","Stella","Susini","Tacchi","Tacconi","Taddei","Tagliaferri","Tamburini","Tanganelli","Tani","Tanini","Tapinassi","Tarchi","Tarchiani","Targioni","Tassi","Tassini","Tempesti","Terzani","Tesi","Testa","Testi","Tilli","Tinti","Tirinnanzi","Toccafondi","Tofanari","Tofani","Tognaccini","Tonelli","Tonini","Torelli","Torrini","Tosi","Toti","Tozzi","Trambusti","Trapani","Tucci","Turchi","Ugolini","Ulivi","Valente","Valenti","Valentini","Vangelisti","Vanni","Vannini","Vannoni","Vannozzi","Vannucchi","Vannucci","Ventura","Venturi","Venturini","Vestri","Vettori","Vichi","Viciani","Vieri","Vigiani","Vignoli","Vignolini","Vignozzi","Villani","Vinci","Visani","Vitale","Vitali","Viti","Viviani","Vivoli","Volpe","Volpi","Wang","Wu","Xu","Yang","Ye","Zagli","Zani","Zanieri","Zanobini","Zecchi","Zetti","Zhang","Zheng","Zhou","Zhu","Zingoni","Zini","Zoppi"],nl:["Albers","Alblas","Appelman","Baars","Baas","Bakker","Blank","Bleeker","Blok","Blom","Boer","Boers","Boldewijn","Boon","Boot","Bos","Bosch","Bosma","Bosman","Bouma","Bouman","Bouwman","Brands","Brouwer","Burger","Buijs","Buitenhuis","Ceder","Cohen","Dekker","Dekkers","Dijkman","Dijkstra","Driessen","Drost","Engel","Evers","Faber","Franke","Gerritsen","Goedhart","Goossens","Groen","Groenenberg","Groot","Haan","Hart","Heemskerk","Hendriks","Hermans","Hoekstra","Hofman","Hopman","Huisman","Jacobs","Jansen","Janssen","Jonker","Jaspers","Keijzer","Klaassen","Klein","Koek","Koenders","Kok","Kool","Koopman","Koopmans","Koning","Koster","Kramer","Kroon","Kuijpers","Kuiper","Kuipers","Kurt","Koster","Kwakman","Los","Lubbers","Maas","Markus","Martens","Meijer","Mol","Molenaar","Mulder","Nieuwenhuis","Peeters","Peters","Pengel","Pieters","Pool","Post","Postma","Prins","Pronk","Reijnders","Rietveld","Roest","Roos","Sanders","Schaap","Scheffer","Schenk","Schilder","Schipper","Schmidt","Scholten","Schouten","Schut","Schutte","Schuurman","Simons","Smeets","Smit","Smits","Snel","Swinkels","Tas","Terpstra","Timmermans","Tol","Tromp","Troost","Valk","Veenstra","Veldkamp","Verbeek","Verheul","Verhoeven","Vermeer","Vermeulen","Verweij","Vink","Visser","Voorn","Vos","Wagenaar","Wiersema","Willems","Willemsen","Witteveen","Wolff","Wolters","Zijlstra","Zwart","de Beer","de Boer","de Bruijn","de Bruin","de Graaf","de Groot","de Haan","de Haas","de Jager","de Jong","de Jonge","de Koning","de Lange","de Leeuw","de Ridder","de Rooij","de Ruiter","de Vos","de Vries","de Waal","de Wit","de Zwart","van Beek","van Boven","van Dam","van Dijk","van Dongen","van Doorn","van Egmond","van Eijk","van Es","van Gelder","van Gelderen","van Houten","van Hulst","van Kempen","van Kesteren","van Leeuwen","van Loon","van Mill","van Noord","van Ommen","van Ommeren","van Oosten","van Oostveen","van Rijn","van Schaik","van Veen","van Vliet","van Wijk","van Wijngaarden","van den Poel","van de Pol","van den Ploeg","van de Ven","van den Berg","van den Bosch","van den Brink","van den Broek","van den Heuvel","van der Heijden","van der Horst","van der Hulst","van der Kroon","van der Laan","van der Linden","van der Meer","van der Meij","van der Meulen","van der Molen","van der Sluis","van der Spek","van der Veen","van der Velde","van der Velden","van der Vliet","van der Wal"],uk:["Smith","Jones","Williams","Taylor","Brown","Davies","Evans","Wilson","Thomas","Johnson","Roberts","Robinson","Thompson","Wright","Walker","White","Edwards","Hughes","Green","Hall","Lewis","Harris","Clarke","Patel","Jackson","Wood","Turner","Martin","Cooper","Hill","Ward","Morris","Moore","Clark","Lee","King","Baker","Harrison","Morgan","Allen","James","Scott","Phillips","Watson","Davis","Parker","Price","Bennett","Young","Griffiths","Mitchell","Kelly","Cook","Carter","Richardson","Bailey","Collins","Bell","Shaw","Murphy","Miller","Cox","Richards","Khan","Marshall","Anderson","Simpson","Ellis","Adams","Singh","Begum","Wilkinson","Foster","Chapman","Powell","Webb","Rogers","Gray","Mason","Ali","Hunt","Hussain","Campbell","Matthews","Owen","Palmer","Holmes","Mills","Barnes","Knight","Lloyd","Butler","Russell","Barker","Fisher","Stevens","Jenkins","Murray","Dixon","Harvey","Graham","Pearson","Ahmed","Fletcher","Walsh","Kaur","Gibson","Howard","Andrews","Stewart","Elliott","Reynolds","Saunders","Payne","Fox","Ford","Pearce","Day","Brooks","West","Lawrence","Cole","Atkinson","Bradley","Spencer","Gill","Dawson","Ball","Burton","O'brien","Watts","Rose","Booth","Perry","Ryan","Grant","Wells","Armstrong","Francis","Rees","Hayes","Hart","Hudson","Newman","Barrett","Webster","Hunter","Gregory","Carr","Lowe","Page","Marsh","Riley","Dunn","Woods","Parsons","Berry","Stone","Reid","Holland","Hawkins","Harding","Porter","Robertson","Newton","Oliver","Reed","Kennedy","Williamson","Bird","Gardner","Shah","Dean","Lane","Cooke","Bates","Henderson","Parry","Burgess","Bishop","Walton","Burns","Nicholson","Shepherd","Ross","Cross","Long","Freeman","Warren","Nicholls","Hamilton","Byrne","Sutton","Mcdonald","Yates","Hodgson","Robson","Curtis","Hopkins","O'connor","Harper","Coleman","Watkins","Moss","Mccarthy","Chambers","O'neill","Griffin","Sharp","Hardy","Wheeler","Potter","Osborne","Johnston","Gordon","Doyle","Wallace","George","Jordan","Hutchinson","Rowe","Burke","May","Pritchard","Gilbert","Willis","Higgins","Read","Miles","Stevenson","Stephenson","Hammond","Arnold","Buckley","Walters","Hewitt","Barber","Nelson","Slater","Austin","Sullivan","Whitehead","Mann","Frost","Lambert","Stephens","Blake","Akhtar","Lynch","Goodwin","Barton","Woodward","Thomson","Cunningham","Quinn","Barnett","Baxter","Bibi","Clayton","Nash","Greenwood","Jennings","Holt","Kemp","Poole","Gallagher","Bond","Stokes","Tucker","Davidson","Fowler","Heath","Norman","Middleton","Lawson","Banks","French","Stanley","Jarvis","Gibbs","Ferguson","Hayward","Carroll","Douglas","Dickinson","Todd","Barlow","Peters","Lucas","Knowles","Hartley","Miah","Simmons","Morton","Alexander","Field","Morrison","Norris","Townsend","Preston","Hancock","Thornton","Baldwin","Burrows","Briggs","Parkinson","Reeves","Macdonald","Lamb","Black","Abbott","Sanders","Thorpe","Holden","Tomlinson","Perkins","Ashton","Rhodes","Fuller","Howe","Bryant","Vaughan","Dale","Davey","Weston","Bartlett","Whittaker","Davison","Kent","Skinner","Birch","Morley","Daniels","Glover","Howell","Cartwright","Pugh","Humphreys","Goddard","Brennan","Wall","Kirby","Bowen","Savage","Bull","Wong","Dobson","Smart","Wilkins","Kirk","Fraser","Duffy","Hicks","Patterson","Bradshaw","Little","Archer","Warner","Waters","O'sullivan","Farrell","Brookes","Atkins","Kay","Dodd","Bentley","Flynn","John","Schofield","Short","Haynes","Wade","Butcher","Henry","Sanderson","Crawford","Sheppard","Bolton","Coates","Giles","Gould","Houghton","Gibbons","Pratt","Manning","Law","Hooper","Noble","Dyer","Rahman","Clements","Moran","Sykes","Chan","Doherty","Connolly","Joyce","Franklin","Hobbs","Coles","Herbert","Steele","Kerr","Leach","Winter","Owens","Duncan","Naylor","Fleming","Horton","Finch","Fitzgerald","Randall","Carpenter","Marsden","Browne","Garner","Pickering","Hale","Dennis","Vincent","Chadwick","Chandler","Sharpe","Nolan","Lyons","Hurst","Collier","Peacock","Howarth","Faulkner","Rice","Pollard","Welch","Norton","Gough","Sinclair","Blackburn","Bryan","Conway","Power","Cameron","Daly","Allan","Hanson","Gardiner","Boyle","Myers","Turnbull","Wallis","Mahmood","Sims","Swift","Iqbal","Pope","Brady","Chamberlain","Rowley","Tyler","Farmer","Metcalfe","Hilton","Godfrey","Holloway","Parkin","Bray","Talbot","Donnelly","Nixon","Charlton","Benson","Whitehouse","Barry","Hope","Lord","North","Storey","Connor","Potts","Bevan","Hargreaves","Mclean","Mistry","Bruce","Howells","Hyde","Parkes","Wyatt","Fry","Lees","O'donnell","Craig","Forster","Mckenzie","Humphries","Mellor","Carey","Ingram","Summers","Leonard"],de:["Müller","Schmidt","Schneider","Fischer","Weber","Meyer","Wagner","Becker","Schulz","Hoffmann","Schäfer","Koch","Bauer","Richter","Klein","Wolf","Schröder","Neumann","Schwarz","Zimmermann","Braun","Krüger","Hofmann","Hartmann","Lange","Schmitt","Werner","Schmitz","Krause","Meier","Lehmann","Schmid","Schulze","Maier","Köhler","Herrmann","König","Walter","Mayer","Huber","Kaiser","Fuchs","Peters","Lang","Scholz","Möller","Weiß","Jung","Hahn","Schubert","Vogel","Friedrich","Keller","Günther","Frank","Berger","Winkler","Roth","Beck","Lorenz","Baumann","Franke","Albrecht","Schuster","Simon","Ludwig","Böhm","Winter","Kraus","Martin","Schumacher","Krämer","Vogt","Stein","Jäger","Otto","Sommer","Groß","Seidel","Heinrich","Brandt","Haas","Schreiber","Graf","Schulte","Dietrich","Ziegler","Kuhn","Kühn","Pohl","Engel","Horn","Busch","Bergmann","Thomas","Voigt","Sauer","Arnold","Wolff","Pfeiffer"],jp:["Sato","Suzuki","Takahashi","Tanaka","Watanabe","Ito","Yamamoto","Nakamura","Kobayashi","Kato","Yoshida","Yamada","Sasaki","Yamaguchi","Saito","Matsumoto","Inoue","Kimura","Hayashi","Shimizu","Yamazaki","Mori","Abe","Ikeda","Hashimoto","Yamashita","Ishikawa","Nakajima","Maeda","Fujita","Ogawa","Goto","Okada","Hasegawa","Murakami","Kondo","Ishii","Saito","Sakamoto","Endo","Aoki","Fujii","Nishimura","Fukuda","Ota","Miura","Fujiwara","Okamoto","Matsuda","Nakagawa","Nakano","Harada","Ono","Tamura","Takeuchi","Kaneko","Wada","Nakayama","Ishida","Ueda","Morita","Hara","Shibata","Sakai","Kudo","Yokoyama","Miyazaki","Miyamoto","Uchida","Takagi","Ando","Taniguchi","Ohno","Maruyama","Imai","Takada","Fujimoto","Takeda","Murata","Ueno","Sugiyama","Masuda","Sugawara","Hirano","Kojima","Otsuka","Chiba","Kubo","Matsui","Iwasaki","Sakurai","Kinoshita","Noguchi","Matsuo","Nomura","Kikuchi","Sano","Onishi","Sugimoto","Arai"],es:["Garcia","Fernandez","Lopez","Martinez","Gonzalez","Rodriguez","Sanchez","Perez","Martin","Gomez","Ruiz","Diaz","Hernandez","Alvarez","Jimenez","Moreno","Munoz","Alonso","Romero","Navarro","Gutierrez","Torres","Dominguez","Gil","Vazquez","Blanco","Serrano","Ramos","Castro","Suarez","Sanz","Rubio","Ortega","Molina","Delgado","Ortiz","Morales","Ramirez","Marin","Iglesias","Santos","Castillo","Garrido","Calvo","Pena","Cruz","Cano","Nunez","Prieto","Diez","Lozano","Vidal","Pascual","Ferrer","Medina","Vega","Leon","Herrero","Vicente","Mendez","Guerrero","Fuentes","Campos","Nieto","Cortes","Caballero","Ibanez","Lorenzo","Pastor","Gimenez","Saez","Soler","Marquez","Carrasco","Herrera","Montero","Arias","Crespo","Flores","Andres","Aguilar","Hidalgo","Cabrera","Mora","Duran","Velasco","Rey","Pardo","Roman","Vila","Bravo","Merino","Moya","Soto","Izquierdo","Reyes","Redondo","Marcos","Carmona","Menendez"],fr:["Martin","Bernard","Thomas","Petit","Robert","Richard","Durand","Dubois","Moreau","Laurent","Simon","Michel","Lefèvre","Leroy","Roux","David","Bertrand","Morel","Fournier","Girard","Bonnet","Dupont","Lambert","Fontaine","Rousseau","Vincent","Müller","Lefèvre","Faure","André","Mercier","Blanc","Guérin","Boyer","Garnier","Chevalier","François","Legrand","Gauthier","Garcia","Perrin","Robin","Clément","Morin","Nicolas","Henry","Roussel","Matthieu","Gautier","Masson","Marchand","Duval","Denis","Dumont","Marie","Lemaire","Noël","Meyer","Dufour","Meunier","Brun","Blanchard","Giraud","Joly","Rivière","Lucas","Brunet","Gaillard","Barbier","Arnaud","Martínez","Gérard","Roche","Renard","Schmitt","Roy","Leroux","Colin","Vidal","Caron","Picard","Roger","Fabre","Aubert","Lemoine","Renaud","Dumas","Lacroix","Olivier","Philippe","Bourgeois","Pierre","Benoît","Rey","Leclerc","Payet","Rolland","Leclercq","Guillaume","Lecomte","López","Jean","Dupuy","Guillot","Hubert","Berger","Carpentier","Sánchez","Dupuis","Moulin","Louis","Deschamps","Huet","Vasseur","Perez","Boucher","Fleury","Royer","Klein","Jacquet","Adam","Paris","Poirier","Marty","Aubry","Guyot","Carré","Charles","Renault","Charpentier","Ménard","Maillard","Baron","Bertin","Bailly","Hervé","Schneider","Fernández","Le GallGall","Collet","Léger","Bouvier","Julien","Prévost","Millet","Perrot","Daniel","Le RouxRoux","Cousin","Germain","Breton","Besson","Langlois","Rémi","Le GoffGoff","Pelletier","Lévêque","Perrier","Leblanc","Barré","Lebrun","Marchal","Weber","Mallet","Hamon","Boulanger","Jacob","Monnier","Michaud","Rodríguez","Guichard","Gillet","Étienne","Grondin","Poulain","Tessier","Chevallier","Collin","Chauvin","Da SilvaSilva","Bouchet","Gay","Lemaître","Bénard","Maréchal","Humbert","Reynaud","Antoine","Hoarau","Perret","Barthélemy","Cordier","Pichon","Lejeune","Gilbert","Lamy","Delaunay","Pasquier","Carlier","LaporteLaporte"]},postcodeAreas:[{code:"AB"},{code:"AL"},{code:"B"},{code:"BA"},{code:"BB"},{code:"BD"},{code:"BH"},{code:"BL"},{code:"BN"},{code:"BR"},{code:"BS"},{code:"BT"},{code:"CA"},{code:"CB"},{code:"CF"},{code:"CH"},{code:"CM"},{code:"CO"},{code:"CR"},{code:"CT"},{code:"CV"},{code:"CW"},{code:"DA"},{code:"DD"},{code:"DE"},{code:"DG"},{code:"DH"},{code:"DL"},{code:"DN"},{code:"DT"},{code:"DY"},{code:"E"},{code:"EC"},{code:"EH"},{code:"EN"},{code:"EX"},{code:"FK"},{code:"FY"},{code:"G"},{code:"GL"},{code:"GU"},{code:"GY"},{code:"HA"},{code:"HD"},{code:"HG"},{code:"HP"},{code:"HR"},{code:"HS"},{code:"HU"},{code:"HX"},{code:"IG"},{code:"IM"},{code:"IP"},{code:"IV"},{code:"JE"},{code:"KA"},{code:"KT"},{code:"KW"},{code:"KY"},{code:"L"},{code:"LA"},{code:"LD"},{code:"LE"},{code:"LL"},{code:"LN"},{code:"LS"},{code:"LU"},{code:"M"},{code:"ME"},{code:"MK"},{code:"ML"},{code:"N"},{code:"NE"},{code:"NG"},{code:"NN"},{code:"NP"},{code:"NR"},{code:"NW"},{code:"OL"},{code:"OX"},{code:"PA"},{code:"PE"},{code:"PH"},{code:"PL"},{code:"PO"},{code:"PR"},{code:"RG"},{code:"RH"},{code:"RM"},{code:"S"},{code:"SA"},{code:"SE"},{code:"SG"},{code:"SK"},{code:"SL"},{code:"SM"},{code:"SN"},{code:"SO"},{code:"SP"},{code:"SR"},{code:"SS"},{code:"ST"},{code:"SW"},{code:"SY"},{code:"TA"},{code:"TD"},{code:"TF"},{code:"TN"},{code:"TQ"},{code:"TR"},{code:"TS"},{code:"TW"},{code:"UB"},{code:"W"},{code:"WA"},{code:"WC"},{code:"WD"},{code:"WF"},{code:"WN"},{code:"WR"},{code:"WS"},{code:"WV"},{code:"YO"},{code:"ZE"}],countries:[{name:"Afghanistan",abbreviation:"AF"},{name:"Åland Islands",abbreviation:"AX"},{name:"Albania",abbreviation:"AL"},{name:"Algeria",abbreviation:"DZ"},{name:"American Samoa",abbreviation:"AS"},{name:"Andorra",abbreviation:"AD"},{name:"Angola",abbreviation:"AO"},{name:"Anguilla",abbreviation:"AI"},{name:"Antarctica",abbreviation:"AQ"},{name:"Antigua & Barbuda",abbreviation:"AG"},{name:"Argentina",abbreviation:"AR"},{name:"Armenia",abbreviation:"AM"},{name:"Aruba",abbreviation:"AW"},{name:"Ascension Island",abbreviation:"AC"},{name:"Australia",abbreviation:"AU"},{name:"Austria",abbreviation:"AT"},{name:"Azerbaijan",abbreviation:"AZ"},{name:"Bahamas",abbreviation:"BS"},{name:"Bahrain",abbreviation:"BH"},{name:"Bangladesh",abbreviation:"BD"},{name:"Barbados",abbreviation:"BB"},{name:"Belarus",abbreviation:"BY"},{name:"Belgium",abbreviation:"BE"},{name:"Belize",abbreviation:"BZ"},{name:"Benin",abbreviation:"BJ"},{name:"Bermuda",abbreviation:"BM"},{name:"Bhutan",abbreviation:"BT"},{name:"Bolivia",abbreviation:"BO"},{name:"Bosnia & Herzegovina",abbreviation:"BA"},{name:"Botswana",abbreviation:"BW"},{name:"Brazil",abbreviation:"BR"},{name:"British Indian Ocean Territory",abbreviation:"IO"},{name:"British Virgin Islands",abbreviation:"VG"},{name:"Brunei",abbreviation:"BN"},{name:"Bulgaria",abbreviation:"BG"},{name:"Burkina Faso",abbreviation:"BF"},{name:"Burundi",abbreviation:"BI"},{name:"Cambodia",abbreviation:"KH"},{name:"Cameroon",abbreviation:"CM"},{name:"Canada",abbreviation:"CA"},{name:"Canary Islands",abbreviation:"IC"},{name:"Cape Verde",abbreviation:"CV"},{name:"Caribbean Netherlands",abbreviation:"BQ"},{name:"Cayman Islands",abbreviation:"KY"},{name:"Central African Republic",abbreviation:"CF"},{name:"Ceuta & Melilla",abbreviation:"EA"},{name:"Chad",abbreviation:"TD"},{name:"Chile",abbreviation:"CL"},{name:"China",abbreviation:"CN"},{name:"Christmas Island",abbreviation:"CX"},{name:"Cocos (Keeling) Islands",abbreviation:"CC"},{name:"Colombia",abbreviation:"CO"},{name:"Comoros",abbreviation:"KM"},{name:"Congo - Brazzaville",abbreviation:"CG"},{name:"Congo - Kinshasa",abbreviation:"CD"},{name:"Cook Islands",abbreviation:"CK"},{name:"Costa Rica",abbreviation:"CR"},{name:"Côte d'Ivoire",abbreviation:"CI"},{name:"Croatia",abbreviation:"HR"},{name:"Cuba",abbreviation:"CU"},{name:"Curaçao",abbreviation:"CW"},{name:"Cyprus",abbreviation:"CY"},{name:"Czech Republic",abbreviation:"CZ"},{name:"Denmark",abbreviation:"DK"},{name:"Diego Garcia",abbreviation:"DG"},{name:"Djibouti",abbreviation:"DJ"},{name:"Dominica",abbreviation:"DM"},{name:"Dominican Republic",abbreviation:"DO"},{name:"Ecuador",abbreviation:"EC"},{name:"Egypt",abbreviation:"EG"},{name:"El Salvador",abbreviation:"SV"},{name:"Equatorial Guinea",abbreviation:"GQ"},{name:"Eritrea",abbreviation:"ER"},{name:"Estonia",abbreviation:"EE"},{name:"Ethiopia",abbreviation:"ET"},{name:"Falkland Islands",abbreviation:"FK"},{name:"Faroe Islands",abbreviation:"FO"},{name:"Fiji",abbreviation:"FJ"},{name:"Finland",abbreviation:"FI"},{name:"France",abbreviation:"FR"},{name:"French Guiana",abbreviation:"GF"},{name:"French Polynesia",abbreviation:"PF"},{name:"French Southern Territories",abbreviation:"TF"},{name:"Gabon",abbreviation:"GA"},{name:"Gambia",abbreviation:"GM"},{name:"Georgia",abbreviation:"GE"},{name:"Germany",abbreviation:"DE"},{name:"Ghana",abbreviation:"GH"},{name:"Gibraltar",abbreviation:"GI"},{name:"Greece",abbreviation:"GR"},{name:"Greenland",abbreviation:"GL"},{name:"Grenada",abbreviation:"GD"},{name:"Guadeloupe",abbreviation:"GP"},{name:"Guam",abbreviation:"GU"},{name:"Guatemala",abbreviation:"GT"},{name:"Guernsey",abbreviation:"GG"},{name:"Guinea",abbreviation:"GN"},{name:"Guinea-Bissau",abbreviation:"GW"},{name:"Guyana",abbreviation:"GY"},{name:"Haiti",abbreviation:"HT"},{name:"Honduras",abbreviation:"HN"},{name:"Hong Kong SAR China",abbreviation:"HK"},{name:"Hungary",abbreviation:"HU"},{name:"Iceland",abbreviation:"IS"},{name:"India",abbreviation:"IN"},{name:"Indonesia",abbreviation:"ID"},{name:"Iran",abbreviation:"IR"},{name:"Iraq",abbreviation:"IQ"},{name:"Ireland",abbreviation:"IE"},{name:"Isle of Man",abbreviation:"IM"},{name:"Israel",abbreviation:"IL"},{name:"Italy",abbreviation:"IT"},{name:"Jamaica",abbreviation:"JM"},{name:"Japan",abbreviation:"JP"},{name:"Jersey",abbreviation:"JE"},{name:"Jordan",abbreviation:"JO"},{name:"Kazakhstan",abbreviation:"KZ"},{name:"Kenya",abbreviation:"KE"},{name:"Kiribati",abbreviation:"KI"},{name:"Kosovo",abbreviation:"XK"},{name:"Kuwait",abbreviation:"KW"},{name:"Kyrgyzstan",abbreviation:"KG"},{name:"Laos",abbreviation:"LA"},{name:"Latvia",abbreviation:"LV"},{name:"Lebanon",abbreviation:"LB"},{name:"Lesotho",abbreviation:"LS"},{name:"Liberia",abbreviation:"LR"},{name:"Libya",abbreviation:"LY"},{name:"Liechtenstein",abbreviation:"LI"},{name:"Lithuania",abbreviation:"LT"},{name:"Luxembourg",abbreviation:"LU"},{name:"Macau SAR China",abbreviation:"MO"},{name:"Macedonia",abbreviation:"MK"},{name:"Madagascar",abbreviation:"MG"},{name:"Malawi",abbreviation:"MW"},{name:"Malaysia",abbreviation:"MY"},{name:"Maldives",abbreviation:"MV"},{name:"Mali",abbreviation:"ML"},{name:"Malta",abbreviation:"MT"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Martinique",abbreviation:"MQ"},{name:"Mauritania",abbreviation:"MR"},{name:"Mauritius",abbreviation:"MU"},{name:"Mayotte",abbreviation:"YT"},{name:"Mexico",abbreviation:"MX"},{name:"Micronesia",abbreviation:"FM"},{name:"Moldova",abbreviation:"MD"},{name:"Monaco",abbreviation:"MC"},{name:"Mongolia",abbreviation:"MN"},{name:"Montenegro",abbreviation:"ME"},{name:"Montserrat",abbreviation:"MS"},{name:"Morocco",abbreviation:"MA"},{name:"Mozambique",abbreviation:"MZ"},{name:"Myanmar (Burma)",abbreviation:"MM"},{name:"Namibia",abbreviation:"NA"},{name:"Nauru",abbreviation:"NR"},{name:"Nepal",abbreviation:"NP"},{name:"Netherlands",abbreviation:"NL"},{name:"New Caledonia",abbreviation:"NC"},{name:"New Zealand",abbreviation:"NZ"},{name:"Nicaragua",abbreviation:"NI"},{name:"Niger",abbreviation:"NE"},{name:"Nigeria",abbreviation:"NG"},{name:"Niue",abbreviation:"NU"},{name:"Norfolk Island",abbreviation:"NF"},{name:"North Korea",abbreviation:"KP"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Norway",abbreviation:"NO"},{name:"Oman",abbreviation:"OM"},{name:"Pakistan",abbreviation:"PK"},{name:"Palau",abbreviation:"PW"},{name:"Palestinian Territories",abbreviation:"PS"},{name:"Panama",abbreviation:"PA"},{name:"Papua New Guinea",abbreviation:"PG"},{name:"Paraguay",abbreviation:"PY"},{name:"Peru",abbreviation:"PE"},{name:"Philippines",abbreviation:"PH"},{name:"Pitcairn Islands",abbreviation:"PN"},{name:"Poland",abbreviation:"PL"},{name:"Portugal",abbreviation:"PT"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Qatar",abbreviation:"QA"},{name:"Réunion",abbreviation:"RE"},{name:"Romania",abbreviation:"RO"},{name:"Russia",abbreviation:"RU"},{name:"Rwanda",abbreviation:"RW"},{name:"Samoa",abbreviation:"WS"},{name:"San Marino",abbreviation:"SM"},{name:"São Tomé and Príncipe",abbreviation:"ST"},{name:"Saudi Arabia",abbreviation:"SA"},{name:"Senegal",abbreviation:"SN"},{name:"Serbia",abbreviation:"RS"},{name:"Seychelles",abbreviation:"SC"},{name:"Sierra Leone",abbreviation:"SL"},{name:"Singapore",abbreviation:"SG"},{name:"Sint Maarten",abbreviation:"SX"},{name:"Slovakia",abbreviation:"SK"},{name:"Slovenia",abbreviation:"SI"},{name:"Solomon Islands",abbreviation:"SB"},{name:"Somalia",abbreviation:"SO"},{name:"South Africa",abbreviation:"ZA"},{name:"South Georgia & South Sandwich Islands",abbreviation:"GS"},{name:"South Korea",abbreviation:"KR"},{name:"South Sudan",abbreviation:"SS"},{name:"Spain",abbreviation:"ES"},{name:"Sri Lanka",abbreviation:"LK"},{name:"St. Barthélemy",abbreviation:"BL"},{name:"St. Helena",abbreviation:"SH"},{name:"St. Kitts & Nevis",abbreviation:"KN"},{name:"St. Lucia",abbreviation:"LC"},{name:"St. Martin",abbreviation:"MF"},{name:"St. Pierre & Miquelon",abbreviation:"PM"},{name:"St. Vincent & Grenadines",abbreviation:"VC"},{name:"Sudan",abbreviation:"SD"},{name:"Suriname",abbreviation:"SR"},{name:"Svalbard & Jan Mayen",abbreviation:"SJ"},{name:"Swaziland",abbreviation:"SZ"},{name:"Sweden",abbreviation:"SE"},{name:"Switzerland",abbreviation:"CH"},{name:"Syria",abbreviation:"SY"},{name:"Taiwan",abbreviation:"TW"},{name:"Tajikistan",abbreviation:"TJ"},{name:"Tanzania",abbreviation:"TZ"},{name:"Thailand",abbreviation:"TH"},{name:"Timor-Leste",abbreviation:"TL"},{name:"Togo",abbreviation:"TG"},{name:"Tokelau",abbreviation:"TK"},{name:"Tonga",abbreviation:"TO"},{name:"Trinidad & Tobago",abbreviation:"TT"},{name:"Tristan da Cunha",abbreviation:"TA"},{name:"Tunisia",abbreviation:"TN"},{name:"Turkey",abbreviation:"TR"},{name:"Turkmenistan",abbreviation:"TM"},{name:"Turks & Caicos Islands",abbreviation:"TC"},{name:"Tuvalu",abbreviation:"TV"},{name:"U.S. Outlying Islands",abbreviation:"UM"},{name:"U.S. Virgin Islands",abbreviation:"VI"},{name:"Uganda",abbreviation:"UG"},{name:"Ukraine",abbreviation:"UA"},{name:"United Arab Emirates",abbreviation:"AE"},{name:"United Kingdom",abbreviation:"GB"},{name:"United States",abbreviation:"US"},{name:"Uruguay",abbreviation:"UY"},{name:"Uzbekistan",abbreviation:"UZ"},{name:"Vanuatu",abbreviation:"VU"},{name:"Vatican City",abbreviation:"VA"},{name:"Venezuela",abbreviation:"VE"},{name:"Vietnam",abbreviation:"VN"},{name:"Wallis & Futuna",abbreviation:"WF"},{name:"Western Sahara",abbreviation:"EH"},{name:"Yemen",abbreviation:"YE"},{name:"Zambia",abbreviation:"ZM"},{name:"Zimbabwe",abbreviation:"ZW"}],counties:{uk:[{name:"Bath and North East Somerset"},{name:"Aberdeenshire"},{name:"Anglesey"},{name:"Angus"},{name:"Bedford"},{name:"Blackburn with Darwen"},{name:"Blackpool"},{name:"Bournemouth"},{name:"Bracknell Forest"},{name:"Brighton & Hove"},{name:"Bristol"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Carmarthenshire"},{name:"Central Bedfordshire"},{name:"Ceredigion"},{name:"Cheshire East"},{name:"Cheshire West and Chester"},{name:"Clackmannanshire"},{name:"Conwy"},{name:"Cornwall"},{name:"County Antrim"},{name:"County Armagh"},{name:"County Down"},{name:"County Durham"},{name:"County Fermanagh"},{name:"County Londonderry"},{name:"County Tyrone"},{name:"Cumbria"},{name:"Darlington"},{name:"Denbighshire"},{name:"Derby"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Dumfries and Galloway"},{name:"Dundee"},{name:"East Lothian"},{name:"East Riding of Yorkshire"},{name:"East Sussex"},{name:"Edinburgh?"},{name:"Essex"},{name:"Falkirk"},{name:"Fife"},{name:"Flintshire"},{name:"Gloucestershire"},{name:"Greater London"},{name:"Greater Manchester"},{name:"Gwent"},{name:"Gwynedd"},{name:"Halton"},{name:"Hampshire"},{name:"Hartlepool"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Highlands"},{name:"Hull"},{name:"Isle of Wight"},{name:"Isles of Scilly"},{name:"Kent"},{name:"Lancashire"},{name:"Leicester"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"Lothian"},{name:"Luton"},{name:"Medway"},{name:"Merseyside"},{name:"Mid Glamorgan"},{name:"Middlesbrough"},{name:"Milton Keynes"},{name:"Monmouthshire"},{name:"Moray"},{name:"Norfolk"},{name:"North East Lincolnshire"},{name:"North Lincolnshire"},{name:"North Somerset"},{name:"North Yorkshire"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"Nottingham"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Pembrokeshire"},{name:"Perth and Kinross"},{name:"Peterborough"},{name:"Plymouth"},{name:"Poole"},{name:"Portsmouth"},{name:"Powys"},{name:"Reading"},{name:"Redcar and Cleveland"},{name:"Rutland"},{name:"Scottish Borders"},{name:"Shropshire"},{name:"Slough"},{name:"Somerset"},{name:"South Glamorgan"},{name:"South Gloucestershire"},{name:"South Yorkshire"},{name:"Southampton"},{name:"Southend-on-Sea"},{name:"Staffordshire"},{name:"Stirlingshire"},{name:"Stockton-on-Tees"},{name:"Stoke-on-Trent"},{name:"Strathclyde"},{name:"Suffolk"},{name:"Surrey"},{name:"Swindon"},{name:"Telford and Wrekin"},{name:"Thurrock"},{name:"Torbay"},{name:"Tyne and Wear"},{name:"Warrington"},{name:"Warwickshire"},{name:"West Berkshire"},{name:"West Glamorgan"},{name:"West Lothian"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Western Isles"},{name:"Wiltshire"},{name:"Windsor and Maidenhead"},{name:"Wokingham"},{name:"Worcestershire"},{name:"Wrexham"},{name:"York"}]},provinces:{ca:[{name:"Alberta",abbreviation:"AB"},{name:"British Columbia",abbreviation:"BC"},{name:"Manitoba",abbreviation:"MB"},{name:"New Brunswick",abbreviation:"NB"},{name:"Newfoundland and Labrador",abbreviation:"NL"},{name:"Nova Scotia",abbreviation:"NS"},{name:"Ontario",abbreviation:"ON"},{name:"Prince Edward Island",abbreviation:"PE"},{name:"Quebec",abbreviation:"QC"},{name:"Saskatchewan",abbreviation:"SK"},{name:"Northwest Territories",abbreviation:"NT"},{name:"Nunavut",abbreviation:"NU"},{name:"Yukon",abbreviation:"YT"}],it:[{name:"Agrigento",abbreviation:"AG",code:84},{name:"Alessandria",abbreviation:"AL",code:6},{name:"Ancona",abbreviation:"AN",code:42},{name:"Aosta",abbreviation:"AO",code:7},{name:"L'Aquila",abbreviation:"AQ",code:66},{name:"Arezzo",abbreviation:"AR",code:51},{name:"Ascoli-Piceno",abbreviation:"AP",code:44},{name:"Asti",abbreviation:"AT",code:5},{name:"Avellino",abbreviation:"AV",code:64},{name:"Bari",abbreviation:"BA",code:72},{name:"Barletta-Andria-Trani",abbreviation:"BT",code:72},{name:"Belluno",abbreviation:"BL",code:25},{name:"Benevento",abbreviation:"BN",code:62},{name:"Bergamo",abbreviation:"BG",code:16},{name:"Biella",abbreviation:"BI",code:96},{name:"Bologna",abbreviation:"BO",code:37},{name:"Bolzano",abbreviation:"BZ",code:21},{name:"Brescia",abbreviation:"BS",code:17},{name:"Brindisi",abbreviation:"BR",code:74},{name:"Cagliari",abbreviation:"CA",code:92},{name:"Caltanissetta",abbreviation:"CL",code:85},{name:"Campobasso",abbreviation:"CB",code:70},{name:"Carbonia Iglesias",abbreviation:"CI",code:70},{name:"Caserta",abbreviation:"CE",code:61},{name:"Catania",abbreviation:"CT",code:87},{name:"Catanzaro",abbreviation:"CZ",code:79},{name:"Chieti",abbreviation:"CH",code:69},{name:"Como",abbreviation:"CO",code:13},{name:"Cosenza",abbreviation:"CS",code:78},{name:"Cremona",abbreviation:"CR",code:19},{name:"Crotone",abbreviation:"KR",code:101},{name:"Cuneo",abbreviation:"CN",code:4},{name:"Enna",abbreviation:"EN",code:86},{name:"Fermo",abbreviation:"FM",code:86},{name:"Ferrara",abbreviation:"FE",code:38},{name:"Firenze",abbreviation:"FI",code:48},{name:"Foggia",abbreviation:"FG",code:71},{name:"Forli-Cesena",abbreviation:"FC",code:71},{name:"Frosinone",abbreviation:"FR",code:60},{name:"Genova",abbreviation:"GE",code:10},{name:"Gorizia",abbreviation:"GO",code:31},{name:"Grosseto",abbreviation:"GR",code:53},{name:"Imperia",abbreviation:"IM",code:8},{name:"Isernia",abbreviation:"IS",code:94},{name:"La-Spezia",abbreviation:"SP",code:66},{name:"Latina",abbreviation:"LT",code:59},{name:"Lecce",abbreviation:"LE",code:75},{name:"Lecco",abbreviation:"LC",code:97},{name:"Livorno",abbreviation:"LI",code:49},{name:"Lodi",abbreviation:"LO",code:98},{name:"Lucca",abbreviation:"LU",code:46},{name:"Macerata",abbreviation:"MC",code:43},{name:"Mantova",abbreviation:"MN",code:20},{name:"Massa-Carrara",abbreviation:"MS",code:45},{name:"Matera",abbreviation:"MT",code:77},{name:"Medio Campidano",abbreviation:"VS",code:77},{name:"Messina",abbreviation:"ME",code:83},{name:"Milano",abbreviation:"MI",code:15},{name:"Modena",abbreviation:"MO",code:36},{name:"Monza-Brianza",abbreviation:"MB",code:36},{name:"Napoli",abbreviation:"NA",code:63},{name:"Novara",abbreviation:"NO",code:3},{name:"Nuoro",abbreviation:"NU",code:91},{name:"Ogliastra",abbreviation:"OG",code:91},{name:"Olbia Tempio",abbreviation:"OT",code:91},{name:"Oristano",abbreviation:"OR",code:95},{name:"Padova",abbreviation:"PD",code:28},{name:"Palermo",abbreviation:"PA",code:82},{name:"Parma",abbreviation:"PR",code:34},{name:"Pavia",abbreviation:"PV",code:18},{name:"Perugia",abbreviation:"PG",code:54},{name:"Pesaro-Urbino",abbreviation:"PU",code:41},{name:"Pescara",abbreviation:"PE",code:68},{name:"Piacenza",abbreviation:"PC",code:33},{name:"Pisa",abbreviation:"PI",code:50},{name:"Pistoia",abbreviation:"PT",code:47},{name:"Pordenone",abbreviation:"PN",code:93},{name:"Potenza",abbreviation:"PZ",code:76},{name:"Prato",abbreviation:"PO",code:100},{name:"Ragusa",abbreviation:"RG",code:88},{name:"Ravenna",abbreviation:"RA",code:39},{name:"Reggio-Calabria",abbreviation:"RC",code:35},{name:"Reggio-Emilia",abbreviation:"RE",code:35},{name:"Rieti",abbreviation:"RI",code:57},{name:"Rimini",abbreviation:"RN",code:99},{name:"Roma",abbreviation:"Roma",code:58},{name:"Rovigo",abbreviation:"RO",code:29},{name:"Salerno",abbreviation:"SA",code:65},{name:"Sassari",abbreviation:"SS",code:90},{name:"Savona",abbreviation:"SV",code:9},{name:"Siena",abbreviation:"SI",code:52},{name:"Siracusa",abbreviation:"SR",code:89},{name:"Sondrio",abbreviation:"SO",code:14},{name:"Taranto",abbreviation:"TA",code:73},{name:"Teramo",abbreviation:"TE",code:67},{name:"Terni",abbreviation:"TR",code:55},{name:"Torino",abbreviation:"TO",code:1},{name:"Trapani",abbreviation:"TP",code:81},{name:"Trento",abbreviation:"TN",code:22},{name:"Treviso",abbreviation:"TV",code:26},{name:"Trieste",abbreviation:"TS",code:32},{name:"Udine",abbreviation:"UD",code:30},{name:"Varese",abbreviation:"VA",code:12},{name:"Venezia",abbreviation:"VE",code:27},{name:"Verbania",abbreviation:"VB",code:27},{name:"Vercelli",abbreviation:"VC",code:2},{name:"Verona",abbreviation:"VR",code:23},{name:"Vibo-Valentia",abbreviation:"VV",code:102},{name:"Vicenza",abbreviation:"VI",code:24},{name:"Viterbo",abbreviation:"VT",code:56}]},nationalities:[{name:"Afghan"},{name:"Albanian"},{name:"Algerian"},{name:"American"},{name:"Andorran"},{name:"Angolan"},{name:"Antiguans"},{name:"Argentinean"},{name:"Armenian"},{name:"Australian"},{name:"Austrian"},{name:"Azerbaijani"},{name:"Bahami"},{name:"Bahraini"},{name:"Bangladeshi"},{name:"Barbadian"},{name:"Barbudans"},{name:"Batswana"},{name:"Belarusian"},{name:"Belgian"},{name:"Belizean"},{name:"Beninese"},{name:"Bhutanese"},{name:"Bolivian"},{name:"Bosnian"},{name:"Brazilian"},{name:"British"},{name:"Bruneian"},{name:"Bulgarian"},{name:"Burkinabe"},{name:"Burmese"},{name:"Burundian"},{name:"Cambodian"},{name:"Cameroonian"},{name:"Canadian"},{name:"Cape Verdean"},{name:"Central African"},{name:"Chadian"},{name:"Chilean"},{name:"Chinese"},{name:"Colombian"},{name:"Comoran"},{name:"Congolese"},{name:"Costa Rican"},{name:"Croatian"},{name:"Cuban"},{name:"Cypriot"},{name:"Czech"},{name:"Danish"},{name:"Djibouti"},{name:"Dominican"},{name:"Dutch"},{name:"East Timorese"},{name:"Ecuadorean"},{name:"Egyptian"},{name:"Emirian"},{name:"Equatorial Guinean"},{name:"Eritrean"},{name:"Estonian"},{name:"Ethiopian"},{name:"Fijian"},{name:"Filipino"},{name:"Finnish"},{name:"French"},{name:"Gabonese"},{name:"Gambian"},{name:"Georgian"},{name:"German"},{name:"Ghanaian"},{name:"Greek"},{name:"Grenadian"},{name:"Guatemalan"},{name:"Guinea-Bissauan"},{name:"Guinean"},{name:"Guyanese"},{name:"Haitian"},{name:"Herzegovinian"},{name:"Honduran"},{name:"Hungarian"},{name:"I-Kiribati"},{name:"Icelander"},{name:"Indian"},{name:"Indonesian"},{name:"Iranian"},{name:"Iraqi"},{name:"Irish"},{name:"Israeli"},{name:"Italian"},{name:"Ivorian"},{name:"Jamaican"},{name:"Japanese"},{name:"Jordanian"},{name:"Kazakhstani"},{name:"Kenyan"},{name:"Kittian and Nevisian"},{name:"Kuwaiti"},{name:"Kyrgyz"},{name:"Laotian"},{name:"Latvian"},{name:"Lebanese"},{name:"Liberian"},{name:"Libyan"},{name:"Liechtensteiner"},{name:"Lithuanian"},{name:"Luxembourger"},{name:"Macedonian"},{name:"Malagasy"},{name:"Malawian"},{name:"Malaysian"},{name:"Maldivan"},{name:"Malian"},{name:"Maltese"},{name:"Marshallese"},{name:"Mauritanian"},{name:"Mauritian"},{name:"Mexican"},{name:"Micronesian"},{name:"Moldovan"},{name:"Monacan"},{name:"Mongolian"},{name:"Moroccan"},{name:"Mosotho"},{name:"Motswana"},{name:"Mozambican"},{name:"Namibian"},{name:"Nauruan"},{name:"Nepalese"},{name:"New Zealander"},{name:"Nicaraguan"},{name:"Nigerian"},{name:"Nigerien"},{name:"North Korean"},{name:"Northern Irish"},{name:"Norwegian"},{name:"Omani"},{name:"Pakistani"},{name:"Palauan"},{name:"Panamanian"},{name:"Papua New Guinean"},{name:"Paraguayan"},{name:"Peruvian"},{name:"Polish"},{name:"Portuguese"},{name:"Qatari"},{name:"Romani"},{name:"Russian"},{name:"Rwandan"},{name:"Saint Lucian"},{name:"Salvadoran"},{name:"Samoan"},{name:"San Marinese"},{name:"Sao Tomean"},{name:"Saudi"},{name:"Scottish"},{name:"Senegalese"},{name:"Serbian"},{name:"Seychellois"},{name:"Sierra Leonean"},{name:"Singaporean"},{name:"Slovakian"},{name:"Slovenian"},{name:"Solomon Islander"},{name:"Somali"},{name:"South African"},{name:"South Korean"},{name:"Spanish"},{name:"Sri Lankan"},{name:"Sudanese"},{name:"Surinamer"},{name:"Swazi"},{name:"Swedish"},{name:"Swiss"},{name:"Syrian"},{name:"Taiwanese"},{name:"Tajik"},{name:"Tanzanian"},{name:"Thai"},{name:"Togolese"},{name:"Tongan"},{name:"Trinidadian or Tobagonian"},{name:"Tunisian"},{name:"Turkish"},{name:"Tuvaluan"},{name:"Ugandan"},{name:"Ukrainian"},{name:"Uruguaya"},{name:"Uzbekistani"},{name:"Venezuela"},{name:"Vietnamese"},{name:"Wels"},{name:"Yemenit"},{name:"Zambia"},{name:"Zimbabwe"}],locale_languages:["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"],locale_regions:["agq-CM","asa-TZ","ast-ES","bas-CM","bem-ZM","bez-TZ","brx-IN","cgg-UG","chr-US","dav-KE","dje-NE","dsb-DE","dua-CM","dyo-SN","ebu-KE","ewo-CM","fil-PH","fur-IT","gsw-CH","gsw-FR","gsw-LI","guz-KE","haw-US","hsb-DE","jgo-CM","jmc-TZ","kab-DZ","kam-KE","kde-TZ","kea-CV","khq-ML","kkj-CM","kln-KE","kok-IN","ksb-TZ","ksf-CM","ksh-DE","lag-TZ","lkt-US","luo-KE","luy-KE","mas-KE","mas-TZ","mer-KE","mfe-MU","mgh-MZ","mgo-CM","mua-CM","naq-NA","nmg-CM","nnh-CM","nus-SD","nyn-UG","rof-TZ","rwk-TZ","sah-RU","saq-KE","sbp-TZ","seh-MZ","ses-ML","shi-Latn","shi-Latn-MA","shi-Tfng","shi-Tfng-MA","smn-FI","teo-KE","teo-UG","twq-NE","tzm-Latn","tzm-Latn-MA","vai-Latn","vai-Latn-LR","vai-Vaii","vai-Vaii-LR","vun-TZ","wae-CH","xog-UG","yav-CM","zgh-MA","af-NA","af-ZA","ak-GH","am-ET","ar-001","ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-EH","ar-ER","ar-IL","ar-IQ","ar-JO","ar-KM","ar-KW","ar-LB","ar-LY","ar-MA","ar-MR","ar-OM","ar-PS","ar-QA","ar-SA","ar-SD","ar-SO","ar-SS","ar-SY","ar-TD","ar-TN","ar-YE","as-IN","az-Cyrl","az-Cyrl-AZ","az-Latn","az-Latn-AZ","be-BY","bg-BG","bm-Latn","bm-Latn-ML","bn-BD","bn-IN","bo-CN","bo-IN","br-FR","bs-Cyrl","bs-Cyrl-BA","bs-Latn","bs-Latn-BA","ca-AD","ca-ES","ca-ES-VALENCIA","ca-FR","ca-IT","cs-CZ","cy-GB","da-DK","da-GL","de-AT","de-BE","de-CH","de-DE","de-LI","de-LU","dz-BT","ee-GH","ee-TG","el-CY","el-GR","en-001","en-150","en-AG","en-AI","en-AS","en-AU","en-BB","en-BE","en-BM","en-BS","en-BW","en-BZ","en-CA","en-CC","en-CK","en-CM","en-CX","en-DG","en-DM","en-ER","en-FJ","en-FK","en-FM","en-GB","en-GD","en-GG","en-GH","en-GI","en-GM","en-GU","en-GY","en-HK","en-IE","en-IM","en-IN","en-IO","en-JE","en-JM","en-KE","en-KI","en-KN","en-KY","en-LC","en-LR","en-LS","en-MG","en-MH","en-MO","en-MP","en-MS","en-MT","en-MU","en-MW","en-MY","en-NA","en-NF","en-NG","en-NR","en-NU","en-NZ","en-PG","en-PH","en-PK","en-PN","en-PR","en-PW","en-RW","en-SB","en-SC","en-SD","en-SG","en-SH","en-SL","en-SS","en-SX","en-SZ","en-TC","en-TK","en-TO","en-TT","en-TV","en-TZ","en-UG","en-UM","en-US","en-US-POSIX","en-VC","en-VG","en-VI","en-VU","en-WS","en-ZA","en-ZM","en-ZW","eo-001","es-419","es-AR","es-BO","es-CL","es-CO","es-CR","es-CU","es-DO","es-EA","es-EC","es-ES","es-GQ","es-GT","es-HN","es-IC","es-MX","es-NI","es-PA","es-PE","es-PH","es-PR","es-PY","es-SV","es-US","es-UY","es-VE","et-EE","eu-ES","fa-AF","fa-IR","ff-CM","ff-GN","ff-MR","ff-SN","fi-FI","fo-FO","fr-BE","fr-BF","fr-BI","fr-BJ","fr-BL","fr-CA","fr-CD","fr-CF","fr-CG","fr-CH","fr-CI","fr-CM","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GF","fr-GN","fr-GP","fr-GQ","fr-HT","fr-KM","fr-LU","fr-MA","fr-MC","fr-MF","fr-MG","fr-ML","fr-MQ","fr-MR","fr-MU","fr-NC","fr-NE","fr-PF","fr-PM","fr-RE","fr-RW","fr-SC","fr-SN","fr-SY","fr-TD","fr-TG","fr-TN","fr-VU","fr-WF","fr-YT","fy-NL","ga-IE","gd-GB","gl-ES","gu-IN","gv-IM","ha-Latn","ha-Latn-GH","ha-Latn-NE","ha-Latn-NG","he-IL","hi-IN","hr-BA","hr-HR","hu-HU","hy-AM","id-ID","ig-NG","ii-CN","is-IS","it-CH","it-IT","it-SM","ja-JP","ka-GE","ki-KE","kk-Cyrl","kk-Cyrl-KZ","kl-GL","km-KH","kn-IN","ko-KP","ko-KR","ks-Arab","ks-Arab-IN","kw-GB","ky-Cyrl","ky-Cyrl-KG","lb-LU","lg-UG","ln-AO","ln-CD","ln-CF","ln-CG","lo-LA","lt-LT","lu-CD","lv-LV","mg-MG","mk-MK","ml-IN","mn-Cyrl","mn-Cyrl-MN","mr-IN","ms-Latn","ms-Latn-BN","ms-Latn-MY","ms-Latn-SG","mt-MT","my-MM","nb-NO","nb-SJ","nd-ZW","ne-IN","ne-NP","nl-AW","nl-BE","nl-BQ","nl-CW","nl-NL","nl-SR","nl-SX","nn-NO","om-ET","om-KE","or-IN","os-GE","os-RU","pa-Arab","pa-Arab-PK","pa-Guru","pa-Guru-IN","pl-PL","ps-AF","pt-AO","pt-BR","pt-CV","pt-GW","pt-MO","pt-MZ","pt-PT","pt-ST","pt-TL","qu-BO","qu-EC","qu-PE","rm-CH","rn-BI","ro-MD","ro-RO","ru-BY","ru-KG","ru-KZ","ru-MD","ru-RU","ru-UA","rw-RW","se-FI","se-NO","se-SE","sg-CF","si-LK","sk-SK","sl-SI","sn-ZW","so-DJ","so-ET","so-KE","so-SO","sq-AL","sq-MK","sq-XK","sr-Cyrl","sr-Cyrl-BA","sr-Cyrl-ME","sr-Cyrl-RS","sr-Cyrl-XK","sr-Latn","sr-Latn-BA","sr-Latn-ME","sr-Latn-RS","sr-Latn-XK","sv-AX","sv-FI","sv-SE","sw-CD","sw-KE","sw-TZ","sw-UG","ta-IN","ta-LK","ta-MY","ta-SG","te-IN","th-TH","ti-ER","ti-ET","to-TO","tr-CY","tr-TR","ug-Arab","ug-Arab-CN","uk-UA","ur-IN","ur-PK","uz-Arab","uz-Arab-AF","uz-Cyrl","uz-Cyrl-UZ","uz-Latn","uz-Latn-UZ","vi-VN","yi-001","yo-BJ","yo-NG","zh-Hans","zh-Hans-CN","zh-Hans-HK","zh-Hans-MO","zh-Hans-SG","zh-Hant","zh-Hant-HK","zh-Hant-MO","zh-Hant-TW","zu-ZA"],us_states_and_dc:[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"District of Columbia",abbreviation:"DC"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}],territories:[{name:"American Samoa",abbreviation:"AS"},{name:"Federated States of Micronesia",abbreviation:"FM"},{name:"Guam",abbreviation:"GU"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Virgin Islands, U.S.",abbreviation:"VI"}],armed_forces:[{name:"Armed Forces Europe",abbreviation:"AE"},{name:"Armed Forces Pacific",abbreviation:"AP"},{name:"Armed Forces the Americas",abbreviation:"AA"}],country_regions:{it:[{name:"Valle d'Aosta",abbreviation:"VDA"},{name:"Piemonte",abbreviation:"PIE"},{name:"Lombardia",abbreviation:"LOM"},{name:"Veneto",abbreviation:"VEN"},{name:"Trentino Alto Adige",abbreviation:"TAA"},{name:"Friuli Venezia Giulia",abbreviation:"FVG"},{name:"Liguria",abbreviation:"LIG"},{name:"Emilia Romagna",abbreviation:"EMR"},{name:"Toscana",abbreviation:"TOS"},{name:"Umbria",abbreviation:"UMB"},{name:"Marche",abbreviation:"MAR"},{name:"Abruzzo",abbreviation:"ABR"},{name:"Lazio",abbreviation:"LAZ"},{name:"Campania",abbreviation:"CAM"},{name:"Puglia",abbreviation:"PUG"},{name:"Basilicata",abbreviation:"BAS"},{name:"Molise",abbreviation:"MOL"},{name:"Calabria",abbreviation:"CAL"},{name:"Sicilia",abbreviation:"SIC"},{name:"Sardegna",abbreviation:"SAR"}],mx:[{name:"Aguascalientes",abbreviation:"AGU"},{name:"Baja California",abbreviation:"BCN"},{name:"Baja California Sur",abbreviation:"BCS"},{name:"Campeche",abbreviation:"CAM"},{name:"Chiapas",abbreviation:"CHP"},{name:"Chihuahua",abbreviation:"CHH"},{name:"Ciudad de México",abbreviation:"DIF"},{name:"Coahuila",abbreviation:"COA"},{name:"Colima",abbreviation:"COL"},{name:"Durango",abbreviation:"DUR"},{name:"Guanajuato",abbreviation:"GUA"},{name:"Guerrero",abbreviation:"GRO"},{name:"Hidalgo",abbreviation:"HID"},{name:"Jalisco",abbreviation:"JAL"},{name:"México",abbreviation:"MEX"},{name:"Michoacán",abbreviation:"MIC"},{name:"Morelos",abbreviation:"MOR"},{name:"Nayarit",abbreviation:"NAY"},{name:"Nuevo León",abbreviation:"NLE"},{name:"Oaxaca",abbreviation:"OAX"},{name:"Puebla",abbreviation:"PUE"},{name:"Querétaro",abbreviation:"QUE"},{name:"Quintana Roo",abbreviation:"ROO"},{name:"San Luis Potosí",abbreviation:"SLP"},{name:"Sinaloa",abbreviation:"SIN"},{name:"Sonora",abbreviation:"SON"},{name:"Tabasco",abbreviation:"TAB"},{name:"Tamaulipas",abbreviation:"TAM"},{name:"Tlaxcala",abbreviation:"TLA"},{name:"Veracruz",abbreviation:"VER"},{name:"Yucatán",abbreviation:"YUC"},{name:"Zacatecas",abbreviation:"ZAC"}]},street_suffixes:{us:[{name:"Avenue",abbreviation:"Ave"},{name:"Boulevard",abbreviation:"Blvd"},{name:"Center",abbreviation:"Ctr"},{name:"Circle",abbreviation:"Cir"},{name:"Court",abbreviation:"Ct"},{name:"Drive",abbreviation:"Dr"},{name:"Extension",abbreviation:"Ext"},{name:"Glen",abbreviation:"Gln"},{name:"Grove",abbreviation:"Grv"},{name:"Heights",abbreviation:"Hts"},{name:"Highway",abbreviation:"Hwy"},{name:"Junction",abbreviation:"Jct"},{name:"Key",abbreviation:"Key"},{name:"Lane",abbreviation:"Ln"},{name:"Loop",abbreviation:"Loop"},{name:"Manor",abbreviation:"Mnr"},{name:"Mill",abbreviation:"Mill"},{name:"Park",abbreviation:"Park"},{name:"Parkway",abbreviation:"Pkwy"},{name:"Pass",abbreviation:"Pass"},{name:"Path",abbreviation:"Path"},{name:"Pike",abbreviation:"Pike"},{name:"Place",abbreviation:"Pl"},{name:"Plaza",abbreviation:"Plz"},{name:"Point",abbreviation:"Pt"},{name:"Ridge",abbreviation:"Rdg"},{name:"River",abbreviation:"Riv"},{name:"Road",abbreviation:"Rd"},{name:"Square",abbreviation:"Sq"},{name:"Street",abbreviation:"St"},{name:"Terrace",abbreviation:"Ter"},{name:"Trail",abbreviation:"Trl"},{name:"Turnpike",abbreviation:"Tpke"},{name:"View",abbreviation:"Vw"},{name:"Way",abbreviation:"Way"}],it:[{name:"Accesso",abbreviation:"Acc."},{name:"Alzaia",abbreviation:"Alz."},{name:"Arco",abbreviation:"Arco"},{name:"Archivolto",abbreviation:"Acv."},{name:"Arena",abbreviation:"Arena"},{name:"Argine",abbreviation:"Argine"},{name:"Bacino",abbreviation:"Bacino"},{name:"Banchi",abbreviation:"Banchi"},{name:"Banchina",abbreviation:"Ban."},{name:"Bastioni",abbreviation:"Bas."},{name:"Belvedere",abbreviation:"Belv."},{name:"Borgata",abbreviation:"B.ta"},{name:"Borgo",abbreviation:"B.go"},{name:"Calata",abbreviation:"Cal."},{name:"Calle",abbreviation:"Calle"},{name:"Campiello",abbreviation:"Cam."},{name:"Campo",abbreviation:"Cam."},{name:"Canale",abbreviation:"Can."},{name:"Carraia",abbreviation:"Carr."},{name:"Cascina",abbreviation:"Cascina"},{name:"Case sparse",abbreviation:"c.s."},{name:"Cavalcavia",abbreviation:"Cv."},{name:"Circonvallazione",abbreviation:"Cv."},{name:"Complanare",abbreviation:"C.re"},{name:"Contrada",abbreviation:"C.da"},{name:"Corso",abbreviation:"C.so"},{name:"Corte",abbreviation:"C.te"},{name:"Cortile",abbreviation:"C.le"},{name:"Diramazione",abbreviation:"Dir."},{name:"Fondaco",abbreviation:"F.co"},{name:"Fondamenta",abbreviation:"F.ta"},{name:"Fondo",abbreviation:"F.do"},{name:"Frazione",abbreviation:"Fr."},{name:"Isola",abbreviation:"Is."},{name:"Largo",abbreviation:"L.go"},{name:"Litoranea",abbreviation:"Lit."},{name:"Lungolago",abbreviation:"L.go lago"},{name:"Lungo Po",abbreviation:"l.go Po"},{name:"Molo",abbreviation:"Molo"},{name:"Mura",abbreviation:"Mura"},{name:"Passaggio privato",abbreviation:"pass. priv."},{name:"Passeggiata",abbreviation:"Pass."},{name:"Piazza",abbreviation:"P.zza"},{name:"Piazzale",abbreviation:"P.le"},{name:"Ponte",abbreviation:"P.te"},{name:"Portico",abbreviation:"P.co"},{name:"Rampa",abbreviation:"Rampa"},{name:"Regione",abbreviation:"Reg."},{name:"Rione",abbreviation:"R.ne"},{name:"Rio",abbreviation:"Rio"},{name:"Ripa",abbreviation:"Ripa"},{name:"Riva",abbreviation:"Riva"},{name:"Rondò",abbreviation:"Rondò"},{name:"Rotonda",abbreviation:"Rot."},{name:"Sagrato",abbreviation:"Sagr."},{name:"Salita",abbreviation:"Sal."},{name:"Scalinata",abbreviation:"Scal."},{name:"Scalone",abbreviation:"Scal."},{name:"Slargo",abbreviation:"Sl."},{name:"Sottoportico",abbreviation:"Sott."},{name:"Strada",abbreviation:"Str."},{name:"Stradale",abbreviation:"Str.le"},{name:"Strettoia",abbreviation:"Strett."},{name:"Traversa",abbreviation:"Trav."},{name:"Via",abbreviation:"V."},{name:"Viale",abbreviation:"V.le"},{name:"Vicinale",abbreviation:"Vic.le"},{name:"Vicolo",abbreviation:"Vic."}],uk:[{name:"Avenue",abbreviation:"Ave"},{name:"Close",abbreviation:"Cl"},{name:"Court",abbreviation:"Ct"},{name:"Crescent",abbreviation:"Cr"},{name:"Drive",abbreviation:"Dr"},{name:"Garden",abbreviation:"Gdn"},{name:"Gardens",abbreviation:"Gdns"},{name:"Green",abbreviation:"Gn"},{name:"Grove",abbreviation:"Gr"},{name:"Lane",abbreviation:"Ln"},{name:"Mount",abbreviation:"Mt"},{name:"Place",abbreviation:"Pl"},{name:"Park",abbreviation:"Pk"},{name:"Ridge",abbreviation:"Rdg"},{name:"Road",abbreviation:"Rd"},{name:"Square",abbreviation:"Sq"},{name:"Street",abbreviation:"St"},{name:"Terrace",abbreviation:"Ter"},{name:"Valley",abbreviation:"Val"}]},months:[{name:"January",short_name:"Jan",numeric:"01",days:31},{name:"February",short_name:"Feb",numeric:"02",days:28},{name:"March",short_name:"Mar",numeric:"03",days:31},{name:"April",short_name:"Apr",numeric:"04",days:30},{name:"May",short_name:"May",numeric:"05",days:31},{name:"June",short_name:"Jun",numeric:"06",days:30},{name:"July",short_name:"Jul",numeric:"07",days:31},{name:"August",short_name:"Aug",numeric:"08",days:31},{name:"September",short_name:"Sep",numeric:"09",days:30},{name:"October",short_name:"Oct",numeric:"10",days:31},{name:"November",short_name:"Nov",numeric:"11",days:30},{name:"December",short_name:"Dec",numeric:"12",days:31}],cc_types:[{name:"American Express",short_name:"amex",prefix:"34",length:15},{name:"Bankcard",short_name:"bankcard",prefix:"5610",length:16},{name:"China UnionPay",short_name:"chinaunion",prefix:"62",length:16},{name:"Diners Club Carte Blanche",short_name:"dccarte",prefix:"300",length:14},{name:"Diners Club enRoute",short_name:"dcenroute",prefix:"2014",length:15},{name:"Diners Club International",short_name:"dcintl",prefix:"36",length:14},{name:"Diners Club United States & Canada",short_name:"dcusc",prefix:"54",length:16},{name:"Discover Card",short_name:"discover",prefix:"6011",length:16},{name:"InstaPayment",short_name:"instapay",prefix:"637",length:16},{name:"JCB",short_name:"jcb",prefix:"3528",length:16},{name:"Laser",short_name:"laser",prefix:"6304",length:16},{name:"Maestro",short_name:"maestro",prefix:"5018",length:16},{name:"Mastercard",short_name:"mc",prefix:"51",length:16},{name:"Solo",short_name:"solo",prefix:"6334",length:16},{name:"Switch",short_name:"switch",prefix:"4903",length:16},{name:"Visa",short_name:"visa",prefix:"4",length:16},{name:"Visa Electron",short_name:"electron",prefix:"4026",length:16}],currency_types:[{code:"AED",name:"United Arab Emirates Dirham"},{code:"AFN",name:"Afghanistan Afghani"},{code:"ALL",name:"Albania Lek"},{code:"AMD",name:"Armenia Dram"},{code:"ANG",name:"Netherlands Antilles Guilder"},{code:"AOA",name:"Angola Kwanza"},{code:"ARS",name:"Argentina Peso"},{code:"AUD",name:"Australia Dollar"},{code:"AWG",name:"Aruba Guilder"},{code:"AZN",name:"Azerbaijan New Manat"},{code:"BAM",name:"Bosnia and Herzegovina Convertible Marka"},{code:"BBD",name:"Barbados Dollar"},{code:"BDT",name:"Bangladesh Taka"},{code:"BGN",name:"Bulgaria Lev"},{code:"BHD",name:"Bahrain Dinar"},{code:"BIF",name:"Burundi Franc"},{code:"BMD",name:"Bermuda Dollar"},{code:"BND",name:"Brunei Darussalam Dollar"},{code:"BOB",name:"Bolivia Boliviano"},{code:"BRL",name:"Brazil Real"},{code:"BSD",name:"Bahamas Dollar"},{code:"BTN",name:"Bhutan Ngultrum"},{code:"BWP",name:"Botswana Pula"},{code:"BYR",name:"Belarus Ruble"},{code:"BZD",name:"Belize Dollar"},{code:"CAD",name:"Canada Dollar"},{code:"CDF",name:"Congo/Kinshasa Franc"},{code:"CHF",name:"Switzerland Franc"},{code:"CLP",name:"Chile Peso"},{code:"CNY",name:"China Yuan Renminbi"},{code:"COP",name:"Colombia Peso"},{code:"CRC",name:"Costa Rica Colon"},{code:"CUC",name:"Cuba Convertible Peso"},{code:"CUP",name:"Cuba Peso"},{code:"CVE",name:"Cape Verde Escudo"},{code:"CZK",name:"Czech Republic Koruna"},{code:"DJF",name:"Djibouti Franc"},{code:"DKK",name:"Denmark Krone"},{code:"DOP",name:"Dominican Republic Peso"},{code:"DZD",name:"Algeria Dinar"},{code:"EGP",name:"Egypt Pound"},{code:"ERN",name:"Eritrea Nakfa"},{code:"ETB",name:"Ethiopia Birr"},{code:"EUR",name:"Euro Member Countries"},{code:"FJD",name:"Fiji Dollar"},{code:"FKP",name:"Falkland Islands (Malvinas) Pound"},{code:"GBP",name:"United Kingdom Pound"},{code:"GEL",name:"Georgia Lari"},{code:"GGP",name:"Guernsey Pound"},{code:"GHS",name:"Ghana Cedi"},{code:"GIP",name:"Gibraltar Pound"},{code:"GMD",name:"Gambia Dalasi"},{code:"GNF",name:"Guinea Franc"},{code:"GTQ",name:"Guatemala Quetzal"},{code:"GYD",name:"Guyana Dollar"},{code:"HKD",name:"Hong Kong Dollar"},{code:"HNL",name:"Honduras Lempira"},{code:"HRK",name:"Croatia Kuna"},{code:"HTG",name:"Haiti Gourde"},{code:"HUF",name:"Hungary Forint"},{code:"IDR",name:"Indonesia Rupiah"},{code:"ILS",name:"Israel Shekel"},{code:"IMP",name:"Isle of Man Pound"},{code:"INR",name:"India Rupee"},{code:"IQD",name:"Iraq Dinar"},{code:"IRR",name:"Iran Rial"},{code:"ISK",name:"Iceland Krona"},{code:"JEP",name:"Jersey Pound"},{code:"JMD",name:"Jamaica Dollar"},{code:"JOD",name:"Jordan Dinar"},{code:"JPY",name:"Japan Yen"},{code:"KES",name:"Kenya Shilling"},{code:"KGS",name:"Kyrgyzstan Som"},{code:"KHR",name:"Cambodia Riel"},{code:"KMF",name:"Comoros Franc"},{code:"KPW",name:"Korea (North) Won"},{code:"KRW",name:"Korea (South) Won"},{code:"KWD",name:"Kuwait Dinar"},{code:"KYD",name:"Cayman Islands Dollar"},{code:"KZT",name:"Kazakhstan Tenge"},{code:"LAK",name:"Laos Kip"},{code:"LBP",name:"Lebanon Pound"},{code:"LKR",name:"Sri Lanka Rupee"},{code:"LRD",name:"Liberia Dollar"},{code:"LSL",name:"Lesotho Loti"},{code:"LTL",name:"Lithuania Litas"},{code:"LYD",name:"Libya Dinar"},{code:"MAD",name:"Morocco Dirham"},{code:"MDL",name:"Moldova Leu"},{code:"MGA",name:"Madagascar Ariary"},{code:"MKD",name:"Macedonia Denar"},{code:"MMK",name:"Myanmar (Burma) Kyat"},{code:"MNT",name:"Mongolia Tughrik"},{code:"MOP",name:"Macau Pataca"},{code:"MRO",name:"Mauritania Ouguiya"},{code:"MUR",name:"Mauritius Rupee"},{code:"MVR",name:"Maldives (Maldive Islands) Rufiyaa"},{code:"MWK",name:"Malawi Kwacha"},{code:"MXN",name:"Mexico Peso"},{code:"MYR",name:"Malaysia Ringgit"},{code:"MZN",name:"Mozambique Metical"},{code:"NAD",name:"Namibia Dollar"},{code:"NGN",name:"Nigeria Naira"},{code:"NIO",name:"Nicaragua Cordoba"},{code:"NOK",name:"Norway Krone"},{code:"NPR",name:"Nepal Rupee"},{code:"NZD",name:"New Zealand Dollar"},{code:"OMR",name:"Oman Rial"},{code:"PAB",name:"Panama Balboa"},{code:"PEN",name:"Peru Nuevo Sol"},{code:"PGK",name:"Papua New Guinea Kina"},{code:"PHP",name:"Philippines Peso"},{code:"PKR",name:"Pakistan Rupee"},{code:"PLN",name:"Poland Zloty"},{code:"PYG",name:"Paraguay Guarani"},{code:"QAR",name:"Qatar Riyal"},{code:"RON",name:"Romania New Leu"},{code:"RSD",name:"Serbia Dinar"},{code:"RUB",name:"Russia Ruble"},{code:"RWF",name:"Rwanda Franc"},{code:"SAR",name:"Saudi Arabia Riyal"},{code:"SBD",name:"Solomon Islands Dollar"},{code:"SCR",name:"Seychelles Rupee"},{code:"SDG",name:"Sudan Pound"},{code:"SEK",name:"Sweden Krona"},{code:"SGD",name:"Singapore Dollar"},{code:"SHP",name:"Saint Helena Pound"},{code:"SLL",name:"Sierra Leone Leone"},{code:"SOS",name:"Somalia Shilling"},{code:"SPL",name:"Seborga Luigino"},{code:"SRD",name:"Suriname Dollar"},{code:"STD",name:"São Tomé and Príncipe Dobra"},{code:"SVC",name:"El Salvador Colon"},{code:"SYP",name:"Syria Pound"},{code:"SZL",name:"Swaziland Lilangeni"},{code:"THB",name:"Thailand Baht"},{code:"TJS",name:"Tajikistan Somoni"},{code:"TMT",name:"Turkmenistan Manat"},{code:"TND",name:"Tunisia Dinar"},{code:"TOP",name:"Tonga Pa'anga"},{code:"TRY",name:"Turkey Lira"},{code:"TTD",name:"Trinidad and Tobago Dollar"},{code:"TVD",name:"Tuvalu Dollar"},{code:"TWD",name:"Taiwan New Dollar"},{code:"TZS",name:"Tanzania Shilling"},{code:"UAH",name:"Ukraine Hryvnia"},{code:"UGX",name:"Uganda Shilling"},{code:"USD",name:"United States Dollar"},{code:"UYU",name:"Uruguay Peso"},{code:"UZS",name:"Uzbekistan Som"},{code:"VEF",name:"Venezuela Bolivar"},{code:"VND",name:"Viet Nam Dong"},{code:"VUV",name:"Vanuatu Vatu"},{code:"WST",name:"Samoa Tala"},{code:"XAF",name:"Communauté Financière Africaine (BEAC) CFA Franc BEAC"},{code:"XCD",name:"East Caribbean Dollar"},{code:"XDR",name:"International Monetary Fund (IMF) Special Drawing Rights"},{code:"XOF",name:"Communauté Financière Africaine (BCEAO) Franc"},{code:"XPF",name:"Comptoirs Français du Pacifique (CFP) Franc"},{code:"YER",name:"Yemen Rial"},{code:"ZAR",name:"South Africa Rand"},{code:"ZMW",name:"Zambia Kwacha"},{code:"ZWD",name:"Zimbabwe Dollar"}],colorNames:["AliceBlue","Black","Navy","DarkBlue","MediumBlue","Blue","DarkGreen","Green","Teal","DarkCyan","DeepSkyBlue","DarkTurquoise","MediumSpringGreen","Lime","SpringGreen","Aqua","Cyan","MidnightBlue","DodgerBlue","LightSeaGreen","ForestGreen","SeaGreen","DarkSlateGray","LimeGreen","MediumSeaGreen","Turquoise","RoyalBlue","SteelBlue","DarkSlateBlue","MediumTurquoise","Indigo","DarkOliveGreen","CadetBlue","CornflowerBlue","RebeccaPurple","MediumAquaMarine","DimGray","SlateBlue","OliveDrab","SlateGray","LightSlateGray","MediumSlateBlue","LawnGreen","Chartreuse","Aquamarine","Maroon","Purple","Olive","Gray","SkyBlue","LightSkyBlue","BlueViolet","DarkRed","DarkMagenta","SaddleBrown","Ivory","White","DarkSeaGreen","LightGreen","MediumPurple","DarkViolet","PaleGreen","DarkOrchid","YellowGreen","Sienna","Brown","DarkGray","LightBlue","GreenYellow","PaleTurquoise","LightSteelBlue","PowderBlue","FireBrick","DarkGoldenRod","MediumOrchid","RosyBrown","DarkKhaki","Silver","MediumVioletRed","IndianRed","Peru","Chocolate","Tan","LightGray","Thistle","Orchid","GoldenRod","PaleVioletRed","Crimson","Gainsboro","Plum","BurlyWood","LightCyan","Lavender","DarkSalmon","Violet","PaleGoldenRod","LightCoral","Khaki","AliceBlue","HoneyDew","Azure","SandyBrown","Wheat","Beige","WhiteSmoke","MintCream","GhostWhite","Salmon","AntiqueWhite","Linen","LightGoldenRodYellow","OldLace","Red","Fuchsia","Magenta","DeepPink","OrangeRed","Tomato","HotPink","Coral","DarkOrange","LightSalmon","Orange","LightPink","Pink","Gold","PeachPuff","NavajoWhite","Moccasin","Bisque","MistyRose","BlanchedAlmond","PapayaWhip","LavenderBlush","SeaShell","Cornsilk","LemonChiffon","FloralWhite","Snow","Yellow","LightYellow"],company:["3Com Corp","3M Company","A.G. Edwards Inc.","Abbott Laboratories","Abercrombie & Fitch Co.","ABM Industries Incorporated","Ace Hardware Corporation","ACT Manufacturing Inc.","Acterna Corp.","Adams Resources & Energy, Inc.","ADC Telecommunications, Inc.","Adelphia Communications Corporation","Administaff, Inc.","Adobe Systems Incorporated","Adolph Coors Company","Advance Auto Parts, Inc.","Advanced Micro Devices, Inc.","AdvancePCS, Inc.","Advantica Restaurant Group, Inc.","The AES Corporation","Aetna Inc.","Affiliated Computer Services, Inc.","AFLAC Incorporated","AGCO Corporation","Agilent Technologies, Inc.","Agway Inc.","Apartment Investment and Management Company","Air Products and Chemicals, Inc.","Airborne, Inc.","Airgas, Inc.","AK Steel Holding Corporation","Alaska Air Group, Inc.","Alberto-Culver Company","Albertson's, Inc.","Alcoa Inc.","Alleghany Corporation","Allegheny Energy, Inc.","Allegheny Technologies Incorporated","Allergan, Inc.","ALLETE, Inc.","Alliant Energy Corporation","Allied Waste Industries, Inc.","Allmerica Financial Corporation","The Allstate Corporation","ALLTEL Corporation","The Alpine Group, Inc.","Amazon.com, Inc.","AMC Entertainment Inc.","American Power Conversion Corporation","Amerada Hess Corporation","AMERCO","Ameren Corporation","America West Holdings Corporation","American Axle & Manufacturing Holdings, Inc.","American Eagle Outfitters, Inc.","American Electric Power Company, Inc.","American Express Company","American Financial Group, Inc.","American Greetings Corporation","American International Group, Inc.","American Standard Companies Inc.","American Water Works Company, Inc.","AmerisourceBergen Corporation","Ames Department Stores, Inc.","Amgen Inc.","Amkor Technology, Inc.","AMR Corporation","AmSouth Bancorp.","Amtran, Inc.","Anadarko Petroleum Corporation","Analog Devices, Inc.","Anheuser-Busch Companies, Inc.","Anixter International Inc.","AnnTaylor Inc.","Anthem, Inc.","AOL Time Warner Inc.","Aon Corporation","Apache Corporation","Apple Computer, Inc.","Applera Corporation","Applied Industrial Technologies, Inc.","Applied Materials, Inc.","Aquila, Inc.","ARAMARK Corporation","Arch Coal, Inc.","Archer Daniels Midland Company","Arkansas Best Corporation","Armstrong Holdings, Inc.","Arrow Electronics, Inc.","ArvinMeritor, Inc.","Ashland Inc.","Astoria Financial Corporation","AT&T Corp.","Atmel Corporation","Atmos Energy Corporation","Audiovox Corporation","Autoliv, Inc.","Automatic Data Processing, Inc.","AutoNation, Inc.","AutoZone, Inc.","Avaya Inc.","Avery Dennison Corporation","Avista Corporation","Avnet, Inc.","Avon Products, Inc.","Baker Hughes Incorporated","Ball Corporation","Bank of America Corporation","The Bank of New York Company, Inc.","Bank One Corporation","Banknorth Group, Inc.","Banta Corporation","Barnes & Noble, Inc.","Bausch & Lomb Incorporated","Baxter International Inc.","BB&T Corporation","The Bear Stearns Companies Inc.","Beazer Homes USA, Inc.","Beckman Coulter, Inc.","Becton, Dickinson and Company","Bed Bath & Beyond Inc.","Belk, Inc.","Bell Microproducts Inc.","BellSouth Corporation","Belo Corp.","Bemis Company, Inc.","Benchmark Electronics, Inc.","Berkshire Hathaway Inc.","Best Buy Co., Inc.","Bethlehem Steel Corporation","Beverly Enterprises, Inc.","Big Lots, Inc.","BJ Services Company","BJ's Wholesale Club, Inc.","The Black & Decker Corporation","Black Hills Corporation","BMC Software, Inc.","The Boeing Company","Boise Cascade Corporation","Borders Group, Inc.","BorgWarner Inc.","Boston Scientific Corporation","Bowater Incorporated","Briggs & Stratton Corporation","Brightpoint, Inc.","Brinker International, Inc.","Bristol-Myers Squibb Company","Broadwing, Inc.","Brown Shoe Company, Inc.","Brown-Forman Corporation","Brunswick Corporation","Budget Group, Inc.","Burlington Coat Factory Warehouse Corporation","Burlington Industries, Inc.","Burlington Northern Santa Fe Corporation","Burlington Resources Inc.","C. H. Robinson Worldwide Inc.","Cablevision Systems Corp","Cabot Corp","Cadence Design Systems, Inc.","Calpine Corp.","Campbell Soup Co.","Capital One Financial Corp.","Cardinal Health Inc.","Caremark Rx Inc.","Carlisle Cos. Inc.","Carpenter Technology Corp.","Casey's General Stores Inc.","Caterpillar Inc.","CBRL Group Inc.","CDI Corp.","CDW Computer Centers Inc.","CellStar Corp.","Cendant Corp","Cenex Harvest States Cooperatives","Centex Corp.","CenturyTel Inc.","Ceridian Corp.","CH2M Hill Cos. Ltd.","Champion Enterprises Inc.","Charles Schwab Corp.","Charming Shoppes Inc.","Charter Communications Inc.","Charter One Financial Inc.","ChevronTexaco Corp.","Chiquita Brands International Inc.","Chubb Corp","Ciena Corp.","Cigna Corp","Cincinnati Financial Corp.","Cinergy Corp.","Cintas Corp.","Circuit City Stores Inc.","Cisco Systems Inc.","Citigroup, Inc","Citizens Communications Co.","CKE Restaurants Inc.","Clear Channel Communications Inc.","The Clorox Co.","CMGI Inc.","CMS Energy Corp.","CNF Inc.","Coca-Cola Co.","Coca-Cola Enterprises Inc.","Colgate-Palmolive Co.","Collins & Aikman Corp.","Comcast Corp.","Comdisco Inc.","Comerica Inc.","Comfort Systems USA Inc.","Commercial Metals Co.","Community Health Systems Inc.","Compass Bancshares Inc","Computer Associates International Inc.","Computer Sciences Corp.","Compuware Corp.","Comverse Technology Inc.","ConAgra Foods Inc.","Concord EFS Inc.","Conectiv, Inc","Conoco Inc","Conseco Inc.","Consolidated Freightways Corp.","Consolidated Edison Inc.","Constellation Brands Inc.","Constellation Emergy Group Inc.","Continental Airlines Inc.","Convergys Corp.","Cooper Cameron Corp.","Cooper Industries Ltd.","Cooper Tire & Rubber Co.","Corn Products International Inc.","Corning Inc.","Costco Wholesale Corp.","Countrywide Credit Industries Inc.","Coventry Health Care Inc.","Cox Communications Inc.","Crane Co.","Crompton Corp.","Crown Cork & Seal Co. Inc.","CSK Auto Corp.","CSX Corp.","Cummins Inc.","CVS Corp.","Cytec Industries Inc.","D&K Healthcare Resources, Inc.","D.R. Horton Inc.","Dana Corporation","Danaher Corporation","Darden Restaurants Inc.","DaVita Inc.","Dean Foods Company","Deere & Company","Del Monte Foods Co","Dell Computer Corporation","Delphi Corp.","Delta Air Lines Inc.","Deluxe Corporation","Devon Energy Corporation","Di Giorgio Corporation","Dial Corporation","Diebold Incorporated","Dillard's Inc.","DIMON Incorporated","Dole Food Company, Inc.","Dollar General Corporation","Dollar Tree Stores, Inc.","Dominion Resources, Inc.","Domino's Pizza LLC","Dover Corporation, Inc.","Dow Chemical Company","Dow Jones & Company, Inc.","DPL Inc.","DQE Inc.","Dreyer's Grand Ice Cream, Inc.","DST Systems, Inc.","DTE Energy Co.","E.I. Du Pont de Nemours and Company","Duke Energy Corp","Dun & Bradstreet Inc.","DURA Automotive Systems Inc.","DynCorp","Dynegy Inc.","E*Trade Group, Inc.","E.W. Scripps Company","Earthlink, Inc.","Eastman Chemical Company","Eastman Kodak Company","Eaton Corporation","Echostar Communications Corporation","Ecolab Inc.","Edison International","EGL Inc.","El Paso Corporation","Electronic Arts Inc.","Electronic Data Systems Corp.","Eli Lilly and Company","EMC Corporation","Emcor Group Inc.","Emerson Electric Co.","Encompass Services Corporation","Energizer Holdings Inc.","Energy East Corporation","Engelhard Corporation","Enron Corp.","Entergy Corporation","Enterprise Products Partners L.P.","EOG Resources, Inc.","Equifax Inc.","Equitable Resources Inc.","Equity Office Properties Trust","Equity Residential Properties Trust","Estee Lauder Companies Inc.","Exelon Corporation","Exide Technologies","Expeditors International of Washington Inc.","Express Scripts Inc.","ExxonMobil Corporation","Fairchild Semiconductor International Inc.","Family Dollar Stores Inc.","Farmland Industries Inc.","Federal Mogul Corp.","Federated Department Stores Inc.","Federal Express Corp.","Felcor Lodging Trust Inc.","Ferro Corp.","Fidelity National Financial Inc.","Fifth Third Bancorp","First American Financial Corp.","First Data Corp.","First National of Nebraska Inc.","First Tennessee National Corp.","FirstEnergy Corp.","Fiserv Inc.","Fisher Scientific International Inc.","FleetBoston Financial Co.","Fleetwood Enterprises Inc.","Fleming Companies Inc.","Flowers Foods Inc.","Flowserv Corp","Fluor Corp","FMC Corp","Foamex International Inc","Foot Locker Inc","Footstar Inc.","Ford Motor Co","Forest Laboratories Inc.","Fortune Brands Inc.","Foster Wheeler Ltd.","FPL Group Inc.","Franklin Resources Inc.","Freeport McMoran Copper & Gold Inc.","Frontier Oil Corp","Furniture Brands International Inc.","Gannett Co., Inc.","Gap Inc.","Gateway Inc.","GATX Corporation","Gemstar-TV Guide International Inc.","GenCorp Inc.","General Cable Corporation","General Dynamics Corporation","General Electric Company","General Mills Inc","General Motors Corporation","Genesis Health Ventures Inc.","Gentek Inc.","Gentiva Health Services Inc.","Genuine Parts Company","Genuity Inc.","Genzyme Corporation","Georgia Gulf Corporation","Georgia-Pacific Corporation","Gillette Company","Gold Kist Inc.","Golden State Bancorp Inc.","Golden West Financial Corporation","Goldman Sachs Group Inc.","Goodrich Corporation","The Goodyear Tire & Rubber Company","Granite Construction Incorporated","Graybar Electric Company Inc.","Great Lakes Chemical Corporation","Great Plains Energy Inc.","GreenPoint Financial Corp.","Greif Bros. Corporation","Grey Global Group Inc.","Group 1 Automotive Inc.","Guidant Corporation","H&R Block Inc.","H.B. Fuller Company","H.J. Heinz Company","Halliburton Co.","Harley-Davidson Inc.","Harman International Industries Inc.","Harrah's Entertainment Inc.","Harris Corp.","Harsco Corp.","Hartford Financial Services Group Inc.","Hasbro Inc.","Hawaiian Electric Industries Inc.","HCA Inc.","Health Management Associates Inc.","Health Net Inc.","Healthsouth Corp","Henry Schein Inc.","Hercules Inc.","Herman Miller Inc.","Hershey Foods Corp.","Hewlett-Packard Company","Hibernia Corp.","Hillenbrand Industries Inc.","Hilton Hotels Corp.","Hollywood Entertainment Corp.","Home Depot Inc.","Hon Industries Inc.","Honeywell International Inc.","Hormel Foods Corp.","Host Marriott Corp.","Household International Corp.","Hovnanian Enterprises Inc.","Hub Group Inc.","Hubbell Inc.","Hughes Supply Inc.","Humana Inc.","Huntington Bancshares Inc.","Idacorp Inc.","IDT Corporation","IKON Office Solutions Inc.","Illinois Tool Works Inc.","IMC Global Inc.","Imperial Sugar Company","IMS Health Inc.","Ingles Market Inc","Ingram Micro Inc.","Insight Enterprises Inc.","Integrated Electrical Services Inc.","Intel Corporation","International Paper Co.","Interpublic Group of Companies Inc.","Interstate Bakeries Corporation","International Business Machines Corp.","International Flavors & Fragrances Inc.","International Multifoods Corporation","Intuit Inc.","IT Group Inc.","ITT Industries Inc.","Ivax Corp.","J.B. Hunt Transport Services Inc.","J.C. Penny Co.","J.P. Morgan Chase & Co.","Jabil Circuit Inc.","Jack In The Box Inc.","Jacobs Engineering Group Inc.","JDS Uniphase Corp.","Jefferson-Pilot Co.","John Hancock Financial Services Inc.","Johnson & Johnson","Johnson Controls Inc.","Jones Apparel Group Inc.","KB Home","Kellogg Company","Kellwood Company","Kelly Services Inc.","Kemet Corp.","Kennametal Inc.","Kerr-McGee Corporation","KeyCorp","KeySpan Corp.","Kimball International Inc.","Kimberly-Clark Corporation","Kindred Healthcare Inc.","KLA-Tencor Corporation","K-Mart Corp.","Knight-Ridder Inc.","Kohl's Corp.","KPMG Consulting Inc.","Kroger Co.","L-3 Communications Holdings Inc.","Laboratory Corporation of America Holdings","Lam Research Corporation","LandAmerica Financial Group Inc.","Lands' End Inc.","Landstar System Inc.","La-Z-Boy Inc.","Lear Corporation","Legg Mason Inc.","Leggett & Platt Inc.","Lehman Brothers Holdings Inc.","Lennar Corporation","Lennox International Inc.","Level 3 Communications Inc.","Levi Strauss & Co.","Lexmark International Inc.","Limited Inc.","Lincoln National Corporation","Linens 'n Things Inc.","Lithia Motors Inc.","Liz Claiborne Inc.","Lockheed Martin Corporation","Loews Corporation","Longs Drug Stores Corporation","Louisiana-Pacific Corporation","Lowe's Companies Inc.","LSI Logic Corporation","The LTV Corporation","The Lubrizol Corporation","Lucent Technologies Inc.","Lyondell Chemical Company","M & T Bank Corporation","Magellan Health Services Inc.","Mail-Well Inc.","Mandalay Resort Group","Manor Care Inc.","Manpower Inc.","Marathon Oil Corporation","Mariner Health Care Inc.","Markel Corporation","Marriott International Inc.","Marsh & McLennan Companies Inc.","Marsh Supermarkets Inc.","Marshall & Ilsley Corporation","Martin Marietta Materials Inc.","Masco Corporation","Massey Energy Company","MasTec Inc.","Mattel Inc.","Maxim Integrated Products Inc.","Maxtor Corporation","Maxxam Inc.","The May Department Stores Company","Maytag Corporation","MBNA Corporation","McCormick & Company Incorporated","McDonald's Corporation","The McGraw-Hill Companies Inc.","McKesson Corporation","McLeodUSA Incorporated","M.D.C. Holdings Inc.","MDU Resources Group Inc.","MeadWestvaco Corporation","Medtronic Inc.","Mellon Financial Corporation","The Men's Wearhouse Inc.","Merck & Co., Inc.","Mercury General Corporation","Merrill Lynch & Co. Inc.","Metaldyne Corporation","Metals USA Inc.","MetLife Inc.","Metris Companies Inc","MGIC Investment Corporation","MGM Mirage","Michaels Stores Inc.","Micron Technology Inc.","Microsoft Corporation","Milacron Inc.","Millennium Chemicals Inc.","Mirant Corporation","Mohawk Industries Inc.","Molex Incorporated","The MONY Group Inc.","Morgan Stanley Dean Witter & Co.","Motorola Inc.","MPS Group Inc.","Murphy Oil Corporation","Nabors Industries Inc","Nacco Industries Inc","Nash Finch Company","National City Corp.","National Commerce Financial Corporation","National Fuel Gas Company","National Oilwell Inc","National Rural Utilities Cooperative Finance Corporation","National Semiconductor Corporation","National Service Industries Inc","Navistar International Corporation","NCR Corporation","The Neiman Marcus Group Inc.","New Jersey Resources Corporation","New York Times Company","Newell Rubbermaid Inc","Newmont Mining Corporation","Nextel Communications Inc","Nicor Inc","Nike Inc","NiSource Inc","Noble Energy Inc","Nordstrom Inc","Norfolk Southern Corporation","Nortek Inc","North Fork Bancorporation Inc","Northeast Utilities System","Northern Trust Corporation","Northrop Grumman Corporation","NorthWestern Corporation","Novellus Systems Inc","NSTAR","NTL Incorporated","Nucor Corp","Nvidia Corp","NVR Inc","Northwest Airlines Corp","Occidental Petroleum Corp","Ocean Energy Inc","Office Depot Inc.","OfficeMax Inc","OGE Energy Corp","Oglethorpe Power Corp.","Ohio Casualty Corp.","Old Republic International Corp.","Olin Corp.","OM Group Inc","Omnicare Inc","Omnicom Group","On Semiconductor Corp","ONEOK Inc","Oracle Corp","Oshkosh Truck Corp","Outback Steakhouse Inc.","Owens & Minor Inc.","Owens Corning","Owens-Illinois Inc","Oxford Health Plans Inc","Paccar Inc","PacifiCare Health Systems Inc","Packaging Corp. of America","Pactiv Corp","Pall Corp","Pantry Inc","Park Place Entertainment Corp","Parker Hannifin Corp.","Pathmark Stores Inc.","Paychex Inc","Payless Shoesource Inc","Penn Traffic Co.","Pennzoil-Quaker State Company","Pentair Inc","Peoples Energy Corp.","PeopleSoft Inc","Pep Boys Manny, Moe & Jack","Potomac Electric Power Co.","Pepsi Bottling Group Inc.","PepsiAmericas Inc.","PepsiCo Inc.","Performance Food Group Co.","Perini Corp","PerkinElmer Inc","Perot Systems Corp","Petco Animal Supplies Inc.","Peter Kiewit Sons', Inc.","PETsMART Inc","Pfizer Inc","Pacific Gas & Electric Corp.","Pharmacia Corp","Phar Mor Inc.","Phelps Dodge Corp.","Philip Morris Companies Inc.","Phillips Petroleum Co","Phillips Van Heusen Corp.","Phoenix Companies Inc","Pier 1 Imports Inc.","Pilgrim's Pride Corporation","Pinnacle West Capital Corp","Pioneer-Standard Electronics Inc.","Pitney Bowes Inc.","Pittston Brinks Group","Plains All American Pipeline LP","PNC Financial Services Group Inc.","PNM Resources Inc","Polaris Industries Inc.","Polo Ralph Lauren Corp","PolyOne Corp","Popular Inc","Potlatch Corp","PPG Industries Inc","PPL Corp","Praxair Inc","Precision Castparts Corp","Premcor Inc.","Pride International Inc","Primedia Inc","Principal Financial Group Inc.","Procter & Gamble Co.","Pro-Fac Cooperative Inc.","Progress Energy Inc","Progressive Corporation","Protective Life Corp","Provident Financial Group","Providian Financial Corp.","Prudential Financial Inc.","PSS World Medical Inc","Public Service Enterprise Group Inc.","Publix Super Markets Inc.","Puget Energy Inc.","Pulte Homes Inc","Qualcomm Inc","Quanta Services Inc.","Quantum Corp","Quest Diagnostics Inc.","Questar Corp","Quintiles Transnational","Qwest Communications Intl Inc","R.J. Reynolds Tobacco Company","R.R. Donnelley & Sons Company","Radio Shack Corporation","Raymond James Financial Inc.","Raytheon Company","Reader's Digest Association Inc.","Reebok International Ltd.","Regions Financial Corp.","Regis Corporation","Reliance Steel & Aluminum Co.","Reliant Energy Inc.","Rent A Center Inc","Republic Services Inc","Revlon Inc","RGS Energy Group Inc","Rite Aid Corp","Riverwood Holding Inc.","RoadwayCorp","Robert Half International Inc.","Rock-Tenn Co","Rockwell Automation Inc","Rockwell Collins Inc","Rohm & Haas Co.","Ross Stores Inc","RPM Inc.","Ruddick Corp","Ryder System Inc","Ryerson Tull Inc","Ryland Group Inc.","Sabre Holdings Corp","Safeco Corp","Safeguard Scientifics Inc.","Safeway Inc","Saks Inc","Sanmina-SCI Inc","Sara Lee Corp","SBC Communications Inc","Scana Corp.","Schering-Plough Corp","Scholastic Corp","SCI Systems Onc.","Science Applications Intl. Inc.","Scientific-Atlanta Inc","Scotts Company","Seaboard Corp","Sealed Air Corp","Sears Roebuck & Co","Sempra Energy","Sequa Corp","Service Corp. International","ServiceMaster Co","Shaw Group Inc","Sherwin-Williams Company","Shopko Stores Inc","Siebel Systems Inc","Sierra Health Services Inc","Sierra Pacific Resources","Silgan Holdings Inc.","Silicon Graphics Inc","Simon Property Group Inc","SLM Corporation","Smith International Inc","Smithfield Foods Inc","Smurfit-Stone Container Corp","Snap-On Inc","Solectron Corp","Solutia Inc","Sonic Automotive Inc.","Sonoco Products Co.","Southern Company","Southern Union Company","SouthTrust Corp.","Southwest Airlines Co","Southwest Gas Corp","Sovereign Bancorp Inc.","Spartan Stores Inc","Spherion Corp","Sports Authority Inc","Sprint Corp.","SPX Corp","St. Jude Medical Inc","St. Paul Cos.","Staff Leasing Inc.","StanCorp Financial Group Inc","Standard Pacific Corp.","Stanley Works","Staples Inc","Starbucks Corp","Starwood Hotels & Resorts Worldwide Inc","State Street Corp.","Stater Bros. Holdings Inc.","Steelcase Inc","Stein Mart Inc","Stewart & Stevenson Services Inc","Stewart Information Services Corp","Stilwell Financial Inc","Storage Technology Corporation","Stryker Corp","Sun Healthcare Group Inc.","Sun Microsystems Inc.","SunGard Data Systems Inc.","Sunoco Inc.","SunTrust Banks Inc","Supervalu Inc","Swift Transportation, Co., Inc","Symbol Technologies Inc","Synovus Financial Corp.","Sysco Corp","Systemax Inc.","Target Corp.","Tech Data Corporation","TECO Energy Inc","Tecumseh Products Company","Tektronix Inc","Teleflex Incorporated","Telephone & Data Systems Inc","Tellabs Inc.","Temple-Inland Inc","Tenet Healthcare Corporation","Tenneco Automotive Inc.","Teradyne Inc","Terex Corp","Tesoro Petroleum Corp.","Texas Industries Inc.","Texas Instruments Incorporated","Textron Inc","Thermo Electron Corporation","Thomas & Betts Corporation","Tiffany & Co","Timken Company","TJX Companies Inc","TMP Worldwide Inc","Toll Brothers Inc","Torchmark Corporation","Toro Company","Tower Automotive Inc.","Toys 'R' Us Inc","Trans World Entertainment Corp.","TransMontaigne Inc","Transocean Inc","TravelCenters of America Inc.","Triad Hospitals Inc","Tribune Company","Trigon Healthcare Inc.","Trinity Industries Inc","Trump Hotels & Casino Resorts Inc.","TruServ Corporation","TRW Inc","TXU Corp","Tyson Foods Inc","U.S. Bancorp","U.S. Industries Inc.","UAL Corporation","UGI Corporation","Unified Western Grocers Inc","Union Pacific Corporation","Union Planters Corp","Unisource Energy Corp","Unisys Corporation","United Auto Group Inc","United Defense Industries Inc.","United Parcel Service Inc","United Rentals Inc","United Stationers Inc","United Technologies Corporation","UnitedHealth Group Incorporated","Unitrin Inc","Universal Corporation","Universal Forest Products Inc","Universal Health Services Inc","Unocal Corporation","Unova Inc","UnumProvident Corporation","URS Corporation","US Airways Group Inc","US Oncology Inc","USA Interactive","USFreighways Corporation","USG Corporation","UST Inc","Valero Energy Corporation","Valspar Corporation","Value City Department Stores Inc","Varco International Inc","Vectren Corporation","Veritas Software Corporation","Verizon Communications Inc","VF Corporation","Viacom Inc","Viad Corp","Viasystems Group Inc","Vishay Intertechnology Inc","Visteon Corporation","Volt Information Sciences Inc","Vulcan Materials Company","W.R. Berkley Corporation","W.R. Grace & Co","W.W. Grainger Inc","Wachovia Corporation","Wakenhut Corporation","Walgreen Co","Wallace Computer Services Inc","Wal-Mart Stores Inc","Walt Disney Co","Walter Industries Inc","Washington Mutual Inc","Washington Post Co.","Waste Management Inc","Watsco Inc","Weatherford International Inc","Weis Markets Inc.","Wellpoint Health Networks Inc","Wells Fargo & Company","Wendy's International Inc","Werner Enterprises Inc","WESCO International Inc","Western Digital Inc","Western Gas Resources Inc","WestPoint Stevens Inc","Weyerhauser Company","WGL Holdings Inc","Whirlpool Corporation","Whole Foods Market Inc","Willamette Industries Inc.","Williams Companies Inc","Williams Sonoma Inc","Winn Dixie Stores Inc","Wisconsin Energy Corporation","Wm Wrigley Jr Company","World Fuel Services Corporation","WorldCom Inc","Worthington Industries Inc","WPS Resources Corporation","Wyeth","Wyndham International Inc","Xcel Energy Inc","Xerox Corp","Xilinx Inc","XO Communications Inc","Yellow Corporation","York International Corp","Yum Brands Inc.","Zale Corporation","Zions Bancorporation"],fileExtension:{raster:["bmp","gif","gpl","ico","jpeg","psd","png","psp","raw","tiff"],vector:["3dv","amf","awg","ai","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","odg","svg","xar"],"3d":["3dmf","3dm","3mf","3ds","an8","aoi","blend","cal3d","cob","ctm","iob","jas","max","mb","mdx","obj","x","x3d"],document:["doc","docx","dot","html","xml","odt","odm","ott","csv","rtf","tex","xhtml","xps"]},timezones:[{name:"Dateline Standard Time",abbr:"DST",offset:-12,isdst:!1,text:"(UTC-12:00) International Date Line West",utc:["Etc/GMT+12"]},{name:"UTC-11",abbr:"U",offset:-11,isdst:!1,text:"(UTC-11:00) Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{name:"Hawaiian Standard Time",abbr:"HST",offset:-10,isdst:!1,text:"(UTC-10:00) Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{name:"Alaskan Standard Time",abbr:"AKDT",offset:-8,isdst:!0,text:"(UTC-09:00) Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{name:"Pacific Standard Time (Mexico)",abbr:"PDT",offset:-7,isdst:!0,text:"(UTC-08:00) Baja California",utc:["America/Santa_Isabel"]},{name:"Pacific Daylight Time",abbr:"PDT",offset:-7,isdst:!0,text:"(UTC-07:00) Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse"]},{name:"Pacific Standard Time",abbr:"PST",offset:-8,isdst:!1,text:"(UTC-08:00) Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{name:"US Mountain Standard Time",abbr:"UMST",offset:-7,isdst:!1,text:"(UTC-07:00) Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{name:"Mountain Standard Time (Mexico)",abbr:"MDT",offset:-6,isdst:!0,text:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{name:"Mountain Standard Time",abbr:"MDT",offset:-6,isdst:!0,text:"(UTC-07:00) Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{name:"Central America Standard Time",abbr:"CAST",offset:-6,isdst:!1,text:"(UTC-06:00) Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{name:"Central Standard Time",abbr:"CDT",offset:-5,isdst:!0,text:"(UTC-06:00) Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{name:"Central Standard Time (Mexico)",abbr:"CDT",offset:-5,isdst:!0,text:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{name:"Canada Central Standard Time",abbr:"CCST",offset:-6,isdst:!1,text:"(UTC-06:00) Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{name:"SA Pacific Standard Time",abbr:"SPST",offset:-5,isdst:!1,text:"(UTC-05:00) Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{name:"Eastern Standard Time",abbr:"EDT",offset:-4,isdst:!0,text:"(UTC-05:00) Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{name:"US Eastern Standard Time",abbr:"UEDT",offset:-4,isdst:!0,text:"(UTC-05:00) Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{name:"Venezuela Standard Time",abbr:"VST",offset:-4.5,isdst:!1,text:"(UTC-04:30) Caracas",utc:["America/Caracas"]},{name:"Paraguay Standard Time",abbr:"PYT",offset:-4,isdst:!1,text:"(UTC-04:00) Asuncion",utc:["America/Asuncion"]},{name:"Atlantic Standard Time",abbr:"ADT",offset:-3,isdst:!0,text:"(UTC-04:00) Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{name:"Central Brazilian Standard Time",abbr:"CBST",offset:-4,isdst:!1,text:"(UTC-04:00) Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{name:"SA Western Standard Time",abbr:"SWST",offset:-4,isdst:!1,text:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{name:"Pacific SA Standard Time",abbr:"PSST",offset:-4,isdst:!1,text:"(UTC-04:00) Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{name:"Newfoundland Standard Time",abbr:"NDT",offset:-2.5,isdst:!0,text:"(UTC-03:30) Newfoundland",utc:["America/St_Johns"]},{name:"E. South America Standard Time",abbr:"ESAST",offset:-3,isdst:!1,text:"(UTC-03:00) Brasilia",utc:["America/Sao_Paulo"]},{name:"Argentina Standard Time",abbr:"AST",offset:-3,isdst:!1,text:"(UTC-03:00) Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{name:"SA Eastern Standard Time",abbr:"SEST",offset:-3,isdst:!1,text:"(UTC-03:00) Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{name:"Greenland Standard Time",abbr:"GDT",offset:-3,isdst:!0,text:"(UTC-03:00) Greenland",utc:["America/Godthab"]},{name:"Montevideo Standard Time",abbr:"MST",offset:-3,isdst:!1,text:"(UTC-03:00) Montevideo",utc:["America/Montevideo"]},{name:"Bahia Standard Time",abbr:"BST",offset:-3,isdst:!1,text:"(UTC-03:00) Salvador",utc:["America/Bahia"]},{name:"UTC-02",abbr:"U",offset:-2,isdst:!1,text:"(UTC-02:00) Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{name:"Mid-Atlantic Standard Time",abbr:"MDT",offset:-1,isdst:!0,text:"(UTC-02:00) Mid-Atlantic - Old",utc:[]},{name:"Azores Standard Time",abbr:"ADT",offset:0,isdst:!0,text:"(UTC-01:00) Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{name:"Cape Verde Standard Time",abbr:"CVST",offset:-1,isdst:!1,text:"(UTC-01:00) Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{name:"Morocco Standard Time",abbr:"MDT",offset:1,isdst:!0,text:"(UTC) Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{name:"UTC",abbr:"UTC",offset:0,isdst:!1,text:"(UTC) Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{name:"GMT Standard Time",abbr:"GMT",offset:0,isdst:!1,text:"(UTC) Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{name:"British Summer Time",abbr:"BST",offset:1,isdst:!0,text:"(UTC+01:00) Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{name:"GMT Standard Time",abbr:"GDT",offset:1,isdst:!0,text:"(UTC) Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{name:"Greenwich Standard Time",abbr:"GST",offset:0,isdst:!1,text:"(UTC) Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{name:"W. Europe Standard Time",abbr:"WEDT",offset:2,isdst:!0,text:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{name:"Central Europe Standard Time",abbr:"CEDT",offset:2,isdst:!0,text:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{name:"Romance Standard Time",abbr:"RDT",offset:2,isdst:!0,text:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{name:"Central European Standard Time",abbr:"CEDT",offset:2,isdst:!0,text:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{name:"W. Central Africa Standard Time",abbr:"WCAST",offset:1,isdst:!1,text:"(UTC+01:00) West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{name:"Namibia Standard Time",abbr:"NST",offset:1,isdst:!1,text:"(UTC+01:00) Windhoek",utc:["Africa/Windhoek"]},{name:"GTB Standard Time",abbr:"GDT",offset:3,isdst:!0,text:"(UTC+02:00) Athens, Bucharest",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{name:"Middle East Standard Time",abbr:"MEDT",offset:3,isdst:!0,text:"(UTC+02:00) Beirut",utc:["Asia/Beirut"]},{name:"Egypt Standard Time",abbr:"EST",offset:2,isdst:!1,text:"(UTC+02:00) Cairo",utc:["Africa/Cairo"]},{name:"Syria Standard Time",abbr:"SDT",offset:3,isdst:!0,text:"(UTC+02:00) Damascus",utc:["Asia/Damascus"]},{name:"E. Europe Standard Time",abbr:"EEDT",offset:3,isdst:!0,text:"(UTC+02:00) E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{name:"South Africa Standard Time",abbr:"SAST",offset:2,isdst:!1,text:"(UTC+02:00) Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{name:"FLE Standard Time",abbr:"FDT",offset:3,isdst:!0,text:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{name:"Turkey Standard Time",abbr:"TDT",offset:3,isdst:!1,text:"(UTC+03:00) Istanbul",utc:["Europe/Istanbul"]},{name:"Israel Standard Time",abbr:"JDT",offset:3,isdst:!0,text:"(UTC+02:00) Jerusalem",utc:["Asia/Jerusalem"]},{name:"Libya Standard Time",abbr:"LST",offset:2,isdst:!1,text:"(UTC+02:00) Tripoli",utc:["Africa/Tripoli"]},{name:"Jordan Standard Time",abbr:"JST",offset:3,isdst:!1,text:"(UTC+03:00) Amman",utc:["Asia/Amman"]},{name:"Arabic Standard Time",abbr:"AST",offset:3,isdst:!1,text:"(UTC+03:00) Baghdad",utc:["Asia/Baghdad"]},{name:"Kaliningrad Standard Time",abbr:"KST",offset:3,isdst:!1,text:"(UTC+02:00) Kaliningrad",utc:["Europe/Kaliningrad"]},{name:"Arab Standard Time",abbr:"AST",offset:3,isdst:!1,text:"(UTC+03:00) Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{name:"E. Africa Standard Time",abbr:"EAST",offset:3,isdst:!1,text:"(UTC+03:00) Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{name:"Moscow Standard Time",abbr:"MSK",offset:3,isdst:!1,text:"(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{name:"Samara Time",abbr:"SAMT",offset:4,isdst:!1,text:"(UTC+04:00) Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{name:"Iran Standard Time",abbr:"IDT",offset:4.5,isdst:!0,text:"(UTC+03:30) Tehran",utc:["Asia/Tehran"]},{name:"Arabian Standard Time",abbr:"AST",offset:4,isdst:!1,text:"(UTC+04:00) Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{name:"Azerbaijan Standard Time",abbr:"ADT",offset:5,isdst:!0,text:"(UTC+04:00) Baku",utc:["Asia/Baku"]},{name:"Mauritius Standard Time",abbr:"MST",offset:4,isdst:!1,text:"(UTC+04:00) Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{name:"Georgian Standard Time",abbr:"GET",offset:4,isdst:!1,text:"(UTC+04:00) Tbilisi",utc:["Asia/Tbilisi"]},{name:"Caucasus Standard Time",abbr:"CST",offset:4,isdst:!1,text:"(UTC+04:00) Yerevan",utc:["Asia/Yerevan"]},{name:"Afghanistan Standard Time",abbr:"AST",offset:4.5,isdst:!1,text:"(UTC+04:30) Kabul",utc:["Asia/Kabul"]},{name:"West Asia Standard Time",abbr:"WAST",offset:5,isdst:!1,text:"(UTC+05:00) Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{name:"Yekaterinburg Time",abbr:"YEKT",offset:5,isdst:!1,text:"(UTC+05:00) Yekaterinburg",utc:["Asia/Yekaterinburg"]},{name:"Pakistan Standard Time",abbr:"PKT",offset:5,isdst:!1,text:"(UTC+05:00) Islamabad, Karachi",utc:["Asia/Karachi"]},{name:"India Standard Time",abbr:"IST",offset:5.5,isdst:!1,text:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{name:"Sri Lanka Standard Time",abbr:"SLST",offset:5.5,isdst:!1,text:"(UTC+05:30) Sri Jayawardenepura",utc:["Asia/Colombo"]},{name:"Nepal Standard Time",abbr:"NST",offset:5.75,isdst:!1,text:"(UTC+05:45) Kathmandu",utc:["Asia/Kathmandu"]},{name:"Central Asia Standard Time",abbr:"CAST",offset:6,isdst:!1,text:"(UTC+06:00) Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{name:"Bangladesh Standard Time",abbr:"BST",offset:6,isdst:!1,text:"(UTC+06:00) Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{name:"Myanmar Standard Time",abbr:"MST",offset:6.5,isdst:!1,text:"(UTC+06:30) Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{name:"SE Asia Standard Time",abbr:"SAST",offset:7,isdst:!1,text:"(UTC+07:00) Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{name:"N. Central Asia Standard Time",abbr:"NCAST",offset:7,isdst:!1,text:"(UTC+07:00) Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{name:"China Standard Time",abbr:"CST",offset:8,isdst:!1,text:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{name:"North Asia Standard Time",abbr:"NAST",offset:8,isdst:!1,text:"(UTC+08:00) Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{name:"Singapore Standard Time",abbr:"MPST",offset:8,isdst:!1,text:"(UTC+08:00) Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{name:"W. Australia Standard Time",abbr:"WAST",offset:8,isdst:!1,text:"(UTC+08:00) Perth",utc:["Antarctica/Casey","Australia/Perth"]},{name:"Taipei Standard Time",abbr:"TST",offset:8,isdst:!1,text:"(UTC+08:00) Taipei",utc:["Asia/Taipei"]},{name:"Ulaanbaatar Standard Time",abbr:"UST",offset:8,isdst:!1,text:"(UTC+08:00) Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{name:"North Asia East Standard Time",abbr:"NAEST",offset:8,isdst:!1,text:"(UTC+08:00) Irkutsk",utc:["Asia/Irkutsk"]},{name:"Japan Standard Time",abbr:"JST",offset:9,isdst:!1,text:"(UTC+09:00) Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{name:"Korea Standard Time",abbr:"KST",offset:9,isdst:!1,text:"(UTC+09:00) Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{name:"Cen. Australia Standard Time",abbr:"CAST",offset:9.5,isdst:!1,text:"(UTC+09:30) Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{name:"AUS Central Standard Time",abbr:"ACST",offset:9.5,isdst:!1,text:"(UTC+09:30) Darwin",utc:["Australia/Darwin"]},{name:"E. Australia Standard Time",abbr:"EAST",offset:10,isdst:!1,text:"(UTC+10:00) Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{name:"AUS Eastern Standard Time",abbr:"AEST",offset:10,isdst:!1,text:"(UTC+10:00) Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{name:"West Pacific Standard Time",abbr:"WPST",offset:10,isdst:!1,text:"(UTC+10:00) Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{name:"Tasmania Standard Time",abbr:"TST",offset:10,isdst:!1,text:"(UTC+10:00) Hobart",utc:["Australia/Currie","Australia/Hobart"]},{name:"Yakutsk Standard Time",abbr:"YST",offset:9,isdst:!1,text:"(UTC+09:00) Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{name:"Central Pacific Standard Time",abbr:"CPST",offset:11,isdst:!1,text:"(UTC+11:00) Solomon Is., New Caledonia",utc:["Antarctica/Macquarie","Etc/GMT-11","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea","Pacific/Ponape"]},{name:"Vladivostok Standard Time",abbr:"VST",offset:11,isdst:!1,text:"(UTC+11:00) Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{name:"New Zealand Standard Time",abbr:"NZST",offset:12,isdst:!1,text:"(UTC+12:00) Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{name:"UTC+12",abbr:"U",offset:12,isdst:!1,text:"(UTC+12:00) Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{name:"Fiji Standard Time",abbr:"FST",offset:12,isdst:!1,text:"(UTC+12:00) Fiji",utc:["Pacific/Fiji"]},{name:"Magadan Standard Time",abbr:"MST",offset:12,isdst:!1,text:"(UTC+12:00) Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{name:"Kamchatka Standard Time",abbr:"KDT",offset:13,isdst:!0,text:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{name:"Tonga Standard Time",abbr:"TST",offset:13,isdst:!1,text:"(UTC+13:00) Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{name:"Samoa Standard Time",abbr:"SST",offset:13,isdst:!1,text:"(UTC+13:00) Samoa",utc:["Pacific/Apia"]}],profession:["Airline Pilot","Academic Team","Accountant","Account Executive","Actor","Actuary","Acquisition Analyst","Administrative Asst.","Administrative Analyst","Administrator","Advertising Director","Aerospace Engineer","Agent","Agricultural Inspector","Agricultural Scientist","Air Traffic Controller","Animal Trainer","Anthropologist","Appraiser","Architect","Art Director","Artist","Astronomer","Athletic Coach","Auditor","Author","Baker","Banker","Bankruptcy Attorney","Benefits Manager","Biologist","Bio-feedback Specialist","Biomedical Engineer","Biotechnical Researcher","Broadcaster","Broker","Building Manager","Building Contractor","Building Inspector","Business Analyst","Business Planner","Business Manager","Buyer","Call Center Manager","Career Counselor","Cash Manager","Ceramic Engineer","Chief Executive Officer","Chief Operation Officer","Chef","Chemical Engineer","Chemist","Child Care Manager","Chief Medical Officer","Chiropractor","Cinematographer","City Housing Manager","City Manager","Civil Engineer","Claims Manager","Clinical Research Assistant","Collections Manager","Compliance Manager","Comptroller","Computer Manager","Commercial Artist","Communications Affairs Director","Communications Director","Communications Engineer","Compensation Analyst","Computer Programmer","Computer Ops. Manager","Computer Engineer","Computer Operator","Computer Graphics Specialist","Construction Engineer","Construction Manager","Consultant","Consumer Relations Manager","Contract Administrator","Copyright Attorney","Copywriter","Corporate Planner","Corrections Officer","Cosmetologist","Credit Analyst","Cruise Director","Chief Information Officer","Chief Technology Officer","Customer Service Manager","Cryptologist","Dancer","Data Security Manager","Database Manager","Day Care Instructor","Dentist","Designer","Design Engineer","Desktop Publisher","Developer","Development Officer","Diamond Merchant","Dietitian","Direct Marketer","Director","Distribution Manager","Diversity Manager","Economist","EEO Compliance Manager","Editor","Education Adminator","Electrical Engineer","Electro Optical Engineer","Electronics Engineer","Embassy Management","Employment Agent","Engineer Technician","Entrepreneur","Environmental Analyst","Environmental Attorney","Environmental Engineer","Environmental Specialist","Escrow Officer","Estimator","Executive Assistant","Executive Director","Executive Recruiter","Facilities Manager","Family Counselor","Fashion Events Manager","Fashion Merchandiser","Fast Food Manager","Film Producer","Film Production Assistant","Financial Analyst","Financial Planner","Financier","Fine Artist","Wildlife Specialist","Fitness Consultant","Flight Attendant","Flight Engineer","Floral Designer","Food & Beverage Director","Food Service Manager","Forestry Technician","Franchise Management","Franchise Sales","Fraud Investigator","Freelance Writer","Fund Raiser","General Manager","Geologist","General Counsel","Geriatric Specialist","Gerontologist","Glamour Photographer","Golf Club Manager","Gourmet Chef","Graphic Designer","Grounds Keeper","Hazardous Waste Manager","Health Care Manager","Health Therapist","Health Service Administrator","Hearing Officer","Home Economist","Horticulturist","Hospital Administrator","Hotel Manager","Human Resources Manager","Importer","Industrial Designer","Industrial Engineer","Information Director","Inside Sales","Insurance Adjuster","Interior Decorator","Internal Controls Director","International Acct.","International Courier","International Lawyer","Interpreter","Investigator","Investment Banker","Investment Manager","IT Architect","IT Project Manager","IT Systems Analyst","Jeweler","Joint Venture Manager","Journalist","Labor Negotiator","Labor Organizer","Labor Relations Manager","Lab Services Director","Lab Technician","Land Developer","Landscape Architect","Law Enforcement Officer","Lawyer","Lead Software Engineer","Lead Software Test Engineer","Leasing Manager","Legal Secretary","Library Manager","Litigation Attorney","Loan Officer","Lobbyist","Logistics Manager","Maintenance Manager","Management Consultant","Managed Care Director","Managing Partner","Manufacturing Director","Manpower Planner","Marine Biologist","Market Res. Analyst","Marketing Director","Materials Manager","Mathematician","Membership Chairman","Mechanic","Mechanical Engineer","Media Buyer","Medical Investor","Medical Secretary","Medical Technician","Mental Health Counselor","Merchandiser","Metallurgical Engineering","Meteorologist","Microbiologist","MIS Manager","Motion Picture Director","Multimedia Director","Musician","Network Administrator","Network Specialist","Network Operator","New Product Manager","Novelist","Nuclear Engineer","Nuclear Specialist","Nutritionist","Nursing Administrator","Occupational Therapist","Oceanographer","Office Manager","Operations Manager","Operations Research Director","Optical Technician","Optometrist","Organizational Development Manager","Outplacement Specialist","Paralegal","Park Ranger","Patent Attorney","Payroll Specialist","Personnel Specialist","Petroleum Engineer","Pharmacist","Photographer","Physical Therapist","Physician","Physician Assistant","Physicist","Planning Director","Podiatrist","Political Analyst","Political Scientist","Politician","Portfolio Manager","Preschool Management","Preschool Teacher","Principal","Private Banker","Private Investigator","Probation Officer","Process Engineer","Producer","Product Manager","Product Engineer","Production Engineer","Production Planner","Professional Athlete","Professional Coach","Professor","Project Engineer","Project Manager","Program Manager","Property Manager","Public Administrator","Public Safety Director","PR Specialist","Publisher","Purchasing Agent","Publishing Director","Quality Assurance Specialist","Quality Control Engineer","Quality Control Inspector","Radiology Manager","Railroad Engineer","Real Estate Broker","Recreational Director","Recruiter","Redevelopment Specialist","Regulatory Affairs Manager","Registered Nurse","Rehabilitation Counselor","Relocation Manager","Reporter","Research Specialist","Restaurant Manager","Retail Store Manager","Risk Analyst","Safety Engineer","Sales Engineer","Sales Trainer","Sales Promotion Manager","Sales Representative","Sales Manager","Service Manager","Sanitation Engineer","Scientific Programmer","Scientific Writer","Securities Analyst","Security Consultant","Security Director","Seminar Presenter","Ship's Officer","Singer","Social Director","Social Program Planner","Social Research","Social Scientist","Social Worker","Sociologist","Software Developer","Software Engineer","Software Test Engineer","Soil Scientist","Special Events Manager","Special Education Teacher","Special Projects Director","Speech Pathologist","Speech Writer","Sports Event Manager","Statistician","Store Manager","Strategic Alliance Director","Strategic Planning Director","Stress Reduction Specialist","Stockbroker","Surveyor","Structural Engineer","Superintendent","Supply Chain Director","System Engineer","Systems Analyst","Systems Programmer","System Administrator","Tax Specialist","Teacher","Technical Support Specialist","Technical Illustrator","Technical Writer","Technology Director","Telecom Analyst","Telemarketer","Theatrical Director","Title Examiner","Tour Escort","Tour Guide Director","Traffic Manager","Trainer Translator","Transportation Manager","Travel Agent","Treasurer","TV Programmer","Underwriter","Union Representative","University Administrator","University Dean","Urban Planner","Veterinarian","Vendor Relations Director","Viticulturist","Warehouse Manager"],animals:{ocean:["Acantharea","Anemone","Angelfish King","Ahi Tuna","Albacore","American Oyster","Anchovy","Armored Snail","Arctic Char","Atlantic Bluefin Tuna","Atlantic Cod","Atlantic Goliath Grouper","Atlantic Trumpetfish","Atlantic Wolffish","Baleen Whale","Banded Butterflyfish","Banded Coral Shrimp","Banded Sea Krait","Barnacle","Barndoor Skate","Barracuda","Basking Shark","Bass","Beluga Whale","Bluebanded Goby","Bluehead Wrasse","Bluefish","Bluestreak Cleaner-Wrasse","Blue Marlin","Blue Shark","Blue Spiny Lobster","Blue Tang","Blue Whale","Broadclub Cuttlefish","Bull Shark","Chambered Nautilus","Chilean Basket Star","Chilean Jack Mackerel","Chinook Salmon","Christmas Tree Worm","Clam","Clown Anemonefish","Clown Triggerfish","Cod","Coelacanth","Cockscomb Cup Coral","Common Fangtooth","Conch","Cookiecutter Shark","Copepod","Coral","Corydoras","Cownose Ray","Crab","Crown-of-Thorns Starfish","Cushion Star","Cuttlefish","California Sea Otters","Dolphin","Dolphinfish","Dory","Devil Fish","Dugong","Dumbo Octopus","Dungeness Crab","Eccentric Sand Dollar","Edible Sea Cucumber","Eel","Elephant Seal","Elkhorn Coral","Emperor Shrimp","Estuarine Crocodile","Fathead Sculpin","Fiddler Crab","Fin Whale","Flameback","Flamingo Tongue Snail","Flashlight Fish","Flatback Turtle","Flatfish","Flying Fish","Flounder","Fluke","French Angelfish","Frilled Shark","Fugu (also called Pufferfish)","Gar","Geoduck","Giant Barrel Sponge","Giant Caribbean Sea Anemone","Giant Clam","Giant Isopod","Giant Kingfish","Giant Oarfish","Giant Pacific Octopus","Giant Pyrosome","Giant Sea Star","Giant Squid","Glowing Sucker Octopus","Giant Tube Worm","Goblin Shark","Goosefish","Great White Shark","Greenland Shark","Grey Atlantic Seal","Grouper","Grunion","Guineafowl Puffer","Haddock","Hake","Halibut","Hammerhead Shark","Hapuka","Harbor Porpoise","Harbor Seal","Hatchetfish","Hawaiian Monk Seal","Hawksbill Turtle","Hector's Dolphin","Hermit Crab","Herring","Hoki","Horn Shark","Horseshoe Crab","Humpback Anglerfish","Humpback Whale","Icefish","Imperator Angelfish","Irukandji Jellyfish","Isopod","Ivory Bush Coral","Japanese Spider Crab","Jellyfish","John Dory","Juan Fernandez Fur Seal","Killer Whale","Kiwa Hirsuta","Krill","Lagoon Triggerfish","Lamprey","Leafy Seadragon","Leopard Seal","Limpet","Ling","Lionfish","Lions Mane Jellyfish","Lobe Coral","Lobster","Loggerhead Turtle","Longnose Sawshark","Longsnout Seahorse","Lophelia Coral","Marrus Orthocanna","Manatee","Manta Ray","Marlin","Megamouth Shark","Mexican Lookdown","Mimic Octopus","Moon Jelly","Mollusk","Monkfish","Moray Eel","Mullet","Mussel","Megaladon","Napoleon Wrasse","Nassau Grouper","Narwhal","Nautilus","Needlefish","Northern Seahorse","North Atlantic Right Whale","Northern Red Snapper","Norway Lobster","Nudibranch","Nurse Shark","Oarfish","Ocean Sunfish","Oceanic Whitetip Shark","Octopus","Olive Sea Snake","Orange Roughy","Ostracod","Otter","Oyster","Pacific Angelshark","Pacific Blackdragon","Pacific Halibut","Pacific Sardine","Pacific Sea Nettle Jellyfish","Pacific White Sided Dolphin","Pantropical Spotted Dolphin","Patagonian Toothfish","Peacock Mantis Shrimp","Pelagic Thresher Shark","Penguin","Peruvian Anchoveta","Pilchard","Pink Salmon","Pinniped","Plankton","Porpoise","Polar Bear","Portuguese Man o' War","Pycnogonid Sea Spider","Quahog","Queen Angelfish","Queen Conch","Queen Parrotfish","Queensland Grouper","Ragfish","Ratfish","Rattail Fish","Ray","Red Drum","Red King Crab","Ringed Seal","Risso's Dolphin","Ross Seals","Sablefish","Salmon","Sand Dollar","Sandbar Shark","Sawfish","Sarcastic Fringehead","Scalloped Hammerhead Shark","Seahorse","Sea Cucumber","Sea Lion","Sea Urchin","Seal","Shark","Shortfin Mako Shark","Shovelnose Guitarfish","Shrimp","Silverside Fish","Skipjack Tuna","Slender Snipe Eel","Smalltooth Sawfish","Smelts","Sockeye Salmon","Southern Stingray","Sponge","Spotted Porcupinefish","Spotted Dolphin","Spotted Eagle Ray","Spotted Moray","Squid","Squidworm","Starfish","Stickleback","Stonefish","Stoplight Loosejaw","Sturgeon","Swordfish","Tan Bristlemouth","Tasseled Wobbegong","Terrible Claw Lobster","Threespot Damselfish","Tiger Prawn","Tiger Shark","Tilefish","Toadfish","Tropical Two-Wing Flyfish","Tuna","Umbrella Squid","Velvet Crab","Venus Flytrap Sea Anemone","Vigtorniella Worm","Viperfish","Vampire Squid","Vaquita","Wahoo","Walrus","West Indian Manatee","Whale","Whale Shark","Whiptail Gulper","White-Beaked Dolphin","White-Ring Garden Eel","White Shrimp","Wobbegong","Wrasse","Wreckfish","Xiphosura","Yellowtail Damselfish","Yelloweye Rockfish","Yellow Cup Black Coral","Yellow Tube Sponge","Yellowfin Tuna","Zebrashark","Zooplankton"],desert:["Aardwolf","Addax","African Wild Ass","Ant","Antelope","Armadillo","Baboon","Badger","Bat","Bearded Dragon","Beetle","Bird","Black-footed Cat","Boa","Brown Bear","Bustard","Butterfly","Camel","Caracal","Caracara","Caterpillar","Centipede","Cheetah","Chipmunk","Chuckwalla","Climbing Mouse","Coati","Cobra","Cotton Rat","Cougar","Courser","Crane Fly","Crow","Dassie Rat","Dove","Dunnart","Eagle","Echidna","Elephant","Emu","Falcon","Fly","Fox","Frogmouth","Gecko","Geoffroy's Cat","Gerbil","Grasshopper","Guanaco","Gundi","Hamster","Hawk","Hedgehog","Hyena","Hyrax","Jackal","Kangaroo","Kangaroo Rat","Kestrel","Kowari","Kultarr","Leopard","Lion","Macaw","Meerkat","Mouse","Oryx","Ostrich","Owl","Pronghorn","Python","Rabbit","Raccoon","Rattlesnake","Rhinoceros","Sand Cat","Spectacled Bear","Spiny Mouse","Starling","Stick Bug","Tarantula","Tit","Toad","Tortoise","Tyrant Flycatcher","Viper","Vulture","Waxwing","Xerus","Zebra"],grassland:["Aardvark","Aardwolf","Accentor","African Buffalo","African Wild Dog","Alpaca","Anaconda","Ant","Anteater","Antelope","Armadillo","Baboon","Badger","Bandicoot","Barbet","Bat","Bee","Bee-eater","Beetle","Bird","Bison","Black-footed Cat","Black-footed Ferret","Bluebird","Boa","Bowerbird","Brown Bear","Bush Dog","Bushshrike","Bustard","Butterfly","Buzzard","Caracal","Caracara","Cardinal","Caterpillar","Cheetah","Chipmunk","Civet","Climbing Mouse","Clouded Leopard","Coati","Cobra","Cockatoo","Cockroach","Common Genet","Cotton Rat","Cougar","Courser","Coyote","Crane","Crane Fly","Cricket","Crow","Culpeo","Death Adder","Deer","Deer Mouse","Dingo","Dinosaur","Dove","Drongo","Duck","Duiker","Dunnart","Eagle","Echidna","Elephant","Elk","Emu","Falcon","Finch","Flea","Fly","Flying Frog","Fox","Frog","Frogmouth","Garter Snake","Gazelle","Gecko","Geoffroy's Cat","Gerbil","Giant Tortoise","Giraffe","Grasshopper","Grison","Groundhog","Grouse","Guanaco","Guinea Pig","Hamster","Harrier","Hartebeest","Hawk","Hedgehog","Helmetshrike","Hippopotamus","Hornbill","Hyena","Hyrax","Impala","Jackal","Jaguar","Jaguarundi","Kangaroo","Kangaroo Rat","Kestrel","Kultarr","Ladybug","Leopard","Lion","Macaw","Meerkat","Mouse","Newt","Oryx","Ostrich","Owl","Pangolin","Pheasant","Prairie Dog","Pronghorn","Przewalski's Horse","Python","Quoll","Rabbit","Raven","Rhinoceros","Shelduck","Sloth Bear","Spectacled Bear","Squirrel","Starling","Stick Bug","Tamandua","Tasmanian Devil","Thornbill","Thrush","Toad","Tortoise"],forest:["Agouti","Anaconda","Anoa","Ant","Anteater","Antelope","Armadillo","Asian Black Bear","Aye-aye","Babirusa","Baboon","Badger","Bandicoot","Banteng","Barbet","Basilisk","Bat","Bearded Dragon","Bee","Bee-eater","Beetle","Bettong","Binturong","Bird-of-paradise","Bongo","Bowerbird","Bulbul","Bush Dog","Bushbaby","Bushshrike","Butterfly","Buzzard","Caecilian","Cardinal","Cassowary","Caterpillar","Centipede","Chameleon","Chimpanzee","Cicada","Civet","Clouded Leopard","Coati","Cobra","Cockatoo","Cockroach","Colugo","Cotinga","Cotton Rat","Cougar","Crane Fly","Cricket","Crocodile","Crow","Cuckoo","Cuscus","Death Adder","Deer","Dhole","Dingo","Dinosaur","Drongo","Duck","Duiker","Eagle","Echidna","Elephant","Finch","Flat-headed Cat","Flea","Flowerpecker","Fly","Flying Frog","Fossa","Frog","Frogmouth","Gaur","Gecko","Gorilla","Grison","Hawaiian Honeycreeper","Hawk","Hedgehog","Helmetshrike","Hornbill","Hyrax","Iguana","Jackal","Jaguar","Jaguarundi","Kestrel","Ladybug","Lemur","Leopard","Lion","Macaw","Mandrill","Margay","Monkey","Mouse","Mouse Deer","Newt","Okapi","Old World Flycatcher","Orangutan","Owl","Pangolin","Peafowl","Pheasant","Possum","Python","Quokka","Rabbit","Raccoon","Red Panda","Red River Hog","Rhinoceros","Sloth Bear","Spectacled Bear","Squirrel","Starling","Stick Bug","Sun Bear","Tamandua","Tamarin","Tapir","Tarantula","Thrush","Tiger","Tit","Toad","Tortoise","Toucan","Trogon","Trumpeter","Turaco","Turtle","Tyrant Flycatcher","Viper","Vulture","Wallaby","Warbler","Wasp","Waxwing","Weaver","Weaver-finch","Whistler","White-eye","Whydah","Woodswallow","Worm","Wren","Xenops","Yellowjacket","Accentor","African Buffalo","American Black Bear","Anole","Bird","Bison","Boa","Brown Bear","Chipmunk","Common Genet","Copperhead","Coyote","Deer Mouse","Dormouse","Elk","Emu","Fisher","Fox","Garter Snake","Giant Panda","Giant Tortoise","Groundhog","Grouse","Guanaco","Himalayan Tahr","Kangaroo","Koala","Numbat","Quoll","Raccoon dog","Tasmanian Devil","Thornbill","Turkey","Vole","Weasel","Wildcat","Wolf","Wombat","Woodchuck","Woodpecker"],farm:["Alpaca","Buffalo","Banteng","Cow","Cat","Chicken","Carp","Camel","Donkey","Dog","Duck","Emu","Goat","Gayal","Guinea","Goose","Horse","Honey","Llama","Pig","Pigeon","Rhea","Rabbit","Sheep","Silkworm","Turkey","Yak","Zebu"],pet:["Bearded Dragon","Birds","Burro","Cats","Chameleons","Chickens","Chinchillas","Chinese Water Dragon","Cows","Dogs","Donkey","Ducks","Ferrets","Fish","Geckos","Geese","Gerbils","Goats","Guinea Fowl","Guinea Pigs","Hamsters","Hedgehogs","Horses","Iguanas","Llamas","Lizards","Mice","Mule","Peafowl","Pigs and Hogs","Pigeons","Ponies","Pot Bellied Pig","Rabbits","Rats","Sheep","Skinks","Snakes","Stick Insects","Sugar Gliders","Tarantula","Turkeys","Turtles"],zoo:["Aardvark","African Wild Dog","Aldabra Tortoise","American Alligator","American Bison","Amur Tiger","Anaconda","Andean Condor","Asian Elephant","Baby Doll Sheep","Bald Eagle","Barred Owl","Blue Iguana","Boer Goat","California Sea Lion","Caribbean Flamingo","Chinchilla","Collared Lemur","Coquerel's Sifaka","Cuban Amazon Parrot","Ebony Langur","Fennec Fox","Fossa","Gelada","Giant Anteater","Giraffe","Gorilla","Grizzly Bear","Henkel's Leaf-tailed Gecko","Indian Gharial","Indian Rhinoceros","King Cobra","King Vulture","Komodo Dragon","Linne's Two-toed Sloth","Lion","Little Penguin","Madagascar Tree Boa","Magellanic Penguin","Malayan Tapir","Malayan Tiger","Matschies Tree Kangaroo","Mini Donkey","Monarch Butterfly","Nile crocodile","North American Porcupine","Nubian Ibex","Okapi","Poison Dart Frog","Polar Bear","Pygmy Marmoset","Radiated Tortoise","Red Panda","Red Ruffed Lemur","Ring-tailed Lemur","Ring-tailed Mongoose","Rock Hyrax","Small Clawed Asian Otter","Snow Leopard","Snowy Owl","Southern White-faced Owl","Southern White Rhinocerous","Squirrel Monkey","Tufted Puffin","White Cheeked Gibbon","White-throated Bee Eater","Zebra"]},primes:[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007],emotions:["love","joy","surprise","anger","sadness","fear"]},y=Object.prototype.hasOwnProperty,b=Object.keys||function(e){var t=[];for(var n in e)y.call(e,n)&&t.push(n);return t};function C(e,t){var n=Array.isArray(e),i=t||(n?new Array(e.length):{});return n?function(e,t){for(var n=0,i=e.length;n0)return this.normal_pool(e);var t,n,i,r=e.mean,o=e.dev;do{t=(n=2*this.random()-1)*n+(i=2*this.random()-1)*i}while(t>=1);return o*(n*Math.sqrt(-2*Math.log(t)/t))+r},c.prototype.normal_pool=function(e){var t=0;do{var n=Math.round(this.normal({mean:e.mean,dev:e.dev}));if(n=0)return e.pool[n];t++}while(t<100);throw new RangeError("Chance: Your pool is too small for the given mean and standard deviation. Please adjust.")},c.prototype.radio=function(e){var t="";switch((e=h(e,{side:"?"})).side.toLowerCase()){case"east":case"e":t="W";break;case"west":case"w":t="K";break;default:t=this.character({pool:"KW"})}return t+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})},c.prototype.set=function(e,t){"string"==typeof e?_[e]=t:_=C(e,_)},c.prototype.tv=function(e){return this.radio(e)},c.prototype.cnpj=function(){var e=this.n(this.natural,8,{max:9}),t=2+6*e[7]+7*e[6]+8*e[5]+9*e[4]+2*e[3]+3*e[2]+4*e[1]+5*e[0];(t=11-t%11)>=10&&(t=0);var n=2*t+3+7*e[7]+8*e[6]+9*e[5]+2*e[4]+3*e[3]+4*e[2]+5*e[1]+6*e[0];return(n=11-n%11)>=10&&(n=0),""+e[0]+e[1]+"."+e[2]+e[3]+e[4]+"."+e[5]+e[6]+e[7]+"/0001-"+t+n},c.prototype.emotion=function(){return this.pick(this.get("emotions"))},c.prototype.mersenne_twister=function(e){return new x(e)},c.prototype.blueimp_md5=function(){return new v};var x=function(e){void 0===e&&(e=Math.floor(Math.random()*Math.pow(10,13))),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};x.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},x.prototype.init_by_array=function(e,t){var n,i,r=1,o=0;for(this.init_genrand(19650218),n=this.N>t?this.N:t;n;n--)i=this.mt[r-1]^this.mt[r-1]>>>30,this.mt[r]=(this.mt[r]^(1664525*((4294901760&i)>>>16)<<16)+1664525*(65535&i))+e[o]+o,this.mt[r]>>>=0,o++,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),o>=t&&(o=0);for(n=this.N-1;n;n--)i=this.mt[r-1]^this.mt[r-1]>>>30,this.mt[r]=(this.mt[r]^(1566083941*((4294901760&i)>>>16)<<16)+1566083941*(65535&i))-r,this.mt[r]>>>=0,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1);this.mt[0]=2147483648},x.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti===this.N+1&&this.init_genrand(5489),n=0;n>>1^t[1&e];for(;n>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},x.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},x.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},x.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},x.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},x.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var v=function(){};v.prototype.VERSION="1.0.1",v.prototype.safe_add=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},v.prototype.bit_roll=function(e,t){return e<>>32-t},v.prototype.md5_cmn=function(e,t,n,i,r,o){return this.safe_add(this.bit_roll(this.safe_add(this.safe_add(t,e),this.safe_add(i,o)),r),n)},v.prototype.md5_ff=function(e,t,n,i,r,o,s){return this.md5_cmn(t&n|~t&i,e,t,r,o,s)},v.prototype.md5_gg=function(e,t,n,i,r,o,s){return this.md5_cmn(t&i|n&~i,e,t,r,o,s)},v.prototype.md5_hh=function(e,t,n,i,r,o,s){return this.md5_cmn(t^n^i,e,t,r,o,s)},v.prototype.md5_ii=function(e,t,n,i,r,o,s){return this.md5_cmn(n^(t|~i),e,t,r,o,s)},v.prototype.binl_md5=function(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,i,r,o,s,a=1732584193,l=-271733879,c=-1732584194,h=271733878;for(n=0;n>5]>>>t%32&255);return n},v.prototype.rstr2binl=function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(r=this.binl_md5(r,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=this.binl_md5(o.concat(this.rstr2binl(t)),512+8*t.length),this.binl2rstr(this.binl_md5(s.concat(i),640))},v.prototype.rstr2hex=function(e){var t,n,i="0123456789abcdef",r="";for(n=0;n>>4&15)+i.charAt(15&t);return r},v.prototype.str2rstr_utf8=function(e){return unescape(encodeURIComponent(e))},v.prototype.raw_md5=function(e){return this.rstr_md5(this.str2rstr_utf8(e))},v.prototype.hex_md5=function(e){return this.rstr2hex(this.raw_md5(e))},v.prototype.raw_hmac_md5=function(e,t){return this.rstr_hmac_md5(this.str2rstr_utf8(e),this.str2rstr_utf8(t))},v.prototype.hex_hmac_md5=function(e,t){return this.rstr2hex(this.raw_hmac_md5(e,t))},v.prototype.md5=function(e,t,n){return t?n?this.raw_hmac_md5(t,e):this.hex_hmac_md5(t,e):n?this.raw_md5(e):this.hex_md5(e)},e.exports&&(t=e.exports=c),t.Chance=c,"undefined"!=typeof importScripts&&(chance=new c,self.Chance=c),"object"==typeof window&&"object"==typeof window.document&&(window.Chance=c,window.chance=new c)}()}));Ho.Chance;var Uo=wo((function(e,t){function n(e,t){if(!(this instanceof n))return new n(e,t);this.x=e||0,this.y=t||0}e.exports=n,n.fromArray=function(e){return new n(e[0]||0,e[1]||0)},n.fromObject=function(e){return new n(e.x||0,e.y||0)},n.prototype.addX=function(e){return this.x+=e.x,this},n.prototype.addY=function(e){return this.y+=e.y,this},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.addScalar=function(e){return this.x+=e,this.y+=e,this},n.prototype.addScalarX=function(e){return this.x+=e,this},n.prototype.addScalarY=function(e){return this.y+=e,this},n.prototype.subtractX=function(e){return this.x-=e.x,this},n.prototype.subtractY=function(e){return this.y-=e.y,this},n.prototype.subtract=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.subtractScalar=function(e){return this.x-=e,this.y-=e,this},n.prototype.subtractScalarX=function(e){return this.x-=e,this},n.prototype.subtractScalarY=function(e){return this.y-=e,this},n.prototype.divideX=function(e){return this.x/=e.x,this},n.prototype.divideY=function(e){return this.y/=e.y,this},n.prototype.divide=function(e){return this.x/=e.x,this.y/=e.y,this},n.prototype.divideScalar=function(e){return 0!==e?(this.x/=e,this.y/=e):(this.x=0,this.y=0),this},n.prototype.divideScalarX=function(e){return 0!==e?this.x/=e:this.x=0,this},n.prototype.divideScalarY=function(e){return 0!==e?this.y/=e:this.y=0,this},n.prototype.invertX=function(){return this.x*=-1,this},n.prototype.invertY=function(){return this.y*=-1,this},n.prototype.invert=function(){return this.invertX(),this.invertY(),this},n.prototype.multiplyX=function(e){return this.x*=e.x,this},n.prototype.multiplyY=function(e){return this.y*=e.y,this},n.prototype.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},n.prototype.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},n.prototype.multiplyScalarX=function(e){return this.x*=e,this},n.prototype.multiplyScalarY=function(e){return this.y*=e,this},n.prototype.normalize=function(){var e=this.length();return 0===e?(this.x=1,this.y=0):this.divide(n(e,e)),this},n.prototype.norm=n.prototype.normalize,n.prototype.limit=function(e,t){return Math.abs(this.x)>e&&(this.x*=t),Math.abs(this.y)>e&&(this.y*=t),this},n.prototype.randomize=function(e,t){return this.randomizeX(e,t),this.randomizeY(e,t),this},n.prototype.randomizeX=function(e,t){var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x);return this.x=r(n,i),this},n.prototype.randomizeY=function(e,t){var n=Math.min(e.y,t.y),i=Math.max(e.y,t.y);return this.y=r(n,i),this},n.prototype.randomizeAny=function(e,t){return Math.round(Math.random())?this.randomizeX(e,t):this.randomizeY(e,t),this},n.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},n.prototype.toFixed=function(e){return void 0===e&&(e=8),this.x=this.x.toFixed(e),this.y=this.y.toFixed(e),this},n.prototype.mixX=function(e,t){return void 0===t&&(t=.5),this.x=(1-t)*this.x+t*e.x,this},n.prototype.mixY=function(e,t){return void 0===t&&(t=.5),this.y=(1-t)*this.y+t*e.y,this},n.prototype.mix=function(e,t){return this.mixX(e,t),this.mixY(e,t),this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.copyX=function(e){return this.x=e.x,this},n.prototype.copyY=function(e){return this.y=e.y,this},n.prototype.copy=function(e){return this.copyX(e),this.copyY(e),this},n.prototype.zero=function(){return this.x=this.y=0,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.cross=function(e){return this.x*e.y-this.y*e.x},n.prototype.projectOnto=function(e){var t=(this.x*e.x+this.y*e.y)/(e.x*e.x+e.y*e.y);return this.x=t*e.x,this.y=t*e.y,this},n.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)},n.prototype.horizontalAngleDeg=function(){return o(this.horizontalAngle())},n.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)},n.prototype.verticalAngleDeg=function(){return o(this.verticalAngle())},n.prototype.angle=n.prototype.horizontalAngle,n.prototype.angleDeg=n.prototype.horizontalAngleDeg,n.prototype.direction=n.prototype.horizontalAngle,n.prototype.rotate=function(e){var t=this.x*Math.cos(e)-this.y*Math.sin(e),n=this.x*Math.sin(e)+this.y*Math.cos(e);return this.x=t,this.y=n,this},n.prototype.rotateDeg=function(e){return e=s(e),this.rotate(e)},n.prototype.rotateTo=function(e){return this.rotate(e-this.angle())},n.prototype.rotateToDeg=function(e){return e=s(e),this.rotateTo(e)},n.prototype.rotateBy=function(e){var t=this.angle()+e;return this.rotate(t)},n.prototype.rotateByDeg=function(e){return e=s(e),this.rotateBy(e)},n.prototype.distanceX=function(e){return this.x-e.x},n.prototype.absDistanceX=function(e){return Math.abs(this.distanceX(e))},n.prototype.distanceY=function(e){return this.y-e.y},n.prototype.absDistanceY=function(e){return Math.abs(this.distanceY(e))},n.prototype.distance=function(e){return Math.sqrt(this.distanceSq(e))},n.prototype.distanceSq=function(e){var t=this.distanceX(e),n=this.distanceY(e);return t*t+n*n},n.prototype.length=function(){return Math.sqrt(this.lengthSq())},n.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},n.prototype.magnitude=n.prototype.length,n.prototype.isZero=function(){return 0===this.x&&0===this.y},n.prototype.isEqualTo=function(e){return this.x===e.x&&this.y===e.y},n.prototype.toString=function(){return"x:"+this.x+", y:"+this.y},n.prototype.toArray=function(){return[this.x,this.y]},n.prototype.toObject=function(){return{x:this.x,y:this.y}};var i=180/Math.PI;function r(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function o(e){return e*i}function s(e){return e/i}})),jo="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},Vo=Array.prototype,Yo=Object.prototype,qo="undefined"!=typeof Symbol?Symbol.prototype:null,Ko=Vo.push,Xo=Vo.slice,Jo=Yo.toString,Zo=Yo.hasOwnProperty,Qo="undefined"!=typeof ArrayBuffer,$o="undefined"!=typeof DataView,es=Array.isArray,ts=Object.keys,ns=Object.create,is=Qo&&ArrayBuffer.isView,rs=isNaN,os=isFinite,ss=!{toString:null}.propertyIsEnumerable("toString"),as=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ls=Math.pow(2,53)-1;function cs(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),i=Array(n),r=0;r=0&&n<=ls}}function Fs(e){return function(t){return null==t?void 0:t[e]}}const ks=Fs("byteLength"),Bs=Os(ks);var Gs=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const zs=Qo?function(e){return is?is(e)&&!As(e):Bs(e)&&Gs.test(Jo.call(e))}:Ls(!1),Ws=Fs("length");function Hs(e,t){t=function(e){for(var t={},n=e.length,i=0;i":">",'"':""","'":"'","`":"`"},Da=Ma(Na),Ra=Ma(la(Na)),Pa=Vs.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var La=/(.)^/,Oa={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Fa=/\\|'|\r|\n|\u2028|\u2029/g;function ka(e){return"\\"+Oa[e]}var Ba=/^\s*(\w|\$)+\s*$/;var Ga=0;function za(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var o=ga(e.prototype),s=e.apply(o,r);return hs(s)?s:o}var Wa=cs((function(e,t){var n=Wa.placeholder,i=function(){for(var r=0,o=t.length,s=Array(o),a=0;a1)ja(a,t-1,n,i),r=i.length;else for(var l=0,c=a.length;l0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Ja=Wa(Xa,2);function Za(e,t,n){t=Ia(t,n);for(var i,r=Us(e),o=0,s=r.length;o0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=t(Xo.call(i,s,a),Ps))>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o0?0:s-1;for(r||(i=t[o?o[a]:a],a+=e);a>=0&&a=3;return t(e,va(n,r,4),i,o)}}const cl=ll(1),hl=ll(-1);function ul(e,t,n){var i=[];return t=Ia(t,n),sl(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i}function dl(e,t,n){t=Ia(t,n);for(var i=!Ua(e)&&Us(e),r=(i||e).length,o=0;o=0}const fl=cs((function(e,t,n){var i,r;return Ss(t)?r=t:(t=pa(t),i=t.slice(0,-1),t=t[t.length-1]),al(e,(function(e){var o=r;if(!o){if(i&&i.length&&(e=_a(e,i)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function pl(e,t){return al(e,xa(t))}function _l(e,t,n){var i,r,o=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=Ua(e)?e:aa(e)).length;ao&&(o=i);else t=Ia(t,n),sl(e,(function(e,n,i){((r=t(e,n,i))>s||r===-1/0&&o===-1/0)&&(o=e,s=r)}));return o}var yl=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function bl(e){return e?Ms(e)?Xo.call(e):gs(e)?e.match(yl):Ua(e)?al(e,ba):aa(e):[]}function Cl(e,t,n){if(null==t||n)return Ua(e)||(e=aa(e)),e[Ea(e.length-1)];var i=bl(e),r=Ws(i);t=Math.max(Math.min(t,r),0);for(var o=r-1,s=0;s1&&(i=va(i,t[1])),t=Xs(e)):(i=wl,t=ja(t,!1,!1),e=Object(e));for(var r=0,o=t.length;r1&&(n=t[1])):(t=al(ja(t,!1,!1),String),i=function(e,n){return!gl(t,n)}),El(e,i,n)}));function Ml(e,t,n){return Xo.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function Nl(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Ml(e,e.length-t)}function Dl(e,t,n){return Xo.call(e,null==t||n?1:t)}const Rl=cs((function(e,t){return t=ja(t,!0,!0),ul(e,(function(e){return!gl(t,e)}))})),Pl=cs((function(e,t){return Rl(e,t)}));function Ll(e,t,n,i){ds(t)||(i=n,n=t,t=!1),null!=n&&(n=Ia(n,i));for(var r=[],o=[],s=0,a=Ws(e);st?(i&&(clearTimeout(i),i=null),a=c,s=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,h)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},debounce:function(e,t,n){var i,r,o,s,a,l=function(){var c=Aa()-r;t>c?i=setTimeout(l,t-c):(i=null,n||(s=e.apply(a,o)),i||(o=a=null))},c=cs((function(c){return a=this,o=c,r=Aa(),i||(i=setTimeout(l,t),n&&(s=e.apply(a,o))),s}));return c.cancel=function(){clearTimeout(i),i=o=a=null},c},wrap:function(e,t){return Wa(t,e)},negate:Ka,compose:function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},after:function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},before:Xa,once:Ja,findKey:Za,findIndex:$a,findLastIndex:el,sortedIndex:tl,indexOf:il,lastIndexOf:rl,find:ol,detect:ol,findWhere:function(e,t){return ol(e,Ca(t))},each:sl,forEach:sl,map:al,collect:al,reduce:cl,foldl:cl,inject:cl,reduceRight:hl,foldr:hl,filter:ul,select:ul,reject:function(e,t,n){return ul(e,Ka(Ia(t)),n)},every:dl,all:dl,some:ml,any:ml,contains:gl,includes:gl,include:gl,invoke:fl,pluck:pl,where:function(e,t){return ul(e,Ca(t))},max:_l,min:function(e,t,n){var i,r,o=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=Ua(e)?e:aa(e)).length;ai||void 0===n)return 1;if(nn.right||tn.bottom)},Hl.prototype.intersects=function(e){if(!e.getBoundingBox)throw new Error("Given entity has no method getBoundingBox");var t=this.getBoundingBox(),n=e.getBoundingBox();return!(n.left>t.right||n.rightt.bottom||n.bottom{const t=[];return e.neighbours.n&&t.push(e.neighbours.n),e.neighbours.e&&t.push(e.neighbours.e),e.neighbours.s&&t.push(e.neighbours.s),e.neighbours.w&&t.push(e.neighbours.w),t},ql=new Ho,Kl=function(){var e,t,n=[],i=-1;const r=[new Uo(0,1),new Uo(1,0),new Uo(0,-1),new Uo(-1,0)],o=t=>{e=t};let s,a=[];const l=(e,n)=>t.integer({min:e,max:n}),c=(e,t)=>a[e][t],h=t=>{let n={};var i,r;for(i=0;i{const e=[],t=[];for(const t of n)e.push(t.toJS());for(let e=0;e{var n,i=[];if(Object.keys(a[e][t].neighbours).filter((e=>"floor"===e.type)).length>0)return;b(),C(e,t),i.push(new Uo(e,t));let o=0;for(;i.length&&o<500;){o++;var s=i[i.length-1],c=[];for(let e of r)y(s,e)&&c.push(e);if(c.length){var h,u=c.map((e=>e.toString()));if(n&&u.indexOf(n.toString())>-1&&l(1,100)>50)h=n.clone();else{h=c[l(0,c.length-1)].clone()}let e=s.clone().add(h).toObject();C(e.x,e.y);let t=s.clone().add(h).add(h).toObject();C(t.x,t.y),i.push(s.clone().add(h).add(h)),n=h.clone()}else i.pop(),n=null}},m=()=>{for(var t=0;t<50;t++){var i=2*l(1,3)+1,r=2*l(0,1+Math.floor(i/2)),o=i,s=i;p(2)?o+=r:s+=r,o=Math.min(o,e.width-4),s=Math.min(o,e.height-4);var a=2*l(0,Math.floor((e.width-o)/2))+1,c=2*l(0,Math.floor((e.height-s)/2))+1;a+o>e.width&&(a=Math.max(1,e.width-o-1)),c+s>e.height&&(c=Math.max(1,e.height-s-1));var h=new Ul(a,c,o,s),u=!1;for(var d of n)if(h.intersects(d)){u=!0;break}u||(n.push(h),b(),g(a,c,o,s))}},g=(e,t,n,i)=>{for(var r=e;r{let e={};a.forEach((t=>{t.forEach((t=>{if("floor"===t.type)return;let n=Wl.unique(Yl(t).map((e=>e.region)).filter((e=>!Wl.isUndefined(e))));if(n.length<=1)return;let i=n.join("-");e[i]||(e[i]=[]),e[i].push(t)}))})),Wl.each(e,(e=>{let t=l(0,e.length-1);e[t].type="door",e.splice(t,1),e.forEach((e=>{p(50)&&(e.type="door")}))}))},p=e=>1===l(1,e),_=()=>{var e=!1;const t=()=>{let e=!0;return a.forEach((t=>{t.forEach((t=>{"wall"!==t.type&&Yl(t).filter((e=>"wall"!==e.type)).length<=1&&!n.find((e=>e.containsTile(t.x,t.y)))&&(t.type="wall",e=!1)}))})),e};for(;!e;)e=!0,e=t()},y=(e,t)=>{let n=e.clone().add(t).add(t).add(t).toObject();if(!a[n.x]||!a[n.x][n.y])return!1;if("wall"!==c(n.x,n.y).type)return!1;let i=e.clone().add(t).add(t).toObject();return"floor"!==c(i.x,i.y).type},b=()=>++i,C=(e,t,n="floor")=>{((e,t,n)=>{if(a[e]&&a[e][t])return a[e][t].type=n,a[e][t].region=i,a[e][t];throw new RangeError(`tile at ${e}, ${t} is unreachable`)})(e,t,n)};return{build:e=>{if(e.width<5)throw new RangeError(`DungeoneerError: options.width must not be less than 5, received ${e.width}`);if(e.height<5)throw new RangeError(`DungeoneerError: options.height must not be less than 5, received ${e.height}`);e.width%2==0&&(e.width+=1),e.height%2==0&&(e.height+=1);const i=e.seed||`${ql.word({length:7})}-${ql.word({length:7})}`;t=new Ho(i),s=i,o(e),h("wall"),m();for(var r=1;r(new Kl).build(e);const Jl=2.3283064365386963e-10;class Zl{constructor(){this._seed=0,this._s0=0,this._s1=0,this._s2=0,this._c=0}getSeed(){return this._seed}setSeed(e){return e=e<1?1/e:e,this._seed=e,this._s0=(e>>>0)*Jl,e=69069*e+1>>>0,this._s1=e*Jl,e=69069*e+1>>>0,this._s2=e*Jl,this._c=1,this}getUniform(){let e=2091639*this._s0+this._c*Jl;return this._s0=this._s1,this._s1=this._s2,this._c=0|e,this._s2=e-this._c,this._s2}getUniformInt(e,t){let n=Math.max(e,t),i=Math.min(e,t);return Math.floor(this.getUniform()*(n-i+1))+i}getNormal(e=0,t=1){let n,i,r;do{n=2*this.getUniform()-1,i=2*this.getUniform()-1,r=n*n+i*i}while(r>1||0==r);return e+n*Math.sqrt(-2*Math.log(r)/r)*t}getPercentage(){return 1+Math.floor(100*this.getUniform())}getItem(e){return e.length?e[Math.floor(this.getUniform()*e.length)]:null}shuffle(e){let t=[],n=e.slice();for(;n.length;){let e=n.indexOf(this.getItem(n));t.push(n.splice(e,1)[0])}return t}getWeightedValue(e){let t=0;for(let n in e)t+=e[n];let n,i=this.getUniform()*t,r=0;for(n in e)if(r+=e[n],i{class e extends class extends class{getContainer(){return null}setOptions(e){this._options=e}}{constructor(){super(),this._ctx=document.createElement("canvas").getContext("2d")}schedule(e){requestAnimationFrame(e)}getContainer(){return this._ctx.canvas}setOptions(e){super.setOptions(e);const t=`${e.fontStyle?`${e.fontStyle} `:""} ${e.fontSize}px ${e.fontFamily}`;this._ctx.font=t,this._updateSize(),this._ctx.font=t,this._ctx.textAlign="center",this._ctx.textBaseline="middle"}clear(){this._ctx.fillStyle=this._options.bg,this._ctx.fillRect(0,0,this._ctx.canvas.width,this._ctx.canvas.height)}eventToPosition(e,t){let n=this._ctx.canvas,i=n.getBoundingClientRect();return e-=i.left,t-=i.top,e*=n.width/i.width,t*=n.height/i.height,e<0||t<0||e>=n.width||t>=n.height?[-1,-1]:this._normalizedEventToPosition(e,t)}}{constructor(){super(),this._spacingX=0,this._spacingY=0,this._canvasCache={}}setOptions(e){super.setOptions(e),this._canvasCache={}}draw(t,n){e.cache?this._drawWithCache(t):this._drawNoCache(t,n)}_drawWithCache(e){let t,[n,i,r,o,s]=e,a=""+r+o+s;if(a in this._canvasCache)t=this._canvasCache[a];else{let e=this._options.border;t=document.createElement("canvas");let n=t.getContext("2d");if(t.width=this._spacingX,t.height=this._spacingY,n.fillStyle=s,n.fillRect(e,e,t.width-e,t.height-e),r){n.fillStyle=o,n.font=this._ctx.font,n.textAlign="center",n.textBaseline="middle";let e=[].concat(r);for(let t=0;t1&&(i=Math.floor(i/s)),Math.floor(i/this._options.spacing)}_normalizedEventToPosition(e,t){return[Math.floor(e/this._spacingX),Math.floor(t/this._spacingY)]}_updateSize(){const e=this._options,t=Math.ceil(this._ctx.measureText("W").width);this._spacingX=Math.ceil(e.spacing*t),this._spacingY=Math.ceil(e.spacing*e.fontSize),e.forceSquareRatio&&(this._spacingX=this._spacingY=Math.max(this._spacingX,this._spacingY)),this._ctx.canvas.width=e.width*this._spacingX,this._ctx.canvas.height=e.height*this._spacingY}}e.cache=!1})(),"\n#version 300 es\n\nin vec2 tilePosRel;\nout vec2 tilesetPosPx;\n\nuniform vec2 tilesetPosAbs;\nuniform vec2 tileSize;\nuniform vec2 targetSize;\nuniform vec2 targetPosRel;\n\nvoid main() {\n\tvec2 targetPosPx = (targetPosRel + tilePosRel) * tileSize;\n\tvec2 targetPosNdc = ((targetPosPx / targetSize)-0.5)*2.0;\n\ttargetPosNdc.y *= -1.0;\n\n\tgl_Position = vec4(targetPosNdc, 0.0, 1.0);\n\ttilesetPosPx = tilesetPosAbs + tilePosRel * tileSize;\n}".trim(),"\n#version 300 es\nprecision highp float;\n\nin vec2 tilesetPosPx;\nout vec4 fragColor;\nuniform sampler2D image;\nuniform bool colorize;\nuniform vec4 bg;\nuniform vec4 tint;\n\nvoid main() {\n\tfragColor = vec4(0, 0, 0, 1);\n\n\tvec4 texel = texelFetch(image, ivec2(tilesetPosPx), 0);\n\n\tif (colorize) {\n\t\ttexel.rgb = tint.a * tint.rgb + (1.0-tint.a) * texel.rgb;\n\t\tfragColor.rgb = texel.a*texel.rgb + (1.0-texel.a)*bg.rgb;\n\t\tfragColor.a = texel.a + (1.0-texel.a)*bg.a;\n\t} else {\n\t\tfragColor = texel;\n\t}\n}".trim();const $l={4:[[0,-1],[1,0],[0,1],[-1,0]],8:[[0,-1],[1,-1],[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1]],6:[[-1,-1],[1,-1],[2,0],[1,1],[-1,1],[-2,0]]};class ec{constructor(e=80,t=25){this._width=e,this._height=t}_fillMap(e){let t=[];for(let n=0;nthis._options.timeLimit)return null;if(this._map=this._fillMap(1),this._dug=0,this._rooms=[],this._unconnected=[],this._generateRooms(),!(this._rooms.length<2)&&this._generateCorridors())break}if(e)for(let t=0;tthis._options.roomDugPercentage)break}while(e)}_generateRoom(){let e=0;for(;e0?2:0,o=(r+2)%4,s=t.getLeft(),a=t.getRight(),l=0):(r=u>0?1:3,o=(r+2)%4,s=t.getTop(),a=t.getBottom(),l=1),n=this._placeInWall(e,r),!n)return!1;if(n[l]>=s&&n[l]<=a){i=n.slice();let e=0;switch(o){case 0:e=t.getTop()-1;break;case 1:e=t.getRight()+1;break;case 2:e=t.getBottom()+1;break;case 3:e=t.getLeft()-1}i[(l+1)%2]=e,this._digLine([n,i])}else if(n[l]a+1){let e=n[l]-h[l],r=0;switch(o){case 0:case 1:r=e<0?3:1;break;case 2:case 3:r=e<0?1:3}if(o=(o+r)%4,i=this._placeInWall(t,o),!i)return!1;let s=[0,0];s[l]=n[l];let a=(l+1)%2;s[a]=i[a],this._digLine([n,s,i])}else{let e=(l+1)%2;if(i=this._placeInWall(t,o),!i)return!1;let r=Math.round((i[e]+n[e])/2),s=[0,0],a=[0,0];s[l]=n[l],s[e]=r,a[l]=i[l],a[e]=r,this._digLine([n,s,a,i])}return e.addDoor(n[0],n[1]),t.addDoor(i[0],i[1]),l=this._unconnected.indexOf(e),-1!=l&&(this._unconnected.splice(l,1),this._connected.push(e)),l=this._unconnected.indexOf(t),-1!=l&&(this._unconnected.splice(l,1),this._connected.push(t)),!0}_placeInWall(e,t){let n=[0,0],i=[0,0],r=0;switch(t){case 0:i=[1,0],n=[e.getLeft(),e.getTop()-1],r=e.getRight()-e.getLeft()+1;break;case 1:i=[0,1],n=[e.getRight()+1,e.getTop()],r=e.getBottom()-e.getTop()+1;break;case 2:i=[1,0],n=[e.getLeft(),e.getBottom()+1],r=e.getRight()-e.getLeft()+1;break;case 3:i=[0,1],n=[e.getLeft()-1,e.getTop()],r=e.getBottom()-e.getTop()+1}let o=[],s=-2;for(let e=0;e=0;e--)o[e]||o.splice(e,1);return o.length?Ql.getItem(o):null}_digLine(e){for(let t=1;t=this._width||t>=this._height)&&1==this._map[e][t]}_canBeDugCallback(e,t){return!(e<1||t<1||e+1>=this._width||t+1>=this._height)&&1==this._map[e][t]}},Cellular:class extends ec{constructor(e,t,n={}){super(e,t),this._options={born:[5,6,7,8],survive:[4,5,6,7,8],topology:8},this.setOptions(n),this._dirs=$l[this._options.topology],this._map=this._fillMap(0)}randomize(e){for(let t=0;t=this._width||s<0||s>=this._height||(n+=1==this._map[o][s]?1:0)}return n}connect(e,t,n){t||(t=0);let i=[],r={},o=1,s=[0,0];6==this._options.topology&&(o=2,s=[0,1]);for(let e=0;e0;){let e=this._getFromTo(c,r),i=e[0],o=e[1],s={};s[this._pointKey(i)]=i,this._findConnected(s,r,[i],!0,t),(6==this._options.topology?this._tunnelToConnected6:this._tunnelToConnected).call(this,o,i,c,r,t,n);for(let e in s){let n=s[e];this._map[n[0]][n[1]]=t,c[e]=n,delete r[e]}}e&&this._serviceCallback(e)}_getFromTo(e,t){let n,i=[0,0],r=[0,0],o=Object.keys(e),s=Object.keys(t);for(let a=0;a<5;a++){if(o.length0;){let o,s=n.splice(0,1)[0];o=6==this._options.topology?[[s[0]+2,s[1]],[s[0]+1,s[1]-1],[s[0]-1,s[1]-1],[s[0]-2,s[1]],[s[0]-1,s[1]+1],[s[0]+1,s[1]+1]]:[[s[0]+1,s[1]],[s[0]-1,s[1]],[s[0],s[1]+1],[s[0],s[1]-1]];for(let s=0;sa[1]&&(c--,e=1),la[0]||a[1]%2?l-=e:l+=e,this._map[l][c]=r;let t=[l,c],o=this._pointKey(t);n[o]=t,delete i[o]}o&&o(t,e)}_freeSpace(e,t,n){return e>=0&&e=0&&tthis._options.timeLimit)break;let e=this._findWall();if(!e)break;let t=e.split(","),r=parseInt(t[0]),o=parseInt(t[1]),s=this._getDiggingDirection(r,o);if(!s)continue;let a=0;do{if(a++,this._tryFeature(r,o,s[0],s[1])){this._removeSurroundingWalls(r,o),this._removeSurroundingWalls(r-s[0],o-s[1]);break}}while(a1&&n++}while(this._dug/t=this._width||t>=this._height)&&1==this._map[e][t]}_canBeDugCallback(e,t){return!(e<1||t<1||e+1>=this._width||t+1>=this._height)&&1==this._map[e][t]}_priorityWallCallback(e,t){this._walls[e+","+t]=2}_firstRoom(){let e=Math.floor(this._width/2),t=Math.floor(this._height/2),n=ic.createRandomCenter(e,t,this._options);this._rooms.push(n),n.create(this._digCallback)}_findWall(){let e=[],t=[];for(let n in this._walls){2==this._walls[n]?t.push(n):e.push(n)}let n=t.length?t:e;if(!n.length)return null;let i=Ql.getItem(n.sort());return delete this._walls[i],i}_tryFeature(e,t,n,i){let r=Ql.getWeightedValue(this._features),o=oc[r].createRandomAt(e,t,n,i,this._options);return!!o.isValid(this._isWallCallback,this._canBeDugCallback)&&(o.create(this._digCallback),o instanceof ic&&this._rooms.push(o),o instanceof rc&&(o.createPriorityWalls(this._priorityWallCallback),this._corridors.push(o)),!0)}_removeSurroundingWalls(e,t){let n=$l[4];for(let i=0;i=this._width-1||t>=this._height-1)return null;let n=null,i=$l[4];for(let r=0;rr&&(sc(e,o,s),n[i+1][a]=0),e!=o[e]&&Ql.getUniform()>r?ac(e,o,s):n[i][a+1]=0}for(let e=0;er)&&(sc(e,o,s),n[i+1][a]=0),ac(e,o,s)}for(let t=0;t=i||n>=r)&&e[t][n]}},Rogue:class extends ec{constructor(e,t,n){super(e,t),this.map=[],this.rooms=[],this.connectedCells=[],(n=Object.assign({cellWidth:3,cellHeight:3},n)).hasOwnProperty("roomWidth")||(n.roomWidth=this._calculateRoomSize(this._width,n.cellWidth)),n.hasOwnProperty("roomHeight")||(n.roomHeight=this._calculateRoomSize(this._height,n.cellHeight)),this._options=n}create(e){if(this.map=this._fillMap(1),this.rooms=[],this.connectedCells=[],this._initRooms(),this._connectRooms(),this._connectUnconnectedRooms(),this._createRandomRoomConnections(),this._createRooms(),this._createCorridors(),e)for(let t=0;t=this._options.cellWidth||n<0||n>=this._options.cellHeight)){if(i=this.rooms[s][a],i.connections.length>0&&i.connections[0][0]==t&&i.connections[0][1]==n)break;r=this.rooms[t][n],0==r.connections.length&&(r.connections.push([s,a]),this.connectedCells.push([t,n]),s=t,a=n,l=!0)}}while(o.length>0&&0==l)}while(o.length>0)}_connectUnconnectedRooms(){let e,t,n,i=this._options.cellWidth,r=this._options.cellHeight;this.connectedCells=Ql.shuffle(this.connectedCells);for(let o=0;o=i||c<0||c>=r)){if(t=this.rooms[l][c],n=!0,0==t.connections.length)break;for(let e=0;e0)for(r=this.rooms[m][a-1];i-(r.y+r.height)<3;)i++;if(m>0)for(r=this.rooms[m-1][a];n-(r.x+r.width)<3;)n++;let l=Math.round(Ql.getUniformInt(0,c-e)/2),g=Math.round(Ql.getUniformInt(0,h-t)/2);for(;n+l+e>=o;)l?l--:e--;for(;i+g+t>=s;)g?g--:t--;n+=l,i+=g,this.rooms[m][a].x=n,this.rooms[m][a].y=i,this.rooms[m][a].width=e,this.rooms[m][a].height=t;for(let r=n;r0?2:6,r=a>0?4:0,u0;)for(o=h.pop();o[1]>0;)l+=$l[8][o[0]][0],c+=$l[8][o[0]][1],this.map[l][c]=0,o[1]=o[1]-1}_createCorridors(){let e,t,n,i,r,o=this._options.cellWidth,s=this._options.cellHeight;for(let a=0;ae.cellx?(i=2,r=4):n.cellxe.celly?(i=3,r=1):(i=1,r=3),this._drawCorridor(this._getWallPosition(e,i),this._getWallPosition(n,r))}}}},cc=()=>Math.ceil(canvas.scene.width*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,hc=()=>Math.ceil(canvas.scene.height*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,uc=async(e,t)=>{const n=1*t.height,i=1*t.width,r=new lc.Cellular(i,n);r.randomize(.5);for(let e=0;e<4;e++)r.create();t.connectCaves&&r.connect(null,1);const o=canvas.scene.grid.size/1,s=cc(),a=hc();let l;for(let e=0;e{const n=t.height,i=t.width,r=new Wo({max_iterations:50,size:[i,n],rooms:{any:{min_size:[t.minRoomSize,t.minRoomSize],max_size:[t.maxRoomSize,t.maxRoomSize],max_exits:4}},min_corridor_length:2,max_corridor_length:8,corridor_density:.5,symmetric_rooms:t.centerExits,interconnects:t.circularPaths?1:0,max_interconnect_length:10,room_count:t.roomCount});r.generate();const o=canvas.scene.grid.size,s=cc(),a=hc();let l;for(let e=0;e{const n=Xl({width:t.width,height:t.height}),i=canvas.scene.grid.size,r=cc(),o=hc();let s;const a=[];for(const e of n.tiles)for(const t of e){if("floor"===t.type||"door"===t.type){const e={x:r+t.x*i,y:o+t.y*i,height:i,width:i},n=Nr(e);s=s?wr(s,n):n}"door"===t.type&&("floor"===t.neighbours.w?.type?a.push([r+(t.x+.5)*i,o+t.y*i,r+(t.x+.5)*i,o+(t.y+1)*i]):a.push([r+t.x*i,o+(t.y+.5)*i,r+(t.x+1)*i,o+(t.y+.5)*i]))}s=zr(s);const l=e.state().clone();l.geometry=s,l.doors=t.generateDungeoneerDoors?a:[],await e.pushState(l)},gc=()=>KeyboardManager.MODIFIER_KEYS?.SHIFT?game.keyboard.isModifierActive(KeyboardManager.MODIFIER_KEYS.SHIFT):game.keyboard.isDown("SHIFT"),fc=async()=>{let e=game.folders.filter((e=>"JournalEntry"===e.type&&"Dungeon Draw"===e.name)).pop();e||(e=await Folder.create({name:"Dungeon Draw",type:"JournalEntry"}));return await JournalEntry.create({name:canvas.scene.name,folder:e.id,flags:{"dungeon-draw":{dungeonVersion:"1.0"}}})},pc=async e=>{await canvas.scene.createEmbeddedDocuments("Note",[{entryId:e.id,fontSize:20,icon:"icons/svg/cave.svg",iconSize:32,textAnchor:1,textColor:"#FFFFFF",x:50,y:50,iconTint:"",text:"Dungeon Draw",flags:{}}])},_c=e=>{const t=[];for(let n=0;n<=e.shape.points.length-2;n+=2)t.push([e.shape.points[n]+e.x,e.shape.points[n+1]+e.y]);return t};class yc extends PlaceablesLayer{static LAYER_NAME="dungeon";constructor(){super(),this.dungeon=null}static get layerOptions(){return foundry.utils.mergeObject(super.layerOptions,{name:yc.LAYER_NAME,canDragCreate:!0,snapToGrid:t.snapToGrid(),zIndex:-1,quadtree:!0})}static documentName="Drawing";_getNewDrawingData(e){const t={fillColor:game.user.color,strokeColor:game.user.color,strokeWidth:8};if(t.x=e.x,t.y=e.y,t.author=game.user.id,t.shape={},"add"===game.activeDungeonDrawMode)switch(game.activeDungeonDrawTool){case"rectangle":t.shape.type=CONST.DRAWING_TYPES.RECTANGLE,t.shape.width=1,t.shape.height=1;break;case"polygon":case"interiorwall":case"door":case"secretdoor":case"invisiblewall":case"themepainter":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=0;break;case"freehand":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=t.bezierFactor??.5;break;case"ellipse":t.type=CONST.DRAWING_TYPES.ELLIPSE,t.shape.width=1,t.shape.height=1}else if("remove"===game.activeDungeonDrawMode)switch(game.activeDungeonDrawTool){case"rectangle":case"interiorwall":case"door":case"secretdoor":case"invisiblewall":case"themepainter":t.type=CONST.DRAWING_TYPES.RECTANGLE,t.shape.width=1,t.shape.height=1;break;case"polygon":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=0;break;case"freehand":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=t.bezierFactor??.5;break;case"ellipse":t.type=CONST.DRAWING_TYPES.ELLIPSE,t.shape.width=1,t.shape.height=1}return t}async undoHistory(){return super.undoHistory()}async deleteAll(){if(!game.user.isGM)throw new Error("You do not have permission to clear all.");return Dialog.confirm({title:game.i18n.localize("DD.ButtonTitleClearAll"),content:`

${game.i18n.localize("DD.ClearAllDialogContent")}

`,yes:()=>this.dungeon?.deleteAll()})}async generate(e){this.dungeon?await this.dungeon.deleteAll():await this.createNewDungeon(),await(async(e,t={})=>{try{switch(t.algorithm){case"2d-dungeon":await dc(e,t);break;case"rot-js-cellular":await uc(e,t);break;case"dungeoneer":await mc(e,t)}}catch(e){console.error(e),ui.notifications.error("Error generating dungeon... please try again.")}})(this.dungeon,e)}async loadDungeon(){const{journalEntry:t,note:n}=await(()=>{for(const t of canvas.scene.notes){const n=game.journal.get(t.entryId);if(n&&n.getFlag(e,"dungeonVersion"))return{journalEntry:n,note:t}}return{journalEntry:null,note:null}})();t?(this.dungeon=new To(t,n),await this.dungeon.loadFromJournalEntry(),this.addChildAt(this.dungeon,0)):this.dungeon=null}async createNewDungeon(){await(async()=>{const e=await fc();return{journalEntry:e,note:await pc(e)}})(),await this.loadDungeon()}async draw(){return await super.draw(),this}_onClickLeft(e){const{preview:t,createState:n,originalEvent:i}=e.data;if(n>=1&&t.isPolygon){let n=e.data.destination;return i.shiftKey||(n=canvas.grid.getSnappedPosition(n.x,n.y,this.gridPrecision)),t._addPoint(n,!1),t._chain=!0,t.refresh()}super._onClickLeft(e)}_onClickLeft2(e){const{createState:t,preview:n}=e.data;if(t>=1&&n.isPolygon)return e.data.createState=2,this._onDragLeftDrop(e);super._onClickLeft2(e)}async _onDragLeftStart(e){e.data.originalEvent.isShift=gc(),await super._onDragLeftStart(e),e.data.createState=1;const t=this._getNewDrawingData(e.data.origin),n=new DrawingDocument(t,{parent:canvas.scene}),i=new Drawing(n);return e.data.preview=this.preview.addChild(i),i.draw()}_onDragLeftMove(e){const{preview:t,createState:n}=e.data;if(t&&!t._destroyed&&(null===t.parent&&this.preview.addChild(t),n>=1)){"freehand"===game.activeDungeonDrawTool?((e,t)=>{const{destination:n}=t.data,i=n,r=Date.now()-e._drawTime4&&(e.shape.points[0]!==e.shape.points[t-2]||e.shape.points[1]!==e.shape.points[t-1])&&e.shape.points.push(e.shape.points[0],e.shape.points[1])}async _onDragLeftDrop(e){const{createState:t,destination:n,origin:i,preview:r}=e.data,o=game.activeDungeonDrawMode+game.activeDungeonDrawTool;if(2===t||"freehand"===game.activeDungeonDrawTool){this.dungeon||await this.createNewDungeon();const t=Math.hypot(n.x-i.x,n.y-i.y)>=canvas.dimensions.size/8,s=r.isPolygon&&r.document.shape.points.length>4;if("adddoor"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addDoor(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addsecretdoor"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addSecretDoor(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addinteriorwall"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addInteriorWall(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addinvisiblewall"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addInvisibleWall(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if(t||s){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1;const n=this.constructor.placeableClass.normalizeShape(t);if("addellipse"===o){const e=n.x+n.shape.width/2,t=n.y+n.shape.height/2;await this.dungeon.addEllipse(e,t,n.shape.width,n.shape.height)}else if("addfreehand"===o){this._autoClosePolygon(n);const e=_c(n);await this.dungeon.addPolygon(e)}else if("addpolygon"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=_c(n);await this.dungeon.addPolygon(e)}else if("addrectangle"===o){const e=this._maybeSnappedRect(n);await this.dungeon.addRectangle(e)}else if("addthemepainter"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=_c(n);await this.dungeon.addThemeArea(e)}else if("removedoor"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeDoors(e)}else if("removeellipse"===o){const e=n.x+n.shape.width/2,t=n.y+n.shape.height/2;await this.dungeon.removeEllipse(e,t,n.shape.width,n.shape.height)}else if("removefreehand"===o){this._autoClosePolygon(n);const e=_c(n);await this.dungeon.removePolygon(e)}else if("removesecretdoor"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeSecretDoors(e)}else if("removeinteriorwall"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeInteriorWalls(e)}else if("removeinvisiblewall"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeInvisibleWalls(e)}else if("removepolygon"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=_c(n);await this.dungeon.removePolygon(e)}else if("removerectangle"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeRectangle(e)}else if("removethemepainter"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeThemeAreas(e)}}return this._onDragLeftCancel(e)}if(1===t&&r.isPolygon){if(e.data.originalEvent.preventDefault(),r._chain)return;return this._onClickLeft(e)}return this._onDragLeftCancel(e)}}class bc extends FormApplication{constructor(e="settings"){super(),this._tabs[0].active=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-generator-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/generator-sheet.html",width:480,height:800,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.GeneratorSheetTitle")}getData(){return{height:30,width:30,centerExits:!1,circularPaths:!1,generate2DDungeonDoors:!0,maxRoomSize:7,minRoomSize:3,roomCount:15,generateDungeoneerDoors:!0,connectCaves:!0,smoothing:0}}activateListeners(e){super.activateListeners(e),e.find('button[name="generate"]').click(this.generate.bind(this)),e.find('select[name="algorithm"]').change(this.changeAlgorithm.bind(this)),this.changeAlgorithm()}async changeAlgorithm(e){e?.preventDefault();const t=`.${this._getSubmitData().algorithm}`;$(".alg-fields").filter(t).show(),$(".alg-fields").not(t).hide()}async generate(e){e.preventDefault();const t=this._getSubmitData();await canvas.dungeon.generate(t)}}class Cc{static register(){game.keybindings.register(e,"redo",{name:"DD.ButtonTitleRedo",uneditable:[{key:"KeyY",modifiers:[KeyboardManager.MODIFIER_KEYS.CONTROL]}],onDown:Cc.onRedo}),game.keybindings.register(e,"undo",{name:"DD.ButtonTitleUndo",uneditable:[{key:"KeyZ",modifiers:[KeyboardManager.MODIFIER_KEYS.CONTROL]}],onDown:Cc.onUndo})}static onRedo(){if(!canvas.ready)return!1;const e=canvas.activeLayer;return e instanceof yc&&(e.dungeon?.redo(),!0)}static onUndo(){if(!canvas.ready)return!1;const e=canvas.activeLayer;return e instanceof yc&&(e.dungeon?.undo(),!0)}}class xc extends Application{static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-toolbar",popOut:!1,template:"modules/dungeon-draw/templates/toolbar.html"})}constructor(){super()}activateListeners(e){super.activateListeners(e),e.find(".addremove-toggle").click(this.addRemoveClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this.themeSelectChange.bind(this)),e.find(".control-tool").click(this.controlToolClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this.themeSelectChange.bind(this))}getData(){const e=n(),t=Object.keys(e).sort(),i=Object.keys(s).sort(),o=r(),a="add"===game.activeDungeonDrawMode?"toggle-on":"",l="remove"===game.activeDungeonDrawMode?"toggle-on":"";return{customThemes:e,customThemeKeys:t,row1:[{name:"rectangle",title:"DD.ButtonTitleRectangle",icon:"fas fa-square",class:"add",isActive:"rectangle"===game.activeDungeonDrawTool},{name:"polygon",title:"DD.ButtonTitlePolygon",icon:"fas fa-draw-polygon",isActive:"polygon"===game.activeDungeonDrawTool},{name:"ellipse",title:"DD.ButtonTitleEllipse",icon:"fas fa-circle",isActive:"ellipse"===game.activeDungeonDrawTool},{name:"freehand",title:"DD.ButtonTitleFreehand",icon:"fas fa-signature",isActive:"freehand"===game.activeDungeonDrawTool}],row2:[{name:"interiorwall",title:"DD.ButtonTitleInteriorWall",icon:"fas fa-bars",isActive:"interiorwall"===game.activeDungeonDrawTool},{name:"door",title:"DD.ButtonTitleDoor",icon:"fas fa-door-open",isActive:"door"===game.activeDungeonDrawTool},{name:"secretdoor",title:"DD.ButtonTitleSecretDoor",icon:"fas fa-user-secret",isActive:"secretdoor"===game.activeDungeonDrawTool},{name:"invisiblewall",title:"DD.ButtonTitleInvisibleWall",icon:"fas fa-eye-slash",isActive:"invisiblewall"===game.activeDungeonDrawTool}],row3:[{name:"themepainter",title:"DD.ButtonTitleThemePainter",icon:"fas fa-brush",isActive:"themepainter"===game.activeDungeonDrawTool}],themeKeys:i,themePainterThemeKey:o,themes:s,toggleAddClass:a,toggleRemoveClass:l}}render(e=!1,t={}){super.render(e,t)}updateActiveCss(){this._element.find(".control-tool").removeClass("active"),this._element.find(`[data-tool='${game.activeDungeonDrawTool}']`).addClass("active")}addRemoveClick(e){game.activeDungeonDrawMode=$(e.target).data("addremove"),this._element.find(".addremove-toggle").removeClass("toggle-on"),$(e.currentTarget).addClass("toggle-on")}controlToolClick(e){const t=$(e.currentTarget).data("tool");game.activeDungeonDrawTool=t,this.updateActiveCss()}themeSelectChange(e){const t=$(e.currentTarget).val();o(t)}}const vc=new xc;class Sc{static init(){t.register(),Cc.register(),game.activeDungeonDrawTool="rectangle",game.activeDungeonDrawMode="add"}static ready(){}static controlsVisible(){if(game.user.isGM)return!0;return game.settings.get(e,"allowTrustedPlayer")&&game.user.isTrusted}static getSceneControlButtons(e){CONFIG.Canvas.layers.dungeon={layerClass:yc,group:"primary"},CONFIG.Dungeon={layerClass:yc},e.push({name:"dungeondraw",title:"DD.SceneControlTitle",layer:yc.LAYER_NAME,icon:"fas fa-dungeon",visible:Sc.controlsVisible(),tools:[{name:"drawmap",title:"DD.ButtonTitleDrawMap",icon:"fas fa-dungeon"},{name:"undo",title:"DD.ButtonTitleUndo",icon:"fas fa-undo",onClick:async()=>{await canvas.dungeon.dungeon.undo()},button:!0},{name:"redo",title:"DD.ButtonTitleRedo",icon:"fas fa-redo",onClick:async()=>{await canvas.dungeon.dungeon.redo()},button:!0},{name:"generate",title:"DD.ButtonTitleGenerate",icon:"fas fa-magic",onClick:async()=>(new bc).render(!0),button:!0},{name:"config",title:"DD.ButtonTitleConfig",icon:"fas fa-cog",onClick:()=>(new l).render(!0),button:!0},{name:"savetoscene",title:"DD.ButtonTitleSaveToSceneBackground",icon:"fas fa-sign-out-alt",visible:game.user.isGM,onClick:async()=>{await canvas.dungeon.dungeon.saveToSceneBackground()},button:!0},{name:"clear",title:"DD.ButtonTitleClearAll",icon:"fas fa-trash",visible:game.user.isGM,onClick:()=>canvas.dungeon.deleteAll(),button:!0}],activeTool:"drawmap"})}static async canvasReady(e){await e.dungeon.loadDungeon()}static async updateJournalEntry(e,t,n,i){game.user.id!==i&&await(canvas.dungeon.dungeon?.maybeRefresh(e))}static async renderSceneControls(e){"dungeondraw"===e.activeControl?vc.render(!0):await vc.close()}}Hooks.on("init",Sc.init),Hooks.on("ready",Sc.ready),Hooks.on("getSceneControlButtons",Sc.getSceneControlButtons),Hooks.on("canvasReady",Sc.canvasReady),Hooks.on("updateJournalEntry",Sc.updateJournalEntry),Hooks.on("renderSceneControls",Sc.renderSceneControls);export{Sc as DungeonDraw}; + */var no=function(e,t,n,i,r,o,s,a){var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function c(e,t){function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=arguments,i=1,r=arguments.length;i 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n")||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,i)},t}(t.Filter),m=function(e){function t(t){void 0===t&&(t=.5);var n=e.call(this,u,"\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n")||this;return n.threshold=t,n}return c(t,e),Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(t.Filter),g=function(e){function t(t,i,r){void 0===t&&(t=4),void 0===i&&(i=3),void 0===r&&(r=!1);var o=e.call(this,u,r?"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n":"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}")||this;return o._kernels=[],o._blur=4,o._quality=3,o.uniforms.uOffset=new Float32Array(2),o._pixelSize=new n.Point,o.pixelSize=1,o._clamp=r,Array.isArray(t)?o.kernels=t:(o._blur=t,o.quality=i),o}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o=this._pixelSize.x/t._frame.width,s=this._pixelSize.y/t._frame.height;if(1===this._quality||0===this._blur)r=this._kernels[0]+.5,this.uniforms.uOffset[0]=r*o,this.uniforms.uOffset[1]=r*s,e.applyFilter(this,t,n,i);else{for(var a=e.getFilterTexture(),l=t,c=a,h=void 0,u=this._quality-1,d=0;d0)for(var i=e,r=e/t,o=1;o0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(e){"number"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof n.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(t.Filter),f=function(e){function t(n){var r=e.call(this,u,"uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n")||this;r.bloomScale=1,r.brightness=1,r._resolution=i.settings.FILTER_RESOLUTION,"number"==typeof n&&(n={threshold:n});var o=Object.assign(t.defaults,n);r.bloomScale=o.bloomScale,r.brightness=o.brightness;var s=o.kernels,a=o.blur,l=o.quality,c=o.pixelSize,h=o.resolution;return r._extractFilter=new m(o.threshold),r._extractFilter.resolution=h,r._blurFilter=s?new g(s):new g(a,l),r.pixelSize=c,r.resolution=h,r}return c(t,e),t.prototype.apply=function(e,t,n,i,r){var o=e.getFilterTexture();this._extractFilter.apply(e,t,o,1,r);var s=e.getFilterTexture();this._blurFilter.apply(e,o,s,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=s,e.applyFilter(this,t,n,i),e.returnFilterTexture(s),e.returnFilterTexture(o)},Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},t}(t.Filter),p=function(e){function t(t){void 0===t&&(t=8);var n=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n")||this;return n.size=t,n}return c(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t}(t.Filter),_=function(e){function t(t){var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n")||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return c(t,e),t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._angle/n.DEG_TO_RAD},set:function(e){this._angle=e*n.DEG_TO_RAD,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return r.rgb2hex(this.uniforms.lightColor)},set:function(e){r.hex2rgb(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowColor",{get:function(){return r.rgb2hex(this.uniforms.shadowColor)},set:function(e){r.hex2rgb(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t}(t.Filter),y=function(e){function t(t,r,l,c){void 0===t&&(t=2),void 0===r&&(r=4),void 0===l&&(l=i.settings.FILTER_RESOLUTION),void 0===c&&(c=5);var h,u,d=e.call(this)||this;return"number"==typeof t?(h=t,u=t):t instanceof n.Point?(h=t.x,u=t.y):Array.isArray(t)&&(h=t[0],u=t[1]),d.blurXFilter=new a.BlurFilterPass(!0,h,r,l,c),d.blurYFilter=new a.BlurFilterPass(!1,u,r,l,c),d.blurYFilter.blendMode=o.BLEND_MODES.SCREEN,d.defaultFilter=new s.AlphaFilter,d}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this.defaultFilter.apply(e,t,n,i),this.blurXFilter.apply(e,t,r,1),this.blurYFilter.apply(e,r,n,0),e.returnFilterTexture(r)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),t}(t.Filter),b=function(e){function t(n){var i=e.call(this,u,"uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n")||this;return i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),t.defaults={center:[.5,.5],radius:100,strength:1},t}(t.Filter),C=function(e){function n(t,n,i){void 0===n&&(n=!1),void 0===i&&(i=1);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}")||this;return r.mix=1,r._size=0,r._sliceSize=0,r._slicePixelSize=0,r._sliceInnerSize=0,r._nearest=!1,r._scaleMode=null,r._colorMap=null,r._scaleMode=null,r.nearest=n,r.mix=i,r.colorMap=t,r}return c(n,e),n.prototype.apply=function(e,t,n,i){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,i)},Object.defineProperty(n.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"colorMap",{get:function(){return this._colorMap},set:function(e){var n;e&&(e instanceof t.Texture||(e=t.Texture.from(e)),(null===(n=e)||void 0===n?void 0:n.baseTexture)&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=o.MIPMAP_MODES.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nearest",{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?o.SCALE_MODES.NEAREST:o.SCALE_MODES.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=o.MIPMAP_MODES.OFF,t._updateID++,t.baseTexture.emit("update",t.baseTexture))},enumerable:!1,configurable:!0}),n.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)},n.prototype.destroy=function(t){void 0===t&&(t=!1),this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},n}(t.Filter),x=function(e){function t(t,n){void 0===t&&(t=0),void 0===n&&(n=1);var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 color;\nuniform float alpha;\n\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a);\n}\n")||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=t,i.alpha=n,i}return c(t,e),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){var t=this.uniforms.color;"number"==typeof e?(r.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._color=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),t}(t.Filter),v=function(e){function t(t,n,i){void 0===t&&(t=16711680),void 0===n&&(n=0),void 0===i&&(i=.4);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n")||this;return r._originalColor=16711680,r._newColor=0,r.uniforms.originalColor=new Float32Array(3),r.uniforms.newColor=new Float32Array(3),r.originalColor=t,r.newColor=n,r.epsilon=i,r}return c(t,e),Object.defineProperty(t.prototype,"originalColor",{get:function(){return this._originalColor},set:function(e){var t=this.uniforms.originalColor;"number"==typeof e?(r.hex2rgb(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"newColor",{get:function(){return this._newColor},set:function(e){var t=this.uniforms.newColor;"number"==typeof e?(r.hex2rgb(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),t}(t.Filter),S=function(e){function t(t,n,i){void 0===n&&(n=200),void 0===i&&(i=200);var r=e.call(this,u,"precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n")||this;return r.uniforms.texelSize=new Float32Array(2),r.uniforms.matrix=new Float32Array(9),void 0!==t&&(r.matrix=t),r.width=n,r.height=i,r}return c(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(e){var t=this;e.forEach((function(e,n){t.uniforms.matrix[n]=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),t}(t.Filter),T=function(e){function t(){return e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")||this}return c(t,e),t}(t.Filter),I=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 dir = vec2(vTextureCoord.xy - vec2(0.5, 0.5)) * filterArea.xy / dimensions;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0)\n {\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n")||this;return i.time=0,i.seed=0,i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t}(t.Filter),w=function(e){function t(t,n){void 0===t&&(t=1),void 0===n&&(n=5);var i=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n")||this;return i.scale=t,i.angle=n,i}return c(t,e),Object.defineProperty(t.prototype,"scale",{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t}(t.Filter),E=function(e){function o(r){var s=e.call(this)||this;s.angle=45,s._distance=5,s._resolution=i.settings.FILTER_RESOLUTION;var a=r?h(h({},o.defaults),r):o.defaults,l=a.kernels,c=a.blur,d=a.quality,m=a.pixelSize,f=a.resolution;s._tintFilter=new t.Filter(u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\n\nuniform vec2 shift;\nuniform vec4 inputSize;\n\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\n\n // Premultiply alpha\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}"),s._tintFilter.uniforms.color=new Float32Array(4),s._tintFilter.uniforms.shift=new n.Point,s._tintFilter.resolution=f,s._blurFilter=l?new g(l):new g(c,d),s.pixelSize=m,s.resolution=f;var p=a.shadowOnly,_=a.rotation,y=a.distance,b=a.alpha,C=a.color;return s.shadowOnly=p,s.rotation=_,s.distance=y,s.alpha=b,s.color=C,s._updatePadding(),s}return c(o,e),o.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this._tintFilter.apply(e,t,r,1),this._blurFilter.apply(e,r,n,i),!0!==this.shadowOnly&&e.applyFilter(this,t,n,0),e.returnFilterTexture(r)},o.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},o.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(o.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"distance",{get:function(){return this._distance},set:function(e){this._distance=e,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"rotation",{get:function(){return this.angle/n.DEG_TO_RAD},set:function(e){this.angle=e*n.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"alpha",{get:function(){return this._tintFilter.uniforms.alpha},set:function(e){this._tintFilter.uniforms.alpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"color",{get:function(){return r.rgb2hex(this._tintFilter.uniforms.color)},set:function(e){r.hex2rgb(e,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),o.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},o}(t.Filter),A=function(e){function t(t){void 0===t&&(t=5);var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n")||this;return n.strength=t,n}return c(t,e),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),t}(t.Filter),M=function(e){function i(n){var r=e.call(this,u,"// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n")||this;return r.offset=100,r.fillMode=i.TRANSPARENT,r.average=!1,r.seed=0,r.minSize=8,r.sampleSize=512,r._slices=0,r._offsets=new Float32Array(1),r._sizes=new Float32Array(1),r._direction=-1,r.uniforms.dimensions=new Float32Array(2),r._canvas=document.createElement("canvas"),r._canvas.width=4,r._canvas.height=r.sampleSize,r.texture=t.Texture.from(r._canvas,{scaleMode:o.SCALE_MODES.NEAREST}),Object.assign(r,i.defaults,n),r}return c(i,e),i.prototype.apply=function(e,t,n,i){var r=t.filterFrame,o=r.width,s=r.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.aspect=s/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,i)},i.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var r=this._slices,o=1,s=0;s0;t--){var n=Math.random()*t>>0,i=e[t];e[t]=e[n],e[n]=i}},i.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,l=e<0?-e:0;i.fillStyle="rgba("+a+", "+l+", 0, 1)",i.fillRect(0,r>>0,t,s+1>>0),r+=s}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(i.prototype,"sizes",{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n>0)},Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t}(t.Filter),P=function(e){function t(t,n,i){void 0===n&&(n=.05),void 0===i&&(i=t.length);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n".replace(/%maxColors%/g,i.toFixed(0)))||this;return r._replacements=[],r._maxColors=0,r.epsilon=n,r._maxColors=i,r.uniforms.originalColors=new Float32Array(3*i),r.uniforms.targetColors=new Float32Array(3*i),r.replacements=t,r}return c(t,e),Object.defineProperty(t.prototype,"replacements",{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,n=this.uniforms.targetColors,i=e.length;if(i>this._maxColors)throw new Error("Length of replacements ("+i+") exceeds the maximum colors length ("+this._maxColors+")");t[3*i]=-1;for(var o=0;o 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n")||this;return r.seed=0,r.uniforms.dimensions=new Float32Array(2),"number"==typeof n?(r.seed=n,n=void 0):r.seed=i,Object.assign(r,t.defaults,n),r}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"sepia",{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratch",{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchDensity",{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchWidth",{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),t.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t}(t.Filter),O=function(e){function t(n,i,r){void 0===n&&(n=1),void 0===i&&(i=0),void 0===r&&(r=.1);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n".replace(/\$\{angleStep\}/,t.getAngleStep(r)))||this;return o._thickness=1,o.uniforms.thickness=new Float32Array([0,0]),o.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(o,{thickness:n,color:i,quality:r}),o}return c(t,e),t.getAngleStep=function(e){var n=Math.max(e*t.MAX_SAMPLES,t.MIN_SAMPLES);return(2*Math.PI/n).toFixed(7)},t.prototype.apply=function(e,t,n,i){this.uniforms.thickness[0]=this._thickness/t._frame.width,this.uniforms.thickness[1]=this._thickness/t._frame.height,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"color",{get:function(){return r.rgb2hex(this.uniforms.outlineColor)},set:function(e){r.hex2rgb(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),t.MIN_SAMPLES=1,t.MAX_SAMPLES=100,t}(t.Filter),F=function(e){function t(t){void 0===t&&(t=10);var n=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n")||this;return n.size=t,n}return c(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this.uniforms.size},set:function(e){"number"==typeof e&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),t}(t.Filter),k=function(e){function t(t,n,i,r){void 0===t&&(t=0),void 0===n&&(n=[0,0]),void 0===i&&(i=5),void 0===r&&(r=-1);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n")||this;return o._angle=0,o.angle=t,o.center=n,o.kernelSize=i,o.radius=r,o}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t}(t.Filter),B=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n")||this;return i.time=0,i.uniforms.amplitude=new Float32Array(2),i.uniforms.waveLength=new Float32Array(2),i.uniforms.alpha=new Float32Array(2),i.uniforms.dimensions=new Float32Array(2),Object.assign(i,t.defaults,n),i}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"mirror",{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"boundary",{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"waveLength",{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),t.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t}(t.Filter),G=function(e){function t(t,n,i){void 0===t&&(t=[-10,0]),void 0===n&&(n=[0,10]),void 0===i&&(i=[0,0]);var r=e.call(this,u,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n")||this;return r.red=t,r.green=n,r.blue=i,r}return c(t,e),Object.defineProperty(t.prototype,"red",{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"green",{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blue",{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),t}(t.Filter),z=function(e){function t(n,i,r){void 0===n&&(n=[0,0]),void 0===r&&(r=0);var o=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n")||this;return o.center=n,Object.assign(o,t.defaults,i),o.time=r,o}return c(t,e),t.prototype.apply=function(e,t,n,i){this.uniforms.time=this.time,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wavelength",{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"brightness",{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),t.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t}(t.Filter),W=function(e){function t(t,n,i){void 0===n&&(n=0),void 0===i&&(i=1);var r=e.call(this,u,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n")||this;return r._color=0,r.uniforms.dimensions=new Float32Array(2),r.uniforms.ambientColor=new Float32Array([0,0,0,i]),r.texture=t,r.color=n,r}return c(t,e),t.prototype.apply=function(e,t,n,i){var r,o;this.uniforms.dimensions[0]=null===(r=t.filterFrame)||void 0===r?void 0:r.width,this.uniforms.dimensions[1]=null===(o=t.filterFrame)||void 0===o?void 0:o.height,e.applyFilter(this,t,n,i)},Object.defineProperty(t.prototype,"texture",{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){var t=this.uniforms.ambientColor;"number"==typeof e?(r.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=r.rgb2hex(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),t}(t.Filter),H=function(e){function t(t,i,r,o){void 0===t&&(t=100),void 0===i&&(i=600);var s=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n")||this;return s.uniforms.blur=t,s.uniforms.gradientBlur=i,s.uniforms.start=r||new n.Point(0,window.innerHeight/2),s.uniforms.end=o||new n.Point(600,window.innerHeight/2),s.uniforms.delta=new n.Point(30,30),s.uniforms.texSize=new n.Point(window.innerWidth,window.innerHeight),s.updateDelta(),s}return c(t,e),t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(t.prototype,"blur",{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),t}(t.Filter),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(H),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(H),V=function(e){function t(t,n,i,r){void 0===t&&(t=100),void 0===n&&(n=600);var o=e.call(this)||this;return o.tiltShiftXFilter=new U(t,n,i,r),o.tiltShiftYFilter=new j(t,n,i,r),o}return c(t,e),t.prototype.apply=function(e,t,n,i){var r=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,r,1),this.tiltShiftYFilter.apply(e,r,n,i),e.returnFilterTexture(r)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),t}(t.Filter),Y=function(e){function t(n){var i=e.call(this,u,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n")||this;return Object.assign(i,t.defaults,n),i}return c(t,e),Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),t.defaults={radius:200,angle:4,padding:20,offset:new n.Point},t}(t.Filter),q=function(e){function t(n){var i,r=Object.assign(t.defaults,n),o=r.maxKernelSize,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n".replace("${maxKernelSize}",o.toFixed(1)))||this,Object.assign(i,s),i}return c(t,e),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerRadius",{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t}(t.Filter);return e.AdjustmentFilter=d,e.AdvancedBloomFilter=f,e.AsciiFilter=p,e.BevelFilter=_,e.BloomFilter=y,e.BulgePinchFilter=b,e.CRTFilter=I,e.ColorMapFilter=C,e.ColorOverlayFilter=x,e.ColorReplaceFilter=v,e.ConvolutionFilter=S,e.CrossHatchFilter=T,e.DotFilter=w,e.DropShadowFilter=E,e.EmbossFilter=A,e.GlitchFilter=M,e.GlowFilter=N,e.GodrayFilter=D,e.KawaseBlurFilter=g,e.MotionBlurFilter=R,e.MultiColorReplaceFilter=P,e.OldFilmFilter=L,e.OutlineFilter=O,e.PixelateFilter=F,e.RGBSplitFilter=G,e.RadialBlurFilter=k,e.ReflectionFilter=B,e.ShockwaveFilter=z,e.SimpleLightmapFilter=W,e.TiltShiftAxisFilter=H,e.TiltShiftFilter=V,e.TiltShiftXFilter=U,e.TiltShiftYFilter=j,e.TwistFilter=Y,e.ZoomBlurFilter=q,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,no);const io=e=>{const t=e?.baseTexture?.resource?.source;t&&"VIDEO"===t.tagName&&(t.loop=!0,t.muted=!0,game.video.play(t))},ro=async(e,t)=>{if(!t.geometry)return;const n=new PIXI.Graphics,i=new PIXI.Graphics,r=new PIXI.Graphics,o=new PIXI.Graphics;ao(e,t.config,t.geometry);const s=new PIXI.Graphics;ho(s,t.geometry),e.addChild(s),i.mask=s;const a=new PIXI.filters.AlphaFilter(t.config.interiorShadowOpacity),l=new PIXI.filters.BlurFilter;i.filters=[a,l],go(n,i,r,t.config,t.geometry);const c=new PIXI.Graphics,h=JSON.parse(JSON.stringify(t.config));h.wallColor="#000000";for(const e of t.interiorWalls)yo(i,t.config,e),t.config.wallTexture?po(c,h,e):po(r,t.config,e);for(const e of t.invisibleWalls)xo(i,t.config,e),_o(o,r,c,t.config,e);for(const e of t.doors)vo(i,t.config,e),bo(o,r,c,t.config,e);for(const e of t.secretDoors)yo(i,t.config,e),Co(o,r,c,t.config,e);if(e.addChild(n),e.addChild(i),t.config.wallTexture){mo(c,t.geometry,t.config.wallThickness),e.addChild(c);const n=Er(t.geometry,t.config.wallThickness/2),i=await so(t.config.wallTexture);if(i?.valid){let e=null;t.config.wallTextureRotation&&(e=PIXI.Matrix.IDENTITY.clone(),e.rotate(t.config.wallTextureRotation*PIXI.DEG_TO_RAD)),io(i),r.beginTextureFill({texture:i,alpha:1,matrix:e});const o=n.getCoordinates().map((e=>[e.x,e.y])).flat();r.drawPolygon(o),r.endFill(),r.mask=c,t.config.wallTextureTint&&(r.tint=PIXI.utils.string2hex(t.config.wallTextureTint))}}e.addChild(r),e.addChild(o)},oo=async(e,t)=>{for(const n of t.themeAreas){const i=t.clone();i.config=n.config,i.config.doorColor=t.config.doorColor,i.config.doorFillColor=t.config.doorFillColor,i.config.doorFillOpacity=t.config.doorFillOpacity,i.config.doorThickness=t.config.doorThickness,i.config.matchBaseWalls&&(i.config.wallColor=t.config.wallColor,i.config.wallTexture=t.config.wallTexture,i.config.wallTextureTint=t.config.wallTextureTint,i.config.wallThickness=t.config.wallThickness),i.config.exteriorShadowOpacity=0;const r=new PIXI.Container,o=new PIXI.Graphics;o.beginFill(16777215,1),o.drawPolygon(n.points.flat()),o.endFill(),r.mask=o,Rr(n.points),await ro(r,i),e.addChild(o),e.addChild(r)}},so=async e=>{try{const t=await loadTexture(e);return t||ui.notifications.error(`${game.i18n.localize("DD.TextureLoadFailure")}: ${e}`),t}catch(e){console.log(e)}},ao=(e,t,n)=>{if(!t.exteriorShadowThickness||!t.exteriorShadowOpacity||!n)return;const i=new PIXI.Graphics;i.lineStyle({width:t.wallThickness+t.exteriorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"});for(let e=0;e{const i=n.getExteriorRing();e.drawPolygon(i.getCoordinates().map((e=>[e.x,e.y])).flat());const r=n.getNumInteriorRing();for(let t=0;t[e.x,e.y])).flat())}},co=(e,t)=>{const n=t.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();e.beginFill(16777215,1),e.drawPolygon(n),e.endFill();const i=t.getNumInteriorRing();for(let n=0;n[e.x,e.y])).flat();e.lineStyle(0,0,1,1,.5),e.beginHole(),e.drawPolygon(i),e.endHole()}},ho=(e,t)=>{for(let n=0;n{const i=t.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();e.lineStyle(n,PIXI.utils.string2hex("#000000"),1,.5),e.drawPolygon(i);const r=t.getNumInteriorRing();for(let i=0;i[e.x,e.y])).flat();e.lineStyle(n,PIXI.utils.string2hex("#000000"),1),e.drawPolygon(r)}},mo=(e,t,n)=>{for(let i=0;i{for(let o=0;o{const o=r.getExteriorRing().getCoordinates().map((e=>[e.x,e.y])).flat();if(i.floorTexture){const t=await so(i.floorTexture);if(t?.valid){let n=null;i.floorTextureRotation&&(n=PIXI.Matrix.IDENTITY.clone(),n.rotate(i.floorTextureRotation*PIXI.DEG_TO_RAD)),io(t),e.beginTextureFill({texture:t,alpha:i.floorOpacity,matrix:n}),e.drawPolygon(o),e.endFill(),i.floorTextureTint&&(e.tint=PIXI.utils.string2hex(i.floorTextureTint))}}else e.beginFill(PIXI.utils.string2hex(i.floorColor),i.floorOpacity),e.drawPolygon(o),e.endFill();const s=r.getNumInteriorRing();for(let t=0;t[e.x,e.y])).flat();e.lineStyle(0,0,1,1,.5),e.beginHole(),e.drawPolygon(n),e.endHole()}i.interiorShadowOpacity&&(t.lineStyle({width:i.wallThickness+i.interiorShadowThickness,color:PIXI.utils.string2hex(i.interiorShadowColor),alignment:.5,join:"round"}),t.drawPolygon(o)),i.wallTexture||(n.lineStyle(i.wallThickness,PIXI.utils.string2hex(i.wallColor),1,.5),n.drawPolygon(o));for(let e=0;e[e.x,e.y])).flat();t.drawPolygon(o),i.wallTexture||(n.lineStyle(i.wallThickness,PIXI.utils.string2hex(i.wallColor),1),n.drawPolygon(o))}},po=(e,t,n)=>{e.lineStyle({width:t.wallThickness,color:PIXI.utils.string2hex(t.wallColor),alpha:1,alignment:.5,cap:"round"}),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3])},_o=(e,t,n,i,r)=>{const o={doorColor:i.invisibleWallColor,doorLineThickness:i.invisibleWallLineThickness,doorFillColor:i.invisibleWallFillColor,doorFillOpacity:i.invisibleWallFillOpacity,doorThickness:i.invisibleWallThickness,wallColor:i.wallColor,wallTexture:i.wallTexture,wallThickness:i.wallThickness};bo(e,t,n,o,r),e.lineStyle({width:i.invisibleWallLineThickness,color:PIXI.utils.string2hex(i.invisibleWallColor),alpha:1,alignment:.5}),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3])},yo=(e,t,n)=>{e.lineStyle({width:t.wallThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round",cap:"round"}),e.moveTo(n[2],n[3]),e.lineTo(n[0],n[1])},bo=(e,t,n,i,r)=>{const o=Lr(r[0],r[1],r[2],r[3]),s=20/o,a=s+(o-40)/o,l=r[2]-r[0],c=r[3]-r[1],h=[r[0]+l*s,r[1]+c*s],u=[r[0]+l*a,r[1]+c*a],d=Br(i.doorThickness,h[0],h[1],u[0],u[1]);i.wallTexture?(n.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),n.moveTo(r[0],r[1]),n.lineTo(h[0],h[1]),n.moveTo(u[0],u[1]),n.lineTo(r[2],r[3])):(t.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(u[0],u[1]),t.lineTo(r[2],r[3])),i.doorFillOpacity&&e.beginFill(PIXI.utils.string2hex(i.doorFillColor),i.doorFillOpacity),e.lineStyle(i.doorLineThickness,PIXI.utils.string2hex(i.doorColor),1,.5),e.drawPolygon(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[0],d[1]),i.doorFillColor&&e.endFill()},Co=(e,t,n,i,r)=>{const o=game.user.isGM;if(o&&"door"===i.secretDoorStyleGM||!o&&"door"===i.secretDoorStylePlayer)return void bo(e,t,n,i,r);const s=Lr(r[0],r[1],r[2],r[3]),a=(s-40)/2/s,l=a+40/s,c=r[2]-r[0],h=r[3]-r[1],u=[r[0]+c*a,r[1]+h*a],d=[r[0]+.5*c,r[1]+.5*h],m=[r[0]+c*l,r[1]+h*l],g=Br(30,u[0],u[1],m[0],m[1]);if(i.wallTexture?(n.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex("#000000"),alpha:1,alignment:.5,cap:"round"}),n.moveTo(r[0],r[1]),n.lineTo(r[2],r[3])):(t.lineStyle({width:i.wallThickness,color:PIXI.utils.string2hex(i.wallColor),alpha:1,alignment:.5,cap:"round"}),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3])),o&&"secret"===i.secretDoorStyleGM||!o&&"secret"===i.secretDoorStylePlayer){const t=Br(50,u[0],u[1],d[0],d[1]),n=Br(50,d[0],d[1],m[0],m[1]);e.lineStyle({width:5,color:PIXI.utils.string2hex(i.secretDoorSColor),alpha:1,alignment:.5,cap:"round"}),e.moveTo(g[6],g[7]),e.bezierCurveTo(t[0],t[1],t[2],t[3],d[0],d[1]),e.bezierCurveTo(n[6],n[7],n[4],n[5],g[2],g[3])}},xo=(e,t,n)=>{const i={doorLineThickness:t.invisibleWallLineThickness,doorThickness:t.invisibleWallThickness,interiorShadowColor:t.interiorShadowColor,interiorShadowThickness:t.interiorShadowThickness,wallThickness:t.wallThickness};vo(e,i,n)},vo=(e,t,n)=>{const i=Lr(n[0],n[1],n[2],n[3]),r=20/i,o=r+(i-40)/i,s=n[2]-n[0],a=n[3]-n[1],l=[n[0]+s*r,n[1]+a*r],c=[n[0]+s*o,n[1]+a*o],h=Br(t.doorThickness,l[0],l[1],c[0],c[1]);e.lineStyle({width:t.wallThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"}),e.moveTo(n[2],n[3]),e.lineTo(c[0],c[1]),e.moveTo(l[0],l[1]),e.lineTo(n[0],n[1]),e.lineStyle({width:t.doorLineThickness+t.interiorShadowThickness,color:PIXI.utils.string2hex(t.interiorShadowColor),alignment:.5,join:"round"}),e.drawPolygon(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[0],h[1])};class So extends PlaceableObject{constructor(e,t){super(t),this.journalEntry=e,this.history=[to.startState()],this.historyIndex=0}static embeddedName="Drawing";state(){return this.history[this.historyIndex]}async deleteAll(){const e=this.state(),t=to.startState();t.config=e.config,this.history=[t],this.historyIndex=0,await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),this.refresh()}async saveToSceneBackground(){const e=new PIXI.Container,t=new PIXI.Graphics,n=Math.ceil(canvas.scene.width*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,i=Math.ceil(canvas.scene.height*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,r=[n,i,n+canvas.scene.width,i,n+canvas.scene.width,i+canvas.scene.height,n,i+canvas.scene.height,n,i];t.beginFill(PIXI.utils.string2hex("#FFFFFF"),1),t.drawPolygon(r),t.endFill(),e.mask=t,this.mask=t;const o=new PIXI.Sprite;o.height=canvas.scene.height,o.width=canvas.scene.width,o.position.x=n,o.position.y=i,e.addChild(o),e.addChild(this);const s=`${canvas.scene.name}-dungeon.png`,a=await canvas.app.renderer.extract.base64(e),l=await fetch(a),c=await l.blob(),h=new File([c],s,{type:"image/png"});await FilePicker.upload("data","",h,{});const u=s;console.log(u),canvas.scene.img===u&&await canvas.scene.update({img:null},{render:!1}),await canvas.scene.update({img:u}),this.mask=null}draw(){return this.refresh(),this}refresh(){(async(e,t)=>{e.clear(),await ro(e,t),await oo(e,t)})(this,this.state())}async maybeRefresh(e){if(e.id===this.journalEntry.id){const e=await to.loadFromJournalEntry(this.journalEntry);await this.pushState(e,!1)}}async loadFromJournalEntry(){const e=await to.loadFromJournalEntry(this.journalEntry);this.history=[e],this.historyIndex=0,this.refresh()}async undo(){this.historyIndex=Math.max(0,this.historyIndex-1),await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),await this.refresh()}async redo(){this.historyIndex=Math.min(this.history.length-1,this.historyIndex+1),await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry),await this.refresh()}async pushState(e,t=!0){for(let e=this.history.length-1;e>this.historyIndex;e--)this.history.pop();this.history.push(e),this.historyIndex++,t&&await e.saveToJournalEntry(this.journalEntry),await this.refresh()}async setConfig(e){const t=this.state().clone();t.config=e,await this.pushState(t)}async addDoor(e,t,n,i){await this._addDoor(e,t,n,i,"doors")}async addSecretDoor(e,t,n,i){await this._addDoor(e,t,n,i,"secretDoors")}async addInvisibleWall(e,t,n,i){await this._addDoor(e,t,n,i,"invisibleWalls")}async _addDoor(e,t,n,i,r){const o=this.history[this.historyIndex].clone(),s=Dr(e,t,n,i),a=[],l=[];for(const r of o.interiorWalls){const o=Dr(r[0],r[1],r[2],r[3]);if(wr(o,s)){a.push(r);const o=Fr(r[0],r[1],r[2],r[3]),s=kr(r[0],r[1],r[2],r[3]),c=Fr(e,t,n,i),h=kr(e,t,n,i);l.push([o[0],o[1],c[0],c[1]]),l.push([h[0],h[1],s[0],s[1]])}}o.interiorWalls=o.interiorWalls.filter((e=>-1===a.indexOf(e))),o.interiorWalls=o.interiorWalls.concat(l),o[r].push([e,t,n,i]),await this.pushState(o)}async addInteriorWall(e,t,n,i){const r=this.history[this.historyIndex].clone(),o=Hr(e,t,n,i,r.doors);r.interiorWalls=r.interiorWalls.concat(o),await this.pushState(r)}async removeInteriorWalls(e){const t=Mr(e),n=this.history[this.historyIndex].interiorWalls.filter((e=>{const n=Dr(e[0],e[1],e[2],e[3]);return!Tr(t,n)}));if(n.length!=this.history[this.historyIndex].interiorWalls.length){const e=this.history[this.historyIndex].clone();e.interiorWalls=n,await this.pushState(e)}}async removeInvisibleWalls(e){const t=Mr(e),n=this.history[this.historyIndex].invisibleWalls.filter((e=>{const n=Dr(e[0],e[1],e[2],e[3]);return!Tr(t,n)}));if(n.length!=this.history[this.historyIndex].invisibleWalls.length){const e=this.history[this.historyIndex].clone();e.invisibleWalls=n,await this.pushState(e)}}async removeDoors(e){const t=Mr(e),n=this.history[this.historyIndex],i=n.doors.filter((e=>{const n=Dr(e[0],e[1],e[2],e[3]);return!Tr(t,n)}));if(i.length!=n.doors.length){const e=n.clone();e.doors=i,await this.pushState(e)}}async removeSecretDoors(e){const t=Mr(e),n=this.history[this.historyIndex],i=n.secretDoors.filter((e=>{const n=Dr(e[0],e[1],e[2],e[3]);return!Tr(t,n)}));if(i.length!=n.secretDoors.length){const e=n.clone();e.secretDoors=i,await this.pushState(e)}}async _addPoly(e){const t=this.history[this.historyIndex],n=t.clone();if(n.geometry){n.geometry=Ir(n.geometry,e);if(i=t.geometry,r=e,Xi.touches(i,r)){const i=((e,t)=>Oi.intersection(e,t))(t.geometry,e),r=i.getCoordinates();if(r.length>1&&r.length%2==0)for(let e=0;e{const n=Dr(t[0],t[1],t[2],t[3]);return!Tr(e,n)}));t.length!=n.interiorWalls.length&&(n.interiorWalls=t)}}else n.geometry=e;var i,r;await this.pushState(n)}async addRectangle(e){const t=Mr(e);this._addPoly(t)}async removeRectangle(e){const t=Mr(e);await this._removePoly(t)}async _removePoly(e){if(!this.history[this.historyIndex].geometry)return;if(!Tr(this.history[this.historyIndex].geometry,e))return;const t=this.history[this.historyIndex].clone();var n,i;t.geometry=(n=t.geometry,i=e,Oi.difference(n,i)),await this.pushState(t)}async addPolygon(e){console.log(e);const t=Rr(e);if(Sr(t))try{await this._addPoly(t)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorAddingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async removePolygon(e){const t=Rr(e);if(Sr(t))try{await this._removePoly(t)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorRemovingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async addEllipse(e,t,n,i){const r=Pr(e,t,n,i);if(Sr(r))try{await this._addPoly(r)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorAddingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async removeEllipse(e,t,n,i){const r=Pr(e,t,n,i);if(Sr(r))try{await this._removePoly(r)}catch(e){console.log(e),ui.notifications.error(game.i18n.localize("DD.ErrorRemovingPolygon"))}else ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"))}async addThemeArea(e){const t=Rr(e);if(!Sr(t))return void ui.notifications.error(game.i18n.localize("DD.ErrorInvalidShape"));const i=(e=>{const t=e.split("."),i=t[0],r=t[1];if("custom"===i)return n()[r];return s[r]})(r()),o={points:e,config:i.config},a=this.history[this.historyIndex].clone();a.themeAreas.push(o),await this.pushState(a)}async removeThemeAreas(e){const t=Mr(e),n=this.history[this.historyIndex].themeAreas.filter((e=>{try{const n=Rr(e.points);return!Tr(t,n)}catch(e){return console.log(e),!1}}));if(n.length!=this.history[this.historyIndex].themeAreas.length){const e=this.history[this.historyIndex].clone();e.themeAreas=n,await this.pushState(e)}}}function To(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Io(e,t){return e(t={exports:{}},t.exports),t.exports}var wo=Io((function(e,t){function n(e,t){var n=[],i=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]"}),function(r,o){if(n.length>0){var s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,r):i.push(r),~n.indexOf(o)&&(o=t.call(this,r,o))}else n.push(o);return null==e?o:e.call(this,r,o)}}(e.exports=function(e,t,i,r){return JSON.stringify(e,n(t,r),i)}).getSerialize=n}));wo.getSerialize;var Eo=function(){var e=4022871197;return function(t){if(t){t=t.toString();for(var n=0;n>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 2.3283064365386963e-10*(e>>>0)}e=4022871197}},Ao=function(e){return function(){var t,n,i=48,r=1,o=i,s=new Array(i),a=0,l=new Eo;for(t=0;t=i&&(o=0);var e=1768863*s[o]+2.3283064365386963e-10*r;return s[o]=e-(r=0|e)},h=function(e){return Math.floor(e*(c()+11102230246251565e-32*(2097152*c()|0)))};h.string=function(e){var t,n="";for(t=0;t0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.rng.floatBetween(e,t)}},{key:"vec",value:function(e,t){return[this.int(e[0],t[0]),this.int(e[1],t[1])]}},{key:"choose",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.rng.intBetween(0,e.length-1);return t?e.splice(n,1)[0]:e[n]}},{key:"maybe",value:function(e){return this.float()<=e}}]),e}();t.default=o}));To(No);var Do=Io((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[0,0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r(this,e),this.rows=[],this.size=[];for(var i=0;i3&&void 0!==arguments[3]&&arguments[3];if(h)for(var u=0;uthis.x+this.width&&(this.width=e+n-this.x),t+i>this.y+this.height&&(this.height=t+i-this.y),e=this.x&&e+n<=this.x+this.width&&t>=this.y&&t+i<=this.y+this.height},r.union=function(e){return this.clone().extend(e.x,e.y,e.width,e.height)},r.intersection=function(e){var t=e.x,n=e.y,r=t+e.width,o=n+e.height;return this.x>t&&(t=this.x),this.y>n&&(n=this.y),this.x+this.widthe[0]+t[0]||n[0]+i[0]e[1]+t[1]||n[1]+i[1]1&&void 0!==arguments[1]?arguments[1]:null;(0,Lo.array_test)(this.children,(function(t){return t.id===e.id}))||(e.parent=this,t&&(e.position=t),this.children.push(e),this.paste_in(e))}},{key:"paste_in",value:function(e){var t=this;(0,Lo.iter_2d)(e.size,(function(n){e.walls.get(n)||t.walls.set(e.parent_pos(n),!1)}))}},{key:"add_exit",value:function(e,t){this.walls.set(e[0],!1),this.parent&&this.parent.paste_in(this),this.exits.push([e[0],e[1],t])}},{key:"print",value:function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,i=void 0,r=void 0;if(n)r=n,n=null;else{if(!(i=this.get_open_pieces(this.children))||!i.length)return console.log("ran out of choices connecting"),!1;r=this.random.choose(i)}if(t){if(this.join(r,t,e))return!0}else for(var o=e.perimeter.slice();o.length;)if(this.join(r,this.random.choose(o,!0),e))return!0;return!1}},{key:"new_corridor",value:function(){return new r.default({length:this.random.int(this.min_corridor_length,this.max_corridor_length),facing:this.random.choose(Po.FACING)})}},{key:"add_interconnect",value:function(){var e={},t=void 0,n=void 0,i=void 0;this.children.forEach((function(n){n.exits.length=0)if((o=this.children[c]).exits.length-1?(a=new r.default({length:s,facing:n[1]}),!!this.join(o,a.perimeter[0],a,n)&&(this.join_exits(l,e[t][0],a,a.perimeter[a.perimeter.length-1]),!0)):(this.join_exits(l,e[t][0],o,n),!0);i=(0,Lo.shift)(i,n[1]),s++}}},{key:"new_room",value:function(e){e=e||this.random.choose(this.room_tags,!1);var t=this.options.rooms[e],n=new o.default({size:this.random.vec(t.min_size,t.max_size),max_exits:t.max_exits,symmetric:this.symmetric_rooms,tag:e});return this.room_tags.splice(this.room_tags.indexOf(e),1),"initial"===e&&(this.initial_room=n),n}},{key:"generate",value:function(){var e=this.options.room_count-1,t=this.new_room(this.options.rooms.initial?"initial":void 0),n=Math.round(this.corridor_density*e);this.add_piece(t,this.options.rooms.initial&&this.options.rooms.initial.position?this.options.rooms.initial.position:this.get_center_pos());for(var i=void 0,r=this.max_iterations;(n||e)&&--r;)if((i=this.random.int(1,e+n))<=n){var o=this.new_corridor(),s=this.add_room(o,o.perimeter[0]);n--,e>0&&s&&(this.add_room(this.new_room(),null,o),e--)}else this.add_room(this.new_room()),e--;for(i=0;i0}}]),t}(i.default);t.default=a}));To(Go);var zo=Go.default,Wo=Io((function(e,t){!function(){var n=9007199254740992,i="0123456789",r="abcdefghijklmnopqrstuvwxyz",o=r.toUpperCase(),s=i+"abcdef";function a(e){this.name="UnsupportedError",this.message=e||"This feature is not supported on this platform"}a.prototype=new Error,a.prototype.constructor=a;var l=Array.prototype.slice;function c(e){if(!(this instanceof c))return e||(e=null),null===e?new c:new c(e);if("function"==typeof e)return this.random=e,this;arguments.length&&(this.seed=0);for(var t=0;t100,"Chance: Likelihood accepts values from 0 to 100."),100*this.random()i,"Chance: Max specified is out of range with fixed. Max should be, at most, "+i),e=h(e,{min:r,max:i});var o=(this.integer({min:e.min*t,max:e.max*t})/t).toFixed(e.fixed);return parseFloat(o)},c.prototype.integer=function(e){return u((e=h(e,{min:-9007199254740992,max:n})).min>e.max,"Chance: Min cannot be greater than Max."),Math.floor(this.random()*(e.max-e.min+1)+e.min)},c.prototype.natural=function(e){if("number"==typeof(e=h(e,{min:0,max:n})).numerals&&(u(e.numerals<1,"Chance: Numerals cannot be less than one."),e.min=Math.pow(10,e.numerals-1),e.max=Math.pow(10,e.numerals)-1),u(e.min<0,"Chance: Min cannot be less than zero."),e.exclude){for(var t in u(!Array.isArray(e.exclude),"Chance: exclude must be an array."),e.exclude)u(!Number.isInteger(e.exclude[t]),"Chance: exclude must be numbers.");var i=e.min+this.natural({max:e.max-e.min-e.exclude.length}),r=e.exclude.sort();for(var o in r){if(ie.max,"Chance: Min cannot be greater than Max.");var t=_.primes[_.primes.length-1];if(e.max>t)for(var n=t+2;n<=e.max;++n)this.is_prime(n)&&_.primes.push(n);var i=_.primes.filter((function(t){return t>=e.min&&t<=e.max}));return this.pick(i)},c.prototype.is_prime=function(e){if(e%1||e<2)return!1;if(e%2==0)return 2===e;if(e%3==0)return 3===e;for(var t=Math.sqrt(e),n=5;n<=t;n+=6)if(e%n==0||e%(n+2)==0)return!1;return!0},c.prototype.hex=function(e){u((e=h(e,{min:0,max:n,casing:"lower"})).min<0,"Chance: Min cannot be less than zero.");var t=this.natural({min:e.min,max:e.max});return"upper"===e.casing?t.toString(16).toUpperCase():t.toString(16)},c.prototype.letter=function(e){e=h(e,{casing:"lower"});var t=this.character({pool:"abcdefghijklmnopqrstuvwxyz"});return"upper"===e.casing&&(t=t.toUpperCase()),t},c.prototype.string=function(e){(e=h(e,{min:5,max:20})).length||(e.length=this.natural({min:e.min,max:e.max})),u(e.length<0,"Chance: Length cannot be less than zero.");var t=e.length;return this.n(this.character,t,e).join("")},m.prototype={substitute:function(){return this.c}},g.prototype={substitute:function(){if(!/[{}\\]/.test(this.c))throw new Error('Invalid escape sequence: "\\'+this.c+'".');return this.c}},f.prototype={replacers:{"#":function(e){return e.character({pool:i})},A:function(e){return e.character({pool:o})},a:function(e){return e.character({pool:r})}},substitute:function(e){var t=this.replacers[this.c];if(!t)throw new Error('Invalid replacement character: "'+this.c+'".');return t(e)}},c.prototype.template=function(e){if(!e)throw new Error("Template string is required");var t=this;return function(e){for(var t=[],n="identity",i=0;ia)throw new RangeError("Chance: num is likely too large for sample set")}return o},c.prototype.n=function(e,t){u("function"!=typeof e,"Chance: The first argument must be a function."),void 0===t&&(t=1);var n=t,i=[],r=l.call(arguments,2);for(n=Math.max(0,n);n--;null)i.push(e.apply(this,r));return i},c.prototype.pad=function(e,t,n){return n=n||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(n)+e},c.prototype.pick=function(e,t){if(0===e.length)throw new RangeError("Chance: Cannot pick() from an empty array");return t&&1!==t?this.shuffle(e).slice(0,t):e[this.natural({max:e.length-1})]},c.prototype.pickone=function(e){if(0===e.length)throw new RangeError("Chance: Cannot pickone() from an empty array");return e[this.natural({max:e.length-1})]},c.prototype.pickset=function(e,t){if(0===t)return[];if(0===e.length)throw new RangeError("Chance: Cannot pickset() from an empty array");if(t<0)throw new RangeError("Chance: Count must be a positive number");if(t&&1!==t){var n=e.slice(0),i=n.length;return this.n((function(){var e=this.natural({max:--i}),t=n[e];return n[e]=n[i],t}),Math.min(i,t))}return[this.pickone(e)]},c.prototype.shuffle=function(e){for(var t,n=[],i=0,r=Number(e.length),o=function(e){return Array.apply(null,Array(e)).map((function(e,t){return t}))}(r),s=r-1,a=0;a0&&(r+=i)}if(0===r)throw new RangeError("Chance: No valid entries in array weights");var s,a=this.random()*r,l=0,c=-1;for(o=0;o0){if(a<=l){s=o;break}c=o}o===t.length-1&&(s=c)}var h=e[s];return(n=void 0!==n&&n)&&(e.splice(s,1),t.splice(s,1)),h},c.prototype.paragraph=function(e){var t=(e=h(e)).sentences||this.natural({min:3,max:7}),n=this.n(this.sentence,t),i=!0===e.linebreak?"\n":" ";return n.join(i)},c.prototype.sentence=function(e){var t,n=(e=h(e)).words||this.natural({min:12,max:18}),i=e.punctuation;return t=this.n(this.word,n).join(" "),t=this.capitalize(t),!1===i||/^[.?;!:]$/.test(i)||(i="."),i&&(t+=i),t},c.prototype.syllable=function(e){for(var t,n=(e=h(e)).length||this.natural({min:2,max:3}),i="bcdfghjklmnprstvwz",r="aeiou",o="",s=0;s=10&&(n=0);var i=2*n+3*t[8]+4*t[7]+5*t[6]+6*t[5]+7*t[4]+8*t[3]+9*t[2]+10*t[1]+11*t[0];(i=11-i%11)>=10&&(i=0);var r=""+t[0]+t[1]+t[2]+"."+t[3]+t[4]+t[5]+"."+t[6]+t[7]+t[8]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},c.prototype.cnpj=function(e){e=h(e,{formatted:!0});var t=this.n(this.natural,12,{max:12}),n=2*t[11]+3*t[10]+4*t[9]+5*t[8]+6*t[7]+7*t[6]+8*t[5]+9*t[4]+2*t[3]+3*t[2]+4*t[1]+5*t[0];(n=11-n%11)<2&&(n=0);var i=2*n+3*t[11]+4*t[10]+5*t[9]+6*t[8]+7*t[7]+8*t[6]+9*t[5]+2*t[4]+3*t[3]+4*t[2]+5*t[1]+6*t[0];(i=11-i%11)<2&&(i=0);var r=""+t[0]+t[1]+"."+t[2]+t[3]+t[4]+"."+t[5]+t[6]+t[7]+"/"+t[8]+t[9]+t[10]+t[11]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},c.prototype.first=function(e){return e=h(e,{gender:this.gender(),nationality:"en"}),this.pick(this.get("firstNames")[e.gender.toLowerCase()][e.nationality.toLowerCase()])},c.prototype.profession=function(e){return(e=h(e)).rank?this.pick(["Apprentice ","Junior ","Senior ","Lead "])+this.pick(this.get("profession")):this.pick(this.get("profession"))},c.prototype.company=function(){return this.pick(this.get("company"))},c.prototype.gender=function(e){return e=h(e,{extraGenders:[]}),this.pick(["Male","Female"].concat(e.extraGenders))},c.prototype.last=function(e){if("*"===(e=h(e,{nationality:"*"})).nationality){var t=[],n=this.get("lastNames");return Object.keys(n).forEach((function(e){t=t.concat(n[e])})),this.pick(t)}return this.pick(this.get("lastNames")[e.nationality.toLowerCase()])},c.prototype.israelId=function(){for(var e=this.string({pool:"0123456789",length:8}),t=0,n=0;n","<=",">=","="]);e.range&&(t=e.range);var n="";return e.include_prerelease&&(n=this.weighted(["","-dev","-beta","-alpha"],[50,10,5,1])),t+this.rpg("3d10").join(".")+n},c.prototype.tlds=function(){return["com","org","edu","gov","co.uk","net","io","ac","ad","ae","af","ag","ai","al","am","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bm","bn","bo","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","eu","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","ss","st","su","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tp","tr","tt","tv","tw","tz","ua","ug","uk","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","za","zm","zw"]},c.prototype.tld=function(){return this.pick(this.tlds())},c.prototype.twitter=function(){return"@"+this.word()},c.prototype.url=function(e){var t=(e=h(e,{protocol:"http",domain:this.domain(e),domain_prefix:"",path:this.word(),extensions:[]})).extensions.length>0?"."+this.pick(e.extensions):"",n=e.domain_prefix?e.domain_prefix+"."+e.domain:e.domain;return e.protocol+"://"+n+"/"+e.path+t},c.prototype.port=function(){return this.integer({min:0,max:65535})},c.prototype.locale=function(e){return(e=h(e)).region?this.pick(this.get("locale_regions")):this.pick(this.get("locale_languages"))},c.prototype.locales=function(e){return(e=h(e)).region?this.get("locale_regions"):this.get("locale_languages")},c.prototype.loremPicsum=function(e){var t=(e=h(e,{width:500,height:500,greyscale:!1,blurred:!1})).greyscale?"g/":"",n=e.blurred?"/?blur":"/?random";return"https://picsum.photos/"+t+e.width+"/"+e.height+n},c.prototype.address=function(e){return e=h(e),this.natural({min:5,max:2e3})+" "+this.street(e)},c.prototype.altitude=function(e){return e=h(e,{fixed:5,min:0,max:8848}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},c.prototype.areacode=function(e){var t=(e=h(e,{parens:!0})).exampleNumber?"555":this.natural({min:2,max:9}).toString()+this.natural({min:0,max:8}).toString()+this.natural({min:0,max:9}).toString();return e.parens?"("+t+")":t},c.prototype.city=function(){return this.capitalize(this.word({syllables:3}))},c.prototype.coordinates=function(e){return this.latitude(e)+", "+this.longitude(e)},c.prototype.countries=function(){return this.get("countries")},c.prototype.country=function(e){e=h(e);var t=this.pick(this.countries());return e.raw?t:e.full?t.name:t.abbreviation},c.prototype.depth=function(e){return e=h(e,{fixed:5,min:-10994,max:0}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},c.prototype.geohash=function(e){return e=h(e,{length:7}),this.string({length:e.length,pool:"0123456789bcdefghjkmnpqrstuvwxyz"})},c.prototype.geojson=function(e){return this.latitude(e)+", "+this.longitude(e)+", "+this.altitude(e)},c.prototype.latitude=function(e){var[t,n,i]=["ddm","dms","dd"],r=(e=h(e,e&&e.format&&[t,n].includes(e.format.toLowerCase())?{min:0,max:89,fixed:4}:{fixed:5,min:-90,max:90,format:i})).format.toLowerCase();switch(r!==t&&r!==n||(u(e.min<0||e.min>89,"Chance: Min specified is out of range. Should be between 0 - 89"),u(e.max<0||e.max>89,"Chance: Max specified is out of range. Should be between 0 - 89"),u(e.fixed>4,"Chance: Fixed specified should be below or equal to 4")),r){case t:return this.integer({min:e.min,max:e.max})+"°"+this.floating({min:0,max:59,fixed:e.fixed});case n:return this.integer({min:e.min,max:e.max})+"°"+this.integer({min:0,max:59})+"’"+this.floating({min:0,max:59,fixed:e.fixed})+"”";default:return this.floating({min:e.min,max:e.max,fixed:e.fixed})}},c.prototype.longitude=function(e){var[t,n,i]=["ddm","dms","dd"],r=(e=h(e,e&&e.format&&[t,n].includes(e.format.toLowerCase())?{min:0,max:179,fixed:4}:{fixed:5,min:-180,max:180,format:i})).format.toLowerCase();switch(r!==t&&r!==n||(u(e.min<0||e.min>179,"Chance: Min specified is out of range. Should be between 0 - 179"),u(e.max<0||e.max>179,"Chance: Max specified is out of range. Should be between 0 - 179"),u(e.fixed>4,"Chance: Fixed specified should be below or equal to 4")),r){case t:return this.integer({min:e.min,max:e.max})+"°"+this.floating({min:0,max:59.9999,fixed:e.fixed});case n:return this.integer({min:e.min,max:e.max})+"°"+this.integer({min:0,max:59})+"’"+this.floating({min:0,max:59.9999,fixed:e.fixed})+"”";default:return this.floating({min:e.min,max:e.max,fixed:e.fixed})}},c.prototype.phone=function(e){var t,n,i=this,r=function(e){var t=[];return e.sections.forEach((function(e){t.push(i.string({pool:"0123456789",length:e}))})),e.area+t.join(" ")};switch((e=h(e,{formatted:!0,country:"us",mobile:!1,exampleNumber:!1})).formatted||(e.parens=!1),e.country){case"fr":e.mobile?(t=this.pick(["06","07"])+i.string({pool:"0123456789",length:8}),n=e.formatted?t.match(/../g).join(" "):t):(t=this.pick(["01"+this.pick(["30","34","39","40","41","42","43","44","45","46","47","48","49","53","55","56","58","60","64","69","70","72","73","74","75","76","77","78","79","80","81","82","83"])+i.string({pool:"0123456789",length:6}),"02"+this.pick(["14","18","22","23","28","29","30","31","32","33","34","35","36","37","38","40","41","43","44","45","46","47","48","49","50","51","52","53","54","56","57","61","62","69","72","76","77","78","85","90","96","97","98","99"])+i.string({pool:"0123456789",length:6}),"03"+this.pick(["10","20","21","22","23","24","25","26","27","28","29","39","44","45","51","52","54","55","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","80","81","82","83","84","85","86","87","88","89","90"])+i.string({pool:"0123456789",length:6}),"04"+this.pick(["11","13","15","20","22","26","27","30","32","34","37","42","43","44","50","56","57","63","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","88","89","90","91","92","93","94","95","97","98"])+i.string({pool:"0123456789",length:6}),"05"+this.pick(["08","16","17","19","24","31","32","33","34","35","40","45","46","47","49","53","55","56","57","58","59","61","62","63","64","65","67","79","81","82","86","87","90","94"])+i.string({pool:"0123456789",length:6}),"09"+i.string({pool:"0123456789",length:8})]),n=e.formatted?t.match(/../g).join(" "):t);break;case"uk":e.mobile?(t=this.pick([{area:"07"+this.pick(["4","5","7","8","9"]),sections:[2,6]},{area:"07624 ",sections:[6]}]),n=e.formatted?r(t):r(t).replace(" ","")):(t=this.pick([{area:"01"+this.character({pool:"234569"})+"1 ",sections:[3,4]},{area:"020 "+this.character({pool:"378"}),sections:[3,4]},{area:"023 "+this.character({pool:"89"}),sections:[3,4]},{area:"024 7",sections:[3,4]},{area:"028 "+this.pick(["25","28","37","71","82","90","92","95"]),sections:[2,4]},{area:"012"+this.pick(["04","08","54","76","97","98"])+" ",sections:[6]},{area:"013"+this.pick(["63","64","84","86"])+" ",sections:[6]},{area:"014"+this.pick(["04","20","60","61","80","88"])+" ",sections:[6]},{area:"015"+this.pick(["24","27","62","66"])+" ",sections:[6]},{area:"016"+this.pick(["06","29","35","47","59","95"])+" ",sections:[6]},{area:"017"+this.pick(["26","44","50","68"])+" ",sections:[6]},{area:"018"+this.pick(["27","37","84","97"])+" ",sections:[6]},{area:"019"+this.pick(["00","05","35","46","49","63","95"])+" ",sections:[6]}]),n=e.formatted?r(t):r(t).replace(" ","","g"));break;case"za":e.mobile?(t=this.pick(["060"+this.pick(["3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"061"+this.pick(["0","1","2","3","4","5","8"])+i.string({pool:"0123456789",length:6}),"06"+i.string({pool:"0123456789",length:7}),"071"+this.pick(["0","1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"07"+this.pick(["2","3","4","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"08"+this.pick(["0","1","2","3","4","5"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||t):(t=this.pick(["01"+this.pick(["0","1","2","3","4","5","6","7","8"])+i.string({pool:"0123456789",length:7}),"02"+this.pick(["1","2","3","4","7","8"])+i.string({pool:"0123456789",length:7}),"03"+this.pick(["1","2","3","5","6","9"])+i.string({pool:"0123456789",length:7}),"04"+this.pick(["1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"05"+this.pick(["1","3","4","6","7","8"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||t);break;case"us":var o=this.areacode(e).toString(),s=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:9}).toString()+this.natural({min:0,max:9}).toString(),a=this.natural({min:1e3,max:9999}).toString();n=e.formatted?o+" "+s+"-"+a:o+s+a;break;case"br":var l,c=this.pick(["11","12","13","14","15","16","17","18","19","21","22","24","27","28","31","32","33","34","35","37","38","41","42","43","44","45","46","47","48","49","51","53","54","55","61","62","63","64","65","66","67","68","69","71","73","74","75","77","79","81","82","83","84","85","86","87","88","89","91","92","93","94","95","96","97","98","99"]);l=e.mobile?"9"+i.string({pool:"0123456789",length:4}):this.natural({min:2e3,max:5999}).toString();var u=i.string({pool:"0123456789",length:4});n=e.formatted?"("+c+") "+l+"-"+u:c+l+u}return n},c.prototype.postal=function(){return this.character({pool:"XVTSRPNKLMHJGECBA"})+this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+" "+(this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+this.natural({max:9}))},c.prototype.postcode=function(){return this.pick(this.get("postcodeAreas")).code+this.natural({max:9})+(this.bool()?this.character({alpha:!0,casing:"upper"}):"")+" "+(this.natural({max:9})+(this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})))},c.prototype.counties=function(e){return e=h(e,{country:"uk"}),this.get("counties")[e.country.toLowerCase()]},c.prototype.county=function(e){return this.pick(this.counties(e)).name},c.prototype.provinces=function(e){return e=h(e,{country:"ca"}),this.get("provinces")[e.country.toLowerCase()]},c.prototype.province=function(e){return e&&e.full?this.pick(this.provinces(e)).name:this.pick(this.provinces(e)).abbreviation},c.prototype.state=function(e){return e&&e.full?this.pick(this.states(e)).name:this.pick(this.states(e)).abbreviation},c.prototype.states=function(e){var t;switch((e=h(e,{country:"us",us_states_and_dc:!0})).country.toLowerCase()){case"us":var n=this.get("us_states_and_dc"),i=this.get("territories"),r=this.get("armed_forces");t=[],e.us_states_and_dc&&(t=t.concat(n)),e.territories&&(t=t.concat(i)),e.armed_forces&&(t=t.concat(r));break;case"it":case"mx":t=this.get("country_regions")[e.country.toLowerCase()];break;case"uk":t=this.get("counties")[e.country.toLowerCase()]}return t},c.prototype.street=function(e){var t;switch((e=h(e,{country:"us",syllables:2})).country.toLowerCase()){case"us":t=this.word({syllables:e.syllables}),t=this.capitalize(t),t+=" ",t+=e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name;break;case"it":t=this.word({syllables:e.syllables}),t=this.capitalize(t),t=(e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name)+" "+t}return t},c.prototype.street_suffix=function(e){return e=h(e,{country:"us"}),this.pick(this.street_suffixes(e))},c.prototype.street_suffixes=function(e){return e=h(e,{country:"us"}),this.get("street_suffixes")[e.country.toLowerCase()]},c.prototype.zip=function(e){var t=this.n(this.natural,5,{max:9});return e&&!0===e.plusfour&&(t.push("-"),t=t.concat(this.n(this.natural,4,{max:9}))),t.join("")},c.prototype.ampm=function(){return this.bool()?"am":"pm"},c.prototype.date=function(e){var t,n;if(e&&(e.min||e.max)){var i=void 0!==(e=h(e,{american:!0,string:!1})).min?e.min.getTime():1,r=void 0!==e.max?e.max.getTime():864e13;n=new Date(this.integer({min:i,max:r}))}else{var o=this.month({raw:!0}),s=o.days;e&&e.month&&(s=this.get("months")[(e.month%12+12)%12].days),e=h(e,{year:parseInt(this.year(),10),month:o.numeric-1,day:this.natural({min:1,max:s}),hour:this.hour({twentyfour:!0}),minute:this.minute(),second:this.second(),millisecond:this.millisecond(),american:!0,string:!1}),n=new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}return t=e.american?n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear():n.getDate()+"/"+(n.getMonth()+1)+"/"+n.getFullYear(),e.string?t:n},c.prototype.hammertime=function(e){return this.date(e).getTime()},c.prototype.hour=function(e){return u((e=h(e,{min:e&&e.twentyfour?0:1,max:e&&e.twentyfour?23:12})).min<0,"Chance: Min cannot be less than 0."),u(e.twentyfour&&e.max>23,"Chance: Max cannot be greater than 23 for twentyfour option."),u(!e.twentyfour&&e.max>12,"Chance: Max cannot be greater than 12."),u(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},c.prototype.millisecond=function(){return this.natural({max:999})},c.prototype.minute=c.prototype.second=function(e){return u((e=h(e,{min:0,max:59})).min<0,"Chance: Min cannot be less than 0."),u(e.max>59,"Chance: Max cannot be greater than 59."),u(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},c.prototype.month=function(e){u((e=h(e,{min:1,max:12})).min<1,"Chance: Min cannot be less than 1."),u(e.max>12,"Chance: Max cannot be greater than 12."),u(e.min>e.max,"Chance: Min cannot be greater than Max.");var t=this.pick(this.months().slice(e.min-1,e.max));return e.raw?t:t.name},c.prototype.months=function(){return this.get("months")},c.prototype.second=function(){return this.natural({max:59})},c.prototype.timestamp=function(){return this.natural({min:1,max:parseInt((new Date).getTime()/1e3,10)})},c.prototype.weekday=function(e){var t=["Monday","Tuesday","Wednesday","Thursday","Friday"];return(e=h(e,{weekday_only:!1})).weekday_only||(t.push("Saturday"),t.push("Sunday")),this.pickone(t)},c.prototype.year=function(e){return(e=h(e,{min:(new Date).getFullYear()})).max=void 0!==e.max?e.max:e.min+100,this.natural(e).toString()},c.prototype.cc=function(e){var t,n,i;return n=(t=(e=h(e)).type?this.cc_type({name:e.type,raw:!0}):this.cc_type({raw:!0})).prefix.split(""),i=t.length-t.prefix.length-1,(n=n.concat(this.n(this.integer,i,{min:0,max:9}))).push(this.luhn_calculate(n.join(""))),n.join("")},c.prototype.cc_types=function(){return this.get("cc_types")},c.prototype.cc_type=function(e){e=h(e);var t=this.cc_types(),n=null;if(e.name){for(var i=0;i3&&(n=t?n.substr(0,3):n[0]+n.substr(2,2)),n.length<3&&(i=n,n=e.toUpperCase().split("").map((function(e){return-1!=="AEIOU".indexOf(e)?e:void 0})).join("").substr(0,3-i.length)),i+=n),i};return s=s.concat(a(i,!0),a(n),function(e,t,n){return e.getFullYear().toString().substr(2)+["A","B","C","D","E","H","L","M","P","R","S","T"][e.getMonth()]+n.pad(e.getDate()+("female"===t.toLowerCase()?40:0),2)}(r,t,this),o.toUpperCase().split("")).join(""),(s+=function(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n="ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ",i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0,o=0;o<15;o++)r+=o%2!=0?i.indexOf(n[t.indexOf(e[o])]):"BAKPLCQDREVOSFTGUHMINJWZYX".indexOf(n[t.indexOf(e[o])]);return i[r%26]}(s.toUpperCase())).toUpperCase()},c.prototype.pl_pesel=function(){for(var e=this.natural({min:1,max:9999999999}),t=this.pad(e,10).split(""),n=0;n0;r--)i[r-1]=this.natural({min:1,max:n[1]});return void 0!==t.sum&&t.sum?i.reduce((function(e,t){return e+t})):i}throw new RangeError("Chance: A type of die roll must be included")},c.prototype.guid=function(e){e=h(e,{version:5});var t="abcdef1234567890";return this.string({pool:t,length:8})+"-"+this.string({pool:t,length:4})+"-"+e.version+this.string({pool:t,length:3})+"-"+this.string({pool:"ab89",length:1})+this.string({pool:t,length:3})+"-"+this.string({pool:t,length:12})},c.prototype.hash=function(e){var t="upper"===(e=h(e,{length:40,casing:"lower"})).casing?s.toUpperCase():s;return this.string({pool:t,length:e.length})},c.prototype.luhn_check=function(e){var t=e.toString();return+t.substring(t.length-1)===this.luhn_calculate(+t.substring(0,t.length-1))},c.prototype.luhn_calculate=function(e){for(var t,n=e.toString().split("").reverse(),i=0,r=0,o=n.length;o>r;++r)t=+n[r],r%2==0&&(t*=2)>9&&(t-=9),i+=t;return 9*i%10},c.prototype.md5=function(e){var t={str:"",key:null,raw:!1};if(e)if("string"==typeof e)t.str=e,e={};else{if("object"!=typeof e)return null;if("Array"===e.constructor)return null}else t.str=this.string(),e={};if(!(t=h(e,t)).str)throw new Error("A parameter is required to return an md5 hash.");return this.bimd5.md5(t.str,t.key,t.raw)},c.prototype.file=function(e){var t,n=e||{},i="fileExtension",r=Object.keys(this.get("fileExtension"));if(t=this.word({length:n.length}),n.extension)return t+"."+n.extension;if(n.extensions){if(Array.isArray(n.extensions))return t+"."+this.pickone(n.extensions);if(n.extensions.constructor===Object){var o=n.extensions,s=Object.keys(o);return t+"."+this.pickone(o[this.pickone(s)])}throw new Error("Chance: Extensions must be an Array or Object")}if(n.fileType){var a=n.fileType;if(-1!==r.indexOf(a))return t+"."+this.pickone(this.get(i)[a]);throw new RangeError("Chance: Expect file type value to be 'raster', 'vector', '3d' or 'document'")}return t+"."+this.pickone(this.get(i)[this.pickone(r)])};var _={firstNames:{male:{en:["James","John","Robert","Michael","William","David","Richard","Joseph","Charles","Thomas","Christopher","Daniel","Matthew","George","Donald","Anthony","Paul","Mark","Edward","Steven","Kenneth","Andrew","Brian","Joshua","Kevin","Ronald","Timothy","Jason","Jeffrey","Frank","Gary","Ryan","Nicholas","Eric","Stephen","Jacob","Larry","Jonathan","Scott","Raymond","Justin","Brandon","Gregory","Samuel","Benjamin","Patrick","Jack","Henry","Walter","Dennis","Jerry","Alexander","Peter","Tyler","Douglas","Harold","Aaron","Jose","Adam","Arthur","Zachary","Carl","Nathan","Albert","Kyle","Lawrence","Joe","Willie","Gerald","Roger","Keith","Jeremy","Terry","Harry","Ralph","Sean","Jesse","Roy","Louis","Billy","Austin","Bruce","Eugene","Christian","Bryan","Wayne","Russell","Howard","Fred","Ethan","Jordan","Philip","Alan","Juan","Randy","Vincent","Bobby","Dylan","Johnny","Phillip","Victor","Clarence","Ernest","Martin","Craig","Stanley","Shawn","Travis","Bradley","Leonard","Earl","Gabriel","Jimmy","Francis","Todd","Noah","Danny","Dale","Cody","Carlos","Allen","Frederick","Logan","Curtis","Alex","Joel","Luis","Norman","Marvin","Glenn","Tony","Nathaniel","Rodney","Melvin","Alfred","Steve","Cameron","Chad","Edwin","Caleb","Evan","Antonio","Lee","Herbert","Jeffery","Isaac","Derek","Ricky","Marcus","Theodore","Elijah","Luke","Jesus","Eddie","Troy","Mike","Dustin","Ray","Adrian","Bernard","Leroy","Angel","Randall","Wesley","Ian","Jared","Mason","Hunter","Calvin","Oscar","Clifford","Jay","Shane","Ronnie","Barry","Lucas","Corey","Manuel","Leo","Tommy","Warren","Jackson","Isaiah","Connor","Don","Dean","Jon","Julian","Miguel","Bill","Lloyd","Charlie","Mitchell","Leon","Jerome","Darrell","Jeremiah","Alvin","Brett","Seth","Floyd","Jim","Blake","Micheal","Gordon","Trevor","Lewis","Erik","Edgar","Vernon","Devin","Gavin","Jayden","Chris","Clyde","Tom","Derrick","Mario","Brent","Marc","Herman","Chase","Dominic","Ricardo","Franklin","Maurice","Max","Aiden","Owen","Lester","Gilbert","Elmer","Gene","Francisco","Glen","Cory","Garrett","Clayton","Sam","Jorge","Chester","Alejandro","Jeff","Harvey","Milton","Cole","Ivan","Andre","Duane","Landon"],it:["Adolfo","Alberto","Aldo","Alessandro","Alessio","Alfredo","Alvaro","Andrea","Angelo","Angiolo","Antonino","Antonio","Attilio","Benito","Bernardo","Bruno","Carlo","Cesare","Christian","Claudio","Corrado","Cosimo","Cristian","Cristiano","Daniele","Dario","David","Davide","Diego","Dino","Domenico","Duccio","Edoardo","Elia","Elio","Emanuele","Emiliano","Emilio","Enrico","Enzo","Ettore","Fabio","Fabrizio","Federico","Ferdinando","Fernando","Filippo","Francesco","Franco","Gabriele","Giacomo","Giampaolo","Giampiero","Giancarlo","Gianfranco","Gianluca","Gianmarco","Gianni","Gino","Giorgio","Giovanni","Giuliano","Giulio","Giuseppe","Graziano","Gregorio","Guido","Iacopo","Jacopo","Lapo","Leonardo","Lorenzo","Luca","Luciano","Luigi","Manuel","Marcello","Marco","Marino","Mario","Massimiliano","Massimo","Matteo","Mattia","Maurizio","Mauro","Michele","Mirko","Mohamed","Nello","Neri","Niccolò","Nicola","Osvaldo","Otello","Paolo","Pier Luigi","Piero","Pietro","Raffaele","Remo","Renato","Renzo","Riccardo","Roberto","Rolando","Romano","Salvatore","Samuele","Sandro","Sergio","Silvano","Simone","Stefano","Thomas","Tommaso","Ubaldo","Ugo","Umberto","Valerio","Valter","Vasco","Vincenzo","Vittorio"],nl:["Aaron","Abel","Adam","Adriaan","Albert","Alexander","Ali","Arjen","Arno","Bart","Bas","Bastiaan","Benjamin","Bob","Boris","Bram","Brent","Cas","Casper","Chris","Christiaan","Cornelis","Daan","Daley","Damian","Dani","Daniel","Daniël","David","Dean","Dirk","Dylan","Egbert","Elijah","Erik","Erwin","Evert","Ezra","Fabian","Fedde","Finn","Florian","Floris","Frank","Frans","Frederik","Freek","Geert","Gerard","Gerben","Gerrit","Gijs","Guus","Hans","Hendrik","Henk","Herman","Hidde","Hugo","Jaap","Jan Jaap","Jan-Willem","Jack","Jacob","Jan","Jason","Jasper","Jayden","Jelle","Jelte","Jens","Jeroen","Jesse","Jim","Job","Joep","Johannes","John","Jonathan","Joris","Joshua","Joël","Julian","Kees","Kevin","Koen","Lars","Laurens","Leendert","Lennard","Lodewijk","Luc","Luca","Lucas","Lukas","Luuk","Maarten","Marcus","Martijn","Martin","Matthijs","Maurits","Max","Mees","Melle","Mick","Mika","Milan","Mohamed","Mohammed","Morris","Muhammed","Nathan","Nick","Nico","Niek","Niels","Noah","Noud","Olivier","Oscar","Owen","Paul","Pepijn","Peter","Pieter","Pim","Quinten","Reinier","Rens","Robin","Ruben","Sam","Samuel","Sander","Sebastiaan","Sem","Sep","Sepp","Siem","Simon","Stan","Stef","Steven","Stijn","Sven","Teun","Thijmen","Thijs","Thomas","Tijn","Tim","Timo","Tobias","Tom","Victor","Vince","Willem","Wim","Wouter","Yusuf"],fr:["Aaron","Abdon","Abel","Abélard","Abelin","Abondance","Abraham","Absalon","Acace","Achaire","Achille","Adalard","Adalbald","Adalbéron","Adalbert","Adalric","Adam","Adegrin","Adel","Adelin","Andelin","Adelphe","Adam","Adéodat","Adhémar","Adjutor","Adolphe","Adonis","Adon","Adrien","Agapet","Agathange","Agathon","Agilbert","Agénor","Agnan","Aignan","Agrippin","Aimable","Aimé","Alain","Alban","Albin","Aubin","Albéric","Albert","Albertet","Alcibiade","Alcide","Alcée","Alcime","Aldonce","Aldric","Aldéric","Aleaume","Alexandre","Alexis","Alix","Alliaume","Aleaume","Almine","Almire","Aloïs","Alphée","Alphonse","Alpinien","Alverède","Amalric","Amaury","Amandin","Amant","Ambroise","Amédée","Amélien","Amiel","Amour","Anaël","Anastase","Anatole","Ancelin","Andéol","Andoche","André","Andoche","Ange","Angelin","Angilbe","Anglebert","Angoustan","Anicet","Anne","Annibal","Ansbert","Anselme","Anthelme","Antheaume","Anthime","Antide","Antoine","Antonius","Antonin","Apollinaire","Apollon","Aquilin","Arcade","Archambaud","Archambeau","Archange","Archibald","Arian","Ariel","Ariste","Aristide","Armand","Armel","Armin","Arnould","Arnaud","Arolde","Arsène","Arsinoé","Arthaud","Arthème","Arthur","Ascelin","Athanase","Aubry","Audebert","Audouin","Audran","Audric","Auguste","Augustin","Aurèle","Aurélien","Aurian","Auxence","Axel","Aymard","Aymeric","Aymon","Aymond","Balthazar","Baptiste","Barnabé","Barthélemy","Bartimée","Basile","Bastien","Baudouin","Bénigne","Benjamin","Benoît","Bérenger","Bérard","Bernard","Bertrand","Blaise","Bon","Boniface","Bouchard","Brice","Brieuc","Bruno","Brunon","Calixte","Calliste","Camélien","Camille","Camillien","Candide","Caribert","Carloman","Cassandre","Cassien","Cédric","Céleste","Célestin","Célien","Césaire","César","Charles","Charlemagne","Childebert","Chilpéric","Chrétien","Christian","Christodule","Christophe","Chrysostome","Clarence","Claude","Claudien","Cléandre","Clément","Clotaire","Côme","Constance","Constant","Constantin","Corentin","Cyprien","Cyriaque","Cyrille","Cyril","Damien","Daniel","David","Delphin","Denis","Désiré","Didier","Dieudonné","Dimitri","Dominique","Dorian","Dorothée","Edgard","Edmond","Édouard","Éleuthère","Élie","Élisée","Émeric","Émile","Émilien","Emmanuel","Enguerrand","Épiphane","Éric","Esprit","Ernest","Étienne","Eubert","Eudes","Eudoxe","Eugène","Eusèbe","Eustache","Évariste","Évrard","Fabien","Fabrice","Falba","Félicité","Félix","Ferdinand","Fiacre","Fidèle","Firmin","Flavien","Flodoard","Florent","Florentin","Florestan","Florian","Fortuné","Foulques","Francisque","François","Français","Franciscus","Francs","Frédéric","Fulbert","Fulcran","Fulgence","Gabin","Gabriel","Gaël","Garnier","Gaston","Gaspard","Gatien","Gaud","Gautier","Gédéon","Geoffroy","Georges","Géraud","Gérard","Gerbert","Germain","Gervais","Ghislain","Gilbert","Gilles","Girart","Gislebert","Gondebaud","Gonthier","Gontran","Gonzague","Grégoire","Guérin","Gui","Guillaume","Gustave","Guy","Guyot","Hardouin","Hector","Hédelin","Hélier","Henri","Herbert","Herluin","Hervé","Hilaire","Hildebert","Hincmar","Hippolyte","Honoré","Hubert","Hugues","Innocent","Isabeau","Isidore","Jacques","Japhet","Jason","Jean","Jeannel","Jeannot","Jérémie","Jérôme","Joachim","Joanny","Job","Jocelyn","Joël","Johan","Jonas","Jonathan","Joseph","Josse","Josselin","Jourdain","Jude","Judicaël","Jules","Julien","Juste","Justin","Lambert","Landry","Laurent","Lazare","Léandre","Léon","Léonard","Léopold","Leu","Loup","Leufroy","Libère","Liétald","Lionel","Loïc","Longin","Lorrain","Lorraine","Lothaire","Louis","Loup","Luc","Lucas","Lucien","Ludolphe","Ludovic","Macaire","Malo","Mamert","Manassé","Marc","Marceau","Marcel","Marcelin","Marius","Marseille","Martial","Martin","Mathurin","Matthias","Mathias","Matthieu","Maugis","Maurice","Mauricet","Maxence","Maxime","Maximilien","Mayeul","Médéric","Melchior","Mence","Merlin","Mérovée","Michaël","Michel","Moïse","Morgan","Nathan","Nathanaël","Narcisse","Néhémie","Nestor","Nestor","Nicéphore","Nicolas","Noé","Noël","Norbert","Normand","Normands","Octave","Odilon","Odon","Oger","Olivier","Oury","Pacôme","Palémon","Parfait","Pascal","Paterne","Patrice","Paul","Pépin","Perceval","Philémon","Philibert","Philippe","Philothée","Pie","Pierre","Pierrick","Prosper","Quentin","Raoul","Raphaël","Raymond","Régis","Réjean","Rémi","Renaud","René","Reybaud","Richard","Robert","Roch","Rodolphe","Rodrigue","Roger","Roland","Romain","Romuald","Roméo","Rome","Ronan","Roselin","Salomon","Samuel","Savin","Savinien","Scholastique","Sébastien","Séraphin","Serge","Séverin","Sidoine","Sigebert","Sigismond","Silvère","Simon","Siméon","Sixte","Stanislas","Stéphane","Stephan","Sylvain","Sylvestre","Tancrède","Tanguy","Taurin","Théodore","Théodose","Théophile","Théophraste","Thibault","Thibert","Thierry","Thomas","Timoléon","Timothée","Titien","Tonnin","Toussaint","Trajan","Tristan","Turold","Tim","Ulysse","Urbain","Valentin","Valère","Valéry","Venance","Venant","Venceslas","Vianney","Victor","Victorien","Victorin","Vigile","Vincent","Vital","Vitalien","Vivien","Waleran","Wandrille","Xavier","Xénophon","Yves","Zacharie","Zaché","Zéphirin"]},female:{en:["Mary","Emma","Elizabeth","Minnie","Margaret","Ida","Alice","Bertha","Sarah","Annie","Clara","Ella","Florence","Cora","Martha","Laura","Nellie","Grace","Carrie","Maude","Mabel","Bessie","Jennie","Gertrude","Julia","Hattie","Edith","Mattie","Rose","Catherine","Lillian","Ada","Lillie","Helen","Jessie","Louise","Ethel","Lula","Myrtle","Eva","Frances","Lena","Lucy","Edna","Maggie","Pearl","Daisy","Fannie","Josephine","Dora","Rosa","Katherine","Agnes","Marie","Nora","May","Mamie","Blanche","Stella","Ellen","Nancy","Effie","Sallie","Nettie","Della","Lizzie","Flora","Susie","Maud","Mae","Etta","Harriet","Sadie","Caroline","Katie","Lydia","Elsie","Kate","Susan","Mollie","Alma","Addie","Georgia","Eliza","Lulu","Nannie","Lottie","Amanda","Belle","Charlotte","Rebecca","Ruth","Viola","Olive","Amelia","Hannah","Jane","Virginia","Emily","Matilda","Irene","Kathryn","Esther","Willie","Henrietta","Ollie","Amy","Rachel","Sara","Estella","Theresa","Augusta","Ora","Pauline","Josie","Lola","Sophia","Leona","Anne","Mildred","Ann","Beulah","Callie","Lou","Delia","Eleanor","Barbara","Iva","Louisa","Maria","Mayme","Evelyn","Estelle","Nina","Betty","Marion","Bettie","Dorothy","Luella","Inez","Lela","Rosie","Allie","Millie","Janie","Cornelia","Victoria","Ruby","Winifred","Alta","Celia","Christine","Beatrice","Birdie","Harriett","Mable","Myra","Sophie","Tillie","Isabel","Sylvia","Carolyn","Isabelle","Leila","Sally","Ina","Essie","Bertie","Nell","Alberta","Katharine","Lora","Rena","Mina","Rhoda","Mathilda","Abbie","Eula","Dollie","Hettie","Eunice","Fanny","Ola","Lenora","Adelaide","Christina","Lelia","Nelle","Sue","Johanna","Lilly","Lucinda","Minerva","Lettie","Roxie","Cynthia","Helena","Hilda","Hulda","Bernice","Genevieve","Jean","Cordelia","Marian","Francis","Jeanette","Adeline","Gussie","Leah","Lois","Lura","Mittie","Hallie","Isabella","Olga","Phoebe","Teresa","Hester","Lida","Lina","Winnie","Claudia","Marguerite","Vera","Cecelia","Bess","Emilie","Rosetta","Verna","Myrtie","Cecilia","Elva","Olivia","Ophelia","Georgie","Elnora","Violet","Adele","Lily","Linnie","Loretta","Madge","Polly","Virgie","Eugenia","Lucile","Lucille","Mabelle","Rosalie"],it:["Ada","Adriana","Alessandra","Alessia","Alice","Angela","Anna","Anna Maria","Annalisa","Annita","Annunziata","Antonella","Arianna","Asia","Assunta","Aurora","Barbara","Beatrice","Benedetta","Bianca","Bruna","Camilla","Carla","Carlotta","Carmela","Carolina","Caterina","Catia","Cecilia","Chiara","Cinzia","Clara","Claudia","Costanza","Cristina","Daniela","Debora","Diletta","Dina","Donatella","Elena","Eleonora","Elisa","Elisabetta","Emanuela","Emma","Eva","Federica","Fernanda","Fiorella","Fiorenza","Flora","Franca","Francesca","Gabriella","Gaia","Gemma","Giada","Gianna","Gina","Ginevra","Giorgia","Giovanna","Giulia","Giuliana","Giuseppa","Giuseppina","Grazia","Graziella","Greta","Ida","Ilaria","Ines","Iolanda","Irene","Irma","Isabella","Jessica","Laura","Lea","Letizia","Licia","Lidia","Liliana","Lina","Linda","Lisa","Livia","Loretta","Luana","Lucia","Luciana","Lucrezia","Luisa","Manuela","Mara","Marcella","Margherita","Maria","Maria Cristina","Maria Grazia","Maria Luisa","Maria Pia","Maria Teresa","Marina","Marisa","Marta","Martina","Marzia","Matilde","Melissa","Michela","Milena","Mirella","Monica","Natalina","Nella","Nicoletta","Noemi","Olga","Paola","Patrizia","Piera","Pierina","Raffaella","Rebecca","Renata","Rina","Rita","Roberta","Rosa","Rosanna","Rossana","Rossella","Sabrina","Sandra","Sara","Serena","Silvana","Silvia","Simona","Simonetta","Sofia","Sonia","Stefania","Susanna","Teresa","Tina","Tiziana","Tosca","Valentina","Valeria","Vanda","Vanessa","Vanna","Vera","Veronica","Vilma","Viola","Virginia","Vittoria"],nl:["Ada","Arianne","Afke","Amanda","Amber","Amy","Aniek","Anita","Anja","Anna","Anne","Annelies","Annemarie","Annette","Anouk","Astrid","Aukje","Barbara","Bianca","Carla","Carlijn","Carolien","Chantal","Charlotte","Claudia","Daniëlle","Debora","Diane","Dora","Eline","Elise","Ella","Ellen","Emma","Esmee","Evelien","Esther","Erica","Eva","Femke","Fleur","Floor","Froukje","Gea","Gerda","Hanna","Hanneke","Heleen","Hilde","Ilona","Ina","Inge","Ingrid","Iris","Isabel","Isabelle","Janneke","Jasmijn","Jeanine","Jennifer","Jessica","Johanna","Joke","Julia","Julie","Karen","Karin","Katja","Kim","Lara","Laura","Lena","Lianne","Lieke","Lilian","Linda","Lisa","Lisanne","Lotte","Louise","Maaike","Manon","Marga","Maria","Marissa","Marit","Marjolein","Martine","Marleen","Melissa","Merel","Miranda","Michelle","Mirjam","Mirthe","Naomi","Natalie","Nienke","Nina","Noortje","Olivia","Patricia","Paula","Paulien","Ramona","Ria","Rianne","Roos","Rosanne","Ruth","Sabrina","Sandra","Sanne","Sara","Saskia","Silvia","Sofia","Sophie","Sonja","Suzanne","Tamara","Tess","Tessa","Tineke","Valerie","Vanessa","Veerle","Vera","Victoria","Wendy","Willeke","Yvonne","Zoë"],fr:["Abdon","Abel","Abigaëlle","Abigaïl","Acacius","Acanthe","Adalbert","Adalsinde","Adegrine","Adélaïde","Adèle","Adélie","Adeline","Adeltrude","Adolphe","Adonis","Adrastée","Adrehilde","Adrienne","Agathe","Agilbert","Aglaé","Aignan","Agneflète","Agnès","Agrippine","Aimé","Alaine","Alaïs","Albane","Albérade","Alberte","Alcide","Alcine","Alcyone","Aldegonde","Aleth","Alexandrine","Alexine","Alice","Aliénor","Aliette","Aline","Alix","Alizé","Aloïse","Aloyse","Alphonsine","Althée","Amaliane","Amalthée","Amande","Amandine","Amant","Amarande","Amaranthe","Amaryllis","Ambre","Ambroisie","Amélie","Améthyste","Aminte","Anaël","Anaïs","Anastasie","Anatole","Ancelin","Andrée","Anémone","Angadrême","Angèle","Angeline","Angélique","Angilbert","Anicet","Annabelle","Anne","Annette","Annick","Annie","Annonciade","Ansbert","Anstrudie","Anthelme","Antigone","Antoinette","Antonine","Aphélie","Apolline","Apollonie","Aquiline","Arabelle","Arcadie","Archange","Argine","Ariane","Aricie","Ariel","Arielle","Arlette","Armance","Armande","Armandine","Armelle","Armide","Armelle","Armin","Arnaud","Arsène","Arsinoé","Artémis","Arthur","Ascelin","Ascension","Assomption","Astarté","Astérie","Astrée","Astrid","Athalie","Athanasie","Athina","Aube","Albert","Aude","Audrey","Augustine","Aure","Aurélie","Aurélien","Aurèle","Aurore","Auxence","Aveline","Abigaëlle","Avoye","Axelle","Aymard","Azalée","Adèle","Adeline","Barbe","Basilisse","Bathilde","Béatrice","Béatrix","Bénédicte","Bérengère","Bernadette","Berthe","Bertille","Beuve","Blanche","Blanc","Blandine","Brigitte","Brune","Brunehilde","Callista","Camille","Capucine","Carine","Caroline","Cassandre","Catherine","Cécile","Céleste","Célestine","Céline","Chantal","Charlène","Charline","Charlotte","Chloé","Christelle","Christiane","Christine","Claire","Clara","Claude","Claudine","Clarisse","Clémence","Clémentine","Cléo","Clio","Clotilde","Coline","Conception","Constance","Coralie","Coraline","Corentine","Corinne","Cyrielle","Daniel","Daniel","Daphné","Débora","Delphine","Denise","Diane","Dieudonné","Dominique","Doriane","Dorothée","Douce","Édith","Edmée","Éléonore","Éliane","Élia","Éliette","Élisabeth","Élise","Ella","Élodie","Éloïse","Elsa","Émeline","Émérance","Émérentienne","Émérencie","Émilie","Emma","Emmanuelle","Emmelie","Ernestine","Esther","Estelle","Eudoxie","Eugénie","Eulalie","Euphrasie","Eusébie","Évangéline","Eva","Ève","Évelyne","Fanny","Fantine","Faustine","Félicie","Fernande","Flavie","Fleur","Flore","Florence","Florie","Fortuné","France","Francia","Françoise","Francine","Gabrielle","Gaëlle","Garance","Geneviève","Georgette","Gerberge","Germaine","Gertrude","Gisèle","Guenièvre","Guilhemine","Guillemette","Gustave","Gwenael","Hélène","Héloïse","Henriette","Hermine","Hermione","Hippolyte","Honorine","Hortense","Huguette","Ines","Irène","Irina","Iris","Isabeau","Isabelle","Iseult","Isolde","Ismérie","Jacinthe","Jacqueline","Jade","Janine","Jeanne","Jocelyne","Joëlle","Joséphine","Judith","Julia","Julie","Jules","Juliette","Justine","Katy","Kathy","Katie","Laura","Laure","Laureline","Laurence","Laurene","Lauriane","Laurianne","Laurine","Léa","Léna","Léonie","Léon","Léontine","Lorraine","Lucie","Lucienne","Lucille","Ludivine","Lydie","Lydie","Megane","Madeleine","Magali","Maguelone","Mallaury","Manon","Marceline","Margot","Marguerite","Marianne","Marie","Myriam","Marie","Marine","Marion","Marlène","Marthe","Martine","Mathilde","Maud","Maureen","Mauricette","Maxime","Mélanie","Melissa","Mélissandre","Mélisande","Mélodie","Michel","Micheline","Mireille","Miriam","Moïse","Monique","Morgane","Muriel","Mylène","Nadège","Nadine","Nathalie","Nicole","Nicolette","Nine","Noël","Noémie","Océane","Odette","Odile","Olive","Olivia","Olympe","Ombline","Ombeline","Ophélie","Oriande","Oriane","Ozanne","Pascale","Pascaline","Paule","Paulette","Pauline","Priscille","Prisca","Prisque","Pécine","Pélagie","Pénélope","Perrine","Pétronille","Philippine","Philomène","Philothée","Primerose","Prudence","Pulchérie","Quentine","Quiéta","Quintia","Quintilla","Rachel","Raphaëlle","Raymonde","Rebecca","Régine","Réjeanne","René","Rita","Rita","Rolande","Romane","Rosalie","Rose","Roseline","Sabine","Salomé","Sandra","Sandrine","Sarah","Ségolène","Séverine","Sibylle","Simone","Sixt","Solange","Soline","Solène","Sophie","Stéphanie","Suzanne","Sylvain","Sylvie","Tatiana","Thaïs","Théodora","Thérèse","Tiphaine","Ursule","Valentine","Valérie","Véronique","Victoire","Victorine","Vinciane","Violette","Virginie","Viviane","Xavière","Yolande","Ysaline","Yvette","Yvonne","Zélie","Zita","Zoé"]}},lastNames:{en:["Smith","Johnson","Williams","Jones","Brown","Davis","Miller","Wilson","Moore","Taylor","Anderson","Thomas","Jackson","White","Harris","Martin","Thompson","Garcia","Martinez","Robinson","Clark","Rodriguez","Lewis","Lee","Walker","Hall","Allen","Young","Hernandez","King","Wright","Lopez","Hill","Scott","Green","Adams","Baker","Gonzalez","Nelson","Carter","Mitchell","Perez","Roberts","Turner","Phillips","Campbell","Parker","Evans","Edwards","Collins","Stewart","Sanchez","Morris","Rogers","Reed","Cook","Morgan","Bell","Murphy","Bailey","Rivera","Cooper","Richardson","Cox","Howard","Ward","Torres","Peterson","Gray","Ramirez","James","Watson","Brooks","Kelly","Sanders","Price","Bennett","Wood","Barnes","Ross","Henderson","Coleman","Jenkins","Perry","Powell","Long","Patterson","Hughes","Flores","Washington","Butler","Simmons","Foster","Gonzales","Bryant","Alexander","Russell","Griffin","Diaz","Hayes","Myers","Ford","Hamilton","Graham","Sullivan","Wallace","Woods","Cole","West","Jordan","Owens","Reynolds","Fisher","Ellis","Harrison","Gibson","McDonald","Cruz","Marshall","Ortiz","Gomez","Murray","Freeman","Wells","Webb","Simpson","Stevens","Tucker","Porter","Hunter","Hicks","Crawford","Henry","Boyd","Mason","Morales","Kennedy","Warren","Dixon","Ramos","Reyes","Burns","Gordon","Shaw","Holmes","Rice","Robertson","Hunt","Black","Daniels","Palmer","Mills","Nichols","Grant","Knight","Ferguson","Rose","Stone","Hawkins","Dunn","Perkins","Hudson","Spencer","Gardner","Stephens","Payne","Pierce","Berry","Matthews","Arnold","Wagner","Willis","Ray","Watkins","Olson","Carroll","Duncan","Snyder","Hart","Cunningham","Bradley","Lane","Andrews","Ruiz","Harper","Fox","Riley","Armstrong","Carpenter","Weaver","Greene","Lawrence","Elliott","Chavez","Sims","Austin","Peters","Kelley","Franklin","Lawson","Fields","Gutierrez","Ryan","Schmidt","Carr","Vasquez","Castillo","Wheeler","Chapman","Oliver","Montgomery","Richards","Williamson","Johnston","Banks","Meyer","Bishop","McCoy","Howell","Alvarez","Morrison","Hansen","Fernandez","Garza","Harvey","Little","Burton","Stanley","Nguyen","George","Jacobs","Reid","Kim","Fuller","Lynch","Dean","Gilbert","Garrett","Romero","Welch","Larson","Frazier","Burke","Hanson","Day","Mendoza","Moreno","Bowman","Medina","Fowler","Brewer","Hoffman","Carlson","Silva","Pearson","Holland","Douglas","Fleming","Jensen","Vargas","Byrd","Davidson","Hopkins","May","Terry","Herrera","Wade","Soto","Walters","Curtis","Neal","Caldwell","Lowe","Jennings","Barnett","Graves","Jimenez","Horton","Shelton","Barrett","Obrien","Castro","Sutton","Gregory","McKinney","Lucas","Miles","Craig","Rodriquez","Chambers","Holt","Lambert","Fletcher","Watts","Bates","Hale","Rhodes","Pena","Beck","Newman","Haynes","McDaniel","Mendez","Bush","Vaughn","Parks","Dawson","Santiago","Norris","Hardy","Love","Steele","Curry","Powers","Schultz","Barker","Guzman","Page","Munoz","Ball","Keller","Chandler","Weber","Leonard","Walsh","Lyons","Ramsey","Wolfe","Schneider","Mullins","Benson","Sharp","Bowen","Daniel","Barber","Cummings","Hines","Baldwin","Griffith","Valdez","Hubbard","Salazar","Reeves","Warner","Stevenson","Burgess","Santos","Tate","Cross","Garner","Mann","Mack","Moss","Thornton","Dennis","McGee","Farmer","Delgado","Aguilar","Vega","Glover","Manning","Cohen","Harmon","Rodgers","Robbins","Newton","Todd","Blair","Higgins","Ingram","Reese","Cannon","Strickland","Townsend","Potter","Goodwin","Walton","Rowe","Hampton","Ortega","Patton","Swanson","Joseph","Francis","Goodman","Maldonado","Yates","Becker","Erickson","Hodges","Rios","Conner","Adkins","Webster","Norman","Malone","Hammond","Flowers","Cobb","Moody","Quinn","Blake","Maxwell","Pope","Floyd","Osborne","Paul","McCarthy","Guerrero","Lindsey","Estrada","Sandoval","Gibbs","Tyler","Gross","Fitzgerald","Stokes","Doyle","Sherman","Saunders","Wise","Colon","Gill","Alvarado","Greer","Padilla","Simon","Waters","Nunez","Ballard","Schwartz","McBride","Houston","Christensen","Klein","Pratt","Briggs","Parsons","McLaughlin","Zimmerman","French","Buchanan","Moran","Copeland","Roy","Pittman","Brady","McCormick","Holloway","Brock","Poole","Frank","Logan","Owen","Bass","Marsh","Drake","Wong","Jefferson","Park","Morton","Abbott","Sparks","Patrick","Norton","Huff","Clayton","Massey","Lloyd","Figueroa","Carson","Bowers","Roberson","Barton","Tran","Lamb","Harrington","Casey","Boone","Cortez","Clarke","Mathis","Singleton","Wilkins","Cain","Bryan","Underwood","Hogan","McKenzie","Collier","Luna","Phelps","McGuire","Allison","Bridges","Wilkerson","Nash","Summers","Atkins"],it:["Acciai","Aglietti","Agostini","Agresti","Ahmed","Aiazzi","Albanese","Alberti","Alessi","Alfani","Alinari","Alterini","Amato","Ammannati","Ancillotti","Andrei","Andreini","Andreoni","Angeli","Anichini","Antonelli","Antonini","Arena","Ariani","Arnetoli","Arrighi","Baccani","Baccetti","Bacci","Bacherini","Badii","Baggiani","Baglioni","Bagni","Bagnoli","Baldassini","Baldi","Baldini","Ballerini","Balli","Ballini","Balloni","Bambi","Banchi","Bandinelli","Bandini","Bani","Barbetti","Barbieri","Barchielli","Bardazzi","Bardelli","Bardi","Barducci","Bargellini","Bargiacchi","Barni","Baroncelli","Baroncini","Barone","Baroni","Baronti","Bartalesi","Bartoletti","Bartoli","Bartolini","Bartoloni","Bartolozzi","Basagni","Basile","Bassi","Batacchi","Battaglia","Battaglini","Bausi","Becagli","Becattini","Becchi","Becucci","Bellandi","Bellesi","Belli","Bellini","Bellucci","Bencini","Benedetti","Benelli","Beni","Benini","Bensi","Benucci","Benvenuti","Berlincioni","Bernacchioni","Bernardi","Bernardini","Berni","Bernini","Bertelli","Berti","Bertini","Bessi","Betti","Bettini","Biagi","Biagini","Biagioni","Biagiotti","Biancalani","Bianchi","Bianchini","Bianco","Biffoli","Bigazzi","Bigi","Biliotti","Billi","Binazzi","Bindi","Bini","Biondi","Bizzarri","Bocci","Bogani","Bolognesi","Bonaiuti","Bonanni","Bonciani","Boncinelli","Bondi","Bonechi","Bongini","Boni","Bonini","Borchi","Boretti","Borghi","Borghini","Borgioli","Borri","Borselli","Boschi","Bottai","Bracci","Braccini","Brandi","Braschi","Bravi","Brazzini","Breschi","Brilli","Brizzi","Brogelli","Brogi","Brogioni","Brunelli","Brunetti","Bruni","Bruno","Brunori","Bruschi","Bucci","Bucciarelli","Buccioni","Bucelli","Bulli","Burberi","Burchi","Burgassi","Burroni","Bussotti","Buti","Caciolli","Caiani","Calabrese","Calamai","Calamandrei","Caldini","Calo'","Calonaci","Calosi","Calvelli","Cambi","Camiciottoli","Cammelli","Cammilli","Campolmi","Cantini","Capanni","Capecchi","Caponi","Cappelletti","Cappelli","Cappellini","Cappugi","Capretti","Caputo","Carbone","Carboni","Cardini","Carlesi","Carletti","Carli","Caroti","Carotti","Carrai","Carraresi","Carta","Caruso","Casalini","Casati","Caselli","Casini","Castagnoli","Castellani","Castelli","Castellucci","Catalano","Catarzi","Catelani","Cavaciocchi","Cavallaro","Cavallini","Cavicchi","Cavini","Ceccarelli","Ceccatelli","Ceccherelli","Ceccherini","Cecchi","Cecchini","Cecconi","Cei","Cellai","Celli","Cellini","Cencetti","Ceni","Cenni","Cerbai","Cesari","Ceseri","Checcacci","Checchi","Checcucci","Cheli","Chellini","Chen","Cheng","Cherici","Cherubini","Chiaramonti","Chiarantini","Chiarelli","Chiari","Chiarini","Chiarugi","Chiavacci","Chiesi","Chimenti","Chini","Chirici","Chiti","Ciabatti","Ciampi","Cianchi","Cianfanelli","Cianferoni","Ciani","Ciapetti","Ciappi","Ciardi","Ciatti","Cicali","Ciccone","Cinelli","Cini","Ciobanu","Ciolli","Cioni","Cipriani","Cirillo","Cirri","Ciucchi","Ciuffi","Ciulli","Ciullini","Clemente","Cocchi","Cognome","Coli","Collini","Colombo","Colzi","Comparini","Conforti","Consigli","Conte","Conti","Contini","Coppini","Coppola","Corsi","Corsini","Corti","Cortini","Cosi","Costa","Costantini","Costantino","Cozzi","Cresci","Crescioli","Cresti","Crini","Curradi","D'Agostino","D'Alessandro","D'Amico","D'Angelo","Daddi","Dainelli","Dallai","Danti","Davitti","De Angelis","De Luca","De Marco","De Rosa","De Santis","De Simone","De Vita","Degl'Innocenti","Degli Innocenti","Dei","Del Lungo","Del Re","Di Marco","Di Stefano","Dini","Diop","Dobre","Dolfi","Donati","Dondoli","Dong","Donnini","Ducci","Dumitru","Ermini","Esposito","Evangelisti","Fabbri","Fabbrini","Fabbrizzi","Fabbroni","Fabbrucci","Fabiani","Facchini","Faggi","Fagioli","Failli","Faini","Falciani","Falcini","Falcone","Fallani","Falorni","Falsini","Falugiani","Fancelli","Fanelli","Fanetti","Fanfani","Fani","Fantappie'","Fantechi","Fanti","Fantini","Fantoni","Farina","Fattori","Favilli","Fedi","Fei","Ferrante","Ferrara","Ferrari","Ferraro","Ferretti","Ferri","Ferrini","Ferroni","Fiaschi","Fibbi","Fiesoli","Filippi","Filippini","Fini","Fioravanti","Fiore","Fiorentini","Fiorini","Fissi","Focardi","Foggi","Fontana","Fontanelli","Fontani","Forconi","Formigli","Forte","Forti","Fortini","Fossati","Fossi","Francalanci","Franceschi","Franceschini","Franchi","Franchini","Franci","Francini","Francioni","Franco","Frassineti","Frati","Fratini","Frilli","Frizzi","Frosali","Frosini","Frullini","Fusco","Fusi","Gabbrielli","Gabellini","Gagliardi","Galanti","Galardi","Galeotti","Galletti","Galli","Gallo","Gallori","Gambacciani","Gargani","Garofalo","Garuglieri","Gashi","Gasperini","Gatti","Gelli","Gensini","Gentile","Gentili","Geri","Gerini","Gheri","Ghini","Giachetti","Giachi","Giacomelli","Gianassi","Giani","Giannelli","Giannetti","Gianni","Giannini","Giannoni","Giannotti","Giannozzi","Gigli","Giordano","Giorgetti","Giorgi","Giovacchini","Giovannelli","Giovannetti","Giovannini","Giovannoni","Giuliani","Giunti","Giuntini","Giusti","Gonnelli","Goretti","Gori","Gradi","Gramigni","Grassi","Grasso","Graziani","Grazzini","Greco","Grifoni","Grillo","Grimaldi","Grossi","Gualtieri","Guarducci","Guarino","Guarnieri","Guasti","Guerra","Guerri","Guerrini","Guidi","Guidotti","He","Hoxha","Hu","Huang","Iandelli","Ignesti","Innocenti","Jin","La Rosa","Lai","Landi","Landini","Lanini","Lapi","Lapini","Lari","Lascialfari","Lastrucci","Latini","Lazzeri","Lazzerini","Lelli","Lenzi","Leonardi","Leoncini","Leone","Leoni","Lepri","Li","Liao","Lin","Linari","Lippi","Lisi","Livi","Lombardi","Lombardini","Lombardo","Longo","Lopez","Lorenzi","Lorenzini","Lorini","Lotti","Lu","Lucchesi","Lucherini","Lunghi","Lupi","Madiai","Maestrini","Maffei","Maggi","Maggini","Magherini","Magini","Magnani","Magnelli","Magni","Magnolfi","Magrini","Malavolti","Malevolti","Manca","Mancini","Manetti","Manfredi","Mangani","Mannelli","Manni","Mannini","Mannucci","Manuelli","Manzini","Marcelli","Marchese","Marchetti","Marchi","Marchiani","Marchionni","Marconi","Marcucci","Margheri","Mari","Mariani","Marilli","Marinai","Marinari","Marinelli","Marini","Marino","Mariotti","Marsili","Martelli","Martinelli","Martini","Martino","Marzi","Masi","Masini","Masoni","Massai","Materassi","Mattei","Matteini","Matteucci","Matteuzzi","Mattioli","Mattolini","Matucci","Mauro","Mazzanti","Mazzei","Mazzetti","Mazzi","Mazzini","Mazzocchi","Mazzoli","Mazzoni","Mazzuoli","Meacci","Mecocci","Meini","Melani","Mele","Meli","Mengoni","Menichetti","Meoni","Merlini","Messeri","Messina","Meucci","Miccinesi","Miceli","Micheli","Michelini","Michelozzi","Migliori","Migliorini","Milani","Miniati","Misuri","Monaco","Montagnani","Montagni","Montanari","Montelatici","Monti","Montigiani","Montini","Morandi","Morandini","Morelli","Moretti","Morganti","Mori","Morini","Moroni","Morozzi","Mugnai","Mugnaini","Mustafa","Naldi","Naldini","Nannelli","Nanni","Nannini","Nannucci","Nardi","Nardini","Nardoni","Natali","Ndiaye","Nencetti","Nencini","Nencioni","Neri","Nesi","Nesti","Niccolai","Niccoli","Niccolini","Nigi","Nistri","Nocentini","Noferini","Novelli","Nucci","Nuti","Nutini","Oliva","Olivieri","Olmi","Orlandi","Orlandini","Orlando","Orsini","Ortolani","Ottanelli","Pacciani","Pace","Paci","Pacini","Pagani","Pagano","Paggetti","Pagliai","Pagni","Pagnini","Paladini","Palagi","Palchetti","Palloni","Palmieri","Palumbo","Pampaloni","Pancani","Pandolfi","Pandolfini","Panerai","Panichi","Paoletti","Paoli","Paolini","Papi","Papini","Papucci","Parenti","Parigi","Parisi","Parri","Parrini","Pasquini","Passeri","Pecchioli","Pecorini","Pellegrini","Pepi","Perini","Perrone","Peruzzi","Pesci","Pestelli","Petri","Petrini","Petrucci","Pettini","Pezzati","Pezzatini","Piani","Piazza","Piazzesi","Piazzini","Piccardi","Picchi","Piccini","Piccioli","Pieraccini","Pieraccioni","Pieralli","Pierattini","Pieri","Pierini","Pieroni","Pietrini","Pini","Pinna","Pinto","Pinzani","Pinzauti","Piras","Pisani","Pistolesi","Poggesi","Poggi","Poggiali","Poggiolini","Poli","Pollastri","Porciani","Pozzi","Pratellesi","Pratesi","Prosperi","Pruneti","Pucci","Puccini","Puccioni","Pugi","Pugliese","Puliti","Querci","Quercioli","Raddi","Radu","Raffaelli","Ragazzini","Ranfagni","Ranieri","Rastrelli","Raugei","Raveggi","Renai","Renzi","Rettori","Ricci","Ricciardi","Ridi","Ridolfi","Rigacci","Righi","Righini","Rinaldi","Risaliti","Ristori","Rizzo","Rocchi","Rocchini","Rogai","Romagnoli","Romanelli","Romani","Romano","Romei","Romeo","Romiti","Romoli","Romolini","Rontini","Rosati","Roselli","Rosi","Rossetti","Rossi","Rossini","Rovai","Ruggeri","Ruggiero","Russo","Sabatini","Saccardi","Sacchetti","Sacchi","Sacco","Salerno","Salimbeni","Salucci","Salvadori","Salvestrini","Salvi","Salvini","Sanesi","Sani","Sanna","Santi","Santini","Santoni","Santoro","Santucci","Sardi","Sarri","Sarti","Sassi","Sbolci","Scali","Scarpelli","Scarselli","Scopetani","Secci","Selvi","Senatori","Senesi","Serafini","Sereni","Serra","Sestini","Sguanci","Sieni","Signorini","Silvestri","Simoncini","Simonetti","Simoni","Singh","Sodi","Soldi","Somigli","Sorbi","Sorelli","Sorrentino","Sottili","Spina","Spinelli","Staccioli","Staderini","Stefanelli","Stefani","Stefanini","Stella","Susini","Tacchi","Tacconi","Taddei","Tagliaferri","Tamburini","Tanganelli","Tani","Tanini","Tapinassi","Tarchi","Tarchiani","Targioni","Tassi","Tassini","Tempesti","Terzani","Tesi","Testa","Testi","Tilli","Tinti","Tirinnanzi","Toccafondi","Tofanari","Tofani","Tognaccini","Tonelli","Tonini","Torelli","Torrini","Tosi","Toti","Tozzi","Trambusti","Trapani","Tucci","Turchi","Ugolini","Ulivi","Valente","Valenti","Valentini","Vangelisti","Vanni","Vannini","Vannoni","Vannozzi","Vannucchi","Vannucci","Ventura","Venturi","Venturini","Vestri","Vettori","Vichi","Viciani","Vieri","Vigiani","Vignoli","Vignolini","Vignozzi","Villani","Vinci","Visani","Vitale","Vitali","Viti","Viviani","Vivoli","Volpe","Volpi","Wang","Wu","Xu","Yang","Ye","Zagli","Zani","Zanieri","Zanobini","Zecchi","Zetti","Zhang","Zheng","Zhou","Zhu","Zingoni","Zini","Zoppi"],nl:["Albers","Alblas","Appelman","Baars","Baas","Bakker","Blank","Bleeker","Blok","Blom","Boer","Boers","Boldewijn","Boon","Boot","Bos","Bosch","Bosma","Bosman","Bouma","Bouman","Bouwman","Brands","Brouwer","Burger","Buijs","Buitenhuis","Ceder","Cohen","Dekker","Dekkers","Dijkman","Dijkstra","Driessen","Drost","Engel","Evers","Faber","Franke","Gerritsen","Goedhart","Goossens","Groen","Groenenberg","Groot","Haan","Hart","Heemskerk","Hendriks","Hermans","Hoekstra","Hofman","Hopman","Huisman","Jacobs","Jansen","Janssen","Jonker","Jaspers","Keijzer","Klaassen","Klein","Koek","Koenders","Kok","Kool","Koopman","Koopmans","Koning","Koster","Kramer","Kroon","Kuijpers","Kuiper","Kuipers","Kurt","Koster","Kwakman","Los","Lubbers","Maas","Markus","Martens","Meijer","Mol","Molenaar","Mulder","Nieuwenhuis","Peeters","Peters","Pengel","Pieters","Pool","Post","Postma","Prins","Pronk","Reijnders","Rietveld","Roest","Roos","Sanders","Schaap","Scheffer","Schenk","Schilder","Schipper","Schmidt","Scholten","Schouten","Schut","Schutte","Schuurman","Simons","Smeets","Smit","Smits","Snel","Swinkels","Tas","Terpstra","Timmermans","Tol","Tromp","Troost","Valk","Veenstra","Veldkamp","Verbeek","Verheul","Verhoeven","Vermeer","Vermeulen","Verweij","Vink","Visser","Voorn","Vos","Wagenaar","Wiersema","Willems","Willemsen","Witteveen","Wolff","Wolters","Zijlstra","Zwart","de Beer","de Boer","de Bruijn","de Bruin","de Graaf","de Groot","de Haan","de Haas","de Jager","de Jong","de Jonge","de Koning","de Lange","de Leeuw","de Ridder","de Rooij","de Ruiter","de Vos","de Vries","de Waal","de Wit","de Zwart","van Beek","van Boven","van Dam","van Dijk","van Dongen","van Doorn","van Egmond","van Eijk","van Es","van Gelder","van Gelderen","van Houten","van Hulst","van Kempen","van Kesteren","van Leeuwen","van Loon","van Mill","van Noord","van Ommen","van Ommeren","van Oosten","van Oostveen","van Rijn","van Schaik","van Veen","van Vliet","van Wijk","van Wijngaarden","van den Poel","van de Pol","van den Ploeg","van de Ven","van den Berg","van den Bosch","van den Brink","van den Broek","van den Heuvel","van der Heijden","van der Horst","van der Hulst","van der Kroon","van der Laan","van der Linden","van der Meer","van der Meij","van der Meulen","van der Molen","van der Sluis","van der Spek","van der Veen","van der Velde","van der Velden","van der Vliet","van der Wal"],uk:["Smith","Jones","Williams","Taylor","Brown","Davies","Evans","Wilson","Thomas","Johnson","Roberts","Robinson","Thompson","Wright","Walker","White","Edwards","Hughes","Green","Hall","Lewis","Harris","Clarke","Patel","Jackson","Wood","Turner","Martin","Cooper","Hill","Ward","Morris","Moore","Clark","Lee","King","Baker","Harrison","Morgan","Allen","James","Scott","Phillips","Watson","Davis","Parker","Price","Bennett","Young","Griffiths","Mitchell","Kelly","Cook","Carter","Richardson","Bailey","Collins","Bell","Shaw","Murphy","Miller","Cox","Richards","Khan","Marshall","Anderson","Simpson","Ellis","Adams","Singh","Begum","Wilkinson","Foster","Chapman","Powell","Webb","Rogers","Gray","Mason","Ali","Hunt","Hussain","Campbell","Matthews","Owen","Palmer","Holmes","Mills","Barnes","Knight","Lloyd","Butler","Russell","Barker","Fisher","Stevens","Jenkins","Murray","Dixon","Harvey","Graham","Pearson","Ahmed","Fletcher","Walsh","Kaur","Gibson","Howard","Andrews","Stewart","Elliott","Reynolds","Saunders","Payne","Fox","Ford","Pearce","Day","Brooks","West","Lawrence","Cole","Atkinson","Bradley","Spencer","Gill","Dawson","Ball","Burton","O'brien","Watts","Rose","Booth","Perry","Ryan","Grant","Wells","Armstrong","Francis","Rees","Hayes","Hart","Hudson","Newman","Barrett","Webster","Hunter","Gregory","Carr","Lowe","Page","Marsh","Riley","Dunn","Woods","Parsons","Berry","Stone","Reid","Holland","Hawkins","Harding","Porter","Robertson","Newton","Oliver","Reed","Kennedy","Williamson","Bird","Gardner","Shah","Dean","Lane","Cooke","Bates","Henderson","Parry","Burgess","Bishop","Walton","Burns","Nicholson","Shepherd","Ross","Cross","Long","Freeman","Warren","Nicholls","Hamilton","Byrne","Sutton","Mcdonald","Yates","Hodgson","Robson","Curtis","Hopkins","O'connor","Harper","Coleman","Watkins","Moss","Mccarthy","Chambers","O'neill","Griffin","Sharp","Hardy","Wheeler","Potter","Osborne","Johnston","Gordon","Doyle","Wallace","George","Jordan","Hutchinson","Rowe","Burke","May","Pritchard","Gilbert","Willis","Higgins","Read","Miles","Stevenson","Stephenson","Hammond","Arnold","Buckley","Walters","Hewitt","Barber","Nelson","Slater","Austin","Sullivan","Whitehead","Mann","Frost","Lambert","Stephens","Blake","Akhtar","Lynch","Goodwin","Barton","Woodward","Thomson","Cunningham","Quinn","Barnett","Baxter","Bibi","Clayton","Nash","Greenwood","Jennings","Holt","Kemp","Poole","Gallagher","Bond","Stokes","Tucker","Davidson","Fowler","Heath","Norman","Middleton","Lawson","Banks","French","Stanley","Jarvis","Gibbs","Ferguson","Hayward","Carroll","Douglas","Dickinson","Todd","Barlow","Peters","Lucas","Knowles","Hartley","Miah","Simmons","Morton","Alexander","Field","Morrison","Norris","Townsend","Preston","Hancock","Thornton","Baldwin","Burrows","Briggs","Parkinson","Reeves","Macdonald","Lamb","Black","Abbott","Sanders","Thorpe","Holden","Tomlinson","Perkins","Ashton","Rhodes","Fuller","Howe","Bryant","Vaughan","Dale","Davey","Weston","Bartlett","Whittaker","Davison","Kent","Skinner","Birch","Morley","Daniels","Glover","Howell","Cartwright","Pugh","Humphreys","Goddard","Brennan","Wall","Kirby","Bowen","Savage","Bull","Wong","Dobson","Smart","Wilkins","Kirk","Fraser","Duffy","Hicks","Patterson","Bradshaw","Little","Archer","Warner","Waters","O'sullivan","Farrell","Brookes","Atkins","Kay","Dodd","Bentley","Flynn","John","Schofield","Short","Haynes","Wade","Butcher","Henry","Sanderson","Crawford","Sheppard","Bolton","Coates","Giles","Gould","Houghton","Gibbons","Pratt","Manning","Law","Hooper","Noble","Dyer","Rahman","Clements","Moran","Sykes","Chan","Doherty","Connolly","Joyce","Franklin","Hobbs","Coles","Herbert","Steele","Kerr","Leach","Winter","Owens","Duncan","Naylor","Fleming","Horton","Finch","Fitzgerald","Randall","Carpenter","Marsden","Browne","Garner","Pickering","Hale","Dennis","Vincent","Chadwick","Chandler","Sharpe","Nolan","Lyons","Hurst","Collier","Peacock","Howarth","Faulkner","Rice","Pollard","Welch","Norton","Gough","Sinclair","Blackburn","Bryan","Conway","Power","Cameron","Daly","Allan","Hanson","Gardiner","Boyle","Myers","Turnbull","Wallis","Mahmood","Sims","Swift","Iqbal","Pope","Brady","Chamberlain","Rowley","Tyler","Farmer","Metcalfe","Hilton","Godfrey","Holloway","Parkin","Bray","Talbot","Donnelly","Nixon","Charlton","Benson","Whitehouse","Barry","Hope","Lord","North","Storey","Connor","Potts","Bevan","Hargreaves","Mclean","Mistry","Bruce","Howells","Hyde","Parkes","Wyatt","Fry","Lees","O'donnell","Craig","Forster","Mckenzie","Humphries","Mellor","Carey","Ingram","Summers","Leonard"],de:["Müller","Schmidt","Schneider","Fischer","Weber","Meyer","Wagner","Becker","Schulz","Hoffmann","Schäfer","Koch","Bauer","Richter","Klein","Wolf","Schröder","Neumann","Schwarz","Zimmermann","Braun","Krüger","Hofmann","Hartmann","Lange","Schmitt","Werner","Schmitz","Krause","Meier","Lehmann","Schmid","Schulze","Maier","Köhler","Herrmann","König","Walter","Mayer","Huber","Kaiser","Fuchs","Peters","Lang","Scholz","Möller","Weiß","Jung","Hahn","Schubert","Vogel","Friedrich","Keller","Günther","Frank","Berger","Winkler","Roth","Beck","Lorenz","Baumann","Franke","Albrecht","Schuster","Simon","Ludwig","Böhm","Winter","Kraus","Martin","Schumacher","Krämer","Vogt","Stein","Jäger","Otto","Sommer","Groß","Seidel","Heinrich","Brandt","Haas","Schreiber","Graf","Schulte","Dietrich","Ziegler","Kuhn","Kühn","Pohl","Engel","Horn","Busch","Bergmann","Thomas","Voigt","Sauer","Arnold","Wolff","Pfeiffer"],jp:["Sato","Suzuki","Takahashi","Tanaka","Watanabe","Ito","Yamamoto","Nakamura","Kobayashi","Kato","Yoshida","Yamada","Sasaki","Yamaguchi","Saito","Matsumoto","Inoue","Kimura","Hayashi","Shimizu","Yamazaki","Mori","Abe","Ikeda","Hashimoto","Yamashita","Ishikawa","Nakajima","Maeda","Fujita","Ogawa","Goto","Okada","Hasegawa","Murakami","Kondo","Ishii","Saito","Sakamoto","Endo","Aoki","Fujii","Nishimura","Fukuda","Ota","Miura","Fujiwara","Okamoto","Matsuda","Nakagawa","Nakano","Harada","Ono","Tamura","Takeuchi","Kaneko","Wada","Nakayama","Ishida","Ueda","Morita","Hara","Shibata","Sakai","Kudo","Yokoyama","Miyazaki","Miyamoto","Uchida","Takagi","Ando","Taniguchi","Ohno","Maruyama","Imai","Takada","Fujimoto","Takeda","Murata","Ueno","Sugiyama","Masuda","Sugawara","Hirano","Kojima","Otsuka","Chiba","Kubo","Matsui","Iwasaki","Sakurai","Kinoshita","Noguchi","Matsuo","Nomura","Kikuchi","Sano","Onishi","Sugimoto","Arai"],es:["Garcia","Fernandez","Lopez","Martinez","Gonzalez","Rodriguez","Sanchez","Perez","Martin","Gomez","Ruiz","Diaz","Hernandez","Alvarez","Jimenez","Moreno","Munoz","Alonso","Romero","Navarro","Gutierrez","Torres","Dominguez","Gil","Vazquez","Blanco","Serrano","Ramos","Castro","Suarez","Sanz","Rubio","Ortega","Molina","Delgado","Ortiz","Morales","Ramirez","Marin","Iglesias","Santos","Castillo","Garrido","Calvo","Pena","Cruz","Cano","Nunez","Prieto","Diez","Lozano","Vidal","Pascual","Ferrer","Medina","Vega","Leon","Herrero","Vicente","Mendez","Guerrero","Fuentes","Campos","Nieto","Cortes","Caballero","Ibanez","Lorenzo","Pastor","Gimenez","Saez","Soler","Marquez","Carrasco","Herrera","Montero","Arias","Crespo","Flores","Andres","Aguilar","Hidalgo","Cabrera","Mora","Duran","Velasco","Rey","Pardo","Roman","Vila","Bravo","Merino","Moya","Soto","Izquierdo","Reyes","Redondo","Marcos","Carmona","Menendez"],fr:["Martin","Bernard","Thomas","Petit","Robert","Richard","Durand","Dubois","Moreau","Laurent","Simon","Michel","Lefèvre","Leroy","Roux","David","Bertrand","Morel","Fournier","Girard","Bonnet","Dupont","Lambert","Fontaine","Rousseau","Vincent","Müller","Lefèvre","Faure","André","Mercier","Blanc","Guérin","Boyer","Garnier","Chevalier","François","Legrand","Gauthier","Garcia","Perrin","Robin","Clément","Morin","Nicolas","Henry","Roussel","Matthieu","Gautier","Masson","Marchand","Duval","Denis","Dumont","Marie","Lemaire","Noël","Meyer","Dufour","Meunier","Brun","Blanchard","Giraud","Joly","Rivière","Lucas","Brunet","Gaillard","Barbier","Arnaud","Martínez","Gérard","Roche","Renard","Schmitt","Roy","Leroux","Colin","Vidal","Caron","Picard","Roger","Fabre","Aubert","Lemoine","Renaud","Dumas","Lacroix","Olivier","Philippe","Bourgeois","Pierre","Benoît","Rey","Leclerc","Payet","Rolland","Leclercq","Guillaume","Lecomte","López","Jean","Dupuy","Guillot","Hubert","Berger","Carpentier","Sánchez","Dupuis","Moulin","Louis","Deschamps","Huet","Vasseur","Perez","Boucher","Fleury","Royer","Klein","Jacquet","Adam","Paris","Poirier","Marty","Aubry","Guyot","Carré","Charles","Renault","Charpentier","Ménard","Maillard","Baron","Bertin","Bailly","Hervé","Schneider","Fernández","Le GallGall","Collet","Léger","Bouvier","Julien","Prévost","Millet","Perrot","Daniel","Le RouxRoux","Cousin","Germain","Breton","Besson","Langlois","Rémi","Le GoffGoff","Pelletier","Lévêque","Perrier","Leblanc","Barré","Lebrun","Marchal","Weber","Mallet","Hamon","Boulanger","Jacob","Monnier","Michaud","Rodríguez","Guichard","Gillet","Étienne","Grondin","Poulain","Tessier","Chevallier","Collin","Chauvin","Da SilvaSilva","Bouchet","Gay","Lemaître","Bénard","Maréchal","Humbert","Reynaud","Antoine","Hoarau","Perret","Barthélemy","Cordier","Pichon","Lejeune","Gilbert","Lamy","Delaunay","Pasquier","Carlier","LaporteLaporte"]},postcodeAreas:[{code:"AB"},{code:"AL"},{code:"B"},{code:"BA"},{code:"BB"},{code:"BD"},{code:"BH"},{code:"BL"},{code:"BN"},{code:"BR"},{code:"BS"},{code:"BT"},{code:"CA"},{code:"CB"},{code:"CF"},{code:"CH"},{code:"CM"},{code:"CO"},{code:"CR"},{code:"CT"},{code:"CV"},{code:"CW"},{code:"DA"},{code:"DD"},{code:"DE"},{code:"DG"},{code:"DH"},{code:"DL"},{code:"DN"},{code:"DT"},{code:"DY"},{code:"E"},{code:"EC"},{code:"EH"},{code:"EN"},{code:"EX"},{code:"FK"},{code:"FY"},{code:"G"},{code:"GL"},{code:"GU"},{code:"GY"},{code:"HA"},{code:"HD"},{code:"HG"},{code:"HP"},{code:"HR"},{code:"HS"},{code:"HU"},{code:"HX"},{code:"IG"},{code:"IM"},{code:"IP"},{code:"IV"},{code:"JE"},{code:"KA"},{code:"KT"},{code:"KW"},{code:"KY"},{code:"L"},{code:"LA"},{code:"LD"},{code:"LE"},{code:"LL"},{code:"LN"},{code:"LS"},{code:"LU"},{code:"M"},{code:"ME"},{code:"MK"},{code:"ML"},{code:"N"},{code:"NE"},{code:"NG"},{code:"NN"},{code:"NP"},{code:"NR"},{code:"NW"},{code:"OL"},{code:"OX"},{code:"PA"},{code:"PE"},{code:"PH"},{code:"PL"},{code:"PO"},{code:"PR"},{code:"RG"},{code:"RH"},{code:"RM"},{code:"S"},{code:"SA"},{code:"SE"},{code:"SG"},{code:"SK"},{code:"SL"},{code:"SM"},{code:"SN"},{code:"SO"},{code:"SP"},{code:"SR"},{code:"SS"},{code:"ST"},{code:"SW"},{code:"SY"},{code:"TA"},{code:"TD"},{code:"TF"},{code:"TN"},{code:"TQ"},{code:"TR"},{code:"TS"},{code:"TW"},{code:"UB"},{code:"W"},{code:"WA"},{code:"WC"},{code:"WD"},{code:"WF"},{code:"WN"},{code:"WR"},{code:"WS"},{code:"WV"},{code:"YO"},{code:"ZE"}],countries:[{name:"Afghanistan",abbreviation:"AF"},{name:"Åland Islands",abbreviation:"AX"},{name:"Albania",abbreviation:"AL"},{name:"Algeria",abbreviation:"DZ"},{name:"American Samoa",abbreviation:"AS"},{name:"Andorra",abbreviation:"AD"},{name:"Angola",abbreviation:"AO"},{name:"Anguilla",abbreviation:"AI"},{name:"Antarctica",abbreviation:"AQ"},{name:"Antigua & Barbuda",abbreviation:"AG"},{name:"Argentina",abbreviation:"AR"},{name:"Armenia",abbreviation:"AM"},{name:"Aruba",abbreviation:"AW"},{name:"Ascension Island",abbreviation:"AC"},{name:"Australia",abbreviation:"AU"},{name:"Austria",abbreviation:"AT"},{name:"Azerbaijan",abbreviation:"AZ"},{name:"Bahamas",abbreviation:"BS"},{name:"Bahrain",abbreviation:"BH"},{name:"Bangladesh",abbreviation:"BD"},{name:"Barbados",abbreviation:"BB"},{name:"Belarus",abbreviation:"BY"},{name:"Belgium",abbreviation:"BE"},{name:"Belize",abbreviation:"BZ"},{name:"Benin",abbreviation:"BJ"},{name:"Bermuda",abbreviation:"BM"},{name:"Bhutan",abbreviation:"BT"},{name:"Bolivia",abbreviation:"BO"},{name:"Bosnia & Herzegovina",abbreviation:"BA"},{name:"Botswana",abbreviation:"BW"},{name:"Brazil",abbreviation:"BR"},{name:"British Indian Ocean Territory",abbreviation:"IO"},{name:"British Virgin Islands",abbreviation:"VG"},{name:"Brunei",abbreviation:"BN"},{name:"Bulgaria",abbreviation:"BG"},{name:"Burkina Faso",abbreviation:"BF"},{name:"Burundi",abbreviation:"BI"},{name:"Cambodia",abbreviation:"KH"},{name:"Cameroon",abbreviation:"CM"},{name:"Canada",abbreviation:"CA"},{name:"Canary Islands",abbreviation:"IC"},{name:"Cape Verde",abbreviation:"CV"},{name:"Caribbean Netherlands",abbreviation:"BQ"},{name:"Cayman Islands",abbreviation:"KY"},{name:"Central African Republic",abbreviation:"CF"},{name:"Ceuta & Melilla",abbreviation:"EA"},{name:"Chad",abbreviation:"TD"},{name:"Chile",abbreviation:"CL"},{name:"China",abbreviation:"CN"},{name:"Christmas Island",abbreviation:"CX"},{name:"Cocos (Keeling) Islands",abbreviation:"CC"},{name:"Colombia",abbreviation:"CO"},{name:"Comoros",abbreviation:"KM"},{name:"Congo - Brazzaville",abbreviation:"CG"},{name:"Congo - Kinshasa",abbreviation:"CD"},{name:"Cook Islands",abbreviation:"CK"},{name:"Costa Rica",abbreviation:"CR"},{name:"Côte d'Ivoire",abbreviation:"CI"},{name:"Croatia",abbreviation:"HR"},{name:"Cuba",abbreviation:"CU"},{name:"Curaçao",abbreviation:"CW"},{name:"Cyprus",abbreviation:"CY"},{name:"Czech Republic",abbreviation:"CZ"},{name:"Denmark",abbreviation:"DK"},{name:"Diego Garcia",abbreviation:"DG"},{name:"Djibouti",abbreviation:"DJ"},{name:"Dominica",abbreviation:"DM"},{name:"Dominican Republic",abbreviation:"DO"},{name:"Ecuador",abbreviation:"EC"},{name:"Egypt",abbreviation:"EG"},{name:"El Salvador",abbreviation:"SV"},{name:"Equatorial Guinea",abbreviation:"GQ"},{name:"Eritrea",abbreviation:"ER"},{name:"Estonia",abbreviation:"EE"},{name:"Ethiopia",abbreviation:"ET"},{name:"Falkland Islands",abbreviation:"FK"},{name:"Faroe Islands",abbreviation:"FO"},{name:"Fiji",abbreviation:"FJ"},{name:"Finland",abbreviation:"FI"},{name:"France",abbreviation:"FR"},{name:"French Guiana",abbreviation:"GF"},{name:"French Polynesia",abbreviation:"PF"},{name:"French Southern Territories",abbreviation:"TF"},{name:"Gabon",abbreviation:"GA"},{name:"Gambia",abbreviation:"GM"},{name:"Georgia",abbreviation:"GE"},{name:"Germany",abbreviation:"DE"},{name:"Ghana",abbreviation:"GH"},{name:"Gibraltar",abbreviation:"GI"},{name:"Greece",abbreviation:"GR"},{name:"Greenland",abbreviation:"GL"},{name:"Grenada",abbreviation:"GD"},{name:"Guadeloupe",abbreviation:"GP"},{name:"Guam",abbreviation:"GU"},{name:"Guatemala",abbreviation:"GT"},{name:"Guernsey",abbreviation:"GG"},{name:"Guinea",abbreviation:"GN"},{name:"Guinea-Bissau",abbreviation:"GW"},{name:"Guyana",abbreviation:"GY"},{name:"Haiti",abbreviation:"HT"},{name:"Honduras",abbreviation:"HN"},{name:"Hong Kong SAR China",abbreviation:"HK"},{name:"Hungary",abbreviation:"HU"},{name:"Iceland",abbreviation:"IS"},{name:"India",abbreviation:"IN"},{name:"Indonesia",abbreviation:"ID"},{name:"Iran",abbreviation:"IR"},{name:"Iraq",abbreviation:"IQ"},{name:"Ireland",abbreviation:"IE"},{name:"Isle of Man",abbreviation:"IM"},{name:"Israel",abbreviation:"IL"},{name:"Italy",abbreviation:"IT"},{name:"Jamaica",abbreviation:"JM"},{name:"Japan",abbreviation:"JP"},{name:"Jersey",abbreviation:"JE"},{name:"Jordan",abbreviation:"JO"},{name:"Kazakhstan",abbreviation:"KZ"},{name:"Kenya",abbreviation:"KE"},{name:"Kiribati",abbreviation:"KI"},{name:"Kosovo",abbreviation:"XK"},{name:"Kuwait",abbreviation:"KW"},{name:"Kyrgyzstan",abbreviation:"KG"},{name:"Laos",abbreviation:"LA"},{name:"Latvia",abbreviation:"LV"},{name:"Lebanon",abbreviation:"LB"},{name:"Lesotho",abbreviation:"LS"},{name:"Liberia",abbreviation:"LR"},{name:"Libya",abbreviation:"LY"},{name:"Liechtenstein",abbreviation:"LI"},{name:"Lithuania",abbreviation:"LT"},{name:"Luxembourg",abbreviation:"LU"},{name:"Macau SAR China",abbreviation:"MO"},{name:"Macedonia",abbreviation:"MK"},{name:"Madagascar",abbreviation:"MG"},{name:"Malawi",abbreviation:"MW"},{name:"Malaysia",abbreviation:"MY"},{name:"Maldives",abbreviation:"MV"},{name:"Mali",abbreviation:"ML"},{name:"Malta",abbreviation:"MT"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Martinique",abbreviation:"MQ"},{name:"Mauritania",abbreviation:"MR"},{name:"Mauritius",abbreviation:"MU"},{name:"Mayotte",abbreviation:"YT"},{name:"Mexico",abbreviation:"MX"},{name:"Micronesia",abbreviation:"FM"},{name:"Moldova",abbreviation:"MD"},{name:"Monaco",abbreviation:"MC"},{name:"Mongolia",abbreviation:"MN"},{name:"Montenegro",abbreviation:"ME"},{name:"Montserrat",abbreviation:"MS"},{name:"Morocco",abbreviation:"MA"},{name:"Mozambique",abbreviation:"MZ"},{name:"Myanmar (Burma)",abbreviation:"MM"},{name:"Namibia",abbreviation:"NA"},{name:"Nauru",abbreviation:"NR"},{name:"Nepal",abbreviation:"NP"},{name:"Netherlands",abbreviation:"NL"},{name:"New Caledonia",abbreviation:"NC"},{name:"New Zealand",abbreviation:"NZ"},{name:"Nicaragua",abbreviation:"NI"},{name:"Niger",abbreviation:"NE"},{name:"Nigeria",abbreviation:"NG"},{name:"Niue",abbreviation:"NU"},{name:"Norfolk Island",abbreviation:"NF"},{name:"North Korea",abbreviation:"KP"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Norway",abbreviation:"NO"},{name:"Oman",abbreviation:"OM"},{name:"Pakistan",abbreviation:"PK"},{name:"Palau",abbreviation:"PW"},{name:"Palestinian Territories",abbreviation:"PS"},{name:"Panama",abbreviation:"PA"},{name:"Papua New Guinea",abbreviation:"PG"},{name:"Paraguay",abbreviation:"PY"},{name:"Peru",abbreviation:"PE"},{name:"Philippines",abbreviation:"PH"},{name:"Pitcairn Islands",abbreviation:"PN"},{name:"Poland",abbreviation:"PL"},{name:"Portugal",abbreviation:"PT"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Qatar",abbreviation:"QA"},{name:"Réunion",abbreviation:"RE"},{name:"Romania",abbreviation:"RO"},{name:"Russia",abbreviation:"RU"},{name:"Rwanda",abbreviation:"RW"},{name:"Samoa",abbreviation:"WS"},{name:"San Marino",abbreviation:"SM"},{name:"São Tomé and Príncipe",abbreviation:"ST"},{name:"Saudi Arabia",abbreviation:"SA"},{name:"Senegal",abbreviation:"SN"},{name:"Serbia",abbreviation:"RS"},{name:"Seychelles",abbreviation:"SC"},{name:"Sierra Leone",abbreviation:"SL"},{name:"Singapore",abbreviation:"SG"},{name:"Sint Maarten",abbreviation:"SX"},{name:"Slovakia",abbreviation:"SK"},{name:"Slovenia",abbreviation:"SI"},{name:"Solomon Islands",abbreviation:"SB"},{name:"Somalia",abbreviation:"SO"},{name:"South Africa",abbreviation:"ZA"},{name:"South Georgia & South Sandwich Islands",abbreviation:"GS"},{name:"South Korea",abbreviation:"KR"},{name:"South Sudan",abbreviation:"SS"},{name:"Spain",abbreviation:"ES"},{name:"Sri Lanka",abbreviation:"LK"},{name:"St. Barthélemy",abbreviation:"BL"},{name:"St. Helena",abbreviation:"SH"},{name:"St. Kitts & Nevis",abbreviation:"KN"},{name:"St. Lucia",abbreviation:"LC"},{name:"St. Martin",abbreviation:"MF"},{name:"St. Pierre & Miquelon",abbreviation:"PM"},{name:"St. Vincent & Grenadines",abbreviation:"VC"},{name:"Sudan",abbreviation:"SD"},{name:"Suriname",abbreviation:"SR"},{name:"Svalbard & Jan Mayen",abbreviation:"SJ"},{name:"Swaziland",abbreviation:"SZ"},{name:"Sweden",abbreviation:"SE"},{name:"Switzerland",abbreviation:"CH"},{name:"Syria",abbreviation:"SY"},{name:"Taiwan",abbreviation:"TW"},{name:"Tajikistan",abbreviation:"TJ"},{name:"Tanzania",abbreviation:"TZ"},{name:"Thailand",abbreviation:"TH"},{name:"Timor-Leste",abbreviation:"TL"},{name:"Togo",abbreviation:"TG"},{name:"Tokelau",abbreviation:"TK"},{name:"Tonga",abbreviation:"TO"},{name:"Trinidad & Tobago",abbreviation:"TT"},{name:"Tristan da Cunha",abbreviation:"TA"},{name:"Tunisia",abbreviation:"TN"},{name:"Turkey",abbreviation:"TR"},{name:"Turkmenistan",abbreviation:"TM"},{name:"Turks & Caicos Islands",abbreviation:"TC"},{name:"Tuvalu",abbreviation:"TV"},{name:"U.S. Outlying Islands",abbreviation:"UM"},{name:"U.S. Virgin Islands",abbreviation:"VI"},{name:"Uganda",abbreviation:"UG"},{name:"Ukraine",abbreviation:"UA"},{name:"United Arab Emirates",abbreviation:"AE"},{name:"United Kingdom",abbreviation:"GB"},{name:"United States",abbreviation:"US"},{name:"Uruguay",abbreviation:"UY"},{name:"Uzbekistan",abbreviation:"UZ"},{name:"Vanuatu",abbreviation:"VU"},{name:"Vatican City",abbreviation:"VA"},{name:"Venezuela",abbreviation:"VE"},{name:"Vietnam",abbreviation:"VN"},{name:"Wallis & Futuna",abbreviation:"WF"},{name:"Western Sahara",abbreviation:"EH"},{name:"Yemen",abbreviation:"YE"},{name:"Zambia",abbreviation:"ZM"},{name:"Zimbabwe",abbreviation:"ZW"}],counties:{uk:[{name:"Bath and North East Somerset"},{name:"Aberdeenshire"},{name:"Anglesey"},{name:"Angus"},{name:"Bedford"},{name:"Blackburn with Darwen"},{name:"Blackpool"},{name:"Bournemouth"},{name:"Bracknell Forest"},{name:"Brighton & Hove"},{name:"Bristol"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Carmarthenshire"},{name:"Central Bedfordshire"},{name:"Ceredigion"},{name:"Cheshire East"},{name:"Cheshire West and Chester"},{name:"Clackmannanshire"},{name:"Conwy"},{name:"Cornwall"},{name:"County Antrim"},{name:"County Armagh"},{name:"County Down"},{name:"County Durham"},{name:"County Fermanagh"},{name:"County Londonderry"},{name:"County Tyrone"},{name:"Cumbria"},{name:"Darlington"},{name:"Denbighshire"},{name:"Derby"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Dumfries and Galloway"},{name:"Dundee"},{name:"East Lothian"},{name:"East Riding of Yorkshire"},{name:"East Sussex"},{name:"Edinburgh?"},{name:"Essex"},{name:"Falkirk"},{name:"Fife"},{name:"Flintshire"},{name:"Gloucestershire"},{name:"Greater London"},{name:"Greater Manchester"},{name:"Gwent"},{name:"Gwynedd"},{name:"Halton"},{name:"Hampshire"},{name:"Hartlepool"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Highlands"},{name:"Hull"},{name:"Isle of Wight"},{name:"Isles of Scilly"},{name:"Kent"},{name:"Lancashire"},{name:"Leicester"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"Lothian"},{name:"Luton"},{name:"Medway"},{name:"Merseyside"},{name:"Mid Glamorgan"},{name:"Middlesbrough"},{name:"Milton Keynes"},{name:"Monmouthshire"},{name:"Moray"},{name:"Norfolk"},{name:"North East Lincolnshire"},{name:"North Lincolnshire"},{name:"North Somerset"},{name:"North Yorkshire"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"Nottingham"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Pembrokeshire"},{name:"Perth and Kinross"},{name:"Peterborough"},{name:"Plymouth"},{name:"Poole"},{name:"Portsmouth"},{name:"Powys"},{name:"Reading"},{name:"Redcar and Cleveland"},{name:"Rutland"},{name:"Scottish Borders"},{name:"Shropshire"},{name:"Slough"},{name:"Somerset"},{name:"South Glamorgan"},{name:"South Gloucestershire"},{name:"South Yorkshire"},{name:"Southampton"},{name:"Southend-on-Sea"},{name:"Staffordshire"},{name:"Stirlingshire"},{name:"Stockton-on-Tees"},{name:"Stoke-on-Trent"},{name:"Strathclyde"},{name:"Suffolk"},{name:"Surrey"},{name:"Swindon"},{name:"Telford and Wrekin"},{name:"Thurrock"},{name:"Torbay"},{name:"Tyne and Wear"},{name:"Warrington"},{name:"Warwickshire"},{name:"West Berkshire"},{name:"West Glamorgan"},{name:"West Lothian"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Western Isles"},{name:"Wiltshire"},{name:"Windsor and Maidenhead"},{name:"Wokingham"},{name:"Worcestershire"},{name:"Wrexham"},{name:"York"}]},provinces:{ca:[{name:"Alberta",abbreviation:"AB"},{name:"British Columbia",abbreviation:"BC"},{name:"Manitoba",abbreviation:"MB"},{name:"New Brunswick",abbreviation:"NB"},{name:"Newfoundland and Labrador",abbreviation:"NL"},{name:"Nova Scotia",abbreviation:"NS"},{name:"Ontario",abbreviation:"ON"},{name:"Prince Edward Island",abbreviation:"PE"},{name:"Quebec",abbreviation:"QC"},{name:"Saskatchewan",abbreviation:"SK"},{name:"Northwest Territories",abbreviation:"NT"},{name:"Nunavut",abbreviation:"NU"},{name:"Yukon",abbreviation:"YT"}],it:[{name:"Agrigento",abbreviation:"AG",code:84},{name:"Alessandria",abbreviation:"AL",code:6},{name:"Ancona",abbreviation:"AN",code:42},{name:"Aosta",abbreviation:"AO",code:7},{name:"L'Aquila",abbreviation:"AQ",code:66},{name:"Arezzo",abbreviation:"AR",code:51},{name:"Ascoli-Piceno",abbreviation:"AP",code:44},{name:"Asti",abbreviation:"AT",code:5},{name:"Avellino",abbreviation:"AV",code:64},{name:"Bari",abbreviation:"BA",code:72},{name:"Barletta-Andria-Trani",abbreviation:"BT",code:72},{name:"Belluno",abbreviation:"BL",code:25},{name:"Benevento",abbreviation:"BN",code:62},{name:"Bergamo",abbreviation:"BG",code:16},{name:"Biella",abbreviation:"BI",code:96},{name:"Bologna",abbreviation:"BO",code:37},{name:"Bolzano",abbreviation:"BZ",code:21},{name:"Brescia",abbreviation:"BS",code:17},{name:"Brindisi",abbreviation:"BR",code:74},{name:"Cagliari",abbreviation:"CA",code:92},{name:"Caltanissetta",abbreviation:"CL",code:85},{name:"Campobasso",abbreviation:"CB",code:70},{name:"Carbonia Iglesias",abbreviation:"CI",code:70},{name:"Caserta",abbreviation:"CE",code:61},{name:"Catania",abbreviation:"CT",code:87},{name:"Catanzaro",abbreviation:"CZ",code:79},{name:"Chieti",abbreviation:"CH",code:69},{name:"Como",abbreviation:"CO",code:13},{name:"Cosenza",abbreviation:"CS",code:78},{name:"Cremona",abbreviation:"CR",code:19},{name:"Crotone",abbreviation:"KR",code:101},{name:"Cuneo",abbreviation:"CN",code:4},{name:"Enna",abbreviation:"EN",code:86},{name:"Fermo",abbreviation:"FM",code:86},{name:"Ferrara",abbreviation:"FE",code:38},{name:"Firenze",abbreviation:"FI",code:48},{name:"Foggia",abbreviation:"FG",code:71},{name:"Forli-Cesena",abbreviation:"FC",code:71},{name:"Frosinone",abbreviation:"FR",code:60},{name:"Genova",abbreviation:"GE",code:10},{name:"Gorizia",abbreviation:"GO",code:31},{name:"Grosseto",abbreviation:"GR",code:53},{name:"Imperia",abbreviation:"IM",code:8},{name:"Isernia",abbreviation:"IS",code:94},{name:"La-Spezia",abbreviation:"SP",code:66},{name:"Latina",abbreviation:"LT",code:59},{name:"Lecce",abbreviation:"LE",code:75},{name:"Lecco",abbreviation:"LC",code:97},{name:"Livorno",abbreviation:"LI",code:49},{name:"Lodi",abbreviation:"LO",code:98},{name:"Lucca",abbreviation:"LU",code:46},{name:"Macerata",abbreviation:"MC",code:43},{name:"Mantova",abbreviation:"MN",code:20},{name:"Massa-Carrara",abbreviation:"MS",code:45},{name:"Matera",abbreviation:"MT",code:77},{name:"Medio Campidano",abbreviation:"VS",code:77},{name:"Messina",abbreviation:"ME",code:83},{name:"Milano",abbreviation:"MI",code:15},{name:"Modena",abbreviation:"MO",code:36},{name:"Monza-Brianza",abbreviation:"MB",code:36},{name:"Napoli",abbreviation:"NA",code:63},{name:"Novara",abbreviation:"NO",code:3},{name:"Nuoro",abbreviation:"NU",code:91},{name:"Ogliastra",abbreviation:"OG",code:91},{name:"Olbia Tempio",abbreviation:"OT",code:91},{name:"Oristano",abbreviation:"OR",code:95},{name:"Padova",abbreviation:"PD",code:28},{name:"Palermo",abbreviation:"PA",code:82},{name:"Parma",abbreviation:"PR",code:34},{name:"Pavia",abbreviation:"PV",code:18},{name:"Perugia",abbreviation:"PG",code:54},{name:"Pesaro-Urbino",abbreviation:"PU",code:41},{name:"Pescara",abbreviation:"PE",code:68},{name:"Piacenza",abbreviation:"PC",code:33},{name:"Pisa",abbreviation:"PI",code:50},{name:"Pistoia",abbreviation:"PT",code:47},{name:"Pordenone",abbreviation:"PN",code:93},{name:"Potenza",abbreviation:"PZ",code:76},{name:"Prato",abbreviation:"PO",code:100},{name:"Ragusa",abbreviation:"RG",code:88},{name:"Ravenna",abbreviation:"RA",code:39},{name:"Reggio-Calabria",abbreviation:"RC",code:35},{name:"Reggio-Emilia",abbreviation:"RE",code:35},{name:"Rieti",abbreviation:"RI",code:57},{name:"Rimini",abbreviation:"RN",code:99},{name:"Roma",abbreviation:"Roma",code:58},{name:"Rovigo",abbreviation:"RO",code:29},{name:"Salerno",abbreviation:"SA",code:65},{name:"Sassari",abbreviation:"SS",code:90},{name:"Savona",abbreviation:"SV",code:9},{name:"Siena",abbreviation:"SI",code:52},{name:"Siracusa",abbreviation:"SR",code:89},{name:"Sondrio",abbreviation:"SO",code:14},{name:"Taranto",abbreviation:"TA",code:73},{name:"Teramo",abbreviation:"TE",code:67},{name:"Terni",abbreviation:"TR",code:55},{name:"Torino",abbreviation:"TO",code:1},{name:"Trapani",abbreviation:"TP",code:81},{name:"Trento",abbreviation:"TN",code:22},{name:"Treviso",abbreviation:"TV",code:26},{name:"Trieste",abbreviation:"TS",code:32},{name:"Udine",abbreviation:"UD",code:30},{name:"Varese",abbreviation:"VA",code:12},{name:"Venezia",abbreviation:"VE",code:27},{name:"Verbania",abbreviation:"VB",code:27},{name:"Vercelli",abbreviation:"VC",code:2},{name:"Verona",abbreviation:"VR",code:23},{name:"Vibo-Valentia",abbreviation:"VV",code:102},{name:"Vicenza",abbreviation:"VI",code:24},{name:"Viterbo",abbreviation:"VT",code:56}]},nationalities:[{name:"Afghan"},{name:"Albanian"},{name:"Algerian"},{name:"American"},{name:"Andorran"},{name:"Angolan"},{name:"Antiguans"},{name:"Argentinean"},{name:"Armenian"},{name:"Australian"},{name:"Austrian"},{name:"Azerbaijani"},{name:"Bahami"},{name:"Bahraini"},{name:"Bangladeshi"},{name:"Barbadian"},{name:"Barbudans"},{name:"Batswana"},{name:"Belarusian"},{name:"Belgian"},{name:"Belizean"},{name:"Beninese"},{name:"Bhutanese"},{name:"Bolivian"},{name:"Bosnian"},{name:"Brazilian"},{name:"British"},{name:"Bruneian"},{name:"Bulgarian"},{name:"Burkinabe"},{name:"Burmese"},{name:"Burundian"},{name:"Cambodian"},{name:"Cameroonian"},{name:"Canadian"},{name:"Cape Verdean"},{name:"Central African"},{name:"Chadian"},{name:"Chilean"},{name:"Chinese"},{name:"Colombian"},{name:"Comoran"},{name:"Congolese"},{name:"Costa Rican"},{name:"Croatian"},{name:"Cuban"},{name:"Cypriot"},{name:"Czech"},{name:"Danish"},{name:"Djibouti"},{name:"Dominican"},{name:"Dutch"},{name:"East Timorese"},{name:"Ecuadorean"},{name:"Egyptian"},{name:"Emirian"},{name:"Equatorial Guinean"},{name:"Eritrean"},{name:"Estonian"},{name:"Ethiopian"},{name:"Fijian"},{name:"Filipino"},{name:"Finnish"},{name:"French"},{name:"Gabonese"},{name:"Gambian"},{name:"Georgian"},{name:"German"},{name:"Ghanaian"},{name:"Greek"},{name:"Grenadian"},{name:"Guatemalan"},{name:"Guinea-Bissauan"},{name:"Guinean"},{name:"Guyanese"},{name:"Haitian"},{name:"Herzegovinian"},{name:"Honduran"},{name:"Hungarian"},{name:"I-Kiribati"},{name:"Icelander"},{name:"Indian"},{name:"Indonesian"},{name:"Iranian"},{name:"Iraqi"},{name:"Irish"},{name:"Israeli"},{name:"Italian"},{name:"Ivorian"},{name:"Jamaican"},{name:"Japanese"},{name:"Jordanian"},{name:"Kazakhstani"},{name:"Kenyan"},{name:"Kittian and Nevisian"},{name:"Kuwaiti"},{name:"Kyrgyz"},{name:"Laotian"},{name:"Latvian"},{name:"Lebanese"},{name:"Liberian"},{name:"Libyan"},{name:"Liechtensteiner"},{name:"Lithuanian"},{name:"Luxembourger"},{name:"Macedonian"},{name:"Malagasy"},{name:"Malawian"},{name:"Malaysian"},{name:"Maldivan"},{name:"Malian"},{name:"Maltese"},{name:"Marshallese"},{name:"Mauritanian"},{name:"Mauritian"},{name:"Mexican"},{name:"Micronesian"},{name:"Moldovan"},{name:"Monacan"},{name:"Mongolian"},{name:"Moroccan"},{name:"Mosotho"},{name:"Motswana"},{name:"Mozambican"},{name:"Namibian"},{name:"Nauruan"},{name:"Nepalese"},{name:"New Zealander"},{name:"Nicaraguan"},{name:"Nigerian"},{name:"Nigerien"},{name:"North Korean"},{name:"Northern Irish"},{name:"Norwegian"},{name:"Omani"},{name:"Pakistani"},{name:"Palauan"},{name:"Panamanian"},{name:"Papua New Guinean"},{name:"Paraguayan"},{name:"Peruvian"},{name:"Polish"},{name:"Portuguese"},{name:"Qatari"},{name:"Romani"},{name:"Russian"},{name:"Rwandan"},{name:"Saint Lucian"},{name:"Salvadoran"},{name:"Samoan"},{name:"San Marinese"},{name:"Sao Tomean"},{name:"Saudi"},{name:"Scottish"},{name:"Senegalese"},{name:"Serbian"},{name:"Seychellois"},{name:"Sierra Leonean"},{name:"Singaporean"},{name:"Slovakian"},{name:"Slovenian"},{name:"Solomon Islander"},{name:"Somali"},{name:"South African"},{name:"South Korean"},{name:"Spanish"},{name:"Sri Lankan"},{name:"Sudanese"},{name:"Surinamer"},{name:"Swazi"},{name:"Swedish"},{name:"Swiss"},{name:"Syrian"},{name:"Taiwanese"},{name:"Tajik"},{name:"Tanzanian"},{name:"Thai"},{name:"Togolese"},{name:"Tongan"},{name:"Trinidadian or Tobagonian"},{name:"Tunisian"},{name:"Turkish"},{name:"Tuvaluan"},{name:"Ugandan"},{name:"Ukrainian"},{name:"Uruguaya"},{name:"Uzbekistani"},{name:"Venezuela"},{name:"Vietnamese"},{name:"Wels"},{name:"Yemenit"},{name:"Zambia"},{name:"Zimbabwe"}],locale_languages:["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"],locale_regions:["agq-CM","asa-TZ","ast-ES","bas-CM","bem-ZM","bez-TZ","brx-IN","cgg-UG","chr-US","dav-KE","dje-NE","dsb-DE","dua-CM","dyo-SN","ebu-KE","ewo-CM","fil-PH","fur-IT","gsw-CH","gsw-FR","gsw-LI","guz-KE","haw-US","hsb-DE","jgo-CM","jmc-TZ","kab-DZ","kam-KE","kde-TZ","kea-CV","khq-ML","kkj-CM","kln-KE","kok-IN","ksb-TZ","ksf-CM","ksh-DE","lag-TZ","lkt-US","luo-KE","luy-KE","mas-KE","mas-TZ","mer-KE","mfe-MU","mgh-MZ","mgo-CM","mua-CM","naq-NA","nmg-CM","nnh-CM","nus-SD","nyn-UG","rof-TZ","rwk-TZ","sah-RU","saq-KE","sbp-TZ","seh-MZ","ses-ML","shi-Latn","shi-Latn-MA","shi-Tfng","shi-Tfng-MA","smn-FI","teo-KE","teo-UG","twq-NE","tzm-Latn","tzm-Latn-MA","vai-Latn","vai-Latn-LR","vai-Vaii","vai-Vaii-LR","vun-TZ","wae-CH","xog-UG","yav-CM","zgh-MA","af-NA","af-ZA","ak-GH","am-ET","ar-001","ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-EH","ar-ER","ar-IL","ar-IQ","ar-JO","ar-KM","ar-KW","ar-LB","ar-LY","ar-MA","ar-MR","ar-OM","ar-PS","ar-QA","ar-SA","ar-SD","ar-SO","ar-SS","ar-SY","ar-TD","ar-TN","ar-YE","as-IN","az-Cyrl","az-Cyrl-AZ","az-Latn","az-Latn-AZ","be-BY","bg-BG","bm-Latn","bm-Latn-ML","bn-BD","bn-IN","bo-CN","bo-IN","br-FR","bs-Cyrl","bs-Cyrl-BA","bs-Latn","bs-Latn-BA","ca-AD","ca-ES","ca-ES-VALENCIA","ca-FR","ca-IT","cs-CZ","cy-GB","da-DK","da-GL","de-AT","de-BE","de-CH","de-DE","de-LI","de-LU","dz-BT","ee-GH","ee-TG","el-CY","el-GR","en-001","en-150","en-AG","en-AI","en-AS","en-AU","en-BB","en-BE","en-BM","en-BS","en-BW","en-BZ","en-CA","en-CC","en-CK","en-CM","en-CX","en-DG","en-DM","en-ER","en-FJ","en-FK","en-FM","en-GB","en-GD","en-GG","en-GH","en-GI","en-GM","en-GU","en-GY","en-HK","en-IE","en-IM","en-IN","en-IO","en-JE","en-JM","en-KE","en-KI","en-KN","en-KY","en-LC","en-LR","en-LS","en-MG","en-MH","en-MO","en-MP","en-MS","en-MT","en-MU","en-MW","en-MY","en-NA","en-NF","en-NG","en-NR","en-NU","en-NZ","en-PG","en-PH","en-PK","en-PN","en-PR","en-PW","en-RW","en-SB","en-SC","en-SD","en-SG","en-SH","en-SL","en-SS","en-SX","en-SZ","en-TC","en-TK","en-TO","en-TT","en-TV","en-TZ","en-UG","en-UM","en-US","en-US-POSIX","en-VC","en-VG","en-VI","en-VU","en-WS","en-ZA","en-ZM","en-ZW","eo-001","es-419","es-AR","es-BO","es-CL","es-CO","es-CR","es-CU","es-DO","es-EA","es-EC","es-ES","es-GQ","es-GT","es-HN","es-IC","es-MX","es-NI","es-PA","es-PE","es-PH","es-PR","es-PY","es-SV","es-US","es-UY","es-VE","et-EE","eu-ES","fa-AF","fa-IR","ff-CM","ff-GN","ff-MR","ff-SN","fi-FI","fo-FO","fr-BE","fr-BF","fr-BI","fr-BJ","fr-BL","fr-CA","fr-CD","fr-CF","fr-CG","fr-CH","fr-CI","fr-CM","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GF","fr-GN","fr-GP","fr-GQ","fr-HT","fr-KM","fr-LU","fr-MA","fr-MC","fr-MF","fr-MG","fr-ML","fr-MQ","fr-MR","fr-MU","fr-NC","fr-NE","fr-PF","fr-PM","fr-RE","fr-RW","fr-SC","fr-SN","fr-SY","fr-TD","fr-TG","fr-TN","fr-VU","fr-WF","fr-YT","fy-NL","ga-IE","gd-GB","gl-ES","gu-IN","gv-IM","ha-Latn","ha-Latn-GH","ha-Latn-NE","ha-Latn-NG","he-IL","hi-IN","hr-BA","hr-HR","hu-HU","hy-AM","id-ID","ig-NG","ii-CN","is-IS","it-CH","it-IT","it-SM","ja-JP","ka-GE","ki-KE","kk-Cyrl","kk-Cyrl-KZ","kl-GL","km-KH","kn-IN","ko-KP","ko-KR","ks-Arab","ks-Arab-IN","kw-GB","ky-Cyrl","ky-Cyrl-KG","lb-LU","lg-UG","ln-AO","ln-CD","ln-CF","ln-CG","lo-LA","lt-LT","lu-CD","lv-LV","mg-MG","mk-MK","ml-IN","mn-Cyrl","mn-Cyrl-MN","mr-IN","ms-Latn","ms-Latn-BN","ms-Latn-MY","ms-Latn-SG","mt-MT","my-MM","nb-NO","nb-SJ","nd-ZW","ne-IN","ne-NP","nl-AW","nl-BE","nl-BQ","nl-CW","nl-NL","nl-SR","nl-SX","nn-NO","om-ET","om-KE","or-IN","os-GE","os-RU","pa-Arab","pa-Arab-PK","pa-Guru","pa-Guru-IN","pl-PL","ps-AF","pt-AO","pt-BR","pt-CV","pt-GW","pt-MO","pt-MZ","pt-PT","pt-ST","pt-TL","qu-BO","qu-EC","qu-PE","rm-CH","rn-BI","ro-MD","ro-RO","ru-BY","ru-KG","ru-KZ","ru-MD","ru-RU","ru-UA","rw-RW","se-FI","se-NO","se-SE","sg-CF","si-LK","sk-SK","sl-SI","sn-ZW","so-DJ","so-ET","so-KE","so-SO","sq-AL","sq-MK","sq-XK","sr-Cyrl","sr-Cyrl-BA","sr-Cyrl-ME","sr-Cyrl-RS","sr-Cyrl-XK","sr-Latn","sr-Latn-BA","sr-Latn-ME","sr-Latn-RS","sr-Latn-XK","sv-AX","sv-FI","sv-SE","sw-CD","sw-KE","sw-TZ","sw-UG","ta-IN","ta-LK","ta-MY","ta-SG","te-IN","th-TH","ti-ER","ti-ET","to-TO","tr-CY","tr-TR","ug-Arab","ug-Arab-CN","uk-UA","ur-IN","ur-PK","uz-Arab","uz-Arab-AF","uz-Cyrl","uz-Cyrl-UZ","uz-Latn","uz-Latn-UZ","vi-VN","yi-001","yo-BJ","yo-NG","zh-Hans","zh-Hans-CN","zh-Hans-HK","zh-Hans-MO","zh-Hans-SG","zh-Hant","zh-Hant-HK","zh-Hant-MO","zh-Hant-TW","zu-ZA"],us_states_and_dc:[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"District of Columbia",abbreviation:"DC"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}],territories:[{name:"American Samoa",abbreviation:"AS"},{name:"Federated States of Micronesia",abbreviation:"FM"},{name:"Guam",abbreviation:"GU"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Virgin Islands, U.S.",abbreviation:"VI"}],armed_forces:[{name:"Armed Forces Europe",abbreviation:"AE"},{name:"Armed Forces Pacific",abbreviation:"AP"},{name:"Armed Forces the Americas",abbreviation:"AA"}],country_regions:{it:[{name:"Valle d'Aosta",abbreviation:"VDA"},{name:"Piemonte",abbreviation:"PIE"},{name:"Lombardia",abbreviation:"LOM"},{name:"Veneto",abbreviation:"VEN"},{name:"Trentino Alto Adige",abbreviation:"TAA"},{name:"Friuli Venezia Giulia",abbreviation:"FVG"},{name:"Liguria",abbreviation:"LIG"},{name:"Emilia Romagna",abbreviation:"EMR"},{name:"Toscana",abbreviation:"TOS"},{name:"Umbria",abbreviation:"UMB"},{name:"Marche",abbreviation:"MAR"},{name:"Abruzzo",abbreviation:"ABR"},{name:"Lazio",abbreviation:"LAZ"},{name:"Campania",abbreviation:"CAM"},{name:"Puglia",abbreviation:"PUG"},{name:"Basilicata",abbreviation:"BAS"},{name:"Molise",abbreviation:"MOL"},{name:"Calabria",abbreviation:"CAL"},{name:"Sicilia",abbreviation:"SIC"},{name:"Sardegna",abbreviation:"SAR"}],mx:[{name:"Aguascalientes",abbreviation:"AGU"},{name:"Baja California",abbreviation:"BCN"},{name:"Baja California Sur",abbreviation:"BCS"},{name:"Campeche",abbreviation:"CAM"},{name:"Chiapas",abbreviation:"CHP"},{name:"Chihuahua",abbreviation:"CHH"},{name:"Ciudad de México",abbreviation:"DIF"},{name:"Coahuila",abbreviation:"COA"},{name:"Colima",abbreviation:"COL"},{name:"Durango",abbreviation:"DUR"},{name:"Guanajuato",abbreviation:"GUA"},{name:"Guerrero",abbreviation:"GRO"},{name:"Hidalgo",abbreviation:"HID"},{name:"Jalisco",abbreviation:"JAL"},{name:"México",abbreviation:"MEX"},{name:"Michoacán",abbreviation:"MIC"},{name:"Morelos",abbreviation:"MOR"},{name:"Nayarit",abbreviation:"NAY"},{name:"Nuevo León",abbreviation:"NLE"},{name:"Oaxaca",abbreviation:"OAX"},{name:"Puebla",abbreviation:"PUE"},{name:"Querétaro",abbreviation:"QUE"},{name:"Quintana Roo",abbreviation:"ROO"},{name:"San Luis Potosí",abbreviation:"SLP"},{name:"Sinaloa",abbreviation:"SIN"},{name:"Sonora",abbreviation:"SON"},{name:"Tabasco",abbreviation:"TAB"},{name:"Tamaulipas",abbreviation:"TAM"},{name:"Tlaxcala",abbreviation:"TLA"},{name:"Veracruz",abbreviation:"VER"},{name:"Yucatán",abbreviation:"YUC"},{name:"Zacatecas",abbreviation:"ZAC"}]},street_suffixes:{us:[{name:"Avenue",abbreviation:"Ave"},{name:"Boulevard",abbreviation:"Blvd"},{name:"Center",abbreviation:"Ctr"},{name:"Circle",abbreviation:"Cir"},{name:"Court",abbreviation:"Ct"},{name:"Drive",abbreviation:"Dr"},{name:"Extension",abbreviation:"Ext"},{name:"Glen",abbreviation:"Gln"},{name:"Grove",abbreviation:"Grv"},{name:"Heights",abbreviation:"Hts"},{name:"Highway",abbreviation:"Hwy"},{name:"Junction",abbreviation:"Jct"},{name:"Key",abbreviation:"Key"},{name:"Lane",abbreviation:"Ln"},{name:"Loop",abbreviation:"Loop"},{name:"Manor",abbreviation:"Mnr"},{name:"Mill",abbreviation:"Mill"},{name:"Park",abbreviation:"Park"},{name:"Parkway",abbreviation:"Pkwy"},{name:"Pass",abbreviation:"Pass"},{name:"Path",abbreviation:"Path"},{name:"Pike",abbreviation:"Pike"},{name:"Place",abbreviation:"Pl"},{name:"Plaza",abbreviation:"Plz"},{name:"Point",abbreviation:"Pt"},{name:"Ridge",abbreviation:"Rdg"},{name:"River",abbreviation:"Riv"},{name:"Road",abbreviation:"Rd"},{name:"Square",abbreviation:"Sq"},{name:"Street",abbreviation:"St"},{name:"Terrace",abbreviation:"Ter"},{name:"Trail",abbreviation:"Trl"},{name:"Turnpike",abbreviation:"Tpke"},{name:"View",abbreviation:"Vw"},{name:"Way",abbreviation:"Way"}],it:[{name:"Accesso",abbreviation:"Acc."},{name:"Alzaia",abbreviation:"Alz."},{name:"Arco",abbreviation:"Arco"},{name:"Archivolto",abbreviation:"Acv."},{name:"Arena",abbreviation:"Arena"},{name:"Argine",abbreviation:"Argine"},{name:"Bacino",abbreviation:"Bacino"},{name:"Banchi",abbreviation:"Banchi"},{name:"Banchina",abbreviation:"Ban."},{name:"Bastioni",abbreviation:"Bas."},{name:"Belvedere",abbreviation:"Belv."},{name:"Borgata",abbreviation:"B.ta"},{name:"Borgo",abbreviation:"B.go"},{name:"Calata",abbreviation:"Cal."},{name:"Calle",abbreviation:"Calle"},{name:"Campiello",abbreviation:"Cam."},{name:"Campo",abbreviation:"Cam."},{name:"Canale",abbreviation:"Can."},{name:"Carraia",abbreviation:"Carr."},{name:"Cascina",abbreviation:"Cascina"},{name:"Case sparse",abbreviation:"c.s."},{name:"Cavalcavia",abbreviation:"Cv."},{name:"Circonvallazione",abbreviation:"Cv."},{name:"Complanare",abbreviation:"C.re"},{name:"Contrada",abbreviation:"C.da"},{name:"Corso",abbreviation:"C.so"},{name:"Corte",abbreviation:"C.te"},{name:"Cortile",abbreviation:"C.le"},{name:"Diramazione",abbreviation:"Dir."},{name:"Fondaco",abbreviation:"F.co"},{name:"Fondamenta",abbreviation:"F.ta"},{name:"Fondo",abbreviation:"F.do"},{name:"Frazione",abbreviation:"Fr."},{name:"Isola",abbreviation:"Is."},{name:"Largo",abbreviation:"L.go"},{name:"Litoranea",abbreviation:"Lit."},{name:"Lungolago",abbreviation:"L.go lago"},{name:"Lungo Po",abbreviation:"l.go Po"},{name:"Molo",abbreviation:"Molo"},{name:"Mura",abbreviation:"Mura"},{name:"Passaggio privato",abbreviation:"pass. priv."},{name:"Passeggiata",abbreviation:"Pass."},{name:"Piazza",abbreviation:"P.zza"},{name:"Piazzale",abbreviation:"P.le"},{name:"Ponte",abbreviation:"P.te"},{name:"Portico",abbreviation:"P.co"},{name:"Rampa",abbreviation:"Rampa"},{name:"Regione",abbreviation:"Reg."},{name:"Rione",abbreviation:"R.ne"},{name:"Rio",abbreviation:"Rio"},{name:"Ripa",abbreviation:"Ripa"},{name:"Riva",abbreviation:"Riva"},{name:"Rondò",abbreviation:"Rondò"},{name:"Rotonda",abbreviation:"Rot."},{name:"Sagrato",abbreviation:"Sagr."},{name:"Salita",abbreviation:"Sal."},{name:"Scalinata",abbreviation:"Scal."},{name:"Scalone",abbreviation:"Scal."},{name:"Slargo",abbreviation:"Sl."},{name:"Sottoportico",abbreviation:"Sott."},{name:"Strada",abbreviation:"Str."},{name:"Stradale",abbreviation:"Str.le"},{name:"Strettoia",abbreviation:"Strett."},{name:"Traversa",abbreviation:"Trav."},{name:"Via",abbreviation:"V."},{name:"Viale",abbreviation:"V.le"},{name:"Vicinale",abbreviation:"Vic.le"},{name:"Vicolo",abbreviation:"Vic."}],uk:[{name:"Avenue",abbreviation:"Ave"},{name:"Close",abbreviation:"Cl"},{name:"Court",abbreviation:"Ct"},{name:"Crescent",abbreviation:"Cr"},{name:"Drive",abbreviation:"Dr"},{name:"Garden",abbreviation:"Gdn"},{name:"Gardens",abbreviation:"Gdns"},{name:"Green",abbreviation:"Gn"},{name:"Grove",abbreviation:"Gr"},{name:"Lane",abbreviation:"Ln"},{name:"Mount",abbreviation:"Mt"},{name:"Place",abbreviation:"Pl"},{name:"Park",abbreviation:"Pk"},{name:"Ridge",abbreviation:"Rdg"},{name:"Road",abbreviation:"Rd"},{name:"Square",abbreviation:"Sq"},{name:"Street",abbreviation:"St"},{name:"Terrace",abbreviation:"Ter"},{name:"Valley",abbreviation:"Val"}]},months:[{name:"January",short_name:"Jan",numeric:"01",days:31},{name:"February",short_name:"Feb",numeric:"02",days:28},{name:"March",short_name:"Mar",numeric:"03",days:31},{name:"April",short_name:"Apr",numeric:"04",days:30},{name:"May",short_name:"May",numeric:"05",days:31},{name:"June",short_name:"Jun",numeric:"06",days:30},{name:"July",short_name:"Jul",numeric:"07",days:31},{name:"August",short_name:"Aug",numeric:"08",days:31},{name:"September",short_name:"Sep",numeric:"09",days:30},{name:"October",short_name:"Oct",numeric:"10",days:31},{name:"November",short_name:"Nov",numeric:"11",days:30},{name:"December",short_name:"Dec",numeric:"12",days:31}],cc_types:[{name:"American Express",short_name:"amex",prefix:"34",length:15},{name:"Bankcard",short_name:"bankcard",prefix:"5610",length:16},{name:"China UnionPay",short_name:"chinaunion",prefix:"62",length:16},{name:"Diners Club Carte Blanche",short_name:"dccarte",prefix:"300",length:14},{name:"Diners Club enRoute",short_name:"dcenroute",prefix:"2014",length:15},{name:"Diners Club International",short_name:"dcintl",prefix:"36",length:14},{name:"Diners Club United States & Canada",short_name:"dcusc",prefix:"54",length:16},{name:"Discover Card",short_name:"discover",prefix:"6011",length:16},{name:"InstaPayment",short_name:"instapay",prefix:"637",length:16},{name:"JCB",short_name:"jcb",prefix:"3528",length:16},{name:"Laser",short_name:"laser",prefix:"6304",length:16},{name:"Maestro",short_name:"maestro",prefix:"5018",length:16},{name:"Mastercard",short_name:"mc",prefix:"51",length:16},{name:"Solo",short_name:"solo",prefix:"6334",length:16},{name:"Switch",short_name:"switch",prefix:"4903",length:16},{name:"Visa",short_name:"visa",prefix:"4",length:16},{name:"Visa Electron",short_name:"electron",prefix:"4026",length:16}],currency_types:[{code:"AED",name:"United Arab Emirates Dirham"},{code:"AFN",name:"Afghanistan Afghani"},{code:"ALL",name:"Albania Lek"},{code:"AMD",name:"Armenia Dram"},{code:"ANG",name:"Netherlands Antilles Guilder"},{code:"AOA",name:"Angola Kwanza"},{code:"ARS",name:"Argentina Peso"},{code:"AUD",name:"Australia Dollar"},{code:"AWG",name:"Aruba Guilder"},{code:"AZN",name:"Azerbaijan New Manat"},{code:"BAM",name:"Bosnia and Herzegovina Convertible Marka"},{code:"BBD",name:"Barbados Dollar"},{code:"BDT",name:"Bangladesh Taka"},{code:"BGN",name:"Bulgaria Lev"},{code:"BHD",name:"Bahrain Dinar"},{code:"BIF",name:"Burundi Franc"},{code:"BMD",name:"Bermuda Dollar"},{code:"BND",name:"Brunei Darussalam Dollar"},{code:"BOB",name:"Bolivia Boliviano"},{code:"BRL",name:"Brazil Real"},{code:"BSD",name:"Bahamas Dollar"},{code:"BTN",name:"Bhutan Ngultrum"},{code:"BWP",name:"Botswana Pula"},{code:"BYR",name:"Belarus Ruble"},{code:"BZD",name:"Belize Dollar"},{code:"CAD",name:"Canada Dollar"},{code:"CDF",name:"Congo/Kinshasa Franc"},{code:"CHF",name:"Switzerland Franc"},{code:"CLP",name:"Chile Peso"},{code:"CNY",name:"China Yuan Renminbi"},{code:"COP",name:"Colombia Peso"},{code:"CRC",name:"Costa Rica Colon"},{code:"CUC",name:"Cuba Convertible Peso"},{code:"CUP",name:"Cuba Peso"},{code:"CVE",name:"Cape Verde Escudo"},{code:"CZK",name:"Czech Republic Koruna"},{code:"DJF",name:"Djibouti Franc"},{code:"DKK",name:"Denmark Krone"},{code:"DOP",name:"Dominican Republic Peso"},{code:"DZD",name:"Algeria Dinar"},{code:"EGP",name:"Egypt Pound"},{code:"ERN",name:"Eritrea Nakfa"},{code:"ETB",name:"Ethiopia Birr"},{code:"EUR",name:"Euro Member Countries"},{code:"FJD",name:"Fiji Dollar"},{code:"FKP",name:"Falkland Islands (Malvinas) Pound"},{code:"GBP",name:"United Kingdom Pound"},{code:"GEL",name:"Georgia Lari"},{code:"GGP",name:"Guernsey Pound"},{code:"GHS",name:"Ghana Cedi"},{code:"GIP",name:"Gibraltar Pound"},{code:"GMD",name:"Gambia Dalasi"},{code:"GNF",name:"Guinea Franc"},{code:"GTQ",name:"Guatemala Quetzal"},{code:"GYD",name:"Guyana Dollar"},{code:"HKD",name:"Hong Kong Dollar"},{code:"HNL",name:"Honduras Lempira"},{code:"HRK",name:"Croatia Kuna"},{code:"HTG",name:"Haiti Gourde"},{code:"HUF",name:"Hungary Forint"},{code:"IDR",name:"Indonesia Rupiah"},{code:"ILS",name:"Israel Shekel"},{code:"IMP",name:"Isle of Man Pound"},{code:"INR",name:"India Rupee"},{code:"IQD",name:"Iraq Dinar"},{code:"IRR",name:"Iran Rial"},{code:"ISK",name:"Iceland Krona"},{code:"JEP",name:"Jersey Pound"},{code:"JMD",name:"Jamaica Dollar"},{code:"JOD",name:"Jordan Dinar"},{code:"JPY",name:"Japan Yen"},{code:"KES",name:"Kenya Shilling"},{code:"KGS",name:"Kyrgyzstan Som"},{code:"KHR",name:"Cambodia Riel"},{code:"KMF",name:"Comoros Franc"},{code:"KPW",name:"Korea (North) Won"},{code:"KRW",name:"Korea (South) Won"},{code:"KWD",name:"Kuwait Dinar"},{code:"KYD",name:"Cayman Islands Dollar"},{code:"KZT",name:"Kazakhstan Tenge"},{code:"LAK",name:"Laos Kip"},{code:"LBP",name:"Lebanon Pound"},{code:"LKR",name:"Sri Lanka Rupee"},{code:"LRD",name:"Liberia Dollar"},{code:"LSL",name:"Lesotho Loti"},{code:"LTL",name:"Lithuania Litas"},{code:"LYD",name:"Libya Dinar"},{code:"MAD",name:"Morocco Dirham"},{code:"MDL",name:"Moldova Leu"},{code:"MGA",name:"Madagascar Ariary"},{code:"MKD",name:"Macedonia Denar"},{code:"MMK",name:"Myanmar (Burma) Kyat"},{code:"MNT",name:"Mongolia Tughrik"},{code:"MOP",name:"Macau Pataca"},{code:"MRO",name:"Mauritania Ouguiya"},{code:"MUR",name:"Mauritius Rupee"},{code:"MVR",name:"Maldives (Maldive Islands) Rufiyaa"},{code:"MWK",name:"Malawi Kwacha"},{code:"MXN",name:"Mexico Peso"},{code:"MYR",name:"Malaysia Ringgit"},{code:"MZN",name:"Mozambique Metical"},{code:"NAD",name:"Namibia Dollar"},{code:"NGN",name:"Nigeria Naira"},{code:"NIO",name:"Nicaragua Cordoba"},{code:"NOK",name:"Norway Krone"},{code:"NPR",name:"Nepal Rupee"},{code:"NZD",name:"New Zealand Dollar"},{code:"OMR",name:"Oman Rial"},{code:"PAB",name:"Panama Balboa"},{code:"PEN",name:"Peru Nuevo Sol"},{code:"PGK",name:"Papua New Guinea Kina"},{code:"PHP",name:"Philippines Peso"},{code:"PKR",name:"Pakistan Rupee"},{code:"PLN",name:"Poland Zloty"},{code:"PYG",name:"Paraguay Guarani"},{code:"QAR",name:"Qatar Riyal"},{code:"RON",name:"Romania New Leu"},{code:"RSD",name:"Serbia Dinar"},{code:"RUB",name:"Russia Ruble"},{code:"RWF",name:"Rwanda Franc"},{code:"SAR",name:"Saudi Arabia Riyal"},{code:"SBD",name:"Solomon Islands Dollar"},{code:"SCR",name:"Seychelles Rupee"},{code:"SDG",name:"Sudan Pound"},{code:"SEK",name:"Sweden Krona"},{code:"SGD",name:"Singapore Dollar"},{code:"SHP",name:"Saint Helena Pound"},{code:"SLL",name:"Sierra Leone Leone"},{code:"SOS",name:"Somalia Shilling"},{code:"SPL",name:"Seborga Luigino"},{code:"SRD",name:"Suriname Dollar"},{code:"STD",name:"São Tomé and Príncipe Dobra"},{code:"SVC",name:"El Salvador Colon"},{code:"SYP",name:"Syria Pound"},{code:"SZL",name:"Swaziland Lilangeni"},{code:"THB",name:"Thailand Baht"},{code:"TJS",name:"Tajikistan Somoni"},{code:"TMT",name:"Turkmenistan Manat"},{code:"TND",name:"Tunisia Dinar"},{code:"TOP",name:"Tonga Pa'anga"},{code:"TRY",name:"Turkey Lira"},{code:"TTD",name:"Trinidad and Tobago Dollar"},{code:"TVD",name:"Tuvalu Dollar"},{code:"TWD",name:"Taiwan New Dollar"},{code:"TZS",name:"Tanzania Shilling"},{code:"UAH",name:"Ukraine Hryvnia"},{code:"UGX",name:"Uganda Shilling"},{code:"USD",name:"United States Dollar"},{code:"UYU",name:"Uruguay Peso"},{code:"UZS",name:"Uzbekistan Som"},{code:"VEF",name:"Venezuela Bolivar"},{code:"VND",name:"Viet Nam Dong"},{code:"VUV",name:"Vanuatu Vatu"},{code:"WST",name:"Samoa Tala"},{code:"XAF",name:"Communauté Financière Africaine (BEAC) CFA Franc BEAC"},{code:"XCD",name:"East Caribbean Dollar"},{code:"XDR",name:"International Monetary Fund (IMF) Special Drawing Rights"},{code:"XOF",name:"Communauté Financière Africaine (BCEAO) Franc"},{code:"XPF",name:"Comptoirs Français du Pacifique (CFP) Franc"},{code:"YER",name:"Yemen Rial"},{code:"ZAR",name:"South Africa Rand"},{code:"ZMW",name:"Zambia Kwacha"},{code:"ZWD",name:"Zimbabwe Dollar"}],colorNames:["AliceBlue","Black","Navy","DarkBlue","MediumBlue","Blue","DarkGreen","Green","Teal","DarkCyan","DeepSkyBlue","DarkTurquoise","MediumSpringGreen","Lime","SpringGreen","Aqua","Cyan","MidnightBlue","DodgerBlue","LightSeaGreen","ForestGreen","SeaGreen","DarkSlateGray","LimeGreen","MediumSeaGreen","Turquoise","RoyalBlue","SteelBlue","DarkSlateBlue","MediumTurquoise","Indigo","DarkOliveGreen","CadetBlue","CornflowerBlue","RebeccaPurple","MediumAquaMarine","DimGray","SlateBlue","OliveDrab","SlateGray","LightSlateGray","MediumSlateBlue","LawnGreen","Chartreuse","Aquamarine","Maroon","Purple","Olive","Gray","SkyBlue","LightSkyBlue","BlueViolet","DarkRed","DarkMagenta","SaddleBrown","Ivory","White","DarkSeaGreen","LightGreen","MediumPurple","DarkViolet","PaleGreen","DarkOrchid","YellowGreen","Sienna","Brown","DarkGray","LightBlue","GreenYellow","PaleTurquoise","LightSteelBlue","PowderBlue","FireBrick","DarkGoldenRod","MediumOrchid","RosyBrown","DarkKhaki","Silver","MediumVioletRed","IndianRed","Peru","Chocolate","Tan","LightGray","Thistle","Orchid","GoldenRod","PaleVioletRed","Crimson","Gainsboro","Plum","BurlyWood","LightCyan","Lavender","DarkSalmon","Violet","PaleGoldenRod","LightCoral","Khaki","AliceBlue","HoneyDew","Azure","SandyBrown","Wheat","Beige","WhiteSmoke","MintCream","GhostWhite","Salmon","AntiqueWhite","Linen","LightGoldenRodYellow","OldLace","Red","Fuchsia","Magenta","DeepPink","OrangeRed","Tomato","HotPink","Coral","DarkOrange","LightSalmon","Orange","LightPink","Pink","Gold","PeachPuff","NavajoWhite","Moccasin","Bisque","MistyRose","BlanchedAlmond","PapayaWhip","LavenderBlush","SeaShell","Cornsilk","LemonChiffon","FloralWhite","Snow","Yellow","LightYellow"],company:["3Com Corp","3M Company","A.G. Edwards Inc.","Abbott Laboratories","Abercrombie & Fitch Co.","ABM Industries Incorporated","Ace Hardware Corporation","ACT Manufacturing Inc.","Acterna Corp.","Adams Resources & Energy, Inc.","ADC Telecommunications, Inc.","Adelphia Communications Corporation","Administaff, Inc.","Adobe Systems Incorporated","Adolph Coors Company","Advance Auto Parts, Inc.","Advanced Micro Devices, Inc.","AdvancePCS, Inc.","Advantica Restaurant Group, Inc.","The AES Corporation","Aetna Inc.","Affiliated Computer Services, Inc.","AFLAC Incorporated","AGCO Corporation","Agilent Technologies, Inc.","Agway Inc.","Apartment Investment and Management Company","Air Products and Chemicals, Inc.","Airborne, Inc.","Airgas, Inc.","AK Steel Holding Corporation","Alaska Air Group, Inc.","Alberto-Culver Company","Albertson's, Inc.","Alcoa Inc.","Alleghany Corporation","Allegheny Energy, Inc.","Allegheny Technologies Incorporated","Allergan, Inc.","ALLETE, Inc.","Alliant Energy Corporation","Allied Waste Industries, Inc.","Allmerica Financial Corporation","The Allstate Corporation","ALLTEL Corporation","The Alpine Group, Inc.","Amazon.com, Inc.","AMC Entertainment Inc.","American Power Conversion Corporation","Amerada Hess Corporation","AMERCO","Ameren Corporation","America West Holdings Corporation","American Axle & Manufacturing Holdings, Inc.","American Eagle Outfitters, Inc.","American Electric Power Company, Inc.","American Express Company","American Financial Group, Inc.","American Greetings Corporation","American International Group, Inc.","American Standard Companies Inc.","American Water Works Company, Inc.","AmerisourceBergen Corporation","Ames Department Stores, Inc.","Amgen Inc.","Amkor Technology, Inc.","AMR Corporation","AmSouth Bancorp.","Amtran, Inc.","Anadarko Petroleum Corporation","Analog Devices, Inc.","Anheuser-Busch Companies, Inc.","Anixter International Inc.","AnnTaylor Inc.","Anthem, Inc.","AOL Time Warner Inc.","Aon Corporation","Apache Corporation","Apple Computer, Inc.","Applera Corporation","Applied Industrial Technologies, Inc.","Applied Materials, Inc.","Aquila, Inc.","ARAMARK Corporation","Arch Coal, Inc.","Archer Daniels Midland Company","Arkansas Best Corporation","Armstrong Holdings, Inc.","Arrow Electronics, Inc.","ArvinMeritor, Inc.","Ashland Inc.","Astoria Financial Corporation","AT&T Corp.","Atmel Corporation","Atmos Energy Corporation","Audiovox Corporation","Autoliv, Inc.","Automatic Data Processing, Inc.","AutoNation, Inc.","AutoZone, Inc.","Avaya Inc.","Avery Dennison Corporation","Avista Corporation","Avnet, Inc.","Avon Products, Inc.","Baker Hughes Incorporated","Ball Corporation","Bank of America Corporation","The Bank of New York Company, Inc.","Bank One Corporation","Banknorth Group, Inc.","Banta Corporation","Barnes & Noble, Inc.","Bausch & Lomb Incorporated","Baxter International Inc.","BB&T Corporation","The Bear Stearns Companies Inc.","Beazer Homes USA, Inc.","Beckman Coulter, Inc.","Becton, Dickinson and Company","Bed Bath & Beyond Inc.","Belk, Inc.","Bell Microproducts Inc.","BellSouth Corporation","Belo Corp.","Bemis Company, Inc.","Benchmark Electronics, Inc.","Berkshire Hathaway Inc.","Best Buy Co., Inc.","Bethlehem Steel Corporation","Beverly Enterprises, Inc.","Big Lots, Inc.","BJ Services Company","BJ's Wholesale Club, Inc.","The Black & Decker Corporation","Black Hills Corporation","BMC Software, Inc.","The Boeing Company","Boise Cascade Corporation","Borders Group, Inc.","BorgWarner Inc.","Boston Scientific Corporation","Bowater Incorporated","Briggs & Stratton Corporation","Brightpoint, Inc.","Brinker International, Inc.","Bristol-Myers Squibb Company","Broadwing, Inc.","Brown Shoe Company, Inc.","Brown-Forman Corporation","Brunswick Corporation","Budget Group, Inc.","Burlington Coat Factory Warehouse Corporation","Burlington Industries, Inc.","Burlington Northern Santa Fe Corporation","Burlington Resources Inc.","C. H. Robinson Worldwide Inc.","Cablevision Systems Corp","Cabot Corp","Cadence Design Systems, Inc.","Calpine Corp.","Campbell Soup Co.","Capital One Financial Corp.","Cardinal Health Inc.","Caremark Rx Inc.","Carlisle Cos. Inc.","Carpenter Technology Corp.","Casey's General Stores Inc.","Caterpillar Inc.","CBRL Group Inc.","CDI Corp.","CDW Computer Centers Inc.","CellStar Corp.","Cendant Corp","Cenex Harvest States Cooperatives","Centex Corp.","CenturyTel Inc.","Ceridian Corp.","CH2M Hill Cos. Ltd.","Champion Enterprises Inc.","Charles Schwab Corp.","Charming Shoppes Inc.","Charter Communications Inc.","Charter One Financial Inc.","ChevronTexaco Corp.","Chiquita Brands International Inc.","Chubb Corp","Ciena Corp.","Cigna Corp","Cincinnati Financial Corp.","Cinergy Corp.","Cintas Corp.","Circuit City Stores Inc.","Cisco Systems Inc.","Citigroup, Inc","Citizens Communications Co.","CKE Restaurants Inc.","Clear Channel Communications Inc.","The Clorox Co.","CMGI Inc.","CMS Energy Corp.","CNF Inc.","Coca-Cola Co.","Coca-Cola Enterprises Inc.","Colgate-Palmolive Co.","Collins & Aikman Corp.","Comcast Corp.","Comdisco Inc.","Comerica Inc.","Comfort Systems USA Inc.","Commercial Metals Co.","Community Health Systems Inc.","Compass Bancshares Inc","Computer Associates International Inc.","Computer Sciences Corp.","Compuware Corp.","Comverse Technology Inc.","ConAgra Foods Inc.","Concord EFS Inc.","Conectiv, Inc","Conoco Inc","Conseco Inc.","Consolidated Freightways Corp.","Consolidated Edison Inc.","Constellation Brands Inc.","Constellation Emergy Group Inc.","Continental Airlines Inc.","Convergys Corp.","Cooper Cameron Corp.","Cooper Industries Ltd.","Cooper Tire & Rubber Co.","Corn Products International Inc.","Corning Inc.","Costco Wholesale Corp.","Countrywide Credit Industries Inc.","Coventry Health Care Inc.","Cox Communications Inc.","Crane Co.","Crompton Corp.","Crown Cork & Seal Co. Inc.","CSK Auto Corp.","CSX Corp.","Cummins Inc.","CVS Corp.","Cytec Industries Inc.","D&K Healthcare Resources, Inc.","D.R. Horton Inc.","Dana Corporation","Danaher Corporation","Darden Restaurants Inc.","DaVita Inc.","Dean Foods Company","Deere & Company","Del Monte Foods Co","Dell Computer Corporation","Delphi Corp.","Delta Air Lines Inc.","Deluxe Corporation","Devon Energy Corporation","Di Giorgio Corporation","Dial Corporation","Diebold Incorporated","Dillard's Inc.","DIMON Incorporated","Dole Food Company, Inc.","Dollar General Corporation","Dollar Tree Stores, Inc.","Dominion Resources, Inc.","Domino's Pizza LLC","Dover Corporation, Inc.","Dow Chemical Company","Dow Jones & Company, Inc.","DPL Inc.","DQE Inc.","Dreyer's Grand Ice Cream, Inc.","DST Systems, Inc.","DTE Energy Co.","E.I. Du Pont de Nemours and Company","Duke Energy Corp","Dun & Bradstreet Inc.","DURA Automotive Systems Inc.","DynCorp","Dynegy Inc.","E*Trade Group, Inc.","E.W. Scripps Company","Earthlink, Inc.","Eastman Chemical Company","Eastman Kodak Company","Eaton Corporation","Echostar Communications Corporation","Ecolab Inc.","Edison International","EGL Inc.","El Paso Corporation","Electronic Arts Inc.","Electronic Data Systems Corp.","Eli Lilly and Company","EMC Corporation","Emcor Group Inc.","Emerson Electric Co.","Encompass Services Corporation","Energizer Holdings Inc.","Energy East Corporation","Engelhard Corporation","Enron Corp.","Entergy Corporation","Enterprise Products Partners L.P.","EOG Resources, Inc.","Equifax Inc.","Equitable Resources Inc.","Equity Office Properties Trust","Equity Residential Properties Trust","Estee Lauder Companies Inc.","Exelon Corporation","Exide Technologies","Expeditors International of Washington Inc.","Express Scripts Inc.","ExxonMobil Corporation","Fairchild Semiconductor International Inc.","Family Dollar Stores Inc.","Farmland Industries Inc.","Federal Mogul Corp.","Federated Department Stores Inc.","Federal Express Corp.","Felcor Lodging Trust Inc.","Ferro Corp.","Fidelity National Financial Inc.","Fifth Third Bancorp","First American Financial Corp.","First Data Corp.","First National of Nebraska Inc.","First Tennessee National Corp.","FirstEnergy Corp.","Fiserv Inc.","Fisher Scientific International Inc.","FleetBoston Financial Co.","Fleetwood Enterprises Inc.","Fleming Companies Inc.","Flowers Foods Inc.","Flowserv Corp","Fluor Corp","FMC Corp","Foamex International Inc","Foot Locker Inc","Footstar Inc.","Ford Motor Co","Forest Laboratories Inc.","Fortune Brands Inc.","Foster Wheeler Ltd.","FPL Group Inc.","Franklin Resources Inc.","Freeport McMoran Copper & Gold Inc.","Frontier Oil Corp","Furniture Brands International Inc.","Gannett Co., Inc.","Gap Inc.","Gateway Inc.","GATX Corporation","Gemstar-TV Guide International Inc.","GenCorp Inc.","General Cable Corporation","General Dynamics Corporation","General Electric Company","General Mills Inc","General Motors Corporation","Genesis Health Ventures Inc.","Gentek Inc.","Gentiva Health Services Inc.","Genuine Parts Company","Genuity Inc.","Genzyme Corporation","Georgia Gulf Corporation","Georgia-Pacific Corporation","Gillette Company","Gold Kist Inc.","Golden State Bancorp Inc.","Golden West Financial Corporation","Goldman Sachs Group Inc.","Goodrich Corporation","The Goodyear Tire & Rubber Company","Granite Construction Incorporated","Graybar Electric Company Inc.","Great Lakes Chemical Corporation","Great Plains Energy Inc.","GreenPoint Financial Corp.","Greif Bros. Corporation","Grey Global Group Inc.","Group 1 Automotive Inc.","Guidant Corporation","H&R Block Inc.","H.B. Fuller Company","H.J. Heinz Company","Halliburton Co.","Harley-Davidson Inc.","Harman International Industries Inc.","Harrah's Entertainment Inc.","Harris Corp.","Harsco Corp.","Hartford Financial Services Group Inc.","Hasbro Inc.","Hawaiian Electric Industries Inc.","HCA Inc.","Health Management Associates Inc.","Health Net Inc.","Healthsouth Corp","Henry Schein Inc.","Hercules Inc.","Herman Miller Inc.","Hershey Foods Corp.","Hewlett-Packard Company","Hibernia Corp.","Hillenbrand Industries Inc.","Hilton Hotels Corp.","Hollywood Entertainment Corp.","Home Depot Inc.","Hon Industries Inc.","Honeywell International Inc.","Hormel Foods Corp.","Host Marriott Corp.","Household International Corp.","Hovnanian Enterprises Inc.","Hub Group Inc.","Hubbell Inc.","Hughes Supply Inc.","Humana Inc.","Huntington Bancshares Inc.","Idacorp Inc.","IDT Corporation","IKON Office Solutions Inc.","Illinois Tool Works Inc.","IMC Global Inc.","Imperial Sugar Company","IMS Health Inc.","Ingles Market Inc","Ingram Micro Inc.","Insight Enterprises Inc.","Integrated Electrical Services Inc.","Intel Corporation","International Paper Co.","Interpublic Group of Companies Inc.","Interstate Bakeries Corporation","International Business Machines Corp.","International Flavors & Fragrances Inc.","International Multifoods Corporation","Intuit Inc.","IT Group Inc.","ITT Industries Inc.","Ivax Corp.","J.B. Hunt Transport Services Inc.","J.C. Penny Co.","J.P. Morgan Chase & Co.","Jabil Circuit Inc.","Jack In The Box Inc.","Jacobs Engineering Group Inc.","JDS Uniphase Corp.","Jefferson-Pilot Co.","John Hancock Financial Services Inc.","Johnson & Johnson","Johnson Controls Inc.","Jones Apparel Group Inc.","KB Home","Kellogg Company","Kellwood Company","Kelly Services Inc.","Kemet Corp.","Kennametal Inc.","Kerr-McGee Corporation","KeyCorp","KeySpan Corp.","Kimball International Inc.","Kimberly-Clark Corporation","Kindred Healthcare Inc.","KLA-Tencor Corporation","K-Mart Corp.","Knight-Ridder Inc.","Kohl's Corp.","KPMG Consulting Inc.","Kroger Co.","L-3 Communications Holdings Inc.","Laboratory Corporation of America Holdings","Lam Research Corporation","LandAmerica Financial Group Inc.","Lands' End Inc.","Landstar System Inc.","La-Z-Boy Inc.","Lear Corporation","Legg Mason Inc.","Leggett & Platt Inc.","Lehman Brothers Holdings Inc.","Lennar Corporation","Lennox International Inc.","Level 3 Communications Inc.","Levi Strauss & Co.","Lexmark International Inc.","Limited Inc.","Lincoln National Corporation","Linens 'n Things Inc.","Lithia Motors Inc.","Liz Claiborne Inc.","Lockheed Martin Corporation","Loews Corporation","Longs Drug Stores Corporation","Louisiana-Pacific Corporation","Lowe's Companies Inc.","LSI Logic Corporation","The LTV Corporation","The Lubrizol Corporation","Lucent Technologies Inc.","Lyondell Chemical Company","M & T Bank Corporation","Magellan Health Services Inc.","Mail-Well Inc.","Mandalay Resort Group","Manor Care Inc.","Manpower Inc.","Marathon Oil Corporation","Mariner Health Care Inc.","Markel Corporation","Marriott International Inc.","Marsh & McLennan Companies Inc.","Marsh Supermarkets Inc.","Marshall & Ilsley Corporation","Martin Marietta Materials Inc.","Masco Corporation","Massey Energy Company","MasTec Inc.","Mattel Inc.","Maxim Integrated Products Inc.","Maxtor Corporation","Maxxam Inc.","The May Department Stores Company","Maytag Corporation","MBNA Corporation","McCormick & Company Incorporated","McDonald's Corporation","The McGraw-Hill Companies Inc.","McKesson Corporation","McLeodUSA Incorporated","M.D.C. Holdings Inc.","MDU Resources Group Inc.","MeadWestvaco Corporation","Medtronic Inc.","Mellon Financial Corporation","The Men's Wearhouse Inc.","Merck & Co., Inc.","Mercury General Corporation","Merrill Lynch & Co. Inc.","Metaldyne Corporation","Metals USA Inc.","MetLife Inc.","Metris Companies Inc","MGIC Investment Corporation","MGM Mirage","Michaels Stores Inc.","Micron Technology Inc.","Microsoft Corporation","Milacron Inc.","Millennium Chemicals Inc.","Mirant Corporation","Mohawk Industries Inc.","Molex Incorporated","The MONY Group Inc.","Morgan Stanley Dean Witter & Co.","Motorola Inc.","MPS Group Inc.","Murphy Oil Corporation","Nabors Industries Inc","Nacco Industries Inc","Nash Finch Company","National City Corp.","National Commerce Financial Corporation","National Fuel Gas Company","National Oilwell Inc","National Rural Utilities Cooperative Finance Corporation","National Semiconductor Corporation","National Service Industries Inc","Navistar International Corporation","NCR Corporation","The Neiman Marcus Group Inc.","New Jersey Resources Corporation","New York Times Company","Newell Rubbermaid Inc","Newmont Mining Corporation","Nextel Communications Inc","Nicor Inc","Nike Inc","NiSource Inc","Noble Energy Inc","Nordstrom Inc","Norfolk Southern Corporation","Nortek Inc","North Fork Bancorporation Inc","Northeast Utilities System","Northern Trust Corporation","Northrop Grumman Corporation","NorthWestern Corporation","Novellus Systems Inc","NSTAR","NTL Incorporated","Nucor Corp","Nvidia Corp","NVR Inc","Northwest Airlines Corp","Occidental Petroleum Corp","Ocean Energy Inc","Office Depot Inc.","OfficeMax Inc","OGE Energy Corp","Oglethorpe Power Corp.","Ohio Casualty Corp.","Old Republic International Corp.","Olin Corp.","OM Group Inc","Omnicare Inc","Omnicom Group","On Semiconductor Corp","ONEOK Inc","Oracle Corp","Oshkosh Truck Corp","Outback Steakhouse Inc.","Owens & Minor Inc.","Owens Corning","Owens-Illinois Inc","Oxford Health Plans Inc","Paccar Inc","PacifiCare Health Systems Inc","Packaging Corp. of America","Pactiv Corp","Pall Corp","Pantry Inc","Park Place Entertainment Corp","Parker Hannifin Corp.","Pathmark Stores Inc.","Paychex Inc","Payless Shoesource Inc","Penn Traffic Co.","Pennzoil-Quaker State Company","Pentair Inc","Peoples Energy Corp.","PeopleSoft Inc","Pep Boys Manny, Moe & Jack","Potomac Electric Power Co.","Pepsi Bottling Group Inc.","PepsiAmericas Inc.","PepsiCo Inc.","Performance Food Group Co.","Perini Corp","PerkinElmer Inc","Perot Systems Corp","Petco Animal Supplies Inc.","Peter Kiewit Sons', Inc.","PETsMART Inc","Pfizer Inc","Pacific Gas & Electric Corp.","Pharmacia Corp","Phar Mor Inc.","Phelps Dodge Corp.","Philip Morris Companies Inc.","Phillips Petroleum Co","Phillips Van Heusen Corp.","Phoenix Companies Inc","Pier 1 Imports Inc.","Pilgrim's Pride Corporation","Pinnacle West Capital Corp","Pioneer-Standard Electronics Inc.","Pitney Bowes Inc.","Pittston Brinks Group","Plains All American Pipeline LP","PNC Financial Services Group Inc.","PNM Resources Inc","Polaris Industries Inc.","Polo Ralph Lauren Corp","PolyOne Corp","Popular Inc","Potlatch Corp","PPG Industries Inc","PPL Corp","Praxair Inc","Precision Castparts Corp","Premcor Inc.","Pride International Inc","Primedia Inc","Principal Financial Group Inc.","Procter & Gamble Co.","Pro-Fac Cooperative Inc.","Progress Energy Inc","Progressive Corporation","Protective Life Corp","Provident Financial Group","Providian Financial Corp.","Prudential Financial Inc.","PSS World Medical Inc","Public Service Enterprise Group Inc.","Publix Super Markets Inc.","Puget Energy Inc.","Pulte Homes Inc","Qualcomm Inc","Quanta Services Inc.","Quantum Corp","Quest Diagnostics Inc.","Questar Corp","Quintiles Transnational","Qwest Communications Intl Inc","R.J. Reynolds Tobacco Company","R.R. Donnelley & Sons Company","Radio Shack Corporation","Raymond James Financial Inc.","Raytheon Company","Reader's Digest Association Inc.","Reebok International Ltd.","Regions Financial Corp.","Regis Corporation","Reliance Steel & Aluminum Co.","Reliant Energy Inc.","Rent A Center Inc","Republic Services Inc","Revlon Inc","RGS Energy Group Inc","Rite Aid Corp","Riverwood Holding Inc.","RoadwayCorp","Robert Half International Inc.","Rock-Tenn Co","Rockwell Automation Inc","Rockwell Collins Inc","Rohm & Haas Co.","Ross Stores Inc","RPM Inc.","Ruddick Corp","Ryder System Inc","Ryerson Tull Inc","Ryland Group Inc.","Sabre Holdings Corp","Safeco Corp","Safeguard Scientifics Inc.","Safeway Inc","Saks Inc","Sanmina-SCI Inc","Sara Lee Corp","SBC Communications Inc","Scana Corp.","Schering-Plough Corp","Scholastic Corp","SCI Systems Onc.","Science Applications Intl. Inc.","Scientific-Atlanta Inc","Scotts Company","Seaboard Corp","Sealed Air Corp","Sears Roebuck & Co","Sempra Energy","Sequa Corp","Service Corp. International","ServiceMaster Co","Shaw Group Inc","Sherwin-Williams Company","Shopko Stores Inc","Siebel Systems Inc","Sierra Health Services Inc","Sierra Pacific Resources","Silgan Holdings Inc.","Silicon Graphics Inc","Simon Property Group Inc","SLM Corporation","Smith International Inc","Smithfield Foods Inc","Smurfit-Stone Container Corp","Snap-On Inc","Solectron Corp","Solutia Inc","Sonic Automotive Inc.","Sonoco Products Co.","Southern Company","Southern Union Company","SouthTrust Corp.","Southwest Airlines Co","Southwest Gas Corp","Sovereign Bancorp Inc.","Spartan Stores Inc","Spherion Corp","Sports Authority Inc","Sprint Corp.","SPX Corp","St. Jude Medical Inc","St. Paul Cos.","Staff Leasing Inc.","StanCorp Financial Group Inc","Standard Pacific Corp.","Stanley Works","Staples Inc","Starbucks Corp","Starwood Hotels & Resorts Worldwide Inc","State Street Corp.","Stater Bros. Holdings Inc.","Steelcase Inc","Stein Mart Inc","Stewart & Stevenson Services Inc","Stewart Information Services Corp","Stilwell Financial Inc","Storage Technology Corporation","Stryker Corp","Sun Healthcare Group Inc.","Sun Microsystems Inc.","SunGard Data Systems Inc.","Sunoco Inc.","SunTrust Banks Inc","Supervalu Inc","Swift Transportation, Co., Inc","Symbol Technologies Inc","Synovus Financial Corp.","Sysco Corp","Systemax Inc.","Target Corp.","Tech Data Corporation","TECO Energy Inc","Tecumseh Products Company","Tektronix Inc","Teleflex Incorporated","Telephone & Data Systems Inc","Tellabs Inc.","Temple-Inland Inc","Tenet Healthcare Corporation","Tenneco Automotive Inc.","Teradyne Inc","Terex Corp","Tesoro Petroleum Corp.","Texas Industries Inc.","Texas Instruments Incorporated","Textron Inc","Thermo Electron Corporation","Thomas & Betts Corporation","Tiffany & Co","Timken Company","TJX Companies Inc","TMP Worldwide Inc","Toll Brothers Inc","Torchmark Corporation","Toro Company","Tower Automotive Inc.","Toys 'R' Us Inc","Trans World Entertainment Corp.","TransMontaigne Inc","Transocean Inc","TravelCenters of America Inc.","Triad Hospitals Inc","Tribune Company","Trigon Healthcare Inc.","Trinity Industries Inc","Trump Hotels & Casino Resorts Inc.","TruServ Corporation","TRW Inc","TXU Corp","Tyson Foods Inc","U.S. Bancorp","U.S. Industries Inc.","UAL Corporation","UGI Corporation","Unified Western Grocers Inc","Union Pacific Corporation","Union Planters Corp","Unisource Energy Corp","Unisys Corporation","United Auto Group Inc","United Defense Industries Inc.","United Parcel Service Inc","United Rentals Inc","United Stationers Inc","United Technologies Corporation","UnitedHealth Group Incorporated","Unitrin Inc","Universal Corporation","Universal Forest Products Inc","Universal Health Services Inc","Unocal Corporation","Unova Inc","UnumProvident Corporation","URS Corporation","US Airways Group Inc","US Oncology Inc","USA Interactive","USFreighways Corporation","USG Corporation","UST Inc","Valero Energy Corporation","Valspar Corporation","Value City Department Stores Inc","Varco International Inc","Vectren Corporation","Veritas Software Corporation","Verizon Communications Inc","VF Corporation","Viacom Inc","Viad Corp","Viasystems Group Inc","Vishay Intertechnology Inc","Visteon Corporation","Volt Information Sciences Inc","Vulcan Materials Company","W.R. Berkley Corporation","W.R. Grace & Co","W.W. Grainger Inc","Wachovia Corporation","Wakenhut Corporation","Walgreen Co","Wallace Computer Services Inc","Wal-Mart Stores Inc","Walt Disney Co","Walter Industries Inc","Washington Mutual Inc","Washington Post Co.","Waste Management Inc","Watsco Inc","Weatherford International Inc","Weis Markets Inc.","Wellpoint Health Networks Inc","Wells Fargo & Company","Wendy's International Inc","Werner Enterprises Inc","WESCO International Inc","Western Digital Inc","Western Gas Resources Inc","WestPoint Stevens Inc","Weyerhauser Company","WGL Holdings Inc","Whirlpool Corporation","Whole Foods Market Inc","Willamette Industries Inc.","Williams Companies Inc","Williams Sonoma Inc","Winn Dixie Stores Inc","Wisconsin Energy Corporation","Wm Wrigley Jr Company","World Fuel Services Corporation","WorldCom Inc","Worthington Industries Inc","WPS Resources Corporation","Wyeth","Wyndham International Inc","Xcel Energy Inc","Xerox Corp","Xilinx Inc","XO Communications Inc","Yellow Corporation","York International Corp","Yum Brands Inc.","Zale Corporation","Zions Bancorporation"],fileExtension:{raster:["bmp","gif","gpl","ico","jpeg","psd","png","psp","raw","tiff"],vector:["3dv","amf","awg","ai","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","odg","svg","xar"],"3d":["3dmf","3dm","3mf","3ds","an8","aoi","blend","cal3d","cob","ctm","iob","jas","max","mb","mdx","obj","x","x3d"],document:["doc","docx","dot","html","xml","odt","odm","ott","csv","rtf","tex","xhtml","xps"]},timezones:[{name:"Dateline Standard Time",abbr:"DST",offset:-12,isdst:!1,text:"(UTC-12:00) International Date Line West",utc:["Etc/GMT+12"]},{name:"UTC-11",abbr:"U",offset:-11,isdst:!1,text:"(UTC-11:00) Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{name:"Hawaiian Standard Time",abbr:"HST",offset:-10,isdst:!1,text:"(UTC-10:00) Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{name:"Alaskan Standard Time",abbr:"AKDT",offset:-8,isdst:!0,text:"(UTC-09:00) Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{name:"Pacific Standard Time (Mexico)",abbr:"PDT",offset:-7,isdst:!0,text:"(UTC-08:00) Baja California",utc:["America/Santa_Isabel"]},{name:"Pacific Daylight Time",abbr:"PDT",offset:-7,isdst:!0,text:"(UTC-07:00) Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse"]},{name:"Pacific Standard Time",abbr:"PST",offset:-8,isdst:!1,text:"(UTC-08:00) Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{name:"US Mountain Standard Time",abbr:"UMST",offset:-7,isdst:!1,text:"(UTC-07:00) Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{name:"Mountain Standard Time (Mexico)",abbr:"MDT",offset:-6,isdst:!0,text:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{name:"Mountain Standard Time",abbr:"MDT",offset:-6,isdst:!0,text:"(UTC-07:00) Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{name:"Central America Standard Time",abbr:"CAST",offset:-6,isdst:!1,text:"(UTC-06:00) Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{name:"Central Standard Time",abbr:"CDT",offset:-5,isdst:!0,text:"(UTC-06:00) Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{name:"Central Standard Time (Mexico)",abbr:"CDT",offset:-5,isdst:!0,text:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{name:"Canada Central Standard Time",abbr:"CCST",offset:-6,isdst:!1,text:"(UTC-06:00) Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{name:"SA Pacific Standard Time",abbr:"SPST",offset:-5,isdst:!1,text:"(UTC-05:00) Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{name:"Eastern Standard Time",abbr:"EDT",offset:-4,isdst:!0,text:"(UTC-05:00) Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{name:"US Eastern Standard Time",abbr:"UEDT",offset:-4,isdst:!0,text:"(UTC-05:00) Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{name:"Venezuela Standard Time",abbr:"VST",offset:-4.5,isdst:!1,text:"(UTC-04:30) Caracas",utc:["America/Caracas"]},{name:"Paraguay Standard Time",abbr:"PYT",offset:-4,isdst:!1,text:"(UTC-04:00) Asuncion",utc:["America/Asuncion"]},{name:"Atlantic Standard Time",abbr:"ADT",offset:-3,isdst:!0,text:"(UTC-04:00) Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{name:"Central Brazilian Standard Time",abbr:"CBST",offset:-4,isdst:!1,text:"(UTC-04:00) Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{name:"SA Western Standard Time",abbr:"SWST",offset:-4,isdst:!1,text:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{name:"Pacific SA Standard Time",abbr:"PSST",offset:-4,isdst:!1,text:"(UTC-04:00) Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{name:"Newfoundland Standard Time",abbr:"NDT",offset:-2.5,isdst:!0,text:"(UTC-03:30) Newfoundland",utc:["America/St_Johns"]},{name:"E. South America Standard Time",abbr:"ESAST",offset:-3,isdst:!1,text:"(UTC-03:00) Brasilia",utc:["America/Sao_Paulo"]},{name:"Argentina Standard Time",abbr:"AST",offset:-3,isdst:!1,text:"(UTC-03:00) Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{name:"SA Eastern Standard Time",abbr:"SEST",offset:-3,isdst:!1,text:"(UTC-03:00) Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{name:"Greenland Standard Time",abbr:"GDT",offset:-3,isdst:!0,text:"(UTC-03:00) Greenland",utc:["America/Godthab"]},{name:"Montevideo Standard Time",abbr:"MST",offset:-3,isdst:!1,text:"(UTC-03:00) Montevideo",utc:["America/Montevideo"]},{name:"Bahia Standard Time",abbr:"BST",offset:-3,isdst:!1,text:"(UTC-03:00) Salvador",utc:["America/Bahia"]},{name:"UTC-02",abbr:"U",offset:-2,isdst:!1,text:"(UTC-02:00) Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{name:"Mid-Atlantic Standard Time",abbr:"MDT",offset:-1,isdst:!0,text:"(UTC-02:00) Mid-Atlantic - Old",utc:[]},{name:"Azores Standard Time",abbr:"ADT",offset:0,isdst:!0,text:"(UTC-01:00) Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{name:"Cape Verde Standard Time",abbr:"CVST",offset:-1,isdst:!1,text:"(UTC-01:00) Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{name:"Morocco Standard Time",abbr:"MDT",offset:1,isdst:!0,text:"(UTC) Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{name:"UTC",abbr:"UTC",offset:0,isdst:!1,text:"(UTC) Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{name:"GMT Standard Time",abbr:"GMT",offset:0,isdst:!1,text:"(UTC) Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{name:"British Summer Time",abbr:"BST",offset:1,isdst:!0,text:"(UTC+01:00) Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{name:"GMT Standard Time",abbr:"GDT",offset:1,isdst:!0,text:"(UTC) Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{name:"Greenwich Standard Time",abbr:"GST",offset:0,isdst:!1,text:"(UTC) Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{name:"W. Europe Standard Time",abbr:"WEDT",offset:2,isdst:!0,text:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{name:"Central Europe Standard Time",abbr:"CEDT",offset:2,isdst:!0,text:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{name:"Romance Standard Time",abbr:"RDT",offset:2,isdst:!0,text:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{name:"Central European Standard Time",abbr:"CEDT",offset:2,isdst:!0,text:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{name:"W. Central Africa Standard Time",abbr:"WCAST",offset:1,isdst:!1,text:"(UTC+01:00) West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{name:"Namibia Standard Time",abbr:"NST",offset:1,isdst:!1,text:"(UTC+01:00) Windhoek",utc:["Africa/Windhoek"]},{name:"GTB Standard Time",abbr:"GDT",offset:3,isdst:!0,text:"(UTC+02:00) Athens, Bucharest",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{name:"Middle East Standard Time",abbr:"MEDT",offset:3,isdst:!0,text:"(UTC+02:00) Beirut",utc:["Asia/Beirut"]},{name:"Egypt Standard Time",abbr:"EST",offset:2,isdst:!1,text:"(UTC+02:00) Cairo",utc:["Africa/Cairo"]},{name:"Syria Standard Time",abbr:"SDT",offset:3,isdst:!0,text:"(UTC+02:00) Damascus",utc:["Asia/Damascus"]},{name:"E. Europe Standard Time",abbr:"EEDT",offset:3,isdst:!0,text:"(UTC+02:00) E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{name:"South Africa Standard Time",abbr:"SAST",offset:2,isdst:!1,text:"(UTC+02:00) Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{name:"FLE Standard Time",abbr:"FDT",offset:3,isdst:!0,text:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{name:"Turkey Standard Time",abbr:"TDT",offset:3,isdst:!1,text:"(UTC+03:00) Istanbul",utc:["Europe/Istanbul"]},{name:"Israel Standard Time",abbr:"JDT",offset:3,isdst:!0,text:"(UTC+02:00) Jerusalem",utc:["Asia/Jerusalem"]},{name:"Libya Standard Time",abbr:"LST",offset:2,isdst:!1,text:"(UTC+02:00) Tripoli",utc:["Africa/Tripoli"]},{name:"Jordan Standard Time",abbr:"JST",offset:3,isdst:!1,text:"(UTC+03:00) Amman",utc:["Asia/Amman"]},{name:"Arabic Standard Time",abbr:"AST",offset:3,isdst:!1,text:"(UTC+03:00) Baghdad",utc:["Asia/Baghdad"]},{name:"Kaliningrad Standard Time",abbr:"KST",offset:3,isdst:!1,text:"(UTC+02:00) Kaliningrad",utc:["Europe/Kaliningrad"]},{name:"Arab Standard Time",abbr:"AST",offset:3,isdst:!1,text:"(UTC+03:00) Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{name:"E. Africa Standard Time",abbr:"EAST",offset:3,isdst:!1,text:"(UTC+03:00) Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{name:"Moscow Standard Time",abbr:"MSK",offset:3,isdst:!1,text:"(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{name:"Samara Time",abbr:"SAMT",offset:4,isdst:!1,text:"(UTC+04:00) Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{name:"Iran Standard Time",abbr:"IDT",offset:4.5,isdst:!0,text:"(UTC+03:30) Tehran",utc:["Asia/Tehran"]},{name:"Arabian Standard Time",abbr:"AST",offset:4,isdst:!1,text:"(UTC+04:00) Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{name:"Azerbaijan Standard Time",abbr:"ADT",offset:5,isdst:!0,text:"(UTC+04:00) Baku",utc:["Asia/Baku"]},{name:"Mauritius Standard Time",abbr:"MST",offset:4,isdst:!1,text:"(UTC+04:00) Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{name:"Georgian Standard Time",abbr:"GET",offset:4,isdst:!1,text:"(UTC+04:00) Tbilisi",utc:["Asia/Tbilisi"]},{name:"Caucasus Standard Time",abbr:"CST",offset:4,isdst:!1,text:"(UTC+04:00) Yerevan",utc:["Asia/Yerevan"]},{name:"Afghanistan Standard Time",abbr:"AST",offset:4.5,isdst:!1,text:"(UTC+04:30) Kabul",utc:["Asia/Kabul"]},{name:"West Asia Standard Time",abbr:"WAST",offset:5,isdst:!1,text:"(UTC+05:00) Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{name:"Yekaterinburg Time",abbr:"YEKT",offset:5,isdst:!1,text:"(UTC+05:00) Yekaterinburg",utc:["Asia/Yekaterinburg"]},{name:"Pakistan Standard Time",abbr:"PKT",offset:5,isdst:!1,text:"(UTC+05:00) Islamabad, Karachi",utc:["Asia/Karachi"]},{name:"India Standard Time",abbr:"IST",offset:5.5,isdst:!1,text:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{name:"Sri Lanka Standard Time",abbr:"SLST",offset:5.5,isdst:!1,text:"(UTC+05:30) Sri Jayawardenepura",utc:["Asia/Colombo"]},{name:"Nepal Standard Time",abbr:"NST",offset:5.75,isdst:!1,text:"(UTC+05:45) Kathmandu",utc:["Asia/Kathmandu"]},{name:"Central Asia Standard Time",abbr:"CAST",offset:6,isdst:!1,text:"(UTC+06:00) Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{name:"Bangladesh Standard Time",abbr:"BST",offset:6,isdst:!1,text:"(UTC+06:00) Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{name:"Myanmar Standard Time",abbr:"MST",offset:6.5,isdst:!1,text:"(UTC+06:30) Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{name:"SE Asia Standard Time",abbr:"SAST",offset:7,isdst:!1,text:"(UTC+07:00) Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{name:"N. Central Asia Standard Time",abbr:"NCAST",offset:7,isdst:!1,text:"(UTC+07:00) Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{name:"China Standard Time",abbr:"CST",offset:8,isdst:!1,text:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{name:"North Asia Standard Time",abbr:"NAST",offset:8,isdst:!1,text:"(UTC+08:00) Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{name:"Singapore Standard Time",abbr:"MPST",offset:8,isdst:!1,text:"(UTC+08:00) Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{name:"W. Australia Standard Time",abbr:"WAST",offset:8,isdst:!1,text:"(UTC+08:00) Perth",utc:["Antarctica/Casey","Australia/Perth"]},{name:"Taipei Standard Time",abbr:"TST",offset:8,isdst:!1,text:"(UTC+08:00) Taipei",utc:["Asia/Taipei"]},{name:"Ulaanbaatar Standard Time",abbr:"UST",offset:8,isdst:!1,text:"(UTC+08:00) Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{name:"North Asia East Standard Time",abbr:"NAEST",offset:8,isdst:!1,text:"(UTC+08:00) Irkutsk",utc:["Asia/Irkutsk"]},{name:"Japan Standard Time",abbr:"JST",offset:9,isdst:!1,text:"(UTC+09:00) Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{name:"Korea Standard Time",abbr:"KST",offset:9,isdst:!1,text:"(UTC+09:00) Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{name:"Cen. Australia Standard Time",abbr:"CAST",offset:9.5,isdst:!1,text:"(UTC+09:30) Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{name:"AUS Central Standard Time",abbr:"ACST",offset:9.5,isdst:!1,text:"(UTC+09:30) Darwin",utc:["Australia/Darwin"]},{name:"E. Australia Standard Time",abbr:"EAST",offset:10,isdst:!1,text:"(UTC+10:00) Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{name:"AUS Eastern Standard Time",abbr:"AEST",offset:10,isdst:!1,text:"(UTC+10:00) Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{name:"West Pacific Standard Time",abbr:"WPST",offset:10,isdst:!1,text:"(UTC+10:00) Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{name:"Tasmania Standard Time",abbr:"TST",offset:10,isdst:!1,text:"(UTC+10:00) Hobart",utc:["Australia/Currie","Australia/Hobart"]},{name:"Yakutsk Standard Time",abbr:"YST",offset:9,isdst:!1,text:"(UTC+09:00) Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{name:"Central Pacific Standard Time",abbr:"CPST",offset:11,isdst:!1,text:"(UTC+11:00) Solomon Is., New Caledonia",utc:["Antarctica/Macquarie","Etc/GMT-11","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea","Pacific/Ponape"]},{name:"Vladivostok Standard Time",abbr:"VST",offset:11,isdst:!1,text:"(UTC+11:00) Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{name:"New Zealand Standard Time",abbr:"NZST",offset:12,isdst:!1,text:"(UTC+12:00) Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{name:"UTC+12",abbr:"U",offset:12,isdst:!1,text:"(UTC+12:00) Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{name:"Fiji Standard Time",abbr:"FST",offset:12,isdst:!1,text:"(UTC+12:00) Fiji",utc:["Pacific/Fiji"]},{name:"Magadan Standard Time",abbr:"MST",offset:12,isdst:!1,text:"(UTC+12:00) Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{name:"Kamchatka Standard Time",abbr:"KDT",offset:13,isdst:!0,text:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{name:"Tonga Standard Time",abbr:"TST",offset:13,isdst:!1,text:"(UTC+13:00) Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{name:"Samoa Standard Time",abbr:"SST",offset:13,isdst:!1,text:"(UTC+13:00) Samoa",utc:["Pacific/Apia"]}],profession:["Airline Pilot","Academic Team","Accountant","Account Executive","Actor","Actuary","Acquisition Analyst","Administrative Asst.","Administrative Analyst","Administrator","Advertising Director","Aerospace Engineer","Agent","Agricultural Inspector","Agricultural Scientist","Air Traffic Controller","Animal Trainer","Anthropologist","Appraiser","Architect","Art Director","Artist","Astronomer","Athletic Coach","Auditor","Author","Baker","Banker","Bankruptcy Attorney","Benefits Manager","Biologist","Bio-feedback Specialist","Biomedical Engineer","Biotechnical Researcher","Broadcaster","Broker","Building Manager","Building Contractor","Building Inspector","Business Analyst","Business Planner","Business Manager","Buyer","Call Center Manager","Career Counselor","Cash Manager","Ceramic Engineer","Chief Executive Officer","Chief Operation Officer","Chef","Chemical Engineer","Chemist","Child Care Manager","Chief Medical Officer","Chiropractor","Cinematographer","City Housing Manager","City Manager","Civil Engineer","Claims Manager","Clinical Research Assistant","Collections Manager","Compliance Manager","Comptroller","Computer Manager","Commercial Artist","Communications Affairs Director","Communications Director","Communications Engineer","Compensation Analyst","Computer Programmer","Computer Ops. Manager","Computer Engineer","Computer Operator","Computer Graphics Specialist","Construction Engineer","Construction Manager","Consultant","Consumer Relations Manager","Contract Administrator","Copyright Attorney","Copywriter","Corporate Planner","Corrections Officer","Cosmetologist","Credit Analyst","Cruise Director","Chief Information Officer","Chief Technology Officer","Customer Service Manager","Cryptologist","Dancer","Data Security Manager","Database Manager","Day Care Instructor","Dentist","Designer","Design Engineer","Desktop Publisher","Developer","Development Officer","Diamond Merchant","Dietitian","Direct Marketer","Director","Distribution Manager","Diversity Manager","Economist","EEO Compliance Manager","Editor","Education Adminator","Electrical Engineer","Electro Optical Engineer","Electronics Engineer","Embassy Management","Employment Agent","Engineer Technician","Entrepreneur","Environmental Analyst","Environmental Attorney","Environmental Engineer","Environmental Specialist","Escrow Officer","Estimator","Executive Assistant","Executive Director","Executive Recruiter","Facilities Manager","Family Counselor","Fashion Events Manager","Fashion Merchandiser","Fast Food Manager","Film Producer","Film Production Assistant","Financial Analyst","Financial Planner","Financier","Fine Artist","Wildlife Specialist","Fitness Consultant","Flight Attendant","Flight Engineer","Floral Designer","Food & Beverage Director","Food Service Manager","Forestry Technician","Franchise Management","Franchise Sales","Fraud Investigator","Freelance Writer","Fund Raiser","General Manager","Geologist","General Counsel","Geriatric Specialist","Gerontologist","Glamour Photographer","Golf Club Manager","Gourmet Chef","Graphic Designer","Grounds Keeper","Hazardous Waste Manager","Health Care Manager","Health Therapist","Health Service Administrator","Hearing Officer","Home Economist","Horticulturist","Hospital Administrator","Hotel Manager","Human Resources Manager","Importer","Industrial Designer","Industrial Engineer","Information Director","Inside Sales","Insurance Adjuster","Interior Decorator","Internal Controls Director","International Acct.","International Courier","International Lawyer","Interpreter","Investigator","Investment Banker","Investment Manager","IT Architect","IT Project Manager","IT Systems Analyst","Jeweler","Joint Venture Manager","Journalist","Labor Negotiator","Labor Organizer","Labor Relations Manager","Lab Services Director","Lab Technician","Land Developer","Landscape Architect","Law Enforcement Officer","Lawyer","Lead Software Engineer","Lead Software Test Engineer","Leasing Manager","Legal Secretary","Library Manager","Litigation Attorney","Loan Officer","Lobbyist","Logistics Manager","Maintenance Manager","Management Consultant","Managed Care Director","Managing Partner","Manufacturing Director","Manpower Planner","Marine Biologist","Market Res. Analyst","Marketing Director","Materials Manager","Mathematician","Membership Chairman","Mechanic","Mechanical Engineer","Media Buyer","Medical Investor","Medical Secretary","Medical Technician","Mental Health Counselor","Merchandiser","Metallurgical Engineering","Meteorologist","Microbiologist","MIS Manager","Motion Picture Director","Multimedia Director","Musician","Network Administrator","Network Specialist","Network Operator","New Product Manager","Novelist","Nuclear Engineer","Nuclear Specialist","Nutritionist","Nursing Administrator","Occupational Therapist","Oceanographer","Office Manager","Operations Manager","Operations Research Director","Optical Technician","Optometrist","Organizational Development Manager","Outplacement Specialist","Paralegal","Park Ranger","Patent Attorney","Payroll Specialist","Personnel Specialist","Petroleum Engineer","Pharmacist","Photographer","Physical Therapist","Physician","Physician Assistant","Physicist","Planning Director","Podiatrist","Political Analyst","Political Scientist","Politician","Portfolio Manager","Preschool Management","Preschool Teacher","Principal","Private Banker","Private Investigator","Probation Officer","Process Engineer","Producer","Product Manager","Product Engineer","Production Engineer","Production Planner","Professional Athlete","Professional Coach","Professor","Project Engineer","Project Manager","Program Manager","Property Manager","Public Administrator","Public Safety Director","PR Specialist","Publisher","Purchasing Agent","Publishing Director","Quality Assurance Specialist","Quality Control Engineer","Quality Control Inspector","Radiology Manager","Railroad Engineer","Real Estate Broker","Recreational Director","Recruiter","Redevelopment Specialist","Regulatory Affairs Manager","Registered Nurse","Rehabilitation Counselor","Relocation Manager","Reporter","Research Specialist","Restaurant Manager","Retail Store Manager","Risk Analyst","Safety Engineer","Sales Engineer","Sales Trainer","Sales Promotion Manager","Sales Representative","Sales Manager","Service Manager","Sanitation Engineer","Scientific Programmer","Scientific Writer","Securities Analyst","Security Consultant","Security Director","Seminar Presenter","Ship's Officer","Singer","Social Director","Social Program Planner","Social Research","Social Scientist","Social Worker","Sociologist","Software Developer","Software Engineer","Software Test Engineer","Soil Scientist","Special Events Manager","Special Education Teacher","Special Projects Director","Speech Pathologist","Speech Writer","Sports Event Manager","Statistician","Store Manager","Strategic Alliance Director","Strategic Planning Director","Stress Reduction Specialist","Stockbroker","Surveyor","Structural Engineer","Superintendent","Supply Chain Director","System Engineer","Systems Analyst","Systems Programmer","System Administrator","Tax Specialist","Teacher","Technical Support Specialist","Technical Illustrator","Technical Writer","Technology Director","Telecom Analyst","Telemarketer","Theatrical Director","Title Examiner","Tour Escort","Tour Guide Director","Traffic Manager","Trainer Translator","Transportation Manager","Travel Agent","Treasurer","TV Programmer","Underwriter","Union Representative","University Administrator","University Dean","Urban Planner","Veterinarian","Vendor Relations Director","Viticulturist","Warehouse Manager"],animals:{ocean:["Acantharea","Anemone","Angelfish King","Ahi Tuna","Albacore","American Oyster","Anchovy","Armored Snail","Arctic Char","Atlantic Bluefin Tuna","Atlantic Cod","Atlantic Goliath Grouper","Atlantic Trumpetfish","Atlantic Wolffish","Baleen Whale","Banded Butterflyfish","Banded Coral Shrimp","Banded Sea Krait","Barnacle","Barndoor Skate","Barracuda","Basking Shark","Bass","Beluga Whale","Bluebanded Goby","Bluehead Wrasse","Bluefish","Bluestreak Cleaner-Wrasse","Blue Marlin","Blue Shark","Blue Spiny Lobster","Blue Tang","Blue Whale","Broadclub Cuttlefish","Bull Shark","Chambered Nautilus","Chilean Basket Star","Chilean Jack Mackerel","Chinook Salmon","Christmas Tree Worm","Clam","Clown Anemonefish","Clown Triggerfish","Cod","Coelacanth","Cockscomb Cup Coral","Common Fangtooth","Conch","Cookiecutter Shark","Copepod","Coral","Corydoras","Cownose Ray","Crab","Crown-of-Thorns Starfish","Cushion Star","Cuttlefish","California Sea Otters","Dolphin","Dolphinfish","Dory","Devil Fish","Dugong","Dumbo Octopus","Dungeness Crab","Eccentric Sand Dollar","Edible Sea Cucumber","Eel","Elephant Seal","Elkhorn Coral","Emperor Shrimp","Estuarine Crocodile","Fathead Sculpin","Fiddler Crab","Fin Whale","Flameback","Flamingo Tongue Snail","Flashlight Fish","Flatback Turtle","Flatfish","Flying Fish","Flounder","Fluke","French Angelfish","Frilled Shark","Fugu (also called Pufferfish)","Gar","Geoduck","Giant Barrel Sponge","Giant Caribbean Sea Anemone","Giant Clam","Giant Isopod","Giant Kingfish","Giant Oarfish","Giant Pacific Octopus","Giant Pyrosome","Giant Sea Star","Giant Squid","Glowing Sucker Octopus","Giant Tube Worm","Goblin Shark","Goosefish","Great White Shark","Greenland Shark","Grey Atlantic Seal","Grouper","Grunion","Guineafowl Puffer","Haddock","Hake","Halibut","Hammerhead Shark","Hapuka","Harbor Porpoise","Harbor Seal","Hatchetfish","Hawaiian Monk Seal","Hawksbill Turtle","Hector's Dolphin","Hermit Crab","Herring","Hoki","Horn Shark","Horseshoe Crab","Humpback Anglerfish","Humpback Whale","Icefish","Imperator Angelfish","Irukandji Jellyfish","Isopod","Ivory Bush Coral","Japanese Spider Crab","Jellyfish","John Dory","Juan Fernandez Fur Seal","Killer Whale","Kiwa Hirsuta","Krill","Lagoon Triggerfish","Lamprey","Leafy Seadragon","Leopard Seal","Limpet","Ling","Lionfish","Lions Mane Jellyfish","Lobe Coral","Lobster","Loggerhead Turtle","Longnose Sawshark","Longsnout Seahorse","Lophelia Coral","Marrus Orthocanna","Manatee","Manta Ray","Marlin","Megamouth Shark","Mexican Lookdown","Mimic Octopus","Moon Jelly","Mollusk","Monkfish","Moray Eel","Mullet","Mussel","Megaladon","Napoleon Wrasse","Nassau Grouper","Narwhal","Nautilus","Needlefish","Northern Seahorse","North Atlantic Right Whale","Northern Red Snapper","Norway Lobster","Nudibranch","Nurse Shark","Oarfish","Ocean Sunfish","Oceanic Whitetip Shark","Octopus","Olive Sea Snake","Orange Roughy","Ostracod","Otter","Oyster","Pacific Angelshark","Pacific Blackdragon","Pacific Halibut","Pacific Sardine","Pacific Sea Nettle Jellyfish","Pacific White Sided Dolphin","Pantropical Spotted Dolphin","Patagonian Toothfish","Peacock Mantis Shrimp","Pelagic Thresher Shark","Penguin","Peruvian Anchoveta","Pilchard","Pink Salmon","Pinniped","Plankton","Porpoise","Polar Bear","Portuguese Man o' War","Pycnogonid Sea Spider","Quahog","Queen Angelfish","Queen Conch","Queen Parrotfish","Queensland Grouper","Ragfish","Ratfish","Rattail Fish","Ray","Red Drum","Red King Crab","Ringed Seal","Risso's Dolphin","Ross Seals","Sablefish","Salmon","Sand Dollar","Sandbar Shark","Sawfish","Sarcastic Fringehead","Scalloped Hammerhead Shark","Seahorse","Sea Cucumber","Sea Lion","Sea Urchin","Seal","Shark","Shortfin Mako Shark","Shovelnose Guitarfish","Shrimp","Silverside Fish","Skipjack Tuna","Slender Snipe Eel","Smalltooth Sawfish","Smelts","Sockeye Salmon","Southern Stingray","Sponge","Spotted Porcupinefish","Spotted Dolphin","Spotted Eagle Ray","Spotted Moray","Squid","Squidworm","Starfish","Stickleback","Stonefish","Stoplight Loosejaw","Sturgeon","Swordfish","Tan Bristlemouth","Tasseled Wobbegong","Terrible Claw Lobster","Threespot Damselfish","Tiger Prawn","Tiger Shark","Tilefish","Toadfish","Tropical Two-Wing Flyfish","Tuna","Umbrella Squid","Velvet Crab","Venus Flytrap Sea Anemone","Vigtorniella Worm","Viperfish","Vampire Squid","Vaquita","Wahoo","Walrus","West Indian Manatee","Whale","Whale Shark","Whiptail Gulper","White-Beaked Dolphin","White-Ring Garden Eel","White Shrimp","Wobbegong","Wrasse","Wreckfish","Xiphosura","Yellowtail Damselfish","Yelloweye Rockfish","Yellow Cup Black Coral","Yellow Tube Sponge","Yellowfin Tuna","Zebrashark","Zooplankton"],desert:["Aardwolf","Addax","African Wild Ass","Ant","Antelope","Armadillo","Baboon","Badger","Bat","Bearded Dragon","Beetle","Bird","Black-footed Cat","Boa","Brown Bear","Bustard","Butterfly","Camel","Caracal","Caracara","Caterpillar","Centipede","Cheetah","Chipmunk","Chuckwalla","Climbing Mouse","Coati","Cobra","Cotton Rat","Cougar","Courser","Crane Fly","Crow","Dassie Rat","Dove","Dunnart","Eagle","Echidna","Elephant","Emu","Falcon","Fly","Fox","Frogmouth","Gecko","Geoffroy's Cat","Gerbil","Grasshopper","Guanaco","Gundi","Hamster","Hawk","Hedgehog","Hyena","Hyrax","Jackal","Kangaroo","Kangaroo Rat","Kestrel","Kowari","Kultarr","Leopard","Lion","Macaw","Meerkat","Mouse","Oryx","Ostrich","Owl","Pronghorn","Python","Rabbit","Raccoon","Rattlesnake","Rhinoceros","Sand Cat","Spectacled Bear","Spiny Mouse","Starling","Stick Bug","Tarantula","Tit","Toad","Tortoise","Tyrant Flycatcher","Viper","Vulture","Waxwing","Xerus","Zebra"],grassland:["Aardvark","Aardwolf","Accentor","African Buffalo","African Wild Dog","Alpaca","Anaconda","Ant","Anteater","Antelope","Armadillo","Baboon","Badger","Bandicoot","Barbet","Bat","Bee","Bee-eater","Beetle","Bird","Bison","Black-footed Cat","Black-footed Ferret","Bluebird","Boa","Bowerbird","Brown Bear","Bush Dog","Bushshrike","Bustard","Butterfly","Buzzard","Caracal","Caracara","Cardinal","Caterpillar","Cheetah","Chipmunk","Civet","Climbing Mouse","Clouded Leopard","Coati","Cobra","Cockatoo","Cockroach","Common Genet","Cotton Rat","Cougar","Courser","Coyote","Crane","Crane Fly","Cricket","Crow","Culpeo","Death Adder","Deer","Deer Mouse","Dingo","Dinosaur","Dove","Drongo","Duck","Duiker","Dunnart","Eagle","Echidna","Elephant","Elk","Emu","Falcon","Finch","Flea","Fly","Flying Frog","Fox","Frog","Frogmouth","Garter Snake","Gazelle","Gecko","Geoffroy's Cat","Gerbil","Giant Tortoise","Giraffe","Grasshopper","Grison","Groundhog","Grouse","Guanaco","Guinea Pig","Hamster","Harrier","Hartebeest","Hawk","Hedgehog","Helmetshrike","Hippopotamus","Hornbill","Hyena","Hyrax","Impala","Jackal","Jaguar","Jaguarundi","Kangaroo","Kangaroo Rat","Kestrel","Kultarr","Ladybug","Leopard","Lion","Macaw","Meerkat","Mouse","Newt","Oryx","Ostrich","Owl","Pangolin","Pheasant","Prairie Dog","Pronghorn","Przewalski's Horse","Python","Quoll","Rabbit","Raven","Rhinoceros","Shelduck","Sloth Bear","Spectacled Bear","Squirrel","Starling","Stick Bug","Tamandua","Tasmanian Devil","Thornbill","Thrush","Toad","Tortoise"],forest:["Agouti","Anaconda","Anoa","Ant","Anteater","Antelope","Armadillo","Asian Black Bear","Aye-aye","Babirusa","Baboon","Badger","Bandicoot","Banteng","Barbet","Basilisk","Bat","Bearded Dragon","Bee","Bee-eater","Beetle","Bettong","Binturong","Bird-of-paradise","Bongo","Bowerbird","Bulbul","Bush Dog","Bushbaby","Bushshrike","Butterfly","Buzzard","Caecilian","Cardinal","Cassowary","Caterpillar","Centipede","Chameleon","Chimpanzee","Cicada","Civet","Clouded Leopard","Coati","Cobra","Cockatoo","Cockroach","Colugo","Cotinga","Cotton Rat","Cougar","Crane Fly","Cricket","Crocodile","Crow","Cuckoo","Cuscus","Death Adder","Deer","Dhole","Dingo","Dinosaur","Drongo","Duck","Duiker","Eagle","Echidna","Elephant","Finch","Flat-headed Cat","Flea","Flowerpecker","Fly","Flying Frog","Fossa","Frog","Frogmouth","Gaur","Gecko","Gorilla","Grison","Hawaiian Honeycreeper","Hawk","Hedgehog","Helmetshrike","Hornbill","Hyrax","Iguana","Jackal","Jaguar","Jaguarundi","Kestrel","Ladybug","Lemur","Leopard","Lion","Macaw","Mandrill","Margay","Monkey","Mouse","Mouse Deer","Newt","Okapi","Old World Flycatcher","Orangutan","Owl","Pangolin","Peafowl","Pheasant","Possum","Python","Quokka","Rabbit","Raccoon","Red Panda","Red River Hog","Rhinoceros","Sloth Bear","Spectacled Bear","Squirrel","Starling","Stick Bug","Sun Bear","Tamandua","Tamarin","Tapir","Tarantula","Thrush","Tiger","Tit","Toad","Tortoise","Toucan","Trogon","Trumpeter","Turaco","Turtle","Tyrant Flycatcher","Viper","Vulture","Wallaby","Warbler","Wasp","Waxwing","Weaver","Weaver-finch","Whistler","White-eye","Whydah","Woodswallow","Worm","Wren","Xenops","Yellowjacket","Accentor","African Buffalo","American Black Bear","Anole","Bird","Bison","Boa","Brown Bear","Chipmunk","Common Genet","Copperhead","Coyote","Deer Mouse","Dormouse","Elk","Emu","Fisher","Fox","Garter Snake","Giant Panda","Giant Tortoise","Groundhog","Grouse","Guanaco","Himalayan Tahr","Kangaroo","Koala","Numbat","Quoll","Raccoon dog","Tasmanian Devil","Thornbill","Turkey","Vole","Weasel","Wildcat","Wolf","Wombat","Woodchuck","Woodpecker"],farm:["Alpaca","Buffalo","Banteng","Cow","Cat","Chicken","Carp","Camel","Donkey","Dog","Duck","Emu","Goat","Gayal","Guinea","Goose","Horse","Honey","Llama","Pig","Pigeon","Rhea","Rabbit","Sheep","Silkworm","Turkey","Yak","Zebu"],pet:["Bearded Dragon","Birds","Burro","Cats","Chameleons","Chickens","Chinchillas","Chinese Water Dragon","Cows","Dogs","Donkey","Ducks","Ferrets","Fish","Geckos","Geese","Gerbils","Goats","Guinea Fowl","Guinea Pigs","Hamsters","Hedgehogs","Horses","Iguanas","Llamas","Lizards","Mice","Mule","Peafowl","Pigs and Hogs","Pigeons","Ponies","Pot Bellied Pig","Rabbits","Rats","Sheep","Skinks","Snakes","Stick Insects","Sugar Gliders","Tarantula","Turkeys","Turtles"],zoo:["Aardvark","African Wild Dog","Aldabra Tortoise","American Alligator","American Bison","Amur Tiger","Anaconda","Andean Condor","Asian Elephant","Baby Doll Sheep","Bald Eagle","Barred Owl","Blue Iguana","Boer Goat","California Sea Lion","Caribbean Flamingo","Chinchilla","Collared Lemur","Coquerel's Sifaka","Cuban Amazon Parrot","Ebony Langur","Fennec Fox","Fossa","Gelada","Giant Anteater","Giraffe","Gorilla","Grizzly Bear","Henkel's Leaf-tailed Gecko","Indian Gharial","Indian Rhinoceros","King Cobra","King Vulture","Komodo Dragon","Linne's Two-toed Sloth","Lion","Little Penguin","Madagascar Tree Boa","Magellanic Penguin","Malayan Tapir","Malayan Tiger","Matschies Tree Kangaroo","Mini Donkey","Monarch Butterfly","Nile crocodile","North American Porcupine","Nubian Ibex","Okapi","Poison Dart Frog","Polar Bear","Pygmy Marmoset","Radiated Tortoise","Red Panda","Red Ruffed Lemur","Ring-tailed Lemur","Ring-tailed Mongoose","Rock Hyrax","Small Clawed Asian Otter","Snow Leopard","Snowy Owl","Southern White-faced Owl","Southern White Rhinocerous","Squirrel Monkey","Tufted Puffin","White Cheeked Gibbon","White-throated Bee Eater","Zebra"]},primes:[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007],emotions:["love","joy","surprise","anger","sadness","fear"]},y=Object.prototype.hasOwnProperty,b=Object.keys||function(e){var t=[];for(var n in e)y.call(e,n)&&t.push(n);return t};function C(e,t){var n=Array.isArray(e),i=t||(n?new Array(e.length):{});return n?function(e,t){for(var n=0,i=e.length;n0)return this.normal_pool(e);var t,n,i,r=e.mean,o=e.dev;do{t=(n=2*this.random()-1)*n+(i=2*this.random()-1)*i}while(t>=1);return o*(n*Math.sqrt(-2*Math.log(t)/t))+r},c.prototype.normal_pool=function(e){var t=0;do{var n=Math.round(this.normal({mean:e.mean,dev:e.dev}));if(n=0)return e.pool[n];t++}while(t<100);throw new RangeError("Chance: Your pool is too small for the given mean and standard deviation. Please adjust.")},c.prototype.radio=function(e){var t="";switch((e=h(e,{side:"?"})).side.toLowerCase()){case"east":case"e":t="W";break;case"west":case"w":t="K";break;default:t=this.character({pool:"KW"})}return t+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})},c.prototype.set=function(e,t){"string"==typeof e?_[e]=t:_=C(e,_)},c.prototype.tv=function(e){return this.radio(e)},c.prototype.cnpj=function(){var e=this.n(this.natural,8,{max:9}),t=2+6*e[7]+7*e[6]+8*e[5]+9*e[4]+2*e[3]+3*e[2]+4*e[1]+5*e[0];(t=11-t%11)>=10&&(t=0);var n=2*t+3+7*e[7]+8*e[6]+9*e[5]+2*e[4]+3*e[3]+4*e[2]+5*e[1]+6*e[0];return(n=11-n%11)>=10&&(n=0),""+e[0]+e[1]+"."+e[2]+e[3]+e[4]+"."+e[5]+e[6]+e[7]+"/0001-"+t+n},c.prototype.emotion=function(){return this.pick(this.get("emotions"))},c.prototype.mersenne_twister=function(e){return new x(e)},c.prototype.blueimp_md5=function(){return new v};var x=function(e){void 0===e&&(e=Math.floor(Math.random()*Math.pow(10,13))),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};x.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},x.prototype.init_by_array=function(e,t){var n,i,r=1,o=0;for(this.init_genrand(19650218),n=this.N>t?this.N:t;n;n--)i=this.mt[r-1]^this.mt[r-1]>>>30,this.mt[r]=(this.mt[r]^(1664525*((4294901760&i)>>>16)<<16)+1664525*(65535&i))+e[o]+o,this.mt[r]>>>=0,o++,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),o>=t&&(o=0);for(n=this.N-1;n;n--)i=this.mt[r-1]^this.mt[r-1]>>>30,this.mt[r]=(this.mt[r]^(1566083941*((4294901760&i)>>>16)<<16)+1566083941*(65535&i))-r,this.mt[r]>>>=0,++r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1);this.mt[0]=2147483648},x.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti===this.N+1&&this.init_genrand(5489),n=0;n>>1^t[1&e];for(;n>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},x.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},x.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},x.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},x.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},x.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var v=function(){};v.prototype.VERSION="1.0.1",v.prototype.safe_add=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},v.prototype.bit_roll=function(e,t){return e<>>32-t},v.prototype.md5_cmn=function(e,t,n,i,r,o){return this.safe_add(this.bit_roll(this.safe_add(this.safe_add(t,e),this.safe_add(i,o)),r),n)},v.prototype.md5_ff=function(e,t,n,i,r,o,s){return this.md5_cmn(t&n|~t&i,e,t,r,o,s)},v.prototype.md5_gg=function(e,t,n,i,r,o,s){return this.md5_cmn(t&i|n&~i,e,t,r,o,s)},v.prototype.md5_hh=function(e,t,n,i,r,o,s){return this.md5_cmn(t^n^i,e,t,r,o,s)},v.prototype.md5_ii=function(e,t,n,i,r,o,s){return this.md5_cmn(n^(t|~i),e,t,r,o,s)},v.prototype.binl_md5=function(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,i,r,o,s,a=1732584193,l=-271733879,c=-1732584194,h=271733878;for(n=0;n>5]>>>t%32&255);return n},v.prototype.rstr2binl=function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(r=this.binl_md5(r,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=this.binl_md5(o.concat(this.rstr2binl(t)),512+8*t.length),this.binl2rstr(this.binl_md5(s.concat(i),640))},v.prototype.rstr2hex=function(e){var t,n,i="0123456789abcdef",r="";for(n=0;n>>4&15)+i.charAt(15&t);return r},v.prototype.str2rstr_utf8=function(e){return unescape(encodeURIComponent(e))},v.prototype.raw_md5=function(e){return this.rstr_md5(this.str2rstr_utf8(e))},v.prototype.hex_md5=function(e){return this.rstr2hex(this.raw_md5(e))},v.prototype.raw_hmac_md5=function(e,t){return this.rstr_hmac_md5(this.str2rstr_utf8(e),this.str2rstr_utf8(t))},v.prototype.hex_hmac_md5=function(e,t){return this.rstr2hex(this.raw_hmac_md5(e,t))},v.prototype.md5=function(e,t,n){return t?n?this.raw_hmac_md5(t,e):this.hex_hmac_md5(t,e):n?this.raw_md5(e):this.hex_md5(e)},e.exports&&(t=e.exports=c),t.Chance=c,"undefined"!=typeof importScripts&&(chance=new c,self.Chance=c),"object"==typeof window&&"object"==typeof window.document&&(window.Chance=c,window.chance=new c)}()}));Wo.Chance;var Ho=Io((function(e,t){function n(e,t){if(!(this instanceof n))return new n(e,t);this.x=e||0,this.y=t||0}e.exports=n,n.fromArray=function(e){return new n(e[0]||0,e[1]||0)},n.fromObject=function(e){return new n(e.x||0,e.y||0)},n.prototype.addX=function(e){return this.x+=e.x,this},n.prototype.addY=function(e){return this.y+=e.y,this},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.addScalar=function(e){return this.x+=e,this.y+=e,this},n.prototype.addScalarX=function(e){return this.x+=e,this},n.prototype.addScalarY=function(e){return this.y+=e,this},n.prototype.subtractX=function(e){return this.x-=e.x,this},n.prototype.subtractY=function(e){return this.y-=e.y,this},n.prototype.subtract=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.subtractScalar=function(e){return this.x-=e,this.y-=e,this},n.prototype.subtractScalarX=function(e){return this.x-=e,this},n.prototype.subtractScalarY=function(e){return this.y-=e,this},n.prototype.divideX=function(e){return this.x/=e.x,this},n.prototype.divideY=function(e){return this.y/=e.y,this},n.prototype.divide=function(e){return this.x/=e.x,this.y/=e.y,this},n.prototype.divideScalar=function(e){return 0!==e?(this.x/=e,this.y/=e):(this.x=0,this.y=0),this},n.prototype.divideScalarX=function(e){return 0!==e?this.x/=e:this.x=0,this},n.prototype.divideScalarY=function(e){return 0!==e?this.y/=e:this.y=0,this},n.prototype.invertX=function(){return this.x*=-1,this},n.prototype.invertY=function(){return this.y*=-1,this},n.prototype.invert=function(){return this.invertX(),this.invertY(),this},n.prototype.multiplyX=function(e){return this.x*=e.x,this},n.prototype.multiplyY=function(e){return this.y*=e.y,this},n.prototype.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},n.prototype.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},n.prototype.multiplyScalarX=function(e){return this.x*=e,this},n.prototype.multiplyScalarY=function(e){return this.y*=e,this},n.prototype.normalize=function(){var e=this.length();return 0===e?(this.x=1,this.y=0):this.divide(n(e,e)),this},n.prototype.norm=n.prototype.normalize,n.prototype.limit=function(e,t){return Math.abs(this.x)>e&&(this.x*=t),Math.abs(this.y)>e&&(this.y*=t),this},n.prototype.randomize=function(e,t){return this.randomizeX(e,t),this.randomizeY(e,t),this},n.prototype.randomizeX=function(e,t){var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x);return this.x=r(n,i),this},n.prototype.randomizeY=function(e,t){var n=Math.min(e.y,t.y),i=Math.max(e.y,t.y);return this.y=r(n,i),this},n.prototype.randomizeAny=function(e,t){return Math.round(Math.random())?this.randomizeX(e,t):this.randomizeY(e,t),this},n.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},n.prototype.toFixed=function(e){return void 0===e&&(e=8),this.x=this.x.toFixed(e),this.y=this.y.toFixed(e),this},n.prototype.mixX=function(e,t){return void 0===t&&(t=.5),this.x=(1-t)*this.x+t*e.x,this},n.prototype.mixY=function(e,t){return void 0===t&&(t=.5),this.y=(1-t)*this.y+t*e.y,this},n.prototype.mix=function(e,t){return this.mixX(e,t),this.mixY(e,t),this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.copyX=function(e){return this.x=e.x,this},n.prototype.copyY=function(e){return this.y=e.y,this},n.prototype.copy=function(e){return this.copyX(e),this.copyY(e),this},n.prototype.zero=function(){return this.x=this.y=0,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.cross=function(e){return this.x*e.y-this.y*e.x},n.prototype.projectOnto=function(e){var t=(this.x*e.x+this.y*e.y)/(e.x*e.x+e.y*e.y);return this.x=t*e.x,this.y=t*e.y,this},n.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)},n.prototype.horizontalAngleDeg=function(){return o(this.horizontalAngle())},n.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)},n.prototype.verticalAngleDeg=function(){return o(this.verticalAngle())},n.prototype.angle=n.prototype.horizontalAngle,n.prototype.angleDeg=n.prototype.horizontalAngleDeg,n.prototype.direction=n.prototype.horizontalAngle,n.prototype.rotate=function(e){var t=this.x*Math.cos(e)-this.y*Math.sin(e),n=this.x*Math.sin(e)+this.y*Math.cos(e);return this.x=t,this.y=n,this},n.prototype.rotateDeg=function(e){return e=s(e),this.rotate(e)},n.prototype.rotateTo=function(e){return this.rotate(e-this.angle())},n.prototype.rotateToDeg=function(e){return e=s(e),this.rotateTo(e)},n.prototype.rotateBy=function(e){var t=this.angle()+e;return this.rotate(t)},n.prototype.rotateByDeg=function(e){return e=s(e),this.rotateBy(e)},n.prototype.distanceX=function(e){return this.x-e.x},n.prototype.absDistanceX=function(e){return Math.abs(this.distanceX(e))},n.prototype.distanceY=function(e){return this.y-e.y},n.prototype.absDistanceY=function(e){return Math.abs(this.distanceY(e))},n.prototype.distance=function(e){return Math.sqrt(this.distanceSq(e))},n.prototype.distanceSq=function(e){var t=this.distanceX(e),n=this.distanceY(e);return t*t+n*n},n.prototype.length=function(){return Math.sqrt(this.lengthSq())},n.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},n.prototype.magnitude=n.prototype.length,n.prototype.isZero=function(){return 0===this.x&&0===this.y},n.prototype.isEqualTo=function(e){return this.x===e.x&&this.y===e.y},n.prototype.toString=function(){return"x:"+this.x+", y:"+this.y},n.prototype.toArray=function(){return[this.x,this.y]},n.prototype.toObject=function(){return{x:this.x,y:this.y}};var i=180/Math.PI;function r(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function o(e){return e*i}function s(e){return e/i}})),Uo="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},jo=Array.prototype,Vo=Object.prototype,Yo="undefined"!=typeof Symbol?Symbol.prototype:null,qo=jo.push,Ko=jo.slice,Xo=Vo.toString,Jo=Vo.hasOwnProperty,Zo="undefined"!=typeof ArrayBuffer,Qo="undefined"!=typeof DataView,$o=Array.isArray,es=Object.keys,ts=Object.create,ns=Zo&&ArrayBuffer.isView,is=isNaN,rs=isFinite,os=!{toString:null}.propertyIsEnumerable("toString"),ss=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],as=Math.pow(2,53)-1;function ls(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),i=Array(n),r=0;r=0&&n<=as}}function Os(e){return function(t){return null==t?void 0:t[e]}}const Fs=Os("byteLength"),ks=Ls(Fs);var Bs=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const Gs=Zo?function(e){return ns?ns(e)&&!Es(e):ks(e)&&Bs.test(Xo.call(e))}:Ps(!1),zs=Os("length");function Ws(e,t){t=function(e){for(var t={},n=e.length,i=0;i":">",'"':""","'":"'","`":"`"},Na=Aa(Ma),Da=Aa(aa(Ma)),Ra=js.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Pa=/(.)^/,La={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Oa=/\\|'|\r|\n|\u2028|\u2029/g;function Fa(e){return"\\"+La[e]}var ka=/^\s*(\w|\$)+\s*$/;var Ba=0;function Ga(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var o=ma(e.prototype),s=e.apply(o,r);return cs(s)?s:o}var za=ls((function(e,t){var n=za.placeholder,i=function(){for(var r=0,o=t.length,s=Array(o),a=0;a1)Ua(a,t-1,n,i),r=i.length;else for(var l=0,c=a.length;l0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Xa=za(Ka,2);function Ja(e,t,n){t=Ta(t,n);for(var i,r=Hs(e),o=0,s=r.length;o0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=t(Ko.call(i,s,a),Rs))>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o0?0:s-1;for(r||(i=t[o?o[a]:a],a+=e);a>=0&&a=3;return t(e,xa(n,r,4),i,o)}}const ll=al(1),cl=al(-1);function hl(e,t,n){var i=[];return t=Ta(t,n),ol(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i}function ul(e,t,n){t=Ta(t,n);for(var i=!Ha(e)&&Hs(e),r=(i||e).length,o=0;o=0}const gl=ls((function(e,t,n){var i,r;return vs(t)?r=t:(t=fa(t),i=t.slice(0,-1),t=t[t.length-1]),sl(e,(function(e){var o=r;if(!o){if(i&&i.length&&(e=pa(e,i)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function fl(e,t){return sl(e,Ca(t))}function pl(e,t,n){var i,r,o=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=Ha(e)?e:sa(e)).length;ao&&(o=i);else t=Ta(t,n),ol(e,(function(e,n,i){((r=t(e,n,i))>s||r===-1/0&&o===-1/0)&&(o=e,s=r)}));return o}var _l=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function yl(e){return e?As(e)?Ko.call(e):ms(e)?e.match(_l):Ha(e)?sl(e,ya):sa(e):[]}function bl(e,t,n){if(null==t||n)return Ha(e)||(e=sa(e)),e[wa(e.length-1)];var i=yl(e),r=zs(i);t=Math.max(Math.min(t,r),0);for(var o=r-1,s=0;s1&&(i=xa(i,t[1])),t=Ks(e)):(i=Il,t=Ua(t,!1,!1),e=Object(e));for(var r=0,o=t.length;r1&&(n=t[1])):(t=sl(Ua(t,!1,!1),String),i=function(e,n){return!ml(t,n)}),wl(e,i,n)}));function Al(e,t,n){return Ko.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function Ml(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Al(e,e.length-t)}function Nl(e,t,n){return Ko.call(e,null==t||n?1:t)}const Dl=ls((function(e,t){return t=Ua(t,!0,!0),hl(e,(function(e){return!ml(t,e)}))})),Rl=ls((function(e,t){return Dl(e,t)}));function Pl(e,t,n,i){us(t)||(i=n,n=t,t=!1),null!=n&&(n=Ta(n,i));for(var r=[],o=[],s=0,a=zs(e);st?(i&&(clearTimeout(i),i=null),a=c,s=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,h)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},debounce:function(e,t,n){var i,r,o,s,a,l=function(){var c=Ea()-r;t>c?i=setTimeout(l,t-c):(i=null,n||(s=e.apply(a,o)),i||(o=a=null))},c=ls((function(c){return a=this,o=c,r=Ea(),i||(i=setTimeout(l,t),n&&(s=e.apply(a,o))),s}));return c.cancel=function(){clearTimeout(i),i=o=a=null},c},wrap:function(e,t){return za(t,e)},negate:qa,compose:function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},after:function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},before:Ka,once:Xa,findKey:Ja,findIndex:Qa,findLastIndex:$a,sortedIndex:el,indexOf:nl,lastIndexOf:il,find:rl,detect:rl,findWhere:function(e,t){return rl(e,ba(t))},each:ol,forEach:ol,map:sl,collect:sl,reduce:ll,foldl:ll,inject:ll,reduceRight:cl,foldr:cl,filter:hl,select:hl,reject:function(e,t,n){return hl(e,qa(Ta(t)),n)},every:ul,all:ul,some:dl,any:dl,contains:ml,includes:ml,include:ml,invoke:gl,pluck:fl,where:function(e,t){return hl(e,ba(t))},max:pl,min:function(e,t,n){var i,r,o=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=Ha(e)?e:sa(e)).length;ai||void 0===n)return 1;if(nn.right||tn.bottom)},Wl.prototype.intersects=function(e){if(!e.getBoundingBox)throw new Error("Given entity has no method getBoundingBox");var t=this.getBoundingBox(),n=e.getBoundingBox();return!(n.left>t.right||n.rightt.bottom||n.bottom{const t=[];return e.neighbours.n&&t.push(e.neighbours.n),e.neighbours.e&&t.push(e.neighbours.e),e.neighbours.s&&t.push(e.neighbours.s),e.neighbours.w&&t.push(e.neighbours.w),t},Yl=new Wo,ql=function(){var e,t,n=[],i=-1;const r=[new Ho(0,1),new Ho(1,0),new Ho(0,-1),new Ho(-1,0)],o=t=>{e=t};let s,a=[];const l=(e,n)=>t.integer({min:e,max:n}),c=(e,t)=>a[e][t],h=t=>{let n={};var i,r;for(i=0;i{const e=[],t=[];for(const t of n)e.push(t.toJS());for(let e=0;e{var n,i=[];if(Object.keys(a[e][t].neighbours).filter((e=>"floor"===e.type)).length>0)return;b(),C(e,t),i.push(new Ho(e,t));let o=0;for(;i.length&&o<500;){o++;var s=i[i.length-1],c=[];for(let e of r)y(s,e)&&c.push(e);if(c.length){var h,u=c.map((e=>e.toString()));if(n&&u.indexOf(n.toString())>-1&&l(1,100)>50)h=n.clone();else{h=c[l(0,c.length-1)].clone()}let e=s.clone().add(h).toObject();C(e.x,e.y);let t=s.clone().add(h).add(h).toObject();C(t.x,t.y),i.push(s.clone().add(h).add(h)),n=h.clone()}else i.pop(),n=null}},m=()=>{for(var t=0;t<50;t++){var i=2*l(1,3)+1,r=2*l(0,1+Math.floor(i/2)),o=i,s=i;p(2)?o+=r:s+=r,o=Math.min(o,e.width-4),s=Math.min(o,e.height-4);var a=2*l(0,Math.floor((e.width-o)/2))+1,c=2*l(0,Math.floor((e.height-s)/2))+1;a+o>e.width&&(a=Math.max(1,e.width-o-1)),c+s>e.height&&(c=Math.max(1,e.height-s-1));var h=new Hl(a,c,o,s),u=!1;for(var d of n)if(h.intersects(d)){u=!0;break}u||(n.push(h),b(),g(a,c,o,s))}},g=(e,t,n,i)=>{for(var r=e;r{let e={};a.forEach((t=>{t.forEach((t=>{if("floor"===t.type)return;let n=zl.unique(Vl(t).map((e=>e.region)).filter((e=>!zl.isUndefined(e))));if(n.length<=1)return;let i=n.join("-");e[i]||(e[i]=[]),e[i].push(t)}))})),zl.each(e,(e=>{let t=l(0,e.length-1);e[t].type="door",e.splice(t,1),e.forEach((e=>{p(50)&&(e.type="door")}))}))},p=e=>1===l(1,e),_=()=>{var e=!1;const t=()=>{let e=!0;return a.forEach((t=>{t.forEach((t=>{"wall"!==t.type&&Vl(t).filter((e=>"wall"!==e.type)).length<=1&&!n.find((e=>e.containsTile(t.x,t.y)))&&(t.type="wall",e=!1)}))})),e};for(;!e;)e=!0,e=t()},y=(e,t)=>{let n=e.clone().add(t).add(t).add(t).toObject();if(!a[n.x]||!a[n.x][n.y])return!1;if("wall"!==c(n.x,n.y).type)return!1;let i=e.clone().add(t).add(t).toObject();return"floor"!==c(i.x,i.y).type},b=()=>++i,C=(e,t,n="floor")=>{((e,t,n)=>{if(a[e]&&a[e][t])return a[e][t].type=n,a[e][t].region=i,a[e][t];throw new RangeError(`tile at ${e}, ${t} is unreachable`)})(e,t,n)};return{build:e=>{if(e.width<5)throw new RangeError(`DungeoneerError: options.width must not be less than 5, received ${e.width}`);if(e.height<5)throw new RangeError(`DungeoneerError: options.height must not be less than 5, received ${e.height}`);e.width%2==0&&(e.width+=1),e.height%2==0&&(e.height+=1);const i=e.seed||`${Yl.word({length:7})}-${Yl.word({length:7})}`;t=new Wo(i),s=i,o(e),h("wall"),m();for(var r=1;r(new ql).build(e);const Xl=2.3283064365386963e-10;class Jl{constructor(){this._seed=0,this._s0=0,this._s1=0,this._s2=0,this._c=0}getSeed(){return this._seed}setSeed(e){return e=e<1?1/e:e,this._seed=e,this._s0=(e>>>0)*Xl,e=69069*e+1>>>0,this._s1=e*Xl,e=69069*e+1>>>0,this._s2=e*Xl,this._c=1,this}getUniform(){let e=2091639*this._s0+this._c*Xl;return this._s0=this._s1,this._s1=this._s2,this._c=0|e,this._s2=e-this._c,this._s2}getUniformInt(e,t){let n=Math.max(e,t),i=Math.min(e,t);return Math.floor(this.getUniform()*(n-i+1))+i}getNormal(e=0,t=1){let n,i,r;do{n=2*this.getUniform()-1,i=2*this.getUniform()-1,r=n*n+i*i}while(r>1||0==r);return e+n*Math.sqrt(-2*Math.log(r)/r)*t}getPercentage(){return 1+Math.floor(100*this.getUniform())}getItem(e){return e.length?e[Math.floor(this.getUniform()*e.length)]:null}shuffle(e){let t=[],n=e.slice();for(;n.length;){let e=n.indexOf(this.getItem(n));t.push(n.splice(e,1)[0])}return t}getWeightedValue(e){let t=0;for(let n in e)t+=e[n];let n,i=this.getUniform()*t,r=0;for(n in e)if(r+=e[n],i{class e extends class extends class{getContainer(){return null}setOptions(e){this._options=e}}{constructor(){super(),this._ctx=document.createElement("canvas").getContext("2d")}schedule(e){requestAnimationFrame(e)}getContainer(){return this._ctx.canvas}setOptions(e){super.setOptions(e);const t=`${e.fontStyle?`${e.fontStyle} `:""} ${e.fontSize}px ${e.fontFamily}`;this._ctx.font=t,this._updateSize(),this._ctx.font=t,this._ctx.textAlign="center",this._ctx.textBaseline="middle"}clear(){this._ctx.fillStyle=this._options.bg,this._ctx.fillRect(0,0,this._ctx.canvas.width,this._ctx.canvas.height)}eventToPosition(e,t){let n=this._ctx.canvas,i=n.getBoundingClientRect();return e-=i.left,t-=i.top,e*=n.width/i.width,t*=n.height/i.height,e<0||t<0||e>=n.width||t>=n.height?[-1,-1]:this._normalizedEventToPosition(e,t)}}{constructor(){super(),this._spacingX=0,this._spacingY=0,this._canvasCache={}}setOptions(e){super.setOptions(e),this._canvasCache={}}draw(t,n){e.cache?this._drawWithCache(t):this._drawNoCache(t,n)}_drawWithCache(e){let t,[n,i,r,o,s]=e,a=""+r+o+s;if(a in this._canvasCache)t=this._canvasCache[a];else{let e=this._options.border;t=document.createElement("canvas");let n=t.getContext("2d");if(t.width=this._spacingX,t.height=this._spacingY,n.fillStyle=s,n.fillRect(e,e,t.width-e,t.height-e),r){n.fillStyle=o,n.font=this._ctx.font,n.textAlign="center",n.textBaseline="middle";let e=[].concat(r);for(let t=0;t1&&(i=Math.floor(i/s)),Math.floor(i/this._options.spacing)}_normalizedEventToPosition(e,t){return[Math.floor(e/this._spacingX),Math.floor(t/this._spacingY)]}_updateSize(){const e=this._options,t=Math.ceil(this._ctx.measureText("W").width);this._spacingX=Math.ceil(e.spacing*t),this._spacingY=Math.ceil(e.spacing*e.fontSize),e.forceSquareRatio&&(this._spacingX=this._spacingY=Math.max(this._spacingX,this._spacingY)),this._ctx.canvas.width=e.width*this._spacingX,this._ctx.canvas.height=e.height*this._spacingY}}e.cache=!1})();const Ql={4:[[0,-1],[1,0],[0,1],[-1,0]],8:[[0,-1],[1,-1],[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1]],6:[[-1,-1],[1,-1],[2,0],[1,1],[-1,1],[-2,0]]};class $l{constructor(e=80,t=25){this._width=e,this._height=t}_fillMap(e){let t=[];for(let n=0;nthis._options.timeLimit)return null;if(this._map=this._fillMap(1),this._dug=0,this._rooms=[],this._unconnected=[],this._generateRooms(),!(this._rooms.length<2)&&this._generateCorridors())break}if(e)for(let t=0;tthis._options.roomDugPercentage)break}while(e)}_generateRoom(){let e=0;for(;e0?2:0,o=(r+2)%4,s=t.getLeft(),a=t.getRight(),l=0):(r=u>0?1:3,o=(r+2)%4,s=t.getTop(),a=t.getBottom(),l=1),n=this._placeInWall(e,r),!n)return!1;if(n[l]>=s&&n[l]<=a){i=n.slice();let e=0;switch(o){case 0:e=t.getTop()-1;break;case 1:e=t.getRight()+1;break;case 2:e=t.getBottom()+1;break;case 3:e=t.getLeft()-1}i[(l+1)%2]=e,this._digLine([n,i])}else if(n[l]a+1){let e=n[l]-h[l],r=0;switch(o){case 0:case 1:r=e<0?3:1;break;case 2:case 3:r=e<0?1:3}if(o=(o+r)%4,i=this._placeInWall(t,o),!i)return!1;let s=[0,0];s[l]=n[l];let a=(l+1)%2;s[a]=i[a],this._digLine([n,s,i])}else{let e=(l+1)%2;if(i=this._placeInWall(t,o),!i)return!1;let r=Math.round((i[e]+n[e])/2),s=[0,0],a=[0,0];s[l]=n[l],s[e]=r,a[l]=i[l],a[e]=r,this._digLine([n,s,a,i])}return e.addDoor(n[0],n[1]),t.addDoor(i[0],i[1]),l=this._unconnected.indexOf(e),-1!=l&&(this._unconnected.splice(l,1),this._connected.push(e)),l=this._unconnected.indexOf(t),-1!=l&&(this._unconnected.splice(l,1),this._connected.push(t)),!0}_placeInWall(e,t){let n=[0,0],i=[0,0],r=0;switch(t){case 0:i=[1,0],n=[e.getLeft(),e.getTop()-1],r=e.getRight()-e.getLeft()+1;break;case 1:i=[0,1],n=[e.getRight()+1,e.getTop()],r=e.getBottom()-e.getTop()+1;break;case 2:i=[1,0],n=[e.getLeft(),e.getBottom()+1],r=e.getRight()-e.getLeft()+1;break;case 3:i=[0,1],n=[e.getLeft()-1,e.getTop()],r=e.getBottom()-e.getTop()+1}let o=[],s=-2;for(let e=0;e=0;e--)o[e]||o.splice(e,1);return o.length?Zl.getItem(o):null}_digLine(e){for(let t=1;t=this._width||t>=this._height)&&1==this._map[e][t]}_canBeDugCallback(e,t){return!(e<1||t<1||e+1>=this._width||t+1>=this._height)&&1==this._map[e][t]}},Cellular:class extends $l{constructor(e,t,n={}){super(e,t),this._options={born:[5,6,7,8],survive:[4,5,6,7,8],topology:8},this.setOptions(n),this._dirs=Ql[this._options.topology],this._map=this._fillMap(0)}randomize(e){for(let t=0;t=this._width||s<0||s>=this._height||(n+=1==this._map[o][s]?1:0)}return n}connect(e,t,n){t||(t=0);let i=[],r={},o=1,s=[0,0];6==this._options.topology&&(o=2,s=[0,1]);for(let e=0;e0;){let e=this._getFromTo(c,r),i=e[0],o=e[1],s={};s[this._pointKey(i)]=i,this._findConnected(s,r,[i],!0,t),(6==this._options.topology?this._tunnelToConnected6:this._tunnelToConnected).call(this,o,i,c,r,t,n);for(let e in s){let n=s[e];this._map[n[0]][n[1]]=t,c[e]=n,delete r[e]}}e&&this._serviceCallback(e)}_getFromTo(e,t){let n,i=[0,0],r=[0,0],o=Object.keys(e),s=Object.keys(t);for(let a=0;a<5;a++){if(o.length0;){let o,s=n.splice(0,1)[0];o=6==this._options.topology?[[s[0]+2,s[1]],[s[0]+1,s[1]-1],[s[0]-1,s[1]-1],[s[0]-2,s[1]],[s[0]-1,s[1]+1],[s[0]+1,s[1]+1]]:[[s[0]+1,s[1]],[s[0]-1,s[1]],[s[0],s[1]+1],[s[0],s[1]-1]];for(let s=0;sa[1]&&(c--,e=1),la[0]||a[1]%2?l-=e:l+=e,this._map[l][c]=r;let t=[l,c],o=this._pointKey(t);n[o]=t,delete i[o]}o&&o(t,e)}_freeSpace(e,t,n){return e>=0&&e=0&&tthis._options.timeLimit)break;let e=this._findWall();if(!e)break;let t=e.split(","),r=parseInt(t[0]),o=parseInt(t[1]),s=this._getDiggingDirection(r,o);if(!s)continue;let a=0;do{if(a++,this._tryFeature(r,o,s[0],s[1])){this._removeSurroundingWalls(r,o),this._removeSurroundingWalls(r-s[0],o-s[1]);break}}while(a1&&n++}while(this._dug/t=this._width||t>=this._height)&&1==this._map[e][t]}_canBeDugCallback(e,t){return!(e<1||t<1||e+1>=this._width||t+1>=this._height)&&1==this._map[e][t]}_priorityWallCallback(e,t){this._walls[e+","+t]=2}_firstRoom(){let e=Math.floor(this._width/2),t=Math.floor(this._height/2),n=nc.createRandomCenter(e,t,this._options);this._rooms.push(n),n.create(this._digCallback)}_findWall(){let e=[],t=[];for(let n in this._walls){2==this._walls[n]?t.push(n):e.push(n)}let n=t.length?t:e;if(!n.length)return null;let i=Zl.getItem(n.sort());return delete this._walls[i],i}_tryFeature(e,t,n,i){let r=Zl.getWeightedValue(this._features),o=rc[r].createRandomAt(e,t,n,i,this._options);return!!o.isValid(this._isWallCallback,this._canBeDugCallback)&&(o.create(this._digCallback),o instanceof nc&&this._rooms.push(o),o instanceof ic&&(o.createPriorityWalls(this._priorityWallCallback),this._corridors.push(o)),!0)}_removeSurroundingWalls(e,t){let n=Ql[4];for(let i=0;i=this._width-1||t>=this._height-1)return null;let n=null,i=Ql[4];for(let r=0;rr&&(oc(e,o,s),n[i+1][a]=0),e!=o[e]&&Zl.getUniform()>r?sc(e,o,s):n[i][a+1]=0}for(let e=0;er)&&(oc(e,o,s),n[i+1][a]=0),sc(e,o,s)}for(let t=0;t=i||n>=r)&&e[t][n]}},Rogue:class extends $l{constructor(e,t,n){super(e,t),this.map=[],this.rooms=[],this.connectedCells=[],(n=Object.assign({cellWidth:3,cellHeight:3},n)).hasOwnProperty("roomWidth")||(n.roomWidth=this._calculateRoomSize(this._width,n.cellWidth)),n.hasOwnProperty("roomHeight")||(n.roomHeight=this._calculateRoomSize(this._height,n.cellHeight)),this._options=n}create(e){if(this.map=this._fillMap(1),this.rooms=[],this.connectedCells=[],this._initRooms(),this._connectRooms(),this._connectUnconnectedRooms(),this._createRandomRoomConnections(),this._createRooms(),this._createCorridors(),e)for(let t=0;t=this._options.cellWidth||n<0||n>=this._options.cellHeight)){if(i=this.rooms[s][a],i.connections.length>0&&i.connections[0][0]==t&&i.connections[0][1]==n)break;r=this.rooms[t][n],0==r.connections.length&&(r.connections.push([s,a]),this.connectedCells.push([t,n]),s=t,a=n,l=!0)}}while(o.length>0&&0==l)}while(o.length>0)}_connectUnconnectedRooms(){let e,t,n,i=this._options.cellWidth,r=this._options.cellHeight;this.connectedCells=Zl.shuffle(this.connectedCells);for(let o=0;o=i||c<0||c>=r)){if(t=this.rooms[l][c],n=!0,0==t.connections.length)break;for(let e=0;e0)for(r=this.rooms[m][a-1];i-(r.y+r.height)<3;)i++;if(m>0)for(r=this.rooms[m-1][a];n-(r.x+r.width)<3;)n++;let l=Math.round(Zl.getUniformInt(0,c-e)/2),g=Math.round(Zl.getUniformInt(0,h-t)/2);for(;n+l+e>=o;)l?l--:e--;for(;i+g+t>=s;)g?g--:t--;n+=l,i+=g,this.rooms[m][a].x=n,this.rooms[m][a].y=i,this.rooms[m][a].width=e,this.rooms[m][a].height=t;for(let r=n;r0?2:6,r=a>0?4:0,u0;)for(o=h.pop();o[1]>0;)l+=Ql[8][o[0]][0],c+=Ql[8][o[0]][1],this.map[l][c]=0,o[1]=o[1]-1}_createCorridors(){let e,t,n,i,r,o=this._options.cellWidth,s=this._options.cellHeight;for(let a=0;ae.cellx?(i=2,r=4):n.cellxe.celly?(i=3,r=1):(i=1,r=3),this._drawCorridor(this._getWallPosition(e,i),this._getWallPosition(n,r))}}}},lc=()=>Math.ceil(canvas.scene.width*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,cc=()=>Math.ceil(canvas.scene.height*canvas.scene.padding/canvas.scene.grid.size)*canvas.scene.grid.size,hc=async(e,t)=>{const n=1*t.height,i=1*t.width,r=new ac.Cellular(i,n);r.randomize(.5);for(let e=0;e<4;e++)r.create();t.connectCaves&&r.connect(null,1);const o=canvas.scene.grid.size/1,s=lc(),a=cc();let l;for(let e=0;e{const n=t.height,i=t.width,r=new zo({max_iterations:50,size:[i,n],rooms:{any:{min_size:[t.minRoomSize,t.minRoomSize],max_size:[t.maxRoomSize,t.maxRoomSize],max_exits:4}},min_corridor_length:2,max_corridor_length:8,corridor_density:.5,symmetric_rooms:t.centerExits,interconnects:t.circularPaths?1:0,max_interconnect_length:10,room_count:t.roomCount});r.generate();const o=canvas.scene.grid.size,s=lc(),a=cc();let l;for(let e=0;e{const n=Kl({width:t.width,height:t.height}),i=canvas.scene.grid.size,r=lc(),o=cc();let s;const a=[];for(const e of n.tiles)for(const t of e){if("floor"===t.type||"door"===t.type){const e={x:r+t.x*i,y:o+t.y*i,height:i,width:i},n=Mr(e);s=s?Ir(s,n):n}"door"===t.type&&("floor"===t.neighbours.w?.type?a.push([r+(t.x+.5)*i,o+t.y*i,r+(t.x+.5)*i,o+(t.y+1)*i]):a.push([r+t.x*i,o+(t.y+.5)*i,r+(t.x+1)*i,o+(t.y+.5)*i]))}s=Gr(s);const l=e.state().clone();l.geometry=s,l.doors=t.generateDungeoneerDoors?a:[],await e.pushState(l)},mc=()=>KeyboardManager.MODIFIER_KEYS?.SHIFT?game.keyboard.isModifierActive(KeyboardManager.MODIFIER_KEYS.SHIFT):game.keyboard.isDown("SHIFT"),gc=async()=>{let e=game.folders.filter((e=>"JournalEntry"===e.type&&"Dungeon Draw"===e.name)).pop();e||(e=await Folder.create({name:"Dungeon Draw",type:"JournalEntry"}));return await JournalEntry.create({name:canvas.scene.name,folder:e.id,flags:{"dungeon-draw":{dungeonVersion:"1.0"}}})},fc=async e=>{await canvas.scene.createEmbeddedDocuments("Note",[{entryId:e.id,fontSize:20,icon:"icons/svg/cave.svg",iconSize:32,textAnchor:1,textColor:"#FFFFFF",x:50,y:50,iconTint:"",text:"Dungeon Draw",flags:{}}])},pc=e=>{const t=[];for(let n=0;n<=e.shape.points.length-2;n+=2)t.push([e.shape.points[n]+e.x,e.shape.points[n+1]+e.y]);return t};class _c extends PlaceablesLayer{static LAYER_NAME="dungeon";constructor(){super(),this.dungeon=null}static get layerOptions(){return foundry.utils.mergeObject(super.layerOptions,{name:_c.LAYER_NAME,canDragCreate:!0,snapToGrid:t.snapToGrid(),zIndex:-1,quadtree:!0})}static documentName="Drawing";_getNewDrawingData(e){const t={fillColor:game.user.color,strokeColor:game.user.color,strokeWidth:8};if(t.x=e.x,t.y=e.y,t.author=game.user.id,t.shape={},"add"===game.activeDungeonDrawMode)switch(game.activeDungeonDrawTool){case"rectangle":t.shape.type=CONST.DRAWING_TYPES.RECTANGLE,t.shape.width=1,t.shape.height=1;break;case"polygon":case"interiorwall":case"door":case"secretdoor":case"invisiblewall":case"themepainter":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=0;break;case"freehand":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=t.bezierFactor??.5;break;case"ellipse":t.type=CONST.DRAWING_TYPES.ELLIPSE,t.shape.width=1,t.shape.height=1}else if("remove"===game.activeDungeonDrawMode)switch(game.activeDungeonDrawTool){case"rectangle":case"interiorwall":case"door":case"secretdoor":case"invisiblewall":case"themepainter":t.type=CONST.DRAWING_TYPES.RECTANGLE,t.shape.width=1,t.shape.height=1;break;case"polygon":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=0;break;case"freehand":t.type=CONST.DRAWING_TYPES.POLYGON,t.points=[0,0],t.bezierFactor=t.bezierFactor??.5;break;case"ellipse":t.type=CONST.DRAWING_TYPES.ELLIPSE,t.shape.width=1,t.shape.height=1}return t}async undoHistory(){return super.undoHistory()}async deleteAll(){if(!game.user.isGM)throw new Error("You do not have permission to clear all.");return Dialog.confirm({title:game.i18n.localize("DD.ButtonTitleClearAll"),content:`

${game.i18n.localize("DD.ClearAllDialogContent")}

`,yes:()=>this.dungeon?.deleteAll()})}async generate(e){this.dungeon?await this.dungeon.deleteAll():await this.createNewDungeon(),await(async(e,t={})=>{try{switch(t.algorithm){case"2d-dungeon":await uc(e,t);break;case"rot-js-cellular":await hc(e,t);break;case"dungeoneer":await dc(e,t)}}catch(e){console.error(e),ui.notifications.error("Error generating dungeon... please try again.")}})(this.dungeon,e)}async loadDungeon(){const{journalEntry:t,note:n}=await(()=>{for(const t of canvas.scene.notes){const n=game.journal.get(t.entryId);if(n&&n.getFlag(e,"dungeonVersion"))return{journalEntry:n,note:t}}return{journalEntry:null,note:null}})();t?(this.dungeon=new So(t,n),await this.dungeon.loadFromJournalEntry(),this.addChildAt(this.dungeon,0)):this.dungeon=null}async createNewDungeon(){await(async()=>{const e=await gc();return{journalEntry:e,note:await fc(e)}})(),await this.loadDungeon()}async draw(){return await super.draw(),this}_onClickLeft(e){const{preview:t,createState:n,originalEvent:i}=e.data;if(n>=1&&t.isPolygon){let n=e.data.destination;return i.shiftKey||(n=canvas.grid.getSnappedPosition(n.x,n.y,this.gridPrecision)),t._addPoint(n,!1),t._chain=!0,t.refresh()}super._onClickLeft(e)}_onClickLeft2(e){const{createState:t,preview:n}=e.data;if(t>=1&&n.isPolygon)return e.data.createState=2,this._onDragLeftDrop(e);super._onClickLeft2(e)}async _onDragLeftStart(e){e.data.originalEvent.isShift=mc(),await super._onDragLeftStart(e),e.data.createState=1;const t=this._getNewDrawingData(e.data.origin),n=new DrawingDocument(t,{parent:canvas.scene}),i=new Drawing(n);return e.data.preview=this.preview.addChild(i),i.draw()}_onDragLeftMove(e){const{preview:t,createState:n}=e.data;if(t&&!t._destroyed&&(null===t.parent&&this.preview.addChild(t),n>=1)){"freehand"===game.activeDungeonDrawTool?((e,t)=>{const{destination:n}=t.data,i=n,r=Date.now()-e._drawTime4&&(e.shape.points[0]!==e.shape.points[t-2]||e.shape.points[1]!==e.shape.points[t-1])&&e.shape.points.push(e.shape.points[0],e.shape.points[1])}async _onDragLeftDrop(e){const{createState:t,destination:n,origin:i,preview:r}=e.data,o=game.activeDungeonDrawMode+game.activeDungeonDrawTool;if(2===t||"freehand"===game.activeDungeonDrawTool){this.dungeon||await this.createNewDungeon();const t=Math.hypot(n.x-i.x,n.y-i.y)>=canvas.dimensions.size/8,s=r.isPolygon&&r.document.shape.points.length>4;if("adddoor"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addDoor(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addsecretdoor"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addSecretDoor(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addinteriorwall"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addInteriorWall(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if("addinvisiblewall"===o){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1,this._maybeSnapLastPoint(t),await this.dungeon.addInvisibleWall(t.x,t.y,t.x+t.shape.points[2],t.y+t.shape.points[3])}else if(t||s){e.data.createState=0;const t=r.document.toObject(!1);r._chain=!1;const n=this.constructor.placeableClass.normalizeShape(t);if("addellipse"===o){const e=n.x+n.shape.width/2,t=n.y+n.shape.height/2;await this.dungeon.addEllipse(e,t,n.shape.width,n.shape.height)}else if("addfreehand"===o){this._autoClosePolygon(n);const e=pc(n);await this.dungeon.addPolygon(e)}else if("addpolygon"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=pc(n);await this.dungeon.addPolygon(e)}else if("addrectangle"===o){const e=this._maybeSnappedRect(n);await this.dungeon.addRectangle(e)}else if("addthemepainter"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=pc(n);await this.dungeon.addThemeArea(e)}else if("removedoor"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeDoors(e)}else if("removeellipse"===o){const e=n.x+n.shape.width/2,t=n.y+n.shape.height/2;await this.dungeon.removeEllipse(e,t,n.shape.width,n.shape.height)}else if("removefreehand"===o){this._autoClosePolygon(n);const e=pc(n);await this.dungeon.removePolygon(e)}else if("removesecretdoor"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeSecretDoors(e)}else if("removeinteriorwall"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeInteriorWalls(e)}else if("removeinvisiblewall"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeInvisibleWalls(e)}else if("removepolygon"===o){this._maybeSnapLastPoint(n),this._autoClosePolygon(n);const e=pc(n);await this.dungeon.removePolygon(e)}else if("removerectangle"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeRectangle(e)}else if("removethemepainter"===o){const e=this._maybeSnappedRect(n);await this.dungeon.removeThemeAreas(e)}}return this._onDragLeftCancel(e)}if(1===t&&r.isPolygon){if(e.data.originalEvent.preventDefault(),r._chain)return;return this._onClickLeft(e)}return this._onDragLeftCancel(e)}}class yc extends FormApplication{constructor(e="settings"){super(),this._tabs[0].active=e}static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-generator-sheet",classes:["sheet"],template:"modules/dungeon-draw/templates/generator-sheet.html",width:480,height:800,tabs:[{navSelector:".tabs",contentSelector:"form",initial:"position"}]})}get title(){return game.i18n.localize("DD.GeneratorSheetTitle")}getData(){return{height:30,width:30,centerExits:!1,circularPaths:!1,generate2DDungeonDoors:!0,maxRoomSize:7,minRoomSize:3,roomCount:15,generateDungeoneerDoors:!0,connectCaves:!0,smoothing:0}}activateListeners(e){super.activateListeners(e),e.find('button[name="generate"]').click(this.generate.bind(this)),e.find('select[name="algorithm"]').change(this.changeAlgorithm.bind(this)),this.changeAlgorithm()}async changeAlgorithm(e){e?.preventDefault();const t=`.${this._getSubmitData().algorithm}`;$(".alg-fields").filter(t).show(),$(".alg-fields").not(t).hide()}async generate(e){e.preventDefault();const t=this._getSubmitData();await canvas.dungeon.generate(t)}}class bc{static register(){game.keybindings.register(e,"redo",{name:"DD.ButtonTitleRedo",uneditable:[{key:"KeyY",modifiers:[KeyboardManager.MODIFIER_KEYS.CONTROL]}],onDown:bc.onRedo}),game.keybindings.register(e,"undo",{name:"DD.ButtonTitleUndo",uneditable:[{key:"KeyZ",modifiers:[KeyboardManager.MODIFIER_KEYS.CONTROL]}],onDown:bc.onUndo})}static onRedo(){if(!canvas.ready)return!1;const e=canvas.activeLayer;return e instanceof _c&&(e.dungeon?.redo(),!0)}static onUndo(){if(!canvas.ready)return!1;const e=canvas.activeLayer;return e instanceof _c&&(e.dungeon?.undo(),!0)}}class Cc extends Application{static get defaultOptions(){return foundry.utils.mergeObject(super.defaultOptions,{id:"dd-toolbar",popOut:!1,template:"modules/dungeon-draw/templates/toolbar.html"})}constructor(){super()}activateListeners(e){super.activateListeners(e),e.find(".addremove-toggle").click(this.addRemoveClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this.themeSelectChange.bind(this)),e.find(".control-tool").click(this.controlToolClick.bind(this)),e.find('select[name="themePainterThemeKey"]').change(this.themeSelectChange.bind(this))}getData(){const e=n(),t=Object.keys(e).sort(),i=Object.keys(s).sort(),o=r(),a="add"===game.activeDungeonDrawMode?"toggle-on":"",l="remove"===game.activeDungeonDrawMode?"toggle-on":"";return{customThemes:e,customThemeKeys:t,row1:[{name:"rectangle",title:"DD.ButtonTitleRectangle",icon:"fas fa-square",class:"add",isActive:"rectangle"===game.activeDungeonDrawTool},{name:"polygon",title:"DD.ButtonTitlePolygon",icon:"fas fa-draw-polygon",isActive:"polygon"===game.activeDungeonDrawTool},{name:"ellipse",title:"DD.ButtonTitleEllipse",icon:"fas fa-circle",isActive:"ellipse"===game.activeDungeonDrawTool},{name:"freehand",title:"DD.ButtonTitleFreehand",icon:"fas fa-signature",isActive:"freehand"===game.activeDungeonDrawTool}],row2:[{name:"interiorwall",title:"DD.ButtonTitleInteriorWall",icon:"fas fa-bars",isActive:"interiorwall"===game.activeDungeonDrawTool},{name:"door",title:"DD.ButtonTitleDoor",icon:"fas fa-door-open",isActive:"door"===game.activeDungeonDrawTool},{name:"secretdoor",title:"DD.ButtonTitleSecretDoor",icon:"fas fa-user-secret",isActive:"secretdoor"===game.activeDungeonDrawTool},{name:"invisiblewall",title:"DD.ButtonTitleInvisibleWall",icon:"fas fa-eye-slash",isActive:"invisiblewall"===game.activeDungeonDrawTool}],row3:[{name:"themepainter",title:"DD.ButtonTitleThemePainter",icon:"fas fa-brush",isActive:"themepainter"===game.activeDungeonDrawTool}],themeKeys:i,themePainterThemeKey:o,themes:s,toggleAddClass:a,toggleRemoveClass:l}}render(e=!1,t={}){super.render(e,t)}updateActiveCss(){this._element.find(".control-tool").removeClass("active"),this._element.find(`[data-tool='${game.activeDungeonDrawTool}']`).addClass("active")}addRemoveClick(e){game.activeDungeonDrawMode=$(e.target).data("addremove"),this._element.find(".addremove-toggle").removeClass("toggle-on"),$(e.currentTarget).addClass("toggle-on")}controlToolClick(e){const t=$(e.currentTarget).data("tool");game.activeDungeonDrawTool=t,this.updateActiveCss()}themeSelectChange(e){const t=$(e.currentTarget).val();o(t)}}const xc=new Cc;class vc{static init(){t.register(),bc.register(),game.activeDungeonDrawTool="rectangle",game.activeDungeonDrawMode="add"}static ready(){}static controlsVisible(){if(game.user.isGM)return!0;return game.settings.get(e,"allowTrustedPlayer")&&game.user.isTrusted}static getSceneControlButtons(e){CONFIG.Canvas.layers.dungeon={layerClass:_c,group:"primary"},CONFIG.Dungeon={layerClass:_c},e.push({name:"dungeondraw",title:"DD.SceneControlTitle",layer:_c.LAYER_NAME,icon:"fas fa-dungeon",visible:vc.controlsVisible(),tools:[{name:"drawmap",title:"DD.ButtonTitleDrawMap",icon:"fas fa-dungeon"},{name:"undo",title:"DD.ButtonTitleUndo",icon:"fas fa-undo",onClick:async()=>{await canvas.dungeon.dungeon.undo()},button:!0},{name:"redo",title:"DD.ButtonTitleRedo",icon:"fas fa-redo",onClick:async()=>{await canvas.dungeon.dungeon.redo()},button:!0},{name:"generate",title:"DD.ButtonTitleGenerate",icon:"fas fa-magic",onClick:async()=>(new yc).render(!0),button:!0},{name:"config",title:"DD.ButtonTitleConfig",icon:"fas fa-cog",onClick:()=>(new l).render(!0),button:!0},{name:"savetoscene",title:"DD.ButtonTitleSaveToSceneBackground",icon:"fas fa-sign-out-alt",visible:game.user.isGM,onClick:async()=>{await canvas.dungeon.dungeon.saveToSceneBackground()},button:!0},{name:"clear",title:"DD.ButtonTitleClearAll",icon:"fas fa-trash",visible:game.user.isGM,onClick:()=>canvas.dungeon.deleteAll(),button:!0}],activeTool:"drawmap"})}static async canvasReady(e){await e.dungeon.loadDungeon()}static async updateJournalEntry(e,t,n,i){game.user.id!==i&&await(canvas.dungeon.dungeon?.maybeRefresh(e))}static async renderSceneControls(e){"dungeondraw"===e.activeControl?xc.render(!0):await xc.close()}}Hooks.on("init",vc.init),Hooks.on("ready",vc.ready),Hooks.on("getSceneControlButtons",vc.getSceneControlButtons),Hooks.on("canvasReady",vc.canvasReady),Hooks.on("updateJournalEntry",vc.updateJournalEntry),Hooks.on("renderSceneControls",vc.renderSceneControls);export{vc as DungeonDraw}; //# sourceMappingURL=dungeondraw-bundle.min.js.map diff --git a/modules/dungeondraw-bundle.min.js.map b/modules/dungeondraw-bundle.min.js.map index 0577988..8bff3e1 100644 --- a/modules/dungeondraw-bundle.min.js.map +++ b/modules/dungeondraw-bundle.min.js.map @@ -1 +1 @@ -{"version":3,"file":"dungeondraw-bundle.min.js","sources":["../src/constants.js","../src/settings.js","../src/themes.js","../src/themesheet.js","../src/configsheet.js","../node_modules/jsts/java/lang/Exception.js","../node_modules/jsts/java/lang/IllegalArgumentException.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryComponentFilter.js","../node_modules/jsts/java/lang/Comparable.js","../node_modules/jsts/java/lang/Cloneable.js","../node_modules/jsts/java/io/Serializable.js","../node_modules/jsts/org/locationtech/jts/util/NumberUtil.js","../node_modules/jsts/java/lang/Long.js","../node_modules/jsts/java/lang/Double.js","../node_modules/jsts/java/util/Comparator.js","../node_modules/jsts/java/lang/RuntimeException.js","../node_modules/jsts/org/locationtech/jts/util/AssertionFailedException.js","../node_modules/jsts/org/locationtech/jts/util/Assert.js","../node_modules/jsts/org/locationtech/jts/geom/Coordinate.js","../node_modules/jsts/org/locationtech/jts/geom/Envelope.js","../node_modules/jsts/org/locationtech/jts/geom/Geometry.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateFilter.js","../node_modules/jsts/hasInterface.js","../node_modules/jsts/org/locationtech/jts/geom/Lineal.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequence.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequences.js","../node_modules/jsts/java/lang/UnsupportedOperationException.js","../node_modules/jsts/java/lang/Character.js","../node_modules/jsts/org/locationtech/jts/geom/Dimension.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryFilter.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFilter.js","../node_modules/jsts/org/locationtech/jts/geom/LineString.js","../node_modules/jsts/org/locationtech/jts/algorithm/Length.js","../node_modules/jsts/java/util/Collection.js","../node_modules/jsts/java/lang/IndexOutOfBoundsException.js","../node_modules/jsts/java/util/List.js","../node_modules/jsts/java/util/NoSuchElementException.js","../node_modules/jsts/java/util/ArrayList.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateList.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFactory.js","../node_modules/jsts/org/locationtech/jts/geom/Puntal.js","../node_modules/jsts/org/locationtech/jts/geom/Point.js","../node_modules/jsts/org/locationtech/jts/algorithm/Area.js","../node_modules/jsts/java/util/Arrays.js","../node_modules/jsts/java/lang/StringBuffer.js","../node_modules/jsts/java/lang/Integer.js","../node_modules/jsts/org/locationtech/jts/math/DD.js","../node_modules/jsts/org/locationtech/jts/algorithm/CGAlgorithmsDD.js","../node_modules/jsts/org/locationtech/jts/algorithm/Orientation.js","../node_modules/jsts/org/locationtech/jts/geom/Polygonal.js","../node_modules/jsts/org/locationtech/jts/geom/Polygon.js","../node_modules/jsts/java/util/Set.js","../node_modules/jsts/java/util/SortedSet.js","../node_modules/jsts/java/util/TreeSet.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryCollection.js","../node_modules/jsts/org/locationtech/jts/geom/MultiPoint.js","../node_modules/jsts/org/locationtech/jts/geom/LinearRing.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXY.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXYM.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXYZM.js","../node_modules/jsts/org/locationtech/jts/geom/Coordinates.js","../node_modules/jsts/org/locationtech/jts/math/MathUtil.js","../node_modules/jsts/java/lang/System.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateArrays.js","../node_modules/jsts/java/lang/StringBuilder.js","../node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequence.js","../node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequenceFactory.js","../node_modules/jsts/org/locationtech/jts/geom/MultiPolygon.js","../node_modules/jsts/java/util/Map.js","../node_modules/jsts/java/util/HashSet.js","../node_modules/jsts/java/util/HashMap.js","../node_modules/jsts/org/locationtech/jts/geom/PrecisionModel.js","../node_modules/jsts/org/locationtech/jts/geom/MultiLineString.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryFactory.js","../node_modules/jsts/org/locationtech/jts/geom/util/GeometryTransformer.js","../node_modules/jsts/org/locationtech/jts/algorithm/Intersection.js","../node_modules/jsts/org/locationtech/jts/algorithm/Distance.js","../node_modules/jsts/org/locationtech/jts/io/WKTParser.js","../node_modules/jsts/org/locationtech/jts/io/WKTWriter.js","../node_modules/jsts/org/locationtech/jts/algorithm/LineIntersector.js","../node_modules/jsts/org/locationtech/jts/algorithm/RobustLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geom/LineSegment.js","../node_modules/jsts/org/locationtech/jts/io/WKTReader.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferParameters.js","../node_modules/jsts/org/locationtech/jts/geom/Location.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Position.js","../node_modules/jsts/java/util/EmptyStackException.js","../node_modules/jsts/java/util/Stack.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/RightmostEdgeFinder.js","../node_modules/jsts/org/locationtech/jts/geom/TopologyException.js","../node_modules/jsts/java/util/LinkedList.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferSubgraph.js","../node_modules/jsts/org/locationtech/jts/algorithm/RayCrossingCounter.js","../node_modules/jsts/org/locationtech/jts/algorithm/PointLocation.js","../node_modules/jsts/org/locationtech/jts/geomgraph/TopologyLocation.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Label.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeRing.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/MinimalEdgeRing.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/MaximalEdgeRing.js","../node_modules/jsts/org/locationtech/jts/geomgraph/GraphComponent.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Node.js","../node_modules/jsts/java/util/SortedMap.js","../node_modules/jsts/java/util/TreeMap.js","../node_modules/jsts/org/locationtech/jts/geomgraph/NodeMap.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Quadrant.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEnd.js","../node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdge.js","../node_modules/jsts/org/locationtech/jts/geomgraph/NodeFactory.js","../node_modules/jsts/org/locationtech/jts/geomgraph/PlanarGraph.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/PolygonBuilder.js","../node_modules/jsts/org/locationtech/jts/index/strtree/Boundable.js","../node_modules/jsts/org/locationtech/jts/index/strtree/ItemBoundable.js","../node_modules/jsts/org/locationtech/jts/util/PriorityQueue.js","../node_modules/jsts/org/locationtech/jts/index/SpatialIndex.js","../node_modules/jsts/org/locationtech/jts/index/strtree/AbstractNode.js","../node_modules/jsts/java/util/Collections.js","../node_modules/jsts/org/locationtech/jts/index/strtree/EnvelopeDistance.js","../node_modules/jsts/org/locationtech/jts/index/strtree/BoundablePair.js","../node_modules/jsts/org/locationtech/jts/index/ItemVisitor.js","../node_modules/jsts/org/locationtech/jts/index/strtree/AbstractSTRtree.js","../node_modules/jsts/org/locationtech/jts/index/strtree/ItemDistance.js","../node_modules/jsts/org/locationtech/jts/index/strtree/STRtree.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentPointComparator.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentNode.js","../node_modules/jsts/java/util/Iterator.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentNodeList.js","../node_modules/jsts/org/locationtech/jts/noding/Octant.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodableSegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodedSegmentString.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainOverlapAction.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChain.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainBuilder.js","../node_modules/jsts/org/locationtech/jts/noding/Noder.js","../node_modules/jsts/org/locationtech/jts/noding/SinglePassNoder.js","../node_modules/jsts/org/locationtech/jts/noding/MCIndexNoder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferInputLineSimplifier.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentString.js","../node_modules/jsts/org/locationtech/jts/algorithm/Angle.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentGenerator.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.js","../node_modules/jsts/org/locationtech/jts/algorithm/NotRepresentableException.js","../node_modules/jsts/org/locationtech/jts/algorithm/HCoordinate.js","../node_modules/jsts/org/locationtech/jts/geom/Triangle.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveSetBuilder.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/PointOnGeometryLocator.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryCollectionIterator.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/SimplePointInAreaLocator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEndStar.js","../node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdgeStar.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/OverlayNodeFactory.js","../node_modules/jsts/org/locationtech/jts/noding/OrientedCoordinateArray.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeList.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentIntersector.js","../node_modules/jsts/org/locationtech/jts/noding/IntersectionAdder.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersection.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersectionList.js","../node_modules/jsts/org/locationtech/jts/geom/IntersectionMatrix.js","../node_modules/jsts/org/locationtech/jts/util/IntArrayList.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainIndexer.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainEdge.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Depth.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Edge.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferBuilder.js","../node_modules/jsts/org/locationtech/jts/noding/ScaledNoder.js","../node_modules/jsts/org/locationtech/jts/noding/NodingValidator.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/HotPixel.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainSelectAction.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexPointSnapper.js","../node_modules/jsts/org/locationtech/jts/noding/InteriorIntersectionFinderAdder.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexSnapRounder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferOp.js","../node_modules/jsts/org/locationtech/jts/algorithm/BoundaryNodeRule.js","../node_modules/jsts/org/locationtech/jts/algorithm/PointLocator.js","../node_modules/jsts/org/locationtech/jts/noding/BasicSegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodingIntersectionFinder.js","../node_modules/jsts/org/locationtech/jts/noding/FastNodingValidator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeNodingValidator.js","../node_modules/jsts/org/locationtech/jts/geom/util/GeometryCollectionMapper.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/LineBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/PointBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/LineStringSnapper.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/GeometrySnapper.js","../node_modules/jsts/org/locationtech/jts/precision/CommonBits.js","../node_modules/jsts/org/locationtech/jts/precision/CommonBitsRemover.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/SnapOverlayOp.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/SnapIfNeededOverlayOp.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChain.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SweepLineEvent.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SegmentIntersector.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SimpleMCSweepLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/EdgeSetIntersector.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeLeafNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeBranchNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/SortedPackedIntervalRTree.js","../node_modules/jsts/org/locationtech/jts/geom/util/LinearComponentExtracter.js","../node_modules/jsts/org/locationtech/jts/index/ArrayListVisitor.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/IndexedPointInAreaLocator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/GeometryGraph.js","../node_modules/jsts/org/locationtech/jts/operation/GeometryGraphOperation.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/OverlayOp.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBundle.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBundleStar.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNode.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNodeFactory.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateComputer.js","../node_modules/jsts/org/locationtech/jts/operation/predicate/RectangleContains.js","../node_modules/jsts/org/locationtech/jts/algorithm/RectangleLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geom/util/ShortCircuitedGeometryVisitor.js","../node_modules/jsts/org/locationtech/jts/operation/predicate/RectangleIntersects.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateOp.js","../node_modules/jsts/org/locationtech/jts/operation/union/UnionOp.js","../node_modules/jsts/org/locationtech/jts/operation/valid/ConnectedInteriorTester.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNodeGraph.js","../node_modules/jsts/org/locationtech/jts/operation/valid/ConsistentAreaTester.js","../node_modules/jsts/org/locationtech/jts/operation/valid/IndexedNestedRingTester.js","../node_modules/jsts/org/locationtech/jts/operation/valid/TopologyValidationError.js","../node_modules/jsts/org/locationtech/jts/operation/valid/IsValidOp.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/NodeBase.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/DoubleBits.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Key.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Node.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/IntervalSize.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Root.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Quadtree.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineSegment.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineString.js","../node_modules/jsts/org/locationtech/jts/simplify/LineSegmentIndex.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineStringSimplifier.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLinesSimplifier.js","../node_modules/jsts/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js","../node_modules/jsts/org/locationtech/jts/geom/util/NoninvertibleTransformationException.js","../node_modules/jsts/org/locationtech/jts/geom/util/AffineTransformation.js","../node_modules/jsts/org/locationtech/jts/util/GeometricShapeFactory.js","../src/geo-utils.js","../src/wallmaker.js","../src/dungeonstate.js","../src/lib/pixi-filters.min.js","../src/renderer.js","../src/dungeon.js","../node_modules/json-stringify-safe/stringify.js","../node_modules/random-seed/index.js","../node_modules/2d-dungeon/lib/utils/random.js","../node_modules/2d-dungeon/lib/utils/array2d.js","../node_modules/2d-dungeon/lib/utils/rectangle.js","../node_modules/2d-dungeon/lib/const.js","../node_modules/2d-dungeon/lib/utils/index.js","../node_modules/2d-dungeon/lib/pieces/piece.js","../node_modules/2d-dungeon/lib/generators/generator.js","../node_modules/2d-dungeon/lib/pieces/room.js","../node_modules/2d-dungeon/lib/pieces/corridor.js","../node_modules/2d-dungeon/lib/generators/dungeon.js","../node_modules/2d-dungeon/index.js","../node_modules/chance/chance.js","../node_modules/victor/index.js","../node_modules/underscore/modules/_setup.js","../node_modules/underscore/modules/restArguments.js","../node_modules/underscore/modules/isObject.js","../node_modules/underscore/modules/isUndefined.js","../node_modules/underscore/modules/isBoolean.js","../node_modules/underscore/modules/_tagTester.js","../node_modules/underscore/modules/isString.js","../node_modules/underscore/modules/isNumber.js","../node_modules/underscore/modules/isDate.js","../node_modules/underscore/modules/isRegExp.js","../node_modules/underscore/modules/isError.js","../node_modules/underscore/modules/isSymbol.js","../node_modules/underscore/modules/isArrayBuffer.js","../node_modules/underscore/modules/isFunction.js","../node_modules/underscore/modules/_hasObjectTag.js","../node_modules/underscore/modules/_stringTagBug.js","../node_modules/underscore/modules/isDataView.js","../node_modules/underscore/modules/isArray.js","../node_modules/underscore/modules/_has.js","../node_modules/underscore/modules/isArguments.js","../node_modules/underscore/modules/isNaN.js","../node_modules/underscore/modules/constant.js","../node_modules/underscore/modules/_createSizePropertyCheck.js","../node_modules/underscore/modules/_shallowProperty.js","../node_modules/underscore/modules/_getByteLength.js","../node_modules/underscore/modules/_isBufferLike.js","../node_modules/underscore/modules/isTypedArray.js","../node_modules/underscore/modules/_getLength.js","../node_modules/underscore/modules/_collectNonEnumProps.js","../node_modules/underscore/modules/keys.js","../node_modules/underscore/modules/isMatch.js","../node_modules/underscore/modules/underscore.js","../node_modules/underscore/modules/_toBufferView.js","../node_modules/underscore/modules/isEqual.js","../node_modules/underscore/modules/allKeys.js","../node_modules/underscore/modules/_methodFingerprint.js","../node_modules/underscore/modules/isMap.js","../node_modules/underscore/modules/isWeakMap.js","../node_modules/underscore/modules/isSet.js","../node_modules/underscore/modules/isWeakSet.js","../node_modules/underscore/modules/values.js","../node_modules/underscore/modules/invert.js","../node_modules/underscore/modules/functions.js","../node_modules/underscore/modules/_createAssigner.js","../node_modules/underscore/modules/extend.js","../node_modules/underscore/modules/extendOwn.js","../node_modules/underscore/modules/defaults.js","../node_modules/underscore/modules/_baseCreate.js","../node_modules/underscore/modules/toPath.js","../node_modules/underscore/modules/_toPath.js","../node_modules/underscore/modules/_deepGet.js","../node_modules/underscore/modules/get.js","../node_modules/underscore/modules/identity.js","../node_modules/underscore/modules/matcher.js","../node_modules/underscore/modules/property.js","../node_modules/underscore/modules/_optimizeCb.js","../node_modules/underscore/modules/_baseIteratee.js","../node_modules/underscore/modules/iteratee.js","../node_modules/underscore/modules/_cb.js","../node_modules/underscore/modules/noop.js","../node_modules/underscore/modules/random.js","../node_modules/underscore/modules/now.js","../node_modules/underscore/modules/_createEscaper.js","../node_modules/underscore/modules/_escapeMap.js","../node_modules/underscore/modules/escape.js","../node_modules/underscore/modules/unescape.js","../node_modules/underscore/modules/_unescapeMap.js","../node_modules/underscore/modules/templateSettings.js","../node_modules/underscore/modules/template.js","../node_modules/underscore/modules/uniqueId.js","../node_modules/underscore/modules/_executeBound.js","../node_modules/underscore/modules/partial.js","../node_modules/underscore/modules/bind.js","../node_modules/underscore/modules/_isArrayLike.js","../node_modules/underscore/modules/_flatten.js","../node_modules/underscore/modules/bindAll.js","../node_modules/underscore/modules/delay.js","../node_modules/underscore/modules/defer.js","../node_modules/underscore/modules/negate.js","../node_modules/underscore/modules/before.js","../node_modules/underscore/modules/once.js","../node_modules/underscore/modules/findKey.js","../node_modules/underscore/modules/_createPredicateIndexFinder.js","../node_modules/underscore/modules/findIndex.js","../node_modules/underscore/modules/findLastIndex.js","../node_modules/underscore/modules/sortedIndex.js","../node_modules/underscore/modules/_createIndexFinder.js","../node_modules/underscore/modules/indexOf.js","../node_modules/underscore/modules/lastIndexOf.js","../node_modules/underscore/modules/find.js","../node_modules/underscore/modules/each.js","../node_modules/underscore/modules/map.js","../node_modules/underscore/modules/_createReduce.js","../node_modules/underscore/modules/reduce.js","../node_modules/underscore/modules/reduceRight.js","../node_modules/underscore/modules/filter.js","../node_modules/underscore/modules/every.js","../node_modules/underscore/modules/some.js","../node_modules/underscore/modules/contains.js","../node_modules/underscore/modules/invoke.js","../node_modules/underscore/modules/pluck.js","../node_modules/underscore/modules/max.js","../node_modules/underscore/modules/toArray.js","../node_modules/underscore/modules/sample.js","../node_modules/underscore/modules/_group.js","../node_modules/underscore/modules/groupBy.js","../node_modules/underscore/modules/indexBy.js","../node_modules/underscore/modules/countBy.js","../node_modules/underscore/modules/partition.js","../node_modules/underscore/modules/_keyInObj.js","../node_modules/underscore/modules/pick.js","../node_modules/underscore/modules/omit.js","../node_modules/underscore/modules/initial.js","../node_modules/underscore/modules/first.js","../node_modules/underscore/modules/rest.js","../node_modules/underscore/modules/difference.js","../node_modules/underscore/modules/without.js","../node_modules/underscore/modules/uniq.js","../node_modules/underscore/modules/union.js","../node_modules/underscore/modules/unzip.js","../node_modules/underscore/modules/zip.js","../node_modules/underscore/modules/_chainResult.js","../node_modules/underscore/modules/mixin.js","../node_modules/underscore/modules/underscore-array-methods.js","../node_modules/underscore/modules/isNull.js","../node_modules/underscore/modules/isElement.js","../node_modules/underscore/modules/isFinite.js","../node_modules/underscore/modules/isEmpty.js","../node_modules/underscore/modules/pairs.js","../node_modules/underscore/modules/create.js","../node_modules/underscore/modules/clone.js","../node_modules/underscore/modules/tap.js","../node_modules/underscore/modules/has.js","../node_modules/underscore/modules/mapObject.js","../node_modules/underscore/modules/propertyOf.js","../node_modules/underscore/modules/times.js","../node_modules/underscore/modules/result.js","../node_modules/underscore/modules/chain.js","../node_modules/underscore/modules/memoize.js","../node_modules/underscore/modules/throttle.js","../node_modules/underscore/modules/debounce.js","../node_modules/underscore/modules/wrap.js","../node_modules/underscore/modules/compose.js","../node_modules/underscore/modules/after.js","../node_modules/underscore/modules/findWhere.js","../node_modules/underscore/modules/reject.js","../node_modules/underscore/modules/where.js","../node_modules/underscore/modules/min.js","../node_modules/underscore/modules/shuffle.js","../node_modules/underscore/modules/sortBy.js","../node_modules/underscore/modules/size.js","../node_modules/underscore/modules/last.js","../node_modules/underscore/modules/compact.js","../node_modules/underscore/modules/flatten.js","../node_modules/underscore/modules/intersection.js","../node_modules/underscore/modules/object.js","../node_modules/underscore/modules/range.js","../node_modules/underscore/modules/chunk.js","../node_modules/underscore/modules/index-default.js","../node_modules/dungeoneer/lib/room.js","../node_modules/dungeoneer/lib/tile.js","../node_modules/dungeoneer/lib/index.js","../node_modules/rot-js/lib/rng.js","../node_modules/rot-js/lib/display/rect.js","../node_modules/rot-js/lib/display/canvas.js","../node_modules/rot-js/lib/display/backend.js","../node_modules/rot-js/lib/display/tile-gl.js","../node_modules/rot-js/lib/constants.js","../node_modules/rot-js/lib/map/map.js","../node_modules/rot-js/lib/map/dungeon.js","../node_modules/rot-js/lib/map/features.js","../node_modules/rot-js/lib/map/digger.js","../node_modules/rot-js/lib/map/ellermaze.js","../node_modules/rot-js/lib/map/index.js","../node_modules/rot-js/lib/map/arena.js","../node_modules/rot-js/lib/map/uniform.js","../node_modules/rot-js/lib/map/cellular.js","../node_modules/rot-js/lib/map/dividedmaze.js","../node_modules/rot-js/lib/map/iceymaze.js","../node_modules/rot-js/lib/map/rogue.js","../src/generator.js","../src/dungeonlayer.js","../src/generatorsheet.js","../src/keybindings.js","../src/toolbar.js","../src/dungeondraw.js"],"sourcesContent":["// module name from module.json\nexport const MODULE_NAME = \"dungeon-draw\";\n\n// set as wall flag\nexport const DUNGEON_VERSION = \"1.0\";\n\nexport const FLAG_DUNGEON_VERSION = \"dungeonVersion\";\nexport const FLAG_DUNGEON_STATE = \"dungeonState\";\n\nexport const SETTING_ALLOW_TRUSTED_PLAYER = \"allowTrustedPlayer\";\nexport const SETTING_3DCANVAS_ENABLED = \"3DCanvasEnabled\";\nexport const SETTING_CUSTOM_THEMES = \"customThemes\";\nexport const SETTING_RELEASE_NOTES_VERSION = \"releaseNotesVersion\";\nexport const SETTING_SNAP_TO_GRID = \"snapToGrid\";\nexport const SETTING_THEME_PAINTER_THEME = \"themePainterTheme\";\n","import * as constants from \"./constants.js\";\n\nexport class Settings {\n static register() {\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_ALLOW_TRUSTED_PLAYER,\n {\n name: game.i18n.localize(\"DD.SettingAllowTrustedPlayers\"),\n scope: \"world\",\n default: true,\n type: Boolean,\n config: true,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_3DCANVAS_ENABLED,\n {\n name: game.i18n.localize(\"DD.SettingSupport3DCanvas\"),\n scope: \"world\",\n default: true,\n type: Boolean,\n config: true,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_SNAP_TO_GRID,\n {\n name: game.i18n.localize(\"DD.SettingSnapToGrid\"),\n scope: \"client\",\n default: true,\n type: Boolean,\n config: true,\n onChange: (value) => {\n // make sure DungeonLayer instance has latest value\n canvas.dungeon.options.snapToGrid = value;\n },\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_RELEASE_NOTES_VERSION,\n {\n name: \"Last version we showed release notes.\",\n scope: \"client\",\n default: \"\",\n type: String,\n config: false,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_CUSTOM_THEMES,\n {\n name: \"Custom themes data.\",\n scope: \"client\",\n default: \"{}\",\n type: String,\n config: false,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME,\n {\n name: \"Theme painter theme key.\",\n scope: \"client\",\n default: \"module.cavern\",\n type: String,\n config: false,\n }\n );\n }\n\n static threeDCanvasEnabled() {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_3DCANVAS_ENABLED\n );\n }\n\n static snapToGrid() {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_SNAP_TO_GRID\n );\n }\n}\n","import * as constants from \"./constants.js\";\n\nexport const defaultConfig = () => {\n return {\n doorColor: \"#000000\",\n doorFillColor: \"#ffffff\",\n doorFillOpacity: 1.0,\n doorLineThickness: 8,\n doorThickness: 25,\n exteriorShadowColor: \"#000000\",\n exteriorShadowThickness: 20,\n exteriorShadowOpacity: 0.5,\n floorColor: \"#F2EDDF\",\n floorOpacity: 1.0,\n floorTexture: \"\",\n floorTextureRotation: 0,\n floorTextureTint: \"\",\n interiorShadowColor: \"#000000\",\n interiorShadowThickness: 8,\n interiorShadowOpacity: 0.5,\n invisibleWallColor: \"#000000\",\n invisibleWallFillColor: \"#ffffff\",\n invisibleWallLineThickness: 2,\n invisibleWallFillOpacity: 1.0,\n invisibleWallThickness: 6,\n matchBaseWalls: true,\n sceneBackgroundColor: \"#999999\",\n sceneGridColor: \"#000000\",\n sceneGridOpacity: 0.2,\n secretDoorSColor: \"#ffffff\",\n secretDoorStyleGM: \"secret\",\n secretDoorStylePlayer: \"wall\",\n threeDDoorTexture:\n \"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp\",\n threeDDoorTextureTint: \"\",\n threeDWallTexture: \"\",\n threeDWallTextureTint: \"\",\n threeDWallSidesTexture: \"\",\n threeDWallSidesTextureTint: \"\",\n wallColor: \"#000000\",\n wallTexture: \"\",\n wallTextureTint: \"\",\n wallThickness: 8,\n };\n};\n\nexport const getTheme = (themeKey) => {\n const splits = themeKey.split(\".\");\n const type = splits[0];\n const key = splits[1];\n if (type === \"custom\") {\n const customThemes = getCustomThemes();\n return customThemes[key];\n }\n return themes[key];\n};\n\nexport const getCustomThemes = () => {\n try {\n const customThemesString = game.settings.get(\n constants.MODULE_NAME,\n \"customThemes\"\n );\n const themeObj = JSON.parse(customThemesString);\n // ensure saved custom themes get any new defaults\n Object.keys(themeObj).forEach((key) => {\n themeObj[key].config = foundry.utils.mergeObject(\n defaultConfig(),\n themeObj[key].config\n );\n });\n return themeObj;\n } catch (e) {\n console.log(e);\n return {};\n }\n};\n\nexport const setCustomThemes = (customThemes) => {\n const themesString = JSON.stringify(customThemes);\n game.settings.set(constants.MODULE_NAME, \"customThemes\", themesString);\n};\n\nexport const getThemePainterThemeKey = () => {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME\n );\n};\n\nexport const setThemePainterThemeKey = (themeKey) => {\n return game.settings.set(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME,\n themeKey\n );\n};\n\nexport const themes = {\n default: {\n name: \"Default\",\n config: defaultConfig(),\n },\n arcPavement: {\n name: \"Arc Pavement\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#111111\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Arc_Pavement_001_basecolor.jpg\",\n invisibleWallThickness: 10,\n wallColor: \"#111111\",\n wallThickness: 12,\n }),\n },\n basicBlack: {\n name: \"Basic Black\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#0D0D0D\",\n doorFillOpacity: 0.0,\n exteriorShadowOpacity: 0,\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#0D0D0D\",\n floorColor: \"#FFFFFF\",\n sceneBackgroundColor: \"#0D0D0D\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#0D0D0D\",\n wallColor: \"#0D0D0D\",\n }),\n },\n cavern: {\n name: \"Cavern\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#2B2D2F\",\n invisibleWallThickness: 10,\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Stylized_Stone_Floor_002_bw.jpg\",\n wallColor: \"#2B2D2F\",\n wallThickness: 12,\n }),\n },\n checkerboard: {\n name: \"Checkerboard\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorFillColor: \"#C2BFB0\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/sci_fi_texture_150_by_llexandro_d939vk9.png\",\n invisibleWallFillColor: \"#C2BFB0\",\n invisibleWallThickness: 8,\n secretDoorSColor: \"#C2BFB0\",\n wallThickness: 10,\n }),\n },\n cobblestone: {\n name: \"Cobblestone\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#222222\",\n doorFillColor: \"#FFFFFF\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Cobblestone_001_COLOR.jpg\",\n invisibleWallColor: \"#222222\",\n invisibleWallFillColor: \"#FFFFFF\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#FFFFFF\",\n wallColor: \"#222222\",\n wallThickness: 12,\n }),\n },\n dirt: {\n name: \"Dirt\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#1a1714\",\n doorFillColor: \"#8d7862\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Ground_Dirt_007_basecolor.jpg\",\n invisibleWallColor: \"#1a1714\",\n invisibleWallFillColor: \"#8d7862\",\n invisibleWallThickness: 8,\n secretDoorSColor: \"#8d7862\",\n wallColor: \"#1a1714\",\n wallThickness: 10,\n }),\n },\n dungeonSquares: {\n name: \"Dungeon Squares\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#111111\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/outdoor+stone+tiles+pavement.jpg\",\n invisibleWallColor: \"#111111\",\n invisibleWallThickness: 10,\n wallColor: \"#111111\",\n wallThickness: 12,\n }),\n },\n grass: {\n name: \"Grass\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#72471d\",\n doorFillColor: \"#eee8c1\",\n floorTexture: \"modules/dungeon-draw/assets/textures/Grass_001_COLOR.jpg\",\n invisibleWallColor: \"#72471d\",\n invisibleWallFillColor: \"#eee8c1\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#eee8c1\",\n wallColor: \"#72471d\",\n wallThickness: 10,\n }),\n },\n groovyCarpet: {\n name: \"Groovy Carpet\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#2B2D2F\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Fabric_Rug_006_basecolor.jpg\",\n invisibleWallColor: \"#2B2D2F\",\n invisibleWallThickness: 10,\n wallColor: \"#2B2D2F\",\n wallThickness: 12,\n }),\n },\n hexagon: {\n name: \"Hexagons\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#282828\",\n doorFillColor: \"#D1BD8A\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Rocks_Hexagons_002_basecolor.jpg\",\n invisibleWallColor: \"#282828\",\n invisibleWallFillColor: \"#D1BD8A\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#D1BD8A\",\n wallColor: \"#282828\",\n wallThickness: 12,\n }),\n },\n marble: {\n name: \"Marble\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#686882\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Marble_Tiles_001_basecolor.jpg\",\n invisibleWallColor: \"#686882\",\n wallColor: \"#686882\",\n }),\n },\n metalGrid: {\n name: \"Metal Grid\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#27251A\",\n doorFillColor: \"#AAAAAA\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Sci-fi_Floor_002_basecolor.jpg\",\n invisibleWallColor: \"#27251A\",\n invisibleWallFillColor: \"#AAAAAA\",\n secretDoorSColor: \"#AAAAAA\",\n wallColor: \"#27251A\",\n }),\n },\n metalSquares: {\n name: \"Metal Squares\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorFillColor: \"#C0C0C0\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/sci_fi_texture_212_by_llexandro_dcuxgum.png\",\n invisibleWallFillColor: \"#C0C0C0\",\n secretDoorSColor: \"#C0C0C0\",\n }),\n },\n moldvayBlue: {\n name: \"Moldvay Blue\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#3A9FF2\",\n doorFillOpacity: 0.0,\n doorThickness: 35,\n exteriorShadowOpacity: 0,\n floorColor: \"#FFFFFF\",\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#3A9FF2\",\n invisibleWallFillOpacity: 0.0,\n sceneBackgroundColor: \"#3A9FF2\",\n sceneGridColor: \"#3A9FF2\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#3A9FF2\",\n wallColor: \"#3A9FF2\",\n }),\n },\n neonBlueprint: {\n name: \"Neon Blueprint\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#3A9FF2\",\n doorFillOpacity: 0.0,\n doorThickness: 35,\n exteriorShadowColor: \"#18495E\",\n floorColor: \"#142A3B\",\n interiorShadowColor: \"#1B7FAB\",\n invisibleWallColor: \"#3A9FF2\",\n invisibleWallFillOpacity: 0.0,\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 6,\n sceneBackgroundColor: \"#171008\",\n sceneGridColor: \"#4C89A1\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#3A9FF2\",\n wallColor: \"#63C9E6\",\n wallThickness: 4,\n }),\n },\n ruddyPaper: {\n name: \"Ruddy Paper\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#913B55\",\n doorFillColor: \"#FADEE6\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Paper_Recycled_001_COLOR.jpg\",\n floorTextureTint: \"#F9FAE6\",\n exteriorShadowOpacity: 0,\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#913B55\",\n invisibleWallFillColor: \"#FADEE6\",\n sceneBackgroundColor: \"#EBD3BC\",\n sceneGridColor: \"#594026\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#913B55\",\n wallColor: \"#9A6D54\",\n }),\n },\n water: {\n name: \"Water\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#203246\",\n floorTexture: \"modules/dungeon-draw/assets/textures/Water_001_COLOR.jpg\",\n invisibleWallColor: \"#203246\",\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 4,\n wallColor: \"#203246\",\n wallThickness: 5,\n }),\n },\n woodPlanks: {\n name: \"Wood Planks\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#332211\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Old_Wooden_Plank_Seamless_Texture_765.jpg\",\n invisibleWallColor: \"#332211\",\n invisibleWallThickness: 13,\n wallColor: \"#332211\",\n wallTexture: \"modules/dungeon-draw/assets/textures/Bark_002_bw.jpg\",\n wallTextureTint: \"#7e5935\",\n wallThickness: 15,\n }),\n },\n xenomorph: {\n name: \"Xenomorph\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#8AF0F0\",\n doorFillColor: \"#255151\",\n doorLineThickness: 5,\n doorThickness: 20,\n exteriorShadowColor: \"#00838C\",\n floorColor: \"#255151\",\n interiorShadowColor: \"#00838C\",\n invisibleWallColor: \"#8AF0F0\",\n invisibleWallFillColor: \"#255151\",\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 6,\n sceneBackgroundColor: \"#002222\",\n sceneGridColor: \"#ffffff\",\n sceneGridOpacity: 1,\n secretDoorSColor: \"#8AF0F0\",\n wallColor: \"#8AF0F0\",\n wallThickness: 4,\n }),\n },\n};\n","// TODO: fix this circular dependency\n// import { ConfigSheet } from \"./configsheet.js\";\nimport { Settings } from \"./settings.js\";\nimport { getCustomThemes, setCustomThemes } from \"./themes.js\";\n\n/**\n * Sheet for Theme editing.\n *\n * @extends {FormApplication}\n */\nexport class ThemeSheet extends FormApplication {\n constructor(themeKey) {\n super();\n this.themeKey = themeKey;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-theme-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/theme-sheet.html\",\n width: 480,\n height: Settings.threeDCanvasEnabled() ? 1160 : 1040,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.ThemeSheetTitle\");\n }\n\n /** @override */\n getData() {\n const customThemes = getCustomThemes();\n const theme = customThemes[this.themeKey];\n const threeDCanvasEnabled = Settings.threeDCanvasEnabled();\n return {\n config: theme.config,\n themeName: theme.name,\n threeDCanvasEnabled,\n };\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async _updateObject(event, formData) {\n const customThemes = getCustomThemes();\n const themeName = formData.themeName;\n delete formData.themeName;\n // overwrite the theme at our key\n customThemes[this.themeKey] = {\n name: themeName,\n config: formData,\n };\n setCustomThemes(customThemes);\n // re-draw the dungeon\n // draw() and refresh() on the layer makes the dungeon disappear\n //canvas.dungeon.draw();\n //canvas.dungeon.refresh();\n // refresh on the dungeon does nothing\n await canvas.dungeon.dungeon?.refresh();\n\n // force already-open config sheet to re-render\n // TODO: fix this circular dependency\n // new ConfigSheet(\"themes\").render(true);\n }\n}\n","import { Settings } from \"./settings.js\";\nimport {\n defaultConfig,\n getCustomThemes,\n getThemePainterThemeKey,\n setCustomThemes,\n setThemePainterThemeKey,\n themes,\n} from \"./themes.js\";\nimport { ThemeSheet } from \"./themesheet.js\";\n\n/**\n * Sheet for dungeon config/settings.\n *\n * @extends {FormApplication}\n */\nexport class ConfigSheet extends FormApplication {\n constructor(activeTab = \"settings\") {\n super();\n this._tabs[0].active = activeTab;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-config-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/config-sheet.html\",\n width: 480,\n height: Settings.threeDCanvasEnabled() ? 1220 : 1100,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.ConfigSheetTitle\");\n }\n\n /** @override */\n getData() {\n let config = canvas.dungeon.dungeon?.state().config;\n if (!config) {\n config = defaultConfig();\n }\n const customThemes = getCustomThemes();\n const customThemeKeys = Object.keys(customThemes).sort();\n const themeKeys = Object.keys(themes).sort();\n const themePainterThemeKey = getThemePainterThemeKey();\n const threeDCanvasEnabled = Settings.threeDCanvasEnabled();\n return {\n config,\n customThemes,\n customThemeKeys,\n themes,\n themeKeys,\n themePainterThemeKey,\n threeDCanvasEnabled,\n };\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async _updateObject(event, formData) {\n // TODO: handle customThemeName vs. config better\n delete formData.customThemeName;\n delete formData.themePainterTheme;\n canvas.dungeon.dungeon?.setConfig(formData);\n if (game.user.isGM) {\n // need GM privs to update scene\n await canvas.scene.update({\n backgroundColor: formData.sceneBackgroundColor,\n gridAlpha: formData.sceneGridAlpha,\n gridColor: formData.sceneGridColor,\n });\n }\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async close(options) {\n await super.close(options);\n if (this.preview) {\n this.preview.removeChildren();\n this.preview = null;\n }\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html\n .find('button[name=\"resetDefault\"]')\n .click(this._onResetDefaults.bind(this));\n html.find(\".dd-theme-name\").click(this._onThemeNameClick.bind(this));\n html\n .find(\".dd-save-as-theme-button\")\n .click(this._onSaveAsThemeClick.bind(this));\n html.find(\".dd-theme-edit\").click(this._onEditThemeClick.bind(this));\n html.find(\".dd-theme-copy\").click(this._onCopyThemeClick.bind(this));\n html.find(\".dd-theme-delete\").click(this._onDeleteThemeClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this._onThemePainterThemeSelect.bind(this));\n html\n .find(\".dd-export-themes-button\")\n .click(this._onExportThemesClick.bind(this));\n html\n .find(\".dd-import-themes-button\")\n .click(this._onImportThemesClick.bind(this));\n }\n\n /* -------------------------------------------- */\n\n /**\n * Reset the user Drawing configuration settings to their default values\n * @param {PointerEvent} event The originating mouse-click event\n * @protected\n */\n _onResetDefaults(event) {\n event.preventDefault();\n canvas.dungeon.dungeon?.setConfig(defaultConfig());\n canvas.dungeon.dungeon.refresh();\n this.render();\n }\n\n async _onThemeNameClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).parent(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const isCustom = themeRow.data(\"themetype\") === \"custom\";\n let theme;\n if (isCustom) {\n const customThemes = getCustomThemes();\n theme = customThemes[themeKey];\n } else {\n theme = themes[themeKey];\n }\n const newConfig = { ...theme.config };\n await canvas.dungeon.dungeon?.setConfig(newConfig);\n if (game.user.isGM) {\n // need GM privs to update scene\n await canvas.scene.update({\n backgroundColor: newConfig.sceneBackgroundColor,\n gridAlpha: newConfig.sceneGridAlpha,\n gridColor: newConfig.sceneGridColor,\n });\n }\n this.render();\n }\n\n async _onSaveAsThemeClick(event) {\n event.preventDefault();\n const input = $(event.currentTarget)\n .closest(\".form-fields\")\n .children(\".saveAsThemeName\");\n const saveAsThemeName = input.val();\n const formData = this._getSubmitData();\n // TODO: handle saveAsThemeName better\n delete formData.saveAsThemeName;\n delete formData.themePainterThemeKey;\n const customThemes = getCustomThemes();\n customThemes[saveAsThemeName] = {\n name: saveAsThemeName,\n config: formData,\n };\n setCustomThemes(customThemes);\n this._tabs[0].active = \"themes\";\n this.render();\n }\n\n async _onEditThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n new ThemeSheet(themeKey).render(true);\n }\n\n _onCopyThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const customThemes = getCustomThemes();\n const oldTheme = customThemes[themeKey];\n const newTheme = JSON.parse(JSON.stringify(oldTheme));\n // deal with possible name collisions\n let num = 1;\n let newName;\n let done = false;\n while (!done) {\n newName = `${oldTheme.name} (${num})`;\n if (newName in customThemes) {\n num++;\n } else {\n done = true;\n }\n }\n newTheme.name = newName;\n customThemes[newName] = newTheme;\n setCustomThemes(customThemes);\n this.render();\n }\n\n _onDeleteThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const customThemes = getCustomThemes();\n delete customThemes[themeKey];\n setCustomThemes(customThemes);\n this.render();\n }\n\n _onExportThemesClick(event) {\n event.preventDefault();\n const customThemesString = JSON.stringify(getCustomThemes(), null, 2);\n saveDataToFile(\n customThemesString,\n \"application/json\",\n \"dd-custom-themes.json\"\n );\n }\n\n async _onImportThemesClick(event) {\n event.preventDefault();\n // this Dialog based on Foundry's importFromJSONDialog()\n new Dialog(\n {\n title: game.i18n.localize(\"DD.ImportCustomThemes\"),\n content: await renderTemplate(\n \"modules/dungeon-draw/templates/import-data.html\",\n {\n hint: game.i18n.localize(\"DD.ImportCustomThemesHint\"),\n }\n ),\n buttons: {\n import: {\n icon: '',\n label: game.i18n.localize(\"DD.Import\"),\n callback: (html) => {\n const form = html.find(\"form\")[0];\n if (!form.data.files.length) {\n return ui.notifications.error(\n \"You did not upload a data file!\"\n );\n }\n readTextFromFile(form.data.files[0]).then((text) => {\n const newJson = JSON.parse(text);\n if (form.wipe.checked) {\n // replace existing JSON\n setCustomThemes(newJson);\n } else {\n // merge\n const oldJson = getCustomThemes();\n const mergedJson = foundry.utils.mergeObject(\n oldJson,\n newJson\n );\n setCustomThemes(mergedJson);\n }\n this.render();\n });\n },\n },\n no: {\n icon: '',\n label: game.i18n.localize(\"DD.Cancel\"),\n },\n },\n default: \"import\",\n },\n {\n width: 400,\n }\n ).render(true);\n }\n\n _onThemePainterThemeSelect(event) {\n const themeKey = $(event.currentTarget).val();\n setThemePainterThemeKey(themeKey);\n }\n}\n","export default class Exception extends Error {\n constructor(message) {\n super(message)\n this.name = Object.keys({ Exception })[0]\n }\n toString() {\n return this.message\n }\n}\n","import Exception from './Exception.js'\n\nexport default class IllegalArgumentException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ IllegalArgumentException })[0]\n }\n}\n","export default class GeometryComponentFilter {\n filter(geom) {}\n}\n","export default function Comparable() {}\n","export default function Clonable() {}\n","export default function Serializable() {}\n","export default class NumberUtil {\n static equalsWithTolerance(x1, x2, tolerance) {\n return Math.abs(x1 - x2) <= tolerance\n }\n}\n","export default class Long {\n constructor(high, low) {\n this.low = low || 0\n this.high = high || 0\n }\n\n static toBinaryString(i) {\n let mask\n let result = ''\n for (mask = 0x80000000; mask > 0; mask >>>= 1)\n result += (i.high & mask) === mask ? '1' : '0'\n for (mask = 0x80000000; mask > 0; mask >>>= 1)\n result += (i.low & mask) === mask ? '1' : '0'\n return result\n }\n}\n","import Long from './Long.js'\n\nexport default function Double() { }\n\nDouble.NaN = NaN\nDouble.isNaN = n => Number.isNaN(n)\nDouble.isInfinite = n => !Number.isFinite(n)\nDouble.MAX_VALUE = Number.MAX_VALUE\nDouble.POSITIVE_INFINITY = Number.POSITIVE_INFINITY\nDouble.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY\n\nif (typeof Float64Array === 'function' &&\n typeof Int32Array === 'function')\n// Simple and fast conversion between double and long bits\n// using TypedArrays and ArrayViewBuffers.\n\n (function() {\n const EXP_BIT_MASK = 0x7ff00000\n const SIGNIF_BIT_MASK = 0xFFFFF\n const f64buf = new Float64Array(1)\n const i32buf = new Int32Array(f64buf.buffer)\n Double.doubleToLongBits = function(value) {\n f64buf[0] = value\n let low = i32buf[0] | 0\n let high = i32buf[1] | 0\n // Check for NaN based on values of bit fields, maximum\n // exponent and nonzero significand.\n if (((high & EXP_BIT_MASK) === EXP_BIT_MASK) &&\n ((high & SIGNIF_BIT_MASK) !== 0) &&\n (low !== 0)) {\n low = 0 | 0\n high = 0x7ff80000 | 0\n }\n return new Long(high, low)\n }\n Double.longBitsToDouble = function(bits) {\n i32buf[0] = bits.low\n i32buf[1] = bits.high\n return f64buf[0]\n }\n })()\nelse\n// More complex and slower fallback implementation using\n// math and the divide-by-two and multiply-by-two algorithms.\n\n (function() {\n const BIAS = 1023\n const log2 = Math.log2\n const floor = Math.floor\n const pow = Math.pow\n const MAX_REL_BITS_INTEGER = (function() {\n for (let i = 53; i > 0; i--) {\n const bits = pow(2, i) - 1\n if (floor(log2(bits)) + 1 === i) return bits\n }\n return 0\n })()\n Double.doubleToLongBits = function(value) {\n let x, y, f, bits, skip\n let sign, exp, high, low\n\n // Get the sign bit and absolute value.\n if (value < 0 || 1 / value === Number.NEGATIVE_INFINITY) {\n sign = (1 << 31)\n value = (-value)\n } else {\n sign = 0\n }\n\n // Handle some special values.\n if (value === 0) {\n // Handle zeros (+/-0).\n low = 0 | 0\n high = sign // exponent: 00..00, significand: 00..00\n return new Long(high, low)\n }\n\n if (value === Infinity) {\n // Handle infinity (only positive values for value possible).\n low = 0 | 0\n high = sign | 0x7ff00000 // exponent: 11..11, significand: 00..00\n return new Long(high, low)\n }\n\n if (value !== value) { // eslint-disable-line\n // Handle NaNs (boiled down to only one distinct NaN).\n low = 0 | 0\n high = 0x7ff80000 // exponent: 11..11, significand: 10..00\n return new Long(high, low)\n }\n\n // Preinitialize variables, that are not neccessarily set by\n // the algorithm.\n bits = 0\n low = 0 | 0\n\n // Get the (always positive) integer part of value.\n x = floor(value)\n\n // Process the integer part if it's greater than 1. Zero requires\n // no bits at all, 1 represents the implicit (hidden) leading bit,\n // which must not be written as well.\n if (x > 1)\n // If we can reliably determine the number of bits required for\n // the integer part,\n\n if (x <= MAX_REL_BITS_INTEGER) {\n // get the number of bits required to represent it minus 1\n bits = floor(log2(x)) /* + 1 - 1 */\n // and simply copy/shift the integer bits into low and high.\n // That's much faster than the divide-by-two algorithm (saves\n // up to ~60%).\n // We always need to mask out the most significant bit, which\n // is the implicit (aka hidden) bit.\n if (bits <= 20) {\n // The simple case in which the integer fits into the\n // lower 20 bits of the high word is worth to be handled\n // separately (saves ~25%).\n low = 0 | 0\n high = (x << (20 - bits)) & 0xfffff\n } else {\n // Here, the integer part is split into low and high.\n // Since its value may require more than 32 bits, we\n // cannot use bitwise operators (which implicitly cast\n // to Int32), but use arithmetic operators % and / to\n // get low and high parts. The uppper 20 bits go to high,\n // the remaining bits (in f) to low.\n f = bits - 20\n // Like (1 << f) but safe with even more than 32 bits.\n y = pow(2, f)\n low = (x % y) << (32 - f)\n high = (x / y) & 0xfffff\n }\n } else {\n // For greater values, we must use the much slower divide-by-two\n // algorithm. Bits are generated from right to left, that is from\n // least to most significant bit. For each bit, we left-shift both\n // low and high by one and carry bit #0 from high to #31 in low.\n // The next bit is then copied into bit #19 in high, the leftmost\n // bit of the double's significand.\n\n // Preserve x for later user, so work with f.\n f = x\n low = 0 | 0\n for (;;) {\n y = f / 2\n f = floor(y)\n if (f === 0)\n // We just found the most signigicant (1-)bit, which\n // is the implicit bit and so, not stored in the double\n // value. So, it's time to leave the loop.\n break\n\n // Count this bit, shift low and carry bit #0 from high.\n bits++\n low >>>= 1\n low |= (high & 0x1) << 31\n // Shift high.\n high >>>= 1\n if (y !== f)\n // Copy the new bit into bit #19 in high (only required if 1).\n high |= 0x80000\n }\n }\n\n // Bias the exponent.\n exp = bits + BIAS\n\n // If the integer part is zero, we've not yet seen the implicit\n // leading bit. Variable skip is later used while processing the\n // fractional part (if any).\n skip = (x === 0)\n\n // Get fraction only into x.\n x = value - x\n\n // If some significand bits are still left to be filled and\n // the fractional part is not zero, convert the fraction using\n // the multiply-by-2 algorithm.\n if (bits < 52 && x !== 0) {\n // Initialize 'buffer' f, into which newly created bits get\n // shifted from right to left.\n f = 0\n\n for (;;) {\n y = x * 2\n if (y >= 1) {\n // This is a new 1-bit. Add and count this bit, if not\n // prohibited by skip.\n x = y - 1\n if (!skip) {\n f <<= 1\n f |= 1\n bits++\n } else {\n // Otherwise, decrement the exponent and unset\n // skip, so that all following bits get written.\n exp--\n skip = false\n }\n } else {\n // This is a new 0-bit. Add and count this bit, if not\n // prohibited by skip.\n x = y\n if (!skip) {\n f <<= 1\n bits++\n } else if (--exp === 0) {\n // Otherwise we've just decremented the exponent. If the\n // biased exponent is zero now (-1023), we process a\n // subnormal number, which has no impled leading 1-bit.\n // So, count this 0-bit and unset skip to write out\n // all the following bits.\n bits++\n skip = false\n }\n }\n if (bits === 20) {\n // When 20 bits have been created in total, we're done with\n // the high word. Copy the bits from 'buffer' f into high\n // and reset 'buffer' f. Following bits will end up in the\n // low word.\n high |= f\n f = 0\n } else if (bits === 52) {\n // When 52 bits have been created in total, we're done with\n // low word as well. Copy the bits from 'buffer' f into low\n // and exit the loop.\n low |= f\n break\n }\n if (y === 1) {\n // When y is exactly 1, there is no remainder and the process\n // is complete (the number is finite). Copy the bits from\n // 'buffer' f into either low or high and exit the loop.\n if (bits < 20)\n high |= (f << (20 - bits))\n else if (bits < 52) low |= (f << (52 - bits))\n\n break\n }\n }\n }\n\n // Copy/shift the exponent and sign bits into the high word.\n high |= (exp << 20)\n high |= sign\n\n return new Long(high, low)\n }\n Double.longBitsToDouble = function(bits) {\n let i\n let x, exp, fract\n const high = bits.high\n const low = bits.low\n\n // Extract the sign.\n const sign = (high & (1 << 31)) ? -1 : 1\n\n // Extract the unbiased exponent.\n exp = ((high & 0x7ff00000) >> 20) - BIAS\n\n // Calculate the fraction from left to right. Start\n // off with the 20 lower bits from the high word.\n fract = 0\n x = (1 << 19)\n for (i = 1; i <= 20; i++) {\n if (high & x) fract += pow(2, -i)\n\n x >>>= 1\n }\n // Continue with all 32 bits from the low word.\n x = (1 << 31)\n for (i = 21; i <= 52; i++) {\n if (low & x) fract += pow(2, -i)\n\n x >>>= 1\n }\n\n // Handle special values.\n // Check for zero and subnormal values.\n if (exp === -BIAS) {\n if (fract === 0)\n // +/-1.0 * 0.0 => +/-0.0\n return sign * 0\n\n exp = -1022\n } else if (exp === BIAS + 1) { // Check for +/-Infinity or NaN.\n if (fract === 0)\n // +/-1.0 / 0.0 => +/-Infinity\n return sign / 0\n\n return NaN\n } else { // Nothing special? Seems to be a normal number.\n // Add the implicit leading bit (1*2^0).\n fract += 1\n }\n\n return sign * fract * pow(2, exp)\n }\n })()\n","export default function Comparator() {}\n","import Exception from './Exception.js'\n\nexport default class RuntimeException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ RuntimeException })[0]\n }\n}\n","import RuntimeException from '../../../../java/lang/RuntimeException.js'\nexport default class AssertionFailedException extends RuntimeException {\n constructor() {\n super()\n AssertionFailedException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n RuntimeException.constructor_.call(this)\n } else if (arguments.length === 1) {\n const message = arguments[0]\n RuntimeException.constructor_.call(this, message)\n }\n }\n}\n","import AssertionFailedException from './AssertionFailedException.js'\nexport default class Assert {\n static shouldNeverReachHere() {\n if (arguments.length === 0) {\n Assert.shouldNeverReachHere(null)\n } else if (arguments.length === 1) {\n const message = arguments[0]\n throw new AssertionFailedException('Should never reach here' + (message !== null ? ': ' + message : ''))\n }\n }\n static isTrue() {\n if (arguments.length === 1) {\n const assertion = arguments[0]\n Assert.isTrue(assertion, null)\n } else if (arguments.length === 2) {\n const assertion = arguments[0], message = arguments[1]\n if (!assertion) \n if (message === null) \n throw new AssertionFailedException()\n else \n throw new AssertionFailedException(message)\n \n \n }\n }\n static equals() {\n if (arguments.length === 2) {\n const expectedValue = arguments[0], actualValue = arguments[1]\n Assert.equals(expectedValue, actualValue, null)\n } else if (arguments.length === 3) {\n const expectedValue = arguments[0], actualValue = arguments[1], message = arguments[2]\n if (!actualValue.equals(expectedValue)) \n throw new AssertionFailedException('Expected ' + expectedValue + ' but encountered ' + actualValue + (message !== null ? ': ' + message : ''))\n \n }\n }\n}\n","import NumberUtil from '../util/NumberUtil.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Comparator from '../../../../java/util/Comparator.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Assert from '../util/Assert.js'\n\nconst kBuf = new ArrayBuffer(8)\nconst kBufAsF64 = new Float64Array(kBuf)\nconst kBufAsI32 = new Int32Array(kBuf)\n\nexport default class Coordinate {\n constructor() {\n Coordinate.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.x = null\n this.y = null\n this.z = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this, 0.0, 0.0)\n } else if (arguments.length === 1) {\n const c = arguments[0]\n Coordinate.constructor_.call(this, c.x, c.y, c.getZ())\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n } else if (arguments.length === 3) {\n const x = arguments[0], y = arguments[1], z = arguments[2]\n this.x = x\n this.y = y\n this.z = z\n }\n }\n static hashCode(n) {\n kBufAsF64[0] = n\n return kBufAsI32[0] ^ kBufAsI32[1]\n }\n getM() {\n return Double.NaN\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case Coordinate.X:\n this.x = value\n break\n case Coordinate.Y:\n this.y = value\n break\n case Coordinate.Z:\n this.setZ(value)\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n equals2D() {\n if (arguments.length === 1) {\n const other = arguments[0]\n if (this.x !== other.x) \n return false\n \n if (this.y !== other.y) \n return false\n \n return true\n } else if (arguments.length === 2) {\n const c = arguments[0], tolerance = arguments[1]\n if (!NumberUtil.equalsWithTolerance(this.x, c.x, tolerance)) \n return false\n \n if (!NumberUtil.equalsWithTolerance(this.y, c.y, tolerance)) \n return false\n \n return true\n }\n }\n setM(m) {\n throw new IllegalArgumentException('Invalid ordinate index: ' + Coordinate.M)\n }\n getZ() {\n return this.z\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case Coordinate.X:\n return this.x\n case Coordinate.Y:\n return this.y\n case Coordinate.Z:\n return this.getZ()\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n equals3D(other) {\n return this.x === other.x && this.y === other.y && (this.getZ() === other.getZ() || Double.isNaN(this.getZ()) && Double.isNaN(other.getZ()))\n }\n equals(other) {\n if (!(other instanceof Coordinate)) \n return false\n \n return this.equals2D(other)\n }\n equalInZ(c, tolerance) {\n return NumberUtil.equalsWithTolerance(this.getZ(), c.getZ(), tolerance)\n }\n setX(x) {\n this.x = x\n }\n compareTo(o) {\n const other = o\n if (this.x < other.x) return -1\n if (this.x > other.x) return 1\n if (this.y < other.y) return -1\n if (this.y > other.y) return 1\n return 0\n }\n getX() {\n return this.x\n }\n setZ(z) {\n this.z = z\n }\n clone() {\n try {\n const coord = null\n return coord\n } catch (e) {\n if (e instanceof CloneNotSupportedException) {\n Assert.shouldNeverReachHere('this shouldn\\'t happen because this class is Cloneable')\n return null\n } else {\n throw e\n }\n } finally {}\n }\n copy() {\n return new Coordinate(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ')'\n }\n distance3D(c) {\n const dx = this.x - c.x\n const dy = this.y - c.y\n const dz = this.getZ() - c.getZ()\n return Math.sqrt(dx * dx + dy * dy + dz * dz)\n }\n getY() {\n return this.y\n }\n setY(y) {\n this.y = y\n }\n distance(c) {\n const dx = this.x - c.x\n const dy = this.y - c.y\n return Math.sqrt(dx * dx + dy * dy)\n }\n hashCode() {\n let result = 17\n result = 37 * result + Coordinate.hashCode(this.x)\n result = 37 * result + Coordinate.hashCode(this.y)\n return result\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n }\n get interfaces_() {\n return [Comparable, Cloneable, Serializable]\n }\n}\nclass DimensionalComparator {\n constructor() {\n DimensionalComparator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._dimensionsToTest = 2\n if (arguments.length === 0) {\n DimensionalComparator.constructor_.call(this, 2)\n } else if (arguments.length === 1) {\n const dimensionsToTest = arguments[0]\n if (dimensionsToTest !== 2 && dimensionsToTest !== 3) throw new IllegalArgumentException('only 2 or 3 dimensions may be specified')\n this._dimensionsToTest = dimensionsToTest\n }\n }\n static compare(a, b) {\n if (a < b) return -1\n if (a > b) return 1\n if (Double.isNaN(a)) {\n if (Double.isNaN(b)) return 0\n return -1\n }\n if (Double.isNaN(b)) return 1\n return 0\n }\n compare(c1, c2) {\n const compX = DimensionalComparator.compare(c1.x, c2.x)\n if (compX !== 0) return compX\n const compY = DimensionalComparator.compare(c1.y, c2.y)\n if (compY !== 0) return compY\n if (this._dimensionsToTest <= 2) return 0\n const compZ = DimensionalComparator.compare(c1.getZ(), c2.getZ())\n return compZ\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nCoordinate.DimensionalComparator = DimensionalComparator\nCoordinate.NULL_ORDINATE = Double.NaN\nCoordinate.X = 0\nCoordinate.Y = 1\nCoordinate.Z = 2\nCoordinate.M = 3\n","import Coordinate from './Coordinate.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class Envelope {\n constructor() {\n Envelope.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._minx = null\n this._maxx = null\n this._miny = null\n this._maxy = null\n if (arguments.length === 0) {\n this.init()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.init(p.x, p.x, p.y, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const env = arguments[0]\n this.init(env)\n }\n } else if (arguments.length === 2) {\n const p1 = arguments[0], p2 = arguments[1]\n this.init(p1.x, p2.x, p1.y, p2.y)\n } else if (arguments.length === 4) {\n const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n this.init(x1, x2, y1, y2)\n }\n }\n static intersects() {\n if (arguments.length === 3) {\n const p1 = arguments[0], p2 = arguments[1], q = arguments[2]\n if (q.x >= (p1.x < p2.x ? p1.x : p2.x) && q.x <= (p1.x > p2.x ? p1.x : p2.x) && (q.y >= (p1.y < p2.y ? p1.y : p2.y) && q.y <= (p1.y > p2.y ? p1.y : p2.y))) \n return true\n \n return false\n } else if (arguments.length === 4) {\n const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n let minq = Math.min(q1.x, q2.x)\n let maxq = Math.max(q1.x, q2.x)\n let minp = Math.min(p1.x, p2.x)\n let maxp = Math.max(p1.x, p2.x)\n if (minp > maxq) return false\n if (maxp < minq) return false\n minq = Math.min(q1.y, q2.y)\n maxq = Math.max(q1.y, q2.y)\n minp = Math.min(p1.y, p2.y)\n maxp = Math.max(p1.y, p2.y)\n if (minp > maxq) return false\n if (maxp < minq) return false\n return true\n }\n }\n getArea() {\n return this.getWidth() * this.getHeight()\n }\n equals(other) {\n if (!(other instanceof Envelope)) \n return false\n \n const otherEnvelope = other\n if (this.isNull()) \n return otherEnvelope.isNull()\n \n return this._maxx === otherEnvelope.getMaxX() && this._maxy === otherEnvelope.getMaxY() && this._minx === otherEnvelope.getMinX() && this._miny === otherEnvelope.getMinY()\n }\n intersection(env) {\n if (this.isNull() || env.isNull() || !this.intersects(env)) return new Envelope()\n const intMinX = this._minx > env._minx ? this._minx : env._minx\n const intMinY = this._miny > env._miny ? this._miny : env._miny\n const intMaxX = this._maxx < env._maxx ? this._maxx : env._maxx\n const intMaxY = this._maxy < env._maxy ? this._maxy : env._maxy\n return new Envelope(intMinX, intMaxX, intMinY, intMaxY)\n }\n isNull() {\n return this._maxx < this._minx\n }\n getMaxX() {\n return this._maxx\n }\n covers() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.covers(p.x, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (this.isNull() || other.isNull()) \n return false\n \n return other.getMinX() >= this._minx && other.getMaxX() <= this._maxx && other.getMinY() >= this._miny && other.getMaxY() <= this._maxy\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) return false\n return x >= this._minx && x <= this._maxx && y >= this._miny && y <= this._maxy\n }\n }\n intersects() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (this.isNull() || other.isNull()) \n return false\n \n return !(other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.intersects(p.x, p.y)\n }\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const a = arguments[0], b = arguments[1]\n if (this.isNull()) \n return false\n \n const envminx = a.x < b.x ? a.x : b.x\n if (envminx > this._maxx) return false\n const envmaxx = a.x > b.x ? a.x : b.x\n if (envmaxx < this._minx) return false\n const envminy = a.y < b.y ? a.y : b.y\n if (envminy > this._maxy) return false\n const envmaxy = a.y > b.y ? a.y : b.y\n if (envmaxy < this._miny) return false\n return true\n } else if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) return false\n return !(x > this._maxx || x < this._minx || y > this._maxy || y < this._miny)\n }\n }\n }\n getMinY() {\n return this._miny\n }\n getDiameter() {\n if (this.isNull()) \n return 0\n \n const w = this.getWidth()\n const h = this.getHeight()\n return Math.sqrt(w * w + h * h)\n }\n getMinX() {\n return this._minx\n }\n expandToInclude() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.expandToInclude(p.x, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (other.isNull()) \n return null\n \n if (this.isNull()) {\n this._minx = other.getMinX()\n this._maxx = other.getMaxX()\n this._miny = other.getMinY()\n this._maxy = other.getMaxY()\n } else {\n if (other._minx < this._minx) \n this._minx = other._minx\n \n if (other._maxx > this._maxx) \n this._maxx = other._maxx\n \n if (other._miny < this._miny) \n this._miny = other._miny\n \n if (other._maxy > this._maxy) \n this._maxy = other._maxy\n \n }\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) {\n this._minx = x\n this._maxx = x\n this._miny = y\n this._maxy = y\n } else {\n if (x < this._minx) \n this._minx = x\n \n if (x > this._maxx) \n this._maxx = x\n \n if (y < this._miny) \n this._miny = y\n \n if (y > this._maxy) \n this._maxy = y\n \n }\n }\n }\n minExtent() {\n if (this.isNull()) return 0.0\n const w = this.getWidth()\n const h = this.getHeight()\n if (w < h) return w\n return h\n }\n getWidth() {\n if (this.isNull()) \n return 0\n \n return this._maxx - this._minx\n }\n compareTo(o) {\n const env = o\n if (this.isNull()) {\n if (env.isNull()) return 0\n return -1\n } else {\n if (env.isNull()) return 1\n }\n if (this._minx < env._minx) return -1\n if (this._minx > env._minx) return 1\n if (this._miny < env._miny) return -1\n if (this._miny > env._miny) return 1\n if (this._maxx < env._maxx) return -1\n if (this._maxx > env._maxx) return 1\n if (this._maxy < env._maxy) return -1\n if (this._maxy > env._maxy) return 1\n return 0\n }\n translate(transX, transY) {\n if (this.isNull()) \n return null\n \n this.init(this.getMinX() + transX, this.getMaxX() + transX, this.getMinY() + transY, this.getMaxY() + transY)\n }\n copy() {\n return new Envelope(this)\n }\n toString() {\n return 'Env[' + this._minx + ' : ' + this._maxx + ', ' + this._miny + ' : ' + this._maxy + ']'\n }\n setToNull() {\n this._minx = 0\n this._maxx = -1\n this._miny = 0\n this._maxy = -1\n }\n disjoint(other) {\n if (this.isNull() || other.isNull()) \n return true\n \n return other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny\n }\n getHeight() {\n if (this.isNull()) \n return 0\n \n return this._maxy - this._miny\n }\n maxExtent() {\n if (this.isNull()) return 0.0\n const w = this.getWidth()\n const h = this.getHeight()\n if (w > h) return w\n return h\n }\n expandBy() {\n if (arguments.length === 1) {\n const distance = arguments[0]\n this.expandBy(distance, distance)\n } else if (arguments.length === 2) {\n const deltaX = arguments[0], deltaY = arguments[1]\n if (this.isNull()) return null\n this._minx -= deltaX\n this._maxx += deltaX\n this._miny -= deltaY\n this._maxy += deltaY\n if (this._minx > this._maxx || this._miny > this._maxy) this.setToNull()\n }\n }\n contains() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n return this.covers(other)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.covers(p)\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n return this.covers(x, y)\n }\n }\n centre() {\n if (this.isNull()) return null\n return new Coordinate((this.getMinX() + this.getMaxX()) / 2.0, (this.getMinY() + this.getMaxY()) / 2.0)\n }\n init() {\n if (arguments.length === 0) {\n this.setToNull()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.init(p.x, p.x, p.y, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const env = arguments[0]\n this._minx = env._minx\n this._maxx = env._maxx\n this._miny = env._miny\n this._maxy = env._maxy\n }\n } else if (arguments.length === 2) {\n const p1 = arguments[0], p2 = arguments[1]\n this.init(p1.x, p2.x, p1.y, p2.y)\n } else if (arguments.length === 4) {\n const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n if (x1 < x2) {\n this._minx = x1\n this._maxx = x2\n } else {\n this._minx = x2\n this._maxx = x1\n }\n if (y1 < y2) {\n this._miny = y1\n this._maxy = y2\n } else {\n this._miny = y2\n this._maxy = y1\n }\n }\n }\n getMaxY() {\n return this._maxy\n }\n distance(env) {\n if (this.intersects(env)) return 0\n let dx = 0.0\n if (this._maxx < env._minx) dx = env._minx - this._maxx; else if (this._minx > env._maxx) dx = this._minx - env._maxx\n let dy = 0.0\n if (this._maxy < env._miny) dy = env._miny - this._maxy; else if (this._miny > env._maxy) dy = this._miny - env._maxy\n if (dx === 0.0) return dy\n if (dy === 0.0) return dx\n return Math.sqrt(dx * dx + dy * dy)\n }\n hashCode() {\n let result = 17\n result = 37 * result + Coordinate.hashCode(this._minx)\n result = 37 * result + Coordinate.hashCode(this._maxx)\n result = 37 * result + Coordinate.hashCode(this._miny)\n result = 37 * result + Coordinate.hashCode(this._maxy)\n return result\n }\n get interfaces_() {\n return [Comparable, Serializable]\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Envelope from './Envelope.js'\nexport default class Geometry {\n constructor() {\n Geometry.constructor_.apply(this, arguments)\n }\n\n isGeometryCollection() {\n return this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION\n }\n\n getFactory() {\n return this._factory\n }\n\n getGeometryN(n) {\n return this\n }\n\n getArea() {\n return 0.0\n }\n\n isRectangle() {\n return false\n }\n\n equalsExact(other) {\n return this === other || this.equalsExact(other, 0)\n }\n\n geometryChanged() {\n this.apply(Geometry.geometryChangedFilter)\n }\n\n geometryChangedAction() {\n this._envelope = null\n }\n\n equalsNorm(g) {\n if (g === null) return false\n return this.norm().equalsExact(g.norm())\n }\n\n getLength() {\n return 0.0\n }\n\n getNumGeometries() {\n return 1\n }\n\n compareTo() {\n let other\n if (arguments.length === 1) {\n const o = arguments[0]\n other = o\n if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n if (this.isEmpty() && other.isEmpty()) return 0\n\n if (this.isEmpty()) return -1\n\n if (other.isEmpty()) return 1\n\n return this.compareToSameClass(o)\n } else if (arguments.length === 2) {\n const o = arguments[0]; const comp = arguments[1]\n other = o\n if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n if (this.isEmpty() && other.isEmpty()) return 0\n\n if (this.isEmpty()) return -1\n\n if (other.isEmpty()) return 1\n\n return this.compareToSameClass(o, comp)\n }\n }\n\n getUserData() {\n return this._userData\n }\n\n getSRID() {\n return this._SRID\n }\n\n getEnvelope() {\n return this.getFactory().toGeometry(this.getEnvelopeInternal())\n }\n\n checkNotGeometryCollection(g) {\n if (g.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n }\n\n equal(a, b, tolerance) {\n if (tolerance === 0) return a.equals(b)\n\n return a.distance(b) <= tolerance\n }\n\n norm() {\n const copy = this.copy()\n copy.normalize()\n return copy\n }\n\n reverse() {\n const res = this.reverseInternal()\n if (this.envelope != null) res.envelope = this.envelope.copy()\n\n res.setSRID(this.getSRID())\n return res\n }\n\n copy() {\n const copy = this.copyInternal()\n copy.envelope = this._envelope == null ? null : this._envelope.copy()\n copy._SRID = this._SRID\n copy._userData = this._userData\n return copy\n }\n\n getPrecisionModel() {\n return this._factory.getPrecisionModel()\n }\n\n getEnvelopeInternal() {\n if (this._envelope === null) this._envelope = this.computeEnvelopeInternal()\n\n return new Envelope(this._envelope)\n }\n\n setSRID(SRID) {\n this._SRID = SRID\n }\n\n setUserData(userData) {\n this._userData = userData\n }\n\n compare(a, b) {\n const i = a.iterator()\n const j = b.iterator()\n while (i.hasNext() && j.hasNext()) {\n const aElement = i.next()\n const bElement = j.next()\n const comparison = aElement.compareTo(bElement)\n if (comparison !== 0) return comparison\n }\n if (i.hasNext()) return 1\n\n if (j.hasNext()) return -1\n\n return 0\n }\n\n hashCode() {\n return this.getEnvelopeInternal().hashCode()\n }\n\n isEquivalentClass(other) {\n return this.getClass() === other.getClass()\n }\n\n isGeometryCollectionOrDerived() {\n if (this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION || this.getTypeCode() === Geometry.TYPECODE_MULTIPOINT || this.getTypeCode() === Geometry.TYPECODE_MULTILINESTRING || this.getTypeCode() === Geometry.TYPECODE_MULTIPOLYGON) return true\n\n return false\n }\n\n get interfaces_() {\n return [Cloneable, Comparable, Serializable]\n }\n\n getClass() {\n return Geometry\n }\n\n static hasNonEmptyElements(geometries) {\n for (let i = 0; i < geometries.length; i++)\n if (!geometries[i].isEmpty()) return true\n\n return false\n }\n\n static hasNullElements(array) {\n for (let i = 0; i < array.length; i++)\n if (array[i] === null) return true\n\n return false\n }\n}\nGeometry.constructor_ = function(factory) {\n if (!factory) return\n this._envelope = null\n this._userData = null\n this._factory = factory\n this._SRID = factory.getSRID()\n}\nGeometry.TYPECODE_POINT = 0\nGeometry.TYPECODE_MULTIPOINT = 1\nGeometry.TYPECODE_LINESTRING = 2\nGeometry.TYPECODE_LINEARRING = 3\nGeometry.TYPECODE_MULTILINESTRING = 4\nGeometry.TYPECODE_POLYGON = 5\nGeometry.TYPECODE_MULTIPOLYGON = 6\nGeometry.TYPECODE_GEOMETRYCOLLECTION = 7\nGeometry.TYPENAME_POINT = 'Point'\nGeometry.TYPENAME_MULTIPOINT = 'MultiPoint'\nGeometry.TYPENAME_LINESTRING = 'LineString'\nGeometry.TYPENAME_LINEARRING = 'LinearRing'\nGeometry.TYPENAME_MULTILINESTRING = 'MultiLineString'\nGeometry.TYPENAME_POLYGON = 'Polygon'\nGeometry.TYPENAME_MULTIPOLYGON = 'MultiPolygon'\nGeometry.TYPENAME_GEOMETRYCOLLECTION = 'GeometryCollection'\nGeometry.geometryChangedFilter = {\n get interfaces_() {\n return [GeometryComponentFilter]\n },\n filter(geom) {\n geom.geometryChangedAction()\n }\n}\n","export default class CoordinateFilter {\n filter(coord) {}\n}\n","export default function(o, i) {\n return o.interfaces_ && o.interfaces_.indexOf(i) > -1\n}\n","export default class Lineal {}\n","import Double from '../../../../java/lang/Double.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nexport default class CoordinateSequence {\n getM(index) {\n if (this.hasM()) {\n const mIndex = this.getDimension() - this.getMeasures()\n return this.getOrdinate(index, mIndex)\n } else {\n return Double.NaN\n }\n }\n setOrdinate(index, ordinateIndex, value) {}\n getZ(index) {\n if (this.hasZ()) \n return this.getOrdinate(index, 2)\n else \n return Double.NaN\n \n }\n size() {}\n getOrdinate(index, ordinateIndex) {}\n getCoordinate() {\n if (arguments.length === 1) {\n const i = arguments[0]\n } else if (arguments.length === 2) {\n const index = arguments[0], coord = arguments[1]\n }\n }\n getCoordinateCopy(i) {}\n createCoordinate() {}\n getDimension() {}\n hasM() {\n return this.getMeasures() > 0\n }\n getX(index) {}\n hasZ() {\n return this.getDimension() - this.getMeasures() > 2\n }\n getMeasures() {\n return 0\n }\n expandEnvelope(env) {}\n copy() {}\n getY(index) {}\n toCoordinateArray() {}\n get interfaces_() {\n return [Cloneable]\n }\n}\nCoordinateSequence.X = 0\nCoordinateSequence.Y = 1\nCoordinateSequence.Z = 2\nCoordinateSequence.M = 3\n","import hasInterface from '../../../../hasInterface.js'\nimport Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nexport default class CoordinateSequences {\n static copyCoord(src, srcPos, dest, destPos) {\n const minDim = Math.min(src.getDimension(), dest.getDimension())\n for (let dim = 0; dim < minDim; dim++) \n dest.setOrdinate(destPos, dim, src.getOrdinate(srcPos, dim))\n \n }\n static isRing(seq) {\n const n = seq.size()\n if (n === 0) return true\n if (n <= 3) return false\n return seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n }\n static scroll() {\n if (arguments.length === 2) {\n if (hasInterface(arguments[0], CoordinateSequence) && Number.isInteger(arguments[1])) {\n const seq = arguments[0], indexOfFirstCoordinate = arguments[1]\n CoordinateSequences.scroll(seq, indexOfFirstCoordinate, CoordinateSequences.isRing(seq))\n } else if (hasInterface(arguments[0], CoordinateSequence) && arguments[1] instanceof Coordinate) {\n const seq = arguments[0], firstCoordinate = arguments[1]\n const i = CoordinateSequences.indexOf(firstCoordinate, seq)\n if (i <= 0) return null\n CoordinateSequences.scroll(seq, i)\n }\n } else if (arguments.length === 3) {\n const seq = arguments[0], indexOfFirstCoordinate = arguments[1], ensureRing = arguments[2]\n const i = indexOfFirstCoordinate\n if (i <= 0) return null\n const copy = seq.copy()\n const last = ensureRing ? seq.size() - 1 : seq.size()\n for (let j = 0; j < last; j++) \n for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(j, k, copy.getOrdinate((indexOfFirstCoordinate + j) % last, k))\n \n if (ensureRing) \n for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(last, k, seq.getOrdinate(0, k))\n \n }\n }\n static isEqual(cs1, cs2) {\n const cs1Size = cs1.size()\n const cs2Size = cs2.size()\n if (cs1Size !== cs2Size) return false\n const dim = Math.min(cs1.getDimension(), cs2.getDimension())\n for (let i = 0; i < cs1Size; i++) \n for (let d = 0; d < dim; d++) {\n const v1 = cs1.getOrdinate(i, d)\n const v2 = cs2.getOrdinate(i, d)\n if (cs1.getOrdinate(i, d) === cs2.getOrdinate(i, d)) continue\n if (Double.isNaN(v1) && Double.isNaN(v2)) continue\n return false\n }\n \n return true\n }\n static minCoordinateIndex() {\n if (arguments.length === 1) {\n const seq = arguments[0]\n return CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 1)\n } else if (arguments.length === 3) {\n const seq = arguments[0], from = arguments[1], to = arguments[2]\n let minCoordIndex = -1\n let minCoord = null\n for (let i = from; i <= to; i++) {\n const testCoord = seq.getCoordinate(i)\n if (minCoord === null || minCoord.compareTo(testCoord) > 0) {\n minCoord = testCoord\n minCoordIndex = i\n }\n }\n return minCoordIndex\n }\n }\n static extend(fact, seq, size) {\n const newseq = fact.create(size, seq.getDimension())\n const n = seq.size()\n CoordinateSequences.copy(seq, 0, newseq, 0, n)\n if (n > 0) \n for (let i = n; i < size; i++) CoordinateSequences.copy(seq, n - 1, newseq, i, 1)\n \n return newseq\n }\n static reverse(seq) {\n const last = seq.size() - 1\n const mid = Math.trunc(last / 2)\n for (let i = 0; i <= mid; i++) \n CoordinateSequences.swap(seq, i, last - i)\n \n }\n static swap(seq, i, j) {\n if (i === j) return null\n for (let dim = 0; dim < seq.getDimension(); dim++) {\n const tmp = seq.getOrdinate(i, dim)\n seq.setOrdinate(i, dim, seq.getOrdinate(j, dim))\n seq.setOrdinate(j, dim, tmp)\n }\n }\n static copy(src, srcPos, dest, destPos, length) {\n for (let i = 0; i < length; i++) \n CoordinateSequences.copyCoord(src, srcPos + i, dest, destPos + i)\n \n }\n static ensureValidRing(fact, seq) {\n const n = seq.size()\n if (n === 0) return seq\n if (n <= 3) return CoordinateSequences.createClosedRing(fact, seq, 4)\n const isClosed = seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n if (isClosed) return seq\n return CoordinateSequences.createClosedRing(fact, seq, n + 1)\n }\n static indexOf(coordinate, seq) {\n for (let i = 0; i < seq.size(); i++) \n if (coordinate.x === seq.getOrdinate(i, CoordinateSequence.X) && coordinate.y === seq.getOrdinate(i, CoordinateSequence.Y)) \n return i\n \n \n return -1\n }\n static createClosedRing(fact, seq, size) {\n const newseq = fact.create(size, seq.getDimension())\n const n = seq.size()\n CoordinateSequences.copy(seq, 0, newseq, 0, n)\n for (let i = n; i < size; i++) CoordinateSequences.copy(seq, 0, newseq, i, 1)\n return newseq\n }\n static minCoordinate(seq) {\n let minCoord = null\n for (let i = 0; i < seq.size(); i++) {\n const testCoord = seq.getCoordinate(i)\n if (minCoord === null || minCoord.compareTo(testCoord) > 0) \n minCoord = testCoord\n \n }\n return minCoord\n }\n}\n","import Exception from './Exception.js'\n\nexport default class UnsupportedOperationException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ UnsupportedOperationException })[0]\n }\n}\n","export default class Character {\n static isWhitespace(c) {\n return ((c <= 32 && c >= 0) || c === 127)\n }\n\n static toUpperCase(c) {\n return c.toUpperCase()\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Character from '../../../../java/lang/Character.js'\nexport default class Dimension {\n static toDimensionSymbol(dimensionValue) {\n switch (dimensionValue) {\n case Dimension.FALSE:\n return Dimension.SYM_FALSE\n case Dimension.TRUE:\n return Dimension.SYM_TRUE\n case Dimension.DONTCARE:\n return Dimension.SYM_DONTCARE\n case Dimension.P:\n return Dimension.SYM_P\n case Dimension.L:\n return Dimension.SYM_L\n case Dimension.A:\n return Dimension.SYM_A\n }\n throw new IllegalArgumentException('Unknown dimension value: ' + dimensionValue)\n }\n static toDimensionValue(dimensionSymbol) {\n switch (Character.toUpperCase(dimensionSymbol)) {\n case Dimension.SYM_FALSE:\n return Dimension.FALSE\n case Dimension.SYM_TRUE:\n return Dimension.TRUE\n case Dimension.SYM_DONTCARE:\n return Dimension.DONTCARE\n case Dimension.SYM_P:\n return Dimension.P\n case Dimension.SYM_L:\n return Dimension.L\n case Dimension.SYM_A:\n return Dimension.A\n }\n throw new IllegalArgumentException('Unknown dimension symbol: ' + dimensionSymbol)\n }\n}\nDimension.P = 0\nDimension.L = 1\nDimension.A = 2\nDimension.FALSE = -1\nDimension.TRUE = -2\nDimension.DONTCARE = -3\nDimension.SYM_FALSE = 'F'\nDimension.SYM_TRUE = 'T'\nDimension.SYM_DONTCARE = '*'\nDimension.SYM_P = '0'\nDimension.SYM_L = '1'\nDimension.SYM_A = '2'\n","export default class GeometryFilter {\n filter(geom) {}\n}\n","export default class CoordinateSequenceFilter {\n filter(seq, i) {}\n isDone() {}\n isGeometryChanged() {}\n}\n","import Geometry from './Geometry.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Length from '../algorithm/Length.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Lineal from './Lineal.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport Dimension from './Dimension.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Envelope from './Envelope.js'\nexport default class LineString extends Geometry {\n constructor() {\n super()\n LineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._points = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n const points = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n this.init(points)\n }\n }\n computeEnvelopeInternal() {\n if (this.isEmpty()) \n return new Envelope()\n \n return this._points.expandEnvelope(new Envelope())\n }\n isRing() {\n return this.isClosed() && this.isSimple()\n }\n getCoordinates() {\n return this._points.toCoordinateArray()\n }\n copyInternal() {\n return new LineString(this._points.copy(), this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherLineString = other\n if (this._points.size() !== otherLineString._points.size()) \n return false\n \n for (let i = 0; i < this._points.size(); i++) \n if (!this.equal(this._points.getCoordinate(i), otherLineString._points.getCoordinate(i), tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n for (let i = 0; i < Math.trunc(this._points.size() / 2); i++) {\n const j = this._points.size() - 1 - i\n if (!this._points.getCoordinate(i).equals(this._points.getCoordinate(j))) {\n if (this._points.getCoordinate(i).compareTo(this._points.getCoordinate(j)) > 0) {\n const copy = this._points.copy()\n CoordinateSequences.reverse(copy)\n this._points = copy\n }\n return null\n }\n }\n }\n getCoordinate() {\n if (this.isEmpty()) return null\n return this._points.getCoordinate(0)\n }\n getBoundaryDimension() {\n if (this.isClosed()) \n return Dimension.FALSE\n \n return 0\n }\n isClosed() {\n if (this.isEmpty()) \n return false\n \n return this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints() - 1))\n }\n reverseInternal() {\n const seq = this._points.copy()\n CoordinateSequences.reverse(seq)\n return this.getFactory().createLineString(seq)\n }\n getEndPoint() {\n if (this.isEmpty()) \n return null\n \n return this.getPointN(this.getNumPoints() - 1)\n }\n getTypeCode() {\n return Geometry.TYPECODE_LINESTRING\n }\n getDimension() {\n return 1\n }\n getLength() {\n return Length.ofLine(this._points)\n }\n getNumPoints() {\n return this._points.size()\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const line = o\n let i = 0\n let j = 0\n while (i < this._points.size() && j < line._points.size()) {\n const comparison = this._points.getCoordinate(i).compareTo(line._points.getCoordinate(j))\n if (comparison !== 0) \n return comparison\n \n i++\n j++\n }\n if (i < this._points.size()) \n return 1\n \n if (j < line._points.size()) \n return -1\n \n return 0\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const line = o\n return comp.compare(this._points, line._points)\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n for (let i = 0; i < this._points.size(); i++) \n filter.filter(this._points.getCoordinate(i))\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this._points.size() === 0) return null\n for (let i = 0; i < this._points.size(); i++) {\n filter.filter(this._points, i)\n if (filter.isDone()) break\n }\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n }\n }\n getBoundary() {\n throw new UnsupportedOperationException()\n }\n isEquivalentClass(other) {\n return other instanceof LineString\n }\n getCoordinateN(n) {\n return this._points.getCoordinate(n)\n }\n getGeometryType() {\n return Geometry.TYPENAME_LINESTRING\n }\n getCoordinateSequence() {\n return this._points\n }\n isEmpty() {\n return this._points.size() === 0\n }\n init(points) {\n if (points === null) \n points = this.getFactory().getCoordinateSequenceFactory().create([])\n \n if (points.size() === 1) \n throw new IllegalArgumentException('Invalid number of points in LineString (found ' + points.size() + ' - must be 0 or >= 2)')\n \n this._points = points\n }\n isCoordinate(pt) {\n for (let i = 0; i < this._points.size(); i++) \n if (this._points.getCoordinate(i).equals(pt)) \n return true\n \n \n return false\n }\n getStartPoint() {\n if (this.isEmpty()) \n return null\n \n return this.getPointN(0)\n }\n getPointN(n) {\n return this.getFactory().createPoint(this._points.getCoordinate(n))\n }\n get interfaces_() {\n return [Lineal]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nexport default class Length {\n static ofLine(pts) {\n const n = pts.size()\n if (n <= 1) return 0.0\n let len = 0.0\n const p = new Coordinate()\n pts.getCoordinate(0, p)\n let x0 = p.x\n let y0 = p.y\n for (let i = 1; i < n; i++) {\n pts.getCoordinate(i, p)\n const x1 = p.x\n const y1 = p.y\n const dx = x1 - x0\n const dy = y1 - y0\n len += Math.sqrt(dx * dx + dy * dy)\n x0 = x1\n y0 = y1\n }\n return len\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Collection.html\n */\nexport default class Collection {\n /**\n * Ensures that this collection contains the specified element (optional\n * operation).\n * @param {Object} e\n * @return {boolean}\n */\n add() { }\n /**\n * Appends all of the elements in the specified collection to the end of this\n * list, in the order that they are returned by the specified collection's\n * iterator (optional operation).\n * @param {javascript.util.Collection} c\n * @return {boolean}\n */\n addAll() { }\n /**\n * Returns true if this collection contains no elements.\n * @return {boolean}\n */\n isEmpty() { }\n /**\n * Returns an iterator over the elements in this collection.\n * @return {javascript.util.Iterator}\n */\n iterator() { }\n /**\n * Returns an iterator over the elements in this collection.\n * @return {number}\n */\n size() { }\n /**\n * Returns an array containing all of the elements in this collection.\n * @return {Array}\n */\n toArray() { }\n /**\n * Removes a single instance of the specified element from this collection if it\n * is present. (optional)\n * @param {Object} e\n * @return {boolean}\n */\n remove() { }\n}\n","import Exception from './Exception.js'\n\nexport default class IndexOutOfBoundsException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ IndexOutOfBoundsException })[0]\n } \n}","import Collection from './Collection.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/List.html\n */\nexport default class List extends Collection {\n /**\n * Returns the element at the specified position in this list.\n * @param {number} index\n * @return {Object}\n */\n get() { }\n /**\n * Replaces the element at the specified position in this list with the\n * specified element (optional operation).\n * @param {number} index\n * @param {Object} e\n * @return {Object}\n */\n set() { }\n /**\n * Returns true if this collection contains no elements.\n * @return {boolean}\n */\n isEmpty() { }\n}\n","import Exception from '../lang/Exception.js'\n\nexport default class NoSuchElementException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ NoSuchElementException })[0]\n }\n}","import Collection from './Collection.js'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException.js'\nimport List from './List.js'\nimport NoSuchElementException from './NoSuchElementException.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html\n */\nexport default class ArrayList extends List {\n\n constructor(o) {\n super()\n this.array = []\n if (o instanceof Collection) this.addAll(o)\n }\n\n get interfaces_() {\n return [List, Collection]\n }\n\n ensureCapacity() { }\n\n add(e) {\n if (arguments.length === 1)\n this.array.push(e)\n else\n this.array.splice(arguments[0], 0, arguments[1])\n return true\n }\n\n clear() {\n this.array = []\n }\n\n addAll(c) {\n for (const e of c)\n this.array.push(e)\n }\n\n set(index, element) {\n const oldElement = this.array[index]\n this.array[index] = element\n return oldElement\n }\n\n iterator() {\n return new Iterator(this)\n }\n\n get(index) {\n if (index < 0 || index >= this.size())\n throw new IndexOutOfBoundsException()\n return this.array[index]\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n\n sort(comparator) {\n if (comparator)\n this.array.sort((a, b) => comparator.compare(a, b))\n else this.array.sort()\n }\n\n size() {\n return this.array.length\n }\n\n toArray() {\n return this.array.slice()\n }\n\n remove(o) {\n for (let i = 0, len = this.array.length; i < len; i++)\n if (this.array[i] === o)\n return !!this.array.splice(i, 1)\n return false\n }\n\n [Symbol.iterator]() {\n return this.array.values()\n }\n}\n\nclass Iterator {\n constructor(arrayList) {\n this.arrayList = arrayList\n this.position = 0\n }\n\n next() {\n if (this.position === this.arrayList.size())\n throw new NoSuchElementException()\n return this.arrayList.get(this.position++)\n }\n\n hasNext() {\n return this.position < this.arrayList.size()\n }\n\n set(element) {\n return this.arrayList.set(this.position - 1, element)\n }\n\n remove() {\n this.arrayList.remove(this.arrayList.get(this.position))\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Collection from '../../../../java/util/Collection.js'\nimport Coordinate from './Coordinate.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class CoordinateList extends ArrayList {\n constructor() {\n super()\n CoordinateList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const coord = arguments[0]\n this.ensureCapacity(coord.length)\n this.add(coord, true)\n } else if (arguments.length === 2) {\n const coord = arguments[0], allowRepeated = arguments[1]\n this.ensureCapacity(coord.length)\n this.add(coord, allowRepeated)\n }\n }\n getCoordinate(i) {\n return this.get(i)\n }\n addAll() {\n if (arguments.length === 2 && (typeof arguments[1] === 'boolean' && hasInterface(arguments[0], Collection))) {\n const coll = arguments[0], allowRepeated = arguments[1]\n let isChanged = false\n for (let i = coll.iterator(); i.hasNext(); ) {\n this.add(i.next(), allowRepeated)\n isChanged = true\n }\n return isChanged\n } else {\n return super.addAll.apply(this, arguments)\n }\n }\n clone() {\n const clone = super.clone.call(this)\n for (let i = 0; i < this.size(); i++) \n clone.add(i, this.get(i).clone())\n \n return clone\n }\n toCoordinateArray() {\n if (arguments.length === 0) {\n return this.toArray(CoordinateList.coordArrayType)\n } else if (arguments.length === 1) {\n const isForward = arguments[0]\n if (isForward) \n return this.toArray(CoordinateList.coordArrayType)\n \n const size = this.size()\n const pts = new Array(size).fill(null)\n for (let i = 0; i < size; i++) \n pts[i] = this.get(size - i - 1)\n \n return pts\n }\n }\n add() {\n if (arguments.length === 1) {\n const coord = arguments[0]\n return super.add.call(this, coord)\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Array && typeof arguments[1] === 'boolean') {\n const coord = arguments[0], allowRepeated = arguments[1]\n this.add(coord, allowRepeated, true)\n return true\n } else if (arguments[0] instanceof Coordinate && typeof arguments[1] === 'boolean') {\n const coord = arguments[0], allowRepeated = arguments[1]\n if (!allowRepeated) \n if (this.size() >= 1) {\n const last = this.get(this.size() - 1)\n if (last.equals2D(coord)) return null\n }\n \n super.add.call(this, coord)\n } else if (arguments[0] instanceof Object && typeof arguments[1] === 'boolean') {\n const obj = arguments[0], allowRepeated = arguments[1]\n this.add(obj, allowRepeated)\n return true\n }\n } else if (arguments.length === 3) {\n if (typeof arguments[2] === 'boolean' && (arguments[0] instanceof Array && typeof arguments[1] === 'boolean')) {\n const coord = arguments[0], allowRepeated = arguments[1], direction = arguments[2]\n if (direction) \n for (let i = 0; i < coord.length; i++) \n this.add(coord[i], allowRepeated)\n \n else \n for (let i = coord.length - 1; i >= 0; i--) \n this.add(coord[i], allowRepeated)\n \n \n return true\n } else if (typeof arguments[2] === 'boolean' && (Number.isInteger(arguments[0]) && arguments[1] instanceof Coordinate)) {\n const i = arguments[0], coord = arguments[1], allowRepeated = arguments[2]\n if (!allowRepeated) {\n const size = this.size()\n if (size > 0) {\n if (i > 0) {\n const prev = this.get(i - 1)\n if (prev.equals2D(coord)) return null\n }\n if (i < size) {\n const next = this.get(i)\n if (next.equals2D(coord)) return null\n }\n }\n }\n super.add.call(this, i, coord)\n }\n } else if (arguments.length === 4) {\n const coord = arguments[0], allowRepeated = arguments[1], start = arguments[2], end = arguments[3]\n let inc = 1\n if (start > end) inc = -1\n for (let i = start; i !== end; i += inc) \n this.add(coord[i], allowRepeated)\n \n return true\n }\n }\n closeRing() {\n if (this.size() > 0) {\n const duplicate = this.get(0).copy()\n this.add(duplicate, false)\n }\n }\n}\nCoordinateList.coordArrayType = new Array(0).fill(null)\n","import hasInterface from '../../../../hasInterface.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nexport default class CoordinateSequenceFactory {\n create() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n }\n } else if (arguments.length === 2) {\n const size = arguments[0], dimension = arguments[1]\n } else if (arguments.length === 3) {\n const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n return this.create(size, dimension)\n }\n }\n}\n","export default class Puntal {}\n","import Geometry from './Geometry.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Dimension from './Dimension.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Puntal from './Puntal.js'\nimport Envelope from './Envelope.js'\nimport Assert from '../util/Assert.js'\nexport default class Point extends Geometry {\n constructor() {\n super()\n Point.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._coordinates = null\n const coordinates = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n this.init(coordinates)\n }\n computeEnvelopeInternal() {\n if (this.isEmpty()) \n return new Envelope()\n \n const env = new Envelope()\n env.expandToInclude(this._coordinates.getX(0), this._coordinates.getY(0))\n return env\n }\n getCoordinates() {\n return this.isEmpty() ? [] : [this.getCoordinate()]\n }\n copyInternal() {\n return new Point(this._coordinates.copy(), this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n if (this.isEmpty() && other.isEmpty()) \n return true\n \n if (this.isEmpty() !== other.isEmpty()) \n return false\n \n return this.equal(other.getCoordinate(), this.getCoordinate(), tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {}\n getCoordinate() {\n return this._coordinates.size() !== 0 ? this._coordinates.getCoordinate(0) : null\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n reverseInternal() {\n return this.getFactory().createPoint(this._coordinates.copy())\n }\n getTypeCode() {\n return Geometry.TYPECODE_POINT\n }\n getDimension() {\n return 0\n }\n getNumPoints() {\n return this.isEmpty() ? 0 : 1\n }\n getX() {\n if (this.getCoordinate() === null) \n throw new IllegalStateException('getX called on empty Point')\n \n return this.getCoordinate().x\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const other = arguments[0]\n const point = other\n return this.getCoordinate().compareTo(point.getCoordinate())\n } else if (arguments.length === 2) {\n const other = arguments[0], comp = arguments[1]\n const point = other\n return comp.compare(this._coordinates, point._coordinates)\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n if (this.isEmpty()) \n return null\n \n filter.filter(this.getCoordinate())\n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this.isEmpty()) return null\n filter.filter(this._coordinates, 0)\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n }\n }\n getBoundary() {\n return this.getFactory().createGeometryCollection()\n }\n getGeometryType() {\n return Geometry.TYPENAME_POINT\n }\n getCoordinateSequence() {\n return this._coordinates\n }\n getY() {\n if (this.getCoordinate() === null) \n throw new IllegalStateException('getY called on empty Point')\n \n return this.getCoordinate().y\n }\n isEmpty() {\n return this._coordinates.size() === 0\n }\n init(coordinates) {\n if (coordinates === null) \n coordinates = this.getFactory().getCoordinateSequenceFactory().create([])\n \n Assert.isTrue(coordinates.size() <= 1)\n this._coordinates = coordinates\n }\n isSimple() {\n return true\n }\n get interfaces_() {\n return [Puntal]\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class Area {\n static ofRing() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n return Math.abs(Area.ofRingSigned(ring))\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n return Math.abs(Area.ofRingSigned(ring))\n }\n }\n static ofRingSigned() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n if (ring.length < 3) return 0.0\n let sum = 0.0\n const x0 = ring[0].x\n for (let i = 1; i < ring.length - 1; i++) {\n const x = ring[i].x - x0\n const y1 = ring[i + 1].y\n const y2 = ring[i - 1].y\n sum += x * (y2 - y1)\n }\n return sum / 2.0\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n const n = ring.size()\n if (n < 3) return 0.0\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n const p2 = new Coordinate()\n ring.getCoordinate(0, p1)\n ring.getCoordinate(1, p2)\n const x0 = p1.x\n p2.x -= x0\n let sum = 0.0\n for (let i = 1; i < n - 1; i++) {\n p0.y = p1.y\n p1.x = p2.x\n p1.y = p2.y\n ring.getCoordinate(i + 1, p2)\n p2.x -= x0\n sum += p1.x * (p0.y - p2.y)\n }\n return sum / 2.0\n }\n }\n}\n","import ArrayList from './ArrayList.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html\n */\nexport default class Arrays {\n static sort() {\n const a = arguments[0]\n if (arguments.length === 1) {\n a.sort((a, b) => a.compareTo(b))\n } else if (arguments.length === 2) {\n a.sort((a, b) => arguments[1].compare(a, b))\n } else if (arguments.length === 3) {\n const t = a.slice(arguments[1], arguments[2])\n t.sort()\n const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n a.splice(0, a.length)\n for (const e of r)\n a.push(e)\n } else if (arguments.length === 4) {\n const t = a.slice(arguments[1], arguments[2])\n t.sort((a, b) => arguments[3].compare(a, b))\n const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n a.splice(0, a.length)\n for (const e of r)\n a.push(e)\n }\n }\n\n /**\n * @param {Array} array\n * @return {ArrayList}\n */\n static asList(array) {\n const arrayList = new ArrayList()\n for (const e of array)\n arrayList.add(e)\n return arrayList\n }\n\n static copyOf(original, newLength) {\n return original.slice(0, newLength)\n }\n}\n","export default class StringBuffer {\n constructor(str) {\n this.str = str\n }\n append(e) {\n this.str += e\n }\n setCharAt(i, c) {\n this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n }\n toString() {\n return this.str\n }\n}","export default class Integer {\n constructor(value) {\n this.value = value\n }\n\n intValue() {\n return this.value\n }\n\n compareTo(o) {\n if (this.value < o)\n return -1\n if (this.value > o)\n return 1\n return 0\n }\n\n static compare(x, y) {\n if (x < y)\n return -1\n if (x > y)\n return 1\n return 0\n }\n\n static isNan(n) {\n return Number.isNaN(n)\n }\n\n static valueOf(value) {\n return new Integer(value)\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport Character from '../../../../java/lang/Character.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class DD {\n constructor() {\n DD.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hi = 0.0\n this._lo = 0.0\n if (arguments.length === 0) {\n this.init(0.0)\n } else if (arguments.length === 1) {\n if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n this.init(x)\n } else if (arguments[0] instanceof DD) {\n const dd = arguments[0]\n this.init(dd)\n } else if (typeof arguments[0] === 'string') {\n const str = arguments[0]\n DD.constructor_.call(this, DD.parse(str))\n }\n } else if (arguments.length === 2) {\n const hi = arguments[0], lo = arguments[1]\n this.init(hi, lo)\n }\n }\n static determinant() {\n if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n return DD.determinant(DD.valueOf(x1), DD.valueOf(y1), DD.valueOf(x2), DD.valueOf(y2))\n } else if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det\n }\n }\n static sqr(x) {\n return DD.valueOf(x).selfMultiply(x)\n }\n static valueOf() {\n if (typeof arguments[0] === 'string') {\n const str = arguments[0]\n return DD.parse(str)\n } else if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n return new DD(x)\n }\n }\n static sqrt(x) {\n return DD.valueOf(x).sqrt()\n }\n static parse(str) {\n let i = 0\n const strlen = str.length\n while (Character.isWhitespace(str.charAt(i))) i++\n let isNegative = false\n if (i < strlen) {\n const signCh = str.charAt(i)\n if (signCh === '-' || signCh === '+') {\n i++\n if (signCh === '-') isNegative = true\n }\n }\n const val = new DD()\n let numDigits = 0\n let numBeforeDec = 0\n let exp = 0\n let hasDecimalChar = false\n while (true) {\n if (i >= strlen) break\n const ch = str.charAt(i)\n i++\n if (Character.isDigit(ch)) {\n const d = ch - '0'\n val.selfMultiply(DD.TEN)\n val.selfAdd(d)\n numDigits++\n continue\n }\n if (ch === '.') {\n numBeforeDec = numDigits\n hasDecimalChar = true\n continue\n }\n if (ch === 'e' || ch === 'E') {\n const expStr = str.substring(i)\n try {\n exp = Integer.parseInt(expStr)\n } catch (ex) {\n if (ex instanceof NumberFormatException) \n throw new NumberFormatException('Invalid exponent ' + expStr + ' in string ' + str)\n else throw ex\n } finally {}\n break\n }\n throw new NumberFormatException('Unexpected character \\'' + ch + '\\' at position ' + i + ' in string ' + str)\n }\n let val2 = val\n if (!hasDecimalChar) numBeforeDec = numDigits\n const numDecPlaces = numDigits - numBeforeDec - exp\n if (numDecPlaces === 0) {\n val2 = val\n } else if (numDecPlaces > 0) {\n const scale = DD.TEN.pow(numDecPlaces)\n val2 = val.divide(scale)\n } else if (numDecPlaces < 0) {\n const scale = DD.TEN.pow(-numDecPlaces)\n val2 = val.multiply(scale)\n }\n if (isNegative) \n return val2.negate()\n \n return val2\n }\n static createNaN() {\n return new DD(Double.NaN, Double.NaN)\n }\n static copy(dd) {\n return new DD(dd)\n }\n static magnitude(x) {\n const xAbs = Math.abs(x)\n const xLog10 = Math.log(xAbs) / Math.log(10)\n let xMag = Math.trunc(Math.floor(xLog10))\n const xApprox = Math.pow(10, xMag)\n if (xApprox * 10 <= xAbs) xMag += 1\n return xMag\n }\n static stringOfChar(ch, len) {\n const buf = new StringBuffer()\n for (let i = 0; i < len; i++) \n buf.append(ch)\n \n return buf.toString()\n }\n le(y) {\n return this._hi < y._hi || this._hi === y._hi && this._lo <= y._lo\n }\n extractSignificantDigits(insertDecimalPoint, magnitude) {\n let y = this.abs()\n let mag = DD.magnitude(y._hi)\n const scale = DD.TEN.pow(mag)\n y = y.divide(scale)\n if (y.gt(DD.TEN)) {\n y = y.divide(DD.TEN)\n mag += 1\n } else if (y.lt(DD.ONE)) {\n y = y.multiply(DD.TEN)\n mag -= 1\n }\n const decimalPointPos = mag + 1\n const buf = new StringBuffer()\n const numDigits = DD.MAX_PRINT_DIGITS - 1\n for (let i = 0; i <= numDigits; i++) {\n if (insertDecimalPoint && i === decimalPointPos) \n buf.append('.')\n \n const digit = Math.trunc(y._hi)\n if (digit < 0 || digit > 9) {}\n if (digit < 0) \n break\n \n let rebiasBy10 = false\n let digitChar = 0\n if (digit > 9) {\n rebiasBy10 = true\n digitChar = '9'\n } else {\n digitChar = '0' + digit\n }\n buf.append(digitChar)\n y = y.subtract(DD.valueOf(digit)).multiply(DD.TEN)\n if (rebiasBy10) y.selfAdd(DD.TEN)\n let continueExtractingDigits = true\n const remMag = DD.magnitude(y._hi)\n if (remMag < 0 && Math.abs(remMag) >= numDigits - i) continueExtractingDigits = false\n if (!continueExtractingDigits) break\n }\n magnitude[0] = mag\n return buf.toString()\n }\n sqr() {\n return this.multiply(this)\n }\n doubleValue() {\n return this._hi + this._lo\n }\n subtract() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.add(y.negate())\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.add(-y)\n }\n }\n equals() {\n if (arguments.length === 1 && arguments[0] instanceof DD) {\n const y = arguments[0]\n return this._hi === y._hi && this._lo === y._lo\n }\n }\n isZero() {\n return this._hi === 0.0 && this._lo === 0.0\n }\n selfSubtract() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n if (this.isNaN()) return this\n return this.selfAdd(-y._hi, -y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (this.isNaN()) return this\n return this.selfAdd(-y, 0.0)\n }\n }\n getSpecialNumberString() {\n if (this.isZero()) return '0.0'\n if (this.isNaN()) return 'NaN '\n return null\n }\n min(x) {\n if (this.le(x)) \n return this\n else \n return x\n \n }\n selfDivide() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfDivide(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.selfDivide(y, 0.0)\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = this._hi / yhi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * yhi\n hc = c - hc\n tc = C - hc\n hy = u - yhi\n U = C * yhi\n hy = u - hy\n ty = yhi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (this._hi - U - u + this._lo - C * ylo) / yhi\n u = C + c\n this._hi = u\n this._lo = C - u + c\n return this\n }\n }\n dump() {\n return 'DD<' + this._hi + ', ' + this._lo + '>'\n }\n divide() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = this._hi / y._hi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * y._hi\n hc = c - hc\n tc = C - hc\n hy = u - y._hi\n U = C * y._hi\n hy = u - hy\n ty = y._hi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (this._hi - U - u + this._lo - C * y._lo) / y._hi\n u = C + c\n const zhi = u\n const zlo = C - u + c\n return new DD(zhi, zlo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (Double.isNaN(y)) return DD.createNaN()\n return DD.copy(this).selfDivide(y, 0.0)\n }\n }\n ge(y) {\n return this._hi > y._hi || this._hi === y._hi && this._lo >= y._lo\n }\n pow(exp) {\n if (exp === 0.0) return DD.valueOf(1.0)\n let r = new DD(this)\n let s = DD.valueOf(1.0)\n let n = Math.abs(exp)\n if (n > 1) \n while (n > 0) {\n if (n % 2 === 1) \n s.selfMultiply(r)\n \n n /= 2\n if (n > 0) r = r.sqr()\n }\n else \n s = r\n \n if (exp < 0) return s.reciprocal()\n return s\n }\n ceil() {\n if (this.isNaN()) return DD.NaN\n const fhi = Math.ceil(this._hi)\n let flo = 0.0\n if (fhi === this._hi) \n flo = Math.ceil(this._lo)\n \n return new DD(fhi, flo)\n }\n compareTo(o) {\n const other = o\n if (this._hi < other._hi) return -1\n if (this._hi > other._hi) return 1\n if (this._lo < other._lo) return -1\n if (this._lo > other._lo) return 1\n return 0\n }\n rint() {\n if (this.isNaN()) return this\n const plus5 = this.add(0.5)\n return plus5.floor()\n }\n setValue() {\n if (arguments[0] instanceof DD) {\n const value = arguments[0]\n this.init(value)\n return this\n } else if (typeof arguments[0] === 'number') {\n const value = arguments[0]\n this.init(value)\n return this\n }\n }\n max(x) {\n if (this.ge(x)) \n return this\n else \n return x\n \n }\n sqrt() {\n if (this.isZero()) return DD.valueOf(0.0)\n if (this.isNegative()) \n return DD.NaN\n \n const x = 1.0 / Math.sqrt(this._hi)\n const ax = this._hi * x\n const axdd = DD.valueOf(ax)\n const diffSq = this.subtract(axdd.sqr())\n const d2 = diffSq._hi * (x * 0.5)\n return axdd.add(d2)\n }\n selfAdd() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfAdd(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n let H = null, h = null, S = null, s = null, e = null, f = null\n S = this._hi + y\n e = S - this._hi\n s = S - e\n s = y - e + (this._hi - s)\n f = s + this._lo\n H = S + f\n h = f + (S - H)\n this._hi = H + h\n this._lo = h + (H - this._hi)\n return this\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let H = null, h = null, T = null, t = null, S = null, s = null, e = null, f = null\n S = this._hi + yhi\n T = this._lo + ylo\n e = S - this._hi\n f = T - this._lo\n s = S - e\n t = T - f\n s = yhi - e + (this._hi - s)\n t = ylo - f + (this._lo - t)\n e = s + T\n H = S + e\n h = e + (S - H)\n e = t + h\n const zhi = H + e\n const zlo = e + (H - zhi)\n this._hi = zhi\n this._lo = zlo\n return this\n }\n }\n selfMultiply() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfMultiply(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.selfMultiply(y, 0.0)\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let hx = null, tx = null, hy = null, ty = null, C = null, c = null\n C = DD.SPLIT * this._hi\n hx = C - this._hi\n c = DD.SPLIT * yhi\n hx = C - hx\n tx = this._hi - hx\n hy = c - yhi\n C = this._hi * yhi\n hy = c - hy\n ty = yhi - hy\n c = hx * hy - C + hx * ty + tx * hy + tx * ty + (this._hi * ylo + this._lo * yhi)\n const zhi = C + c\n hx = C - zhi\n const zlo = c + hx\n this._hi = zhi\n this._lo = zlo\n return this\n }\n }\n selfSqr() {\n return this.selfMultiply(this)\n }\n floor() {\n if (this.isNaN()) return DD.NaN\n const fhi = Math.floor(this._hi)\n let flo = 0.0\n if (fhi === this._hi) \n flo = Math.floor(this._lo)\n \n return new DD(fhi, flo)\n }\n negate() {\n if (this.isNaN()) return this\n return new DD(-this._hi, -this._lo)\n }\n clone() {\n try {\n return null\n } catch (ex) {\n if (ex instanceof CloneNotSupportedException) \n return null\n else throw ex\n } finally {}\n }\n multiply() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n if (y.isNaN()) return DD.createNaN()\n return DD.copy(this).selfMultiply(y)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (Double.isNaN(y)) return DD.createNaN()\n return DD.copy(this).selfMultiply(y, 0.0)\n }\n }\n isNaN() {\n return Double.isNaN(this._hi)\n }\n intValue() {\n return Math.trunc(this._hi)\n }\n toString() {\n const mag = DD.magnitude(this._hi)\n if (mag >= -3 && mag <= 20) return this.toStandardNotation()\n return this.toSciNotation()\n }\n toStandardNotation() {\n const specialStr = this.getSpecialNumberString()\n if (specialStr !== null) return specialStr\n const magnitude = new Array(1).fill(null)\n const sigDigits = this.extractSignificantDigits(true, magnitude)\n const decimalPointPos = magnitude[0] + 1\n let num = sigDigits\n if (sigDigits.charAt(0) === '.') {\n num = '0' + sigDigits\n } else if (decimalPointPos < 0) {\n num = '0.' + DD.stringOfChar('0', -decimalPointPos) + sigDigits\n } else if (sigDigits.indexOf('.') === -1) {\n const numZeroes = decimalPointPos - sigDigits.length\n const zeroes = DD.stringOfChar('0', numZeroes)\n num = sigDigits + zeroes + '.0'\n }\n if (this.isNegative()) return '-' + num\n return num\n }\n reciprocal() {\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = 1.0 / this._hi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * this._hi\n hc = c - hc\n tc = C - hc\n hy = u - this._hi\n U = C * this._hi\n hy = u - hy\n ty = this._hi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (1.0 - U - u - C * this._lo) / this._hi\n const zhi = C + c\n const zlo = C - zhi + c\n return new DD(zhi, zlo)\n }\n toSciNotation() {\n if (this.isZero()) return DD.SCI_NOT_ZERO\n const specialStr = this.getSpecialNumberString()\n if (specialStr !== null) return specialStr\n const magnitude = new Array(1).fill(null)\n const digits = this.extractSignificantDigits(false, magnitude)\n const expStr = DD.SCI_NOT_EXPONENT_CHAR + magnitude[0]\n if (digits.charAt(0) === '0') \n throw new IllegalStateException('Found leading zero: ' + digits)\n \n let trailingDigits = ''\n if (digits.length > 1) trailingDigits = digits.substring(1)\n const digitsWithDecimal = digits.charAt(0) + '.' + trailingDigits\n if (this.isNegative()) return '-' + digitsWithDecimal + expStr\n return digitsWithDecimal + expStr\n }\n abs() {\n if (this.isNaN()) return DD.NaN\n if (this.isNegative()) return this.negate()\n return new DD(this)\n }\n isPositive() {\n return this._hi > 0.0 || this._hi === 0.0 && this._lo > 0.0\n }\n lt(y) {\n return this._hi < y._hi || this._hi === y._hi && this._lo < y._lo\n }\n add() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return DD.copy(this).selfAdd(y)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return DD.copy(this).selfAdd(y)\n }\n }\n init() {\n if (arguments.length === 1) {\n if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n this._hi = x\n this._lo = 0.0\n } else if (arguments[0] instanceof DD) {\n const dd = arguments[0]\n this._hi = dd._hi\n this._lo = dd._lo\n }\n } else if (arguments.length === 2) {\n const hi = arguments[0], lo = arguments[1]\n this._hi = hi\n this._lo = lo\n }\n }\n gt(y) {\n return this._hi > y._hi || this._hi === y._hi && this._lo > y._lo\n }\n isNegative() {\n return this._hi < 0.0 || this._hi === 0.0 && this._lo < 0.0\n }\n trunc() {\n if (this.isNaN()) return DD.NaN\n if (this.isPositive()) return this.floor(); else return this.ceil()\n }\n signum() {\n if (this._hi > 0) return 1\n if (this._hi < 0) return -1\n if (this._lo > 0) return 1\n if (this._lo < 0) return -1\n return 0\n }\n get interfaces_() {\n return [Serializable, Comparable, Cloneable]\n }\n}\nDD.PI = new DD(3.141592653589793116e+00, 1.224646799147353207e-16)\nDD.TWO_PI = new DD(6.283185307179586232e+00, 2.449293598294706414e-16)\nDD.PI_2 = new DD(1.570796326794896558e+00, 6.123233995736766036e-17)\nDD.E = new DD(2.718281828459045091e+00, 1.445646891729250158e-16)\nDD.NaN = new DD(Double.NaN, Double.NaN)\nDD.EPS = 1.23259516440783e-32\nDD.SPLIT = 134217729.0\nDD.MAX_PRINT_DIGITS = 32\nDD.TEN = DD.valueOf(10.0)\nDD.ONE = DD.valueOf(1.0)\nDD.SCI_NOT_EXPONENT_CHAR = 'E'\nDD.SCI_NOT_ZERO = '0.0E0'\n","import Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport DD from '../math/DD.js'\nexport default class CGAlgorithmsDD {\n static orientationIndex(p1, p2, q) {\n const index = CGAlgorithmsDD.orientationIndexFilter(p1, p2, q)\n if (index <= 1) return index\n const dx1 = DD.valueOf(p2.x).selfAdd(-p1.x)\n const dy1 = DD.valueOf(p2.y).selfAdd(-p1.y)\n const dx2 = DD.valueOf(q.x).selfAdd(-p2.x)\n const dy2 = DD.valueOf(q.y).selfAdd(-p2.y)\n return dx1.selfMultiply(dy2).selfSubtract(dy1.selfMultiply(dx2)).signum()\n }\n static signOfDet2x2() {\n if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det.signum()\n } else if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n const dx1 = arguments[0], dy1 = arguments[1], dx2 = arguments[2], dy2 = arguments[3]\n const x1 = DD.valueOf(dx1)\n const y1 = DD.valueOf(dy1)\n const x2 = DD.valueOf(dx2)\n const y2 = DD.valueOf(dy2)\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det.signum()\n }\n }\n static intersection(p1, p2, q1, q2) {\n const px = new DD(p1.y).selfSubtract(p2.y)\n const py = new DD(p2.x).selfSubtract(p1.x)\n const pw = new DD(p1.x).selfMultiply(p2.y).selfSubtract(new DD(p2.x).selfMultiply(p1.y))\n const qx = new DD(q1.y).selfSubtract(q2.y)\n const qy = new DD(q2.x).selfSubtract(q1.x)\n const qw = new DD(q1.x).selfMultiply(q2.y).selfSubtract(new DD(q2.x).selfMultiply(q1.y))\n const x = py.multiply(qw).selfSubtract(qy.multiply(pw))\n const y = qx.multiply(pw).selfSubtract(px.multiply(qw))\n const w = px.multiply(qy).selfSubtract(qx.multiply(py))\n const xInt = x.selfDivide(w).doubleValue()\n const yInt = y.selfDivide(w).doubleValue()\n if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n return null\n \n return new Coordinate(xInt, yInt)\n }\n static orientationIndexFilter(pa, pb, pc) {\n let detsum = null\n const detleft = (pa.x - pc.x) * (pb.y - pc.y)\n const detright = (pa.y - pc.y) * (pb.x - pc.x)\n const det = detleft - detright\n if (detleft > 0.0) \n if (detright <= 0.0) \n return CGAlgorithmsDD.signum(det)\n else \n detsum = detleft + detright\n \n else if (detleft < 0.0) \n if (detright >= 0.0) \n return CGAlgorithmsDD.signum(det)\n else \n detsum = -detleft - detright\n \n else \n return CGAlgorithmsDD.signum(det)\n \n const errbound = CGAlgorithmsDD.DP_SAFE_EPSILON * detsum\n if (det >= errbound || -det >= errbound) \n return CGAlgorithmsDD.signum(det)\n \n return 2\n }\n static signum(x) {\n if (x > 0) return 1\n if (x < 0) return -1\n return 0\n }\n}\nCGAlgorithmsDD.DP_SAFE_EPSILON = 1e-15\n","import hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport CGAlgorithmsDD from './CGAlgorithmsDD.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class Orientation {\n static index(p1, p2, q) {\n return CGAlgorithmsDD.orientationIndex(p1, p2, q)\n }\n static isCCW() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n const nPts = ring.length - 1\n if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n let hiPt = ring[0]\n let hiIndex = 0\n for (let i = 1; i <= nPts; i++) {\n const p = ring[i]\n if (p.y > hiPt.y) {\n hiPt = p\n hiIndex = i\n }\n }\n let iPrev = hiIndex\n do {\n iPrev = iPrev - 1\n if (iPrev < 0) iPrev = nPts\n } while (ring[iPrev].equals2D(hiPt) && iPrev !== hiIndex)\n let iNext = hiIndex\n do \n iNext = (iNext + 1) % nPts\n while (ring[iNext].equals2D(hiPt) && iNext !== hiIndex)\n const prev = ring[iPrev]\n const next = ring[iNext]\n if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n const disc = Orientation.index(prev, hiPt, next)\n let isCCW = null\n if (disc === 0) \n isCCW = prev.x > next.x\n else \n isCCW = disc > 0\n \n return isCCW\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n const nPts = ring.size() - 1\n if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n let hiPt = ring.getCoordinate(0)\n let hiIndex = 0\n for (let i = 1; i <= nPts; i++) {\n const p = ring.getCoordinate(i)\n if (p.y > hiPt.y) {\n hiPt = p\n hiIndex = i\n }\n }\n let prev = null\n let iPrev = hiIndex\n do {\n iPrev = iPrev - 1\n if (iPrev < 0) iPrev = nPts\n prev = ring.getCoordinate(iPrev)\n } while (prev.equals2D(hiPt) && iPrev !== hiIndex)\n let next = null\n let iNext = hiIndex\n do {\n iNext = (iNext + 1) % nPts\n next = ring.getCoordinate(iNext)\n } while (next.equals2D(hiPt) && iNext !== hiIndex)\n if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n const disc = Orientation.index(prev, hiPt, next)\n let isCCW = null\n if (disc === 0) \n isCCW = prev.x > next.x\n else \n isCCW = disc > 0\n \n return isCCW\n }\n }\n}\nOrientation.CLOCKWISE = -1\nOrientation.RIGHT = Orientation.CLOCKWISE\nOrientation.COUNTERCLOCKWISE = 1\nOrientation.LEFT = Orientation.COUNTERCLOCKWISE\nOrientation.COLLINEAR = 0\nOrientation.STRAIGHT = Orientation.COLLINEAR\n","export default class Polygonal {}\n","import Area from '../algorithm/Area.js'\nimport Geometry from './Geometry.js'\nimport Arrays from '../../../../java/util/Arrays.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Polygonal from './Polygonal.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nexport default class Polygon extends Geometry {\n constructor() {\n super()\n Polygon.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._shell = null\n this._holes = null\n let shell = arguments[0], holes = arguments[1], factory = arguments[2]\n Geometry.constructor_.call(this, factory)\n if (shell === null) \n shell = this.getFactory().createLinearRing()\n \n if (holes === null) \n holes = []\n \n if (Geometry.hasNullElements(holes)) \n throw new IllegalArgumentException('holes must not contain null elements')\n \n if (shell.isEmpty() && Geometry.hasNonEmptyElements(holes)) \n throw new IllegalArgumentException('shell is empty but holes are not')\n \n this._shell = shell\n this._holes = holes\n }\n computeEnvelopeInternal() {\n return this._shell.getEnvelopeInternal()\n }\n getCoordinates() {\n if (this.isEmpty()) \n return []\n \n const coordinates = new Array(this.getNumPoints()).fill(null)\n let k = -1\n const shellCoordinates = this._shell.getCoordinates()\n for (let x = 0; x < shellCoordinates.length; x++) {\n k++\n coordinates[k] = shellCoordinates[x]\n }\n for (let i = 0; i < this._holes.length; i++) {\n const childCoordinates = this._holes[i].getCoordinates()\n for (let j = 0; j < childCoordinates.length; j++) {\n k++\n coordinates[k] = childCoordinates[j]\n }\n }\n return coordinates\n }\n getArea() {\n let area = 0.0\n area += Area.ofRing(this._shell.getCoordinateSequence())\n for (let i = 0; i < this._holes.length; i++) \n area -= Area.ofRing(this._holes[i].getCoordinateSequence())\n \n return area\n }\n copyInternal() {\n const shellCopy = this._shell.copy()\n const holeCopies = new Array(this._holes.length).fill(null)\n for (let i = 0; i < this._holes.length; i++) \n holeCopies[i] = this._holes[i].copy()\n \n return new Polygon(shellCopy, holeCopies, this._factory)\n }\n isRectangle() {\n if (this.getNumInteriorRing() !== 0) return false\n if (this._shell === null) return false\n if (this._shell.getNumPoints() !== 5) return false\n const seq = this._shell.getCoordinateSequence()\n const env = this.getEnvelopeInternal()\n for (let i = 0; i < 5; i++) {\n const x = seq.getX(i)\n if (!(x === env.getMinX() || x === env.getMaxX())) return false\n const y = seq.getY(i)\n if (!(y === env.getMinY() || y === env.getMaxY())) return false\n }\n let prevX = seq.getX(0)\n let prevY = seq.getY(0)\n for (let i = 1; i <= 4; i++) {\n const x = seq.getX(i)\n const y = seq.getY(i)\n const xChanged = x !== prevX\n const yChanged = y !== prevY\n if (xChanged === yChanged) return false\n prevX = x\n prevY = y\n }\n return true\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherPolygon = other\n const thisShell = this._shell\n const otherPolygonShell = otherPolygon._shell\n if (!thisShell.equalsExact(otherPolygonShell, tolerance)) \n return false\n \n if (this._holes.length !== otherPolygon._holes.length) \n return false\n \n for (let i = 0; i < this._holes.length; i++) \n if (!this._holes[i].equalsExact(otherPolygon._holes[i], tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n if (arguments.length === 0) {\n this._shell = this.normalized(this._shell, true)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i] = this.normalized(this._holes[i], false)\n \n Arrays.sort(this._holes)\n } else if (arguments.length === 2) {\n const ring = arguments[0], clockwise = arguments[1]\n if (ring.isEmpty()) \n return null\n \n const seq = ring.getCoordinateSequence()\n const minCoordinateIndex = CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 2)\n CoordinateSequences.scroll(seq, minCoordinateIndex, true)\n if (Orientation.isCCW(seq) === clockwise) CoordinateSequences.reverse(seq)\n }\n }\n getCoordinate() {\n return this._shell.getCoordinate()\n }\n getNumInteriorRing() {\n return this._holes.length\n }\n getBoundaryDimension() {\n return 1\n }\n reverseInternal() {\n const shell = this.getExteriorRing().reverse()\n const holes = new Array(this.getNumInteriorRing()).fill(null)\n for (let i = 0; i < holes.length; i++) \n holes[i] = this.getInteriorRingN(i).reverse()\n \n return this.getFactory().createPolygon(shell, holes)\n }\n getTypeCode() {\n return Geometry.TYPECODE_POLYGON\n }\n getDimension() {\n return 2\n }\n getLength() {\n let len = 0.0\n len += this._shell.getLength()\n for (let i = 0; i < this._holes.length; i++) \n len += this._holes[i].getLength()\n \n return len\n }\n getNumPoints() {\n let numPoints = this._shell.getNumPoints()\n for (let i = 0; i < this._holes.length; i++) \n numPoints += this._holes[i].getNumPoints()\n \n return numPoints\n }\n convexHull() {\n return this.getExteriorRing().convexHull()\n }\n normalized(ring, clockwise) {\n const res = ring.copy()\n this.normalize(res, clockwise)\n return res\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const thisShell = this._shell\n const otherShell = o._shell\n return thisShell.compareToSameClass(otherShell)\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const poly = o\n const thisShell = this._shell\n const otherShell = poly._shell\n const shellComp = thisShell.compareToSameClass(otherShell, comp)\n if (shellComp !== 0) return shellComp\n const nHole1 = this.getNumInteriorRing()\n const nHole2 = poly.getNumInteriorRing()\n let i = 0\n while (i < nHole1 && i < nHole2) {\n const thisHole = this.getInteriorRingN(i)\n const otherHole = poly.getInteriorRingN(i)\n const holeComp = thisHole.compareToSameClass(otherHole, comp)\n if (holeComp !== 0) return holeComp\n i++\n }\n if (i < nHole1) return 1\n if (i < nHole2) return -1\n return 0\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n this._shell.apply(filter)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i].apply(filter)\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n this._shell.apply(filter)\n if (!filter.isDone()) \n for (let i = 0; i < this._holes.length; i++) {\n this._holes[i].apply(filter)\n if (filter.isDone()) break\n }\n \n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n this._shell.apply(filter)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i].apply(filter)\n \n }\n }\n getBoundary() {\n if (this.isEmpty()) \n return this.getFactory().createMultiLineString()\n \n const rings = new Array(this._holes.length + 1).fill(null)\n rings[0] = this._shell\n for (let i = 0; i < this._holes.length; i++) \n rings[i + 1] = this._holes[i]\n \n if (rings.length <= 1) return this.getFactory().createLinearRing(rings[0].getCoordinateSequence())\n return this.getFactory().createMultiLineString(rings)\n }\n getGeometryType() {\n return Geometry.TYPENAME_POLYGON\n }\n getExteriorRing() {\n return this._shell\n }\n isEmpty() {\n return this._shell.isEmpty()\n }\n getInteriorRingN(n) {\n return this._holes[n]\n }\n get interfaces_() {\n return [Polygonal]\n }\n}\n","import Collection from './Collection.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Set.html\n *\n * @extends {Collection}\n * @constructor\n * @private\n */\nexport default class Set extends Collection {\n /**\n * Returns true if this set contains the specified element. More formally,\n * returns true if and only if this set contains an element e such that (o==null ?\n * e==null : o.equals(e)).\n * @param {Object} e\n * @return {boolean}\n */\n contains() { }\n}\n","import Set from './Set.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedSet.html\n */\nexport default class SortedSet extends Set {}\n","import Collection from './Collection.js'\nimport NoSuchElementException from './NoSuchElementException.js'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException.js'\nimport SortedSet from './SortedSet.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html\n */\nexport default class TreeSet extends SortedSet {\n constructor(o) {\n super()\n this.array = []\n if (o instanceof Collection)\n this.addAll(o)\n }\n\n contains(o) {\n for (const e of this.array)\n if (e.compareTo(o) === 0)\n return true\n return false\n }\n\n add(o) {\n if (this.contains(o))\n return false\n for (let i = 0, len = this.array.length; i < len; i++) {\n const e = this.array[i]\n if (e.compareTo(o) === 1)\n return !!this.array.splice(i, 0, o)\n }\n this.array.push(o)\n return true\n }\n\n addAll(c) {\n for (const e of c)\n this.add(e)\n return true\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n\n size() {\n return this.array.length\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n\n toArray() {\n return this.array.slice()\n }\n\n iterator() {\n return new Iterator(this.array)\n }\n}\n\nclass Iterator {\n constructor(array) {\n this.array = array\n this.position = 0\n }\n\n next() {\n if (this.position === this.array.length)\n throw new NoSuchElementException()\n return this.array[this.position++]\n }\n\n hasNext() {\n return this.position < this.array.length\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n}\n","import TreeSet from '../../../../java/util/TreeSet.js'\nimport Geometry from './Geometry.js'\nimport Arrays from '../../../../java/util/Arrays.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Dimension from './Dimension.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Envelope from './Envelope.js'\nimport Assert from '../util/Assert.js'\nexport default class GeometryCollection extends Geometry {\n constructor() {\n super()\n GeometryCollection.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometries = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n let geometries = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n if (geometries === null) \n geometries = []\n \n if (Geometry.hasNullElements(geometries)) \n throw new IllegalArgumentException('geometries must not contain null elements')\n \n this._geometries = geometries\n }\n }\n computeEnvelopeInternal() {\n const envelope = new Envelope()\n for (let i = 0; i < this._geometries.length; i++) \n envelope.expandToInclude(this._geometries[i].getEnvelopeInternal())\n \n return envelope\n }\n getGeometryN(n) {\n return this._geometries[n]\n }\n getCoordinates() {\n const coordinates = new Array(this.getNumPoints()).fill(null)\n let k = -1\n for (let i = 0; i < this._geometries.length; i++) {\n const childCoordinates = this._geometries[i].getCoordinates()\n for (let j = 0; j < childCoordinates.length; j++) {\n k++\n coordinates[k] = childCoordinates[j]\n }\n }\n return coordinates\n }\n getArea() {\n let area = 0.0\n for (let i = 0; i < this._geometries.length; i++) \n area += this._geometries[i].getArea()\n \n return area\n }\n copyInternal() {\n const geometries = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < geometries.length; i++) \n geometries[i] = this._geometries[i].copy()\n \n return new GeometryCollection(geometries, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherCollection = other\n if (this._geometries.length !== otherCollection._geometries.length) \n return false\n \n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].equalsExact(otherCollection._geometries[i], tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].normalize()\n \n Arrays.sort(this._geometries)\n }\n getCoordinate() {\n if (this.isEmpty()) return null\n return this._geometries[0].getCoordinate()\n }\n getBoundaryDimension() {\n let dimension = Dimension.FALSE\n for (let i = 0; i < this._geometries.length; i++) \n dimension = Math.max(dimension, this._geometries[i].getBoundaryDimension())\n \n return dimension\n }\n reverseInternal() {\n const numGeometries = this._geometries.length\n const reversed = new ArrayList(numGeometries)\n for (let i = 0; i < numGeometries; i++) \n reversed.add(this._geometries[i].reverse())\n \n return this.getFactory().buildGeometry(reversed)\n }\n getTypeCode() {\n return Geometry.TYPECODE_GEOMETRYCOLLECTION\n }\n getDimension() {\n let dimension = Dimension.FALSE\n for (let i = 0; i < this._geometries.length; i++) \n dimension = Math.max(dimension, this._geometries[i].getDimension())\n \n return dimension\n }\n getLength() {\n let sum = 0.0\n for (let i = 0; i < this._geometries.length; i++) \n sum += this._geometries[i].getLength()\n \n return sum\n }\n getNumPoints() {\n let numPoints = 0\n for (let i = 0; i < this._geometries.length; i++) \n numPoints += this._geometries[i].getNumPoints()\n \n return numPoints\n }\n getNumGeometries() {\n return this._geometries.length\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const theseElements = new TreeSet(Arrays.asList(this._geometries))\n const otherElements = new TreeSet(Arrays.asList(o._geometries))\n return this.compare(theseElements, otherElements)\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const gc = o\n const n1 = this.getNumGeometries()\n const n2 = gc.getNumGeometries()\n let i = 0\n while (i < n1 && i < n2) {\n const thisGeom = this.getGeometryN(i)\n const otherGeom = gc.getGeometryN(i)\n const holeComp = thisGeom.compareToSameClass(otherGeom, comp)\n if (holeComp !== 0) return holeComp\n i++\n }\n if (i < n1) return 1\n if (i < n2) return -1\n return 0\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this._geometries.length === 0) return null\n for (let i = 0; i < this._geometries.length; i++) {\n this._geometries[i].apply(filter)\n if (filter.isDone()) \n break\n \n }\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n }\n }\n getBoundary() {\n Geometry.checkNotGeometryCollection(this)\n Assert.shouldNeverReachHere()\n return null\n }\n getGeometryType() {\n return Geometry.TYPENAME_GEOMETRYCOLLECTION\n }\n isEmpty() {\n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].isEmpty()) \n return false\n \n \n return true\n }\n}\n","import Geometry from './Geometry.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport Dimension from './Dimension.js'\nimport Puntal from './Puntal.js'\nexport default class MultiPoint extends GeometryCollection {\n constructor() {\n super()\n MultiPoint.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const points = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, points, factory)\n }\n copyInternal() {\n const points = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < points.length; i++) \n points[i] = this._geometries[i].copy()\n \n return new MultiPoint(points, this._factory)\n }\n isValid() {\n return true\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getCoordinate() {\n if (arguments.length === 1 && Number.isInteger(arguments[0])) {\n const n = arguments[0]\n return this._geometries[n].getCoordinate()\n } else {\n return super.getCoordinate.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTIPOINT\n }\n getDimension() {\n return 0\n }\n getBoundary() {\n return this.getFactory().createGeometryCollection()\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTIPOINT\n }\n get interfaces_() {\n return [Puntal]\n }\n}\n","import LineString from './LineString.js'\nimport Geometry from './Geometry.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport Dimension from './Dimension.js'\nexport default class LinearRing extends LineString {\n constructor() {\n super()\n LinearRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const points = arguments[0], factory = arguments[1]\n LineString.constructor_.call(this, points, factory)\n this.validateConstruction()\n }\n copyInternal() {\n return new LinearRing(this._points.copy(), this._factory)\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n isClosed() {\n if (this.isEmpty()) \n return true\n \n return super.isClosed.call(this)\n }\n reverseInternal() {\n const seq = this._points.copy()\n CoordinateSequences.reverse(seq)\n return this.getFactory().createLinearRing(seq)\n }\n getTypeCode() {\n return Geometry.TYPECODE_LINEARRING\n }\n validateConstruction() {\n if (!this.isEmpty() && !super.isClosed.call(this)) \n throw new IllegalArgumentException('Points of LinearRing do not form a closed linestring')\n \n if (this.getCoordinateSequence().size() >= 1 && this.getCoordinateSequence().size() < LinearRing.MINIMUM_VALID_SIZE) \n throw new IllegalArgumentException('Invalid number of points in LinearRing (found ' + this.getCoordinateSequence().size() + ' - must be 0 or >= 4)')\n \n }\n getGeometryType() {\n return Geometry.TYPENAME_LINEARRING\n }\n}\nLinearRing.MINIMUM_VALID_SIZE = 4\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXY extends Coordinate {\n constructor() {\n super()\n CoordinateXY.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXY) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n }\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateXY.X:\n this.x = value\n break\n case CoordinateXY.Y:\n this.y = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n getZ() {\n return Coordinate.NULL_ORDINATE\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateXY.X:\n return this.x\n case CoordinateXY.Y:\n return this.y\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n setZ(z) {\n throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n }\n copy() {\n return new CoordinateXY(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n }\n}\nCoordinateXY.X = 0\nCoordinateXY.Y = 1\nCoordinateXY.Z = -1\nCoordinateXY.M = -1\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXYM extends Coordinate {\n constructor() {\n super()\n CoordinateXYM.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n this._m = 0.0\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXYM) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n this._m = coord._m\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n this._m = this.getM()\n }\n } else if (arguments.length === 3) {\n const x = arguments[0], y = arguments[1], m = arguments[2]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n this._m = m\n }\n }\n getM() {\n return this._m\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateXYM.X:\n this.x = value\n break\n case CoordinateXYM.Y:\n this.y = value\n break\n case CoordinateXYM.M:\n this._m = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n setM(m) {\n this._m = m\n }\n getZ() {\n return Coordinate.NULL_ORDINATE\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateXYM.X:\n return this.x\n case CoordinateXYM.Y:\n return this.y\n case CoordinateXYM.M:\n return this._m\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n setZ(z) {\n throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n }\n copy() {\n return new CoordinateXYM(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ' m=' + this.getM() + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n this._m = other.getM()\n }\n}\nCoordinateXYM.X = 0\nCoordinateXYM.Y = 1\nCoordinateXYM.Z = -1\nCoordinateXYM.M = 2\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXYZM extends Coordinate {\n constructor() {\n super()\n CoordinateXYZM.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n this._m = 0.0\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXYZM) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord)\n this._m = coord._m\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord)\n this._m = this.getM()\n }\n } else if (arguments.length === 4) {\n const x = arguments[0], y = arguments[1], z = arguments[2], m = arguments[3]\n Coordinate.constructor_.call(this, x, y, z)\n this._m = m\n }\n }\n getM() {\n return this._m\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case Coordinate.X:\n this.x = value\n break\n case Coordinate.Y:\n this.y = value\n break\n case Coordinate.Z:\n this.z = value\n break\n case Coordinate.M:\n this._m = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n setM(m) {\n this._m = m\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case Coordinate.X:\n return this.x\n case Coordinate.Y:\n return this.y\n case Coordinate.Z:\n return this.getZ()\n case Coordinate.M:\n return this.getM()\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n copy() {\n return new CoordinateXYZM(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ' m=' + this.getM() + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n this._m = other.getM()\n }\n}\n","import CoordinateXY from './CoordinateXY.js'\nimport Coordinate from './Coordinate.js'\nimport CoordinateXYM from './CoordinateXYM.js'\nimport CoordinateXYZM from './CoordinateXYZM.js'\nexport default class Coordinates {\n static measures(coordinate) {\n if (coordinate instanceof CoordinateXY) \n return 0\n else if (coordinate instanceof CoordinateXYM) \n return 1\n else if (coordinate instanceof CoordinateXYZM) \n return 1\n else if (coordinate instanceof Coordinate) \n return 0\n \n return 0\n }\n static dimension(coordinate) {\n if (coordinate instanceof CoordinateXY) \n return 2\n else if (coordinate instanceof CoordinateXYM) \n return 3\n else if (coordinate instanceof CoordinateXYZM) \n return 4\n else if (coordinate instanceof Coordinate) \n return 3\n \n return 3\n }\n static create() {\n if (arguments.length === 1) {\n const dimension = arguments[0]\n return Coordinates.create(dimension, 0)\n } else if (arguments.length === 2) {\n const dimension = arguments[0], measures = arguments[1]\n if (dimension === 2) \n return new CoordinateXY()\n else if (dimension === 3 && measures === 0) \n return new Coordinate()\n else if (dimension === 3 && measures === 1) \n return new CoordinateXYM()\n else if (dimension === 4 && measures === 1) \n return new CoordinateXYZM()\n \n return new Coordinate()\n }\n }\n}\n","import Double from '../../../../java/lang/Double.js'\nexport default class MathUtil {\n static log10(x) {\n const ln = Math.log(x)\n if (Double.isInfinite(ln)) return ln\n if (Double.isNaN(ln)) return ln\n return ln / MathUtil.LOG_10\n }\n static min(v1, v2, v3, v4) {\n let min = v1\n if (v2 < min) min = v2\n if (v3 < min) min = v3\n if (v4 < min) min = v4\n return min\n }\n static clamp() {\n if (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number')) {\n const x = arguments[0], min = arguments[1], max = arguments[2]\n if (x < min) return min\n if (x > max) return max\n return x\n } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n const x = arguments[0], min = arguments[1], max = arguments[2]\n if (x < min) return min\n if (x > max) return max\n return x\n }\n }\n static wrap(index, max) {\n if (index < 0) \n return max - -index % max\n \n return index % max\n }\n static max() {\n if (arguments.length === 3) {\n const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2]\n let max = v1\n if (v2 > max) max = v2\n if (v3 > max) max = v3\n return max\n } else if (arguments.length === 4) {\n const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2], v4 = arguments[3]\n let max = v1\n if (v2 > max) max = v2\n if (v3 > max) max = v3\n if (v4 > max) max = v4\n return max\n }\n }\n static average(x1, x2) {\n return (x1 + x2) / 2.0\n }\n}\nMathUtil.LOG_10 = Math.log(10)\n","export default class System {\n static arraycopy(src, srcPos, dest, destPos, len) {\n let c = 0\n for (let i = srcPos; i < srcPos + len; i++) {\n dest[destPos + c] = src[i]\n c++\n }\n }\n\n static getProperty(name) {\n return {\n 'line.separator': '\\n'\n }[name]\n }\n}\n","import CoordinateList from './CoordinateList.js'\nimport Coordinates from './Coordinates.js'\nimport MathUtil from '../math/MathUtil.js'\nimport System from '../../../../java/lang/System.js'\nimport Comparator from '../../../../java/util/Comparator.js'\nimport Envelope from './Envelope.js'\nexport default class CoordinateArrays {\n static isRing(pts) {\n if (pts.length < 4) return false\n if (!pts[0].equals2D(pts[pts.length - 1])) return false\n return true\n }\n static ptNotInList(testPts, pts) {\n for (let i = 0; i < testPts.length; i++) {\n const testPt = testPts[i]\n if (CoordinateArrays.indexOf(testPt, pts) < 0) return testPt\n }\n return null\n }\n static scroll(coordinates, firstCoordinate) {\n const i = CoordinateArrays.indexOf(firstCoordinate, coordinates)\n if (i < 0) return null\n const newCoordinates = new Array(coordinates.length).fill(null)\n System.arraycopy(coordinates, i, newCoordinates, 0, coordinates.length - i)\n System.arraycopy(coordinates, 0, newCoordinates, coordinates.length - i, i)\n System.arraycopy(newCoordinates, 0, coordinates, 0, coordinates.length)\n }\n static equals() {\n if (arguments.length === 2) {\n const coord1 = arguments[0], coord2 = arguments[1]\n if (coord1 === coord2) return true\n if (coord1 === null || coord2 === null) return false\n if (coord1.length !== coord2.length) return false\n for (let i = 0; i < coord1.length; i++) \n if (!coord1[i].equals(coord2[i])) return false\n \n return true\n } else if (arguments.length === 3) {\n const coord1 = arguments[0], coord2 = arguments[1], coordinateComparator = arguments[2]\n if (coord1 === coord2) return true\n if (coord1 === null || coord2 === null) return false\n if (coord1.length !== coord2.length) return false\n for (let i = 0; i < coord1.length; i++) \n if (coordinateComparator.compare(coord1[i], coord2[i]) !== 0) return false\n \n return true\n }\n }\n static intersection(coordinates, env) {\n const coordList = new CoordinateList()\n for (let i = 0; i < coordinates.length; i++) \n if (env.intersects(coordinates[i])) coordList.add(coordinates[i], true)\n \n return coordList.toCoordinateArray()\n }\n static measures(pts) {\n if (pts === null || pts.length === 0) \n return 0\n \n let measures = 0\n for (const coordinate of pts) \n measures = Math.max(measures, Coordinates.measures(coordinate))\n \n return measures\n }\n static hasRepeatedPoints(coord) {\n for (let i = 1; i < coord.length; i++) \n if (coord[i - 1].equals(coord[i])) \n return true\n \n \n return false\n }\n static removeRepeatedPoints(coord) {\n if (!CoordinateArrays.hasRepeatedPoints(coord)) return coord\n const coordList = new CoordinateList(coord, false)\n return coordList.toCoordinateArray()\n }\n static reverse(coord) {\n const last = coord.length - 1\n const mid = Math.trunc(last / 2)\n for (let i = 0; i <= mid; i++) {\n const tmp = coord[i]\n coord[i] = coord[last - i]\n coord[last - i] = tmp\n }\n }\n static removeNull(coord) {\n let nonNull = 0\n for (let i = 0; i < coord.length; i++) \n if (coord[i] !== null) nonNull++\n \n const newCoord = new Array(nonNull).fill(null)\n if (nonNull === 0) return newCoord\n let j = 0\n for (let i = 0; i < coord.length; i++) \n if (coord[i] !== null) newCoord[j++] = coord[i]\n \n return newCoord\n }\n static copyDeep() {\n if (arguments.length === 1) {\n const coordinates = arguments[0]\n const copy = new Array(coordinates.length).fill(null)\n for (let i = 0; i < coordinates.length; i++) \n copy[i] = coordinates[i].copy()\n \n return copy\n } else if (arguments.length === 5) {\n const src = arguments[0], srcStart = arguments[1], dest = arguments[2], destStart = arguments[3], length = arguments[4]\n for (let i = 0; i < length; i++) \n dest[destStart + i] = src[srcStart + i].copy()\n \n }\n }\n static isEqualReversed(pts1, pts2) {\n for (let i = 0; i < pts1.length; i++) {\n const p1 = pts1[i]\n const p2 = pts2[pts1.length - i - 1]\n if (p1.compareTo(p2) !== 0) return false\n }\n return true\n }\n static envelope(coordinates) {\n const env = new Envelope()\n for (let i = 0; i < coordinates.length; i++) \n env.expandToInclude(coordinates[i])\n \n return env\n }\n static toCoordinateArray(coordList) {\n return coordList.toArray(CoordinateArrays.coordArrayType)\n }\n static dimension(pts) {\n if (pts === null || pts.length === 0) \n return 3\n \n let dimension = 0\n for (const coordinate of pts) \n dimension = Math.max(dimension, Coordinates.dimension(coordinate))\n \n return dimension\n }\n static atLeastNCoordinatesOrNothing(n, c) {\n return c.length >= n ? c : []\n }\n static indexOf(coordinate, coordinates) {\n for (let i = 0; i < coordinates.length; i++) \n if (coordinate.equals(coordinates[i])) \n return i\n \n \n return -1\n }\n static increasingDirection(pts) {\n for (let i = 0; i < Math.trunc(pts.length / 2); i++) {\n const j = pts.length - 1 - i\n const comp = pts[i].compareTo(pts[j])\n if (comp !== 0) return comp\n }\n return 1\n }\n static compare(pts1, pts2) {\n let i = 0\n while (i < pts1.length && i < pts2.length) {\n const compare = pts1[i].compareTo(pts2[i])\n if (compare !== 0) return compare\n i++\n }\n if (i < pts2.length) return -1\n if (i < pts1.length) return 1\n return 0\n }\n static minCoordinate(coordinates) {\n let minCoord = null\n for (let i = 0; i < coordinates.length; i++) \n if (minCoord === null || minCoord.compareTo(coordinates[i]) > 0) \n minCoord = coordinates[i]\n \n \n return minCoord\n }\n static extract(pts, start, end) {\n start = MathUtil.clamp(start, 0, pts.length)\n end = MathUtil.clamp(end, -1, pts.length)\n let npts = end - start + 1\n if (end < 0) npts = 0\n if (start >= pts.length) npts = 0\n if (end < start) npts = 0\n const extractPts = new Array(npts).fill(null)\n if (npts === 0) return extractPts\n let iPts = 0\n for (let i = start; i <= end; i++) \n extractPts[iPts++] = pts[i]\n \n return extractPts\n }\n}\nclass ForwardComparator {\n compare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n return CoordinateArrays.compare(pts1, pts2)\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nclass BidirectionalComparator {\n compare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n if (pts1.length < pts2.length) return -1\n if (pts1.length > pts2.length) return 1\n if (pts1.length === 0) return 0\n const forwardComp = CoordinateArrays.compare(pts1, pts2)\n const isEqualRev = CoordinateArrays.isEqualReversed(pts1, pts2)\n if (isEqualRev) return 0\n return forwardComp\n }\n OLDcompare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n if (pts1.length < pts2.length) return -1\n if (pts1.length > pts2.length) return 1\n if (pts1.length === 0) return 0\n const dir1 = CoordinateArrays.increasingDirection(pts1)\n const dir2 = CoordinateArrays.increasingDirection(pts2)\n let i1 = dir1 > 0 ? 0 : pts1.length - 1\n let i2 = dir2 > 0 ? 0 : pts1.length - 1\n for (let i = 0; i < pts1.length; i++) {\n const comparePt = pts1[i1].compareTo(pts2[i2])\n if (comparePt !== 0) return comparePt\n i1 += dir1\n i2 += dir2\n }\n return 0\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nCoordinateArrays.ForwardComparator = ForwardComparator\nCoordinateArrays.BidirectionalComparator = BidirectionalComparator\nCoordinateArrays.coordArrayType = new Array(0).fill(null)\n","export default class StringBuilder {\n constructor(str) {\n this.str = str\n }\n append(e) {\n this.str += e\n }\n setCharAt(i, c) {\n this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n }\n toString() {\n return this.str\n }\n}","import hasInterface from '../../../../../hasInterface.js'\nimport Coordinate from '../Coordinate.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Coordinates from '../Coordinates.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport CoordinateArrays from '../CoordinateArrays.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport StringBuilder from '../../../../../java/lang/StringBuilder.js'\nexport default class CoordinateArraySequence {\n constructor() {\n CoordinateArraySequence.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._dimension = 3\n this._measures = 0\n this._coordinates = null\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n CoordinateArraySequence.constructor_.call(this, coordinates, CoordinateArrays.dimension(coordinates), CoordinateArrays.measures(coordinates))\n } else if (Number.isInteger(arguments[0])) {\n const size = arguments[0]\n this._coordinates = new Array(size).fill(null)\n for (let i = 0; i < size; i++) \n this._coordinates[i] = new Coordinate()\n \n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n if (coordSeq === null) {\n this._coordinates = new Array(0).fill(null)\n return null\n }\n this._dimension = coordSeq.getDimension()\n this._measures = coordSeq.getMeasures()\n this._coordinates = new Array(coordSeq.size()).fill(null)\n for (let i = 0; i < this._coordinates.length; i++) \n this._coordinates[i] = coordSeq.getCoordinateCopy(i)\n \n }\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Array && Number.isInteger(arguments[1])) {\n const coordinates = arguments[0], dimension = arguments[1]\n CoordinateArraySequence.constructor_.call(this, coordinates, dimension, CoordinateArrays.measures(coordinates))\n } else if (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1])) {\n const size = arguments[0], dimension = arguments[1]\n this._coordinates = new Array(size).fill(null)\n this._dimension = dimension\n for (let i = 0; i < size; i++) \n this._coordinates[i] = Coordinates.create(dimension)\n \n }\n } else if (arguments.length === 3) {\n if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Array && Number.isInteger(arguments[1]))) {\n const coordinates = arguments[0], dimension = arguments[1], measures = arguments[2]\n this._dimension = dimension\n this._measures = measures\n if (coordinates === null) \n this._coordinates = new Array(0).fill(null)\n else \n this._coordinates = coordinates\n \n } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n this._coordinates = new Array(size).fill(null)\n this._dimension = dimension\n this._measures = measures\n for (let i = 0; i < size; i++) \n this._coordinates[i] = this.createCoordinate()\n \n }\n }\n }\n getM(index) {\n if (this.hasM()) \n return this._coordinates[index].getM()\n else \n return Double.NaN\n \n }\n setOrdinate(index, ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateSequence.X:\n this._coordinates[index].x = value\n break\n case CoordinateSequence.Y:\n this._coordinates[index].y = value\n break\n default:\n this._coordinates[index].setOrdinate(ordinateIndex, value)\n }\n }\n getZ(index) {\n if (this.hasZ()) \n return this._coordinates[index].getZ()\n else \n return Double.NaN\n \n }\n size() {\n return this._coordinates.length\n }\n getOrdinate(index, ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateSequence.X:\n return this._coordinates[index].x\n case CoordinateSequence.Y:\n return this._coordinates[index].y\n default:\n return this._coordinates[index].getOrdinate(ordinateIndex)\n }\n }\n getCoordinate() {\n if (arguments.length === 1) {\n const i = arguments[0]\n return this._coordinates[i]\n } else if (arguments.length === 2) {\n const index = arguments[0], coord = arguments[1]\n coord.setCoordinate(this._coordinates[index])\n }\n }\n getCoordinateCopy(i) {\n const copy = this.createCoordinate()\n copy.setCoordinate(this._coordinates[i])\n return copy\n }\n createCoordinate() {\n return Coordinates.create(this.getDimension(), this.getMeasures())\n }\n getDimension() {\n return this._dimension\n }\n getX(index) {\n return this._coordinates[index].x\n }\n getMeasures() {\n return this._measures\n }\n expandEnvelope(env) {\n for (let i = 0; i < this._coordinates.length; i++) \n env.expandToInclude(this._coordinates[i])\n \n return env\n }\n copy() {\n const cloneCoordinates = new Array(this.size()).fill(null)\n for (let i = 0; i < this._coordinates.length; i++) {\n const duplicate = this.createCoordinate()\n duplicate.setCoordinate(this._coordinates[i])\n cloneCoordinates[i] = duplicate\n }\n return new CoordinateArraySequence(cloneCoordinates, this._dimension, this._measures)\n }\n toString() {\n if (this._coordinates.length > 0) {\n const strBuilder = new StringBuilder(17 * this._coordinates.length)\n strBuilder.append('(')\n strBuilder.append(this._coordinates[0])\n for (let i = 1; i < this._coordinates.length; i++) {\n strBuilder.append(', ')\n strBuilder.append(this._coordinates[i])\n }\n strBuilder.append(')')\n return strBuilder.toString()\n } else {\n return '()'\n }\n }\n getY(index) {\n return this._coordinates[index].y\n }\n toCoordinateArray() {\n return this._coordinates\n }\n get interfaces_() {\n return [CoordinateSequence, Serializable]\n }\n}\n","import CoordinateSequenceFactory from '../CoordinateSequenceFactory.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport CoordinateArraySequence from './CoordinateArraySequence.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class CoordinateArraySequenceFactory {\n static instance() {\n return CoordinateArraySequenceFactory.instanceObject\n }\n readResolve() {\n return CoordinateArraySequenceFactory.instance()\n }\n create() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return new CoordinateArraySequence(coordinates)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n return new CoordinateArraySequence(coordSeq)\n }\n } else if (arguments.length === 2) {\n let size = arguments[0], dimension = arguments[1]\n if (dimension > 3) dimension = 3\n if (dimension < 2) dimension = 2\n return new CoordinateArraySequence(size, dimension)\n } else if (arguments.length === 3) {\n let size = arguments[0], dimension = arguments[1], measures = arguments[2]\n let spatial = dimension - measures\n if (measures > 1) \n measures = 1\n \n if (spatial > 3) \n spatial = 3\n \n if (spatial < 2) spatial = 2\n return new CoordinateArraySequence(size, spatial + measures, measures)\n }\n }\n get interfaces_() {\n return [CoordinateSequenceFactory, Serializable]\n }\n}\nCoordinateArraySequenceFactory.instanceObject = new CoordinateArraySequenceFactory()\n","import Geometry from './Geometry.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport Polygonal from './Polygonal.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class MultiPolygon extends GeometryCollection {\n constructor() {\n super()\n MultiPolygon.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const polygons = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, polygons, factory)\n }\n copyInternal() {\n const polygons = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < polygons.length; i++) \n polygons[i] = this._geometries[i].copy()\n \n return new MultiPolygon(polygons, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n return 1\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTIPOLYGON\n }\n getDimension() {\n return 2\n }\n getBoundary() {\n if (this.isEmpty()) \n return this.getFactory().createMultiLineString()\n \n const allRings = new ArrayList()\n for (let i = 0; i < this._geometries.length; i++) {\n const polygon = this._geometries[i]\n const rings = polygon.getBoundary()\n for (let j = 0; j < rings.getNumGeometries(); j++) \n allRings.add(rings.getGeometryN(j))\n \n }\n const allRingsArray = new Array(allRings.size()).fill(null)\n return this.getFactory().createMultiLineString(allRings.toArray(allRingsArray))\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTIPOLYGON\n }\n get interfaces_() {\n return [Polygonal]\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Map.html\n */\nexport default class Map {\n /**\n * Returns the value to which the specified key is mapped, or null if this map\n * contains no mapping for the key.\n * @param {Object} key\n * @return {Object}\n */\n get() { }\n\n /**\n * Associates the specified value with the specified key in this map (optional\n * operation).\n * @param {Object} key\n * @param {Object} value\n * @return {Object}\n */\n put() { }\n\n /**\n * Returns the number of key-value mappings in this map.\n * @return {number}\n */\n size() { }\n\n /**\n * Returns a Collection view of the values contained in this map.\n * @return {javascript.util.Collection}\n */\n values() { }\n\n /**\n * Returns a {@link Set} view of the mappings contained in this map.\n * The set is backed by the map, so changes to the map are\n * reflected in the set, and vice-versa. If the map is modified\n * while an iteration over the set is in progress (except through\n * the iterator's own remove operation, or through the\n * setValue operation on a map entry returned by the\n * iterator) the results of the iteration are undefined. The set\n * supports element removal, which removes the corresponding\n * mapping from the map, via the Iterator.remove,\n * Set.remove, removeAll, retainAll and\n * clear operations. It does not support the\n * add or addAll operations.\n *\n * @return {Set} a set view of the mappings contained in this map\n */\n entrySet() { }\n}\n","import Collection from './Collection.js'\nimport NoSuchElementException from './NoSuchElementException.js'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException.js'\nimport Set from './Set.js'\n\n/**\n * @see http://docs.oracle.com/javase/6/docs/api/java/util/HashSet.html\n */\nexport default class HashSet extends Set {\n constructor(o) {\n super()\n this.map = new Map()\n if (o instanceof Collection)\n this.addAll(o)\n }\n\n contains(o) {\n const hashCode = o.hashCode ? o.hashCode() : o\n if (this.map.has(hashCode))\n return true\n return false\n }\n\n add(o) {\n const hashCode = o.hashCode ? o.hashCode() : o\n if (this.map.has(hashCode))\n return false\n return !!this.map.set(hashCode, o)\n }\n\n addAll(c) {\n for (const e of c)\n this.add(e)\n return true\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n\n size() {\n return this.map.size\n }\n\n isEmpty() {\n return this.map.size === 0\n }\n\n toArray() {\n return Array.from(this.map.values())\n }\n\n iterator() {\n return new Iterator(this.map)\n }\n\n [Symbol.iterator]() {\n return this.map\n }\n}\n\nclass Iterator {\n constructor(map) {\n this.iterator = map.values()\n const { done, value } = this.iterator.next()\n this.done = done\n this.value = value\n }\n\n next() {\n if (this.done)\n throw new NoSuchElementException()\n const current = this.value\n const { done, value } = this.iterator.next()\n this.done = done\n this.value = value\n return current\n }\n\n hasNext() {\n return !this.done\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n}\n","import ArrayList from './ArrayList.js'\nimport MapInterface from './Map.js'\nimport HashSet from './HashSet.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html\n */\nexport default class HashMap extends MapInterface {\n constructor() {\n super()\n this.map = new Map()\n }\n\n get(key) {\n return this.map.get(key) || null\n }\n\n put(key, value) {\n this.map.set(key, value)\n return value\n }\n\n values() {\n const arrayList = new ArrayList()\n const it = this.map.values()\n let o = it.next()\n while (!o.done) {\n arrayList.add(o.value)\n o = it.next()\n }\n return arrayList\n }\n\n entrySet() {\n const hashSet = new HashSet()\n this.map.entries().forEach(entry => hashSet.add(entry))\n return hashSet\n }\n\n size() {\n return this.map.size()\n }\n}\n","import HashMap from '../../../../java/util/HashMap.js'\nimport Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class PrecisionModel {\n constructor() {\n PrecisionModel.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._modelType = null\n this._scale = null\n if (arguments.length === 0) \n this._modelType = PrecisionModel.FLOATING\n else if (arguments.length === 1) \n if (arguments[0] instanceof Type) {\n const modelType = arguments[0]\n this._modelType = modelType\n if (modelType === PrecisionModel.FIXED) \n this.setScale(1.0)\n \n } else if (typeof arguments[0] === 'number') {\n const scale = arguments[0]\n this._modelType = PrecisionModel.FIXED\n this.setScale(scale)\n } else if (arguments[0] instanceof PrecisionModel) {\n const pm = arguments[0]\n this._modelType = pm._modelType\n this._scale = pm._scale\n }\n \n }\n static mostPrecise(pm1, pm2) {\n if (pm1.compareTo(pm2) >= 0) return pm1\n return pm2\n }\n equals(other) {\n if (!(other instanceof PrecisionModel)) \n return false\n \n const otherPrecisionModel = other\n return this._modelType === otherPrecisionModel._modelType && this._scale === otherPrecisionModel._scale\n }\n compareTo(o) {\n const other = o\n const sigDigits = this.getMaximumSignificantDigits()\n const otherSigDigits = other.getMaximumSignificantDigits()\n return Integer.compare(sigDigits, otherSigDigits)\n }\n getScale() {\n return this._scale\n }\n isFloating() {\n return this._modelType === PrecisionModel.FLOATING || this._modelType === PrecisionModel.FLOATING_SINGLE\n }\n getType() {\n return this._modelType\n }\n toString() {\n let description = 'UNKNOWN'\n if (this._modelType === PrecisionModel.FLOATING) \n description = 'Floating'\n else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n description = 'Floating-Single'\n else if (this._modelType === PrecisionModel.FIXED) \n description = 'Fixed (Scale=' + this.getScale() + ')'\n \n return description\n }\n makePrecise() {\n if (typeof arguments[0] === 'number') {\n const val = arguments[0]\n if (Double.isNaN(val)) return val\n if (this._modelType === PrecisionModel.FLOATING_SINGLE) {\n const floatSingleVal = val\n return floatSingleVal\n }\n if (this._modelType === PrecisionModel.FIXED) \n return Math.round(val * this._scale) / this._scale\n \n return val\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n if (this._modelType === PrecisionModel.FLOATING) return null\n coord.x = this.makePrecise(coord.x)\n coord.y = this.makePrecise(coord.y)\n }\n }\n getMaximumSignificantDigits() {\n let maxSigDigits = 16\n if (this._modelType === PrecisionModel.FLOATING) \n maxSigDigits = 16\n else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n maxSigDigits = 6\n else if (this._modelType === PrecisionModel.FIXED) \n maxSigDigits = 1 + Math.trunc(Math.ceil(Math.log(this.getScale()) / Math.log(10)))\n \n return maxSigDigits\n }\n setScale(scale) {\n this._scale = Math.abs(scale)\n }\n get interfaces_() {\n return [Serializable, Comparable]\n }\n}\nclass Type {\n constructor() {\n Type.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._name = null\n const name = arguments[0]\n this._name = name\n Type.nameToTypeMap.put(name, this)\n }\n readResolve() {\n return Type.nameToTypeMap.get(this._name)\n }\n toString() {\n return this._name\n }\n get interfaces_() {\n return [Serializable]\n }\n}\nType.nameToTypeMap = new HashMap()\nPrecisionModel.Type = Type\nPrecisionModel.FIXED = new Type('FIXED')\nPrecisionModel.FLOATING = new Type('FLOATING')\nPrecisionModel.FLOATING_SINGLE = new Type('FLOATING SINGLE')\nPrecisionModel.maximumPreciseValue = 9007199254740992.0\n","import Geometry from './Geometry.js'\nimport Lineal from './Lineal.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport Dimension from './Dimension.js'\nexport default class MultiLineString extends GeometryCollection {\n constructor() {\n super()\n MultiLineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const lineStrings = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, lineStrings, factory)\n }\n copyInternal() {\n const lineStrings = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < lineStrings.length; i++) \n lineStrings[i] = this._geometries[i].copy()\n \n return new MultiLineString(lineStrings, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n if (this.isClosed()) \n return Dimension.FALSE\n \n return 0\n }\n isClosed() {\n if (this.isEmpty()) \n return false\n \n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].isClosed()) \n return false\n \n \n return true\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTILINESTRING\n }\n getDimension() {\n return 1\n }\n getBoundary() {\n throw new UnsupportedOperationException()\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTILINESTRING\n }\n get interfaces_() {\n return [Lineal]\n }\n}\n","import CoordinateSequenceFactory from './CoordinateSequenceFactory.js'\nimport LineString from './LineString.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Point from './Point.js'\nimport Polygon from './Polygon.js'\nimport MultiPoint from './MultiPoint.js'\nimport LinearRing from './LinearRing.js'\nimport CoordinateArraySequenceFactory from './impl/CoordinateArraySequenceFactory.js'\nimport MultiPolygon from './MultiPolygon.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport PrecisionModel from './PrecisionModel.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Assert from '../util/Assert.js'\nimport MultiLineString from './MultiLineString.js'\nexport default class GeometryFactory {\n constructor() {\n GeometryFactory.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._precisionModel = null\n this._coordinateSequenceFactory = null\n this._SRID = null\n if (arguments.length === 0) {\n GeometryFactory.constructor_.call(this, new PrecisionModel(), 0)\n } else if (arguments.length === 1) {\n if (hasInterface(arguments[0], CoordinateSequenceFactory)) {\n const coordinateSequenceFactory = arguments[0]\n GeometryFactory.constructor_.call(this, new PrecisionModel(), 0, coordinateSequenceFactory)\n } else if (arguments[0] instanceof PrecisionModel) {\n const precisionModel = arguments[0]\n GeometryFactory.constructor_.call(this, precisionModel, 0, GeometryFactory.getDefaultCoordinateSequenceFactory())\n }\n } else if (arguments.length === 2) {\n const precisionModel = arguments[0], SRID = arguments[1]\n GeometryFactory.constructor_.call(this, precisionModel, SRID, GeometryFactory.getDefaultCoordinateSequenceFactory())\n } else if (arguments.length === 3) {\n const precisionModel = arguments[0], SRID = arguments[1], coordinateSequenceFactory = arguments[2]\n this._precisionModel = precisionModel\n this._coordinateSequenceFactory = coordinateSequenceFactory\n this._SRID = SRID\n }\n }\n static toMultiPolygonArray(multiPolygons) {\n const multiPolygonArray = new Array(multiPolygons.size()).fill(null)\n return multiPolygons.toArray(multiPolygonArray)\n }\n static toGeometryArray(geometries) {\n if (geometries === null) return null\n const geometryArray = new Array(geometries.size()).fill(null)\n return geometries.toArray(geometryArray)\n }\n static getDefaultCoordinateSequenceFactory() {\n return CoordinateArraySequenceFactory.instance()\n }\n static toMultiLineStringArray(multiLineStrings) {\n const multiLineStringArray = new Array(multiLineStrings.size()).fill(null)\n return multiLineStrings.toArray(multiLineStringArray)\n }\n static toLineStringArray(lineStrings) {\n const lineStringArray = new Array(lineStrings.size()).fill(null)\n return lineStrings.toArray(lineStringArray)\n }\n static toMultiPointArray(multiPoints) {\n const multiPointArray = new Array(multiPoints.size()).fill(null)\n return multiPoints.toArray(multiPointArray)\n }\n static toLinearRingArray(linearRings) {\n const linearRingArray = new Array(linearRings.size()).fill(null)\n return linearRings.toArray(linearRingArray)\n }\n static toPointArray(points) {\n const pointArray = new Array(points.size()).fill(null)\n return points.toArray(pointArray)\n }\n static toPolygonArray(polygons) {\n const polygonArray = new Array(polygons.size()).fill(null)\n return polygons.toArray(polygonArray)\n }\n static createPointFromInternalCoord(coord, exemplar) {\n exemplar.getPrecisionModel().makePrecise(coord)\n return exemplar.getFactory().createPoint(coord)\n }\n createEmpty(dimension) {\n switch (dimension) {\n case -1:\n return this.createGeometryCollection()\n case 0:\n return this.createPoint()\n case 1:\n return this.createLineString()\n case 2:\n return this.createPolygon()\n default:\n throw new IllegalArgumentException('Invalid dimension: ' + dimension)\n }\n }\n toGeometry(envelope) {\n if (envelope.isNull()) \n return this.createPoint()\n \n if (envelope.getMinX() === envelope.getMaxX() && envelope.getMinY() === envelope.getMaxY()) \n return this.createPoint(new Coordinate(envelope.getMinX(), envelope.getMinY()))\n \n if (envelope.getMinX() === envelope.getMaxX() || envelope.getMinY() === envelope.getMaxY()) \n return this.createLineString([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY())])\n \n return this.createPolygon(this.createLinearRing([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMinY())]), null)\n }\n createLineString() {\n if (arguments.length === 0) \n return this.createLineString(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return this.createLineString(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new LineString(coordinates, this)\n }\n \n }\n createMultiLineString() {\n if (arguments.length === 0) {\n return new MultiLineString(null, this)\n } else if (arguments.length === 1) {\n const lineStrings = arguments[0]\n return new MultiLineString(lineStrings, this)\n }\n }\n buildGeometry(geomList) {\n let geomType = null\n let isHeterogeneous = false\n let hasGeometryCollection = false\n for (let i = geomList.iterator(); i.hasNext(); ) {\n const geom = i.next()\n const partType = geom.getTypeCode()\n if (geomType === null) \n geomType = partType\n \n if (partType !== geomType) \n isHeterogeneous = true\n \n if (geom instanceof GeometryCollection) hasGeometryCollection = true\n }\n if (geomType === null) \n return this.createGeometryCollection()\n \n if (isHeterogeneous || hasGeometryCollection) \n return this.createGeometryCollection(GeometryFactory.toGeometryArray(geomList))\n \n const geom0 = geomList.iterator().next()\n const isCollection = geomList.size() > 1\n if (isCollection) {\n if (geom0 instanceof Polygon) \n return this.createMultiPolygon(GeometryFactory.toPolygonArray(geomList))\n else if (geom0 instanceof LineString) \n return this.createMultiLineString(GeometryFactory.toLineStringArray(geomList))\n else if (geom0 instanceof Point) \n return this.createMultiPoint(GeometryFactory.toPointArray(geomList))\n \n Assert.shouldNeverReachHere('Unhandled geometry type: ' + geom0.getGeometryType())\n }\n return geom0\n }\n createMultiPointFromCoords(coordinates) {\n return this.createMultiPoint(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n }\n createPoint() {\n if (arguments.length === 0) \n return this.createPoint(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Coordinate) {\n const coordinate = arguments[0]\n return this.createPoint(coordinate !== null ? this.getCoordinateSequenceFactory().create([coordinate]) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new Point(coordinates, this)\n }\n \n }\n getCoordinateSequenceFactory() {\n return this._coordinateSequenceFactory\n }\n createPolygon() {\n if (arguments.length === 0) {\n return this.createPolygon(null, null)\n } else if (arguments.length === 1) {\n if (hasInterface(arguments[0], CoordinateSequence)) {\n const shell = arguments[0]\n return this.createPolygon(this.createLinearRing(shell))\n } else if (arguments[0] instanceof Array) {\n const shell = arguments[0]\n return this.createPolygon(this.createLinearRing(shell))\n } else if (arguments[0] instanceof LinearRing) {\n const shell = arguments[0]\n return this.createPolygon(shell, null)\n }\n } else if (arguments.length === 2) {\n const shell = arguments[0], holes = arguments[1]\n return new Polygon(shell, holes, this)\n }\n }\n getSRID() {\n return this._SRID\n }\n createGeometryCollection() {\n if (arguments.length === 0) {\n return new GeometryCollection(null, this)\n } else if (arguments.length === 1) {\n const geometries = arguments[0]\n return new GeometryCollection(geometries, this)\n }\n }\n getPrecisionModel() {\n return this._precisionModel\n }\n createLinearRing() {\n if (arguments.length === 0) \n return this.createLinearRing(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return this.createLinearRing(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new LinearRing(coordinates, this)\n }\n \n }\n createMultiPolygon() {\n if (arguments.length === 0) {\n return new MultiPolygon(null, this)\n } else if (arguments.length === 1) {\n const polygons = arguments[0]\n return new MultiPolygon(polygons, this)\n }\n }\n createMultiPoint() {\n if (arguments.length === 0) \n return new MultiPoint(null, this)\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const point = arguments[0]\n return new MultiPoint(point, this)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n if (coordinates === null) \n return this.createMultiPoint(new Array(0).fill(null))\n \n const points = new Array(coordinates.size()).fill(null)\n for (let i = 0; i < coordinates.size(); i++) {\n const ptSeq = this.getCoordinateSequenceFactory().create(1, coordinates.getDimension(), coordinates.getMeasures())\n CoordinateSequences.copy(coordinates, i, ptSeq, 0, 1)\n points[i] = this.createPoint(ptSeq)\n }\n return this.createMultiPoint(points)\n }\n \n }\n get interfaces_() {\n return [Serializable]\n }\n}\n","import LineString from '../LineString.js'\nimport GeometryFactory from '../GeometryFactory.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Point from '../Point.js'\nimport Polygon from '../Polygon.js'\nimport MultiPoint from '../MultiPoint.js'\nimport LinearRing from '../LinearRing.js'\nimport MultiPolygon from '../MultiPolygon.js'\nimport GeometryCollection from '../GeometryCollection.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport MultiLineString from '../MultiLineString.js'\nexport default class GeometryTransformer {\n constructor() {\n GeometryTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._factory = null\n this._pruneEmptyGeometry = true\n this._preserveGeometryCollectionType = true\n this._preserveCollections = false\n this._preserveType = false\n }\n transformPoint(geom, parent) {\n return this._factory.createPoint(this.transformCoordinates(geom.getCoordinateSequence(), geom))\n }\n transformPolygon(geom, parent) {\n let isAllValidLinearRings = true\n const shell = this.transformLinearRing(geom.getExteriorRing(), geom)\n if (shell === null || !(shell instanceof LinearRing) || shell.isEmpty()) isAllValidLinearRings = false\n const holes = new ArrayList()\n for (let i = 0; i < geom.getNumInteriorRing(); i++) {\n const hole = this.transformLinearRing(geom.getInteriorRingN(i), geom)\n if (hole === null || hole.isEmpty()) \n continue\n \n if (!(hole instanceof LinearRing)) isAllValidLinearRings = false\n holes.add(hole)\n }\n if (isAllValidLinearRings) {\n return this._factory.createPolygon(shell, holes.toArray([]))\n } else {\n const components = new ArrayList()\n if (shell !== null) components.add(shell)\n components.addAll(holes)\n return this._factory.buildGeometry(components)\n }\n }\n createCoordinateSequence(coords) {\n return this._factory.getCoordinateSequenceFactory().create(coords)\n }\n getInputGeometry() {\n return this._inputGeom\n }\n transformMultiLineString(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformLineString(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n transformCoordinates(coords, parent) {\n return this.copy(coords)\n }\n transformLineString(geom, parent) {\n return this._factory.createLineString(this.transformCoordinates(geom.getCoordinateSequence(), geom))\n }\n transformMultiPoint(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformPoint(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n transformMultiPolygon(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformPolygon(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n copy(seq) {\n return seq.copy()\n }\n transformGeometryCollection(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transform(geom.getGeometryN(i))\n if (transformGeom === null) continue\n if (this._pruneEmptyGeometry && transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n if (this._preserveGeometryCollectionType) return this._factory.createGeometryCollection(GeometryFactory.toGeometryArray(transGeomList))\n return this._factory.buildGeometry(transGeomList)\n }\n transform(inputGeom) {\n this._inputGeom = inputGeom\n this._factory = inputGeom.getFactory()\n if (inputGeom instanceof Point) return this.transformPoint(inputGeom, null)\n if (inputGeom instanceof MultiPoint) return this.transformMultiPoint(inputGeom, null)\n if (inputGeom instanceof LinearRing) return this.transformLinearRing(inputGeom, null)\n if (inputGeom instanceof LineString) return this.transformLineString(inputGeom, null)\n if (inputGeom instanceof MultiLineString) return this.transformMultiLineString(inputGeom, null)\n if (inputGeom instanceof Polygon) return this.transformPolygon(inputGeom, null)\n if (inputGeom instanceof MultiPolygon) return this.transformMultiPolygon(inputGeom, null)\n if (inputGeom instanceof GeometryCollection) return this.transformGeometryCollection(inputGeom, null)\n throw new IllegalArgumentException('Unknown Geometry subtype: ' + inputGeom.getGeometryType())\n }\n transformLinearRing(geom, parent) {\n const seq = this.transformCoordinates(geom.getCoordinateSequence(), geom)\n if (seq === null) return this._factory.createLinearRing(null)\n const seqSize = seq.size()\n if (seqSize > 0 && seqSize < 4 && !this._preserveType) return this._factory.createLineString(seq)\n return this._factory.createLinearRing(seq)\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nexport default class Intersection {\n static intersection(p1, p2, q1, q2) {\n const minX0 = p1.x < p2.x ? p1.x : p2.x\n const minY0 = p1.y < p2.y ? p1.y : p2.y\n const maxX0 = p1.x > p2.x ? p1.x : p2.x\n const maxY0 = p1.y > p2.y ? p1.y : p2.y\n const minX1 = q1.x < q2.x ? q1.x : q2.x\n const minY1 = q1.y < q2.y ? q1.y : q2.y\n const maxX1 = q1.x > q2.x ? q1.x : q2.x\n const maxY1 = q1.y > q2.y ? q1.y : q2.y\n const intMinX = minX0 > minX1 ? minX0 : minX1\n const intMaxX = maxX0 < maxX1 ? maxX0 : maxX1\n const intMinY = minY0 > minY1 ? minY0 : minY1\n const intMaxY = maxY0 < maxY1 ? maxY0 : maxY1\n const midx = (intMinX + intMaxX) / 2.0\n const midy = (intMinY + intMaxY) / 2.0\n const p1x = p1.x - midx\n const p1y = p1.y - midy\n const p2x = p2.x - midx\n const p2y = p2.y - midy\n const q1x = q1.x - midx\n const q1y = q1.y - midy\n const q2x = q2.x - midx\n const q2y = q2.y - midy\n const px = p1y - p2y\n const py = p2x - p1x\n const pw = p1x * p2y - p2x * p1y\n const qx = q1y - q2y\n const qy = q2x - q1x\n const qw = q1x * q2y - q2x * q1y\n const x = py * qw - qy * pw\n const y = qx * pw - px * qw\n const w = px * qy - qx * py\n const xInt = x / w\n const yInt = y / w\n if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n return null\n \n return new Coordinate(xInt + midx, yInt + midy)\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport MathUtil from '../math/MathUtil.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class Distance {\n static segmentToSegment(A, B, C, D) {\n if (A.equals(B)) return Distance.pointToSegment(A, C, D)\n if (C.equals(D)) return Distance.pointToSegment(D, A, B)\n let noIntersection = false\n if (!Envelope.intersects(A, B, C, D)) {\n noIntersection = true\n } else {\n const denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x)\n if (denom === 0) {\n noIntersection = true\n } else {\n const r_num = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y)\n const s_num = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y)\n const s = s_num / denom\n const r = r_num / denom\n if (r < 0 || r > 1 || s < 0 || s > 1) \n noIntersection = true\n \n }\n }\n if (noIntersection) \n return MathUtil.min(Distance.pointToSegment(A, C, D), Distance.pointToSegment(B, C, D), Distance.pointToSegment(C, A, B), Distance.pointToSegment(D, A, B))\n \n return 0.0\n }\n static pointToSegment(p, A, B) {\n if (A.x === B.x && A.y === B.y) return p.distance(A)\n const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n const r = ((p.x - A.x) * (B.x - A.x) + (p.y - A.y) * (B.y - A.y)) / len2\n if (r <= 0.0) return p.distance(A)\n if (r >= 1.0) return p.distance(B)\n const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n return Math.abs(s) * Math.sqrt(len2)\n }\n static pointToLinePerpendicular(p, A, B) {\n const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n return Math.abs(s) * Math.sqrt(len2)\n }\n static pointToSegmentString(p, line) {\n if (line.length === 0) throw new IllegalArgumentException('Line array must contain at least one vertex')\n let minDistance = p.distance(line[0])\n for (let i = 0; i < line.length - 1; i++) {\n const dist = Distance.pointToSegment(p, line[i], line[i + 1])\n if (dist < minDistance) \n minDistance = dist\n \n }\n return minDistance\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport GeometryFactory from '../geom/GeometryFactory.js'\n\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nconst GeometryLayout = {\n XY: 'XY',\n XYZ: 'XYZ',\n XYM: 'XYM',\n XYZM: 'XYZM',\n}\n\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nconst GeometryType = {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n LINEAR_RING: 'LinearRing',\n POLYGON: 'Polygon',\n MULTI_POINT: 'MultiPoint',\n MULTI_LINE_STRING: 'MultiLineString',\n MULTI_POLYGON: 'MultiPolygon',\n GEOMETRY_COLLECTION: 'GeometryCollection',\n CIRCLE: 'Circle',\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number} position\n */\n\n/**\n * @const\n * @type {string}\n */\nconst EMPTY = 'EMPTY'\n\n/**\n * @const\n * @type {string}\n */\nconst Z = 'Z'\n\n/**\n * @const\n * @type {string}\n */\nconst M = 'M'\n\n/**\n * @const\n * @type {string}\n */\nconst ZM = 'ZM'\n\n/**\n * @const\n * @enum {number}\n */\nconst TokenType = {\n TEXT: 1,\n LEFT_PAREN: 2,\n RIGHT_PAREN: 3,\n NUMBER: 4,\n COMMA: 5,\n EOF: 6,\n}\n\n/**\n * @const\n * @type {Object}\n */\nconst WKTGeometryType = {}\nfor (const type in GeometryType)\n WKTGeometryType[type] = GeometryType[type].toUpperCase()\n\n\n/**\n * Class to tokenize a WKT string.\n */\nclass Lexer {\n /**\n * @param {string} wkt WKT string.\n */\n constructor(wkt) {\n /**\n * @type {string}\n */\n this.wkt = wkt\n\n /**\n * @type {number}\n * @private\n */\n this.index_ = -1\n }\n\n /**\n * @param {string} c Character.\n * @return {boolean} Whether the character is alphabetic.\n * @private\n */\n isAlpha_(c) {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')\n }\n\n /**\n * @param {string} c Character.\n * @param {boolean=} opt_decimal Whether the string number\n * contains a dot, i.e. is a decimal number.\n * @return {boolean} Whether the character is numeric.\n * @private\n */\n isNumeric_(c, opt_decimal) {\n const decimal = opt_decimal !== undefined ? opt_decimal : false\n return (c >= '0' && c <= '9') || (c == '.' && !decimal)\n }\n\n /**\n * @param {string} c Character.\n * @return {boolean} Whether the character is whitespace.\n * @private\n */\n isWhiteSpace_(c) {\n return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n'\n }\n\n /**\n * @return {string} Next string character.\n * @private\n */\n nextChar_() {\n return this.wkt.charAt(++this.index_)\n }\n\n /**\n * Fetch and return the next token.\n * @return {!Token} Next string token.\n */\n nextToken() {\n const c = this.nextChar_()\n const position = this.index_\n /** @type {number|string} */\n let value = c\n let type\n\n if (c == '(') {\n type = TokenType.LEFT_PAREN\n } else if (c == ',') {\n type = TokenType.COMMA\n } else if (c == ')') {\n type = TokenType.RIGHT_PAREN\n } else if (this.isNumeric_(c) || c == '-') {\n type = TokenType.NUMBER\n value = this.readNumber_()\n } else if (this.isAlpha_(c)) {\n type = TokenType.TEXT\n value = this.readText_()\n } else if (this.isWhiteSpace_(c)) {\n return this.nextToken()\n } else if (c === '') {\n type = TokenType.EOF\n } else {\n throw new Error('Unexpected character: ' + c)\n }\n\n return { position: position, value: value, type: type }\n }\n\n /**\n * @return {number} Numeric token value.\n * @private\n */\n readNumber_() {\n let c\n const index = this.index_\n let decimal = false\n let scientificNotation = false\n do {\n if (c == '.')\n decimal = true\n else if (c == 'e' || c == 'E')\n scientificNotation = true\n c = this.nextChar_()\n } while (\n this.isNumeric_(c, decimal) ||\n // if we haven't detected a scientific number before, 'e' or 'E'\n // hint that we should continue to read\n (!scientificNotation && (c == 'e' || c == 'E')) ||\n // once we know that we have a scientific number, both '-' and '+'\n // are allowed\n (scientificNotation && (c == '-' || c == '+'))\n )\n return parseFloat(this.wkt.substring(index, this.index_--))\n }\n\n /**\n * @return {string} String token value.\n * @private\n */\n readText_() {\n let c\n const index = this.index_\n do\n c = this.nextChar_()\n while (this.isAlpha_(c))\n return this.wkt.substring(index, this.index_--).toUpperCase()\n }\n}\n\n/**\n * Class to parse the tokens from the WKT string.\n */\nclass Parser {\n /**\n * @param {Lexer} lexer The lexer.\n */\n constructor(lexer, factory) {\n /**\n * @type {Lexer}\n * @private\n */\n this.lexer_ = lexer\n\n /**\n * @type {Token}\n * @private\n */\n this.token_\n\n /**\n * @type {import(\"../geom/GeometryLayout.js\").default}\n * @private\n */\n this.layout_ = GeometryLayout.XY\n\n this.factory = factory\n }\n\n /**\n * Fetch the next token form the lexer and replace the active token.\n * @private\n */\n consume_() {\n this.token_ = this.lexer_.nextToken()\n }\n\n /**\n * Tests if the given type matches the type of the current token.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\n isTokenType(type) {\n const isMatch = this.token_.type == type\n return isMatch\n }\n\n /**\n * If the given type matches the current token, consume it.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\n match(type) {\n const isMatch = this.isTokenType(type)\n if (isMatch) \n this.consume_()\n return isMatch\n }\n\n /**\n * Try to parse the tokens provided by the lexer.\n * @return {import(\"../geom/Geometry.js\").default} The geometry.\n */\n parse() {\n this.consume_()\n const geometry = this.parseGeometry_()\n return geometry\n }\n\n /**\n * Try to parse the dimensional info.\n * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n * @private\n */\n parseGeometryLayout_() {\n let layout = GeometryLayout.XY\n const dimToken = this.token_\n if (this.isTokenType(TokenType.TEXT)) {\n const dimInfo = dimToken.value\n if (dimInfo === Z)\n layout = GeometryLayout.XYZ\n else if (dimInfo === M)\n layout = GeometryLayout.XYM\n else if (dimInfo === ZM)\n layout = GeometryLayout.XYZM\n if (layout !== GeometryLayout.XY)\n this.consume_()\n }\n return layout\n }\n\n /**\n * @return {!Array} A collection of geometries.\n * @private\n */\n parseGeometryCollectionText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const geometries = []\n do\n geometries.push(this.parseGeometry_())\n while (this.match(TokenType.COMMA))\n if (this.match(TokenType.RIGHT_PAREN)) \n return geometries\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {Array} All values in a point.\n * @private\n */\n parsePointText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePoint_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return null\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} All points in a linestring.\n * @private\n */\n parseLineStringText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePointList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>} All points in a polygon.\n * @private\n */\n parsePolygonText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parseLineStringTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} All points in a multipoint.\n * @private\n */\n parseMultiPointText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n let coordinates\n if (this.token_.type == TokenType.LEFT_PAREN) \n coordinates = this.parsePointTextList_()\n else\n coordinates = this.parsePointList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>} All linestring points\n * in a multilinestring.\n * @private\n */\n parseMultiLineStringText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parseLineStringTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>>} All polygon points in a multipolygon.\n * @private\n */\n parseMultiPolygonText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePolygonTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array} A point.\n * @private\n */\n parsePoint_() {\n const coordinates = []\n const dimensions = this.layout_.length\n for (let i = 0; i < dimensions; ++i) {\n const token = this.token_\n if (this.match(TokenType.NUMBER)) \n coordinates.push(/** @type {number} */(token.value))\n else\n break\n }\n if (coordinates.length == dimensions) \n return coordinates\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} An array of points.\n * @private\n */\n parsePointList_() {\n const coordinates = [this.parsePoint_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePoint_())\n return coordinates\n }\n\n /**\n * @return {!Array>} An array of points.\n * @private\n */\n parsePointTextList_() {\n const coordinates = [this.parsePointText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePointText_())\n return coordinates\n }\n\n /**\n * @return {!Array>>} An array of points.\n * @private\n */\n parseLineStringTextList_() {\n const coordinates = [this.parseLineStringText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parseLineStringText_())\n return coordinates\n }\n\n /**\n * @return {!Array>>>} An array of points.\n * @private\n */\n parsePolygonTextList_() {\n const coordinates = [this.parsePolygonText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePolygonText_())\n return coordinates\n }\n\n /**\n * @return {boolean} Whether the token implies an empty geometry.\n * @private\n */\n isEmptyGeometry_() {\n const isEmpty =\n this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY\n if (isEmpty)\n this.consume_()\n return isEmpty\n }\n\n /**\n * Create an error message for an unexpected token error.\n * @return {string} Error message.\n * @private\n */\n formatErrorMessage_() {\n return (\n 'Unexpected `' +\n this.token_.value +\n '` at position ' +\n this.token_.position +\n ' in `' +\n this.lexer_.wkt +\n '`'\n )\n }\n\n /**\n * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n * @private\n */\n parseGeometry_() {\n const factory = this.factory\n\n const o2c = ordinates => new Coordinate(...ordinates)\n const ca2p = coordinates => {\n const rings = coordinates.map(a => factory.createLinearRing(a.map(o2c)))\n if (rings.length > 1)\n return factory.createPolygon(rings[0], rings.slice(1))\n else\n return factory.createPolygon(rings[0])\n }\n\n const token = this.token_\n if (this.match(TokenType.TEXT)) {\n const geomType = token.value\n this.layout_ = this.parseGeometryLayout_()\n if (geomType == 'GEOMETRYCOLLECTION') {\n const geometries = this.parseGeometryCollectionText_()\n return factory.createGeometryCollection(geometries)\n } else {\n switch (geomType) {\n case 'POINT': {\n const ordinates = this.parsePointText_()\n if (!ordinates)\n return factory.createPoint()\n return factory.createPoint(new Coordinate(...ordinates))\n }\n case 'LINESTRING': {\n const coordinates = this.parseLineStringText_()\n const components = coordinates.map(o2c)\n return factory.createLineString(components)\n }\n case 'LINEARRING': {\n const coordinates = this.parseLineStringText_()\n const components = coordinates.map(o2c)\n return factory.createLinearRing(components)\n }\n case 'POLYGON': {\n const coordinates = this.parsePolygonText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createPolygon()\n return ca2p(coordinates)\n }\n case 'MULTIPOINT': {\n const coordinates = this.parseMultiPointText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createMultiPoint()\n const components = coordinates.map(o2c).map(c => factory.createPoint(c))\n return factory.createMultiPoint(components)\n }\n case 'MULTILINESTRING': {\n const coordinates = this.parseMultiLineStringText_()\n const components = coordinates.map(a => factory.createLineString(a.map(o2c)))\n return factory.createMultiLineString(components)\n }\n case 'MULTIPOLYGON': {\n const coordinates = this.parseMultiPolygonText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createMultiPolygon()\n const polygons = coordinates.map(ca2p)\n return factory.createMultiPolygon(polygons)\n }\n default: {\n throw new Error('Invalid geometry type: ' + geomType)\n }\n }\n }\n }\n throw new Error(this.formatErrorMessage_())\n }\n}\n\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n if (geom.isEmpty())\n return ''\n const c = geom.getCoordinate()\n const cs = [c.x, c.y]\n if (c.z !== undefined && !Number.isNaN(c.z))\n cs.push(c.z)\n if (c.m !== undefined && !Number.isNaN(c.m))\n cs.push(c.m)\n return cs.join(' ')\n}\n\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodePointGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push(encode(geom.getGeometryN(i)))\n return array.join(', ')\n}\n\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n const coordinates = geom.getCoordinates()\n .map(c => {\n const a = [c.x, c.y]\n if (c.z !== undefined && !Number.isNaN(c.z))\n a.push(c.z)\n if (c.m !== undefined && !Number.isNaN(c.m))\n a.push(c.m)\n return a\n })\n const array = []\n for (let i = 0, ii = coordinates.length; i < ii; ++i) \n array.push(coordinates[i].join(' '))\n return array.join(', ')\n}\n\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodeLineStringGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n const array = []\n array.push('(' + encodeLineStringGeometry(geom.getExteriorRing()) + ')')\n for (let i = 0, ii = geom.getNumInteriorRing(); i < ii; ++i) \n array.push('(' + encodeLineStringGeometry(geom.getInteriorRingN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodePolygonGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {Geometry} geom Geometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n let dimInfo = ''\n if (geom.isEmpty())\n return dimInfo\n const c = geom.getCoordinate()\n if (c.z !== undefined && !Number.isNaN(c.z))\n dimInfo += Z\n if (c.m !== undefined && !Number.isNaN(c.m))\n dimInfo += M\n return dimInfo\n}\n\n/**\n * @const\n * @type {Object}\n */\nconst GeometryEncoder = {\n 'Point': encodePointGeometry,\n 'LineString': encodeLineStringGeometry,\n 'LinearRing': encodeLineStringGeometry,\n 'Polygon': encodePolygonGeometry,\n 'MultiPoint': encodeMultiPointGeometry,\n 'MultiLineString': encodeMultiLineStringGeometry,\n 'MultiPolygon': encodeMultiPolygonGeometry,\n 'GeometryCollection': encodeGeometryCollectionGeometry,\n}\n\n/**\n * Encode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n let type = geom.getGeometryType()\n const geometryEncoder = GeometryEncoder[type]\n type = type.toUpperCase()\n const dimInfo = encodeGeometryLayout(geom)\n if (dimInfo.length > 0) \n type += ' ' + dimInfo\n if (geom.isEmpty()) \n return type + ' ' + EMPTY\n const enc = geometryEncoder(geom)\n return type + ' (' + enc + ')'\n}\n\n/**\n * Class for reading and writing Well-Known Text.\n *\n * NOTE: Adapted from OpenLayers.\n */\n\nexport default class WKTParser {\n /** Create a new parser for WKT\n *\n * @param {GeometryFactory} geometryFactory\n * @return An instance of WKTParser.\n * @private\n */\n constructor(geometryFactory) {\n this.geometryFactory = geometryFactory || new GeometryFactory()\n this.precisionModel = this.geometryFactory.getPrecisionModel()\n }\n\n /**\n * Deserialize a WKT string and return a geometry. Supports WKT for POINT,\n * MULTIPOINT, LINESTRING, LINEARRING, MULTILINESTRING, POLYGON, MULTIPOLYGON,\n * and GEOMETRYCOLLECTION.\n *\n * @param {String} wkt A WKT string.\n * @return {Geometry} A geometry instance.\n * @private\n */\n read(wkt) {\n const lexer = new Lexer(wkt)\n const parser = new Parser(lexer, this.geometryFactory)\n const geometry = parser.parse()\n return geometry\n }\n\n /**\n * Serialize a geometry into a WKT string.\n *\n * @param {Geometry} geometry A feature or array of features.\n * @return {String} The WKT string representation of the input geometries.\n * @private\n */\n write(geometry) {\n return encode(geometry)\n }\n}\n","/**\n * @module org/locationtech/jts/io/WKTWriter\n */\n\nimport WKTParser from './WKTParser.js'\n\n/**\n * Writes the Well-Known Text representation of a {@link Geometry}. The\n * Well-Known Text format is defined in the OGC Simple Features\n * Specification for SQL.\n *

\n * The WKTWriter outputs coordinates rounded to the precision\n * model. Only the maximum number of decimal places necessary to represent the\n * ordinates to the required precision will be output.\n *

\n * The SFS WKT spec does not define a special tag for {@link LinearRing}s.\n * Under the spec, rings are output as LINESTRINGs.\n */\nexport default class WKTWriter {\n /**\n * @param {GeometryFactory} geometryFactory\n */\n constructor(geometryFactory) {\n this.parser = new WKTParser(geometryFactory)\n }\n\n /**\n * Converts a Geometry to its Well-known Text representation.\n *\n * @param {Geometry} geometry a Geometry to process.\n * @return {string} a string (see the OpenGIS Simple\n * Features Specification).\n * @memberof module:org/locationtech/jts/io/WKTWriter#\n */\n write(geometry) {\n return this.parser.write(geometry)\n }\n\n /**\n * Generates the WKT for a LINESTRING specified by two\n * {@link Coordinate}s.\n *\n * @param p0 the first coordinate.\n * @param p1 the second coordinate.\n *\n * @return the WKT.\n * @private\n */\n static toLineString(p0, p1) {\n if (arguments.length !== 2) throw new Error('Not implemented')\n\n return 'LINESTRING ( ' + p0.x + ' ' + p0.y + ', ' + p1.x + ' ' + p1.y + ' )'\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Assert from '../util/Assert.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nexport default class LineIntersector {\n constructor() {\n LineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._result = null\n this._inputLines = Array(2).fill().map(() => Array(2))\n this._intPt = new Array(2).fill(null)\n this._intLineIndex = null\n this._isProper = null\n this._pa = null\n this._pb = null\n this._precisionModel = null\n this._intPt[0] = new Coordinate()\n this._intPt[1] = new Coordinate()\n this._pa = this._intPt[0]\n this._pb = this._intPt[1]\n this._result = 0\n }\n static computeEdgeDistance(p, p0, p1) {\n const dx = Math.abs(p1.x - p0.x)\n const dy = Math.abs(p1.y - p0.y)\n let dist = -1.0\n if (p.equals(p0)) {\n dist = 0.0\n } else if (p.equals(p1)) {\n if (dx > dy) dist = dx; else dist = dy\n } else {\n const pdx = Math.abs(p.x - p0.x)\n const pdy = Math.abs(p.y - p0.y)\n if (dx > dy) dist = pdx; else dist = pdy\n if (dist === 0.0 && !p.equals(p0)) \n dist = Math.max(pdx, pdy)\n \n }\n Assert.isTrue(!(dist === 0.0 && !p.equals(p0)), 'Bad distance calculation')\n return dist\n }\n static nonRobustComputeEdgeDistance(p, p1, p2) {\n const dx = p.x - p1.x\n const dy = p.y - p1.y\n const dist = Math.sqrt(dx * dx + dy * dy)\n Assert.isTrue(!(dist === 0.0 && !p.equals(p1)), 'Invalid distance calculation')\n return dist\n }\n getIndexAlongSegment(segmentIndex, intIndex) {\n this.computeIntLineIndex()\n return this._intLineIndex[segmentIndex][intIndex]\n }\n getTopologySummary() {\n const catBuilder = new StringBuilder()\n if (this.isEndPoint()) catBuilder.append(' endpoint')\n if (this._isProper) catBuilder.append(' proper')\n if (this.isCollinear()) catBuilder.append(' collinear')\n return catBuilder.toString()\n }\n computeIntersection(p1, p2, p3, p4) {\n this._inputLines[0][0] = p1\n this._inputLines[0][1] = p2\n this._inputLines[1][0] = p3\n this._inputLines[1][1] = p4\n this._result = this.computeIntersect(p1, p2, p3, p4)\n }\n getIntersectionNum() {\n return this._result\n }\n computeIntLineIndex() {\n if (arguments.length === 0) {\n if (this._intLineIndex === null) {\n this._intLineIndex = Array(2).fill().map(() => Array(2))\n this.computeIntLineIndex(0)\n this.computeIntLineIndex(1)\n }\n } else if (arguments.length === 1) {\n const segmentIndex = arguments[0]\n const dist0 = this.getEdgeDistance(segmentIndex, 0)\n const dist1 = this.getEdgeDistance(segmentIndex, 1)\n if (dist0 > dist1) {\n this._intLineIndex[segmentIndex][0] = 0\n this._intLineIndex[segmentIndex][1] = 1\n } else {\n this._intLineIndex[segmentIndex][0] = 1\n this._intLineIndex[segmentIndex][1] = 0\n }\n }\n }\n isProper() {\n return this.hasIntersection() && this._isProper\n }\n setPrecisionModel(precisionModel) {\n this._precisionModel = precisionModel\n }\n isInteriorIntersection() {\n if (arguments.length === 0) {\n if (this.isInteriorIntersection(0)) return true\n if (this.isInteriorIntersection(1)) return true\n return false\n } else if (arguments.length === 1) {\n const inputLineIndex = arguments[0]\n for (let i = 0; i < this._result; i++) \n if (!(this._intPt[i].equals2D(this._inputLines[inputLineIndex][0]) || this._intPt[i].equals2D(this._inputLines[inputLineIndex][1]))) \n return true\n \n \n return false\n }\n }\n getIntersection(intIndex) {\n return this._intPt[intIndex]\n }\n isEndPoint() {\n return this.hasIntersection() && !this._isProper\n }\n hasIntersection() {\n return this._result !== LineIntersector.NO_INTERSECTION\n }\n getEdgeDistance(segmentIndex, intIndex) {\n const dist = LineIntersector.computeEdgeDistance(this._intPt[intIndex], this._inputLines[segmentIndex][0], this._inputLines[segmentIndex][1])\n return dist\n }\n isCollinear() {\n return this._result === LineIntersector.COLLINEAR_INTERSECTION\n }\n toString() {\n return WKTWriter.toLineString(this._inputLines[0][0], this._inputLines[0][1]) + ' - ' + WKTWriter.toLineString(this._inputLines[1][0], this._inputLines[1][1]) + this.getTopologySummary()\n }\n getEndpoint(segmentIndex, ptIndex) {\n return this._inputLines[segmentIndex][ptIndex]\n }\n isIntersection(pt) {\n for (let i = 0; i < this._result; i++) \n if (this._intPt[i].equals2D(pt)) \n return true\n \n \n return false\n }\n getIntersectionAlongSegment(segmentIndex, intIndex) {\n this.computeIntLineIndex()\n return this._intPt[this._intLineIndex[segmentIndex][intIndex]]\n }\n}\nLineIntersector.DONT_INTERSECT = 0\nLineIntersector.DO_INTERSECT = 1\nLineIntersector.COLLINEAR = 2\nLineIntersector.NO_INTERSECTION = 0\nLineIntersector.POINT_INTERSECTION = 1\nLineIntersector.COLLINEAR_INTERSECTION = 2\n","import Coordinate from '../geom/Coordinate.js'\nimport Orientation from './Orientation.js'\nimport Intersection from './Intersection.js'\nimport CGAlgorithmsDD from './CGAlgorithmsDD.js'\nimport System from '../../../../java/lang/System.js'\nimport Envelope from '../geom/Envelope.js'\nimport Distance from './Distance.js'\nimport LineIntersector from './LineIntersector.js'\nexport default class RobustLineIntersector extends LineIntersector {\n constructor() {\n super()\n }\n static nearestEndpoint(p1, p2, q1, q2) {\n let nearestPt = p1\n let minDist = Distance.pointToSegment(p1, q1, q2)\n let dist = Distance.pointToSegment(p2, q1, q2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = p2\n }\n dist = Distance.pointToSegment(q1, p1, p2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = q1\n }\n dist = Distance.pointToSegment(q2, p1, p2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = q2\n }\n return nearestPt\n }\n isInSegmentEnvelopes(intPt) {\n const env0 = new Envelope(this._inputLines[0][0], this._inputLines[0][1])\n const env1 = new Envelope(this._inputLines[1][0], this._inputLines[1][1])\n return env0.contains(intPt) && env1.contains(intPt)\n }\n computeIntersection() {\n if (arguments.length === 3) {\n const p = arguments[0], p1 = arguments[1], p2 = arguments[2]\n this._isProper = false\n if (Envelope.intersects(p1, p2, p)) \n if (Orientation.index(p1, p2, p) === 0 && Orientation.index(p2, p1, p) === 0) {\n this._isProper = true\n if (p.equals(p1) || p.equals(p2)) \n this._isProper = false\n \n this._result = LineIntersector.POINT_INTERSECTION\n return null\n }\n \n this._result = LineIntersector.NO_INTERSECTION\n } else {\n return super.computeIntersection.apply(this, arguments)\n }\n }\n intersection(p1, p2, q1, q2) {\n let intPt = this.intersectionSafe(p1, p2, q1, q2)\n if (!this.isInSegmentEnvelopes(intPt)) \n intPt = new Coordinate(RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2))\n \n if (this._precisionModel !== null) \n this._precisionModel.makePrecise(intPt)\n \n return intPt\n }\n checkDD(p1, p2, q1, q2, intPt) {\n const intPtDD = CGAlgorithmsDD.intersection(p1, p2, q1, q2)\n const isIn = this.isInSegmentEnvelopes(intPtDD)\n System.out.println('DD in env = ' + isIn + ' --------------------- ' + intPtDD)\n if (intPt.distance(intPtDD) > 0.0001) \n System.out.println('Distance = ' + intPt.distance(intPtDD))\n \n }\n intersectionSafe(p1, p2, q1, q2) {\n let intPt = Intersection.intersection(p1, p2, q1, q2)\n if (intPt === null) intPt = RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2)\n return intPt\n }\n computeCollinearIntersection(p1, p2, q1, q2) {\n const p1q1p2 = Envelope.intersects(p1, p2, q1)\n const p1q2p2 = Envelope.intersects(p1, p2, q2)\n const q1p1q2 = Envelope.intersects(q1, q2, p1)\n const q1p2q2 = Envelope.intersects(q1, q2, p2)\n if (p1q1p2 && p1q2p2) {\n this._intPt[0] = q1\n this._intPt[1] = q2\n return LineIntersector.COLLINEAR_INTERSECTION\n }\n if (q1p1q2 && q1p2q2) {\n this._intPt[0] = p1\n this._intPt[1] = p2\n return LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q1p2 && q1p1q2) {\n this._intPt[0] = q1\n this._intPt[1] = p1\n return q1.equals(p1) && !p1q2p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q1p2 && q1p2q2) {\n this._intPt[0] = q1\n this._intPt[1] = p2\n return q1.equals(p2) && !p1q2p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q2p2 && q1p1q2) {\n this._intPt[0] = q2\n this._intPt[1] = p1\n return q2.equals(p1) && !p1q1p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q2p2 && q1p2q2) {\n this._intPt[0] = q2\n this._intPt[1] = p2\n return q2.equals(p2) && !p1q1p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n return LineIntersector.NO_INTERSECTION\n }\n computeIntersect(p1, p2, q1, q2) {\n this._isProper = false\n if (!Envelope.intersects(p1, p2, q1, q2)) return LineIntersector.NO_INTERSECTION\n const Pq1 = Orientation.index(p1, p2, q1)\n const Pq2 = Orientation.index(p1, p2, q2)\n if (Pq1 > 0 && Pq2 > 0 || Pq1 < 0 && Pq2 < 0) \n return LineIntersector.NO_INTERSECTION\n \n const Qp1 = Orientation.index(q1, q2, p1)\n const Qp2 = Orientation.index(q1, q2, p2)\n if (Qp1 > 0 && Qp2 > 0 || Qp1 < 0 && Qp2 < 0) \n return LineIntersector.NO_INTERSECTION\n \n const collinear = Pq1 === 0 && Pq2 === 0 && Qp1 === 0 && Qp2 === 0\n if (collinear) \n return this.computeCollinearIntersection(p1, p2, q1, q2)\n \n if (Pq1 === 0 || Pq2 === 0 || Qp1 === 0 || Qp2 === 0) {\n this._isProper = false\n if (p1.equals2D(q1) || p1.equals2D(q2)) \n this._intPt[0] = p1\n else if (p2.equals2D(q1) || p2.equals2D(q2)) \n this._intPt[0] = p2\n else if (Pq1 === 0) \n this._intPt[0] = new Coordinate(q1)\n else if (Pq2 === 0) \n this._intPt[0] = new Coordinate(q2)\n else if (Qp1 === 0) \n this._intPt[0] = new Coordinate(p1)\n else if (Qp2 === 0) \n this._intPt[0] = new Coordinate(p2)\n \n } else {\n this._isProper = true\n this._intPt[0] = this.intersection(p1, p2, q1, q2)\n }\n return LineIntersector.POINT_INTERSECTION\n }\n}\n","import Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport Intersection from '../algorithm/Intersection.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Distance from '../algorithm/Distance.js'\nexport default class LineSegment {\n constructor() {\n LineSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.p0 = null\n this.p1 = null\n if (arguments.length === 0) {\n LineSegment.constructor_.call(this, new Coordinate(), new Coordinate())\n } else if (arguments.length === 1) {\n const ls = arguments[0]\n LineSegment.constructor_.call(this, ls.p0, ls.p1)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n this.p0 = p0\n this.p1 = p1\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n LineSegment.constructor_.call(this, new Coordinate(x0, y0), new Coordinate(x1, y1))\n }\n }\n static midPoint(p0, p1) {\n return new Coordinate((p0.x + p1.x) / 2, (p0.y + p1.y) / 2)\n }\n minX() {\n return Math.min(this.p0.x, this.p1.x)\n }\n orientationIndex() {\n if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n const orient0 = Orientation.index(this.p0, this.p1, seg.p0)\n const orient1 = Orientation.index(this.p0, this.p1, seg.p1)\n if (orient0 >= 0 && orient1 >= 0) return Math.max(orient0, orient1)\n if (orient0 <= 0 && orient1 <= 0) return Math.max(orient0, orient1)\n return 0\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return Orientation.index(this.p0, this.p1, p)\n }\n }\n toGeometry(geomFactory) {\n return geomFactory.createLineString([this.p0, this.p1])\n }\n isVertical() {\n return this.p0.x === this.p1.x\n }\n equals(o) {\n if (!(o instanceof LineSegment)) \n return false\n \n const other = o\n return this.p0.equals(other.p0) && this.p1.equals(other.p1)\n }\n intersection(line) {\n const li = new RobustLineIntersector()\n li.computeIntersection(this.p0, this.p1, line.p0, line.p1)\n if (li.hasIntersection()) return li.getIntersection(0)\n return null\n }\n project() {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n if (p.equals(this.p0) || p.equals(this.p1)) return new Coordinate(p)\n const r = this.projectionFactor(p)\n const coord = new Coordinate()\n coord.x = this.p0.x + r * (this.p1.x - this.p0.x)\n coord.y = this.p0.y + r * (this.p1.y - this.p0.y)\n return coord\n } else if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n const pf0 = this.projectionFactor(seg.p0)\n const pf1 = this.projectionFactor(seg.p1)\n if (pf0 >= 1.0 && pf1 >= 1.0) return null\n if (pf0 <= 0.0 && pf1 <= 0.0) return null\n let newp0 = this.project(seg.p0)\n if (pf0 < 0.0) newp0 = this.p0\n if (pf0 > 1.0) newp0 = this.p1\n let newp1 = this.project(seg.p1)\n if (pf1 < 0.0) newp1 = this.p0\n if (pf1 > 1.0) newp1 = this.p1\n return new LineSegment(newp0, newp1)\n }\n }\n normalize() {\n if (this.p1.compareTo(this.p0) < 0) this.reverse()\n }\n angle() {\n return Math.atan2(this.p1.y - this.p0.y, this.p1.x - this.p0.x)\n }\n getCoordinate(i) {\n if (i === 0) return this.p0\n return this.p1\n }\n distancePerpendicular(p) {\n return Distance.pointToLinePerpendicular(p, this.p0, this.p1)\n }\n minY() {\n return Math.min(this.p0.y, this.p1.y)\n }\n midPoint() {\n return LineSegment.midPoint(this.p0, this.p1)\n }\n projectionFactor(p) {\n if (p.equals(this.p0)) return 0.0\n if (p.equals(this.p1)) return 1.0\n const dx = this.p1.x - this.p0.x\n const dy = this.p1.y - this.p0.y\n const len = dx * dx + dy * dy\n if (len <= 0.0) return Double.NaN\n const r = ((p.x - this.p0.x) * dx + (p.y - this.p0.y) * dy) / len\n return r\n }\n closestPoints(line) {\n const intPt = this.intersection(line)\n if (intPt !== null) \n return [intPt, intPt]\n \n const closestPt = new Array(2).fill(null)\n let minDistance = Double.MAX_VALUE\n let dist = null\n const close00 = this.closestPoint(line.p0)\n minDistance = close00.distance(line.p0)\n closestPt[0] = close00\n closestPt[1] = line.p0\n const close01 = this.closestPoint(line.p1)\n dist = close01.distance(line.p1)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = close01\n closestPt[1] = line.p1\n }\n const close10 = line.closestPoint(this.p0)\n dist = close10.distance(this.p0)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = this.p0\n closestPt[1] = close10\n }\n const close11 = line.closestPoint(this.p1)\n dist = close11.distance(this.p1)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = this.p1\n closestPt[1] = close11\n }\n return closestPt\n }\n closestPoint(p) {\n const factor = this.projectionFactor(p)\n if (factor > 0 && factor < 1) \n return this.project(p)\n \n const dist0 = this.p0.distance(p)\n const dist1 = this.p1.distance(p)\n if (dist0 < dist1) return this.p0\n return this.p1\n }\n maxX() {\n return Math.max(this.p0.x, this.p1.x)\n }\n getLength() {\n return this.p0.distance(this.p1)\n }\n compareTo(o) {\n const other = o\n const comp0 = this.p0.compareTo(other.p0)\n if (comp0 !== 0) return comp0\n return this.p1.compareTo(other.p1)\n }\n reverse() {\n const temp = this.p0\n this.p0 = this.p1\n this.p1 = temp\n }\n equalsTopo(other) {\n return this.p0.equals(other.p0) && this.p1.equals(other.p1) || this.p0.equals(other.p1) && this.p1.equals(other.p0)\n }\n lineIntersection(line) {\n const intPt = Intersection.intersection(this.p0, this.p1, line.p0, line.p1)\n return intPt\n }\n maxY() {\n return Math.max(this.p0.y, this.p1.y)\n }\n pointAlongOffset(segmentLengthFraction, offsetDistance) {\n const segx = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n const segy = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n const dx = this.p1.x - this.p0.x\n const dy = this.p1.y - this.p0.y\n const len = Math.sqrt(dx * dx + dy * dy)\n let ux = 0.0\n let uy = 0.0\n if (offsetDistance !== 0.0) {\n if (len <= 0.0) throw new IllegalStateException('Cannot compute offset from zero-length line segment')\n ux = offsetDistance * dx / len\n uy = offsetDistance * dy / len\n }\n const offsetx = segx - uy\n const offsety = segy + ux\n const coord = new Coordinate(offsetx, offsety)\n return coord\n }\n setCoordinates() {\n if (arguments.length === 1) {\n const ls = arguments[0]\n this.setCoordinates(ls.p0, ls.p1)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n this.p0.x = p0.x\n this.p0.y = p0.y\n this.p1.x = p1.x\n this.p1.y = p1.y\n }\n }\n segmentFraction(inputPt) {\n let segFrac = this.projectionFactor(inputPt)\n if (segFrac < 0.0) segFrac = 0.0; else if (segFrac > 1.0 || Double.isNaN(segFrac)) segFrac = 1.0\n return segFrac\n }\n toString() {\n return 'LINESTRING( ' + this.p0.x + ' ' + this.p0.y + ', ' + this.p1.x + ' ' + this.p1.y + ')'\n }\n isHorizontal() {\n return this.p0.y === this.p1.y\n }\n reflect(p) {\n const A = this.p1.getY() - this.p0.getY()\n const B = this.p0.getX() - this.p1.getX()\n const C = this.p0.getY() * (this.p1.getX() - this.p0.getX()) - this.p0.getX() * (this.p1.getY() - this.p0.getY())\n const A2plusB2 = A * A + B * B\n const A2subB2 = A * A - B * B\n const x = p.getX()\n const y = p.getY()\n const rx = (-A2subB2 * x - 2 * A * B * y - 2 * A * C) / A2plusB2\n const ry = (A2subB2 * y - 2 * A * B * x - 2 * B * C) / A2plusB2\n return new Coordinate(rx, ry)\n }\n distance() {\n if (arguments[0] instanceof LineSegment) {\n const ls = arguments[0]\n return Distance.segmentToSegment(this.p0, this.p1, ls.p0, ls.p1)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return Distance.pointToSegment(p, this.p0, this.p1)\n }\n }\n pointAlong(segmentLengthFraction) {\n const coord = new Coordinate()\n coord.x = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n coord.y = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n return coord\n }\n hashCode() {\n let bits0 = Double.doubleToLongBits(this.p0.x)\n bits0 ^= Double.doubleToLongBits(this.p0.y) * 31\n const hash0 = Math.trunc(bits0) ^ Math.trunc(bits0 >> 32)\n let bits1 = Double.doubleToLongBits(this.p1.x)\n bits1 ^= Double.doubleToLongBits(this.p1.y) * 31\n const hash1 = Math.trunc(bits1) ^ Math.trunc(bits1 >> 32)\n return hash0 ^ hash1\n }\n get interfaces_() {\n return [Comparable, Serializable]\n }\n}\n","/**\n * @module org/locationtech/jts/io/WKTReader\n */\n\nimport GeometryFactory from '../geom/GeometryFactory.js'\nimport WKTParser from './WKTParser.js'\n\n/**\n * Converts a geometry in Well-Known Text format to a {@link Geometry}.\n *

\n * WKTReader supports extracting Geometry objects\n * from either {@link Reader}s or {@link String}s. This allows it to function\n * as a parser to read Geometry objects from text blocks embedded\n * in other data formats (e.g. XML).\n */\n\nexport default class WKTReader {\n /**\n * A WKTReader is parameterized by a GeometryFactory,\n * to allow it to create Geometry objects of the appropriate\n * implementation. In particular, the GeometryFactory determines\n * the PrecisionModel and SRID that is used.\n * @param {GeometryFactory} geometryFactory\n */\n constructor(geometryFactory) {\n this.parser = new WKTParser(geometryFactory || new GeometryFactory())\n }\n\n /**\n * Reads a Well-Known Text representation of a {@link Geometry}\n *\n * @param {string}\n * wkt a string (see the OpenGIS Simple Features\n * Specification).\n * @return {Geometry} a Geometry read from\n * string.\n * @memberof module:org/locationtech/jts/io/WKTReader#\n */\n read(wkt) {\n return this.parser.read(wkt)\n }\n}\n","export default class BufferParameters {\n constructor() {\n BufferParameters.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n this._endCapStyle = BufferParameters.CAP_ROUND\n this._joinStyle = BufferParameters.JOIN_ROUND\n this._mitreLimit = BufferParameters.DEFAULT_MITRE_LIMIT\n this._isSingleSided = false\n this._simplifyFactor = BufferParameters.DEFAULT_SIMPLIFY_FACTOR\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const quadrantSegments = arguments[0]\n this.setQuadrantSegments(quadrantSegments)\n } else if (arguments.length === 2) {\n const quadrantSegments = arguments[0], endCapStyle = arguments[1]\n this.setQuadrantSegments(quadrantSegments)\n this.setEndCapStyle(endCapStyle)\n } else if (arguments.length === 4) {\n const quadrantSegments = arguments[0], endCapStyle = arguments[1], joinStyle = arguments[2], mitreLimit = arguments[3]\n this.setQuadrantSegments(quadrantSegments)\n this.setEndCapStyle(endCapStyle)\n this.setJoinStyle(joinStyle)\n this.setMitreLimit(mitreLimit)\n }\n }\n static bufferDistanceError(quadSegs) {\n const alpha = Math.PI / 2.0 / quadSegs\n return 1 - Math.cos(alpha / 2.0)\n }\n getEndCapStyle() {\n return this._endCapStyle\n }\n isSingleSided() {\n return this._isSingleSided\n }\n setQuadrantSegments(quadSegs) {\n this._quadrantSegments = quadSegs\n if (this._quadrantSegments === 0) this._joinStyle = BufferParameters.JOIN_BEVEL\n if (this._quadrantSegments < 0) {\n this._joinStyle = BufferParameters.JOIN_MITRE\n this._mitreLimit = Math.abs(this._quadrantSegments)\n }\n if (quadSegs <= 0) \n this._quadrantSegments = 1\n \n if (this._joinStyle !== BufferParameters.JOIN_ROUND) \n this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n \n }\n getJoinStyle() {\n return this._joinStyle\n }\n setJoinStyle(joinStyle) {\n this._joinStyle = joinStyle\n }\n setSimplifyFactor(simplifyFactor) {\n this._simplifyFactor = simplifyFactor < 0 ? 0 : simplifyFactor\n }\n getSimplifyFactor() {\n return this._simplifyFactor\n }\n getQuadrantSegments() {\n return this._quadrantSegments\n }\n setEndCapStyle(endCapStyle) {\n this._endCapStyle = endCapStyle\n }\n getMitreLimit() {\n return this._mitreLimit\n }\n setMitreLimit(mitreLimit) {\n this._mitreLimit = mitreLimit\n }\n setSingleSided(isSingleSided) {\n this._isSingleSided = isSingleSided\n }\n}\nBufferParameters.CAP_ROUND = 1\nBufferParameters.CAP_FLAT = 2\nBufferParameters.CAP_SQUARE = 3\nBufferParameters.JOIN_ROUND = 1\nBufferParameters.JOIN_MITRE = 2\nBufferParameters.JOIN_BEVEL = 3\nBufferParameters.DEFAULT_QUADRANT_SEGMENTS = 8\nBufferParameters.DEFAULT_MITRE_LIMIT = 5.0\nBufferParameters.DEFAULT_SIMPLIFY_FACTOR = 0.01\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Location {\n static toLocationSymbol(locationValue) {\n switch (locationValue) {\n case Location.EXTERIOR:\n return 'e'\n case Location.BOUNDARY:\n return 'b'\n case Location.INTERIOR:\n return 'i'\n case Location.NONE:\n return '-'\n }\n throw new IllegalArgumentException('Unknown location value: ' + locationValue)\n }\n}\nLocation.INTERIOR = 0\nLocation.BOUNDARY = 1\nLocation.EXTERIOR = 2\nLocation.NONE = -1\n","export default class Position {\n static opposite(position) {\n if (position === Position.LEFT) return Position.RIGHT\n if (position === Position.RIGHT) return Position.LEFT\n return position\n }\n}\nPosition.ON = 0\nPosition.LEFT = 1\nPosition.RIGHT = 2\n","import Exception from '../lang/Exception.js'\n\nexport default class EmptyStackException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ EmptyStackException })[0]\n }\n}\n","import EmptyStackException from './EmptyStackException.js'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException.js'\nimport List from './List.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Stack.html\n */\nexport default class Stack extends List {\n constructor() {\n super()\n this.array = []\n }\n\n add(e) {\n this.array.push(e)\n return true\n }\n\n get(index) {\n if (index < 0 || index >= this.size())\n throw new IndexOutOfBoundsException()\n return this.array[index]\n }\n\n /**\n * Pushes an item onto the top of this stack.\n * @param {Object} e\n * @return {Object}\n */\n push(e) {\n this.array.push(e)\n return e\n }\n\n /**\n * Removes the object at the top of this stack and returns that object as the value of this function.\n * @return {Object}\n */\n pop() {\n if (this.array.length === 0)\n throw new EmptyStackException()\n return this.array.pop()\n }\n\n /**\n * Looks at the object at the top of this stack without removing it from the\n * stack.\n * @return {Object}\n */\n peek() {\n if (this.array.length === 0)\n throw new EmptyStackException()\n return this.array[this.array.length - 1]\n }\n\n /**\n * Tests if this stack is empty.\n * @return {boolean} true if and only if this stack contains no items; false\n * otherwise.\n */\n empty() {\n return this.array.length === 0\n }\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.empty()\n }\n\n /**\n * Returns the 1-based position where an object is on this stack. If the object\n * o occurs as an item in this stack, this method returns the distance from the\n * top of the stack of the occurrence nearest the top of the stack; the topmost\n * item on the stack is considered to be at distance 1. The equals method is\n * used to compare o to the items in this stack.\n *\n * NOTE: does not currently actually use equals. (=== is used)\n *\n * @param {Object} o\n * @return {number} the 1-based position from the top of the stack where the\n * object is located; the return value -1 indicates that the object is\n * not on the stack.\n */\n search(o) {\n return this.array.indexOf(o)\n }\n\n /**\n * @return {number}\n */\n size() {\n return this.array.length\n }\n\n /**\n * @return {Array}\n */\n toArray() {\n return this.array.slice()\n }\n}\n","import Position from '../../geomgraph/Position.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Assert from '../../util/Assert.js'\nexport default class RightmostEdgeFinder {\n constructor() {\n RightmostEdgeFinder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._minIndex = -1\n this._minCoord = null\n this._minDe = null\n this._orientedDe = null\n }\n getCoordinate() {\n return this._minCoord\n }\n getRightmostSide(de, index) {\n let side = this.getRightmostSideOfSegment(de, index)\n if (side < 0) side = this.getRightmostSideOfSegment(de, index - 1)\n if (side < 0) {\n this._minCoord = null\n this.checkForRightmostCoordinate(de)\n }\n return side\n }\n findRightmostEdgeAtVertex() {\n const pts = this._minDe.getEdge().getCoordinates()\n Assert.isTrue(this._minIndex > 0 && this._minIndex < pts.length, 'rightmost point expected to be interior vertex of edge')\n const pPrev = pts[this._minIndex - 1]\n const pNext = pts[this._minIndex + 1]\n const orientation = Orientation.index(this._minCoord, pNext, pPrev)\n let usePrev = false\n if (pPrev.y < this._minCoord.y && pNext.y < this._minCoord.y && orientation === Orientation.COUNTERCLOCKWISE) \n usePrev = true\n else if (pPrev.y > this._minCoord.y && pNext.y > this._minCoord.y && orientation === Orientation.CLOCKWISE) \n usePrev = true\n \n if (usePrev) \n this._minIndex = this._minIndex - 1\n \n }\n getRightmostSideOfSegment(de, i) {\n const e = de.getEdge()\n const coord = e.getCoordinates()\n if (i < 0 || i + 1 >= coord.length) return -1\n if (coord[i].y === coord[i + 1].y) return -1\n let pos = Position.LEFT\n if (coord[i].y < coord[i + 1].y) pos = Position.RIGHT\n return pos\n }\n getEdge() {\n return this._orientedDe\n }\n checkForRightmostCoordinate(de) {\n const coord = de.getEdge().getCoordinates()\n for (let i = 0; i < coord.length - 1; i++) \n if (this._minCoord === null || coord[i].x > this._minCoord.x) {\n this._minDe = de\n this._minIndex = i\n this._minCoord = coord[i]\n }\n \n }\n findRightmostEdgeAtNode() {\n const node = this._minDe.getNode()\n const star = node.getEdges()\n this._minDe = star.getRightmostEdge()\n if (!this._minDe.isForward()) {\n this._minDe = this._minDe.getSym()\n this._minIndex = this._minDe.getEdge().getCoordinates().length - 1\n }\n }\n findEdge(dirEdgeList) {\n for (let i = dirEdgeList.iterator(); i.hasNext(); ) {\n const de = i.next()\n if (!de.isForward()) continue\n this.checkForRightmostCoordinate(de)\n }\n Assert.isTrue(this._minIndex !== 0 || this._minCoord.equals(this._minDe.getCoordinate()), 'inconsistency in rightmost processing')\n if (this._minIndex === 0) \n this.findRightmostEdgeAtNode()\n else \n this.findRightmostEdgeAtVertex()\n \n this._orientedDe = this._minDe\n const rightmostSide = this.getRightmostSide(this._minDe, this._minIndex)\n if (rightmostSide === Position.LEFT) \n this._orientedDe = this._minDe.getSym()\n \n }\n}\n","import Coordinate from './Coordinate.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\n\nexport default class TopologyException extends RuntimeException {\n constructor(msg, pt) {\n super(pt ? msg + ' [ ' + pt + ' ]' : msg)\n this.pt = pt ? new Coordinate(pt) : undefined\n this.name = Object.keys({ TopologyException })[0]\n }\n getCoordinate() {\n return this.pt\n }\n}\n","export default class LinkedList {\n constructor() {\n this.array = []\n }\n\n addLast(e) {\n this.array.push(e)\n }\n\n removeFirst() {\n return this.array.shift()\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n}\n","import HashSet from '../../../../../java/util/HashSet.js'\nimport Position from '../../geomgraph/Position.js'\nimport Stack from '../../../../../java/util/Stack.js'\nimport RightmostEdgeFinder from './RightmostEdgeFinder.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport LinkedList from '../../../../../java/util/LinkedList.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class BufferSubgraph {\n constructor() {\n BufferSubgraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._finder = null\n this._dirEdgeList = new ArrayList()\n this._nodes = new ArrayList()\n this._rightMostCoord = null\n this._env = null\n this._finder = new RightmostEdgeFinder()\n }\n clearVisitedEdges() {\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const de = it.next()\n de.setVisited(false)\n }\n }\n getRightmostCoordinate() {\n return this._rightMostCoord\n }\n computeNodeDepth(n) {\n let startEdge = null\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n if (de.isVisited() || de.getSym().isVisited()) {\n startEdge = de\n break\n }\n }\n if (startEdge === null) throw new TopologyException('unable to find edge to compute depths at ' + n.getCoordinate())\n n.getEdges().computeDepths(startEdge)\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n de.setVisited(true)\n this.copySymDepths(de)\n }\n }\n computeDepth(outsideDepth) {\n this.clearVisitedEdges()\n const de = this._finder.getEdge()\n const n = de.getNode()\n const label = de.getLabel()\n de.setEdgeDepths(Position.RIGHT, outsideDepth)\n this.copySymDepths(de)\n this.computeDepths(de)\n }\n create(node) {\n this.addReachable(node)\n this._finder.findEdge(this._dirEdgeList)\n this._rightMostCoord = this._finder.getCoordinate()\n }\n findResultEdges() {\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getDepth(Position.RIGHT) >= 1 && de.getDepth(Position.LEFT) <= 0 && !de.isInteriorAreaEdge()) \n de.setInResult(true)\n \n }\n }\n computeDepths(startEdge) {\n const nodesVisited = new HashSet()\n const nodeQueue = new LinkedList()\n const startNode = startEdge.getNode()\n nodeQueue.addLast(startNode)\n nodesVisited.add(startNode)\n startEdge.setVisited(true)\n while (!nodeQueue.isEmpty()) {\n const n = nodeQueue.removeFirst()\n nodesVisited.add(n)\n this.computeNodeDepth(n)\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n const sym = de.getSym()\n if (sym.isVisited()) continue\n const adjNode = sym.getNode()\n if (!nodesVisited.contains(adjNode)) {\n nodeQueue.addLast(adjNode)\n nodesVisited.add(adjNode)\n }\n }\n }\n }\n compareTo(o) {\n const graph = o\n if (this._rightMostCoord.x < graph._rightMostCoord.x) \n return -1\n \n if (this._rightMostCoord.x > graph._rightMostCoord.x) \n return 1\n \n return 0\n }\n getEnvelope() {\n if (this._env === null) {\n const edgeEnv = new Envelope()\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const dirEdge = it.next()\n const pts = dirEdge.getEdge().getCoordinates()\n for (let i = 0; i < pts.length - 1; i++) \n edgeEnv.expandToInclude(pts[i])\n \n }\n this._env = edgeEnv\n }\n return this._env\n }\n addReachable(startNode) {\n const nodeStack = new Stack()\n nodeStack.add(startNode)\n while (!nodeStack.empty()) {\n const node = nodeStack.pop()\n this.add(node, nodeStack)\n }\n }\n copySymDepths(de) {\n const sym = de.getSym()\n sym.setDepth(Position.LEFT, de.getDepth(Position.RIGHT))\n sym.setDepth(Position.RIGHT, de.getDepth(Position.LEFT))\n }\n add(node, nodeStack) {\n node.setVisited(true)\n this._nodes.add(node)\n for (let i = node.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n this._dirEdgeList.add(de)\n const sym = de.getSym()\n const symNode = sym.getNode()\n if (!symNode.isVisited()) nodeStack.push(symNode)\n }\n }\n getNodes() {\n return this._nodes\n }\n getDirectedEdges() {\n return this._dirEdgeList\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import Location from '../geom/Location.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Orientation from './Orientation.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class RayCrossingCounter {\n constructor() {\n RayCrossingCounter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._p = null\n this._crossingCount = 0\n this._isPointOnSegment = false\n const p = arguments[0]\n this._p = p\n }\n static locatePointInRing() {\n if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n const p = arguments[0], ring = arguments[1]\n const counter = new RayCrossingCounter(p)\n const p1 = new Coordinate()\n const p2 = new Coordinate()\n for (let i = 1; i < ring.size(); i++) {\n ring.getCoordinate(i, p1)\n ring.getCoordinate(i - 1, p2)\n counter.countSegment(p1, p2)\n if (counter.isOnSegment()) return counter.getLocation()\n }\n return counter.getLocation()\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n const p = arguments[0], ring = arguments[1]\n const counter = new RayCrossingCounter(p)\n for (let i = 1; i < ring.length; i++) {\n const p1 = ring[i]\n const p2 = ring[i - 1]\n counter.countSegment(p1, p2)\n if (counter.isOnSegment()) return counter.getLocation()\n }\n return counter.getLocation()\n }\n }\n countSegment(p1, p2) {\n if (p1.x < this._p.x && p2.x < this._p.x) return null\n if (this._p.x === p2.x && this._p.y === p2.y) {\n this._isPointOnSegment = true\n return null\n }\n if (p1.y === this._p.y && p2.y === this._p.y) {\n let minx = p1.x\n let maxx = p2.x\n if (minx > maxx) {\n minx = p2.x\n maxx = p1.x\n }\n if (this._p.x >= minx && this._p.x <= maxx) \n this._isPointOnSegment = true\n \n return null\n }\n if (p1.y > this._p.y && p2.y <= this._p.y || p2.y > this._p.y && p1.y <= this._p.y) {\n let orient = Orientation.index(p1, p2, this._p)\n if (orient === Orientation.COLLINEAR) {\n this._isPointOnSegment = true\n return null\n }\n if (p2.y < p1.y) \n orient = -orient\n \n if (orient === Orientation.LEFT) \n this._crossingCount++\n \n }\n }\n isPointInPolygon() {\n return this.getLocation() !== Location.EXTERIOR\n }\n getLocation() {\n if (this._isPointOnSegment) return Location.BOUNDARY\n if (this._crossingCount % 2 === 1) \n return Location.INTERIOR\n \n return Location.EXTERIOR\n }\n isOnSegment() {\n return this._isPointOnSegment\n }\n}\n","import Location from '../geom/Location.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nimport RobustLineIntersector from './RobustLineIntersector.js'\nimport RayCrossingCounter from './RayCrossingCounter.js'\nexport default class PointLocation {\n static isOnLine() {\n if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n const p = arguments[0], line = arguments[1]\n const lineIntersector = new RobustLineIntersector()\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n const n = line.size()\n for (let i = 1; i < n; i++) {\n line.getCoordinate(i - 1, p0)\n line.getCoordinate(i, p1)\n lineIntersector.computeIntersection(p, p0, p1)\n if (lineIntersector.hasIntersection()) \n return true\n \n }\n return false\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n const p = arguments[0], line = arguments[1]\n const lineIntersector = new RobustLineIntersector()\n for (let i = 1; i < line.length; i++) {\n const p0 = line[i - 1]\n const p1 = line[i]\n lineIntersector.computeIntersection(p, p0, p1)\n if (lineIntersector.hasIntersection()) \n return true\n \n }\n return false\n }\n }\n static locateInRing(p, ring) {\n return RayCrossingCounter.locatePointInRing(p, ring)\n }\n static isInRing(p, ring) {\n return PointLocation.locateInRing(p, ring) !== Location.EXTERIOR\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nexport default class TopologyLocation {\n constructor() {\n TopologyLocation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.location = null\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const location = arguments[0]\n this.init(location.length)\n } else if (Number.isInteger(arguments[0])) {\n const on = arguments[0]\n this.init(1)\n this.location[Position.ON] = on\n } else if (arguments[0] instanceof TopologyLocation) {\n const gl = arguments[0]\n this.init(gl.location.length)\n if (gl !== null) \n for (let i = 0; i < this.location.length; i++) \n this.location[i] = gl.location[i]\n \n \n }\n } else if (arguments.length === 3) {\n const on = arguments[0], left = arguments[1], right = arguments[2]\n this.init(3)\n this.location[Position.ON] = on\n this.location[Position.LEFT] = left\n this.location[Position.RIGHT] = right\n }\n }\n setAllLocations(locValue) {\n for (let i = 0; i < this.location.length; i++) \n this.location[i] = locValue\n \n }\n isNull() {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] !== Location.NONE) return false\n \n return true\n }\n setAllLocationsIfNull(locValue) {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE) this.location[i] = locValue\n \n }\n isLine() {\n return this.location.length === 1\n }\n merge(gl) {\n if (gl.location.length > this.location.length) {\n const newLoc = new Array(3).fill(null)\n newLoc[Position.ON] = this.location[Position.ON]\n newLoc[Position.LEFT] = Location.NONE\n newLoc[Position.RIGHT] = Location.NONE\n this.location = newLoc\n }\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE && i < gl.location.length) this.location[i] = gl.location[i]\n \n }\n getLocations() {\n return this.location\n }\n flip() {\n if (this.location.length <= 1) return null\n const temp = this.location[Position.LEFT]\n this.location[Position.LEFT] = this.location[Position.RIGHT]\n this.location[Position.RIGHT] = temp\n }\n toString() {\n const buf = new StringBuffer()\n if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.LEFT]))\n buf.append(Location.toLocationSymbol(this.location[Position.ON]))\n if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.RIGHT]))\n return buf.toString()\n }\n setLocations(on, left, right) {\n this.location[Position.ON] = on\n this.location[Position.LEFT] = left\n this.location[Position.RIGHT] = right\n }\n get(posIndex) {\n if (posIndex < this.location.length) return this.location[posIndex]\n return Location.NONE\n }\n isArea() {\n return this.location.length > 1\n }\n isAnyNull() {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE) return true\n \n return false\n }\n setLocation() {\n if (arguments.length === 1) {\n const locValue = arguments[0]\n this.setLocation(Position.ON, locValue)\n } else if (arguments.length === 2) {\n const locIndex = arguments[0], locValue = arguments[1]\n this.location[locIndex] = locValue\n }\n }\n init(size) {\n this.location = new Array(size).fill(null)\n this.setAllLocations(Location.NONE)\n }\n isEqualOnSide(le, locIndex) {\n return this.location[locIndex] === le.location[locIndex]\n }\n allPositionsEqual(loc) {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] !== loc) return false\n \n return true\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyLocation from './TopologyLocation.js'\nexport default class Label {\n constructor() {\n Label.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.elt = new Array(2).fill(null)\n if (arguments.length === 1) {\n if (Number.isInteger(arguments[0])) {\n const onLoc = arguments[0]\n this.elt[0] = new TopologyLocation(onLoc)\n this.elt[1] = new TopologyLocation(onLoc)\n } else if (arguments[0] instanceof Label) {\n const lbl = arguments[0]\n this.elt[0] = new TopologyLocation(lbl.elt[0])\n this.elt[1] = new TopologyLocation(lbl.elt[1])\n }\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], onLoc = arguments[1]\n this.elt[0] = new TopologyLocation(Location.NONE)\n this.elt[1] = new TopologyLocation(Location.NONE)\n this.elt[geomIndex].setLocation(onLoc)\n } else if (arguments.length === 3) {\n const onLoc = arguments[0], leftLoc = arguments[1], rightLoc = arguments[2]\n this.elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n this.elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n } else if (arguments.length === 4) {\n const geomIndex = arguments[0], onLoc = arguments[1], leftLoc = arguments[2], rightLoc = arguments[3]\n this.elt[0] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n this.elt[1] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n this.elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc)\n }\n }\n static toLineLabel(label) {\n const lineLabel = new Label(Location.NONE)\n for (let i = 0; i < 2; i++) \n lineLabel.setLocation(i, label.getLocation(i))\n \n return lineLabel\n }\n getGeometryCount() {\n let count = 0\n if (!this.elt[0].isNull()) count++\n if (!this.elt[1].isNull()) count++\n return count\n }\n setAllLocations(geomIndex, location) {\n this.elt[geomIndex].setAllLocations(location)\n }\n isNull(geomIndex) {\n return this.elt[geomIndex].isNull()\n }\n setAllLocationsIfNull() {\n if (arguments.length === 1) {\n const location = arguments[0]\n this.setAllLocationsIfNull(0, location)\n this.setAllLocationsIfNull(1, location)\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], location = arguments[1]\n this.elt[geomIndex].setAllLocationsIfNull(location)\n }\n }\n isLine(geomIndex) {\n return this.elt[geomIndex].isLine()\n }\n merge(lbl) {\n for (let i = 0; i < 2; i++) \n if (this.elt[i] === null && lbl.elt[i] !== null) \n this.elt[i] = new TopologyLocation(lbl.elt[i])\n else \n this.elt[i].merge(lbl.elt[i])\n \n \n }\n flip() {\n this.elt[0].flip()\n this.elt[1].flip()\n }\n getLocation() {\n if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this.elt[geomIndex].get(Position.ON)\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], posIndex = arguments[1]\n return this.elt[geomIndex].get(posIndex)\n }\n }\n toString() {\n const buf = new StringBuffer()\n if (this.elt[0] !== null) {\n buf.append('A:')\n buf.append(this.elt[0].toString())\n }\n if (this.elt[1] !== null) {\n buf.append(' B:')\n buf.append(this.elt[1].toString())\n }\n return buf.toString()\n }\n isArea() {\n if (arguments.length === 0) {\n return this.elt[0].isArea() || this.elt[1].isArea()\n } else if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this.elt[geomIndex].isArea()\n }\n }\n isAnyNull(geomIndex) {\n return this.elt[geomIndex].isAnyNull()\n }\n setLocation() {\n if (arguments.length === 2) {\n const geomIndex = arguments[0], location = arguments[1]\n this.elt[geomIndex].setLocation(Position.ON, location)\n } else if (arguments.length === 3) {\n const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n this.elt[geomIndex].setLocation(posIndex, location)\n }\n }\n isEqualOnSide(lbl, side) {\n return this.elt[0].isEqualOnSide(lbl.elt[0], side) && this.elt[1].isEqualOnSide(lbl.elt[1], side)\n }\n allPositionsEqual(geomIndex, loc) {\n return this.elt[geomIndex].allPositionsEqual(loc)\n }\n toLine(geomIndex) {\n if (this.elt[geomIndex].isArea()) this.elt[geomIndex] = new TopologyLocation(this.elt[geomIndex].location[0])\n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport PointLocation from '../algorithm/PointLocation.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport Label from './Label.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Assert from '../util/Assert.js'\nexport default class EdgeRing {\n constructor() {\n EdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._startDe = null\n this._maxNodeDegree = -1\n this._edges = new ArrayList()\n this._pts = new ArrayList()\n this._label = new Label(Location.NONE)\n this._ring = null\n this._isHole = null\n this._shell = null\n this._holes = new ArrayList()\n this._geometryFactory = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n const start = arguments[0], geometryFactory = arguments[1]\n this._geometryFactory = geometryFactory\n this.computePoints(start)\n this.computeRing()\n }\n }\n computeRing() {\n if (this._ring !== null) return null\n const coord = new Array(this._pts.size()).fill(null)\n for (let i = 0; i < this._pts.size(); i++) \n coord[i] = this._pts.get(i)\n \n this._ring = this._geometryFactory.createLinearRing(coord)\n this._isHole = Orientation.isCCW(this._ring.getCoordinates())\n }\n isIsolated() {\n return this._label.getGeometryCount() === 1\n }\n computePoints(start) {\n this._startDe = start\n let de = start\n let isFirstEdge = true\n do {\n if (de === null) throw new TopologyException('Found null DirectedEdge')\n if (de.getEdgeRing() === this) throw new TopologyException('Directed Edge visited twice during ring-building at ' + de.getCoordinate())\n this._edges.add(de)\n const label = de.getLabel()\n Assert.isTrue(label.isArea())\n this.mergeLabel(label)\n this.addPoints(de.getEdge(), de.isForward(), isFirstEdge)\n isFirstEdge = false\n this.setEdgeRing(de, this)\n de = this.getNext(de)\n } while (de !== this._startDe)\n }\n getLinearRing() {\n return this._ring\n }\n getCoordinate(i) {\n return this._pts.get(i)\n }\n computeMaxNodeDegree() {\n this._maxNodeDegree = 0\n let de = this._startDe\n do {\n const node = de.getNode()\n const degree = node.getEdges().getOutgoingDegree(this)\n if (degree > this._maxNodeDegree) this._maxNodeDegree = degree\n de = this.getNext(de)\n } while (de !== this._startDe)\n this._maxNodeDegree *= 2\n }\n addPoints(edge, isForward, isFirstEdge) {\n const edgePts = edge.getCoordinates()\n if (isForward) {\n let startIndex = 1\n if (isFirstEdge) startIndex = 0\n for (let i = startIndex; i < edgePts.length; i++) \n this._pts.add(edgePts[i])\n \n } else {\n let startIndex = edgePts.length - 2\n if (isFirstEdge) startIndex = edgePts.length - 1\n for (let i = startIndex; i >= 0; i--) \n this._pts.add(edgePts[i])\n \n }\n }\n isHole() {\n return this._isHole\n }\n setInResult() {\n let de = this._startDe\n do {\n de.getEdge().setInResult(true)\n de = de.getNext()\n } while (de !== this._startDe)\n }\n containsPoint(p) {\n const shell = this.getLinearRing()\n const env = shell.getEnvelopeInternal()\n if (!env.contains(p)) return false\n if (!PointLocation.isInRing(p, shell.getCoordinates())) return false\n for (let i = this._holes.iterator(); i.hasNext(); ) {\n const hole = i.next()\n if (hole.containsPoint(p)) return false\n }\n return true\n }\n addHole(ring) {\n this._holes.add(ring)\n }\n isShell() {\n return this._shell === null\n }\n getLabel() {\n return this._label\n }\n getEdges() {\n return this._edges\n }\n getMaxNodeDegree() {\n if (this._maxNodeDegree < 0) this.computeMaxNodeDegree()\n return this._maxNodeDegree\n }\n getShell() {\n return this._shell\n }\n mergeLabel() {\n if (arguments.length === 1) {\n const deLabel = arguments[0]\n this.mergeLabel(deLabel, 0)\n this.mergeLabel(deLabel, 1)\n } else if (arguments.length === 2) {\n const deLabel = arguments[0], geomIndex = arguments[1]\n const loc = deLabel.getLocation(geomIndex, Position.RIGHT)\n if (loc === Location.NONE) return null\n if (this._label.getLocation(geomIndex) === Location.NONE) {\n this._label.setLocation(geomIndex, loc)\n return null\n }\n }\n }\n setShell(shell) {\n this._shell = shell\n if (shell !== null) shell.addHole(this)\n }\n toPolygon(geometryFactory) {\n const holeLR = new Array(this._holes.size()).fill(null)\n for (let i = 0; i < this._holes.size(); i++) \n holeLR[i] = this._holes.get(i).getLinearRing()\n \n const poly = geometryFactory.createPolygon(this.getLinearRing(), holeLR)\n return poly\n }\n}\n","import EdgeRing from '../../geomgraph/EdgeRing.js'\nexport default class MinimalEdgeRing extends EdgeRing {\n constructor() {\n super()\n MinimalEdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const start = arguments[0], geometryFactory = arguments[1]\n EdgeRing.constructor_.call(this, start, geometryFactory)\n }\n setEdgeRing(de, er) {\n de.setMinEdgeRing(er)\n }\n getNext(de) {\n return de.getNextMin()\n }\n}\n","import MinimalEdgeRing from './MinimalEdgeRing.js'\nimport EdgeRing from '../../geomgraph/EdgeRing.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class MaximalEdgeRing extends EdgeRing {\n constructor() {\n super()\n MaximalEdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const start = arguments[0], geometryFactory = arguments[1]\n EdgeRing.constructor_.call(this, start, geometryFactory)\n }\n buildMinimalRings() {\n const minEdgeRings = new ArrayList()\n let de = this._startDe\n do {\n if (de.getMinEdgeRing() === null) {\n const minEr = new MinimalEdgeRing(de, this._geometryFactory)\n minEdgeRings.add(minEr)\n }\n de = de.getNext()\n } while (de !== this._startDe)\n return minEdgeRings\n }\n setEdgeRing(de, er) {\n de.setEdgeRing(er)\n }\n linkDirectedEdgesForMinimalEdgeRings() {\n let de = this._startDe\n do {\n const node = de.getNode()\n node.getEdges().linkMinimalDirectedEdges(this)\n de = de.getNext()\n } while (de !== this._startDe)\n }\n getNext(de) {\n return de.getNext()\n }\n}\n","import Assert from '../util/Assert.js'\nexport default class GraphComponent {\n constructor() {\n GraphComponent.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._label = null\n this._isInResult = false\n this._isCovered = false\n this._isCoveredSet = false\n this._isVisited = false\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const label = arguments[0]\n this._label = label\n }\n }\n setVisited(isVisited) {\n this._isVisited = isVisited\n }\n setInResult(isInResult) {\n this._isInResult = isInResult\n }\n isCovered() {\n return this._isCovered\n }\n isCoveredSet() {\n return this._isCoveredSet\n }\n setLabel(label) {\n this._label = label\n }\n getLabel() {\n return this._label\n }\n setCovered(isCovered) {\n this._isCovered = isCovered\n this._isCoveredSet = true\n }\n updateIM(im) {\n Assert.isTrue(this._label.getGeometryCount() >= 2, 'found partial label')\n this.computeIM(im)\n }\n isInResult() {\n return this._isInResult\n }\n isVisited() {\n return this._isVisited\n }\n}\n","import Location from '../geom/Location.js'\nimport Label from './Label.js'\nimport GraphComponent from './GraphComponent.js'\nexport default class Node extends GraphComponent {\n constructor() {\n super()\n Node.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._coord = null\n this._edges = null\n const coord = arguments[0], edges = arguments[1]\n this._coord = coord\n this._edges = edges\n this._label = new Label(0, Location.NONE)\n }\n isIncidentEdgeInResult() {\n for (let it = this.getEdges().getEdges().iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getEdge().isInResult()) return true\n }\n return false\n }\n isIsolated() {\n return this._label.getGeometryCount() === 1\n }\n getCoordinate() {\n return this._coord\n }\n print(out) {\n out.println('node ' + this._coord + ' lbl: ' + this._label)\n }\n computeIM(im) {}\n computeMergedLocation(label2, eltIndex) {\n let loc = Location.NONE\n loc = this._label.getLocation(eltIndex)\n if (!label2.isNull(eltIndex)) {\n const nLoc = label2.getLocation(eltIndex)\n if (loc !== Location.BOUNDARY) loc = nLoc\n }\n return loc\n }\n setLabel() {\n if (arguments.length === 2 && (Number.isInteger(arguments[1]) && Number.isInteger(arguments[0]))) {\n const argIndex = arguments[0], onLocation = arguments[1]\n if (this._label === null) \n this._label = new Label(argIndex, onLocation)\n else this._label.setLocation(argIndex, onLocation)\n } else {\n return super.setLabel.apply(this, arguments)\n }\n }\n getEdges() {\n return this._edges\n }\n mergeLabel() {\n if (arguments[0] instanceof Node) {\n const n = arguments[0]\n this.mergeLabel(n._label)\n } else if (arguments[0] instanceof Label) {\n const label2 = arguments[0]\n for (let i = 0; i < 2; i++) {\n const loc = this.computeMergedLocation(label2, i)\n const thisLoc = this._label.getLocation(i)\n if (thisLoc === Location.NONE) this._label.setLocation(i, loc)\n }\n }\n }\n add(e) {\n this._edges.insert(e)\n e.setNode(this)\n }\n setLabelBoundary(argIndex) {\n if (this._label === null) return null\n let loc = Location.NONE\n if (this._label !== null) loc = this._label.getLocation(argIndex)\n let newLoc = null\n switch (loc) {\n case Location.BOUNDARY:\n newLoc = Location.INTERIOR\n break\n case Location.INTERIOR:\n newLoc = Location.BOUNDARY\n break\n default:\n newLoc = Location.BOUNDARY\n break\n }\n this._label.setLocation(argIndex, newLoc)\n }\n}\n","import Map from './Map.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedMap.html\n */\nexport default class SortedMap extends Map {}\n","import ArrayList from './ArrayList.js'\nimport SortedMap from './SortedMap.js'\nimport HashSet from './HashSet.js'\n\nconst BLACK = 0\nconst RED = 1\n\nfunction colorOf(p) {\n return (p == null ? BLACK : p.color)\n}\nfunction parentOf(p) {\n return (p == null ? null : p.parent)\n}\nfunction setColor(p, c) {\n if (p !== null) p.color = c\n}\nfunction leftOf(p) {\n return (p == null ? null : p.left)\n}\nfunction rightOf(p) {\n return (p == null ? null : p.right)\n}\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeMap.html\n */\nexport default class TreeMap extends SortedMap {\n constructor() {\n super()\n this.root_ = null\n this.size_ = 0\n }\n\n get(key) {\n let p = this.root_\n while (p !== null) {\n const cmp = key.compareTo(p.key)\n if (cmp < 0)\n p = p.left\n else if (cmp > 0)\n p = p.right\n else return p.value\n }\n return null\n }\n\n put(key, value) {\n if (this.root_ === null) {\n this.root_ = {\n key: key,\n value: value,\n left: null,\n right: null,\n parent: null,\n color: BLACK,\n getValue() {\n return this.value\n },\n getKey() {\n return this.key\n }\n }\n this.size_ = 1\n return null\n }\n let t = this.root_; let parent; let cmp\n do {\n parent = t\n cmp = key.compareTo(t.key)\n if (cmp < 0) {\n t = t.left\n } else if (cmp > 0) {\n t = t.right\n } else {\n const oldValue = t.value\n t.value = value\n return oldValue\n }\n } while (t !== null)\n const e = {\n key: key,\n left: null,\n right: null,\n value: value,\n parent: parent,\n color: BLACK,\n getValue() {\n return this.value\n },\n getKey() {\n return this.key\n }\n }\n if (cmp < 0)\n parent.left = e\n else parent.right = e\n\n this.fixAfterInsertion(e)\n this.size_++\n return null\n }\n\n /**\n * @param {Object} x\n */\n fixAfterInsertion(x) {\n let y\n x.color = RED\n while (x != null && x !== this.root_ && x.parent.color === RED)\n if (parentOf(x) === leftOf(parentOf(parentOf(x)))) {\n y = rightOf(parentOf(parentOf(x)))\n if (colorOf(y) === RED) {\n setColor(parentOf(x), BLACK)\n setColor(y, BLACK)\n setColor(parentOf(parentOf(x)), RED)\n x = parentOf(parentOf(x))\n } else {\n if (x === rightOf(parentOf(x))) {\n x = parentOf(x)\n this.rotateLeft(x)\n }\n setColor(parentOf(x), BLACK)\n setColor(parentOf(parentOf(x)), RED)\n this.rotateRight(parentOf(parentOf(x)))\n }\n } else {\n y = leftOf(parentOf(parentOf(x)))\n if (colorOf(y) === RED) {\n setColor(parentOf(x), BLACK)\n setColor(y, BLACK)\n setColor(parentOf(parentOf(x)), RED)\n x = parentOf(parentOf(x))\n } else {\n if (x === leftOf(parentOf(x))) {\n x = parentOf(x)\n this.rotateRight(x)\n }\n setColor(parentOf(x), BLACK)\n setColor(parentOf(parentOf(x)), RED)\n this.rotateLeft(parentOf(parentOf(x)))\n }\n }\n\n this.root_.color = BLACK\n }\n\n values() {\n const arrayList = new ArrayList()\n let p = this.getFirstEntry()\n if (p !== null) {\n arrayList.add(p.value)\n while ((p = TreeMap.successor(p)) !== null)\n arrayList.add(p.value)\n }\n return arrayList\n }\n\n entrySet() {\n const hashSet = new HashSet()\n let p = this.getFirstEntry()\n if (p !== null) {\n hashSet.add(p)\n while ((p = TreeMap.successor(p)) !== null)\n hashSet.add(p)\n }\n return hashSet\n }\n\n /**\n * @param {Object} p\n */\n rotateLeft(p) {\n if (p != null) {\n const r = p.right\n p.right = r.left\n if (r.left != null)\n r.left.parent = p\n r.parent = p.parent\n if (p.parent == null)\n this.root_ = r\n else if (p.parent.left === p)\n p.parent.left = r\n else\n p.parent.right = r\n r.left = p\n p.parent = r\n }\n }\n\n /**\n * @param {Object} p\n */\n rotateRight(p) {\n if (p != null) {\n const l = p.left\n p.left = l.right\n if (l.right != null)\n l.right.parent = p\n l.parent = p.parent\n if (p.parent == null)\n this.root_ = l\n else if (p.parent.right === p)\n p.parent.right = l\n else\n p.parent.left = l\n l.right = p\n p.parent = l\n }\n }\n\n /**\n * @return {Object}\n */\n getFirstEntry() {\n let p = this.root_\n if (p != null)\n while (p.left != null) p = p.left\n return p\n }\n\n /**\n * @param {Object} t\n * @return {Object}\n * @private\n */\n static successor(t) {\n let p\n if (t === null) {\n return null\n } else if (t.right !== null) {\n p = t.right\n while (p.left !== null)\n p = p.left\n return p\n } else {\n p = t.parent\n let ch = t\n while (p !== null && ch === p.right) {\n ch = p\n p = p.parent\n }\n return p\n }\n }\n\n size() {\n return this.size_\n }\n\n containsKey(key) {\n let p = this.root_\n while (p !== null) {\n const cmp = key.compareTo(p.key)\n if (cmp < 0)\n p = p.left\n else if (cmp > 0)\n p = p.right\n else return true\n }\n return false\n }\n}\n","import Location from '../geom/Location.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Node from './Node.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class NodeMap {\n constructor() {\n NodeMap.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.nodeMap = new TreeMap()\n this.nodeFact = null\n const nodeFact = arguments[0]\n this.nodeFact = nodeFact\n }\n find(coord) {\n return this.nodeMap.get(coord)\n }\n addNode() {\n if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n let node = this.nodeMap.get(coord)\n if (node === null) {\n node = this.nodeFact.createNode(coord)\n this.nodeMap.put(coord, node)\n }\n return node\n } else if (arguments[0] instanceof Node) {\n const n = arguments[0]\n const node = this.nodeMap.get(n.getCoordinate())\n if (node === null) {\n this.nodeMap.put(n.getCoordinate(), n)\n return n\n }\n node.mergeLabel(n)\n return node\n }\n }\n print(out) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const n = it.next()\n n.print(out)\n }\n }\n iterator() {\n return this.nodeMap.values().iterator()\n }\n values() {\n return this.nodeMap.values()\n }\n getBoundaryNodes(geomIndex) {\n const bdyNodes = new ArrayList()\n for (let i = this.iterator(); i.hasNext(); ) {\n const node = i.next()\n if (node.getLabel().getLocation(geomIndex) === Location.BOUNDARY) bdyNodes.add(node)\n }\n return bdyNodes\n }\n add(e) {\n const p = e.getCoordinate()\n const n = this.addNode(p)\n n.add(e)\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Quadrant {\n static isNorthern(quad) {\n return quad === Quadrant.NE || quad === Quadrant.NW\n }\n static isOpposite(quad1, quad2) {\n if (quad1 === quad2) return false\n const diff = (quad1 - quad2 + 4) % 4\n if (diff === 2) return true\n return false\n }\n static commonHalfPlane(quad1, quad2) {\n if (quad1 === quad2) return quad1\n const diff = (quad1 - quad2 + 4) % 4\n if (diff === 2) return -1\n const min = quad1 < quad2 ? quad1 : quad2\n const max = quad1 > quad2 ? quad1 : quad2\n if (min === 0 && max === 3) return 3\n return min\n }\n static isInHalfPlane(quad, halfPlane) {\n if (halfPlane === Quadrant.SE) \n return quad === Quadrant.SE || quad === Quadrant.SW\n \n return quad === halfPlane || quad === halfPlane + 1\n }\n static quadrant() {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const dx = arguments[0], dy = arguments[1]\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the quadrant for point ( ' + dx + ', ' + dy + ' )')\n if (dx >= 0.0) \n if (dy >= 0.0) return Quadrant.NE; else return Quadrant.SE\n else \n if (dy >= 0.0) return Quadrant.NW; else return Quadrant.SW\n \n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p0 = arguments[0], p1 = arguments[1]\n if (p1.x === p0.x && p1.y === p0.y) throw new IllegalArgumentException('Cannot compute the quadrant for two identical points ' + p0)\n if (p1.x >= p0.x) \n if (p1.y >= p0.y) return Quadrant.NE; else return Quadrant.SE\n else \n if (p1.y >= p0.y) return Quadrant.NW; else return Quadrant.SW\n \n }\n }\n}\nQuadrant.NE = 0\nQuadrant.NW = 1\nQuadrant.SW = 2\nQuadrant.SE = 3\n","import Orientation from '../algorithm/Orientation.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Quadrant from './Quadrant.js'\nimport Assert from '../util/Assert.js'\nexport default class EdgeEnd {\n constructor() {\n EdgeEnd.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edge = null\n this._label = null\n this._node = null\n this._p0 = null\n this._p1 = null\n this._dx = null\n this._dy = null\n this._quadrant = null\n if (arguments.length === 1) {\n const edge = arguments[0]\n this._edge = edge\n } else if (arguments.length === 3) {\n const edge = arguments[0], p0 = arguments[1], p1 = arguments[2]\n EdgeEnd.constructor_.call(this, edge, p0, p1, null)\n } else if (arguments.length === 4) {\n const edge = arguments[0], p0 = arguments[1], p1 = arguments[2], label = arguments[3]\n EdgeEnd.constructor_.call(this, edge)\n this.init(p0, p1)\n this._label = label\n }\n }\n compareDirection(e) {\n if (this._dx === e._dx && this._dy === e._dy) return 0\n if (this._quadrant > e._quadrant) return 1\n if (this._quadrant < e._quadrant) return -1\n return Orientation.index(e._p0, e._p1, this._p1)\n }\n getDy() {\n return this._dy\n }\n getCoordinate() {\n return this._p0\n }\n setNode(node) {\n this._node = node\n }\n print(out) {\n const angle = Math.atan2(this._dy, this._dx)\n const className = this.getClass().getName()\n const lastDotPos = className.lastIndexOf('.')\n const name = className.substring(lastDotPos + 1)\n out.print(' ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + ' ' + this._label)\n }\n compareTo(obj) {\n const e = obj\n return this.compareDirection(e)\n }\n getDirectedCoordinate() {\n return this._p1\n }\n getDx() {\n return this._dx\n }\n getLabel() {\n return this._label\n }\n getEdge() {\n return this._edge\n }\n getQuadrant() {\n return this._quadrant\n }\n getNode() {\n return this._node\n }\n toString() {\n const angle = Math.atan2(this._dy, this._dx)\n const className = this.getClass().getName()\n const lastDotPos = className.lastIndexOf('.')\n const name = className.substring(lastDotPos + 1)\n return ' ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + ' ' + this._label\n }\n computeLabel(boundaryNodeRule) {}\n init(p0, p1) {\n this._p0 = p0\n this._p1 = p1\n this._dx = p1.x - p0.x\n this._dy = p1.y - p0.y\n this._quadrant = Quadrant.quadrant(this._dx, this._dy)\n Assert.isTrue(!(this._dx === 0 && this._dy === 0), 'EdgeEnd with identical endpoints found')\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import Location from '../geom/Location.js'\nimport EdgeEnd from './EdgeEnd.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport Label from './Label.js'\nexport default class DirectedEdge extends EdgeEnd {\n constructor() {\n super()\n DirectedEdge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isForward = null\n this._isInResult = false\n this._isVisited = false\n this._sym = null\n this._next = null\n this._nextMin = null\n this._edgeRing = null\n this._minEdgeRing = null\n this._depth = [0, -999, -999]\n const edge = arguments[0], isForward = arguments[1]\n EdgeEnd.constructor_.call(this, edge)\n this._isForward = isForward\n if (isForward) {\n this.init(edge.getCoordinate(0), edge.getCoordinate(1))\n } else {\n const n = edge.getNumPoints() - 1\n this.init(edge.getCoordinate(n), edge.getCoordinate(n - 1))\n }\n this.computeDirectedLabel()\n }\n static depthFactor(currLocation, nextLocation) {\n if (currLocation === Location.EXTERIOR && nextLocation === Location.INTERIOR) return 1; else if (currLocation === Location.INTERIOR && nextLocation === Location.EXTERIOR) return -1\n return 0\n }\n getNextMin() {\n return this._nextMin\n }\n getDepth(position) {\n return this._depth[position]\n }\n setVisited(isVisited) {\n this._isVisited = isVisited\n }\n computeDirectedLabel() {\n this._label = new Label(this._edge.getLabel())\n if (!this._isForward) this._label.flip()\n }\n getNext() {\n return this._next\n }\n setDepth(position, depthVal) {\n if (this._depth[position] !== -999) \n if (this._depth[position] !== depthVal) throw new TopologyException('assigned depths do not match', this.getCoordinate())\n \n this._depth[position] = depthVal\n }\n isInteriorAreaEdge() {\n let isInteriorAreaEdge = true\n for (let i = 0; i < 2; i++) \n if (!(this._label.isArea(i) && this._label.getLocation(i, Position.LEFT) === Location.INTERIOR && this._label.getLocation(i, Position.RIGHT) === Location.INTERIOR)) \n isInteriorAreaEdge = false\n \n \n return isInteriorAreaEdge\n }\n setNextMin(nextMin) {\n this._nextMin = nextMin\n }\n print(out) {\n super.print.call(this, out)\n out.print(' ' + this._depth[Position.LEFT] + '/' + this._depth[Position.RIGHT])\n out.print(' (' + this.getDepthDelta() + ')')\n if (this._isInResult) out.print(' inResult')\n }\n setMinEdgeRing(minEdgeRing) {\n this._minEdgeRing = minEdgeRing\n }\n isLineEdge() {\n const isLine = this._label.isLine(0) || this._label.isLine(1)\n const isExteriorIfArea0 = !this._label.isArea(0) || this._label.allPositionsEqual(0, Location.EXTERIOR)\n const isExteriorIfArea1 = !this._label.isArea(1) || this._label.allPositionsEqual(1, Location.EXTERIOR)\n return isLine && isExteriorIfArea0 && isExteriorIfArea1\n }\n setEdgeRing(edgeRing) {\n this._edgeRing = edgeRing\n }\n getMinEdgeRing() {\n return this._minEdgeRing\n }\n getDepthDelta() {\n let depthDelta = this._edge.getDepthDelta()\n if (!this._isForward) depthDelta = -depthDelta\n return depthDelta\n }\n setInResult(isInResult) {\n this._isInResult = isInResult\n }\n getSym() {\n return this._sym\n }\n isForward() {\n return this._isForward\n }\n getEdge() {\n return this._edge\n }\n printEdge(out) {\n this.print(out)\n out.print(' ')\n if (this._isForward) this._edge.print(out); else this._edge.printReverse(out)\n }\n setSym(de) {\n this._sym = de\n }\n setVisitedEdge(isVisited) {\n this.setVisited(isVisited)\n this._sym.setVisited(isVisited)\n }\n setEdgeDepths(position, depth) {\n let depthDelta = this.getEdge().getDepthDelta()\n if (!this._isForward) depthDelta = -depthDelta\n let directionFactor = 1\n if (position === Position.LEFT) directionFactor = -1\n const oppositePos = Position.opposite(position)\n const delta = depthDelta * directionFactor\n const oppositeDepth = depth + delta\n this.setDepth(position, depth)\n this.setDepth(oppositePos, oppositeDepth)\n }\n getEdgeRing() {\n return this._edgeRing\n }\n isInResult() {\n return this._isInResult\n }\n setNext(next) {\n this._next = next\n }\n isVisited() {\n return this._isVisited\n }\n}\n","import Node from './Node.js'\nexport default class NodeFactory {\n createNode(coord) {\n return new Node(coord, null)\n }\n}\n","import Location from '../geom/Location.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Node from './Node.js'\nimport NodeMap from './NodeMap.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport DirectedEdge from './DirectedEdge.js'\nimport System from '../../../../java/lang/System.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Quadrant from './Quadrant.js'\nimport NodeFactory from './NodeFactory.js'\nexport default class PlanarGraph {\n constructor() {\n PlanarGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edges = new ArrayList()\n this._nodes = null\n this._edgeEndList = new ArrayList()\n if (arguments.length === 0) {\n this._nodes = new NodeMap(new NodeFactory())\n } else if (arguments.length === 1) {\n const nodeFact = arguments[0]\n this._nodes = new NodeMap(nodeFact)\n }\n }\n static linkResultDirectedEdges(nodes) {\n for (let nodeit = nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkResultDirectedEdges()\n }\n }\n printEdges(out) {\n out.println('Edges:')\n for (let i = 0; i < this._edges.size(); i++) {\n out.println('edge ' + i + ':')\n const e = this._edges.get(i)\n e.print(out)\n e.eiList.print(out)\n }\n }\n find(coord) {\n return this._nodes.find(coord)\n }\n addNode() {\n if (arguments[0] instanceof Node) {\n const node = arguments[0]\n return this._nodes.addNode(node)\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n return this._nodes.addNode(coord)\n }\n }\n getNodeIterator() {\n return this._nodes.iterator()\n }\n linkResultDirectedEdges() {\n for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkResultDirectedEdges()\n }\n }\n debugPrintln(o) {\n System.out.println(o)\n }\n isBoundaryNode(geomIndex, coord) {\n const node = this._nodes.find(coord)\n if (node === null) return false\n const label = node.getLabel()\n if (label !== null && label.getLocation(geomIndex) === Location.BOUNDARY) return true\n return false\n }\n linkAllDirectedEdges() {\n for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkAllDirectedEdges()\n }\n }\n matchInSameDirection(p0, p1, ep0, ep1) {\n if (!p0.equals(ep0)) return false\n if (Orientation.index(p0, p1, ep1) === Orientation.COLLINEAR && Quadrant.quadrant(p0, p1) === Quadrant.quadrant(ep0, ep1)) return true\n return false\n }\n getEdgeEnds() {\n return this._edgeEndList\n }\n debugPrint(o) {\n System.out.print(o)\n }\n getEdgeIterator() {\n return this._edges.iterator()\n }\n findEdgeInSameDirection(p0, p1) {\n for (let i = 0; i < this._edges.size(); i++) {\n const e = this._edges.get(i)\n const eCoord = e.getCoordinates()\n if (this.matchInSameDirection(p0, p1, eCoord[0], eCoord[1])) return e\n if (this.matchInSameDirection(p0, p1, eCoord[eCoord.length - 1], eCoord[eCoord.length - 2])) return e\n }\n return null\n }\n insertEdge(e) {\n this._edges.add(e)\n }\n findEdgeEnd(e) {\n for (let i = this.getEdgeEnds().iterator(); i.hasNext(); ) {\n const ee = i.next()\n if (ee.getEdge() === e) return ee\n }\n return null\n }\n addEdges(edgesToAdd) {\n for (let it = edgesToAdd.iterator(); it.hasNext(); ) {\n const e = it.next()\n this._edges.add(e)\n const de1 = new DirectedEdge(e, true)\n const de2 = new DirectedEdge(e, false)\n de1.setSym(de2)\n de2.setSym(de1)\n this.add(de1)\n this.add(de2)\n }\n }\n add(e) {\n this._nodes.add(e)\n this._edgeEndList.add(e)\n }\n getNodes() {\n return this._nodes.values()\n }\n findEdge(p0, p1) {\n for (let i = 0; i < this._edges.size(); i++) {\n const e = this._edges.get(i)\n const eCoord = e.getCoordinates()\n if (p0.equals(eCoord[0]) && p1.equals(eCoord[1])) return e\n }\n return null\n }\n}\n","import PointLocation from '../../algorithm/PointLocation.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport MaximalEdgeRing from './MaximalEdgeRing.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class PolygonBuilder {\n constructor() {\n PolygonBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometryFactory = null\n this._shellList = new ArrayList()\n const geometryFactory = arguments[0]\n this._geometryFactory = geometryFactory\n }\n static findEdgeRingContaining(testEr, shellList) {\n const testRing = testEr.getLinearRing()\n const testEnv = testRing.getEnvelopeInternal()\n let testPt = testRing.getCoordinateN(0)\n let minShell = null\n let minShellEnv = null\n for (let it = shellList.iterator(); it.hasNext(); ) {\n const tryShell = it.next()\n const tryShellRing = tryShell.getLinearRing()\n const tryShellEnv = tryShellRing.getEnvelopeInternal()\n if (tryShellEnv.equals(testEnv)) continue\n if (!tryShellEnv.contains(testEnv)) continue\n testPt = CoordinateArrays.ptNotInList(testRing.getCoordinates(), tryShellRing.getCoordinates())\n let isContained = false\n if (PointLocation.isInRing(testPt, tryShellRing.getCoordinates())) isContained = true\n if (isContained) \n if (minShell === null || minShellEnv.contains(tryShellEnv)) {\n minShell = tryShell\n minShellEnv = minShell.getLinearRing().getEnvelopeInternal()\n }\n \n }\n return minShell\n }\n sortShellsAndHoles(edgeRings, shellList, freeHoleList) {\n for (let it = edgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.isHole()) \n freeHoleList.add(er)\n else \n shellList.add(er)\n \n }\n }\n computePolygons(shellList) {\n const resultPolyList = new ArrayList()\n for (let it = shellList.iterator(); it.hasNext(); ) {\n const er = it.next()\n const poly = er.toPolygon(this._geometryFactory)\n resultPolyList.add(poly)\n }\n return resultPolyList\n }\n placeFreeHoles(shellList, freeHoleList) {\n for (let it = freeHoleList.iterator(); it.hasNext(); ) {\n const hole = it.next()\n if (hole.getShell() === null) {\n const shell = PolygonBuilder.findEdgeRingContaining(hole, shellList)\n if (shell === null) throw new TopologyException('unable to assign hole to a shell', hole.getCoordinate(0))\n hole.setShell(shell)\n }\n }\n }\n buildMinimalEdgeRings(maxEdgeRings, shellList, freeHoleList) {\n const edgeRings = new ArrayList()\n for (let it = maxEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.getMaxNodeDegree() > 2) {\n er.linkDirectedEdgesForMinimalEdgeRings()\n const minEdgeRings = er.buildMinimalRings()\n const shell = this.findShell(minEdgeRings)\n if (shell !== null) {\n this.placePolygonHoles(shell, minEdgeRings)\n shellList.add(shell)\n } else {\n freeHoleList.addAll(minEdgeRings)\n }\n } else {\n edgeRings.add(er)\n }\n }\n return edgeRings\n }\n buildMaximalEdgeRings(dirEdges) {\n const maxEdgeRings = new ArrayList()\n for (let it = dirEdges.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() && de.getLabel().isArea()) \n if (de.getEdgeRing() === null) {\n const er = new MaximalEdgeRing(de, this._geometryFactory)\n maxEdgeRings.add(er)\n er.setInResult()\n }\n \n }\n return maxEdgeRings\n }\n placePolygonHoles(shell, minEdgeRings) {\n for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.isHole()) \n er.setShell(shell)\n \n }\n }\n getPolygons() {\n const resultPolyList = this.computePolygons(this._shellList)\n return resultPolyList\n }\n findShell(minEdgeRings) {\n let shellCount = 0\n let shell = null\n for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (!er.isHole()) {\n shell = er\n shellCount++\n }\n }\n Assert.isTrue(shellCount <= 1, 'found two shells in MinimalEdgeRing list')\n return shell\n }\n add() {\n if (arguments.length === 1) {\n const graph = arguments[0]\n this.add(graph.getEdgeEnds(), graph.getNodes())\n } else if (arguments.length === 2) {\n const dirEdges = arguments[0], nodes = arguments[1]\n PlanarGraph.linkResultDirectedEdges(nodes)\n const maxEdgeRings = this.buildMaximalEdgeRings(dirEdges)\n const freeHoleList = new ArrayList()\n const edgeRings = this.buildMinimalEdgeRings(maxEdgeRings, this._shellList, freeHoleList)\n this.sortShellsAndHoles(edgeRings, this._shellList, freeHoleList)\n this.placeFreeHoles(this._shellList, freeHoleList)\n }\n }\n}\n","export default class Boundable {\n getBounds() {}\n}\n","import Boundable from './Boundable.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class ItemBoundable {\n constructor() {\n ItemBoundable.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._bounds = null\n this._item = null\n const bounds = arguments[0], item = arguments[1]\n this._bounds = bounds\n this._item = item\n }\n getItem() {\n return this._item\n }\n getBounds() {\n return this._bounds\n }\n get interfaces_() {\n return [Boundable, Serializable]\n }\n}\n","import ArrayList from '../../../../java/util/ArrayList.js'\nexport default class PriorityQueue {\n constructor() {\n PriorityQueue.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._size = null\n this._items = null\n this._size = 0\n this._items = new ArrayList()\n this._items.add(null)\n }\n poll() {\n if (this.isEmpty()) return null\n const minItem = this._items.get(1)\n this._items.set(1, this._items.get(this._size))\n this._size -= 1\n this.reorder(1)\n return minItem\n }\n size() {\n return this._size\n }\n reorder(hole) {\n let child = null\n const tmp = this._items.get(hole)\n for (; hole * 2 <= this._size; hole = child) {\n child = hole * 2\n if (child !== this._size && this._items.get(child + 1).compareTo(this._items.get(child)) < 0) child++\n if (this._items.get(child).compareTo(tmp) < 0) this._items.set(hole, this._items.get(child)); else break\n }\n this._items.set(hole, tmp)\n }\n clear() {\n this._size = 0\n this._items.clear()\n }\n peek() {\n if (this.isEmpty()) return null\n const minItem = this._items.get(1)\n return minItem\n }\n isEmpty() {\n return this._size === 0\n }\n add(x) {\n this._items.add(null)\n this._size += 1\n let hole = this._size\n this._items.set(0, x)\n for (; x.compareTo(this._items.get(Math.trunc(hole / 2))) < 0; hole /= 2) \n this._items.set(hole, this._items.get(Math.trunc(hole / 2)))\n \n this._items.set(hole, x)\n }\n}\n","export default class SpatialIndex {\n insert(itemEnv, item) {}\n remove(itemEnv, item) {}\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n }\n }\n}\n","import Boundable from './Boundable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Assert from '../../util/Assert.js'\nexport default class AbstractNode {\n constructor() {\n AbstractNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._childBoundables = new ArrayList()\n this._bounds = null\n this._level = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const level = arguments[0]\n this._level = level\n }\n }\n getLevel() {\n return this._level\n }\n size() {\n return this._childBoundables.size()\n }\n getChildBoundables() {\n return this._childBoundables\n }\n addChildBoundable(childBoundable) {\n Assert.isTrue(this._bounds === null)\n this._childBoundables.add(childBoundable)\n }\n isEmpty() {\n return this._childBoundables.isEmpty()\n }\n getBounds() {\n if (this._bounds === null) \n this._bounds = this.computeBounds()\n \n return this._bounds\n }\n get interfaces_() {\n return [Boundable, Serializable]\n }\n}\n","import Arrays from './Arrays.js'\nimport ArrayList from './ArrayList.js'\n\nconst Collections = {\n reverseOrder: function() {\n return {\n compare(a, b) {\n return b.compareTo(a)\n }\n }\n },\n min: function(l) {\n Collections.sort(l)\n return l.get(0)\n },\n sort: function(l, c) {\n const a = l.toArray()\n if (c)\n Arrays.sort(a, c)\n else\n Arrays.sort(a)\n const i = l.iterator()\n for (let pos = 0, alen = a.length; pos < alen; pos++) {\n i.next()\n i.set(a[pos])\n }\n },\n singletonList: function(o) {\n const arrayList = new ArrayList()\n arrayList.add(o)\n return arrayList\n }\n}\n\nexport default Collections\n","export default class EnvelopeDistance {\n static maxDistance(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n let dist = EnvelopeDistance.distance(ax1, ay1, bx1, by1)\n dist = Math.max(dist, EnvelopeDistance.distance(ax1, ay1, bx2, by2))\n dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx1, by1))\n dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx2, by2))\n return dist\n }\n static distance(x1, y1, x2, y2) {\n const dx = x2 - x1\n const dy = y2 - y1\n return Math.sqrt(dx * dx + dy * dy)\n }\n static maximumDistance(env1, env2) {\n const minx = Math.min(env1.getMinX(), env2.getMinX())\n const miny = Math.min(env1.getMinY(), env2.getMinY())\n const maxx = Math.max(env1.getMaxX(), env2.getMaxX())\n const maxy = Math.max(env1.getMaxY(), env2.getMaxY())\n return EnvelopeDistance.distance(minx, miny, maxx, maxy)\n }\n static minMaxDistance(a, b) {\n const aminx = a.getMinX()\n const aminy = a.getMinY()\n const amaxx = a.getMaxX()\n const amaxy = a.getMaxY()\n const bminx = b.getMinX()\n const bminy = b.getMinY()\n const bmaxx = b.getMaxX()\n const bmaxy = b.getMaxY()\n let dist = EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bminx, bmaxy)\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n return dist\n }\n}\n","import IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport AbstractNode from './AbstractNode.js'\nimport EnvelopeDistance from './EnvelopeDistance.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nexport default class BoundablePair {\n constructor() {\n BoundablePair.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._boundable1 = null\n this._boundable2 = null\n this._distance = null\n this._itemDistance = null\n const boundable1 = arguments[0], boundable2 = arguments[1], itemDistance = arguments[2]\n this._boundable1 = boundable1\n this._boundable2 = boundable2\n this._itemDistance = itemDistance\n this._distance = this.distance()\n }\n static area(b) {\n return b.getBounds().getArea()\n }\n static isComposite(item) {\n return item instanceof AbstractNode\n }\n maximumDistance() {\n return EnvelopeDistance.maximumDistance(this._boundable1.getBounds(), this._boundable2.getBounds())\n }\n expandToQueue(priQ, minDistance) {\n const isComp1 = BoundablePair.isComposite(this._boundable1)\n const isComp2 = BoundablePair.isComposite(this._boundable2)\n if (isComp1 && isComp2) {\n if (BoundablePair.area(this._boundable1) > BoundablePair.area(this._boundable2)) {\n this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n return null\n } else {\n this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n return null\n }\n } else if (isComp1) {\n this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n return null\n } else if (isComp2) {\n this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n return null\n }\n throw new IllegalArgumentException('neither boundable is composite')\n }\n isLeaves() {\n return !(BoundablePair.isComposite(this._boundable1) || BoundablePair.isComposite(this._boundable2))\n }\n compareTo(o) {\n const nd = o\n if (this._distance < nd._distance) return -1\n if (this._distance > nd._distance) return 1\n return 0\n }\n expand(bndComposite, bndOther, isFlipped, priQ, minDistance) {\n const children = bndComposite.getChildBoundables()\n for (let i = children.iterator(); i.hasNext(); ) {\n const child = i.next()\n let bp = null\n if (isFlipped) \n bp = new BoundablePair(bndOther, child, this._itemDistance)\n else \n bp = new BoundablePair(child, bndOther, this._itemDistance)\n \n if (bp.getDistance() < minDistance) \n priQ.add(bp)\n \n }\n }\n getBoundable(i) {\n if (i === 0) return this._boundable1\n return this._boundable2\n }\n getDistance() {\n return this._distance\n }\n distance() {\n if (this.isLeaves()) \n return this._itemDistance.distance(this._boundable1, this._boundable2)\n \n return this._boundable1.getBounds().distance(this._boundable2.getBounds())\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","export default class ItemVisitor {\n visitItem(item) {}\n}\n","import ItemBoundable from './ItemBoundable.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport ItemVisitor from '../ItemVisitor.js'\nimport AbstractNode from './AbstractNode.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Assert from '../../util/Assert.js'\nimport List from '../../../../../java/util/List.js'\nexport default class AbstractSTRtree {\n constructor() {\n AbstractSTRtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._root = null\n this._built = false\n this._itemBoundables = new ArrayList()\n this._nodeCapacity = null\n if (arguments.length === 0) {\n AbstractSTRtree.constructor_.call(this, AbstractSTRtree.DEFAULT_NODE_CAPACITY)\n } else if (arguments.length === 1) {\n const nodeCapacity = arguments[0]\n Assert.isTrue(nodeCapacity > 1, 'Node capacity must be greater than 1')\n this._nodeCapacity = nodeCapacity\n }\n }\n static compareDoubles(a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n }\n queryInternal() {\n if (hasInterface(arguments[2], ItemVisitor) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n const searchBounds = arguments[0], node = arguments[1], visitor = arguments[2]\n const childBoundables = node.getChildBoundables()\n for (let i = 0; i < childBoundables.size(); i++) {\n const childBoundable = childBoundables.get(i)\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) \n this.queryInternal(searchBounds, childBoundable, visitor)\n else if (childBoundable instanceof ItemBoundable) \n visitor.visitItem(childBoundable.getItem())\n else \n Assert.shouldNeverReachHere()\n \n }\n } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n const searchBounds = arguments[0], node = arguments[1], matches = arguments[2]\n const childBoundables = node.getChildBoundables()\n for (let i = 0; i < childBoundables.size(); i++) {\n const childBoundable = childBoundables.get(i)\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) \n this.queryInternal(searchBounds, childBoundable, matches)\n else if (childBoundable instanceof ItemBoundable) \n matches.add(childBoundable.getItem())\n else \n Assert.shouldNeverReachHere()\n \n }\n }\n }\n getNodeCapacity() {\n return this._nodeCapacity\n }\n lastNode(nodes) {\n return nodes.get(nodes.size() - 1)\n }\n size() {\n if (arguments.length === 0) {\n if (this.isEmpty()) \n return 0\n \n this.build()\n return this.size(this._root)\n } else if (arguments.length === 1) {\n const node = arguments[0]\n let size = 0\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) \n size += this.size(childBoundable)\n else if (childBoundable instanceof ItemBoundable) \n size += 1\n \n }\n return size\n }\n }\n removeItem(node, item) {\n let childToRemove = null\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof ItemBoundable) \n if (childBoundable.getItem() === item) childToRemove = childBoundable\n \n }\n if (childToRemove !== null) {\n node.getChildBoundables().remove(childToRemove)\n return true\n }\n return false\n }\n itemsTree() {\n if (arguments.length === 0) {\n this.build()\n const valuesTree = this.itemsTree(this._root)\n if (valuesTree === null) return new ArrayList()\n return valuesTree\n } else if (arguments.length === 1) {\n const node = arguments[0]\n const valuesTreeForNode = new ArrayList()\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) {\n const valuesTreeForChild = this.itemsTree(childBoundable)\n if (valuesTreeForChild !== null) valuesTreeForNode.add(valuesTreeForChild)\n } else if (childBoundable instanceof ItemBoundable) {\n valuesTreeForNode.add(childBoundable.getItem())\n } else {\n Assert.shouldNeverReachHere()\n }\n }\n if (valuesTreeForNode.size() <= 0) return null\n return valuesTreeForNode\n }\n }\n insert(bounds, item) {\n Assert.isTrue(!this._built, 'Cannot insert items into an STR packed R-tree after it has been built.')\n this._itemBoundables.add(new ItemBoundable(bounds, item))\n }\n boundablesAtLevel() {\n if (arguments.length === 1) {\n const level = arguments[0]\n const boundables = new ArrayList()\n this.boundablesAtLevel(level, this._root, boundables)\n return boundables\n } else if (arguments.length === 3) {\n const level = arguments[0], top = arguments[1], boundables = arguments[2]\n Assert.isTrue(level > -2)\n if (top.getLevel() === level) {\n boundables.add(top)\n return null\n }\n for (let i = top.getChildBoundables().iterator(); i.hasNext(); ) {\n const boundable = i.next()\n if (boundable instanceof AbstractNode) {\n this.boundablesAtLevel(level, boundable, boundables)\n } else {\n Assert.isTrue(boundable instanceof ItemBoundable)\n if (level === -1) \n boundables.add(boundable)\n \n }\n }\n return null\n }\n }\n query() {\n if (arguments.length === 1) {\n const searchBounds = arguments[0]\n this.build()\n const matches = new ArrayList()\n if (this.isEmpty()) \n return matches\n \n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n this.queryInternal(searchBounds, this._root, matches)\n \n return matches\n } else if (arguments.length === 2) {\n const searchBounds = arguments[0], visitor = arguments[1]\n this.build()\n if (this.isEmpty()) \n return null\n \n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n this.queryInternal(searchBounds, this._root, visitor)\n \n }\n }\n build() {\n if (this._built) return null\n this._root = this._itemBoundables.isEmpty() ? this.createNode(0) : this.createHigherLevels(this._itemBoundables, -1)\n this._itemBoundables = null\n this._built = true\n }\n getRoot() {\n this.build()\n return this._root\n }\n remove() {\n if (arguments.length === 2) {\n const searchBounds = arguments[0], item = arguments[1]\n this.build()\n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n return this.remove(searchBounds, this._root, item)\n \n return false\n } else if (arguments.length === 3) {\n const searchBounds = arguments[0], node = arguments[1], item = arguments[2]\n let found = this.removeItem(node, item)\n if (found) return true\n let childToPrune = null\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) {\n found = this.remove(searchBounds, childBoundable, item)\n if (found) {\n childToPrune = childBoundable\n break\n }\n }\n }\n if (childToPrune !== null) \n if (childToPrune.getChildBoundables().isEmpty()) \n node.getChildBoundables().remove(childToPrune)\n \n \n return found\n }\n }\n createHigherLevels(boundablesOfALevel, level) {\n Assert.isTrue(!boundablesOfALevel.isEmpty())\n const parentBoundables = this.createParentBoundables(boundablesOfALevel, level + 1)\n if (parentBoundables.size() === 1) \n return parentBoundables.get(0)\n \n return this.createHigherLevels(parentBoundables, level + 1)\n }\n depth() {\n if (arguments.length === 0) {\n if (this.isEmpty()) \n return 0\n \n this.build()\n return this.depth(this._root)\n } else if (arguments.length === 1) {\n const node = arguments[0]\n let maxChildDepth = 0\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) {\n const childDepth = this.depth(childBoundable)\n if (childDepth > maxChildDepth) maxChildDepth = childDepth\n }\n }\n return maxChildDepth + 1\n }\n }\n createParentBoundables(childBoundables, newLevel) {\n Assert.isTrue(!childBoundables.isEmpty())\n const parentBoundables = new ArrayList()\n parentBoundables.add(this.createNode(newLevel))\n const sortedChildBoundables = new ArrayList(childBoundables)\n Collections.sort(sortedChildBoundables, this.getComparator())\n for (let i = sortedChildBoundables.iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (this.lastNode(parentBoundables).getChildBoundables().size() === this.getNodeCapacity()) \n parentBoundables.add(this.createNode(newLevel))\n \n this.lastNode(parentBoundables).addChildBoundable(childBoundable)\n }\n return parentBoundables\n }\n isEmpty() {\n if (!this._built) return this._itemBoundables.isEmpty()\n return this._root.isEmpty()\n }\n get interfaces_() {\n return [Serializable]\n }\n}\nfunction IntersectsOp() {}\nAbstractSTRtree.IntersectsOp = IntersectsOp\nAbstractSTRtree.DEFAULT_NODE_CAPACITY = 10\n","export default class ItemDistance {\n distance(item1, item2) {}\n}\n","import ItemBoundable from './ItemBoundable.js'\nimport PriorityQueue from '../../util/PriorityQueue.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport SpatialIndex from '../SpatialIndex.js'\nimport AbstractNode from './AbstractNode.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport BoundablePair from './BoundablePair.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Comparator from '../../../../../java/util/Comparator.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nimport AbstractSTRtree from './AbstractSTRtree.js'\nimport ItemDistance from './ItemDistance.js'\nexport default class STRtree extends AbstractSTRtree {\n constructor() {\n super()\n STRtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n STRtree.constructor_.call(this, STRtree.DEFAULT_NODE_CAPACITY)\n } else if (arguments.length === 1) {\n const nodeCapacity = arguments[0]\n AbstractSTRtree.constructor_.call(this, nodeCapacity)\n }\n }\n static centreX(e) {\n return STRtree.avg(e.getMinX(), e.getMaxX())\n }\n static avg(a, b) {\n return (a + b) / 2\n }\n static getItems(kNearestNeighbors) {\n const items = new Array(kNearestNeighbors.size()).fill(null)\n let count = 0\n while (!kNearestNeighbors.isEmpty()) {\n const bp = kNearestNeighbors.poll()\n items[count] = bp.getBoundable(0).getItem()\n count++\n }\n return items\n }\n static centreY(e) {\n return STRtree.avg(e.getMinY(), e.getMaxY())\n }\n createParentBoundablesFromVerticalSlices(verticalSlices, newLevel) {\n Assert.isTrue(verticalSlices.length > 0)\n const parentBoundables = new ArrayList()\n for (let i = 0; i < verticalSlices.length; i++) \n parentBoundables.addAll(this.createParentBoundablesFromVerticalSlice(verticalSlices[i], newLevel))\n \n return parentBoundables\n }\n nearestNeighbourK() {\n if (arguments.length === 2) {\n const initBndPair = arguments[0], k = arguments[1]\n return this.nearestNeighbourK(initBndPair, Double.POSITIVE_INFINITY, k)\n } else if (arguments.length === 3) {\n const initBndPair = arguments[0], maxDistance = arguments[1], k = arguments[2]\n let distanceLowerBound = maxDistance\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n const kNearestNeighbors = new PriorityQueue()\n while (!priQ.isEmpty() && distanceLowerBound >= 0.0) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance >= distanceLowerBound) \n break\n \n if (bndPair.isLeaves()) \n if (kNearestNeighbors.size() < k) {\n kNearestNeighbors.add(bndPair)\n } else {\n const bp1 = kNearestNeighbors.peek()\n if (bp1.getDistance() > pairDistance) {\n kNearestNeighbors.poll()\n kNearestNeighbors.add(bndPair)\n }\n const bp2 = kNearestNeighbors.peek()\n distanceLowerBound = bp2.getDistance()\n }\n else \n bndPair.expandToQueue(priQ, distanceLowerBound)\n \n }\n return STRtree.getItems(kNearestNeighbors)\n }\n }\n createNode(level) {\n return new STRtreeNode(level)\n }\n size() {\n if (arguments.length === 0) \n return super.size.call(this)\n else return super.size.apply(this, arguments)\n }\n insert() {\n if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n const itemEnv = arguments[0], item = arguments[1]\n if (itemEnv.isNull()) \n return null\n \n super.insert.call(this, itemEnv, item)\n } else {\n return super.insert.apply(this, arguments)\n }\n }\n getIntersectsOp() {\n return STRtree.intersectsOp\n }\n verticalSlices(childBoundables, sliceCount) {\n const sliceCapacity = Math.trunc(Math.ceil(childBoundables.size() / sliceCount))\n const slices = new Array(sliceCount).fill(null)\n const i = childBoundables.iterator()\n for (let j = 0; j < sliceCount; j++) {\n slices[j] = new ArrayList()\n let boundablesAddedToSlice = 0\n while (i.hasNext() && boundablesAddedToSlice < sliceCapacity) {\n const childBoundable = i.next()\n slices[j].add(childBoundable)\n boundablesAddedToSlice++\n }\n }\n return slices\n }\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n return super.query.call(this, searchEnv)\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n super.query.call(this, searchEnv, visitor)\n }\n }\n getComparator() {\n return STRtree.yComparator\n }\n createParentBoundablesFromVerticalSlice(childBoundables, newLevel) {\n return super.createParentBoundables.call(this, childBoundables, newLevel)\n }\n remove() {\n if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n const itemEnv = arguments[0], item = arguments[1]\n return super.remove.call(this, itemEnv, item)\n } else {\n return super.remove.apply(this, arguments)\n }\n }\n depth() {\n if (arguments.length === 0) \n return super.depth.call(this)\n else return super.depth.apply(this, arguments)\n }\n createParentBoundables(childBoundables, newLevel) {\n Assert.isTrue(!childBoundables.isEmpty())\n const minLeafCount = Math.trunc(Math.ceil(childBoundables.size() / this.getNodeCapacity()))\n const sortedChildBoundables = new ArrayList(childBoundables)\n Collections.sort(sortedChildBoundables, STRtree.xComparator)\n const verticalSlices = this.verticalSlices(sortedChildBoundables, Math.trunc(Math.ceil(Math.sqrt(minLeafCount))))\n return this.createParentBoundablesFromVerticalSlices(verticalSlices, newLevel)\n }\n nearestNeighbour() {\n if (arguments.length === 1) {\n if (hasInterface(arguments[0], ItemDistance)) {\n const itemDist = arguments[0]\n if (this.isEmpty()) return null\n const bp = new BoundablePair(this.getRoot(), this.getRoot(), itemDist)\n return this.nearestNeighbour(bp)\n } else if (arguments[0] instanceof BoundablePair) {\n const initBndPair = arguments[0]\n let distanceLowerBound = Double.POSITIVE_INFINITY\n let minPair = null\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n while (!priQ.isEmpty() && distanceLowerBound > 0.0) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance >= distanceLowerBound) break\n if (bndPair.isLeaves()) {\n distanceLowerBound = pairDistance\n minPair = bndPair\n } else {\n bndPair.expandToQueue(priQ, distanceLowerBound)\n }\n }\n if (minPair === null) return null\n return [minPair.getBoundable(0).getItem(), minPair.getBoundable(1).getItem()]\n }\n } else if (arguments.length === 2) {\n const tree = arguments[0], itemDist = arguments[1]\n if (this.isEmpty() || tree.isEmpty()) return null\n const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n return this.nearestNeighbour(bp)\n } else if (arguments.length === 3) {\n const env = arguments[0], item = arguments[1], itemDist = arguments[2]\n const bnd = new ItemBoundable(env, item)\n const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n return this.nearestNeighbour(bp)[0]\n } else if (arguments.length === 4) {\n const env = arguments[0], item = arguments[1], itemDist = arguments[2], k = arguments[3]\n const bnd = new ItemBoundable(env, item)\n const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n return this.nearestNeighbourK(bp, k)\n }\n }\n isWithinDistance() {\n if (arguments.length === 2) {\n const initBndPair = arguments[0], maxDistance = arguments[1]\n let distanceUpperBound = Double.POSITIVE_INFINITY\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n while (!priQ.isEmpty()) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance > maxDistance) return false\n if (bndPair.maximumDistance() <= maxDistance) return true\n if (bndPair.isLeaves()) {\n distanceUpperBound = pairDistance\n if (distanceUpperBound <= maxDistance) return true\n } else {\n bndPair.expandToQueue(priQ, distanceUpperBound)\n }\n }\n return false\n } else if (arguments.length === 3) {\n const tree = arguments[0], itemDist = arguments[1], maxDistance = arguments[2]\n const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n return this.isWithinDistance(bp, maxDistance)\n }\n }\n get interfaces_() {\n return [SpatialIndex, Serializable]\n }\n}\nclass STRtreeNode extends AbstractNode {\n constructor() {\n super()\n STRtreeNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const level = arguments[0]\n AbstractNode.constructor_.call(this, level)\n }\n computeBounds() {\n let bounds = null\n for (let i = this.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (bounds === null) \n bounds = new Envelope(childBoundable.getBounds())\n else \n bounds.expandToInclude(childBoundable.getBounds())\n \n }\n return bounds\n }\n}\nSTRtree.STRtreeNode = STRtreeNode\nSTRtree.xComparator = new (class {\n get interfaces_() {\n return [Comparator]\n }\n compare(o1, o2) {\n return AbstractSTRtree.compareDoubles(STRtree.centreX(o1.getBounds()), STRtree.centreX(o2.getBounds()))\n }\n})()\nSTRtree.yComparator = new (class {\n get interfaces_() {\n return [Comparator]\n }\n compare(o1, o2) {\n return AbstractSTRtree.compareDoubles(STRtree.centreY(o1.getBounds()), STRtree.centreY(o2.getBounds()))\n }\n})()\nSTRtree.intersectsOp = new (class {\n get interfaces_() {\n return [IntersectsOp]\n }\n intersects(aBounds, bBounds) {\n return aBounds.intersects(bBounds)\n }\n})()\nSTRtree.DEFAULT_NODE_CAPACITY = 10\n","import Assert from '../util/Assert.js'\nexport default class SegmentPointComparator {\n static relativeSign(x0, x1) {\n if (x0 < x1) return -1\n if (x0 > x1) return 1\n return 0\n }\n static compare(octant, p0, p1) {\n if (p0.equals2D(p1)) return 0\n const xSign = SegmentPointComparator.relativeSign(p0.x, p1.x)\n const ySign = SegmentPointComparator.relativeSign(p0.y, p1.y)\n switch (octant) {\n case 0:\n return SegmentPointComparator.compareValue(xSign, ySign)\n case 1:\n return SegmentPointComparator.compareValue(ySign, xSign)\n case 2:\n return SegmentPointComparator.compareValue(ySign, -xSign)\n case 3:\n return SegmentPointComparator.compareValue(-xSign, ySign)\n case 4:\n return SegmentPointComparator.compareValue(-xSign, -ySign)\n case 5:\n return SegmentPointComparator.compareValue(-ySign, -xSign)\n case 6:\n return SegmentPointComparator.compareValue(-ySign, xSign)\n case 7:\n return SegmentPointComparator.compareValue(xSign, -ySign)\n }\n Assert.shouldNeverReachHere('invalid octant value')\n return 0\n }\n static compareValue(compareSign0, compareSign1) {\n if (compareSign0 < 0) return -1\n if (compareSign0 > 0) return 1\n if (compareSign1 < 0) return -1\n if (compareSign1 > 0) return 1\n return 0\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport SegmentPointComparator from './SegmentPointComparator.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nexport default class SegmentNode {\n constructor() {\n SegmentNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._segString = null\n this.coord = null\n this.segmentIndex = null\n this._segmentOctant = null\n this._isInterior = null\n const segString = arguments[0], coord = arguments[1], segmentIndex = arguments[2], segmentOctant = arguments[3]\n this._segString = segString\n this.coord = new Coordinate(coord)\n this.segmentIndex = segmentIndex\n this._segmentOctant = segmentOctant\n this._isInterior = !coord.equals2D(segString.getCoordinate(segmentIndex))\n }\n getCoordinate() {\n return this.coord\n }\n print(out) {\n out.print(this.coord)\n out.print(' seg # = ' + this.segmentIndex)\n }\n compareTo(obj) {\n const other = obj\n if (this.segmentIndex < other.segmentIndex) return -1\n if (this.segmentIndex > other.segmentIndex) return 1\n if (this.coord.equals2D(other.coord)) return 0\n if (!this._isInterior) return -1\n if (!other._isInterior) return 1\n return SegmentPointComparator.compare(this._segmentOctant, this.coord, other.coord)\n }\n isEndPoint(maxSegmentIndex) {\n if (this.segmentIndex === 0 && !this._isInterior) return true\n if (this.segmentIndex === maxSegmentIndex) return true\n return false\n }\n toString() {\n return this.segmentIndex + ':' + this.coord.toString()\n }\n isInterior() {\n return this._isInterior\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html\n * @constructor\n * @private\n */\nexport default class Iterator {\n /**\n * Returns true if the iteration has more elements.\n * @return {boolean}\n */\n hasNext() {}\n\n /**\n * Returns the next element in the iteration.\n * @return {Object}\n */\n next() {}\n\n /**\n * Removes from the underlying collection the last element returned by the\n * iterator (optional operation).\n */\n remove() {}\n}\n","import CoordinateList from '../geom/CoordinateList.js'\nimport SegmentNode from './SegmentNode.js'\nimport Iterator from '../../../../java/util/Iterator.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\nimport Assert from '../util/Assert.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class SegmentNodeList {\n constructor() {\n SegmentNodeList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeMap = new TreeMap()\n this._edge = null\n const edge = arguments[0]\n this._edge = edge\n }\n getSplitCoordinates() {\n const coordList = new CoordinateList()\n this.addEndpoints()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n this.addEdgeCoordinates(eiPrev, ei, coordList)\n eiPrev = ei\n }\n return coordList.toCoordinateArray()\n }\n addCollapsedNodes() {\n const collapsedVertexIndexes = new ArrayList()\n this.findCollapsesFromInsertedNodes(collapsedVertexIndexes)\n this.findCollapsesFromExistingVertices(collapsedVertexIndexes)\n for (let it = collapsedVertexIndexes.iterator(); it.hasNext(); ) {\n const vertexIndex = it.next().intValue()\n this.add(this._edge.getCoordinate(vertexIndex), vertexIndex)\n }\n }\n createSplitEdgePts(ei0, ei1) {\n let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n if (npts === 2) return [new Coordinate(ei0.coord), new Coordinate(ei1.coord)]\n const lastSegStartPt = this._edge.getCoordinate(ei1.segmentIndex)\n const useIntPt1 = ei1.isInterior() || !ei1.coord.equals2D(lastSegStartPt)\n if (!useIntPt1) \n npts--\n \n const pts = new Array(npts).fill(null)\n let ipt = 0\n pts[ipt++] = new Coordinate(ei0.coord)\n for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n pts[ipt++] = this._edge.getCoordinate(i)\n \n if (useIntPt1) pts[ipt] = new Coordinate(ei1.coord)\n return pts\n }\n print(out) {\n out.println('Intersections:')\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n ei.print(out)\n }\n }\n findCollapsesFromExistingVertices(collapsedVertexIndexes) {\n for (let i = 0; i < this._edge.size() - 2; i++) {\n const p0 = this._edge.getCoordinate(i)\n const p1 = this._edge.getCoordinate(i + 1)\n const p2 = this._edge.getCoordinate(i + 2)\n if (p0.equals2D(p2)) \n collapsedVertexIndexes.add(Integer.valueOf(i + 1))\n \n }\n }\n addEdgeCoordinates(ei0, ei1, coordList) {\n const pts = this.createSplitEdgePts(ei0, ei1)\n coordList.add(pts, false)\n }\n iterator() {\n return this._nodeMap.values().iterator()\n }\n addSplitEdges(edgeList) {\n this.addEndpoints()\n this.addCollapsedNodes()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const newEdge = this.createSplitEdge(eiPrev, ei)\n edgeList.add(newEdge)\n eiPrev = ei\n }\n }\n findCollapseIndex(ei0, ei1, collapsedVertexIndex) {\n if (!ei0.coord.equals2D(ei1.coord)) return false\n let numVerticesBetween = ei1.segmentIndex - ei0.segmentIndex\n if (!ei1.isInterior()) \n numVerticesBetween--\n \n if (numVerticesBetween === 1) {\n collapsedVertexIndex[0] = ei0.segmentIndex + 1\n return true\n }\n return false\n }\n findCollapsesFromInsertedNodes(collapsedVertexIndexes) {\n const collapsedVertexIndex = new Array(1).fill(null)\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const isCollapsed = this.findCollapseIndex(eiPrev, ei, collapsedVertexIndex)\n if (isCollapsed) collapsedVertexIndexes.add(Integer.valueOf(collapsedVertexIndex[0]))\n eiPrev = ei\n }\n }\n getEdge() {\n return this._edge\n }\n addEndpoints() {\n const maxSegIndex = this._edge.size() - 1\n this.add(this._edge.getCoordinate(0), 0)\n this.add(this._edge.getCoordinate(maxSegIndex), maxSegIndex)\n }\n createSplitEdge(ei0, ei1) {\n const pts = this.createSplitEdgePts(ei0, ei1)\n return new NodedSegmentString(pts, this._edge.getData())\n }\n add(intPt, segmentIndex) {\n const eiNew = new SegmentNode(this._edge, intPt, segmentIndex, this._edge.getSegmentOctant(segmentIndex))\n const ei = this._nodeMap.get(eiNew)\n if (ei !== null) {\n Assert.isTrue(ei.coord.equals2D(intPt), 'Found equal nodes with different coordinates')\n return ei\n }\n this._nodeMap.put(eiNew, eiNew)\n return eiNew\n }\n checkSplitEdgesCorrectness(splitEdges) {\n const edgePts = this._edge.getCoordinates()\n const split0 = splitEdges.get(0)\n const pt0 = split0.getCoordinate(0)\n if (!pt0.equals2D(edgePts[0])) throw new RuntimeException('bad split edge start point at ' + pt0)\n const splitn = splitEdges.get(splitEdges.size() - 1)\n const splitnPts = splitn.getCoordinates()\n const ptn = splitnPts[splitnPts.length - 1]\n if (!ptn.equals2D(edgePts[edgePts.length - 1])) throw new RuntimeException('bad split edge end point at ' + ptn)\n }\n}\nclass NodeVertexIterator {\n constructor() {\n NodeVertexIterator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeList = null\n this._edge = null\n this._nodeIt = null\n this._currNode = null\n this._nextNode = null\n this._currSegIndex = 0\n const nodeList = arguments[0]\n this._nodeList = nodeList\n this._edge = nodeList.getEdge()\n this._nodeIt = nodeList.iterator()\n this.readNextNode()\n }\n next() {\n if (this._currNode === null) {\n this._currNode = this._nextNode\n this._currSegIndex = this._currNode.segmentIndex\n this.readNextNode()\n return this._currNode\n }\n if (this._nextNode === null) return null\n if (this._nextNode.segmentIndex === this._currNode.segmentIndex) {\n this._currNode = this._nextNode\n this._currSegIndex = this._currNode.segmentIndex\n this.readNextNode()\n return this._currNode\n }\n if (this._nextNode.segmentIndex > this._currNode.segmentIndex) {}\n return null\n }\n remove() {\n throw new UnsupportedOperationException(this.getClass().getName())\n }\n hasNext() {\n if (this._nextNode === null) return false\n return true\n }\n readNextNode() {\n if (this._nodeIt.hasNext()) this._nextNode = this._nodeIt.next(); else this._nextNode = null\n }\n get interfaces_() {\n return [Iterator]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Octant {\n static octant() {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const dx = arguments[0], dy = arguments[1]\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for point ( ' + dx + ', ' + dy + ' )')\n const adx = Math.abs(dx)\n const ady = Math.abs(dy)\n if (dx >= 0) \n if (dy >= 0) \n if (adx >= ady) return 0; else return 1\n else \n if (adx >= ady) return 7; else return 6\n \n else \n if (dy >= 0) \n if (adx >= ady) return 3; else return 2\n else \n if (adx >= ady) return 4; else return 5\n \n \n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p0 = arguments[0], p1 = arguments[1]\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for two identical points ' + p0)\n return Octant.octant(dx, dy)\n }\n }\n}\n","export default class SegmentString {\n getCoordinates() {}\n size() {}\n getCoordinate(i) {}\n isClosed() {}\n setData(data) {}\n getData() {}\n}\n","import SegmentString from './SegmentString.js'\nexport default class NodableSegmentString {\n addIntersection(intPt, segmentIndex) {}\n get interfaces_() {\n return [SegmentString]\n }\n}\n","import SegmentNodeList from './SegmentNodeList.js'\nimport WKTWriter from '../io/WKTWriter.js'\nimport CoordinateArraySequence from '../geom/impl/CoordinateArraySequence.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Octant from './Octant.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport NodableSegmentString from './NodableSegmentString.js'\nexport default class NodedSegmentString {\n constructor() {\n NodedSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeList = new SegmentNodeList(this)\n this._pts = null\n this._data = null\n const pts = arguments[0], data = arguments[1]\n this._pts = pts\n this._data = data\n }\n static getNodedSubstrings() {\n if (arguments.length === 1) {\n const segStrings = arguments[0]\n const resultEdgelist = new ArrayList()\n NodedSegmentString.getNodedSubstrings(segStrings, resultEdgelist)\n return resultEdgelist\n } else if (arguments.length === 2) {\n const segStrings = arguments[0], resultEdgelist = arguments[1]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n ss.getNodeList().addSplitEdges(resultEdgelist)\n }\n }\n }\n getCoordinates() {\n return this._pts\n }\n size() {\n return this._pts.length\n }\n getCoordinate(i) {\n return this._pts[i]\n }\n isClosed() {\n return this._pts[0].equals(this._pts[this._pts.length - 1])\n }\n getSegmentOctant(index) {\n if (index === this._pts.length - 1) return -1\n return this.safeOctant(this.getCoordinate(index), this.getCoordinate(index + 1))\n }\n setData(data) {\n this._data = data\n }\n safeOctant(p0, p1) {\n if (p0.equals2D(p1)) return 0\n return Octant.octant(p0, p1)\n }\n getData() {\n return this._data\n }\n addIntersection() {\n if (arguments.length === 2) {\n const intPt = arguments[0], segmentIndex = arguments[1]\n this.addIntersectionNode(intPt, segmentIndex)\n } else if (arguments.length === 4) {\n const li = arguments[0], segmentIndex = arguments[1], geomIndex = arguments[2], intIndex = arguments[3]\n const intPt = new Coordinate(li.getIntersection(intIndex))\n this.addIntersection(intPt, segmentIndex)\n }\n }\n toString() {\n return WKTWriter.toLineString(new CoordinateArraySequence(this._pts))\n }\n getNodeList() {\n return this._nodeList\n }\n addIntersectionNode(intPt, segmentIndex) {\n let normalizedSegmentIndex = segmentIndex\n const nextSegIndex = normalizedSegmentIndex + 1\n if (nextSegIndex < this._pts.length) {\n const nextPt = this._pts[nextSegIndex]\n if (intPt.equals2D(nextPt)) \n normalizedSegmentIndex = nextSegIndex\n \n }\n const ei = this._nodeList.add(intPt, normalizedSegmentIndex)\n return ei\n }\n addIntersections(li, segmentIndex, geomIndex) {\n for (let i = 0; i < li.getIntersectionNum(); i++) \n this.addIntersection(li, segmentIndex, geomIndex, i)\n \n }\n get interfaces_() {\n return [NodableSegmentString]\n }\n}\n","import LineSegment from '../../geom/LineSegment.js'\nexport default class MonotoneChainOverlapAction {\n constructor() {\n MonotoneChainOverlapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._overlapSeg1 = new LineSegment()\n this._overlapSeg2 = new LineSegment()\n }\n overlap() {\n if (arguments.length === 2) {\n const seg1 = arguments[0], seg2 = arguments[1]\n } else if (arguments.length === 4) {\n const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n mc1.getLineSegment(start1, this._overlapSeg1)\n mc2.getLineSegment(start2, this._overlapSeg2)\n this.overlap(this._overlapSeg1, this._overlapSeg2)\n }\n }\n}\n","import Envelope from '../../geom/Envelope.js'\nexport default class MonotoneChain {\n constructor() {\n MonotoneChain.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._start = null\n this._end = null\n this._env = null\n this._context = null\n this._id = null\n const pts = arguments[0], start = arguments[1], end = arguments[2], context = arguments[3]\n this._pts = pts\n this._start = start\n this._end = end\n this._context = context\n }\n getLineSegment(index, ls) {\n ls.p0 = this._pts[index]\n ls.p1 = this._pts[index + 1]\n }\n computeSelect(searchEnv, start0, end0, mcs) {\n const p0 = this._pts[start0]\n const p1 = this._pts[end0]\n if (end0 - start0 === 1) {\n mcs.select(this, start0)\n return null\n }\n if (!searchEnv.intersects(p0, p1)) return null\n const mid = Math.trunc((start0 + end0) / 2)\n if (start0 < mid) \n this.computeSelect(searchEnv, start0, mid, mcs)\n \n if (mid < end0) \n this.computeSelect(searchEnv, mid, end0, mcs)\n \n }\n getCoordinates() {\n const coord = new Array(this._end - this._start + 1).fill(null)\n let index = 0\n for (let i = this._start; i <= this._end; i++) \n coord[index++] = this._pts[i]\n \n return coord\n }\n computeOverlaps() {\n if (arguments.length === 2) {\n const mc = arguments[0], mco = arguments[1]\n this.computeOverlaps(this._start, this._end, mc, mc._start, mc._end, mco)\n } else if (arguments.length === 6) {\n const start0 = arguments[0], end0 = arguments[1], mc = arguments[2], start1 = arguments[3], end1 = arguments[4], mco = arguments[5]\n if (end0 - start0 === 1 && end1 - start1 === 1) {\n mco.overlap(this, start0, mc, start1)\n return null\n }\n if (!this.overlaps(start0, end0, mc, start1, end1)) return null\n const mid0 = Math.trunc((start0 + end0) / 2)\n const mid1 = Math.trunc((start1 + end1) / 2)\n if (start0 < mid0) {\n if (start1 < mid1) this.computeOverlaps(start0, mid0, mc, start1, mid1, mco)\n if (mid1 < end1) this.computeOverlaps(start0, mid0, mc, mid1, end1, mco)\n }\n if (mid0 < end0) {\n if (start1 < mid1) this.computeOverlaps(mid0, end0, mc, start1, mid1, mco)\n if (mid1 < end1) this.computeOverlaps(mid0, end0, mc, mid1, end1, mco)\n }\n }\n }\n setId(id) {\n this._id = id\n }\n select(searchEnv, mcs) {\n this.computeSelect(searchEnv, this._start, this._end, mcs)\n }\n getEnvelope() {\n if (this._env === null) {\n const p0 = this._pts[this._start]\n const p1 = this._pts[this._end]\n this._env = new Envelope(p0, p1)\n }\n return this._env\n }\n overlaps(start0, end0, mc, start1, end1) {\n return Envelope.intersects(this._pts[start0], this._pts[end0], mc._pts[start1], mc._pts[end1])\n }\n getEndIndex() {\n return this._end\n }\n getStartIndex() {\n return this._start\n }\n getContext() {\n return this._context\n }\n getId() {\n return this._id\n }\n}\n","import MonotoneChain from './MonotoneChain.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Quadrant from '../../geomgraph/Quadrant.js'\nexport default class MonotoneChainBuilder {\n static findChainEnd(pts, start) {\n let safeStart = start\n while (safeStart < pts.length - 1 && pts[safeStart].equals2D(pts[safeStart + 1])) \n safeStart++\n \n if (safeStart >= pts.length - 1) \n return pts.length - 1\n \n const chainQuad = Quadrant.quadrant(pts[safeStart], pts[safeStart + 1])\n let last = start + 1\n while (last < pts.length) {\n if (!pts[last - 1].equals2D(pts[last])) {\n const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n if (quad !== chainQuad) break\n }\n last++\n }\n return last - 1\n }\n static getChains() {\n if (arguments.length === 1) {\n const pts = arguments[0]\n return MonotoneChainBuilder.getChains(pts, null)\n } else if (arguments.length === 2) {\n const pts = arguments[0], context = arguments[1]\n const mcList = new ArrayList()\n let chainStart = 0\n do {\n const chainEnd = MonotoneChainBuilder.findChainEnd(pts, chainStart)\n const mc = new MonotoneChain(pts, chainStart, chainEnd, context)\n mcList.add(mc)\n chainStart = chainEnd\n } while (chainStart < pts.length - 1)\n return mcList\n }\n }\n}\n","export default class Noder {\n computeNodes(segStrings) {}\n getNodedSubstrings() {}\n}\n","import Noder from './Noder.js'\nexport default class SinglePassNoder {\n constructor() {\n SinglePassNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._segInt = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const segInt = arguments[0]\n this.setSegmentIntersector(segInt)\n }\n }\n setSegmentIntersector(segInt) {\n this._segInt = segInt\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import STRtree from '../index/strtree/STRtree.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport MonotoneChainOverlapAction from '../index/chain/MonotoneChainOverlapAction.js'\nimport MonotoneChainBuilder from '../index/chain/MonotoneChainBuilder.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport SinglePassNoder from './SinglePassNoder.js'\nexport default class MCIndexNoder extends SinglePassNoder {\n constructor() {\n super()\n MCIndexNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._monoChains = new ArrayList()\n this._index = new STRtree()\n this._idCounter = 0\n this._nodedSegStrings = null\n this._nOverlaps = 0\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const si = arguments[0]\n SinglePassNoder.constructor_.call(this, si)\n }\n }\n getMonotoneChains() {\n return this._monoChains\n }\n getNodedSubstrings() {\n return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n }\n getIndex() {\n return this._index\n }\n add(segStr) {\n const segChains = MonotoneChainBuilder.getChains(segStr.getCoordinates(), segStr)\n for (let i = segChains.iterator(); i.hasNext(); ) {\n const mc = i.next()\n mc.setId(this._idCounter++)\n this._index.insert(mc.getEnvelope(), mc)\n this._monoChains.add(mc)\n }\n }\n computeNodes(inputSegStrings) {\n this._nodedSegStrings = inputSegStrings\n for (let i = inputSegStrings.iterator(); i.hasNext(); ) \n this.add(i.next())\n \n this.intersectChains()\n }\n intersectChains() {\n const overlapAction = new SegmentOverlapAction(this._segInt)\n for (let i = this._monoChains.iterator(); i.hasNext(); ) {\n const queryChain = i.next()\n const overlapChains = this._index.query(queryChain.getEnvelope())\n for (let j = overlapChains.iterator(); j.hasNext(); ) {\n const testChain = j.next()\n if (testChain.getId() > queryChain.getId()) {\n queryChain.computeOverlaps(testChain, overlapAction)\n this._nOverlaps++\n }\n if (this._segInt.isDone()) return null\n }\n }\n }\n}\nclass SegmentOverlapAction extends MonotoneChainOverlapAction {\n constructor() {\n super()\n SegmentOverlapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._si = null\n const si = arguments[0]\n this._si = si\n }\n overlap() {\n if (arguments.length === 4) {\n const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n const ss1 = mc1.getContext()\n const ss2 = mc2.getContext()\n this._si.processIntersections(ss1, start1, ss2, start2)\n } else {\n return super.overlap.apply(this, arguments)\n }\n }\n}\nMCIndexNoder.SegmentOverlapAction = SegmentOverlapAction\n","import CoordinateList from '../../geom/CoordinateList.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Distance from '../../algorithm/Distance.js'\nexport default class BufferInputLineSimplifier {\n constructor() {\n BufferInputLineSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputLine = null\n this._distanceTol = null\n this._isDeleted = null\n this._angleOrientation = Orientation.COUNTERCLOCKWISE\n const inputLine = arguments[0]\n this._inputLine = inputLine\n }\n static simplify(inputLine, distanceTol) {\n const simp = new BufferInputLineSimplifier(inputLine)\n return simp.simplify(distanceTol)\n }\n isDeletable(i0, i1, i2, distanceTol) {\n const p0 = this._inputLine[i0]\n const p1 = this._inputLine[i1]\n const p2 = this._inputLine[i2]\n if (!this.isConcave(p0, p1, p2)) return false\n if (!this.isShallow(p0, p1, p2, distanceTol)) return false\n return this.isShallowSampled(p0, p1, i0, i2, distanceTol)\n }\n deleteShallowConcavities() {\n let index = 1\n let midIndex = this.findNextNonDeletedIndex(index)\n let lastIndex = this.findNextNonDeletedIndex(midIndex)\n let isChanged = false\n while (lastIndex < this._inputLine.length) {\n let isMiddleVertexDeleted = false\n if (this.isDeletable(index, midIndex, lastIndex, this._distanceTol)) {\n this._isDeleted[midIndex] = BufferInputLineSimplifier.DELETE\n isMiddleVertexDeleted = true\n isChanged = true\n }\n if (isMiddleVertexDeleted) index = lastIndex; else index = midIndex\n midIndex = this.findNextNonDeletedIndex(index)\n lastIndex = this.findNextNonDeletedIndex(midIndex)\n }\n return isChanged\n }\n isShallowConcavity(p0, p1, p2, distanceTol) {\n const orientation = Orientation.index(p0, p1, p2)\n const isAngleToSimplify = orientation === this._angleOrientation\n if (!isAngleToSimplify) return false\n const dist = Distance.pointToSegment(p1, p0, p2)\n return dist < distanceTol\n }\n isShallowSampled(p0, p2, i0, i2, distanceTol) {\n let inc = Math.trunc((i2 - i0) / BufferInputLineSimplifier.NUM_PTS_TO_CHECK)\n if (inc <= 0) inc = 1\n for (let i = i0; i < i2; i += inc) \n if (!this.isShallow(p0, p2, this._inputLine[i], distanceTol)) return false\n \n return true\n }\n isConcave(p0, p1, p2) {\n const orientation = Orientation.index(p0, p1, p2)\n const isConcave = orientation === this._angleOrientation\n return isConcave\n }\n simplify(distanceTol) {\n this._distanceTol = Math.abs(distanceTol)\n if (distanceTol < 0) this._angleOrientation = Orientation.CLOCKWISE\n this._isDeleted = new Array(this._inputLine.length).fill(null)\n let isChanged = false\n do \n isChanged = this.deleteShallowConcavities()\n while (isChanged)\n return this.collapseLine()\n }\n findNextNonDeletedIndex(index) {\n let next = index + 1\n while (next < this._inputLine.length && this._isDeleted[next] === BufferInputLineSimplifier.DELETE) next++\n return next\n }\n isShallow(p0, p1, p2, distanceTol) {\n const dist = Distance.pointToSegment(p1, p0, p2)\n return dist < distanceTol\n }\n collapseLine() {\n const coordList = new CoordinateList()\n for (let i = 0; i < this._inputLine.length; i++) \n if (this._isDeleted[i] !== BufferInputLineSimplifier.DELETE) coordList.add(this._inputLine[i])\n \n return coordList.toCoordinateArray()\n }\n}\nBufferInputLineSimplifier.INIT = 0\nBufferInputLineSimplifier.DELETE = 1\nBufferInputLineSimplifier.KEEP = 1\nBufferInputLineSimplifier.NUM_PTS_TO_CHECK = 10\n","import GeometryFactory from '../../geom/GeometryFactory.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class OffsetSegmentString {\n constructor() {\n OffsetSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._ptList = null\n this._precisionModel = null\n this._minimimVertexDistance = 0.0\n this._ptList = new ArrayList()\n }\n getCoordinates() {\n const coord = this._ptList.toArray(OffsetSegmentString.COORDINATE_ARRAY_TYPE)\n return coord\n }\n setPrecisionModel(precisionModel) {\n this._precisionModel = precisionModel\n }\n addPt(pt) {\n const bufPt = new Coordinate(pt)\n this._precisionModel.makePrecise(bufPt)\n if (this.isRedundant(bufPt)) return null\n this._ptList.add(bufPt)\n }\n reverse() {}\n addPts(pt, isForward) {\n if (isForward) \n for (let i = 0; i < pt.length; i++) \n this.addPt(pt[i])\n \n else \n for (let i = pt.length - 1; i >= 0; i--) \n this.addPt(pt[i])\n \n \n }\n isRedundant(pt) {\n if (this._ptList.size() < 1) return false\n const lastPt = this._ptList.get(this._ptList.size() - 1)\n const ptDist = pt.distance(lastPt)\n if (ptDist < this._minimimVertexDistance) return true\n return false\n }\n toString() {\n const fact = new GeometryFactory()\n const line = fact.createLineString(this.getCoordinates())\n return line.toString()\n }\n closeRing() {\n if (this._ptList.size() < 1) return null\n const startPt = new Coordinate(this._ptList.get(0))\n const lastPt = this._ptList.get(this._ptList.size() - 1)\n if (startPt.equals(lastPt)) return null\n this._ptList.add(startPt)\n }\n setMinimumVertexDistance(minimimVertexDistance) {\n this._minimimVertexDistance = minimimVertexDistance\n }\n}\nOffsetSegmentString.COORDINATE_ARRAY_TYPE = new Array(0).fill(null)\n","import Orientation from './Orientation.js'\nexport default class Angle {\n static toDegrees(radians) {\n return radians * 180 / Math.PI\n }\n static normalize(angle) {\n while (angle > Math.PI) angle -= Angle.PI_TIMES_2\n while (angle <= -Math.PI) angle += Angle.PI_TIMES_2\n return angle\n }\n static angle() {\n if (arguments.length === 1) {\n const p = arguments[0]\n return Math.atan2(p.y, p.x)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n return Math.atan2(dy, dx)\n }\n }\n static isAcute(p0, p1, p2) {\n const dx0 = p0.x - p1.x\n const dy0 = p0.y - p1.y\n const dx1 = p2.x - p1.x\n const dy1 = p2.y - p1.y\n const dotprod = dx0 * dx1 + dy0 * dy1\n return dotprod > 0\n }\n static isObtuse(p0, p1, p2) {\n const dx0 = p0.x - p1.x\n const dy0 = p0.y - p1.y\n const dx1 = p2.x - p1.x\n const dy1 = p2.y - p1.y\n const dotprod = dx0 * dx1 + dy0 * dy1\n return dotprod < 0\n }\n static interiorAngle(p0, p1, p2) {\n const anglePrev = Angle.angle(p1, p0)\n const angleNext = Angle.angle(p1, p2)\n return Math.abs(angleNext - anglePrev)\n }\n static normalizePositive(angle) {\n if (angle < 0.0) {\n while (angle < 0.0) angle += Angle.PI_TIMES_2\n if (angle >= Angle.PI_TIMES_2) angle = 0.0\n } else {\n while (angle >= Angle.PI_TIMES_2) angle -= Angle.PI_TIMES_2\n if (angle < 0.0) angle = 0.0\n }\n return angle\n }\n static angleBetween(tip1, tail, tip2) {\n const a1 = Angle.angle(tail, tip1)\n const a2 = Angle.angle(tail, tip2)\n return Angle.diff(a1, a2)\n }\n static diff(ang1, ang2) {\n let delAngle = null\n if (ang1 < ang2) \n delAngle = ang2 - ang1\n else \n delAngle = ang1 - ang2\n \n if (delAngle > Math.PI) \n delAngle = 2 * Math.PI - delAngle\n \n return delAngle\n }\n static toRadians(angleDegrees) {\n return angleDegrees * Math.PI / 180.0\n }\n static getTurn(ang1, ang2) {\n const crossproduct = Math.sin(ang2 - ang1)\n if (crossproduct > 0) \n return Angle.COUNTERCLOCKWISE\n \n if (crossproduct < 0) \n return Angle.CLOCKWISE\n \n return Angle.NONE\n }\n static angleBetweenOriented(tip1, tail, tip2) {\n const a1 = Angle.angle(tail, tip1)\n const a2 = Angle.angle(tail, tip2)\n const angDel = a2 - a1\n if (angDel <= -Math.PI) return angDel + Angle.PI_TIMES_2\n if (angDel > Math.PI) return angDel - Angle.PI_TIMES_2\n return angDel\n }\n}\nAngle.PI_TIMES_2 = 2.0 * Math.PI\nAngle.PI_OVER_2 = Math.PI / 2.0\nAngle.PI_OVER_4 = Math.PI / 4.0\nAngle.COUNTERCLOCKWISE = Orientation.COUNTERCLOCKWISE\nAngle.CLOCKWISE = Orientation.CLOCKWISE\nAngle.NONE = Orientation.COLLINEAR\n","import BufferParameters from './BufferParameters.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Intersection from '../../algorithm/Intersection.js'\nimport OffsetSegmentString from './OffsetSegmentString.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Angle from '../../algorithm/Angle.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nexport default class OffsetSegmentGenerator {\n constructor() {\n OffsetSegmentGenerator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._maxCurveSegmentError = 0.0\n this._filletAngleQuantum = null\n this._closingSegLengthFactor = 1\n this._segList = null\n this._distance = 0.0\n this._precisionModel = null\n this._bufParams = null\n this._li = null\n this._s0 = null\n this._s1 = null\n this._s2 = null\n this._seg0 = new LineSegment()\n this._seg1 = new LineSegment()\n this._offset0 = new LineSegment()\n this._offset1 = new LineSegment()\n this._side = 0\n this._hasNarrowConcaveAngle = false\n const precisionModel = arguments[0], bufParams = arguments[1], distance = arguments[2]\n this._precisionModel = precisionModel\n this._bufParams = bufParams\n this._li = new RobustLineIntersector()\n this._filletAngleQuantum = Math.PI / 2.0 / bufParams.getQuadrantSegments()\n if (bufParams.getQuadrantSegments() >= 8 && bufParams.getJoinStyle() === BufferParameters.JOIN_ROUND) this._closingSegLengthFactor = OffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR\n this.init(distance)\n }\n addNextSegment(p, addStartPoint) {\n this._s0 = this._s1\n this._s1 = this._s2\n this._s2 = p\n this._seg0.setCoordinates(this._s0, this._s1)\n this.computeOffsetSegment(this._seg0, this._side, this._distance, this._offset0)\n this._seg1.setCoordinates(this._s1, this._s2)\n this.computeOffsetSegment(this._seg1, this._side, this._distance, this._offset1)\n if (this._s1.equals(this._s2)) return null\n const orientation = Orientation.index(this._s0, this._s1, this._s2)\n const outsideTurn = orientation === Orientation.CLOCKWISE && this._side === Position.LEFT || orientation === Orientation.COUNTERCLOCKWISE && this._side === Position.RIGHT\n if (orientation === 0) \n this.addCollinear(addStartPoint)\n else if (outsideTurn) \n this.addOutsideTurn(orientation, addStartPoint)\n else \n this.addInsideTurn(orientation, addStartPoint)\n \n }\n addLineEndCap(p0, p1) {\n const seg = new LineSegment(p0, p1)\n const offsetL = new LineSegment()\n this.computeOffsetSegment(seg, Position.LEFT, this._distance, offsetL)\n const offsetR = new LineSegment()\n this.computeOffsetSegment(seg, Position.RIGHT, this._distance, offsetR)\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n const angle = Math.atan2(dy, dx)\n switch (this._bufParams.getEndCapStyle()) {\n case BufferParameters.CAP_ROUND:\n this._segList.addPt(offsetL.p1)\n this.addDirectedFillet(p1, angle + Math.PI / 2, angle - Math.PI / 2, Orientation.CLOCKWISE, this._distance)\n this._segList.addPt(offsetR.p1)\n break\n case BufferParameters.CAP_FLAT:\n this._segList.addPt(offsetL.p1)\n this._segList.addPt(offsetR.p1)\n break\n case BufferParameters.CAP_SQUARE:\n const squareCapSideOffset = new Coordinate()\n squareCapSideOffset.x = Math.abs(this._distance) * Math.cos(angle)\n squareCapSideOffset.y = Math.abs(this._distance) * Math.sin(angle)\n const squareCapLOffset = new Coordinate(offsetL.p1.x + squareCapSideOffset.x, offsetL.p1.y + squareCapSideOffset.y)\n const squareCapROffset = new Coordinate(offsetR.p1.x + squareCapSideOffset.x, offsetR.p1.y + squareCapSideOffset.y)\n this._segList.addPt(squareCapLOffset)\n this._segList.addPt(squareCapROffset)\n break\n }\n }\n getCoordinates() {\n const pts = this._segList.getCoordinates()\n return pts\n }\n addMitreJoin(p, offset0, offset1, distance) {\n const intPt = Intersection.intersection(offset0.p0, offset0.p1, offset1.p0, offset1.p1)\n if (intPt !== null) {\n const mitreRatio = distance <= 0.0 ? 1.0 : intPt.distance(p) / Math.abs(distance)\n if (mitreRatio <= this._bufParams.getMitreLimit()) {\n this._segList.addPt(intPt)\n return null\n }\n }\n this.addLimitedMitreJoin(offset0, offset1, distance, this._bufParams.getMitreLimit())\n }\n addOutsideTurn(orientation, addStartPoint) {\n if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR) {\n this._segList.addPt(this._offset0.p1)\n return null\n }\n if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n this.addMitreJoin(this._s1, this._offset0, this._offset1, this._distance)\n } else if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL) {\n this.addBevelJoin(this._offset0, this._offset1)\n } else {\n if (addStartPoint) this._segList.addPt(this._offset0.p1)\n this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, orientation, this._distance)\n this._segList.addPt(this._offset1.p0)\n }\n }\n createSquare(p) {\n this._segList.addPt(new Coordinate(p.x + this._distance, p.y + this._distance))\n this._segList.addPt(new Coordinate(p.x + this._distance, p.y - this._distance))\n this._segList.addPt(new Coordinate(p.x - this._distance, p.y - this._distance))\n this._segList.addPt(new Coordinate(p.x - this._distance, p.y + this._distance))\n this._segList.closeRing()\n }\n addSegments(pt, isForward) {\n this._segList.addPts(pt, isForward)\n }\n addFirstSegment() {\n this._segList.addPt(this._offset1.p0)\n }\n addCornerFillet(p, p0, p1, direction, radius) {\n const dx0 = p0.x - p.x\n const dy0 = p0.y - p.y\n let startAngle = Math.atan2(dy0, dx0)\n const dx1 = p1.x - p.x\n const dy1 = p1.y - p.y\n const endAngle = Math.atan2(dy1, dx1)\n if (direction === Orientation.CLOCKWISE) {\n if (startAngle <= endAngle) startAngle += 2.0 * Math.PI\n } else {\n if (startAngle >= endAngle) startAngle -= 2.0 * Math.PI\n }\n this._segList.addPt(p0)\n this.addDirectedFillet(p, startAngle, endAngle, direction, radius)\n this._segList.addPt(p1)\n }\n addLastSegment() {\n this._segList.addPt(this._offset1.p1)\n }\n initSideSegments(s1, s2, side) {\n this._s1 = s1\n this._s2 = s2\n this._side = side\n this._seg1.setCoordinates(s1, s2)\n this.computeOffsetSegment(this._seg1, side, this._distance, this._offset1)\n }\n addLimitedMitreJoin(offset0, offset1, distance, mitreLimit) {\n const basePt = this._seg0.p1\n const ang0 = Angle.angle(basePt, this._seg0.p0)\n const angDiff = Angle.angleBetweenOriented(this._seg0.p0, basePt, this._seg1.p1)\n const angDiffHalf = angDiff / 2\n const midAng = Angle.normalize(ang0 + angDiffHalf)\n const mitreMidAng = Angle.normalize(midAng + Math.PI)\n const mitreDist = mitreLimit * distance\n const bevelDelta = mitreDist * Math.abs(Math.sin(angDiffHalf))\n const bevelHalfLen = distance - bevelDelta\n const bevelMidX = basePt.x + mitreDist * Math.cos(mitreMidAng)\n const bevelMidY = basePt.y + mitreDist * Math.sin(mitreMidAng)\n const bevelMidPt = new Coordinate(bevelMidX, bevelMidY)\n const mitreMidLine = new LineSegment(basePt, bevelMidPt)\n const bevelEndLeft = mitreMidLine.pointAlongOffset(1.0, bevelHalfLen)\n const bevelEndRight = mitreMidLine.pointAlongOffset(1.0, -bevelHalfLen)\n if (this._side === Position.LEFT) {\n this._segList.addPt(bevelEndLeft)\n this._segList.addPt(bevelEndRight)\n } else {\n this._segList.addPt(bevelEndRight)\n this._segList.addPt(bevelEndLeft)\n }\n }\n addDirectedFillet(p, startAngle, endAngle, direction, radius) {\n const directionFactor = direction === Orientation.CLOCKWISE ? -1 : 1\n const totalAngle = Math.abs(startAngle - endAngle)\n const nSegs = Math.trunc(totalAngle / this._filletAngleQuantum + 0.5)\n if (nSegs < 1) return null\n const angleInc = totalAngle / nSegs\n const pt = new Coordinate()\n for (let i = 0; i < nSegs; i++) {\n const angle = startAngle + directionFactor * i * angleInc\n pt.x = p.x + radius * Math.cos(angle)\n pt.y = p.y + radius * Math.sin(angle)\n this._segList.addPt(pt)\n }\n }\n computeOffsetSegment(seg, side, distance, offset) {\n const sideSign = side === Position.LEFT ? 1 : -1\n const dx = seg.p1.x - seg.p0.x\n const dy = seg.p1.y - seg.p0.y\n const len = Math.sqrt(dx * dx + dy * dy)\n const ux = sideSign * distance * dx / len\n const uy = sideSign * distance * dy / len\n offset.p0.x = seg.p0.x - uy\n offset.p0.y = seg.p0.y + ux\n offset.p1.x = seg.p1.x - uy\n offset.p1.y = seg.p1.y + ux\n }\n addInsideTurn(orientation, addStartPoint) {\n this._li.computeIntersection(this._offset0.p0, this._offset0.p1, this._offset1.p0, this._offset1.p1)\n if (this._li.hasIntersection()) {\n this._segList.addPt(this._li.getIntersection(0))\n } else {\n this._hasNarrowConcaveAngle = true\n if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR) {\n this._segList.addPt(this._offset0.p1)\n } else {\n this._segList.addPt(this._offset0.p1)\n if (this._closingSegLengthFactor > 0) {\n const mid0 = new Coordinate((this._closingSegLengthFactor * this._offset0.p1.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset0.p1.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n this._segList.addPt(mid0)\n const mid1 = new Coordinate((this._closingSegLengthFactor * this._offset1.p0.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset1.p0.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n this._segList.addPt(mid1)\n } else {\n this._segList.addPt(this._s1)\n }\n this._segList.addPt(this._offset1.p0)\n }\n }\n }\n createCircle(p) {\n const pt = new Coordinate(p.x + this._distance, p.y)\n this._segList.addPt(pt)\n this.addDirectedFillet(p, 0.0, 2.0 * Math.PI, -1, this._distance)\n this._segList.closeRing()\n }\n addBevelJoin(offset0, offset1) {\n this._segList.addPt(offset0.p1)\n this._segList.addPt(offset1.p0)\n }\n init(distance) {\n this._distance = distance\n this._maxCurveSegmentError = distance * (1 - Math.cos(this._filletAngleQuantum / 2.0))\n this._segList = new OffsetSegmentString()\n this._segList.setPrecisionModel(this._precisionModel)\n this._segList.setMinimumVertexDistance(distance * OffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)\n }\n addCollinear(addStartPoint) {\n this._li.computeIntersection(this._s0, this._s1, this._s1, this._s2)\n const numInt = this._li.getIntersectionNum()\n if (numInt >= 2) \n if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL || this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n if (addStartPoint) this._segList.addPt(this._offset0.p1)\n this._segList.addPt(this._offset1.p0)\n } else {\n this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, Orientation.CLOCKWISE, this._distance)\n }\n \n }\n closeRing() {\n this._segList.closeRing()\n }\n hasNarrowConcaveAngle() {\n return this._hasNarrowConcaveAngle\n }\n}\nOffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR = 1.0E-3\nOffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-3\nOffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-6\nOffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR = 80\n","import BufferParameters from './BufferParameters.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport BufferInputLineSimplifier from './BufferInputLineSimplifier.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport OffsetSegmentGenerator from './OffsetSegmentGenerator.js'\nexport default class OffsetCurveBuilder {\n constructor() {\n OffsetCurveBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._distance = 0.0\n this._precisionModel = null\n this._bufParams = null\n const precisionModel = arguments[0], bufParams = arguments[1]\n this._precisionModel = precisionModel\n this._bufParams = bufParams\n }\n static copyCoordinates(pts) {\n const copy = new Array(pts.length).fill(null)\n for (let i = 0; i < copy.length; i++) \n copy[i] = new Coordinate(pts[i])\n \n return copy\n }\n getOffsetCurve(inputPts, distance) {\n this._distance = distance\n if (distance === 0.0) return null\n const isRightSide = distance < 0.0\n const posDistance = Math.abs(distance)\n const segGen = this.getSegGen(posDistance)\n if (inputPts.length <= 1) \n this.computePointCurve(inputPts[0], segGen)\n else \n this.computeOffsetCurve(inputPts, isRightSide, segGen)\n \n const curvePts = segGen.getCoordinates()\n if (isRightSide) CoordinateArrays.reverse(curvePts)\n return curvePts\n }\n computeSingleSidedBufferCurve(inputPts, isRightSide, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n if (isRightSide) {\n segGen.addSegments(inputPts, true)\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n } else {\n segGen.addSegments(inputPts, false)\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n }\n segGen.addLastSegment()\n segGen.closeRing()\n }\n computeRingBufferCurve(inputPts, side, segGen) {\n let distTol = this.simplifyTolerance(this._distance)\n if (side === Position.RIGHT) distTol = -distTol\n const simp = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n = simp.length - 1\n segGen.initSideSegments(simp[n - 1], simp[0], side)\n for (let i = 1; i <= n; i++) {\n const addStartPoint = i !== 1\n segGen.addNextSegment(simp[i], addStartPoint)\n }\n segGen.closeRing()\n }\n computeLineBufferCurve(inputPts, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n segGen.addLastSegment()\n segGen.addLineEndCap(simp1[n1 - 1], simp1[n1])\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n segGen.addLastSegment()\n segGen.addLineEndCap(simp2[1], simp2[0])\n segGen.closeRing()\n }\n computePointCurve(pt, segGen) {\n switch (this._bufParams.getEndCapStyle()) {\n case BufferParameters.CAP_ROUND:\n segGen.createCircle(pt)\n break\n case BufferParameters.CAP_SQUARE:\n segGen.createSquare(pt)\n break\n }\n }\n getLineCurve(inputPts, distance) {\n this._distance = distance\n if (this.isLineOffsetEmpty(distance)) return null\n const posDistance = Math.abs(distance)\n const segGen = this.getSegGen(posDistance)\n if (inputPts.length <= 1) {\n this.computePointCurve(inputPts[0], segGen)\n } else \n if (this._bufParams.isSingleSided()) {\n const isRightSide = distance < 0.0\n this.computeSingleSidedBufferCurve(inputPts, isRightSide, segGen)\n } else {\n this.computeLineBufferCurve(inputPts, segGen)\n }\n \n const lineCoord = segGen.getCoordinates()\n return lineCoord\n }\n getBufferParameters() {\n return this._bufParams\n }\n simplifyTolerance(bufDistance) {\n return bufDistance * this._bufParams.getSimplifyFactor()\n }\n getRingCurve(inputPts, side, distance) {\n this._distance = distance\n if (inputPts.length <= 2) return this.getLineCurve(inputPts, distance)\n if (distance === 0.0) \n return OffsetCurveBuilder.copyCoordinates(inputPts)\n \n const segGen = this.getSegGen(distance)\n this.computeRingBufferCurve(inputPts, side, segGen)\n return segGen.getCoordinates()\n }\n computeOffsetCurve(inputPts, isRightSide, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n if (isRightSide) {\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n } else {\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n }\n segGen.addLastSegment()\n }\n isLineOffsetEmpty(distance) {\n if (distance === 0.0) return true\n if (distance < 0.0 && !this._bufParams.isSingleSided()) return true\n return false\n }\n getSegGen(distance) {\n return new OffsetSegmentGenerator(this._precisionModel, this._bufParams, distance)\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport DirectedEdge from '../../geomgraph/DirectedEdge.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport List from '../../../../../java/util/List.js'\nexport default class SubgraphDepthLocater {\n constructor() {\n SubgraphDepthLocater.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._subgraphs = null\n this._seg = new LineSegment()\n const subgraphs = arguments[0]\n this._subgraphs = subgraphs\n }\n findStabbedSegments() {\n if (arguments.length === 1) {\n const stabbingRayLeftPt = arguments[0]\n const stabbedSegments = new ArrayList()\n for (let i = this._subgraphs.iterator(); i.hasNext(); ) {\n const bsg = i.next()\n const env = bsg.getEnvelope()\n if (stabbingRayLeftPt.y < env.getMinY() || stabbingRayLeftPt.y > env.getMaxY()) continue\n this.findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments)\n }\n return stabbedSegments\n } else if (arguments.length === 3) {\n if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && arguments[1] instanceof DirectedEdge)) {\n const stabbingRayLeftPt = arguments[0], dirEdge = arguments[1], stabbedSegments = arguments[2]\n const pts = dirEdge.getEdge().getCoordinates()\n for (let i = 0; i < pts.length - 1; i++) {\n this._seg.p0 = pts[i]\n this._seg.p1 = pts[i + 1]\n if (this._seg.p0.y > this._seg.p1.y) this._seg.reverse()\n const maxx = Math.max(this._seg.p0.x, this._seg.p1.x)\n if (maxx < stabbingRayLeftPt.x) continue\n if (this._seg.isHorizontal()) continue\n if (stabbingRayLeftPt.y < this._seg.p0.y || stabbingRayLeftPt.y > this._seg.p1.y) continue\n if (Orientation.index(this._seg.p0, this._seg.p1, stabbingRayLeftPt) === Orientation.RIGHT) continue\n let depth = dirEdge.getDepth(Position.LEFT)\n if (!this._seg.p0.equals(pts[i])) depth = dirEdge.getDepth(Position.RIGHT)\n const ds = new DepthSegment(this._seg, depth)\n stabbedSegments.add(ds)\n }\n } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && hasInterface(arguments[1], List))) {\n const stabbingRayLeftPt = arguments[0], dirEdges = arguments[1], stabbedSegments = arguments[2]\n for (let i = dirEdges.iterator(); i.hasNext(); ) {\n const de = i.next()\n if (!de.isForward()) continue\n this.findStabbedSegments(stabbingRayLeftPt, de, stabbedSegments)\n }\n }\n }\n }\n getDepth(p) {\n const stabbedSegments = this.findStabbedSegments(p)\n if (stabbedSegments.size() === 0) return 0\n const ds = Collections.min(stabbedSegments)\n return ds._leftDepth\n }\n}\nclass DepthSegment {\n constructor() {\n DepthSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._upwardSeg = null\n this._leftDepth = null\n const seg = arguments[0], depth = arguments[1]\n this._upwardSeg = new LineSegment(seg)\n this._leftDepth = depth\n }\n compareTo(obj) {\n const other = obj\n if (this._upwardSeg.minX() >= other._upwardSeg.maxX()) return 1\n if (this._upwardSeg.maxX() <= other._upwardSeg.minX()) return -1\n let orientIndex = this._upwardSeg.orientationIndex(other._upwardSeg)\n if (orientIndex !== 0) return orientIndex\n orientIndex = -1 * other._upwardSeg.orientationIndex(this._upwardSeg)\n if (orientIndex !== 0) return orientIndex\n return this._upwardSeg.compareTo(other._upwardSeg)\n }\n compareX(seg0, seg1) {\n const compare0 = seg0.p0.compareTo(seg1.p0)\n if (compare0 !== 0) return compare0\n return seg0.p1.compareTo(seg1.p1)\n }\n toString() {\n return this._upwardSeg.toString()\n }\n get interfaces_() {\n return [Comparable]\n }\n}\nSubgraphDepthLocater.DepthSegment = DepthSegment\n","import Exception from '../../../../java/lang/Exception.js'\nexport default class NotRepresentableException extends Exception {\n constructor() {\n super()\n NotRepresentableException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n Exception.constructor_.call(this, 'Projective point not representable on the Cartesian plane.')\n }\n}\n","import NotRepresentableException from './NotRepresentableException.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nexport default class HCoordinate {\n constructor() {\n HCoordinate.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.x = null\n this.y = null\n this.w = null\n if (arguments.length === 0) {\n this.x = 0.0\n this.y = 0.0\n this.w = 1.0\n } else if (arguments.length === 1) {\n const p = arguments[0]\n this.x = p.x\n this.y = p.y\n this.w = 1.0\n } else if (arguments.length === 2) {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const _x = arguments[0], _y = arguments[1]\n this.x = _x\n this.y = _y\n this.w = 1.0\n } else if (arguments[0] instanceof HCoordinate && arguments[1] instanceof HCoordinate) {\n const p1 = arguments[0], p2 = arguments[1]\n this.x = p1.y * p2.w - p2.y * p1.w\n this.y = p2.x * p1.w - p1.x * p2.w\n this.w = p1.x * p2.y - p2.x * p1.y\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p1 = arguments[0], p2 = arguments[1]\n this.x = p1.y - p2.y\n this.y = p2.x - p1.x\n this.w = p1.x * p2.y - p2.x * p1.y\n }\n } else if (arguments.length === 3) {\n const _x = arguments[0], _y = arguments[1], _w = arguments[2]\n this.x = _x\n this.y = _y\n this.w = _w\n } else if (arguments.length === 4) {\n const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n const px = p1.y - p2.y\n const py = p2.x - p1.x\n const pw = p1.x * p2.y - p2.x * p1.y\n const qx = q1.y - q2.y\n const qy = q2.x - q1.x\n const qw = q1.x * q2.y - q2.x * q1.y\n this.x = py * qw - qy * pw\n this.y = qx * pw - px * qw\n this.w = px * qy - qx * py\n }\n }\n getY() {\n const a = this.y / this.w\n if (Double.isNaN(a) || Double.isInfinite(a)) \n throw new NotRepresentableException()\n \n return a\n }\n getX() {\n const a = this.x / this.w\n if (Double.isNaN(a) || Double.isInfinite(a)) \n throw new NotRepresentableException()\n \n return a\n }\n getCoordinate() {\n const p = new Coordinate()\n p.x = this.getX()\n p.y = this.getY()\n return p\n }\n}\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport DD from '../math/DD.js'\nimport Angle from '../algorithm/Angle.js'\nimport HCoordinate from '../algorithm/HCoordinate.js'\nexport default class Triangle {\n constructor() {\n Triangle.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.p0 = null\n this.p1 = null\n this.p2 = null\n const p0 = arguments[0], p1 = arguments[1], p2 = arguments[2]\n this.p0 = p0\n this.p1 = p1\n this.p2 = p2\n }\n static area(a, b, c) {\n return Math.abs(((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2)\n }\n static signedArea(a, b, c) {\n return ((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2\n }\n static det(m00, m01, m10, m11) {\n return m00 * m11 - m01 * m10\n }\n static interpolateZ(p, v0, v1, v2) {\n const x0 = v0.x\n const y0 = v0.y\n const a = v1.x - x0\n const b = v2.x - x0\n const c = v1.y - y0\n const d = v2.y - y0\n const det = a * d - b * c\n const dx = p.x - x0\n const dy = p.y - y0\n const t = (d * dx - b * dy) / det\n const u = (-c * dx + a * dy) / det\n const z = v0.getZ() + t * (v1.getZ() - v0.getZ()) + u * (v2.getZ() - v0.getZ())\n return z\n }\n static longestSideLength(a, b, c) {\n const lenAB = a.distance(b)\n const lenBC = b.distance(c)\n const lenCA = c.distance(a)\n let maxLen = lenAB\n if (lenBC > maxLen) maxLen = lenBC\n if (lenCA > maxLen) maxLen = lenCA\n return maxLen\n }\n static circumcentreDD(a, b, c) {\n const ax = DD.valueOf(a.x).subtract(c.x)\n const ay = DD.valueOf(a.y).subtract(c.y)\n const bx = DD.valueOf(b.x).subtract(c.x)\n const by = DD.valueOf(b.y).subtract(c.y)\n const denom = DD.determinant(ax, ay, bx, by).multiply(2)\n const asqr = ax.sqr().add(ay.sqr())\n const bsqr = bx.sqr().add(by.sqr())\n const numx = DD.determinant(ay, asqr, by, bsqr)\n const numy = DD.determinant(ax, asqr, bx, bsqr)\n const ccx = DD.valueOf(c.x).subtract(numx.divide(denom)).doubleValue()\n const ccy = DD.valueOf(c.y).add(numy.divide(denom)).doubleValue()\n return new Coordinate(ccx, ccy)\n }\n static isAcute(a, b, c) {\n if (!Angle.isAcute(a, b, c)) return false\n if (!Angle.isAcute(b, c, a)) return false\n if (!Angle.isAcute(c, a, b)) return false\n return true\n }\n static circumcentre(a, b, c) {\n const cx = c.x\n const cy = c.y\n const ax = a.x - cx\n const ay = a.y - cy\n const bx = b.x - cx\n const by = b.y - cy\n const denom = 2 * Triangle.det(ax, ay, bx, by)\n const numx = Triangle.det(ay, ax * ax + ay * ay, by, bx * bx + by * by)\n const numy = Triangle.det(ax, ax * ax + ay * ay, bx, bx * bx + by * by)\n const ccx = cx - numx / denom\n const ccy = cy + numy / denom\n return new Coordinate(ccx, ccy)\n }\n static perpendicularBisector(a, b) {\n const dx = b.x - a.x\n const dy = b.y - a.y\n const l1 = new HCoordinate(a.x + dx / 2.0, a.y + dy / 2.0, 1.0)\n const l2 = new HCoordinate(a.x - dy + dx / 2.0, a.y + dx + dy / 2.0, 1.0)\n return new HCoordinate(l1, l2)\n }\n static angleBisector(a, b, c) {\n const len0 = b.distance(a)\n const len2 = b.distance(c)\n const frac = len0 / (len0 + len2)\n const dx = c.x - a.x\n const dy = c.y - a.y\n const splitPt = new Coordinate(a.x + frac * dx, a.y + frac * dy)\n return splitPt\n }\n static area3D(a, b, c) {\n const ux = b.x - a.x\n const uy = b.y - a.y\n const uz = b.getZ() - a.getZ()\n const vx = c.x - a.x\n const vy = c.y - a.y\n const vz = c.getZ() - a.getZ()\n const crossx = uy * vz - uz * vy\n const crossy = uz * vx - ux * vz\n const crossz = ux * vy - uy * vx\n const absSq = crossx * crossx + crossy * crossy + crossz * crossz\n const area3D = Math.sqrt(absSq) / 2\n return area3D\n }\n static centroid(a, b, c) {\n const x = (a.x + b.x + c.x) / 3\n const y = (a.y + b.y + c.y) / 3\n return new Coordinate(x, y)\n }\n static inCentre(a, b, c) {\n const len0 = b.distance(c)\n const len1 = a.distance(c)\n const len2 = a.distance(b)\n const circum = len0 + len1 + len2\n const inCentreX = (len0 * a.x + len1 * b.x + len2 * c.x) / circum\n const inCentreY = (len0 * a.y + len1 * b.y + len2 * c.y) / circum\n return new Coordinate(inCentreX, inCentreY)\n }\n area() {\n return Triangle.area(this.p0, this.p1, this.p2)\n }\n signedArea() {\n return Triangle.signedArea(this.p0, this.p1, this.p2)\n }\n interpolateZ(p) {\n if (p === null) throw new IllegalArgumentException('Supplied point is null.')\n return Triangle.interpolateZ(p, this.p0, this.p1, this.p2)\n }\n longestSideLength() {\n return Triangle.longestSideLength(this.p0, this.p1, this.p2)\n }\n isAcute() {\n return Triangle.isAcute(this.p0, this.p1, this.p2)\n }\n circumcentre() {\n return Triangle.circumcentre(this.p0, this.p1, this.p2)\n }\n area3D() {\n return Triangle.area3D(this.p0, this.p1, this.p2)\n }\n centroid() {\n return Triangle.centroid(this.p0, this.p1, this.p2)\n }\n inCentre() {\n return Triangle.inCentre(this.p0, this.p1, this.p2)\n }\n}\n","import Location from '../../geom/Location.js'\nimport LineString from '../../geom/LineString.js'\nimport Position from '../../geomgraph/Position.js'\nimport Point from '../../geom/Point.js'\nimport NodedSegmentString from '../../noding/NodedSegmentString.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPoint from '../../geom/MultiPoint.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport Label from '../../geomgraph/Label.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../../java/lang/UnsupportedOperationException.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Distance from '../../algorithm/Distance.js'\nimport MultiLineString from '../../geom/MultiLineString.js'\nimport Triangle from '../../geom/Triangle.js'\nexport default class OffsetCurveSetBuilder {\n constructor() {\n OffsetCurveSetBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._distance = null\n this._curveBuilder = null\n this._curveList = new ArrayList()\n const inputGeom = arguments[0], distance = arguments[1], curveBuilder = arguments[2]\n this._inputGeom = inputGeom\n this._distance = distance\n this._curveBuilder = curveBuilder\n }\n addRingSide(coord, offsetDistance, side, cwLeftLoc, cwRightLoc) {\n if (offsetDistance === 0.0 && coord.length < LinearRing.MINIMUM_VALID_SIZE) return null\n let leftLoc = cwLeftLoc\n let rightLoc = cwRightLoc\n if (coord.length >= LinearRing.MINIMUM_VALID_SIZE && Orientation.isCCW(coord)) {\n leftLoc = cwRightLoc\n rightLoc = cwLeftLoc\n side = Position.opposite(side)\n }\n const curve = this._curveBuilder.getRingCurve(coord, side, offsetDistance)\n this.addCurve(curve, leftLoc, rightLoc)\n }\n addRingBothSides(coord, distance) {\n this.addRingSide(coord, distance, Position.LEFT, Location.EXTERIOR, Location.INTERIOR)\n this.addRingSide(coord, distance, Position.RIGHT, Location.INTERIOR, Location.EXTERIOR)\n }\n addPoint(p) {\n if (this._distance <= 0.0) return null\n const coord = p.getCoordinates()\n const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n }\n addPolygon(p) {\n let offsetDistance = this._distance\n let offsetSide = Position.LEFT\n if (this._distance < 0.0) {\n offsetDistance = -this._distance\n offsetSide = Position.RIGHT\n }\n const shell = p.getExteriorRing()\n const shellCoord = CoordinateArrays.removeRepeatedPoints(shell.getCoordinates())\n if (this._distance < 0.0 && this.isErodedCompletely(shell, this._distance)) return null\n if (this._distance <= 0.0 && shellCoord.length < 3) return null\n this.addRingSide(shellCoord, offsetDistance, offsetSide, Location.EXTERIOR, Location.INTERIOR)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n const holeCoord = CoordinateArrays.removeRepeatedPoints(hole.getCoordinates())\n if (this._distance > 0.0 && this.isErodedCompletely(hole, -this._distance)) continue\n this.addRingSide(holeCoord, offsetDistance, Position.opposite(offsetSide), Location.INTERIOR, Location.EXTERIOR)\n }\n }\n isTriangleErodedCompletely(triangleCoord, bufferDistance) {\n const tri = new Triangle(triangleCoord[0], triangleCoord[1], triangleCoord[2])\n const inCentre = tri.inCentre()\n const distToCentre = Distance.pointToSegment(inCentre, tri.p0, tri.p1)\n return distToCentre < Math.abs(bufferDistance)\n }\n addLineString(line) {\n if (this._curveBuilder.isLineOffsetEmpty(this._distance)) return null\n const coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates())\n if (CoordinateArrays.isRing(coord) && !this._curveBuilder.getBufferParameters().isSingleSided()) {\n this.addRingBothSides(coord, this._distance)\n } else {\n const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n }\n }\n addCurve(coord, leftLoc, rightLoc) {\n if (coord === null || coord.length < 2) return null\n const e = new NodedSegmentString(coord, new Label(0, Location.BOUNDARY, leftLoc, rightLoc))\n this._curveList.add(e)\n }\n getCurves() {\n this.add(this._inputGeom)\n return this._curveList\n }\n add(g) {\n if (g.isEmpty()) return null\n if (g instanceof Polygon) this.addPolygon(g); else if (g instanceof LineString) this.addLineString(g); else if (g instanceof Point) this.addPoint(g); else if (g instanceof MultiPoint) this.addCollection(g); else if (g instanceof MultiLineString) this.addCollection(g); else if (g instanceof MultiPolygon) this.addCollection(g); else if (g instanceof GeometryCollection) this.addCollection(g); else throw new UnsupportedOperationException(g.getGeometryType())\n }\n isErodedCompletely(ring, bufferDistance) {\n const ringCoord = ring.getCoordinates()\n if (ringCoord.length < 4) return bufferDistance < 0\n if (ringCoord.length === 4) return this.isTriangleErodedCompletely(ringCoord, bufferDistance)\n const env = ring.getEnvelopeInternal()\n const envMinDimension = Math.min(env.getHeight(), env.getWidth())\n if (bufferDistance < 0.0 && 2 * Math.abs(bufferDistance) > envMinDimension) return true\n return false\n }\n addCollection(gc) {\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.add(g)\n }\n }\n}\n","export default class PointOnGeometryLocator {\n locate(p) {}\n}\n","import Iterator from '../../../../java/util/Iterator.js'\nimport NoSuchElementException from '../../../../java/util/NoSuchElementException.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nexport default class GeometryCollectionIterator {\n constructor() {\n GeometryCollectionIterator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parent = null\n this._atStart = null\n this._max = null\n this._index = null\n this._subcollectionIterator = null\n const parent = arguments[0]\n this._parent = parent\n this._atStart = true\n this._index = 0\n this._max = parent.getNumGeometries()\n }\n static isAtomic(geom) {\n return !(geom instanceof GeometryCollection)\n }\n next() {\n if (this._atStart) {\n this._atStart = false\n if (GeometryCollectionIterator.isAtomic(this._parent)) this._index++\n return this._parent\n }\n if (this._subcollectionIterator !== null) \n if (this._subcollectionIterator.hasNext()) \n return this._subcollectionIterator.next()\n else \n this._subcollectionIterator = null\n \n \n if (this._index >= this._max) \n throw new NoSuchElementException()\n \n const obj = this._parent.getGeometryN(this._index++)\n if (obj instanceof GeometryCollection) {\n this._subcollectionIterator = new GeometryCollectionIterator(obj)\n return this._subcollectionIterator.next()\n }\n return obj\n }\n remove() {\n throw new UnsupportedOperationException(this.getClass().getName())\n }\n hasNext() {\n if (this._atStart) \n return true\n \n if (this._subcollectionIterator !== null) {\n if (this._subcollectionIterator.hasNext()) \n return true\n \n this._subcollectionIterator = null\n }\n if (this._index >= this._max) \n return false\n \n return true\n }\n get interfaces_() {\n return [Iterator]\n }\n}\n","import Location from '../../geom/Location.js'\nimport Polygon from '../../geom/Polygon.js'\nimport PointLocation from '../PointLocation.js'\nimport PointOnGeometryLocator from './PointOnGeometryLocator.js'\nimport GeometryCollectionIterator from '../../geom/GeometryCollectionIterator.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nexport default class SimplePointInAreaLocator {\n constructor() {\n SimplePointInAreaLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = null\n const geom = arguments[0]\n this._geom = geom\n }\n static locatePointInPolygon(p, poly) {\n if (poly.isEmpty()) return Location.EXTERIOR\n const shell = poly.getExteriorRing()\n const shellLoc = SimplePointInAreaLocator.locatePointInRing(p, shell)\n if (shellLoc !== Location.INTERIOR) return shellLoc\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n const hole = poly.getInteriorRingN(i)\n const holeLoc = SimplePointInAreaLocator.locatePointInRing(p, hole)\n if (holeLoc === Location.BOUNDARY) return Location.BOUNDARY\n if (holeLoc === Location.INTERIOR) return Location.EXTERIOR\n }\n return Location.INTERIOR\n }\n static locatePointInRing(p, ring) {\n if (!ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return PointLocation.locateInRing(p, ring.getCoordinates())\n }\n static containsPointInPolygon(p, poly) {\n return Location.EXTERIOR !== SimplePointInAreaLocator.locatePointInPolygon(p, poly)\n }\n static locateInGeometry(p, geom) {\n if (geom instanceof Polygon) \n return SimplePointInAreaLocator.locatePointInPolygon(p, geom)\n \n if (geom instanceof GeometryCollection) {\n const geomi = new GeometryCollectionIterator(geom)\n while (geomi.hasNext()) {\n const g2 = geomi.next()\n if (g2 !== geom) {\n const loc = SimplePointInAreaLocator.locateInGeometry(p, g2)\n if (loc !== Location.EXTERIOR) return loc\n }\n }\n }\n return Location.EXTERIOR\n }\n static isContained(p, geom) {\n return Location.EXTERIOR !== SimplePointInAreaLocator.locate(p, geom)\n }\n static locate(p, geom) {\n if (geom.isEmpty()) return Location.EXTERIOR\n if (!geom.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return SimplePointInAreaLocator.locateInGeometry(p, geom)\n }\n locate(p) {\n return SimplePointInAreaLocator.locate(p, this._geom)\n }\n get interfaces_() {\n return [PointOnGeometryLocator]\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport System from '../../../../java/lang/System.js'\nimport SimplePointInAreaLocator from '../algorithm/locate/SimplePointInAreaLocator.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Assert from '../util/Assert.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeEndStar {\n constructor() {\n EdgeEndStar.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edgeMap = new TreeMap()\n this._edgeList = null\n this._ptInAreaLocation = [Location.NONE, Location.NONE]\n }\n getNextCW(ee) {\n this.getEdges()\n const i = this._edgeList.indexOf(ee)\n let iNextCW = i - 1\n if (i === 0) iNextCW = this._edgeList.size() - 1\n return this._edgeList.get(iNextCW)\n }\n propagateSideLabels(geomIndex) {\n let startLoc = Location.NONE\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (label.isArea(geomIndex) && label.getLocation(geomIndex, Position.LEFT) !== Location.NONE) startLoc = label.getLocation(geomIndex, Position.LEFT)\n }\n if (startLoc === Location.NONE) return null\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (label.getLocation(geomIndex, Position.ON) === Location.NONE) label.setLocation(geomIndex, Position.ON, currLoc)\n if (label.isArea(geomIndex)) {\n const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n if (rightLoc !== Location.NONE) {\n if (rightLoc !== currLoc) throw new TopologyException('side location conflict', e.getCoordinate())\n if (leftLoc === Location.NONE) \n Assert.shouldNeverReachHere('found single null side (at ' + e.getCoordinate() + ')')\n \n currLoc = leftLoc\n } else {\n Assert.isTrue(label.getLocation(geomIndex, Position.LEFT) === Location.NONE, 'found single null side')\n label.setLocation(geomIndex, Position.RIGHT, currLoc)\n label.setLocation(geomIndex, Position.LEFT, currLoc)\n }\n }\n }\n }\n getCoordinate() {\n const it = this.iterator()\n if (!it.hasNext()) return null\n const e = it.next()\n return e.getCoordinate()\n }\n print(out) {\n System.out.println('EdgeEndStar: ' + this.getCoordinate())\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n e.print(out)\n }\n }\n isAreaLabelsConsistent(geomGraph) {\n this.computeEdgeEndLabels(geomGraph.getBoundaryNodeRule())\n return this.checkAreaLabelsConsistent(0)\n }\n checkAreaLabelsConsistent(geomIndex) {\n const edges = this.getEdges()\n if (edges.size() <= 0) return true\n const lastEdgeIndex = edges.size() - 1\n const startLabel = edges.get(lastEdgeIndex).getLabel()\n const startLoc = startLabel.getLocation(geomIndex, Position.LEFT)\n Assert.isTrue(startLoc !== Location.NONE, 'Found unlabelled area edge')\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n Assert.isTrue(label.isArea(geomIndex), 'Found non-area edge')\n const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n if (leftLoc === rightLoc) \n return false\n \n if (rightLoc !== currLoc) \n return false\n \n currLoc = leftLoc\n }\n return true\n }\n findIndex(eSearch) {\n this.iterator()\n for (let i = 0; i < this._edgeList.size(); i++) {\n const e = this._edgeList.get(i)\n if (e === eSearch) return i\n }\n return -1\n }\n iterator() {\n return this.getEdges().iterator()\n }\n getEdges() {\n if (this._edgeList === null) \n this._edgeList = new ArrayList(this._edgeMap.values())\n \n return this._edgeList\n }\n getLocation(geomIndex, p, geom) {\n if (this._ptInAreaLocation[geomIndex] === Location.NONE) \n this._ptInAreaLocation[geomIndex] = SimplePointInAreaLocator.locate(p, geom[geomIndex].getGeometry())\n \n return this._ptInAreaLocation[geomIndex]\n }\n toString() {\n const buf = new StringBuffer()\n buf.append('EdgeEndStar: ' + this.getCoordinate())\n buf.append('\\n')\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n buf.append(e)\n buf.append('\\n')\n }\n return buf.toString()\n }\n computeEdgeEndLabels(boundaryNodeRule) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n ee.computeLabel(boundaryNodeRule)\n }\n }\n computeLabelling(geomGraph) {\n this.computeEdgeEndLabels(geomGraph[0].getBoundaryNodeRule())\n this.propagateSideLabels(0)\n this.propagateSideLabels(1)\n const hasDimensionalCollapseEdge = [false, false]\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n for (let geomi = 0; geomi < 2; geomi++) \n if (label.isLine(geomi) && label.getLocation(geomi) === Location.BOUNDARY) hasDimensionalCollapseEdge[geomi] = true\n \n }\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n for (let geomi = 0; geomi < 2; geomi++) \n if (label.isAnyNull(geomi)) {\n let loc = Location.NONE\n if (hasDimensionalCollapseEdge[geomi]) {\n loc = Location.EXTERIOR\n } else {\n const p = e.getCoordinate()\n loc = this.getLocation(geomi, p, geomGraph)\n }\n label.setAllLocationsIfNull(geomi, loc)\n }\n \n }\n }\n getDegree() {\n return this._edgeMap.size()\n }\n insertEdgeEnd(e, obj) {\n this._edgeMap.put(e, obj)\n this._edgeList = null\n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport EdgeEndStar from './EdgeEndStar.js'\nimport System from '../../../../java/lang/System.js'\nimport Label from './Label.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Quadrant from './Quadrant.js'\nimport Assert from '../util/Assert.js'\nexport default class DirectedEdgeStar extends EdgeEndStar {\n constructor() {\n super()\n DirectedEdgeStar.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._resultAreaEdgeList = null\n this._label = null\n this._SCANNING_FOR_INCOMING = 1\n this._LINKING_TO_OUTGOING = 2\n }\n linkResultDirectedEdges() {\n this.getResultAreaEdges()\n let firstOut = null\n let incoming = null\n let state = this._SCANNING_FOR_INCOMING\n for (let i = 0; i < this._resultAreaEdgeList.size(); i++) {\n const nextOut = this._resultAreaEdgeList.get(i)\n const nextIn = nextOut.getSym()\n if (!nextOut.getLabel().isArea()) continue\n if (firstOut === null && nextOut.isInResult()) firstOut = nextOut\n switch (state) {\n case this._SCANNING_FOR_INCOMING:\n if (!nextIn.isInResult()) continue\n incoming = nextIn\n state = this._LINKING_TO_OUTGOING\n break\n case this._LINKING_TO_OUTGOING:\n if (!nextOut.isInResult()) continue\n incoming.setNext(nextOut)\n state = this._SCANNING_FOR_INCOMING\n break\n }\n }\n if (state === this._LINKING_TO_OUTGOING) {\n if (firstOut === null) throw new TopologyException('no outgoing dirEdge found', this.getCoordinate())\n Assert.isTrue(firstOut.isInResult(), 'unable to link last incoming dirEdge')\n incoming.setNext(firstOut)\n }\n }\n insert(ee) {\n const de = ee\n this.insertEdgeEnd(de, de)\n }\n getRightmostEdge() {\n const edges = this.getEdges()\n const size = edges.size()\n if (size < 1) return null\n const de0 = edges.get(0)\n if (size === 1) return de0\n const deLast = edges.get(size - 1)\n const quad0 = de0.getQuadrant()\n const quad1 = deLast.getQuadrant()\n if (Quadrant.isNorthern(quad0) && Quadrant.isNorthern(quad1)) {\n return de0\n } else if (!Quadrant.isNorthern(quad0) && !Quadrant.isNorthern(quad1)) {\n return deLast\n } else {\n const nonHorizontalEdge = null\n if (de0.getDy() !== 0) return de0; else if (deLast.getDy() !== 0) return deLast\n }\n Assert.shouldNeverReachHere('found two horizontal edges incident on node')\n return null\n }\n print(out) {\n System.out.println('DirectedEdgeStar: ' + this.getCoordinate())\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n out.print('out ')\n de.print(out)\n out.println()\n out.print('in ')\n de.getSym().print(out)\n out.println()\n }\n }\n getResultAreaEdges() {\n if (this._resultAreaEdgeList !== null) return this._resultAreaEdgeList\n this._resultAreaEdgeList = new ArrayList()\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() || de.getSym().isInResult()) this._resultAreaEdgeList.add(de)\n }\n return this._resultAreaEdgeList\n }\n updateLabelling(nodeLabel) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n label.setAllLocationsIfNull(0, nodeLabel.getLocation(0))\n label.setAllLocationsIfNull(1, nodeLabel.getLocation(1))\n }\n }\n linkAllDirectedEdges() {\n this.getEdges()\n let prevOut = null\n let firstIn = null\n for (let i = this._edgeList.size() - 1; i >= 0; i--) {\n const nextOut = this._edgeList.get(i)\n const nextIn = nextOut.getSym()\n if (firstIn === null) firstIn = nextIn\n if (prevOut !== null) nextIn.setNext(prevOut)\n prevOut = nextOut\n }\n firstIn.setNext(prevOut)\n }\n computeDepths() {\n if (arguments.length === 1) {\n const de = arguments[0]\n const edgeIndex = this.findIndex(de)\n const startDepth = de.getDepth(Position.LEFT)\n const targetLastDepth = de.getDepth(Position.RIGHT)\n const nextDepth = this.computeDepths(edgeIndex + 1, this._edgeList.size(), startDepth)\n const lastDepth = this.computeDepths(0, edgeIndex, nextDepth)\n if (lastDepth !== targetLastDepth) throw new TopologyException('depth mismatch at ' + de.getCoordinate())\n } else if (arguments.length === 3) {\n const startIndex = arguments[0], endIndex = arguments[1], startDepth = arguments[2]\n let currDepth = startDepth\n for (let i = startIndex; i < endIndex; i++) {\n const nextDe = this._edgeList.get(i)\n nextDe.setEdgeDepths(Position.RIGHT, currDepth)\n currDepth = nextDe.getDepth(Position.LEFT)\n }\n return currDepth\n }\n }\n mergeSymLabels() {\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n label.merge(de.getSym().getLabel())\n }\n }\n linkMinimalDirectedEdges(er) {\n let firstOut = null\n let incoming = null\n let state = this._SCANNING_FOR_INCOMING\n for (let i = this._resultAreaEdgeList.size() - 1; i >= 0; i--) {\n const nextOut = this._resultAreaEdgeList.get(i)\n const nextIn = nextOut.getSym()\n if (firstOut === null && nextOut.getEdgeRing() === er) firstOut = nextOut\n switch (state) {\n case this._SCANNING_FOR_INCOMING:\n if (nextIn.getEdgeRing() !== er) continue\n incoming = nextIn\n state = this._LINKING_TO_OUTGOING\n break\n case this._LINKING_TO_OUTGOING:\n if (nextOut.getEdgeRing() !== er) continue\n incoming.setNextMin(nextOut)\n state = this._SCANNING_FOR_INCOMING\n break\n }\n }\n if (state === this._LINKING_TO_OUTGOING) {\n Assert.isTrue(firstOut !== null, 'found null for first outgoing dirEdge')\n Assert.isTrue(firstOut.getEdgeRing() === er, 'unable to link last incoming dirEdge')\n incoming.setNextMin(firstOut)\n }\n }\n getOutgoingDegree() {\n if (arguments.length === 0) {\n let degree = 0\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult()) degree++\n }\n return degree\n } else if (arguments.length === 1) {\n const er = arguments[0]\n let degree = 0\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getEdgeRing() === er) degree++\n }\n return degree\n }\n }\n getLabel() {\n return this._label\n }\n findCoveredLineEdges() {\n let startLoc = Location.NONE\n for (let it = this.iterator(); it.hasNext(); ) {\n const nextOut = it.next()\n const nextIn = nextOut.getSym()\n if (!nextOut.isLineEdge()) {\n if (nextOut.isInResult()) {\n startLoc = Location.INTERIOR\n break\n }\n if (nextIn.isInResult()) {\n startLoc = Location.EXTERIOR\n break\n }\n }\n }\n if (startLoc === Location.NONE) return null\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const nextOut = it.next()\n const nextIn = nextOut.getSym()\n if (nextOut.isLineEdge()) {\n nextOut.getEdge().setCovered(currLoc === Location.INTERIOR)\n } else {\n if (nextOut.isInResult()) currLoc = Location.EXTERIOR\n if (nextIn.isInResult()) currLoc = Location.INTERIOR\n }\n }\n }\n computeLabelling(geom) {\n super.computeLabelling.call(this, geom)\n this._label = new Label(Location.NONE)\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n const e = ee.getEdge()\n const eLabel = e.getLabel()\n for (let i = 0; i < 2; i++) {\n const eLoc = eLabel.getLocation(i)\n if (eLoc === Location.INTERIOR || eLoc === Location.BOUNDARY) this._label.setLocation(i, Location.INTERIOR)\n }\n }\n }\n}\n","import DirectedEdgeStar from '../../geomgraph/DirectedEdgeStar.js'\nimport Node from '../../geomgraph/Node.js'\nimport NodeFactory from '../../geomgraph/NodeFactory.js'\nexport default class OverlayNodeFactory extends NodeFactory {\n constructor() {\n super()\n }\n createNode(coord) {\n return new Node(coord, new DirectedEdgeStar())\n }\n}\n","import Comparable from '../../../../java/lang/Comparable.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nexport default class OrientedCoordinateArray {\n constructor() {\n OrientedCoordinateArray.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._orientation = null\n const pts = arguments[0]\n this._pts = pts\n this._orientation = OrientedCoordinateArray.orientation(pts)\n }\n static orientation(pts) {\n return CoordinateArrays.increasingDirection(pts) === 1\n }\n static compareOriented(pts1, orientation1, pts2, orientation2) {\n const dir1 = orientation1 ? 1 : -1\n const dir2 = orientation2 ? 1 : -1\n const limit1 = orientation1 ? pts1.length : -1\n const limit2 = orientation2 ? pts2.length : -1\n let i1 = orientation1 ? 0 : pts1.length - 1\n let i2 = orientation2 ? 0 : pts2.length - 1\n while (true) {\n const compPt = pts1[i1].compareTo(pts2[i2])\n if (compPt !== 0) return compPt\n i1 += dir1\n i2 += dir2\n const done1 = i1 === limit1\n const done2 = i2 === limit2\n if (done1 && !done2) return -1\n if (!done1 && done2) return 1\n if (done1 && done2) return 0\n }\n }\n compareTo(o1) {\n const oca = o1\n const comp = OrientedCoordinateArray.compareOriented(this._pts, this._orientation, oca._pts, oca._orientation)\n return comp\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import OrientedCoordinateArray from '../noding/OrientedCoordinateArray.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeList {\n constructor() {\n EdgeList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edges = new ArrayList()\n this._ocaMap = new TreeMap()\n }\n print(out) {\n out.print('MULTILINESTRING ( ')\n for (let j = 0; j < this._edges.size(); j++) {\n const e = this._edges.get(j)\n if (j > 0) out.print(',')\n out.print('(')\n const pts = e.getCoordinates()\n for (let i = 0; i < pts.length; i++) {\n if (i > 0) out.print(',')\n out.print(pts[i].x + ' ' + pts[i].y)\n }\n out.println(')')\n }\n out.print(') ')\n }\n addAll(edgeColl) {\n for (let i = edgeColl.iterator(); i.hasNext(); ) \n this.add(i.next())\n \n }\n findEdgeIndex(e) {\n for (let i = 0; i < this._edges.size(); i++) \n if (this._edges.get(i).equals(e)) return i\n \n return -1\n }\n iterator() {\n return this._edges.iterator()\n }\n getEdges() {\n return this._edges\n }\n get(i) {\n return this._edges.get(i)\n }\n findEqualEdge(e) {\n const oca = new OrientedCoordinateArray(e.getCoordinates())\n const matchEdge = this._ocaMap.get(oca)\n return matchEdge\n }\n add(e) {\n this._edges.add(e)\n const oca = new OrientedCoordinateArray(e.getCoordinates())\n this._ocaMap.put(oca, e)\n }\n}\n","export default class SegmentIntersector {\n processIntersections(e0, segIndex0, e1, segIndex1) {}\n isDone() {}\n}\n","import SegmentIntersector from './SegmentIntersector.js'\nexport default class IntersectionAdder {\n constructor() {\n IntersectionAdder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hasIntersection = false\n this._hasProper = false\n this._hasProperInterior = false\n this._hasInterior = false\n this._properIntersectionPoint = null\n this._li = null\n this._isSelfIntersection = null\n this.numIntersections = 0\n this.numInteriorIntersections = 0\n this.numProperIntersections = 0\n this.numTests = 0\n const li = arguments[0]\n this._li = li\n }\n static isAdjacentSegments(i1, i2) {\n return Math.abs(i1 - i2) === 1\n }\n isTrivialIntersection(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1) \n if (this._li.getIntersectionNum() === 1) {\n if (IntersectionAdder.isAdjacentSegments(segIndex0, segIndex1)) return true\n if (e0.isClosed()) {\n const maxSegIndex = e0.size() - 1\n if (segIndex0 === 0 && segIndex1 === maxSegIndex || segIndex1 === 0 && segIndex0 === maxSegIndex) \n return true\n \n }\n }\n \n return false\n }\n getProperIntersectionPoint() {\n return this._properIntersectionPoint\n }\n hasProperInteriorIntersection() {\n return this._hasProperInterior\n }\n getLineIntersector() {\n return this._li\n }\n hasProperIntersection() {\n return this._hasProper\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n this.numTests++\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) {\n this.numIntersections++\n if (this._li.isInteriorIntersection()) {\n this.numInteriorIntersections++\n this._hasInterior = true\n }\n if (!this.isTrivialIntersection(e0, segIndex0, e1, segIndex1)) {\n this._hasIntersection = true\n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n if (this._li.isProper()) {\n this.numProperIntersections++\n this._hasProper = true\n this._hasProperInterior = true\n }\n }\n }\n }\n hasIntersection() {\n return this._hasIntersection\n }\n isDone() {\n return false\n }\n hasInteriorIntersection() {\n return this._hasInterior\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nexport default class EdgeIntersection {\n constructor() {\n EdgeIntersection.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.coord = null\n this.segmentIndex = null\n this.dist = null\n const coord = arguments[0], segmentIndex = arguments[1], dist = arguments[2]\n this.coord = new Coordinate(coord)\n this.segmentIndex = segmentIndex\n this.dist = dist\n }\n getSegmentIndex() {\n return this.segmentIndex\n }\n getCoordinate() {\n return this.coord\n }\n print(out) {\n out.print(this.coord)\n out.print(' seg # = ' + this.segmentIndex)\n out.println(' dist = ' + this.dist)\n }\n compareTo(obj) {\n const other = obj\n return this.compare(other.segmentIndex, other.dist)\n }\n isEndPoint(maxSegmentIndex) {\n if (this.segmentIndex === 0 && this.dist === 0.0) return true\n if (this.segmentIndex === maxSegmentIndex) return true\n return false\n }\n toString() {\n return this.coord + ' seg # = ' + this.segmentIndex + ' dist = ' + this.dist\n }\n getDistance() {\n return this.dist\n }\n compare(segmentIndex, dist) {\n if (this.segmentIndex < segmentIndex) return -1\n if (this.segmentIndex > segmentIndex) return 1\n if (this.dist < dist) return -1\n if (this.dist > dist) return 1\n return 0\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import EdgeIntersection from './EdgeIntersection.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Label from './Label.js'\nimport Edge from './Edge.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeIntersectionList {\n constructor() {\n EdgeIntersectionList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeMap = new TreeMap()\n this.edge = null\n const edge = arguments[0]\n this.edge = edge\n }\n print(out) {\n out.println('Intersections:')\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n ei.print(out)\n }\n }\n iterator() {\n return this._nodeMap.values().iterator()\n }\n addSplitEdges(edgeList) {\n this.addEndpoints()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const newEdge = this.createSplitEdge(eiPrev, ei)\n edgeList.add(newEdge)\n eiPrev = ei\n }\n }\n addEndpoints() {\n const maxSegIndex = this.edge.pts.length - 1\n this.add(this.edge.pts[0], 0, 0.0)\n this.add(this.edge.pts[maxSegIndex], maxSegIndex, 0.0)\n }\n createSplitEdge(ei0, ei1) {\n let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n const lastSegStartPt = this.edge.pts[ei1.segmentIndex]\n const useIntPt1 = ei1.dist > 0.0 || !ei1.coord.equals2D(lastSegStartPt)\n if (!useIntPt1) \n npts--\n \n const pts = new Array(npts).fill(null)\n let ipt = 0\n pts[ipt++] = new Coordinate(ei0.coord)\n for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n pts[ipt++] = this.edge.pts[i]\n \n if (useIntPt1) pts[ipt] = ei1.coord\n return new Edge(pts, new Label(this.edge._label))\n }\n add(intPt, segmentIndex, dist) {\n const eiNew = new EdgeIntersection(intPt, segmentIndex, dist)\n const ei = this._nodeMap.get(eiNew)\n if (ei !== null) \n return ei\n \n this._nodeMap.put(eiNew, eiNew)\n return eiNew\n }\n isIntersection(pt) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n if (ei.coord.equals(pt)) return true\n }\n return false\n }\n}\n","import Location from './Location.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Dimension from './Dimension.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nexport default class IntersectionMatrix {\n constructor() {\n IntersectionMatrix.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._matrix = null\n if (arguments.length === 0) {\n this._matrix = Array(3).fill().map(() => Array(3))\n this.setAll(Dimension.FALSE)\n } else if (arguments.length === 1) {\n if (typeof arguments[0] === 'string') {\n const elements = arguments[0]\n IntersectionMatrix.constructor_.call(this)\n this.set(elements)\n } else if (arguments[0] instanceof IntersectionMatrix) {\n const other = arguments[0]\n IntersectionMatrix.constructor_.call(this)\n this._matrix[Location.INTERIOR][Location.INTERIOR] = other._matrix[Location.INTERIOR][Location.INTERIOR]\n this._matrix[Location.INTERIOR][Location.BOUNDARY] = other._matrix[Location.INTERIOR][Location.BOUNDARY]\n this._matrix[Location.INTERIOR][Location.EXTERIOR] = other._matrix[Location.INTERIOR][Location.EXTERIOR]\n this._matrix[Location.BOUNDARY][Location.INTERIOR] = other._matrix[Location.BOUNDARY][Location.INTERIOR]\n this._matrix[Location.BOUNDARY][Location.BOUNDARY] = other._matrix[Location.BOUNDARY][Location.BOUNDARY]\n this._matrix[Location.BOUNDARY][Location.EXTERIOR] = other._matrix[Location.BOUNDARY][Location.EXTERIOR]\n this._matrix[Location.EXTERIOR][Location.INTERIOR] = other._matrix[Location.EXTERIOR][Location.INTERIOR]\n this._matrix[Location.EXTERIOR][Location.BOUNDARY] = other._matrix[Location.EXTERIOR][Location.BOUNDARY]\n this._matrix[Location.EXTERIOR][Location.EXTERIOR] = other._matrix[Location.EXTERIOR][Location.EXTERIOR]\n }\n }\n }\n static matches() {\n if (Number.isInteger(arguments[0]) && typeof arguments[1] === 'string') {\n const actualDimensionValue = arguments[0], requiredDimensionSymbol = arguments[1]\n if (requiredDimensionSymbol === Dimension.SYM_DONTCARE) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_TRUE && (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE)) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_FALSE && actualDimensionValue === Dimension.FALSE) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_P && actualDimensionValue === Dimension.P) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_L && actualDimensionValue === Dimension.L) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_A && actualDimensionValue === Dimension.A) \n return true\n \n return false\n } else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'string') {\n const actualDimensionSymbols = arguments[0], requiredDimensionSymbols = arguments[1]\n const m = new IntersectionMatrix(actualDimensionSymbols)\n return m.matches(requiredDimensionSymbols)\n }\n }\n static isTrue(actualDimensionValue) {\n if (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE) \n return true\n \n return false\n }\n isIntersects() {\n return !this.isDisjoint()\n }\n isCovers() {\n const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n return hasPointInCommon && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n isCoveredBy() {\n const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n return hasPointInCommon && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n }\n set() {\n if (arguments.length === 1) {\n const dimensionSymbols = arguments[0]\n for (let i = 0; i < dimensionSymbols.length; i++) {\n const row = Math.trunc(i / 3)\n const col = i % 3\n this._matrix[row][col] = Dimension.toDimensionValue(dimensionSymbols.charAt(i))\n }\n } else if (arguments.length === 3) {\n const row = arguments[0], column = arguments[1], dimensionValue = arguments[2]\n this._matrix[row][column] = dimensionValue\n }\n }\n isContains() {\n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n setAtLeast() {\n if (arguments.length === 1) {\n const minimumDimensionSymbols = arguments[0]\n for (let i = 0; i < minimumDimensionSymbols.length; i++) {\n const row = Math.trunc(i / 3)\n const col = i % 3\n this.setAtLeast(row, col, Dimension.toDimensionValue(minimumDimensionSymbols.charAt(i)))\n }\n } else if (arguments.length === 3) {\n const row = arguments[0], column = arguments[1], minimumDimensionValue = arguments[2]\n if (this._matrix[row][column] < minimumDimensionValue) \n this._matrix[row][column] = minimumDimensionValue\n \n }\n }\n setAtLeastIfValid(row, column, minimumDimensionValue) {\n if (row >= 0 && column >= 0) \n this.setAtLeast(row, column, minimumDimensionValue)\n \n }\n isWithin() {\n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n }\n isTouches(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA > dimensionOfGeometryB) \n return this.isTouches(dimensionOfGeometryB, dimensionOfGeometryA)\n \n if (dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && (IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY]))\n \n return false\n }\n isOverlaps(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === 1 && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n return false\n }\n isEquals(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA !== dimensionOfGeometryB) \n return false\n \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n toString() {\n const builder = new StringBuilder('123456789')\n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n builder.setCharAt(3 * ai + bi, Dimension.toDimensionSymbol(this._matrix[ai][bi]))\n \n \n return builder.toString()\n }\n setAll(dimensionValue) {\n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n this._matrix[ai][bi] = dimensionValue\n \n \n }\n get(row, column) {\n return this._matrix[row][column]\n }\n transpose() {\n let temp = this._matrix[1][0]\n this._matrix[1][0] = this._matrix[0][1]\n this._matrix[0][1] = temp\n temp = this._matrix[2][0]\n this._matrix[2][0] = this._matrix[0][2]\n this._matrix[0][2] = temp\n temp = this._matrix[2][1]\n this._matrix[2][1] = this._matrix[1][2]\n this._matrix[1][2] = temp\n return this\n }\n matches(requiredDimensionSymbols) {\n if (requiredDimensionSymbols.length !== 9) \n throw new IllegalArgumentException('Should be length 9: ' + requiredDimensionSymbols)\n \n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n if (!IntersectionMatrix.matches(this._matrix[ai][bi], requiredDimensionSymbols.charAt(3 * ai + bi))) \n return false\n \n \n \n return true\n }\n add(im) {\n for (let i = 0; i < 3; i++) \n for (let j = 0; j < 3; j++) \n this.setAtLeast(i, j, im.get(i, j))\n \n \n }\n isDisjoint() {\n return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.INTERIOR][Location.BOUNDARY] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.BOUNDARY] === Dimension.FALSE\n }\n isCrosses(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.L) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === 0\n \n return false\n }\n get interfaces_() {\n return [Cloneable]\n }\n}\n","import Arrays from '../../../../java/util/Arrays.js'\nimport System from '../../../../java/lang/System.js'\nexport default class IntArrayList {\n constructor() {\n IntArrayList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._data = null\n this._size = 0\n if (arguments.length === 0) {\n IntArrayList.constructor_.call(this, 10)\n } else if (arguments.length === 1) {\n const initialCapacity = arguments[0]\n this._data = new Array(initialCapacity).fill(null)\n }\n }\n size() {\n return this._size\n }\n addAll(values) {\n if (values === null) return null\n if (values.length === 0) return null\n this.ensureCapacity(this._size + values.length)\n System.arraycopy(values, 0, this._data, this._size, values.length)\n this._size += values.length\n }\n ensureCapacity(capacity) {\n if (capacity <= this._data.length) return null\n const newLength = Math.max(capacity, this._data.length * 2)\n this._data = Arrays.copyOf(this._data, newLength)\n }\n toArray() {\n const array = new Array(this._size).fill(null)\n System.arraycopy(this._data, 0, array, 0, this._size)\n return array\n }\n add(value) {\n this.ensureCapacity(this._size + 1)\n this._data[this._size] = value\n ++ this._size\n }\n}\n","import IntArrayList from '../../util/IntArrayList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Quadrant from '../Quadrant.js'\nexport default class MonotoneChainIndexer {\n static toIntArray(list) {\n const array = new Array(list.size()).fill(null)\n for (let i = 0; i < array.length; i++) \n array[i] = list.get(i).intValue()\n \n return array\n }\n getChainStartIndices(pts) {\n let start = 0\n const startIndexList = new IntArrayList(Math.trunc(pts.length / 2))\n startIndexList.add(start)\n do {\n const last = this.findChainEnd(pts, start)\n startIndexList.add(last)\n start = last\n } while (start < pts.length - 1)\n return startIndexList.toArray()\n }\n findChainEnd(pts, start) {\n const chainQuad = Quadrant.quadrant(pts[start], pts[start + 1])\n let last = start + 1\n while (last < pts.length) {\n const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n if (quad !== chainQuad) break\n last++\n }\n return last - 1\n }\n OLDgetChainStartIndices(pts) {\n let start = 0\n const startIndexList = new ArrayList()\n startIndexList.add(start)\n do {\n const last = this.findChainEnd(pts, start)\n startIndexList.add(last)\n start = last\n } while (start < pts.length - 1)\n const startIndex = MonotoneChainIndexer.toIntArray(startIndexList)\n return startIndex\n }\n}\n","import MonotoneChainIndexer from './MonotoneChainIndexer.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class MonotoneChainEdge {\n constructor() {\n MonotoneChainEdge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.e = null\n this.pts = null\n this.startIndex = null\n const e = arguments[0]\n this.e = e\n this.pts = e.getCoordinates()\n const mcb = new MonotoneChainIndexer()\n this.startIndex = mcb.getChainStartIndices(this.pts)\n }\n getCoordinates() {\n return this.pts\n }\n getMaxX(chainIndex) {\n const x1 = this.pts[this.startIndex[chainIndex]].x\n const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n return x1 > x2 ? x1 : x2\n }\n getMinX(chainIndex) {\n const x1 = this.pts[this.startIndex[chainIndex]].x\n const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n return x1 < x2 ? x1 : x2\n }\n computeIntersectsForChain() {\n if (arguments.length === 4) {\n const chainIndex0 = arguments[0], mce = arguments[1], chainIndex1 = arguments[2], si = arguments[3]\n this.computeIntersectsForChain(this.startIndex[chainIndex0], this.startIndex[chainIndex0 + 1], mce, mce.startIndex[chainIndex1], mce.startIndex[chainIndex1 + 1], si)\n } else if (arguments.length === 6) {\n const start0 = arguments[0], end0 = arguments[1], mce = arguments[2], start1 = arguments[3], end1 = arguments[4], ei = arguments[5]\n if (end0 - start0 === 1 && end1 - start1 === 1) {\n ei.addIntersections(this.e, start0, mce.e, start1)\n return null\n }\n if (!this.overlaps(start0, end0, mce, start1, end1)) return null\n const mid0 = Math.trunc((start0 + end0) / 2)\n const mid1 = Math.trunc((start1 + end1) / 2)\n if (start0 < mid0) {\n if (start1 < mid1) this.computeIntersectsForChain(start0, mid0, mce, start1, mid1, ei)\n if (mid1 < end1) this.computeIntersectsForChain(start0, mid0, mce, mid1, end1, ei)\n }\n if (mid0 < end0) {\n if (start1 < mid1) this.computeIntersectsForChain(mid0, end0, mce, start1, mid1, ei)\n if (mid1 < end1) this.computeIntersectsForChain(mid0, end0, mce, mid1, end1, ei)\n }\n }\n }\n overlaps(start0, end0, mce, start1, end1) {\n return Envelope.intersects(this.pts[start0], this.pts[end0], mce.pts[start1], mce.pts[end1])\n }\n getStartIndexes() {\n return this.startIndex\n }\n computeIntersects(mce, si) {\n for (let i = 0; i < this.startIndex.length - 1; i++) \n for (let j = 0; j < mce.startIndex.length - 1; j++) \n this.computeIntersectsForChain(i, mce, j, si)\n \n \n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nexport default class Depth {\n constructor() {\n Depth.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._depth = Array(2).fill().map(() => Array(3))\n for (let i = 0; i < 2; i++) \n for (let j = 0; j < 3; j++) \n this._depth[i][j] = Depth.NULL_VALUE\n \n \n }\n static depthAtLocation(location) {\n if (location === Location.EXTERIOR) return 0\n if (location === Location.INTERIOR) return 1\n return Depth.NULL_VALUE\n }\n getDepth(geomIndex, posIndex) {\n return this._depth[geomIndex][posIndex]\n }\n setDepth(geomIndex, posIndex, depthValue) {\n this._depth[geomIndex][posIndex] = depthValue\n }\n isNull() {\n if (arguments.length === 0) {\n for (let i = 0; i < 2; i++) \n for (let j = 0; j < 3; j++) \n if (this._depth[i][j] !== Depth.NULL_VALUE) return false\n \n \n return true\n } else if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this._depth[geomIndex][1] === Depth.NULL_VALUE\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], posIndex = arguments[1]\n return this._depth[geomIndex][posIndex] === Depth.NULL_VALUE\n }\n }\n normalize() {\n for (let i = 0; i < 2; i++) \n if (!this.isNull(i)) {\n let minDepth = this._depth[i][1]\n if (this._depth[i][2] < minDepth) minDepth = this._depth[i][2]\n if (minDepth < 0) minDepth = 0\n for (let j = 1; j < 3; j++) {\n let newValue = 0\n if (this._depth[i][j] > minDepth) newValue = 1\n this._depth[i][j] = newValue\n }\n }\n \n }\n getDelta(geomIndex) {\n return this._depth[geomIndex][Position.RIGHT] - this._depth[geomIndex][Position.LEFT]\n }\n getLocation(geomIndex, posIndex) {\n if (this._depth[geomIndex][posIndex] <= 0) return Location.EXTERIOR\n return Location.INTERIOR\n }\n toString() {\n return 'A: ' + this._depth[0][1] + ',' + this._depth[0][2] + ' B: ' + this._depth[1][1] + ',' + this._depth[1][2]\n }\n add() {\n if (arguments.length === 1) {\n const lbl = arguments[0]\n for (let i = 0; i < 2; i++) \n for (let j = 1; j < 3; j++) {\n const loc = lbl.getLocation(i, j)\n if (loc === Location.EXTERIOR || loc === Location.INTERIOR) \n if (this.isNull(i, j)) \n this._depth[i][j] = Depth.depthAtLocation(loc)\n else this._depth[i][j] += Depth.depthAtLocation(loc)\n \n }\n \n } else if (arguments.length === 3) {\n const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n if (location === Location.INTERIOR) this._depth[geomIndex][posIndex]++\n }\n }\n}\nDepth.NULL_VALUE = -1\n","import EdgeIntersectionList from './EdgeIntersectionList.js'\nimport IntersectionMatrix from '../geom/IntersectionMatrix.js'\nimport MonotoneChainEdge from './index/MonotoneChainEdge.js'\nimport Position from './Position.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Label from './Label.js'\nimport Envelope from '../geom/Envelope.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nimport Depth from './Depth.js'\nimport GraphComponent from './GraphComponent.js'\nexport default class Edge extends GraphComponent {\n constructor() {\n super()\n Edge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.pts = null\n this._env = null\n this.eiList = new EdgeIntersectionList(this)\n this._name = null\n this._mce = null\n this._isIsolated = true\n this._depth = new Depth()\n this._depthDelta = 0\n if (arguments.length === 1) {\n const pts = arguments[0]\n Edge.constructor_.call(this, pts, null)\n } else if (arguments.length === 2) {\n const pts = arguments[0], label = arguments[1]\n this.pts = pts\n this._label = label\n }\n }\n static updateIM() {\n if (arguments.length === 2 && (arguments[1] instanceof IntersectionMatrix && arguments[0] instanceof Label)) {\n const label = arguments[0], im = arguments[1]\n im.setAtLeastIfValid(label.getLocation(0, Position.ON), label.getLocation(1, Position.ON), 1)\n if (label.isArea()) {\n im.setAtLeastIfValid(label.getLocation(0, Position.LEFT), label.getLocation(1, Position.LEFT), 2)\n im.setAtLeastIfValid(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), 2)\n }\n } else {\n return super.updateIM.apply(this, arguments)\n }\n }\n getDepth() {\n return this._depth\n }\n getCollapsedEdge() {\n const newPts = new Array(2).fill(null)\n newPts[0] = this.pts[0]\n newPts[1] = this.pts[1]\n const newe = new Edge(newPts, Label.toLineLabel(this._label))\n return newe\n }\n isIsolated() {\n return this._isIsolated\n }\n getCoordinates() {\n return this.pts\n }\n setIsolated(isIsolated) {\n this._isIsolated = isIsolated\n }\n setName(name) {\n this._name = name\n }\n equals(o) {\n if (!(o instanceof Edge)) return false\n const e = o\n if (this.pts.length !== e.pts.length) return false\n let isEqualForward = true\n let isEqualReverse = true\n let iRev = this.pts.length\n for (let i = 0; i < this.pts.length; i++) {\n if (!this.pts[i].equals2D(e.pts[i])) \n isEqualForward = false\n \n if (!this.pts[i].equals2D(e.pts[-- iRev])) \n isEqualReverse = false\n \n if (!isEqualForward && !isEqualReverse) return false\n }\n return true\n }\n getCoordinate() {\n if (arguments.length === 0) {\n if (this.pts.length > 0) return this.pts[0]\n return null\n } else if (arguments.length === 1) {\n const i = arguments[0]\n return this.pts[i]\n }\n }\n print(out) {\n out.print('edge ' + this._name + ': ')\n out.print('LINESTRING (')\n for (let i = 0; i < this.pts.length; i++) {\n if (i > 0) out.print(',')\n out.print(this.pts[i].x + ' ' + this.pts[i].y)\n }\n out.print(') ' + this._label + ' ' + this._depthDelta)\n }\n computeIM(im) {\n Edge.updateIM(this._label, im)\n }\n isCollapsed() {\n if (!this._label.isArea()) return false\n if (this.pts.length !== 3) return false\n if (this.pts[0].equals(this.pts[2])) return true\n return false\n }\n isClosed() {\n return this.pts[0].equals(this.pts[this.pts.length - 1])\n }\n getMaximumSegmentIndex() {\n return this.pts.length - 1\n }\n getDepthDelta() {\n return this._depthDelta\n }\n getNumPoints() {\n return this.pts.length\n }\n printReverse(out) {\n out.print('edge ' + this._name + ': ')\n for (let i = this.pts.length - 1; i >= 0; i--) \n out.print(this.pts[i] + ' ')\n \n out.println('')\n }\n getMonotoneChainEdge() {\n if (this._mce === null) this._mce = new MonotoneChainEdge(this)\n return this._mce\n }\n getEnvelope() {\n if (this._env === null) {\n this._env = new Envelope()\n for (let i = 0; i < this.pts.length; i++) \n this._env.expandToInclude(this.pts[i])\n \n }\n return this._env\n }\n addIntersection(li, segmentIndex, geomIndex, intIndex) {\n const intPt = new Coordinate(li.getIntersection(intIndex))\n let normalizedSegmentIndex = segmentIndex\n let dist = li.getEdgeDistance(geomIndex, intIndex)\n const nextSegIndex = normalizedSegmentIndex + 1\n if (nextSegIndex < this.pts.length) {\n const nextPt = this.pts[nextSegIndex]\n if (intPt.equals2D(nextPt)) {\n normalizedSegmentIndex = nextSegIndex\n dist = 0.0\n }\n }\n const ei = this.eiList.add(intPt, normalizedSegmentIndex, dist)\n }\n toString() {\n const builder = new StringBuilder()\n builder.append('edge ' + this._name + ': ')\n builder.append('LINESTRING (')\n for (let i = 0; i < this.pts.length; i++) {\n if (i > 0) builder.append(',')\n builder.append(this.pts[i].x + ' ' + this.pts[i].y)\n }\n builder.append(') ' + this._label + ' ' + this._depthDelta)\n return builder.toString()\n }\n isPointwiseEqual(e) {\n if (this.pts.length !== e.pts.length) return false\n for (let i = 0; i < this.pts.length; i++) \n if (!this.pts[i].equals2D(e.pts[i])) \n return false\n \n \n return true\n }\n setDepthDelta(depthDelta) {\n this._depthDelta = depthDelta\n }\n getEdgeIntersectionList() {\n return this.eiList\n }\n addIntersections(li, segmentIndex, geomIndex) {\n for (let i = 0; i < li.getIntersectionNum(); i++) \n this.addIntersection(li, segmentIndex, geomIndex, i)\n \n }\n}\n","import Location from '../../geom/Location.js'\nimport BufferSubgraph from './BufferSubgraph.js'\nimport PolygonBuilder from '../overlay/PolygonBuilder.js'\nimport GeometryFactory from '../../geom/GeometryFactory.js'\nimport Position from '../../geomgraph/Position.js'\nimport MCIndexNoder from '../../noding/MCIndexNoder.js'\nimport OffsetCurveBuilder from './OffsetCurveBuilder.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport SubgraphDepthLocater from './SubgraphDepthLocater.js'\nimport OffsetCurveSetBuilder from './OffsetCurveSetBuilder.js'\nimport Label from '../../geomgraph/Label.js'\nimport OverlayNodeFactory from '../overlay/OverlayNodeFactory.js'\nimport EdgeList from '../../geomgraph/EdgeList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport IntersectionAdder from '../../noding/IntersectionAdder.js'\nimport Edge from '../../geomgraph/Edge.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class BufferBuilder {\n constructor() {\n BufferBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._bufParams = null\n this._workingPrecisionModel = null\n this._workingNoder = null\n this._geomFact = null\n this._graph = null\n this._edgeList = new EdgeList()\n const bufParams = arguments[0]\n this._bufParams = bufParams\n }\n static depthDelta(label) {\n const lLoc = label.getLocation(0, Position.LEFT)\n const rLoc = label.getLocation(0, Position.RIGHT)\n if (lLoc === Location.INTERIOR && rLoc === Location.EXTERIOR) return 1; else if (lLoc === Location.EXTERIOR && rLoc === Location.INTERIOR) return -1\n return 0\n }\n static convertSegStrings(it) {\n const fact = new GeometryFactory()\n const lines = new ArrayList()\n while (it.hasNext()) {\n const ss = it.next()\n const line = fact.createLineString(ss.getCoordinates())\n lines.add(line)\n }\n return fact.buildGeometry(lines)\n }\n setWorkingPrecisionModel(pm) {\n this._workingPrecisionModel = pm\n }\n insertUniqueEdge(e) {\n const existingEdge = this._edgeList.findEqualEdge(e)\n if (existingEdge !== null) {\n const existingLabel = existingEdge.getLabel()\n let labelToMerge = e.getLabel()\n if (!existingEdge.isPointwiseEqual(e)) {\n labelToMerge = new Label(e.getLabel())\n labelToMerge.flip()\n }\n existingLabel.merge(labelToMerge)\n const mergeDelta = BufferBuilder.depthDelta(labelToMerge)\n const existingDelta = existingEdge.getDepthDelta()\n const newDelta = existingDelta + mergeDelta\n existingEdge.setDepthDelta(newDelta)\n } else {\n this._edgeList.add(e)\n e.setDepthDelta(BufferBuilder.depthDelta(e.getLabel()))\n }\n }\n buildSubgraphs(subgraphList, polyBuilder) {\n const processedGraphs = new ArrayList()\n for (let i = subgraphList.iterator(); i.hasNext(); ) {\n const subgraph = i.next()\n const p = subgraph.getRightmostCoordinate()\n const locater = new SubgraphDepthLocater(processedGraphs)\n const outsideDepth = locater.getDepth(p)\n subgraph.computeDepth(outsideDepth)\n subgraph.findResultEdges()\n processedGraphs.add(subgraph)\n polyBuilder.add(subgraph.getDirectedEdges(), subgraph.getNodes())\n }\n }\n createSubgraphs(graph) {\n const subgraphList = new ArrayList()\n for (let i = graph.getNodes().iterator(); i.hasNext(); ) {\n const node = i.next()\n if (!node.isVisited()) {\n const subgraph = new BufferSubgraph()\n subgraph.create(node)\n subgraphList.add(subgraph)\n }\n }\n Collections.sort(subgraphList, Collections.reverseOrder())\n return subgraphList\n }\n createEmptyResultGeometry() {\n const emptyGeom = this._geomFact.createPolygon()\n return emptyGeom\n }\n getNoder(precisionModel) {\n if (this._workingNoder !== null) return this._workingNoder\n const noder = new MCIndexNoder()\n const li = new RobustLineIntersector()\n li.setPrecisionModel(precisionModel)\n noder.setSegmentIntersector(new IntersectionAdder(li))\n return noder\n }\n buffer(g, distance) {\n let precisionModel = this._workingPrecisionModel\n if (precisionModel === null) precisionModel = g.getPrecisionModel()\n this._geomFact = g.getFactory()\n const curveBuilder = new OffsetCurveBuilder(precisionModel, this._bufParams)\n const curveSetBuilder = new OffsetCurveSetBuilder(g, distance, curveBuilder)\n const bufferSegStrList = curveSetBuilder.getCurves()\n if (bufferSegStrList.size() <= 0) \n return this.createEmptyResultGeometry()\n \n this.computeNodedEdges(bufferSegStrList, precisionModel)\n this._graph = new PlanarGraph(new OverlayNodeFactory())\n this._graph.addEdges(this._edgeList.getEdges())\n const subgraphList = this.createSubgraphs(this._graph)\n const polyBuilder = new PolygonBuilder(this._geomFact)\n this.buildSubgraphs(subgraphList, polyBuilder)\n const resultPolyList = polyBuilder.getPolygons()\n if (resultPolyList.size() <= 0) \n return this.createEmptyResultGeometry()\n \n const resultGeom = this._geomFact.buildGeometry(resultPolyList)\n return resultGeom\n }\n computeNodedEdges(bufferSegStrList, precisionModel) {\n const noder = this.getNoder(precisionModel)\n noder.computeNodes(bufferSegStrList)\n const nodedSegStrings = noder.getNodedSubstrings()\n for (let i = nodedSegStrings.iterator(); i.hasNext(); ) {\n const segStr = i.next()\n const pts = segStr.getCoordinates()\n if (pts.length === 2 && pts[0].equals2D(pts[1])) continue\n const oldLabel = segStr.getData()\n const edge = new Edge(segStr.getCoordinates(), new Label(oldLabel))\n this.insertUniqueEdge(edge)\n }\n }\n setNoder(noder) {\n this._workingNoder = noder\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Collection from '../../../../java/util/Collection.js'\nimport Noder from './Noder.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport System from '../../../../java/lang/System.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class ScaledNoder {\n constructor() {\n ScaledNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._noder = null\n this._scaleFactor = null\n this._offsetX = null\n this._offsetY = null\n this._isScaled = false\n if (arguments.length === 2) {\n const noder = arguments[0], scaleFactor = arguments[1]\n ScaledNoder.constructor_.call(this, noder, scaleFactor, 0, 0)\n } else if (arguments.length === 4) {\n const noder = arguments[0], scaleFactor = arguments[1], offsetX = arguments[2], offsetY = arguments[3]\n this._noder = noder\n this._scaleFactor = scaleFactor\n this._isScaled = !this.isIntegerPrecision()\n }\n }\n rescale() {\n if (hasInterface(arguments[0], Collection)) {\n const segStrings = arguments[0]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n this.rescale(ss.getCoordinates())\n }\n } else if (arguments[0] instanceof Array) {\n const pts = arguments[0]\n for (let i = 0; i < pts.length; i++) {\n pts[i].x = pts[i].x / this._scaleFactor + this._offsetX\n pts[i].y = pts[i].y / this._scaleFactor + this._offsetY\n }\n if (pts.length === 2 && pts[0].equals2D(pts[1])) \n System.out.println(pts)\n \n }\n }\n scale() {\n if (hasInterface(arguments[0], Collection)) {\n const segStrings = arguments[0]\n const nodedSegmentStrings = new ArrayList(segStrings.size())\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n nodedSegmentStrings.add(new NodedSegmentString(this.scale(ss.getCoordinates()), ss.getData()))\n }\n return nodedSegmentStrings\n } else if (arguments[0] instanceof Array) {\n const pts = arguments[0]\n const roundPts = new Array(pts.length).fill(null)\n for (let i = 0; i < pts.length; i++) \n roundPts[i] = new Coordinate(Math.round((pts[i].x - this._offsetX) * this._scaleFactor), Math.round((pts[i].y - this._offsetY) * this._scaleFactor), pts[i].getZ())\n \n const roundPtsNoDup = CoordinateArrays.removeRepeatedPoints(roundPts)\n return roundPtsNoDup\n }\n }\n isIntegerPrecision() {\n return this._scaleFactor === 1.0\n }\n getNodedSubstrings() {\n const splitSS = this._noder.getNodedSubstrings()\n if (this._isScaled) this.rescale(splitSS)\n return splitSS\n }\n computeNodes(inputSegStrings) {\n let intSegStrings = inputSegStrings\n if (this._isScaled) intSegStrings = this.scale(inputSegStrings)\n this._noder.computeNodes(intSegStrings)\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import GeometryFactory from '../geom/GeometryFactory.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\nexport default class NodingValidator {\n constructor() {\n NodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._segStrings = null\n const segStrings = arguments[0]\n this._segStrings = segStrings\n }\n checkEndPtVertexIntersections() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n const pts = ss.getCoordinates()\n this.checkEndPtVertexIntersections(pts[0], this._segStrings)\n this.checkEndPtVertexIntersections(pts[pts.length - 1], this._segStrings)\n }\n } else if (arguments.length === 2) {\n const testPt = arguments[0], segStrings = arguments[1]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n const pts = ss.getCoordinates()\n for (let j = 1; j < pts.length - 1; j++) \n if (pts[j].equals(testPt)) throw new RuntimeException('found endpt/interior pt intersection at index ' + j + ' :pt ' + testPt)\n \n }\n }\n }\n checkInteriorIntersections() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss0 = i.next()\n for (let j = this._segStrings.iterator(); j.hasNext(); ) {\n const ss1 = j.next()\n this.checkInteriorIntersections(ss0, ss1)\n }\n }\n } else if (arguments.length === 2) {\n const ss0 = arguments[0], ss1 = arguments[1]\n const pts0 = ss0.getCoordinates()\n const pts1 = ss1.getCoordinates()\n for (let i0 = 0; i0 < pts0.length - 1; i0++) \n for (let i1 = 0; i1 < pts1.length - 1; i1++) \n this.checkInteriorIntersections(ss0, i0, ss1, i1)\n \n \n } else if (arguments.length === 4) {\n const e0 = arguments[0], segIndex0 = arguments[1], e1 = arguments[2], segIndex1 = arguments[3]\n if (e0 === e1 && segIndex0 === segIndex1) return null\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) \n if (this._li.isProper() || this.hasInteriorIntersection(this._li, p00, p01) || this.hasInteriorIntersection(this._li, p10, p11)) \n throw new RuntimeException('found non-noded intersection at ' + p00 + '-' + p01 + ' and ' + p10 + '-' + p11)\n \n \n }\n }\n checkValid() {\n this.checkEndPtVertexIntersections()\n this.checkInteriorIntersections()\n this.checkCollapses()\n }\n checkCollapses() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n this.checkCollapses(ss)\n }\n } else if (arguments.length === 1) {\n const ss = arguments[0]\n const pts = ss.getCoordinates()\n for (let i = 0; i < pts.length - 2; i++) \n this.checkCollapse(pts[i], pts[i + 1], pts[i + 2])\n \n }\n }\n hasInteriorIntersection(li, p0, p1) {\n for (let i = 0; i < li.getIntersectionNum(); i++) {\n const intPt = li.getIntersection(i)\n if (!(intPt.equals(p0) || intPt.equals(p1))) return true\n }\n return false\n }\n checkCollapse(p0, p1, p2) {\n if (p0.equals(p2)) throw new RuntimeException('found non-noded collapse at ' + NodingValidator.fact.createLineString([p0, p1, p2]))\n }\n}\nNodingValidator.fact = new GeometryFactory()\n","import Coordinate from '../../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nexport default class HotPixel {\n constructor() {\n HotPixel.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = null\n this._pt = null\n this._originalPt = null\n this._ptScaled = null\n this._p0Scaled = null\n this._p1Scaled = null\n this._scaleFactor = null\n this._minx = null\n this._maxx = null\n this._miny = null\n this._maxy = null\n this._corner = new Array(4).fill(null)\n this._safeEnv = null\n const pt = arguments[0], scaleFactor = arguments[1], li = arguments[2]\n this._originalPt = pt\n this._pt = pt\n this._scaleFactor = scaleFactor\n this._li = li\n if (scaleFactor <= 0) throw new IllegalArgumentException('Scale factor must be non-zero')\n if (scaleFactor !== 1.0) {\n this._pt = new Coordinate(this.scale(pt.x), this.scale(pt.y))\n this._p0Scaled = new Coordinate()\n this._p1Scaled = new Coordinate()\n }\n this.initCorners(this._pt)\n }\n intersectsScaled(p0, p1) {\n const segMinx = Math.min(p0.x, p1.x)\n const segMaxx = Math.max(p0.x, p1.x)\n const segMiny = Math.min(p0.y, p1.y)\n const segMaxy = Math.max(p0.y, p1.y)\n const isOutsidePixelEnv = this._maxx < segMinx || this._minx > segMaxx || this._maxy < segMiny || this._miny > segMaxy\n if (isOutsidePixelEnv) return false\n const intersects = this.intersectsToleranceSquare(p0, p1)\n Assert.isTrue(!(isOutsidePixelEnv && intersects), 'Found bad envelope test')\n return intersects\n }\n initCorners(pt) {\n const tolerance = 0.5\n this._minx = pt.x - tolerance\n this._maxx = pt.x + tolerance\n this._miny = pt.y - tolerance\n this._maxy = pt.y + tolerance\n this._corner[0] = new Coordinate(this._maxx, this._maxy)\n this._corner[1] = new Coordinate(this._minx, this._maxy)\n this._corner[2] = new Coordinate(this._minx, this._miny)\n this._corner[3] = new Coordinate(this._maxx, this._miny)\n }\n intersects(p0, p1) {\n if (this._scaleFactor === 1.0) return this.intersectsScaled(p0, p1)\n this.copyScaled(p0, this._p0Scaled)\n this.copyScaled(p1, this._p1Scaled)\n return this.intersectsScaled(this._p0Scaled, this._p1Scaled)\n }\n scale(val) {\n return Math.round(val * this._scaleFactor)\n }\n getCoordinate() {\n return this._originalPt\n }\n copyScaled(p, pScaled) {\n pScaled.x = this.scale(p.x)\n pScaled.y = this.scale(p.y)\n }\n getSafeEnvelope() {\n if (this._safeEnv === null) {\n const safeTolerance = HotPixel.SAFE_ENV_EXPANSION_FACTOR / this._scaleFactor\n this._safeEnv = new Envelope(this._originalPt.x - safeTolerance, this._originalPt.x + safeTolerance, this._originalPt.y - safeTolerance, this._originalPt.y + safeTolerance)\n }\n return this._safeEnv\n }\n intersectsPixelClosure(p0, p1) {\n this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n if (this._li.hasIntersection()) return true\n return false\n }\n intersectsToleranceSquare(p0, p1) {\n let intersectsLeft = false\n let intersectsBottom = false\n this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n if (this._li.isProper()) return true\n this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n if (this._li.isProper()) return true\n if (this._li.hasIntersection()) intersectsLeft = true\n this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n if (this._li.isProper()) return true\n if (this._li.hasIntersection()) intersectsBottom = true\n this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n if (this._li.isProper()) return true\n if (intersectsLeft && intersectsBottom) return true\n if (p0.equals(this._pt)) return true\n if (p1.equals(this._pt)) return true\n return false\n }\n addSnappedNode(segStr, segIndex) {\n const p0 = segStr.getCoordinate(segIndex)\n const p1 = segStr.getCoordinate(segIndex + 1)\n if (this.intersects(p0, p1)) {\n segStr.addIntersection(this.getCoordinate(), segIndex)\n return true\n }\n return false\n }\n}\nHotPixel.SAFE_ENV_EXPANSION_FACTOR = 0.75\n","import LineSegment from '../../geom/LineSegment.js'\nexport default class MonotoneChainSelectAction {\n constructor() {\n MonotoneChainSelectAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.selectedSegment = new LineSegment()\n }\n select() {\n if (arguments.length === 1) {\n const seg = arguments[0]\n } else if (arguments.length === 2) {\n const mc = arguments[0], startIndex = arguments[1]\n mc.getLineSegment(startIndex, this.selectedSegment)\n this.select(this.selectedSegment)\n }\n }\n}\n","import MonotoneChainSelectAction from '../../index/chain/MonotoneChainSelectAction.js'\nimport MonotoneChain from '../../index/chain/MonotoneChain.js'\nimport ItemVisitor from '../../index/ItemVisitor.js'\nexport default class MCIndexPointSnapper {\n constructor() {\n MCIndexPointSnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._index = null\n const index = arguments[0]\n this._index = index\n }\n snap() {\n if (arguments.length === 1) {\n const hotPixel = arguments[0]\n return this.snap(hotPixel, null, -1)\n } else if (arguments.length === 3) {\n const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n const pixelEnv = hotPixel.getSafeEnvelope()\n const hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex)\n this._index.query(pixelEnv, new (class {\n get interfaces_() {\n return [ItemVisitor]\n }\n visitItem(item) {\n const testChain = item\n testChain.select(pixelEnv, hotPixelSnapAction)\n }\n })())\n return hotPixelSnapAction.isNodeAdded()\n }\n }\n}\nclass HotPixelSnapAction extends MonotoneChainSelectAction {\n constructor() {\n super()\n HotPixelSnapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hotPixel = null\n this._parentEdge = null\n this._hotPixelVertexIndex = null\n this._isNodeAdded = false\n const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n this._hotPixel = hotPixel\n this._parentEdge = parentEdge\n this._hotPixelVertexIndex = hotPixelVertexIndex\n }\n isNodeAdded() {\n return this._isNodeAdded\n }\n select() {\n if (arguments.length === 2 && (Number.isInteger(arguments[1]) && arguments[0] instanceof MonotoneChain)) {\n const mc = arguments[0], startIndex = arguments[1]\n const ss = mc.getContext()\n if (this._parentEdge === ss) \n if (startIndex === this._hotPixelVertexIndex || startIndex + 1 === this._hotPixelVertexIndex) return null\n \n this._isNodeAdded |= this._hotPixel.addSnappedNode(ss, startIndex)\n } else {\n return super.select.apply(this, arguments)\n }\n }\n}\nMCIndexPointSnapper.HotPixelSnapAction = HotPixelSnapAction\n","import SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class InteriorIntersectionFinderAdder {\n constructor() {\n InteriorIntersectionFinderAdder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = null\n this._interiorIntersections = null\n const li = arguments[0]\n this._li = li\n this._interiorIntersections = new ArrayList()\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) \n if (this._li.isInteriorIntersection()) {\n for (let intIndex = 0; intIndex < this._li.getIntersectionNum(); intIndex++) \n this._interiorIntersections.add(this._li.getIntersection(intIndex))\n \n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n }\n \n }\n isDone() {\n return false\n }\n getInteriorIntersections() {\n return this._interiorIntersections\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import NodingValidator from '../NodingValidator.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Collection from '../../../../../java/util/Collection.js'\nimport Noder from '../Noder.js'\nimport MCIndexNoder from '../MCIndexNoder.js'\nimport NodedSegmentString from '../NodedSegmentString.js'\nimport HotPixel from './HotPixel.js'\nimport Exception from '../../../../../java/lang/Exception.js'\nimport MCIndexPointSnapper from './MCIndexPointSnapper.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport InteriorIntersectionFinderAdder from '../InteriorIntersectionFinderAdder.js'\nexport default class MCIndexSnapRounder {\n constructor() {\n MCIndexSnapRounder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pm = null\n this._li = null\n this._scaleFactor = null\n this._noder = null\n this._pointSnapper = null\n this._nodedSegStrings = null\n const pm = arguments[0]\n this._pm = pm\n this._li = new RobustLineIntersector()\n this._li.setPrecisionModel(pm)\n this._scaleFactor = pm.getScale()\n }\n checkCorrectness(inputSegmentStrings) {\n const resultSegStrings = NodedSegmentString.getNodedSubstrings(inputSegmentStrings)\n const nv = new NodingValidator(resultSegStrings)\n try {\n nv.checkValid()\n } catch (ex) {\n if (ex instanceof Exception) \n ex.printStackTrace()\n else throw ex\n } finally {}\n }\n getNodedSubstrings() {\n return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n }\n snapRound(segStrings, li) {\n const intersections = this.findInteriorIntersections(segStrings, li)\n this.computeIntersectionSnaps(intersections)\n this.computeVertexSnaps(segStrings)\n }\n findInteriorIntersections(segStrings, li) {\n const intFinderAdder = new InteriorIntersectionFinderAdder(li)\n this._noder.setSegmentIntersector(intFinderAdder)\n this._noder.computeNodes(segStrings)\n return intFinderAdder.getInteriorIntersections()\n }\n computeVertexSnaps() {\n if (hasInterface(arguments[0], Collection)) {\n const edges = arguments[0]\n for (let i0 = edges.iterator(); i0.hasNext(); ) {\n const edge0 = i0.next()\n this.computeVertexSnaps(edge0)\n }\n } else if (arguments[0] instanceof NodedSegmentString) {\n const e = arguments[0]\n const pts0 = e.getCoordinates()\n for (let i = 0; i < pts0.length; i++) {\n const hotPixel = new HotPixel(pts0[i], this._scaleFactor, this._li)\n const isNodeAdded = this._pointSnapper.snap(hotPixel, e, i)\n if (isNodeAdded) \n e.addIntersection(pts0[i], i)\n \n }\n }\n }\n computeNodes(inputSegmentStrings) {\n this._nodedSegStrings = inputSegmentStrings\n this._noder = new MCIndexNoder()\n this._pointSnapper = new MCIndexPointSnapper(this._noder.getIndex())\n this.snapRound(inputSegmentStrings, this._li)\n }\n computeIntersectionSnaps(snapPts) {\n for (let it = snapPts.iterator(); it.hasNext(); ) {\n const snapPt = it.next()\n const hotPixel = new HotPixel(snapPt, this._scaleFactor, this._li)\n this._pointSnapper.snap(hotPixel)\n }\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import BufferParameters from './BufferParameters.js'\nimport Geometry from '../../geom/Geometry.js'\nimport BufferBuilder from './BufferBuilder.js'\nimport ScaledNoder from '../../noding/ScaledNoder.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport MathUtil from '../../math/MathUtil.js'\nimport PrecisionModel from '../../geom/PrecisionModel.js'\nimport RuntimeException from '../../../../../java/lang/RuntimeException.js'\nimport MCIndexSnapRounder from '../../noding/snapround/MCIndexSnapRounder.js'\nexport default class BufferOp {\n constructor() {\n BufferOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._argGeom = null\n this._distance = null\n this._bufParams = new BufferParameters()\n this._resultGeometry = null\n this._saveException = null\n if (arguments.length === 1) {\n const g = arguments[0]\n this._argGeom = g\n } else if (arguments.length === 2) {\n const g = arguments[0], bufParams = arguments[1]\n this._argGeom = g\n this._bufParams = bufParams\n }\n }\n static bufferOp() {\n if (arguments.length === 2) {\n const g = arguments[0], distance = arguments[1]\n const gBuf = new BufferOp(g)\n const geomBuf = gBuf.getResultGeometry(distance)\n return geomBuf\n } else if (arguments.length === 3) {\n if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2]\n const bufOp = new BufferOp(g)\n bufOp.setQuadrantSegments(quadrantSegments)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n } else if (arguments[2] instanceof BufferParameters && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n const g = arguments[0], distance = arguments[1], params = arguments[2]\n const bufOp = new BufferOp(g, params)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n }\n } else if (arguments.length === 4) {\n const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2], endCapStyle = arguments[3]\n const bufOp = new BufferOp(g)\n bufOp.setQuadrantSegments(quadrantSegments)\n bufOp.setEndCapStyle(endCapStyle)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n }\n }\n static precisionScaleFactor(g, distance, maxPrecisionDigits) {\n const env = g.getEnvelopeInternal()\n const envMax = MathUtil.max(Math.abs(env.getMaxX()), Math.abs(env.getMaxY()), Math.abs(env.getMinX()), Math.abs(env.getMinY()))\n const expandByDistance = distance > 0.0 ? distance : 0.0\n const bufEnvMax = envMax + 2 * expandByDistance\n const bufEnvPrecisionDigits = Math.trunc(Math.log(bufEnvMax) / Math.log(10) + 1.0)\n const minUnitLog10 = maxPrecisionDigits - bufEnvPrecisionDigits\n const scaleFactor = Math.pow(10.0, minUnitLog10)\n return scaleFactor\n }\n bufferFixedPrecision(fixedPM) {\n const noder = new ScaledNoder(new MCIndexSnapRounder(new PrecisionModel(1.0)), fixedPM.getScale())\n const bufBuilder = new BufferBuilder(this._bufParams)\n bufBuilder.setWorkingPrecisionModel(fixedPM)\n bufBuilder.setNoder(noder)\n this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n }\n bufferReducedPrecision() {\n if (arguments.length === 0) {\n for (let precDigits = BufferOp.MAX_PRECISION_DIGITS; precDigits >= 0; precDigits--) {\n try {\n this.bufferReducedPrecision(precDigits)\n } catch (ex) {\n if (ex instanceof TopologyException) \n this._saveException = ex\n else throw ex\n } finally {}\n if (this._resultGeometry !== null) return null\n }\n throw this._saveException\n } else if (arguments.length === 1) {\n const precisionDigits = arguments[0]\n const sizeBasedScaleFactor = BufferOp.precisionScaleFactor(this._argGeom, this._distance, precisionDigits)\n const fixedPM = new PrecisionModel(sizeBasedScaleFactor)\n this.bufferFixedPrecision(fixedPM)\n }\n }\n computeGeometry() {\n this.bufferOriginalPrecision()\n if (this._resultGeometry !== null) return null\n const argPM = this._argGeom.getFactory().getPrecisionModel()\n if (argPM.getType() === PrecisionModel.FIXED) this.bufferFixedPrecision(argPM); else this.bufferReducedPrecision()\n }\n setQuadrantSegments(quadrantSegments) {\n this._bufParams.setQuadrantSegments(quadrantSegments)\n }\n bufferOriginalPrecision() {\n try {\n const bufBuilder = new BufferBuilder(this._bufParams)\n this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n } catch (ex) {\n if (ex instanceof RuntimeException) \n this._saveException = ex\n else throw ex\n } finally {}\n }\n getResultGeometry(distance) {\n this._distance = distance\n this.computeGeometry()\n return this._resultGeometry\n }\n setEndCapStyle(endCapStyle) {\n this._bufParams.setEndCapStyle(endCapStyle)\n }\n}\nBufferOp.CAP_ROUND = BufferParameters.CAP_ROUND\nBufferOp.CAP_BUTT = BufferParameters.CAP_FLAT\nBufferOp.CAP_FLAT = BufferParameters.CAP_FLAT\nBufferOp.CAP_SQUARE = BufferParameters.CAP_SQUARE\nBufferOp.MAX_PRECISION_DIGITS = 12\n","export default class BoundaryNodeRule {\n isInBoundary(boundaryCount) {}\n}\nclass Mod2BoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount % 2 === 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass EndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount > 0\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass MultiValentEndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount > 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass MonoValentEndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount === 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nBoundaryNodeRule.Mod2BoundaryNodeRule = Mod2BoundaryNodeRule\nBoundaryNodeRule.EndPointBoundaryNodeRule = EndPointBoundaryNodeRule\nBoundaryNodeRule.MultiValentEndPointBoundaryNodeRule = MultiValentEndPointBoundaryNodeRule\nBoundaryNodeRule.MonoValentEndPointBoundaryNodeRule = MonoValentEndPointBoundaryNodeRule\nBoundaryNodeRule.MOD2_BOUNDARY_RULE = new Mod2BoundaryNodeRule()\nBoundaryNodeRule.ENDPOINT_BOUNDARY_RULE = new EndPointBoundaryNodeRule()\nBoundaryNodeRule.MULTIVALENT_ENDPOINT_BOUNDARY_RULE = new MultiValentEndPointBoundaryNodeRule()\nBoundaryNodeRule.MONOVALENT_ENDPOINT_BOUNDARY_RULE = new MonoValentEndPointBoundaryNodeRule()\nBoundaryNodeRule.OGC_SFS_BOUNDARY_RULE = BoundaryNodeRule.MOD2_BOUNDARY_RULE\n","import Location from '../geom/Location.js'\nimport LineString from '../geom/LineString.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Point from '../geom/Point.js'\nimport Polygon from '../geom/Polygon.js'\nimport PointLocation from './PointLocation.js'\nimport BoundaryNodeRule from './BoundaryNodeRule.js'\nimport MultiPolygon from '../geom/MultiPolygon.js'\nimport GeometryCollectionIterator from '../geom/GeometryCollectionIterator.js'\nimport GeometryCollection from '../geom/GeometryCollection.js'\nimport MultiLineString from '../geom/MultiLineString.js'\nexport default class PointLocator {\n constructor() {\n PointLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._boundaryRule = BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE\n this._isIn = null\n this._numBoundaries = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const boundaryRule = arguments[0]\n if (boundaryRule === null) throw new IllegalArgumentException('Rule must be non-null')\n this._boundaryRule = boundaryRule\n }\n }\n locateInPolygonRing(p, ring) {\n if (!ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return PointLocation.locateInRing(p, ring.getCoordinates())\n }\n intersects(p, geom) {\n return this.locate(p, geom) !== Location.EXTERIOR\n }\n updateLocationInfo(loc) {\n if (loc === Location.INTERIOR) this._isIn = true\n if (loc === Location.BOUNDARY) this._numBoundaries++\n }\n computeLocation(p, geom) {\n if (geom instanceof Point) \n this.updateLocationInfo(this.locateOnPoint(p, geom))\n \n if (geom instanceof LineString) {\n this.updateLocationInfo(this.locateOnLineString(p, geom))\n } else if (geom instanceof Polygon) {\n this.updateLocationInfo(this.locateInPolygon(p, geom))\n } else if (geom instanceof MultiLineString) {\n const ml = geom\n for (let i = 0; i < ml.getNumGeometries(); i++) {\n const l = ml.getGeometryN(i)\n this.updateLocationInfo(this.locateOnLineString(p, l))\n }\n } else if (geom instanceof MultiPolygon) {\n const mpoly = geom\n for (let i = 0; i < mpoly.getNumGeometries(); i++) {\n const poly = mpoly.getGeometryN(i)\n this.updateLocationInfo(this.locateInPolygon(p, poly))\n }\n } else if (geom instanceof GeometryCollection) {\n const geomi = new GeometryCollectionIterator(geom)\n while (geomi.hasNext()) {\n const g2 = geomi.next()\n if (g2 !== geom) this.computeLocation(p, g2)\n }\n }\n }\n locateOnPoint(p, pt) {\n const ptCoord = pt.getCoordinate()\n if (ptCoord.equals2D(p)) return Location.INTERIOR\n return Location.EXTERIOR\n }\n locateOnLineString(p, l) {\n if (!l.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n const seq = l.getCoordinateSequence()\n if (!l.isClosed()) \n if (p.equals(seq.getCoordinate(0)) || p.equals(seq.getCoordinate(seq.size() - 1))) \n return Location.BOUNDARY\n \n \n if (PointLocation.isOnLine(p, seq)) \n return Location.INTERIOR\n \n return Location.EXTERIOR\n }\n locateInPolygon(p, poly) {\n if (poly.isEmpty()) return Location.EXTERIOR\n const shell = poly.getExteriorRing()\n const shellLoc = this.locateInPolygonRing(p, shell)\n if (shellLoc === Location.EXTERIOR) return Location.EXTERIOR\n if (shellLoc === Location.BOUNDARY) return Location.BOUNDARY\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n const hole = poly.getInteriorRingN(i)\n const holeLoc = this.locateInPolygonRing(p, hole)\n if (holeLoc === Location.INTERIOR) return Location.EXTERIOR\n if (holeLoc === Location.BOUNDARY) return Location.BOUNDARY\n }\n return Location.INTERIOR\n }\n locate(p, geom) {\n if (geom.isEmpty()) return Location.EXTERIOR\n if (geom instanceof LineString) \n return this.locateOnLineString(p, geom)\n else if (geom instanceof Polygon) \n return this.locateInPolygon(p, geom)\n \n this._isIn = false\n this._numBoundaries = 0\n this.computeLocation(p, geom)\n if (this._boundaryRule.isInBoundary(this._numBoundaries)) return Location.BOUNDARY\n if (this._numBoundaries > 0 || this._isIn) return Location.INTERIOR\n return Location.EXTERIOR\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport CoordinateArraySequence from '../geom/impl/CoordinateArraySequence.js'\nimport Octant from './Octant.js'\nimport SegmentString from './SegmentString.js'\nexport default class BasicSegmentString {\n constructor() {\n BasicSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._data = null\n const pts = arguments[0], data = arguments[1]\n this._pts = pts\n this._data = data\n }\n getCoordinates() {\n return this._pts\n }\n size() {\n return this._pts.length\n }\n getCoordinate(i) {\n return this._pts[i]\n }\n isClosed() {\n return this._pts[0].equals(this._pts[this._pts.length - 1])\n }\n getSegmentOctant(index) {\n if (index === this._pts.length - 1) return -1\n return Octant.octant(this.getCoordinate(index), this.getCoordinate(index + 1))\n }\n setData(data) {\n this._data = data\n }\n getData() {\n return this._data\n }\n toString() {\n return WKTWriter.toLineString(new CoordinateArraySequence(this._pts))\n }\n get interfaces_() {\n return [SegmentString]\n }\n}\n","import SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class NodingIntersectionFinder {\n constructor() {\n NodingIntersectionFinder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._findAllIntersections = false\n this._isCheckEndSegmentsOnly = false\n this._keepIntersections = true\n this._isInteriorIntersectionsOnly = false\n this._li = null\n this._interiorIntersection = null\n this._intSegments = null\n this._intersections = new ArrayList()\n this._intersectionCount = 0\n const li = arguments[0]\n this._li = li\n this._interiorIntersection = null\n }\n static createAllIntersectionsFinder(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n return finder\n }\n static isInteriorVertexIntersection() {\n if (arguments.length === 4) {\n const p0 = arguments[0], p1 = arguments[1], isEnd0 = arguments[2], isEnd1 = arguments[3]\n if (isEnd0 && isEnd1) return false\n if (p0.equals2D(p1)) \n return true\n \n return false\n } else if (arguments.length === 8) {\n const p00 = arguments[0], p01 = arguments[1], p10 = arguments[2], p11 = arguments[3], isEnd00 = arguments[4], isEnd01 = arguments[5], isEnd10 = arguments[6], isEnd11 = arguments[7]\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p00, p10, isEnd00, isEnd10)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p00, p11, isEnd00, isEnd11)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p01, p10, isEnd01, isEnd10)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p01, p11, isEnd01, isEnd11)) return true\n return false\n }\n }\n static createInteriorIntersectionCounter(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setInteriorIntersectionsOnly(true)\n finder.setFindAllIntersections(true)\n finder.setKeepIntersections(false)\n return finder\n }\n static createIntersectionCounter(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n finder.setKeepIntersections(false)\n return finder\n }\n static isEndSegment(segStr, index) {\n if (index === 0) return true\n if (index >= segStr.size() - 2) return true\n return false\n }\n static createAnyIntersectionFinder(li) {\n return new NodingIntersectionFinder(li)\n }\n static createInteriorIntersectionsFinder(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n finder.setInteriorIntersectionsOnly(true)\n return finder\n }\n setCheckEndSegmentsOnly(isCheckEndSegmentsOnly) {\n this._isCheckEndSegmentsOnly = isCheckEndSegmentsOnly\n }\n getIntersectionSegments() {\n return this._intSegments\n }\n count() {\n return this._intersectionCount\n }\n getIntersections() {\n return this._intersections\n }\n setFindAllIntersections(findAllIntersections) {\n this._findAllIntersections = findAllIntersections\n }\n setKeepIntersections(keepIntersections) {\n this._keepIntersections = keepIntersections\n }\n getIntersection() {\n return this._interiorIntersection\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (!this._findAllIntersections && this.hasIntersection()) return null\n const isSameSegString = e0 === e1\n const isSameSegment = isSameSegString && segIndex0 === segIndex1\n if (isSameSegment) return null\n if (this._isCheckEndSegmentsOnly) {\n const isEndSegPresent = NodingIntersectionFinder.isEndSegment(e0, segIndex0) || NodingIntersectionFinder.isEndSegment(e1, segIndex1)\n if (!isEndSegPresent) return null\n }\n const p00 = e0.getCoordinate(segIndex0)\n const p01 = e0.getCoordinate(segIndex0 + 1)\n const p10 = e1.getCoordinate(segIndex1)\n const p11 = e1.getCoordinate(segIndex1 + 1)\n const isEnd00 = segIndex0 === 0\n const isEnd01 = segIndex0 + 2 === e0.size()\n const isEnd10 = segIndex1 === 0\n const isEnd11 = segIndex1 + 2 === e1.size()\n this._li.computeIntersection(p00, p01, p10, p11)\n const isInteriorInt = this._li.hasIntersection() && this._li.isInteriorIntersection()\n let isInteriorVertexInt = false\n if (!this._isInteriorIntersectionsOnly) {\n const isAdjacentSegment = isSameSegString && Math.abs(segIndex1 - segIndex0) <= 1\n isInteriorVertexInt = !isAdjacentSegment && NodingIntersectionFinder.isInteriorVertexIntersection(p00, p01, p10, p11, isEnd00, isEnd01, isEnd10, isEnd11)\n }\n if (isInteriorInt || isInteriorVertexInt) {\n this._intSegments = new Array(4).fill(null)\n this._intSegments[0] = p00\n this._intSegments[1] = p01\n this._intSegments[2] = p10\n this._intSegments[3] = p11\n this._interiorIntersection = this._li.getIntersection(0)\n if (this._keepIntersections) this._intersections.add(this._interiorIntersection)\n this._intersectionCount++\n }\n }\n hasIntersection() {\n return this._interiorIntersection !== null\n }\n isDone() {\n if (this._findAllIntersections) return false\n return this._interiorIntersection !== null\n }\n setInteriorIntersectionsOnly(isInteriorIntersectionsOnly) {\n this._isInteriorIntersectionsOnly = isInteriorIntersectionsOnly\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport MCIndexNoder from './MCIndexNoder.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport NodingIntersectionFinder from './NodingIntersectionFinder.js'\nexport default class FastNodingValidator {\n constructor() {\n FastNodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._segStrings = null\n this._findAllIntersections = false\n this._segInt = null\n this._isValid = true\n const segStrings = arguments[0]\n this._segStrings = segStrings\n }\n static computeIntersections(segStrings) {\n const nv = new FastNodingValidator(segStrings)\n nv.setFindAllIntersections(true)\n nv.isValid()\n return nv.getIntersections()\n }\n execute() {\n if (this._segInt !== null) return null\n this.checkInteriorIntersections()\n }\n getIntersections() {\n return this._segInt.getIntersections()\n }\n isValid() {\n this.execute()\n return this._isValid\n }\n setFindAllIntersections(findAllIntersections) {\n this._findAllIntersections = findAllIntersections\n }\n checkInteriorIntersections() {\n this._isValid = true\n this._segInt = new NodingIntersectionFinder(this._li)\n this._segInt.setFindAllIntersections(this._findAllIntersections)\n const noder = new MCIndexNoder()\n noder.setSegmentIntersector(this._segInt)\n noder.computeNodes(this._segStrings)\n if (this._segInt.hasIntersection()) {\n this._isValid = false\n return null\n }\n }\n checkValid() {\n this.execute()\n if (!this._isValid) throw new TopologyException(this.getErrorMessage(), this._segInt.getIntersection())\n }\n getErrorMessage() {\n if (this._isValid) return 'no intersections found'\n const intSegs = this._segInt.getIntersectionSegments()\n return 'found non-noded intersection between ' + WKTWriter.toLineString(intSegs[0], intSegs[1]) + ' and ' + WKTWriter.toLineString(intSegs[2], intSegs[3])\n }\n}\n","import BasicSegmentString from '../noding/BasicSegmentString.js'\nimport FastNodingValidator from '../noding/FastNodingValidator.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class EdgeNodingValidator {\n constructor() {\n EdgeNodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nv = null\n const edges = arguments[0]\n this._nv = new FastNodingValidator(EdgeNodingValidator.toSegmentStrings(edges))\n }\n static toSegmentStrings(edges) {\n const segStrings = new ArrayList()\n for (let i = edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n segStrings.add(new BasicSegmentString(e.getCoordinates(), e))\n }\n return segStrings\n }\n static checkValid(edges) {\n const validator = new EdgeNodingValidator(edges)\n validator.checkValid()\n }\n checkValid() {\n this._nv.checkValid()\n }\n}\n","import GeometryFactory from '../GeometryFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class GeometryCollectionMapper {\n constructor() {\n GeometryCollectionMapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._mapOp = null\n const mapOp = arguments[0]\n this._mapOp = mapOp\n }\n static map(gc, op) {\n const mapper = new GeometryCollectionMapper(op)\n return mapper.map(gc)\n }\n map(gc) {\n const mapped = new ArrayList()\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = this._mapOp.map(gc.getGeometryN(i))\n if (!g.isEmpty()) mapped.add(g)\n }\n return gc.getFactory().createGeometryCollection(GeometryFactory.toGeometryArray(mapped))\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport OverlayOp from './OverlayOp.js'\nexport default class LineBuilder {\n constructor() {\n LineBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._op = null\n this._geometryFactory = null\n this._ptLocator = null\n this._lineEdgesList = new ArrayList()\n this._resultLineList = new ArrayList()\n const op = arguments[0], geometryFactory = arguments[1], ptLocator = arguments[2]\n this._op = op\n this._geometryFactory = geometryFactory\n this._ptLocator = ptLocator\n }\n collectLines(opCode) {\n for (let it = this._op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n this.collectLineEdge(de, opCode, this._lineEdgesList)\n this.collectBoundaryTouchEdge(de, opCode, this._lineEdgesList)\n }\n }\n labelIsolatedLine(e, targetIndex) {\n const loc = this._ptLocator.locate(e.getCoordinate(), this._op.getArgGeometry(targetIndex))\n e.getLabel().setLocation(targetIndex, loc)\n }\n build(opCode) {\n this.findCoveredLineEdges()\n this.collectLines(opCode)\n this.buildLines(opCode)\n return this._resultLineList\n }\n collectLineEdge(de, opCode, edges) {\n const label = de.getLabel()\n const e = de.getEdge()\n if (de.isLineEdge()) \n if (!de.isVisited() && OverlayOp.isResultOfOp(label, opCode) && !e.isCovered()) {\n edges.add(e)\n de.setVisitedEdge(true)\n }\n \n }\n findCoveredLineEdges() {\n for (let nodeit = this._op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().findCoveredLineEdges()\n }\n for (let it = this._op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const e = de.getEdge()\n if (de.isLineEdge() && !e.isCoveredSet()) {\n const isCovered = this._op.isCoveredByA(de.getCoordinate())\n e.setCovered(isCovered)\n }\n }\n }\n labelIsolatedLines(edgesList) {\n for (let it = edgesList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (e.isIsolated()) \n if (label.isNull(0)) this.labelIsolatedLine(e, 0); else this.labelIsolatedLine(e, 1)\n \n }\n }\n buildLines(opCode) {\n for (let it = this._lineEdgesList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const line = this._geometryFactory.createLineString(e.getCoordinates())\n this._resultLineList.add(line)\n e.setInResult(true)\n }\n }\n collectBoundaryTouchEdge(de, opCode, edges) {\n const label = de.getLabel()\n if (de.isLineEdge()) return null\n if (de.isVisited()) return null\n if (de.isInteriorAreaEdge()) return null\n if (de.getEdge().isInResult()) return null\n Assert.isTrue(!(de.isInResult() || de.getSym().isInResult()) || !de.getEdge().isInResult())\n if (OverlayOp.isResultOfOp(label, opCode) && opCode === OverlayOp.INTERSECTION) {\n edges.add(de.getEdge())\n de.setVisitedEdge(true)\n }\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport OverlayOp from './OverlayOp.js'\nexport default class PointBuilder {\n constructor() {\n PointBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._op = null\n this._geometryFactory = null\n this._resultPointList = new ArrayList()\n const op = arguments[0], geometryFactory = arguments[1], ptLocator = arguments[2]\n this._op = op\n this._geometryFactory = geometryFactory\n }\n filterCoveredNodeToPoint(n) {\n const coord = n.getCoordinate()\n if (!this._op.isCoveredByLA(coord)) {\n const pt = this._geometryFactory.createPoint(coord)\n this._resultPointList.add(pt)\n }\n }\n extractNonCoveredResultNodes(opCode) {\n for (let nodeit = this._op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {\n const n = nodeit.next()\n if (n.isInResult()) continue\n if (n.isIncidentEdgeInResult()) continue\n if (n.getEdges().getDegree() === 0 || opCode === OverlayOp.INTERSECTION) {\n const label = n.getLabel()\n if (OverlayOp.isResultOfOp(label, opCode)) \n this.filterCoveredNodeToPoint(n)\n \n }\n }\n }\n build(opCode) {\n this.extractNonCoveredResultNodes(opCode)\n return this._resultPointList\n }\n}\n","import LineString from '../../../geom/LineString.js'\nimport CoordinateList from '../../../geom/CoordinateList.js'\nimport Coordinate from '../../../geom/Coordinate.js'\nimport Double from '../../../../../../java/lang/Double.js'\nimport LineSegment from '../../../geom/LineSegment.js'\nexport default class LineStringSnapper {\n constructor() {\n LineStringSnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._snapTolerance = 0.0\n this._srcPts = null\n this._seg = new LineSegment()\n this._allowSnappingToSourceVertices = false\n this._isClosed = false\n if (arguments[0] instanceof LineString && typeof arguments[1] === 'number') {\n const srcLine = arguments[0], snapTolerance = arguments[1]\n LineStringSnapper.constructor_.call(this, srcLine.getCoordinates(), snapTolerance)\n } else if (arguments[0] instanceof Array && typeof arguments[1] === 'number') {\n const srcPts = arguments[0], snapTolerance = arguments[1]\n this._srcPts = srcPts\n this._isClosed = LineStringSnapper.isClosed(srcPts)\n this._snapTolerance = snapTolerance\n }\n }\n static isClosed(pts) {\n if (pts.length <= 1) return false\n return pts[0].equals2D(pts[pts.length - 1])\n }\n snapVertices(srcCoords, snapPts) {\n const end = this._isClosed ? srcCoords.size() - 1 : srcCoords.size()\n for (let i = 0; i < end; i++) {\n const srcPt = srcCoords.get(i)\n const snapVert = this.findSnapForVertex(srcPt, snapPts)\n if (snapVert !== null) {\n srcCoords.set(i, new Coordinate(snapVert))\n if (i === 0 && this._isClosed) srcCoords.set(srcCoords.size() - 1, new Coordinate(snapVert))\n }\n }\n }\n findSnapForVertex(pt, snapPts) {\n for (let i = 0; i < snapPts.length; i++) {\n if (pt.equals2D(snapPts[i])) return null\n if (pt.distance(snapPts[i]) < this._snapTolerance) return snapPts[i]\n }\n return null\n }\n snapTo(snapPts) {\n const coordList = new CoordinateList(this._srcPts)\n this.snapVertices(coordList, snapPts)\n this.snapSegments(coordList, snapPts)\n const newPts = coordList.toCoordinateArray()\n return newPts\n }\n snapSegments(srcCoords, snapPts) {\n if (snapPts.length === 0) return null\n let distinctPtCount = snapPts.length\n if (snapPts[0].equals2D(snapPts[snapPts.length - 1])) distinctPtCount = snapPts.length - 1\n for (let i = 0; i < distinctPtCount; i++) {\n const snapPt = snapPts[i]\n const index = this.findSegmentIndexToSnap(snapPt, srcCoords)\n if (index >= 0) \n srcCoords.add(index + 1, new Coordinate(snapPt), false)\n \n }\n }\n findSegmentIndexToSnap(snapPt, srcCoords) {\n let minDist = Double.MAX_VALUE\n let snapIndex = -1\n for (let i = 0; i < srcCoords.size() - 1; i++) {\n this._seg.p0 = srcCoords.get(i)\n this._seg.p1 = srcCoords.get(i + 1)\n if (this._seg.p0.equals2D(snapPt) || this._seg.p1.equals2D(snapPt)) \n if (this._allowSnappingToSourceVertices) continue; else return -1\n \n const dist = this._seg.distance(snapPt)\n if (dist < this._snapTolerance && dist < minDist) {\n minDist = dist\n snapIndex = i\n }\n }\n return snapIndex\n }\n setAllowSnappingToSourceVertices(allowSnappingToSourceVertices) {\n this._allowSnappingToSourceVertices = allowSnappingToSourceVertices\n }\n}\n","import TreeSet from '../../../../../../java/util/TreeSet.js'\nimport GeometryTransformer from '../../../geom/util/GeometryTransformer.js'\nimport hasInterface from '../../../../../../hasInterface.js'\nimport Double from '../../../../../../java/lang/Double.js'\nimport LineStringSnapper from './LineStringSnapper.js'\nimport PrecisionModel from '../../../geom/PrecisionModel.js'\nimport Polygonal from '../../../geom/Polygonal.js'\nexport default class GeometrySnapper {\n constructor() {\n GeometrySnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._srcGeom = null\n const srcGeom = arguments[0]\n this._srcGeom = srcGeom\n }\n static snap(g0, g1, snapTolerance) {\n const snapGeom = new Array(2).fill(null)\n const snapper0 = new GeometrySnapper(g0)\n snapGeom[0] = snapper0.snapTo(g1, snapTolerance)\n const snapper1 = new GeometrySnapper(g1)\n snapGeom[1] = snapper1.snapTo(snapGeom[0], snapTolerance)\n return snapGeom\n }\n static computeOverlaySnapTolerance() {\n if (arguments.length === 1) {\n const g = arguments[0]\n let snapTolerance = GeometrySnapper.computeSizeBasedSnapTolerance(g)\n const pm = g.getPrecisionModel()\n if (pm.getType() === PrecisionModel.FIXED) {\n const fixedSnapTol = 1 / pm.getScale() * 2 / 1.415\n if (fixedSnapTol > snapTolerance) snapTolerance = fixedSnapTol\n }\n return snapTolerance\n } else if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n return Math.min(GeometrySnapper.computeOverlaySnapTolerance(g0), GeometrySnapper.computeOverlaySnapTolerance(g1))\n }\n }\n static computeSizeBasedSnapTolerance(g) {\n const env = g.getEnvelopeInternal()\n const minDimension = Math.min(env.getHeight(), env.getWidth())\n const snapTol = minDimension * GeometrySnapper.SNAP_PRECISION_FACTOR\n return snapTol\n }\n static snapToSelf(geom, snapTolerance, cleanResult) {\n const snapper0 = new GeometrySnapper(geom)\n return snapper0.snapToSelf(snapTolerance, cleanResult)\n }\n snapTo(snapGeom, snapTolerance) {\n const snapPts = this.extractTargetCoordinates(snapGeom)\n const snapTrans = new SnapTransformer(snapTolerance, snapPts)\n return snapTrans.transform(this._srcGeom)\n }\n snapToSelf(snapTolerance, cleanResult) {\n const snapPts = this.extractTargetCoordinates(this._srcGeom)\n const snapTrans = new SnapTransformer(snapTolerance, snapPts, true)\n const snappedGeom = snapTrans.transform(this._srcGeom)\n let result = snappedGeom\n if (cleanResult && hasInterface(result, Polygonal)) \n result = snappedGeom.buffer(0)\n \n return result\n }\n computeSnapTolerance(ringPts) {\n const minSegLen = this.computeMinimumSegmentLength(ringPts)\n const snapTol = minSegLen / 10\n return snapTol\n }\n extractTargetCoordinates(g) {\n const ptSet = new TreeSet()\n const pts = g.getCoordinates()\n for (let i = 0; i < pts.length; i++) \n ptSet.add(pts[i])\n \n return ptSet.toArray(new Array(0).fill(null))\n }\n computeMinimumSegmentLength(pts) {\n let minSegLen = Double.MAX_VALUE\n for (let i = 0; i < pts.length - 1; i++) {\n const segLen = pts[i].distance(pts[i + 1])\n if (segLen < minSegLen) minSegLen = segLen\n }\n return minSegLen\n }\n}\nGeometrySnapper.SNAP_PRECISION_FACTOR = 1e-9\nclass SnapTransformer extends GeometryTransformer {\n constructor() {\n super()\n SnapTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._snapTolerance = null\n this._snapPts = null\n this._isSelfSnap = false\n if (arguments.length === 2) {\n const snapTolerance = arguments[0], snapPts = arguments[1]\n this._snapTolerance = snapTolerance\n this._snapPts = snapPts\n } else if (arguments.length === 3) {\n const snapTolerance = arguments[0], snapPts = arguments[1], isSelfSnap = arguments[2]\n this._snapTolerance = snapTolerance\n this._snapPts = snapPts\n this._isSelfSnap = isSelfSnap\n }\n }\n snapLine(srcPts, snapPts) {\n const snapper = new LineStringSnapper(srcPts, this._snapTolerance)\n snapper.setAllowSnappingToSourceVertices(this._isSelfSnap)\n return snapper.snapTo(snapPts)\n }\n transformCoordinates(coords, parent) {\n const srcPts = coords.toCoordinateArray()\n const newPts = this.snapLine(srcPts, this._snapPts)\n return this._factory.getCoordinateSequenceFactory().create(newPts)\n }\n}\n","import Double from '../../../../java/lang/Double.js'\nimport Long from '../../../../java/lang/Long.js'\nexport default class CommonBits {\n constructor() {\n this._isFirst = true\n this._commonMantissaBitsCount = 53\n this._commonBits = new Long()\n this._commonSignExp = null\n }\n\n getCommon() {\n return Double.longBitsToDouble(this._commonBits)\n }\n\n add(num) {\n const numBits = Double.doubleToLongBits(num)\n if (this._isFirst) {\n this._commonBits = numBits\n this._commonSignExp = CommonBits.signExpBits(this._commonBits)\n this._isFirst = false\n return null\n }\n const numSignExp = CommonBits.signExpBits(numBits)\n if (numSignExp !== this._commonSignExp) {\n this._commonBits.high = 0 | 0\n this._commonBits.low = 0 | 0\n return null\n }\n this._commonMantissaBitsCount = CommonBits.numCommonMostSigMantissaBits(this._commonBits, numBits)\n this._commonBits = CommonBits.zeroLowerBits(this._commonBits, 64 - (12 + this._commonMantissaBitsCount))\n }\n\n toString() {\n if (arguments.length === 1) {\n const bits = arguments[0]\n const x = Double.longBitsToDouble(bits)\n const numStr = Long.toBinaryString(bits)\n const padStr = '0000000000000000000000000000000000000000000000000000000000000000' + numStr\n const bitStr = padStr.substring(padStr.length - 64)\n const str = bitStr.substring(0, 1) + ' ' + bitStr.substring(1, 12) + '(exp) ' + bitStr.substring(12) + ' [ ' + x + ' ]'\n return str\n }\n }\n\n getClass() {\n return CommonBits\n }\n\n get interfaces_() {\n return []\n }\n\n static getBit(bits, i) {\n const mask = (1 << (i % 32))\n if (i < 32) return (bits.low & mask) !== 0 ? 1 : 0\n\n return (bits.high & mask) !== 0 ? 1 : 0\n }\n\n static signExpBits(num) {\n return num.high >>> 20\n }\n\n static zeroLowerBits(bits, nBits) {\n let prop = 'low'\n if (nBits > 32) {\n bits.low = 0 | 0\n nBits %= 32\n prop = 'high'\n }\n if (nBits > 0) {\n const mask = (nBits < 32) ? (~((1 << nBits) - 1)) : 0\n bits[prop] &= mask\n }\n return bits\n }\n\n static numCommonMostSigMantissaBits(num1, num2) {\n let count = 0\n for (let i = 52; i >= 0; i--) {\n if (CommonBits.getBit(num1, i) !== CommonBits.getBit(num2, i)) return count\n count++\n }\n return 52\n }\n}\n","import CommonBits from './CommonBits.js'\nimport CoordinateFilter from '../geom/CoordinateFilter.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequenceFilter from '../geom/CoordinateSequenceFilter.js'\nexport default class CommonBitsRemover {\n constructor() {\n CommonBitsRemover.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._commonCoord = null\n this._ccFilter = new CommonCoordinateFilter()\n }\n addCommonBits(geom) {\n const trans = new Translater(this._commonCoord)\n geom.apply(trans)\n geom.geometryChanged()\n }\n removeCommonBits(geom) {\n if (this._commonCoord.x === 0.0 && this._commonCoord.y === 0.0) return geom\n const invCoord = new Coordinate(this._commonCoord)\n invCoord.x = -invCoord.x\n invCoord.y = -invCoord.y\n const trans = new Translater(invCoord)\n geom.apply(trans)\n geom.geometryChanged()\n return geom\n }\n getCommonCoordinate() {\n return this._commonCoord\n }\n add(geom) {\n geom.apply(this._ccFilter)\n this._commonCoord = this._ccFilter.getCommonCoordinate()\n }\n}\nclass CommonCoordinateFilter {\n constructor() {\n CommonCoordinateFilter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._commonBitsX = new CommonBits()\n this._commonBitsY = new CommonBits()\n }\n filter(coord) {\n this._commonBitsX.add(coord.x)\n this._commonBitsY.add(coord.y)\n }\n getCommonCoordinate() {\n return new Coordinate(this._commonBitsX.getCommon(), this._commonBitsY.getCommon())\n }\n get interfaces_() {\n return [CoordinateFilter]\n }\n}\nclass Translater {\n constructor() {\n Translater.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.trans = null\n const trans = arguments[0]\n this.trans = trans\n }\n filter(seq, i) {\n const xp = seq.getOrdinate(i, 0) + this.trans.x\n const yp = seq.getOrdinate(i, 1) + this.trans.y\n seq.setOrdinate(i, 0, xp)\n seq.setOrdinate(i, 1, yp)\n }\n isDone() {\n return false\n }\n isGeometryChanged() {\n return true\n }\n get interfaces_() {\n return [CoordinateSequenceFilter]\n }\n}\nCommonBitsRemover.CommonCoordinateFilter = CommonCoordinateFilter\nCommonBitsRemover.Translater = Translater\n","import GeometrySnapper from './GeometrySnapper.js'\nimport System from '../../../../../../java/lang/System.js'\nimport CommonBitsRemover from '../../../precision/CommonBitsRemover.js'\nimport OverlayOp from '../OverlayOp.js'\nexport default class SnapOverlayOp {\n constructor() {\n SnapOverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = new Array(2).fill(null)\n this._snapTolerance = null\n this._cbr = null\n const g1 = arguments[0], g2 = arguments[1]\n this._geom[0] = g1\n this._geom[1] = g2\n this.computeSnapTolerance()\n }\n static overlayOp(g0, g1, opCode) {\n const op = new SnapOverlayOp(g0, g1)\n return op.getResultGeometry(opCode)\n }\n static union(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.UNION)\n }\n static intersection(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.INTERSECTION)\n }\n static symDifference(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.SYMDIFFERENCE)\n }\n static difference(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.DIFFERENCE)\n }\n selfSnap(geom) {\n const snapper0 = new GeometrySnapper(geom)\n const snapGeom = snapper0.snapTo(geom, this._snapTolerance)\n return snapGeom\n }\n removeCommonBits(geom) {\n this._cbr = new CommonBitsRemover()\n this._cbr.add(geom[0])\n this._cbr.add(geom[1])\n const remGeom = new Array(2).fill(null)\n remGeom[0] = this._cbr.removeCommonBits(geom[0].copy())\n remGeom[1] = this._cbr.removeCommonBits(geom[1].copy())\n return remGeom\n }\n prepareResult(geom) {\n this._cbr.addCommonBits(geom)\n return geom\n }\n getResultGeometry(opCode) {\n const prepGeom = this.snap(this._geom)\n const result = OverlayOp.overlayOp(prepGeom[0], prepGeom[1], opCode)\n return this.prepareResult(result)\n }\n checkValid(g) {\n if (!g.isValid()) \n System.out.println('Snapped geometry is invalid')\n \n }\n computeSnapTolerance() {\n this._snapTolerance = GeometrySnapper.computeOverlaySnapTolerance(this._geom[0], this._geom[1])\n }\n snap(geom) {\n const remGeom = this.removeCommonBits(geom)\n const snapGeom = GeometrySnapper.snap(remGeom[0], remGeom[1], this._snapTolerance)\n return snapGeom\n }\n}\n","import SnapOverlayOp from './SnapOverlayOp.js'\nimport RuntimeException from '../../../../../../java/lang/RuntimeException.js'\nimport OverlayOp from '../OverlayOp.js'\nexport default class SnapIfNeededOverlayOp {\n constructor() {\n SnapIfNeededOverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = new Array(2).fill(null)\n const g1 = arguments[0], g2 = arguments[1]\n this._geom[0] = g1\n this._geom[1] = g2\n }\n static overlayOp(g0, g1, opCode) {\n const op = new SnapIfNeededOverlayOp(g0, g1)\n return op.getResultGeometry(opCode)\n }\n static union(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.UNION)\n }\n static intersection(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.INTERSECTION)\n }\n static symDifference(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.SYMDIFFERENCE)\n }\n static difference(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.DIFFERENCE)\n }\n getResultGeometry(opCode) {\n let result = null\n let isSuccess = false\n let savedException = null\n try {\n result = OverlayOp.overlayOp(this._geom[0], this._geom[1], opCode)\n const isValid = true\n if (isValid) isSuccess = true\n } catch (ex) {\n if (ex instanceof RuntimeException) \n savedException = ex\n else throw ex\n } finally {}\n if (!isSuccess) \n try {\n result = SnapOverlayOp.overlayOp(this._geom[0], this._geom[1], opCode)\n } catch (ex) {\n if (ex instanceof RuntimeException) \n throw savedException\n else throw ex\n } finally {}\n \n return result\n }\n}\n","export default class MonotoneChain {\n constructor() {\n MonotoneChain.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.mce = null\n this.chainIndex = null\n const mce = arguments[0], chainIndex = arguments[1]\n this.mce = mce\n this.chainIndex = chainIndex\n }\n computeIntersections(mc, si) {\n this.mce.computeIntersectsForChain(this.chainIndex, mc.mce, mc.chainIndex, si)\n }\n}\n","import Comparable from '../../../../../java/lang/Comparable.js'\nexport default class SweepLineEvent {\n constructor() {\n SweepLineEvent.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._label = null\n this._xValue = null\n this._eventType = null\n this._insertEvent = null\n this._deleteEventIndex = null\n this._obj = null\n if (arguments.length === 2) {\n const x = arguments[0], insertEvent = arguments[1]\n this._eventType = SweepLineEvent.DELETE\n this._xValue = x\n this._insertEvent = insertEvent\n } else if (arguments.length === 3) {\n const label = arguments[0], x = arguments[1], obj = arguments[2]\n this._eventType = SweepLineEvent.INSERT\n this._label = label\n this._xValue = x\n this._obj = obj\n }\n }\n isDelete() {\n return this._eventType === SweepLineEvent.DELETE\n }\n setDeleteEventIndex(deleteEventIndex) {\n this._deleteEventIndex = deleteEventIndex\n }\n getObject() {\n return this._obj\n }\n compareTo(o) {\n const pe = o\n if (this._xValue < pe._xValue) return -1\n if (this._xValue > pe._xValue) return 1\n if (this._eventType < pe._eventType) return -1\n if (this._eventType > pe._eventType) return 1\n return 0\n }\n getInsertEvent() {\n return this._insertEvent\n }\n isInsert() {\n return this._eventType === SweepLineEvent.INSERT\n }\n isSameLabel(ev) {\n if (this._label === null) return false\n return this._label === ev._label\n }\n getDeleteEventIndex() {\n return this._deleteEventIndex\n }\n get interfaces_() {\n return [Comparable]\n }\n}\nSweepLineEvent.INSERT = 1\nSweepLineEvent.DELETE = 2\n","export default class SegmentIntersector {\n constructor() {\n SegmentIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hasIntersection = false\n this._hasProper = false\n this._hasProperInterior = false\n this._properIntersectionPoint = null\n this._li = null\n this._includeProper = null\n this._recordIsolated = null\n this._isSelfIntersection = null\n this._numIntersections = 0\n this.numTests = 0\n this._bdyNodes = null\n this._isDone = false\n this._isDoneWhenProperInt = false\n const li = arguments[0], includeProper = arguments[1], recordIsolated = arguments[2]\n this._li = li\n this._includeProper = includeProper\n this._recordIsolated = recordIsolated\n }\n static isAdjacentSegments(i1, i2) {\n return Math.abs(i1 - i2) === 1\n }\n isTrivialIntersection(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1) \n if (this._li.getIntersectionNum() === 1) {\n if (SegmentIntersector.isAdjacentSegments(segIndex0, segIndex1)) return true\n if (e0.isClosed()) {\n const maxSegIndex = e0.getNumPoints() - 1\n if (segIndex0 === 0 && segIndex1 === maxSegIndex || segIndex1 === 0 && segIndex0 === maxSegIndex) \n return true\n \n }\n }\n \n return false\n }\n getProperIntersectionPoint() {\n return this._properIntersectionPoint\n }\n setIsDoneIfProperInt(isDoneWhenProperInt) {\n this._isDoneWhenProperInt = isDoneWhenProperInt\n }\n hasProperInteriorIntersection() {\n return this._hasProperInterior\n }\n isBoundaryPointInternal(li, bdyNodes) {\n for (let i = bdyNodes.iterator(); i.hasNext(); ) {\n const node = i.next()\n const pt = node.getCoordinate()\n if (li.isIntersection(pt)) return true\n }\n return false\n }\n hasProperIntersection() {\n return this._hasProper\n }\n hasIntersection() {\n return this._hasIntersection\n }\n isDone() {\n return this._isDone\n }\n isBoundaryPoint(li, bdyNodes) {\n if (bdyNodes === null) return false\n if (this.isBoundaryPointInternal(li, bdyNodes[0])) return true\n if (this.isBoundaryPointInternal(li, bdyNodes[1])) return true\n return false\n }\n setBoundaryNodes(bdyNodes0, bdyNodes1) {\n this._bdyNodes = new Array(2).fill(null)\n this._bdyNodes[0] = bdyNodes0\n this._bdyNodes[1] = bdyNodes1\n }\n addIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n this.numTests++\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) {\n if (this._recordIsolated) {\n e0.setIsolated(false)\n e1.setIsolated(false)\n }\n this._numIntersections++\n if (!this.isTrivialIntersection(e0, segIndex0, e1, segIndex1)) {\n this._hasIntersection = true\n if (this._includeProper || !this._li.isProper()) {\n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n }\n if (this._li.isProper()) {\n this._properIntersectionPoint = this._li.getIntersection(0).copy()\n this._hasProper = true\n if (this._isDoneWhenProperInt) \n this._isDone = true\n \n if (!this.isBoundaryPoint(this._li, this._bdyNodes)) this._hasProperInterior = true\n }\n }\n }\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport MonotoneChain from './MonotoneChain.js'\nimport SweepLineEvent from './SweepLineEvent.js'\nimport EdgeSetIntersector from './EdgeSetIntersector.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport List from '../../../../../java/util/List.js'\nexport default class SimpleMCSweepLineIntersector extends EdgeSetIntersector {\n constructor() {\n super()\n SimpleMCSweepLineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.events = new ArrayList()\n this.nOverlaps = null\n }\n prepareEvents() {\n Collections.sort(this.events)\n for (let i = 0; i < this.events.size(); i++) {\n const ev = this.events.get(i)\n if (ev.isDelete()) \n ev.getInsertEvent().setDeleteEventIndex(i)\n \n }\n }\n computeIntersections() {\n if (arguments.length === 1) {\n const si = arguments[0]\n this.nOverlaps = 0\n this.prepareEvents()\n for (let i = 0; i < this.events.size(); i++) {\n const ev = this.events.get(i)\n if (ev.isInsert()) \n this.processOverlaps(i, ev.getDeleteEventIndex(), ev, si)\n \n if (si.isDone()) \n break\n \n }\n } else if (arguments.length === 3) {\n if (arguments[2] instanceof SegmentIntersector && (hasInterface(arguments[0], List) && hasInterface(arguments[1], List))) {\n const edges0 = arguments[0], edges1 = arguments[1], si = arguments[2]\n this.addEdges(edges0, edges0)\n this.addEdges(edges1, edges1)\n this.computeIntersections(si)\n } else if (typeof arguments[2] === 'boolean' && (hasInterface(arguments[0], List) && arguments[1] instanceof SegmentIntersector)) {\n const edges = arguments[0], si = arguments[1], testAllSegments = arguments[2]\n if (testAllSegments) this.addEdges(edges, null); else this.addEdges(edges)\n this.computeIntersections(si)\n }\n }\n }\n addEdge(edge, edgeSet) {\n const mce = edge.getMonotoneChainEdge()\n const startIndex = mce.getStartIndexes()\n for (let i = 0; i < startIndex.length - 1; i++) {\n const mc = new MonotoneChain(mce, i)\n const insertEvent = new SweepLineEvent(edgeSet, mce.getMinX(i), mc)\n this.events.add(insertEvent)\n this.events.add(new SweepLineEvent(mce.getMaxX(i), insertEvent))\n }\n }\n processOverlaps(start, end, ev0, si) {\n const mc0 = ev0.getObject()\n for (let i = start; i < end; i++) {\n const ev1 = this.events.get(i)\n if (ev1.isInsert()) {\n const mc1 = ev1.getObject()\n if (!ev0.isSameLabel(ev1)) {\n mc0.computeIntersections(mc1, si)\n this.nOverlaps++\n }\n }\n }\n }\n addEdges() {\n if (arguments.length === 1) {\n const edges = arguments[0]\n for (let i = edges.iterator(); i.hasNext(); ) {\n const edge = i.next()\n this.addEdge(edge, edge)\n }\n } else if (arguments.length === 2) {\n const edges = arguments[0], edgeSet = arguments[1]\n for (let i = edges.iterator(); i.hasNext(); ) {\n const edge = i.next()\n this.addEdge(edge, edgeSet)\n }\n }\n }\n}\n","export default class EdgeSetIntersector {}\n","import WKTWriter from '../../io/WKTWriter.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Comparator from '../../../../../java/util/Comparator.js'\nexport default class IntervalRTreeNode {\n constructor() {\n IntervalRTreeNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._min = Double.POSITIVE_INFINITY\n this._max = Double.NEGATIVE_INFINITY\n }\n getMin() {\n return this._min\n }\n intersects(queryMin, queryMax) {\n if (this._min > queryMax || this._max < queryMin) return false\n return true\n }\n getMax() {\n return this._max\n }\n toString() {\n return WKTWriter.toLineString(new Coordinate(this._min, 0), new Coordinate(this._max, 0))\n }\n}\nclass NodeComparator {\n compare(o1, o2) {\n const n1 = o1\n const n2 = o2\n const mid1 = (n1._min + n1._max) / 2\n const mid2 = (n2._min + n2._max) / 2\n if (mid1 < mid2) return -1\n if (mid1 > mid2) return 1\n return 0\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nIntervalRTreeNode.NodeComparator = NodeComparator\n","import IntervalRTreeNode from './IntervalRTreeNode.js'\nexport default class IntervalRTreeLeafNode extends IntervalRTreeNode {\n constructor() {\n super()\n IntervalRTreeLeafNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._item = null\n const min = arguments[0], max = arguments[1], item = arguments[2]\n this._min = min\n this._max = max\n this._item = item\n }\n query(queryMin, queryMax, visitor) {\n if (!this.intersects(queryMin, queryMax)) return null\n visitor.visitItem(this._item)\n }\n}\n","import IntervalRTreeNode from './IntervalRTreeNode.js'\nexport default class IntervalRTreeBranchNode extends IntervalRTreeNode {\n constructor() {\n super()\n IntervalRTreeBranchNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._node1 = null\n this._node2 = null\n const n1 = arguments[0], n2 = arguments[1]\n this._node1 = n1\n this._node2 = n2\n this.buildExtent(this._node1, this._node2)\n }\n buildExtent(n1, n2) {\n this._min = Math.min(n1._min, n2._min)\n this._max = Math.max(n1._max, n2._max)\n }\n query(queryMin, queryMax, visitor) {\n if (!this.intersects(queryMin, queryMax)) \n return null\n \n if (this._node1 !== null) this._node1.query(queryMin, queryMax, visitor)\n if (this._node2 !== null) this._node2.query(queryMin, queryMax, visitor)\n }\n}\n","import WKTWriter from '../../io/WKTWriter.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport IntervalRTreeLeafNode from './IntervalRTreeLeafNode.js'\nimport IntervalRTreeNode from './IntervalRTreeNode.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport System from '../../../../../java/lang/System.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport IntervalRTreeBranchNode from './IntervalRTreeBranchNode.js'\nexport default class SortedPackedIntervalRTree {\n constructor() {\n SortedPackedIntervalRTree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._leaves = new ArrayList()\n this._root = null\n this._level = 0\n }\n buildTree() {\n Collections.sort(this._leaves, new IntervalRTreeNode.NodeComparator())\n let src = this._leaves\n let temp = null\n let dest = new ArrayList()\n while (true) {\n this.buildLevel(src, dest)\n if (dest.size() === 1) return dest.get(0)\n temp = src\n src = dest\n dest = temp\n }\n }\n insert(min, max, item) {\n if (this._root !== null) throw new IllegalStateException('Index cannot be added to once it has been queried')\n this._leaves.add(new IntervalRTreeLeafNode(min, max, item))\n }\n query(min, max, visitor) {\n this.init()\n if (this._root === null) return null\n this._root.query(min, max, visitor)\n }\n buildRoot() {\n if (this._root !== null) return null\n this._root = this.buildTree()\n }\n printNode(node) {\n System.out.println(WKTWriter.toLineString(new Coordinate(node._min, this._level), new Coordinate(node._max, this._level)))\n }\n init() {\n if (this._root !== null) return null\n if (this._leaves.size() === 0) return null\n this.buildRoot()\n }\n buildLevel(src, dest) {\n this._level++\n dest.clear()\n for (let i = 0; i < src.size(); i += 2) {\n const n1 = src.get(i)\n const n2 = i + 1 < src.size() ? src.get(i) : null\n if (n2 === null) {\n dest.add(n1)\n } else {\n const node = new IntervalRTreeBranchNode(src.get(i), src.get(i + 1))\n dest.add(node)\n }\n }\n }\n}\n","import LineString from '../LineString.js'\nimport Geometry from '../Geometry.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Collection from '../../../../../java/util/Collection.js'\nimport LinearRing from '../LinearRing.js'\nimport GeometryComponentFilter from '../GeometryComponentFilter.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class LinearComponentExtracter {\n constructor() {\n LinearComponentExtracter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._lines = null\n this._isForcedToLineString = false\n if (arguments.length === 1) {\n const lines = arguments[0]\n this._lines = lines\n } else if (arguments.length === 2) {\n const lines = arguments[0], isForcedToLineString = arguments[1]\n this._lines = lines\n this._isForcedToLineString = isForcedToLineString\n }\n }\n static getGeometry() {\n if (arguments.length === 1) {\n const geom = arguments[0]\n return geom.getFactory().buildGeometry(LinearComponentExtracter.getLines(geom))\n } else if (arguments.length === 2) {\n const geom = arguments[0], forceToLineString = arguments[1]\n return geom.getFactory().buildGeometry(LinearComponentExtracter.getLines(geom, forceToLineString))\n }\n }\n static getLines() {\n if (arguments.length === 1) {\n const geom = arguments[0]\n return LinearComponentExtracter.getLines(geom, false)\n } else if (arguments.length === 2) {\n if (hasInterface(arguments[0], Collection) && hasInterface(arguments[1], Collection)) {\n const geoms = arguments[0], lines = arguments[1]\n for (let i = geoms.iterator(); i.hasNext(); ) {\n const g = i.next()\n LinearComponentExtracter.getLines(g, lines)\n }\n return lines\n } else if (arguments[0] instanceof Geometry && typeof arguments[1] === 'boolean') {\n const geom = arguments[0], forceToLineString = arguments[1]\n const lines = new ArrayList()\n geom.apply(new LinearComponentExtracter(lines, forceToLineString))\n return lines\n } else if (arguments[0] instanceof Geometry && hasInterface(arguments[1], Collection)) {\n const geom = arguments[0], lines = arguments[1]\n if (geom instanceof LineString) \n lines.add(geom)\n else \n geom.apply(new LinearComponentExtracter(lines))\n \n return lines\n }\n } else if (arguments.length === 3) {\n if (typeof arguments[2] === 'boolean' && (hasInterface(arguments[0], Collection) && hasInterface(arguments[1], Collection))) {\n const geoms = arguments[0], lines = arguments[1], forceToLineString = arguments[2]\n for (let i = geoms.iterator(); i.hasNext(); ) {\n const g = i.next()\n LinearComponentExtracter.getLines(g, lines, forceToLineString)\n }\n return lines\n } else if (typeof arguments[2] === 'boolean' && (arguments[0] instanceof Geometry && hasInterface(arguments[1], Collection))) {\n const geom = arguments[0], lines = arguments[1], forceToLineString = arguments[2]\n geom.apply(new LinearComponentExtracter(lines, forceToLineString))\n return lines\n }\n }\n }\n filter(geom) {\n if (this._isForcedToLineString && geom instanceof LinearRing) {\n const line = geom.getFactory().createLineString(geom.getCoordinateSequence())\n this._lines.add(line)\n return null\n }\n if (geom instanceof LineString) this._lines.add(geom)\n }\n setForceToLineString(isForcedToLineString) {\n this._isForcedToLineString = isForcedToLineString\n }\n get interfaces_() {\n return [GeometryComponentFilter]\n }\n}\n","import ItemVisitor from './ItemVisitor.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class ArrayListVisitor {\n constructor() {\n ArrayListVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._items = new ArrayList()\n }\n visitItem(item) {\n this._items.add(item)\n }\n getItems() {\n return this._items\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport ItemVisitor from '../../index/ItemVisitor.js'\nimport PointOnGeometryLocator from './PointOnGeometryLocator.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport SortedPackedIntervalRTree from '../../index/intervalrtree/SortedPackedIntervalRTree.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Polygonal from '../../geom/Polygonal.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport LinearComponentExtracter from '../../geom/util/LinearComponentExtracter.js'\nimport ArrayListVisitor from '../../index/ArrayListVisitor.js'\nimport RayCrossingCounter from '../RayCrossingCounter.js'\nexport default class IndexedPointInAreaLocator {\n constructor() {\n IndexedPointInAreaLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = null\n this._index = null\n const g = arguments[0]\n if (!(hasInterface(g, Polygonal) || g instanceof LinearRing)) throw new IllegalArgumentException('Argument must be Polygonal or LinearRing')\n this._geom = g\n }\n locate(p) {\n if (this._index === null) {\n this._index = new IntervalIndexedGeometry(this._geom)\n this._geom = null\n }\n const rcc = new RayCrossingCounter(p)\n const visitor = new SegmentVisitor(rcc)\n this._index.query(p.y, p.y, visitor)\n return rcc.getLocation()\n }\n get interfaces_() {\n return [PointOnGeometryLocator]\n }\n}\nclass SegmentVisitor {\n constructor() {\n SegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._counter = null\n const counter = arguments[0]\n this._counter = counter\n }\n visitItem(item) {\n const seg = item\n this._counter.countSegment(seg.getCoordinate(0), seg.getCoordinate(1))\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\nclass IntervalIndexedGeometry {\n constructor() {\n IntervalIndexedGeometry.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isEmpty = false\n this._index = new SortedPackedIntervalRTree()\n const geom = arguments[0]\n if (geom.isEmpty()) this._isEmpty = true; else this.init(geom)\n }\n init(geom) {\n const lines = LinearComponentExtracter.getLines(geom)\n for (let i = lines.iterator(); i.hasNext(); ) {\n const line = i.next()\n const pts = line.getCoordinates()\n this.addLine(pts)\n }\n }\n addLine(pts) {\n for (let i = 1; i < pts.length; i++) {\n const seg = new LineSegment(pts[i - 1], pts[i])\n const min = Math.min(seg.p0.y, seg.p1.y)\n const max = Math.max(seg.p0.y, seg.p1.y)\n this._index.insert(min, max, seg)\n }\n }\n query() {\n if (arguments.length === 2) {\n const min = arguments[0], max = arguments[1]\n if (this._isEmpty) return new ArrayList()\n const visitor = new ArrayListVisitor()\n this._index.query(min, max, visitor)\n return visitor.getItems()\n } else if (arguments.length === 3) {\n const min = arguments[0], max = arguments[1], visitor = arguments[2]\n if (this._isEmpty) return null\n this._index.query(min, max, visitor)\n }\n }\n}\nIndexedPointInAreaLocator.SegmentVisitor = SegmentVisitor\nIndexedPointInAreaLocator.IntervalIndexedGeometry = IntervalIndexedGeometry\n","import PointLocator from '../algorithm/PointLocator.js'\nimport Location from '../geom/Location.js'\nimport LineString from '../geom/LineString.js'\nimport HashMap from '../../../../java/util/HashMap.js'\nimport Geometry from '../geom/Geometry.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Position from './Position.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Point from '../geom/Point.js'\nimport Polygon from '../geom/Polygon.js'\nimport MultiPoint from '../geom/MultiPoint.js'\nimport SimpleMCSweepLineIntersector from './index/SimpleMCSweepLineIntersector.js'\nimport LinearRing from '../geom/LinearRing.js'\nimport BoundaryNodeRule from '../algorithm/BoundaryNodeRule.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport SegmentIntersector from './index/SegmentIntersector.js'\nimport MultiPolygon from '../geom/MultiPolygon.js'\nimport Label from './Label.js'\nimport GeometryCollection from '../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nimport Polygonal from '../geom/Polygonal.js'\nimport IndexedPointInAreaLocator from '../algorithm/locate/IndexedPointInAreaLocator.js'\nimport Assert from '../util/Assert.js'\nimport Edge from './Edge.js'\nimport MultiLineString from '../geom/MultiLineString.js'\nimport PlanarGraph from './PlanarGraph.js'\nexport default class GeometryGraph extends PlanarGraph {\n constructor() {\n super()\n GeometryGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentGeom = null\n this._lineEdgeMap = new HashMap()\n this._boundaryNodeRule = null\n this._useBoundaryDeterminationRule = true\n this._argIndex = null\n this._boundaryNodes = null\n this._hasTooFewPoints = false\n this._invalidPoint = null\n this._areaPtLocator = null\n this._ptLocator = new PointLocator()\n if (arguments.length === 2) {\n const argIndex = arguments[0], parentGeom = arguments[1]\n GeometryGraph.constructor_.call(this, argIndex, parentGeom, BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE)\n } else if (arguments.length === 3) {\n const argIndex = arguments[0], parentGeom = arguments[1], boundaryNodeRule = arguments[2]\n this._argIndex = argIndex\n this._parentGeom = parentGeom\n this._boundaryNodeRule = boundaryNodeRule\n if (parentGeom !== null) \n this.add(parentGeom)\n \n }\n }\n static determineBoundary(boundaryNodeRule, boundaryCount) {\n return boundaryNodeRule.isInBoundary(boundaryCount) ? Location.BOUNDARY : Location.INTERIOR\n }\n insertBoundaryPoint(argIndex, coord) {\n const n = this._nodes.addNode(coord)\n const lbl = n.getLabel()\n let boundaryCount = 1\n let loc = Location.NONE\n loc = lbl.getLocation(argIndex, Position.ON)\n if (loc === Location.BOUNDARY) boundaryCount++\n const newLoc = GeometryGraph.determineBoundary(this._boundaryNodeRule, boundaryCount)\n lbl.setLocation(argIndex, newLoc)\n }\n computeSelfNodes() {\n if (arguments.length === 2) {\n const li = arguments[0], computeRingSelfNodes = arguments[1]\n return this.computeSelfNodes(li, computeRingSelfNodes, false)\n } else if (arguments.length === 3) {\n const li = arguments[0], computeRingSelfNodes = arguments[1], isDoneIfProperInt = arguments[2]\n const si = new SegmentIntersector(li, true, false)\n si.setIsDoneIfProperInt(isDoneIfProperInt)\n const esi = this.createEdgeSetIntersector()\n const isRings = this._parentGeom instanceof LinearRing || this._parentGeom instanceof Polygon || this._parentGeom instanceof MultiPolygon\n const computeAllSegments = computeRingSelfNodes || !isRings\n esi.computeIntersections(this._edges, si, computeAllSegments)\n this.addSelfIntersectionNodes(this._argIndex)\n return si\n }\n }\n computeSplitEdges(edgelist) {\n for (let i = this._edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n e.eiList.addSplitEdges(edgelist)\n }\n }\n computeEdgeIntersections(g, li, includeProper) {\n const si = new SegmentIntersector(li, includeProper, true)\n si.setBoundaryNodes(this.getBoundaryNodes(), g.getBoundaryNodes())\n const esi = this.createEdgeSetIntersector()\n esi.computeIntersections(this._edges, g._edges, si)\n return si\n }\n getGeometry() {\n return this._parentGeom\n }\n getBoundaryNodeRule() {\n return this._boundaryNodeRule\n }\n hasTooFewPoints() {\n return this._hasTooFewPoints\n }\n addPoint() {\n if (arguments[0] instanceof Point) {\n const p = arguments[0]\n const coord = p.getCoordinate()\n this.insertPoint(this._argIndex, coord, Location.INTERIOR)\n } else if (arguments[0] instanceof Coordinate) {\n const pt = arguments[0]\n this.insertPoint(this._argIndex, pt, Location.INTERIOR)\n }\n }\n addPolygon(p) {\n this.addPolygonRing(p.getExteriorRing(), Location.EXTERIOR, Location.INTERIOR)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n this.addPolygonRing(hole, Location.INTERIOR, Location.EXTERIOR)\n }\n }\n addEdge(e) {\n this.insertEdge(e)\n const coord = e.getCoordinates()\n this.insertPoint(this._argIndex, coord[0], Location.BOUNDARY)\n this.insertPoint(this._argIndex, coord[coord.length - 1], Location.BOUNDARY)\n }\n addLineString(line) {\n const coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates())\n if (coord.length < 2) {\n this._hasTooFewPoints = true\n this._invalidPoint = coord[0]\n return null\n }\n const e = new Edge(coord, new Label(this._argIndex, Location.INTERIOR))\n this._lineEdgeMap.put(line, e)\n this.insertEdge(e)\n Assert.isTrue(coord.length >= 2, 'found LineString with single point')\n this.insertBoundaryPoint(this._argIndex, coord[0])\n this.insertBoundaryPoint(this._argIndex, coord[coord.length - 1])\n }\n getInvalidPoint() {\n return this._invalidPoint\n }\n getBoundaryPoints() {\n const coll = this.getBoundaryNodes()\n const pts = new Array(coll.size()).fill(null)\n let i = 0\n for (let it = coll.iterator(); it.hasNext(); ) {\n const node = it.next()\n pts[i++] = node.getCoordinate().copy()\n }\n return pts\n }\n getBoundaryNodes() {\n if (this._boundaryNodes === null) this._boundaryNodes = this._nodes.getBoundaryNodes(this._argIndex)\n return this._boundaryNodes\n }\n addSelfIntersectionNode(argIndex, coord, loc) {\n if (this.isBoundaryNode(argIndex, coord)) return null\n if (loc === Location.BOUNDARY && this._useBoundaryDeterminationRule) this.insertBoundaryPoint(argIndex, coord); else this.insertPoint(argIndex, coord, loc)\n }\n addPolygonRing(lr, cwLeft, cwRight) {\n if (lr.isEmpty()) return null\n const coord = CoordinateArrays.removeRepeatedPoints(lr.getCoordinates())\n if (coord.length < 4) {\n this._hasTooFewPoints = true\n this._invalidPoint = coord[0]\n return null\n }\n let left = cwLeft\n let right = cwRight\n if (Orientation.isCCW(coord)) {\n left = cwRight\n right = cwLeft\n }\n const e = new Edge(coord, new Label(this._argIndex, Location.BOUNDARY, left, right))\n this._lineEdgeMap.put(lr, e)\n this.insertEdge(e)\n this.insertPoint(this._argIndex, coord[0], Location.BOUNDARY)\n }\n insertPoint(argIndex, coord, onLocation) {\n const n = this._nodes.addNode(coord)\n const lbl = n.getLabel()\n if (lbl === null) \n n._label = new Label(argIndex, onLocation)\n else lbl.setLocation(argIndex, onLocation)\n }\n createEdgeSetIntersector() {\n return new SimpleMCSweepLineIntersector()\n }\n addSelfIntersectionNodes(argIndex) {\n for (let i = this._edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.eiList.iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n this.addSelfIntersectionNode(argIndex, ei.coord, eLoc)\n }\n }\n }\n add() {\n if (arguments.length === 1 && arguments[0] instanceof Geometry) {\n const g = arguments[0]\n if (g.isEmpty()) return null\n if (g instanceof MultiPolygon) this._useBoundaryDeterminationRule = false\n if (g instanceof Polygon) this.addPolygon(g); else if (g instanceof LineString) this.addLineString(g); else if (g instanceof Point) this.addPoint(g); else if (g instanceof MultiPoint) this.addCollection(g); else if (g instanceof MultiLineString) this.addCollection(g); else if (g instanceof MultiPolygon) this.addCollection(g); else if (g instanceof GeometryCollection) this.addCollection(g); else throw new UnsupportedOperationException(g.getGeometryType())\n } else {\n return super.add.apply(this, arguments)\n }\n }\n addCollection(gc) {\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.add(g)\n }\n }\n locate(pt) {\n if (hasInterface(this._parentGeom, Polygonal) && this._parentGeom.getNumGeometries() > 50) {\n if (this._areaPtLocator === null) \n this._areaPtLocator = new IndexedPointInAreaLocator(this._parentGeom)\n \n return this._areaPtLocator.locate(pt)\n }\n return this._ptLocator.locate(pt, this._parentGeom)\n }\n findEdge() {\n if (arguments.length === 1 && arguments[0] instanceof LineString) {\n const line = arguments[0]\n return this._lineEdgeMap.get(line)\n } else {\n return super.findEdge.apply(this, arguments)\n }\n }\n}\n","import BoundaryNodeRule from '../algorithm/BoundaryNodeRule.js'\nimport GeometryGraph from '../geomgraph/GeometryGraph.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nexport default class GeometryGraphOperation {\n constructor() {\n GeometryGraphOperation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._resultPrecisionModel = null\n this._arg = null\n if (arguments.length === 1) {\n const g0 = arguments[0]\n this.setComputationPrecision(g0.getPrecisionModel())\n this._arg = new Array(1).fill(null)\n this._arg[0] = new GeometryGraph(0, g0)\n \n } else if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1, BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE)\n } else if (arguments.length === 3) {\n const g0 = arguments[0], g1 = arguments[1], boundaryNodeRule = arguments[2]\n if (g0.getPrecisionModel().compareTo(g1.getPrecisionModel()) >= 0) this.setComputationPrecision(g0.getPrecisionModel()); else this.setComputationPrecision(g1.getPrecisionModel())\n this._arg = new Array(2).fill(null)\n this._arg[0] = new GeometryGraph(0, g0, boundaryNodeRule)\n this._arg[1] = new GeometryGraph(1, g1, boundaryNodeRule)\n }\n }\n getArgGeometry(i) {\n return this._arg[i].getGeometry()\n }\n setComputationPrecision(pm) {\n this._resultPrecisionModel = pm\n this._li.setPrecisionModel(this._resultPrecisionModel)\n }\n}\n","import PointLocator from '../../algorithm/PointLocator.js'\nimport Location from '../../geom/Location.js'\nimport EdgeNodingValidator from '../../geomgraph/EdgeNodingValidator.js'\nimport GeometryCollectionMapper from '../../geom/util/GeometryCollectionMapper.js'\nimport PolygonBuilder from './PolygonBuilder.js'\nimport Position from '../../geomgraph/Position.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport LineBuilder from './LineBuilder.js'\nimport PointBuilder from './PointBuilder.js'\nimport SnapIfNeededOverlayOp from './snap/SnapIfNeededOverlayOp.js'\nimport Label from '../../geomgraph/Label.js'\nimport OverlayNodeFactory from './OverlayNodeFactory.js'\nimport GeometryGraphOperation from '../GeometryGraphOperation.js'\nimport EdgeList from '../../geomgraph/EdgeList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class OverlayOp extends GeometryGraphOperation {\n constructor() {\n super()\n OverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._ptLocator = new PointLocator()\n this._geomFact = null\n this._resultGeom = null\n this._graph = null\n this._edgeList = new EdgeList()\n this._resultPolyList = new ArrayList()\n this._resultLineList = new ArrayList()\n this._resultPointList = new ArrayList()\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1)\n this._graph = new PlanarGraph(new OverlayNodeFactory())\n this._geomFact = g0.getFactory()\n }\n static overlayOp(geom0, geom1, opCode) {\n const gov = new OverlayOp(geom0, geom1)\n const geomOv = gov.getResultGeometry(opCode)\n return geomOv\n }\n static union(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) {\n if (geom.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.UNION, geom, other, geom.getFactory())\n if (geom.isEmpty()) return other.copy()\n if (other.isEmpty()) return geom.copy()\n }\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.UNION)\n }\n static intersection(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.INTERSECTION, geom, other, geom.getFactory())\n if (geom.isGeometryCollection()) {\n const g2 = other\n return GeometryCollectionMapper.map(geom, new (class {\n get interfaces_() {\n return [MapOp]\n }\n map(g) {\n return OverlayOp.intersection(g, g2)\n }\n })())\n }\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.INTERSECTION)\n }\n static symDifference(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) {\n if (geom.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.SYMDIFFERENCE, geom, other, geom.getFactory())\n if (geom.isEmpty()) return other.copy()\n if (other.isEmpty()) return geom.copy()\n }\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.SYMDIFFERENCE)\n }\n static resultDimension(opCode, g0, g1) {\n const dim0 = g0.getDimension()\n const dim1 = g1.getDimension()\n let resultDimension = -1\n switch (opCode) {\n case OverlayOp.INTERSECTION:\n resultDimension = Math.min(dim0, dim1)\n break\n case OverlayOp.UNION:\n resultDimension = Math.max(dim0, dim1)\n break\n case OverlayOp.DIFFERENCE:\n resultDimension = dim0\n break\n case OverlayOp.SYMDIFFERENCE:\n resultDimension = Math.max(dim0, dim1)\n break\n }\n return resultDimension\n }\n static createEmptyResult(overlayOpCode, a, b, geomFact) {\n let result = null\n const resultDim = OverlayOp.resultDimension(overlayOpCode, a, b)\n return result = geomFact.createEmpty(resultDim)\n }\n static difference(geom, other) {\n if (geom.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.DIFFERENCE, geom, other, geom.getFactory())\n if (other.isEmpty()) return geom.copy()\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.DIFFERENCE)\n }\n static isResultOfOp() {\n if (arguments.length === 2) {\n const label = arguments[0], opCode = arguments[1]\n const loc0 = label.getLocation(0)\n const loc1 = label.getLocation(1)\n return OverlayOp.isResultOfOp(loc0, loc1, opCode)\n } else if (arguments.length === 3) {\n let loc0 = arguments[0], loc1 = arguments[1], overlayOpCode = arguments[2]\n if (loc0 === Location.BOUNDARY) loc0 = Location.INTERIOR\n if (loc1 === Location.BOUNDARY) loc1 = Location.INTERIOR\n switch (overlayOpCode) {\n case OverlayOp.INTERSECTION:\n return loc0 === Location.INTERIOR && loc1 === Location.INTERIOR\n case OverlayOp.UNION:\n return loc0 === Location.INTERIOR || loc1 === Location.INTERIOR\n case OverlayOp.DIFFERENCE:\n return loc0 === Location.INTERIOR && loc1 !== Location.INTERIOR\n case OverlayOp.SYMDIFFERENCE:\n return loc0 === Location.INTERIOR && loc1 !== Location.INTERIOR || loc0 !== Location.INTERIOR && loc1 === Location.INTERIOR\n }\n return false\n }\n }\n insertUniqueEdge(e) {\n const existingEdge = this._edgeList.findEqualEdge(e)\n if (existingEdge !== null) {\n const existingLabel = existingEdge.getLabel()\n let labelToMerge = e.getLabel()\n if (!existingEdge.isPointwiseEqual(e)) {\n labelToMerge = new Label(e.getLabel())\n labelToMerge.flip()\n }\n const depth = existingEdge.getDepth()\n if (depth.isNull()) \n depth.add(existingLabel)\n \n depth.add(labelToMerge)\n existingLabel.merge(labelToMerge)\n } else {\n this._edgeList.add(e)\n }\n }\n getGraph() {\n return this._graph\n }\n cancelDuplicateResultEdges() {\n for (let it = this._graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const sym = de.getSym()\n if (de.isInResult() && sym.isInResult()) {\n de.setInResult(false)\n sym.setInResult(false)\n }\n }\n }\n isCoveredByLA(coord) {\n if (this.isCovered(coord, this._resultLineList)) return true\n if (this.isCovered(coord, this._resultPolyList)) return true\n return false\n }\n computeGeometry(resultPointList, resultLineList, resultPolyList, opcode) {\n const geomList = new ArrayList()\n geomList.addAll(resultPointList)\n geomList.addAll(resultLineList)\n geomList.addAll(resultPolyList)\n if (geomList.isEmpty()) return OverlayOp.createEmptyResult(opcode, this._arg[0].getGeometry(), this._arg[1].getGeometry(), this._geomFact)\n return this._geomFact.buildGeometry(geomList)\n }\n mergeSymLabels() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().mergeSymLabels()\n }\n }\n isCovered(coord, geomList) {\n for (let it = geomList.iterator(); it.hasNext(); ) {\n const geom = it.next()\n const loc = this._ptLocator.locate(coord, geom)\n if (loc !== Location.EXTERIOR) return true\n }\n return false\n }\n replaceCollapsedEdges() {\n const newEdges = new ArrayList()\n for (let it = this._edgeList.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.isCollapsed()) {\n it.remove()\n newEdges.add(e.getCollapsedEdge())\n }\n }\n this._edgeList.addAll(newEdges)\n }\n updateNodeLabelling() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n const lbl = node.getEdges().getLabel()\n node.getLabel().merge(lbl)\n }\n }\n getResultGeometry(overlayOpCode) {\n this.computeOverlay(overlayOpCode)\n return this._resultGeom\n }\n insertUniqueEdges(edges) {\n for (let i = edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n this.insertUniqueEdge(e)\n }\n }\n computeOverlay(opCode) {\n this.copyPoints(0)\n this.copyPoints(1)\n this._arg[0].computeSelfNodes(this._li, false)\n this._arg[1].computeSelfNodes(this._li, false)\n this._arg[0].computeEdgeIntersections(this._arg[1], this._li, true)\n const baseSplitEdges = new ArrayList()\n this._arg[0].computeSplitEdges(baseSplitEdges)\n this._arg[1].computeSplitEdges(baseSplitEdges)\n const splitEdges = baseSplitEdges\n this.insertUniqueEdges(baseSplitEdges)\n this.computeLabelsFromDepths()\n this.replaceCollapsedEdges()\n EdgeNodingValidator.checkValid(this._edgeList.getEdges())\n this._graph.addEdges(this._edgeList.getEdges())\n this.computeLabelling()\n this.labelIncompleteNodes()\n this.findResultAreaEdges(opCode)\n this.cancelDuplicateResultEdges()\n const polyBuilder = new PolygonBuilder(this._geomFact)\n polyBuilder.add(this._graph)\n this._resultPolyList = polyBuilder.getPolygons()\n const lineBuilder = new LineBuilder(this, this._geomFact, this._ptLocator)\n this._resultLineList = lineBuilder.build(opCode)\n const pointBuilder = new PointBuilder(this, this._geomFact, this._ptLocator)\n this._resultPointList = pointBuilder.build(opCode)\n this._resultGeom = this.computeGeometry(this._resultPointList, this._resultLineList, this._resultPolyList, opCode)\n }\n labelIncompleteNode(n, targetIndex) {\n const loc = this._ptLocator.locate(n.getCoordinate(), this._arg[targetIndex].getGeometry())\n n.getLabel().setLocation(targetIndex, loc)\n }\n copyPoints(argIndex) {\n for (let i = this._arg[argIndex].getNodeIterator(); i.hasNext(); ) {\n const graphNode = i.next()\n const newNode = this._graph.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n findResultAreaEdges(opCode) {\n for (let it = this._graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n if (label.isArea() && !de.isInteriorAreaEdge() && OverlayOp.isResultOfOp(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), opCode)) \n de.setInResult(true)\n \n }\n }\n computeLabelsFromDepths() {\n for (let it = this._edgeList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const lbl = e.getLabel()\n const depth = e.getDepth()\n if (!depth.isNull()) {\n depth.normalize()\n for (let i = 0; i < 2; i++) \n if (!lbl.isNull(i) && lbl.isArea() && !depth.isNull(i)) \n if (depth.getDelta(i) === 0) {\n lbl.toLine(i)\n } else {\n Assert.isTrue(!depth.isNull(i, Position.LEFT), 'depth of LEFT side has not been initialized')\n lbl.setLocation(i, Position.LEFT, depth.getLocation(i, Position.LEFT))\n Assert.isTrue(!depth.isNull(i, Position.RIGHT), 'depth of RIGHT side has not been initialized')\n lbl.setLocation(i, Position.RIGHT, depth.getLocation(i, Position.RIGHT))\n }\n \n \n }\n }\n }\n computeLabelling() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().computeLabelling(this._arg)\n }\n this.mergeSymLabels()\n this.updateNodeLabelling()\n }\n labelIncompleteNodes() {\n for (let ni = this._graph.getNodes().iterator(); ni.hasNext(); ) {\n const n = ni.next()\n const label = n.getLabel()\n if (n.isIsolated()) \n if (label.isNull(0)) this.labelIncompleteNode(n, 0); else this.labelIncompleteNode(n, 1)\n \n n.getEdges().updateLabelling(label)\n }\n }\n isCoveredByA(coord) {\n if (this.isCovered(coord, this._resultPolyList)) return true\n return false\n }\n}\nOverlayOp.INTERSECTION = 1\nOverlayOp.UNION = 2\nOverlayOp.DIFFERENCE = 3\nOverlayOp.SYMDIFFERENCE = 4\n","import EdgeEnd from '../../geomgraph/EdgeEnd.js'\nimport Label from '../../geomgraph/Label.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class EdgeEndBuilder {\n createEdgeEndForNext(edge, l, eiCurr, eiNext) {\n const iNext = eiCurr.segmentIndex + 1\n if (iNext >= edge.getNumPoints() && eiNext === null) return null\n let pNext = edge.getCoordinate(iNext)\n if (eiNext !== null && eiNext.segmentIndex === eiCurr.segmentIndex) pNext = eiNext.coord\n const e = new EdgeEnd(edge, eiCurr.coord, pNext, new Label(edge.getLabel()))\n l.add(e)\n }\n createEdgeEndForPrev(edge, l, eiCurr, eiPrev) {\n let iPrev = eiCurr.segmentIndex\n if (eiCurr.dist === 0.0) {\n if (iPrev === 0) return null\n iPrev--\n }\n let pPrev = edge.getCoordinate(iPrev)\n if (eiPrev !== null && eiPrev.segmentIndex >= iPrev) pPrev = eiPrev.coord\n const label = new Label(edge.getLabel())\n label.flip()\n const e = new EdgeEnd(edge, eiCurr.coord, pPrev, label)\n l.add(e)\n }\n computeEdgeEnds() {\n if (arguments.length === 1) {\n const edges = arguments[0]\n const l = new ArrayList()\n for (let i = edges; i.hasNext(); ) {\n const e = i.next()\n this.computeEdgeEnds(e, l)\n }\n return l\n } else if (arguments.length === 2) {\n const edge = arguments[0], l = arguments[1]\n const eiList = edge.getEdgeIntersectionList()\n eiList.addEndpoints()\n const it = eiList.iterator()\n let eiPrev = null\n let eiCurr = null\n if (!it.hasNext()) return null\n let eiNext = it.next()\n do {\n eiPrev = eiCurr\n eiCurr = eiNext\n eiNext = null\n if (it.hasNext()) eiNext = it.next()\n if (eiCurr !== null) {\n this.createEdgeEndForPrev(edge, l, eiCurr, eiPrev)\n this.createEdgeEndForNext(edge, l, eiCurr, eiNext)\n }\n } while (eiCurr !== null)\n }\n }\n}\n","import Location from '../../geom/Location.js'\nimport EdgeEnd from '../../geomgraph/EdgeEnd.js'\nimport Position from '../../geomgraph/Position.js'\nimport GeometryGraph from '../../geomgraph/GeometryGraph.js'\nimport Label from '../../geomgraph/Label.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Edge from '../../geomgraph/Edge.js'\nexport default class EdgeEndBundle extends EdgeEnd {\n constructor() {\n super()\n EdgeEndBundle.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edgeEnds = new ArrayList()\n if (arguments.length === 1) {\n const e = arguments[0]\n EdgeEndBundle.constructor_.call(this, null, e)\n } else if (arguments.length === 2) {\n const boundaryNodeRule = arguments[0], e = arguments[1]\n EdgeEnd.constructor_.call(this, e.getEdge(), e.getCoordinate(), e.getDirectedCoordinate(), new Label(e.getLabel()))\n this.insert(e)\n }\n }\n insert(e) {\n this._edgeEnds.add(e)\n }\n print(out) {\n out.println('EdgeEndBundle--> Label: ' + this._label)\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n ee.print(out)\n out.println()\n }\n }\n iterator() {\n return this._edgeEnds.iterator()\n }\n getEdgeEnds() {\n return this._edgeEnds\n }\n computeLabelOn(geomIndex, boundaryNodeRule) {\n let boundaryCount = 0\n let foundInterior = false\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const loc = e.getLabel().getLocation(geomIndex)\n if (loc === Location.BOUNDARY) boundaryCount++\n if (loc === Location.INTERIOR) foundInterior = true\n }\n let loc = Location.NONE\n if (foundInterior) loc = Location.INTERIOR\n if (boundaryCount > 0) \n loc = GeometryGraph.determineBoundary(boundaryNodeRule, boundaryCount)\n \n this._label.setLocation(geomIndex, loc)\n }\n computeLabelSide(geomIndex, side) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.getLabel().isArea()) {\n const loc = e.getLabel().getLocation(geomIndex, side)\n if (loc === Location.INTERIOR) {\n this._label.setLocation(geomIndex, side, Location.INTERIOR)\n return null\n } else if (loc === Location.EXTERIOR) {\n this._label.setLocation(geomIndex, side, Location.EXTERIOR)\n }\n }\n }\n }\n getLabel() {\n return this._label\n }\n computeLabelSides(geomIndex) {\n this.computeLabelSide(geomIndex, Position.LEFT)\n this.computeLabelSide(geomIndex, Position.RIGHT)\n }\n updateIM(im) {\n Edge.updateIM(this._label, im)\n }\n computeLabel(boundaryNodeRule) {\n let isArea = false\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.getLabel().isArea()) isArea = true\n }\n if (isArea) this._label = new Label(Location.NONE, Location.NONE, Location.NONE); else this._label = new Label(Location.NONE)\n for (let i = 0; i < 2; i++) {\n this.computeLabelOn(i, boundaryNodeRule)\n if (isArea) this.computeLabelSides(i)\n }\n }\n}\n","import EdgeEndStar from '../../geomgraph/EdgeEndStar.js'\nimport EdgeEndBundle from './EdgeEndBundle.js'\nexport default class EdgeEndBundleStar extends EdgeEndStar {\n constructor() {\n super()\n }\n updateIM(im) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const esb = it.next()\n esb.updateIM(im)\n }\n }\n insert(e) {\n let eb = this._edgeMap.get(e)\n if (eb === null) {\n eb = new EdgeEndBundle(e)\n this.insertEdgeEnd(e, eb)\n } else {\n eb.insert(e)\n }\n }\n}\n","import Node from '../../geomgraph/Node.js'\nexport default class RelateNode extends Node {\n constructor() {\n super()\n RelateNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const coord = arguments[0], edges = arguments[1]\n Node.constructor_.call(this, coord, edges)\n }\n updateIMFromEdges(im) {\n this._edges.updateIM(im)\n }\n computeIM(im) {\n im.setAtLeastIfValid(this._label.getLocation(0), this._label.getLocation(1), 0)\n }\n}\n","import EdgeEndBundleStar from './EdgeEndBundleStar.js'\nimport RelateNode from './RelateNode.js'\nimport NodeFactory from '../../geomgraph/NodeFactory.js'\nexport default class RelateNodeFactory extends NodeFactory {\n constructor() {\n super()\n }\n createNode(coord) {\n return new RelateNode(coord, new EdgeEndBundleStar())\n }\n}\n","import PointLocator from '../../algorithm/PointLocator.js'\nimport Location from '../../geom/Location.js'\nimport IntersectionMatrix from '../../geom/IntersectionMatrix.js'\nimport EdgeEndBuilder from './EdgeEndBuilder.js'\nimport NodeMap from '../../geomgraph/NodeMap.js'\nimport RelateNodeFactory from './RelateNodeFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport Assert from '../../util/Assert.js'\nexport default class RelateComputer {\n constructor() {\n RelateComputer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._ptLocator = new PointLocator()\n this._arg = null\n this._nodes = new NodeMap(new RelateNodeFactory())\n this._im = null\n this._isolatedEdges = new ArrayList()\n this._invalidPoint = null\n const arg = arguments[0]\n this._arg = arg\n }\n insertEdgeEnds(ee) {\n for (let i = ee.iterator(); i.hasNext(); ) {\n const e = i.next()\n this._nodes.add(e)\n }\n }\n computeProperIntersectionIM(intersector, im) {\n const dimA = this._arg[0].getGeometry().getDimension()\n const dimB = this._arg[1].getGeometry().getDimension()\n const hasProper = intersector.hasProperIntersection()\n const hasProperInterior = intersector.hasProperInteriorIntersection()\n if (dimA === 2 && dimB === 2) {\n if (hasProper) im.setAtLeast('212101212')\n } else if (dimA === 2 && dimB === 1) {\n if (hasProper) im.setAtLeast('FFF0FFFF2')\n if (hasProperInterior) im.setAtLeast('1FFFFF1FF')\n } else if (dimA === 1 && dimB === 2) {\n if (hasProper) im.setAtLeast('F0FFFFFF2')\n if (hasProperInterior) im.setAtLeast('1F1FFFFFF')\n } else if (dimA === 1 && dimB === 1) {\n if (hasProperInterior) im.setAtLeast('0FFFFFFFF')\n }\n }\n labelIsolatedEdges(thisIndex, targetIndex) {\n for (let ei = this._arg[thisIndex].getEdgeIterator(); ei.hasNext(); ) {\n const e = ei.next()\n if (e.isIsolated()) {\n this.labelIsolatedEdge(e, targetIndex, this._arg[targetIndex].getGeometry())\n this._isolatedEdges.add(e)\n }\n }\n }\n labelIsolatedEdge(e, targetIndex, target) {\n if (target.getDimension() > 0) {\n const loc = this._ptLocator.locate(e.getCoordinate(), target)\n e.getLabel().setAllLocations(targetIndex, loc)\n } else {\n e.getLabel().setAllLocations(targetIndex, Location.EXTERIOR)\n }\n }\n computeIM() {\n const im = new IntersectionMatrix()\n im.set(Location.EXTERIOR, Location.EXTERIOR, 2)\n if (!this._arg[0].getGeometry().getEnvelopeInternal().intersects(this._arg[1].getGeometry().getEnvelopeInternal())) {\n this.computeDisjointIM(im)\n return im\n }\n this._arg[0].computeSelfNodes(this._li, false)\n this._arg[1].computeSelfNodes(this._li, false)\n const intersector = this._arg[0].computeEdgeIntersections(this._arg[1], this._li, false)\n this.computeIntersectionNodes(0)\n this.computeIntersectionNodes(1)\n this.copyNodesAndLabels(0)\n this.copyNodesAndLabels(1)\n this.labelIsolatedNodes()\n this.computeProperIntersectionIM(intersector, im)\n const eeBuilder = new EdgeEndBuilder()\n const ee0 = eeBuilder.computeEdgeEnds(this._arg[0].getEdgeIterator())\n this.insertEdgeEnds(ee0)\n const ee1 = eeBuilder.computeEdgeEnds(this._arg[1].getEdgeIterator())\n this.insertEdgeEnds(ee1)\n this.labelNodeEdges()\n this.labelIsolatedEdges(0, 1)\n this.labelIsolatedEdges(1, 0)\n this.updateIM(im)\n return im\n }\n labelNodeEdges() {\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const node = ni.next()\n node.getEdges().computeLabelling(this._arg)\n }\n }\n copyNodesAndLabels(argIndex) {\n for (let i = this._arg[argIndex].getNodeIterator(); i.hasNext(); ) {\n const graphNode = i.next()\n const newNode = this._nodes.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n labelIntersectionNodes(argIndex) {\n for (let i = this._arg[argIndex].getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.find(ei.coord)\n if (n.getLabel().isNull(argIndex)) \n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n labelIsolatedNode(n, targetIndex) {\n const loc = this._ptLocator.locate(n.getCoordinate(), this._arg[targetIndex].getGeometry())\n n.getLabel().setAllLocations(targetIndex, loc)\n }\n computeIntersectionNodes(argIndex) {\n for (let i = this._arg[argIndex].getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.addNode(ei.coord)\n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else \n if (n.getLabel().isNull(argIndex)) n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n labelIsolatedNodes() {\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const n = ni.next()\n const label = n.getLabel()\n Assert.isTrue(label.getGeometryCount() > 0, 'node with empty label found')\n if (n.isIsolated()) \n if (label.isNull(0)) this.labelIsolatedNode(n, 0); else this.labelIsolatedNode(n, 1)\n \n }\n }\n updateIM(im) {\n for (let ei = this._isolatedEdges.iterator(); ei.hasNext(); ) {\n const e = ei.next()\n e.updateIM(im)\n }\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const node = ni.next()\n node.updateIM(im)\n node.updateIMFromEdges(im)\n }\n }\n computeDisjointIM(im) {\n const ga = this._arg[0].getGeometry()\n if (!ga.isEmpty()) {\n im.set(Location.INTERIOR, Location.EXTERIOR, ga.getDimension())\n im.set(Location.BOUNDARY, Location.EXTERIOR, ga.getBoundaryDimension())\n }\n const gb = this._arg[1].getGeometry()\n if (!gb.isEmpty()) {\n im.set(Location.EXTERIOR, Location.INTERIOR, gb.getDimension())\n im.set(Location.EXTERIOR, Location.BOUNDARY, gb.getBoundaryDimension())\n }\n }\n}\n","import LineString from '../../geom/LineString.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Point from '../../geom/Point.js'\nimport Polygon from '../../geom/Polygon.js'\nexport default class RectangleContains {\n constructor() {\n RectangleContains.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n const rectangle = arguments[0]\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n static contains(rectangle, b) {\n const rc = new RectangleContains(rectangle)\n return rc.contains(b)\n }\n isContainedInBoundary(geom) {\n if (geom instanceof Polygon) return false\n if (geom instanceof Point) return this.isPointContainedInBoundary(geom)\n if (geom instanceof LineString) return this.isLineStringContainedInBoundary(geom)\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const comp = geom.getGeometryN(i)\n if (!this.isContainedInBoundary(comp)) return false\n }\n return true\n }\n isLineSegmentContainedInBoundary(p0, p1) {\n if (p0.equals(p1)) return this.isPointContainedInBoundary(p0)\n if (p0.x === p1.x) {\n if (p0.x === this._rectEnv.getMinX() || p0.x === this._rectEnv.getMaxX()) return true\n } else if (p0.y === p1.y) {\n if (p0.y === this._rectEnv.getMinY() || p0.y === this._rectEnv.getMaxY()) return true\n }\n return false\n }\n isLineStringContainedInBoundary(line) {\n const seq = line.getCoordinateSequence()\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n for (let i = 0; i < seq.size() - 1; i++) {\n seq.getCoordinate(i, p0)\n seq.getCoordinate(i + 1, p1)\n if (!this.isLineSegmentContainedInBoundary(p0, p1)) return false\n }\n return true\n }\n isPointContainedInBoundary() {\n if (arguments[0] instanceof Point) {\n const point = arguments[0]\n return this.isPointContainedInBoundary(point.getCoordinate())\n } else if (arguments[0] instanceof Coordinate) {\n const pt = arguments[0]\n return pt.x === this._rectEnv.getMinX() || pt.x === this._rectEnv.getMaxX() || pt.y === this._rectEnv.getMinY() || pt.y === this._rectEnv.getMaxY()\n }\n }\n contains(geom) {\n if (!this._rectEnv.contains(geom.getEnvelopeInternal())) return false\n if (this.isContainedInBoundary(geom)) return false\n return true\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport RobustLineIntersector from './RobustLineIntersector.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class RectangleLineIntersector {\n constructor() {\n RectangleLineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._rectEnv = null\n this._diagUp0 = null\n this._diagUp1 = null\n this._diagDown0 = null\n this._diagDown1 = null\n const rectEnv = arguments[0]\n this._rectEnv = rectEnv\n this._diagUp0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMinY())\n this._diagUp1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMaxY())\n this._diagDown0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMaxY())\n this._diagDown1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMinY())\n }\n intersects(p0, p1) {\n const segEnv = new Envelope(p0, p1)\n if (!this._rectEnv.intersects(segEnv)) return false\n if (this._rectEnv.intersects(p0)) return true\n if (this._rectEnv.intersects(p1)) return true\n if (p0.compareTo(p1) > 0) {\n const tmp = p0\n p0 = p1\n p1 = tmp\n }\n let isSegUpwards = false\n if (p1.y > p0.y) isSegUpwards = true\n if (isSegUpwards) \n this._li.computeIntersection(p0, p1, this._diagDown0, this._diagDown1)\n else \n this._li.computeIntersection(p0, p1, this._diagUp0, this._diagUp1)\n \n if (this._li.hasIntersection()) return true\n return false\n }\n}\n","import GeometryCollection from '../GeometryCollection.js'\nexport default class ShortCircuitedGeometryVisitor {\n constructor() {\n ShortCircuitedGeometryVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isDone = false\n }\n applyTo(geom) {\n for (let i = 0; i < geom.getNumGeometries() && !this._isDone; i++) {\n const element = geom.getGeometryN(i)\n if (!(element instanceof GeometryCollection)) {\n this.visit(element)\n if (this.isDone()) {\n this._isDone = true\n return null\n }\n } else {\n this.applyTo(element)\n }\n }\n }\n}\n","import Coordinate from '../../geom/Coordinate.js'\nimport Polygon from '../../geom/Polygon.js'\nimport RectangleLineIntersector from '../../algorithm/RectangleLineIntersector.js'\nimport ShortCircuitedGeometryVisitor from '../../geom/util/ShortCircuitedGeometryVisitor.js'\nimport SimplePointInAreaLocator from '../../algorithm/locate/SimplePointInAreaLocator.js'\nimport LinearComponentExtracter from '../../geom/util/LinearComponentExtracter.js'\nexport default class RectangleIntersects {\n constructor() {\n RectangleIntersects.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectangle = null\n this._rectEnv = null\n const rectangle = arguments[0]\n this._rectangle = rectangle\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n static intersects(rectangle, b) {\n const rp = new RectangleIntersects(rectangle)\n return rp.intersects(b)\n }\n intersects(geom) {\n if (!this._rectEnv.intersects(geom.getEnvelopeInternal())) return false\n const visitor = new EnvelopeIntersectsVisitor(this._rectEnv)\n visitor.applyTo(geom)\n if (visitor.intersects()) return true\n const ecpVisitor = new GeometryContainsPointVisitor(this._rectangle)\n ecpVisitor.applyTo(geom)\n if (ecpVisitor.containsPoint()) return true\n const riVisitor = new RectangleIntersectsSegmentVisitor(this._rectangle)\n riVisitor.applyTo(geom)\n if (riVisitor.intersects()) return true\n return false\n }\n}\nclass EnvelopeIntersectsVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n EnvelopeIntersectsVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n this._intersects = false\n const rectEnv = arguments[0]\n this._rectEnv = rectEnv\n }\n isDone() {\n return this._intersects === true\n }\n visit(element) {\n const elementEnv = element.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) \n return null\n \n if (this._rectEnv.contains(elementEnv)) {\n this._intersects = true\n return null\n }\n if (elementEnv.getMinX() >= this._rectEnv.getMinX() && elementEnv.getMaxX() <= this._rectEnv.getMaxX()) {\n this._intersects = true\n return null\n }\n if (elementEnv.getMinY() >= this._rectEnv.getMinY() && elementEnv.getMaxY() <= this._rectEnv.getMaxY()) {\n this._intersects = true\n return null\n }\n }\n intersects() {\n return this._intersects\n }\n}\nclass GeometryContainsPointVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n GeometryContainsPointVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectSeq = null\n this._rectEnv = null\n this._containsPoint = false\n const rectangle = arguments[0]\n this._rectSeq = rectangle.getExteriorRing().getCoordinateSequence()\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n isDone() {\n return this._containsPoint === true\n }\n visit(geom) {\n if (!(geom instanceof Polygon)) return null\n const elementEnv = geom.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) return null\n const rectPt = new Coordinate()\n for (let i = 0; i < 4; i++) {\n this._rectSeq.getCoordinate(i, rectPt)\n if (!elementEnv.contains(rectPt)) continue\n if (SimplePointInAreaLocator.containsPointInPolygon(rectPt, geom)) {\n this._containsPoint = true\n return null\n }\n }\n }\n containsPoint() {\n return this._containsPoint\n }\n}\nclass RectangleIntersectsSegmentVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n RectangleIntersectsSegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n this._rectIntersector = null\n this._hasIntersection = false\n this._p0 = new Coordinate()\n this._p1 = new Coordinate()\n const rectangle = arguments[0]\n this._rectEnv = rectangle.getEnvelopeInternal()\n this._rectIntersector = new RectangleLineIntersector(this._rectEnv)\n }\n intersects() {\n return this._hasIntersection\n }\n isDone() {\n return this._hasIntersection === true\n }\n visit(geom) {\n const elementEnv = geom.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) return null\n const lines = LinearComponentExtracter.getLines(geom)\n this.checkIntersectionWithLineStrings(lines)\n }\n checkIntersectionWithLineStrings(lines) {\n for (let i = lines.iterator(); i.hasNext(); ) {\n const testLine = i.next()\n this.checkIntersectionWithSegments(testLine)\n if (this._hasIntersection) return null\n }\n }\n checkIntersectionWithSegments(testLine) {\n const seq1 = testLine.getCoordinateSequence()\n for (let j = 1; j < seq1.size(); j++) {\n seq1.getCoordinate(j - 1, this._p0)\n seq1.getCoordinate(j, this._p1)\n if (this._rectIntersector.intersects(this._p0, this._p1)) {\n this._hasIntersection = true\n return null\n }\n }\n }\n}\n","import RelateComputer from './RelateComputer.js'\nimport GeometryGraphOperation from '../GeometryGraphOperation.js'\nimport RectangleContains from '../predicate/RectangleContains.js'\nimport RectangleIntersects from '../predicate/RectangleIntersects.js'\nexport default class RelateOp extends GeometryGraphOperation {\n constructor() {\n super()\n RelateOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._relate = null\n if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1)\n this._relate = new RelateComputer(this._arg)\n } else if (arguments.length === 3) {\n const g0 = arguments[0], g1 = arguments[1], boundaryNodeRule = arguments[2]\n GeometryGraphOperation.constructor_.call(this, g0, g1, boundaryNodeRule)\n this._relate = new RelateComputer(this._arg)\n }\n }\n static covers(g1, g2) {\n if (g2.getDimension() === 2 && g1.getDimension() < 2) \n return false\n \n if (g2.getDimension() === 1 && g1.getDimension() < 1 && g2.getLength() > 0.0) \n return false\n \n if (!g1.getEnvelopeInternal().covers(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return true\n \n return new RelateOp(g1, g2).getIntersectionMatrix().isCovers()\n }\n static intersects(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return RectangleIntersects.intersects(g1, g2)\n \n if (g2.isRectangle()) \n return RectangleIntersects.intersects(g2, g1)\n \n if (g1.isGeometryCollection() || g2.isGeometryCollection()) {\n const r = false\n for (let i = 0; i < g1.getNumGeometries(); i++) \n for (let j = 0; j < g2.getNumGeometries(); j++) \n if (g1.getGeometryN(i).intersects(g2.getGeometryN(j))) \n return true\n \n \n \n return false\n }\n return new RelateOp(g1, g2).getIntersectionMatrix().isIntersects()\n }\n static touches(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isTouches(g1.getDimension(), g2.getDimension())\n }\n static equalsTopo(g1, g2) {\n if (!g1.getEnvelopeInternal().equals(g2.getEnvelopeInternal())) return false\n return RelateOp.relate(g1, g2).isEquals(g1.getDimension(), g2.getDimension())\n }\n static relate() {\n if (arguments.length === 2) {\n const a = arguments[0], b = arguments[1]\n const relOp = new RelateOp(a, b)\n const im = relOp.getIntersectionMatrix()\n return im\n } else if (arguments.length === 3) {\n const a = arguments[0], b = arguments[1], boundaryNodeRule = arguments[2]\n const relOp = new RelateOp(a, b, boundaryNodeRule)\n const im = relOp.getIntersectionMatrix()\n return im\n }\n }\n static overlaps(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isOverlaps(g1.getDimension(), g2.getDimension())\n }\n static crosses(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isCrosses(g1.getDimension(), g2.getDimension())\n }\n static contains(g1, g2) {\n if (g2.getDimension() === 2 && g1.getDimension() < 2) \n return false\n \n if (g2.getDimension() === 1 && g1.getDimension() < 1 && g2.getLength() > 0.0) \n return false\n \n if (!g1.getEnvelopeInternal().contains(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return RectangleContains.contains(g1, g2)\n \n return new RelateOp(g1, g2).getIntersectionMatrix().isContains()\n }\n getIntersectionMatrix() {\n return this._relate.computeIM()\n }\n}\n","import SnapIfNeededOverlayOp from '../overlay/snap/SnapIfNeededOverlayOp.js'\nimport OverlayOp from '../overlay/OverlayOp.js'\nexport default class UnionOp {\n get interfaces_() {\n return []\n }\n\n getClass() {\n return UnionOp\n }\n\n static union(g, other) {\n if (g.isEmpty() || other.isEmpty()) {\n if (g.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.UNION, g, other, g.getFactory())\n if (g.isEmpty()) return other.copy()\n if (other.isEmpty()) return g.copy()\n }\n g.checkNotGeometryCollection(g)\n g.checkNotGeometryCollection(other)\n return SnapIfNeededOverlayOp.overlayOp(g, other, OverlayOp.UNION)\n }\n}\n","import Location from '../../geom/Location.js'\nimport GeometryFactory from '../../geom/GeometryFactory.js'\nimport Position from '../../geomgraph/Position.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport MaximalEdgeRing from '../overlay/MaximalEdgeRing.js'\nimport OverlayNodeFactory from '../overlay/OverlayNodeFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class ConnectedInteriorTester {\n constructor() {\n ConnectedInteriorTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometryFactory = new GeometryFactory()\n this._geomGraph = null\n this._disconnectedRingcoord = null\n const geomGraph = arguments[0]\n this._geomGraph = geomGraph\n }\n static findDifferentPoint(coord, pt) {\n for (let i = 0; i < coord.length; i++) \n if (!coord[i].equals(pt)) return coord[i]\n \n return null\n }\n visitInteriorRing(ring, graph) {\n if (ring.isEmpty()) return null\n const pts = ring.getCoordinates()\n const pt0 = pts[0]\n const pt1 = ConnectedInteriorTester.findDifferentPoint(pts, pt0)\n const e = graph.findEdgeInSameDirection(pt0, pt1)\n const de = graph.findEdgeEnd(e)\n let intDe = null\n if (de.getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n intDe = de\n else if (de.getSym().getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n intDe = de.getSym()\n \n Assert.isTrue(intDe !== null, 'unable to find dirEdge with Interior on RHS')\n this.visitLinkedDirectedEdges(intDe)\n }\n visitShellInteriors(g, graph) {\n if (g instanceof Polygon) {\n const p = g\n this.visitInteriorRing(p.getExteriorRing(), graph)\n }\n if (g instanceof MultiPolygon) {\n const mp = g\n for (let i = 0; i < mp.getNumGeometries(); i++) {\n const p = mp.getGeometryN(i)\n this.visitInteriorRing(p.getExteriorRing(), graph)\n }\n }\n }\n getCoordinate() {\n return this._disconnectedRingcoord\n }\n setInteriorEdgesInResult(graph) {\n for (let it = graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n de.setInResult(true)\n \n }\n }\n visitLinkedDirectedEdges(start) {\n const startDe = start\n let de = start\n do {\n Assert.isTrue(de !== null, 'found null Directed Edge')\n de.setVisited(true)\n de = de.getNext()\n } while (de !== startDe)\n }\n buildEdgeRings(dirEdges) {\n const edgeRings = new ArrayList()\n for (let it = dirEdges.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() && de.getEdgeRing() === null) {\n const er = new MaximalEdgeRing(de, this._geometryFactory)\n er.linkDirectedEdgesForMinimalEdgeRings()\n const minEdgeRings = er.buildMinimalRings()\n edgeRings.addAll(minEdgeRings)\n }\n }\n return edgeRings\n }\n hasUnvisitedShellEdge(edgeRings) {\n for (let i = 0; i < edgeRings.size(); i++) {\n const er = edgeRings.get(i)\n if (er.isHole()) continue\n const edges = er.getEdges()\n let de = edges.get(0)\n if (de.getLabel().getLocation(0, Position.RIGHT) !== Location.INTERIOR) continue\n for (let j = 0; j < edges.size(); j++) {\n de = edges.get(j)\n if (!de.isVisited()) {\n this._disconnectedRingcoord = de.getCoordinate()\n return true\n }\n }\n }\n return false\n }\n isInteriorsConnected() {\n const splitEdges = new ArrayList()\n this._geomGraph.computeSplitEdges(splitEdges)\n const graph = new PlanarGraph(new OverlayNodeFactory())\n graph.addEdges(splitEdges)\n this.setInteriorEdgesInResult(graph)\n graph.linkResultDirectedEdges()\n const edgeRings = this.buildEdgeRings(graph.getEdgeEnds())\n this.visitShellInteriors(this._geomGraph.getGeometry(), graph)\n return !this.hasUnvisitedShellEdge(edgeRings)\n }\n}\n","import Location from '../../geom/Location.js'\nimport EdgeEndBuilder from './EdgeEndBuilder.js'\nimport NodeMap from '../../geomgraph/NodeMap.js'\nimport RelateNodeFactory from './RelateNodeFactory.js'\nexport default class RelateNodeGraph {\n constructor() {\n RelateNodeGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodes = new NodeMap(new RelateNodeFactory())\n }\n insertEdgeEnds(ee) {\n for (let i = ee.iterator(); i.hasNext(); ) {\n const e = i.next()\n this._nodes.add(e)\n }\n }\n getNodeIterator() {\n return this._nodes.iterator()\n }\n copyNodesAndLabels(geomGraph, argIndex) {\n for (let nodeIt = geomGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const graphNode = nodeIt.next()\n const newNode = this._nodes.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n build(geomGraph) {\n this.computeIntersectionNodes(geomGraph, 0)\n this.copyNodesAndLabels(geomGraph, 0)\n const eeBuilder = new EdgeEndBuilder()\n const eeList = eeBuilder.computeEdgeEnds(geomGraph.getEdgeIterator())\n this.insertEdgeEnds(eeList)\n }\n computeIntersectionNodes(geomGraph, argIndex) {\n for (let edgeIt = geomGraph.getEdgeIterator(); edgeIt.hasNext(); ) {\n const e = edgeIt.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.addNode(ei.coord)\n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else \n if (n.getLabel().isNull(argIndex)) n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n}\n","import RelateNodeGraph from '../relate/RelateNodeGraph.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nexport default class ConsistentAreaTester {\n constructor() {\n ConsistentAreaTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._geomGraph = null\n this._nodeGraph = new RelateNodeGraph()\n this._invalidPoint = null\n const geomGraph = arguments[0]\n this._geomGraph = geomGraph\n }\n isNodeEdgeAreaLabelsConsistent() {\n for (let nodeIt = this._nodeGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const node = nodeIt.next()\n if (!node.getEdges().isAreaLabelsConsistent(this._geomGraph)) {\n this._invalidPoint = node.getCoordinate().copy()\n return false\n }\n }\n return true\n }\n getInvalidPoint() {\n return this._invalidPoint\n }\n hasDuplicateRings() {\n for (let nodeIt = this._nodeGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const node = nodeIt.next()\n for (let i = node.getEdges().iterator(); i.hasNext(); ) {\n const eeb = i.next()\n if (eeb.getEdgeEnds().size() > 1) {\n this._invalidPoint = eeb.getEdge().getCoordinate(0)\n return true\n }\n }\n }\n return false\n }\n isNodeConsistentArea() {\n const intersector = this._geomGraph.computeSelfNodes(this._li, true, true)\n if (intersector.hasProperIntersection()) {\n this._invalidPoint = intersector.getProperIntersectionPoint()\n return false\n }\n this._nodeGraph.build(this._geomGraph)\n return this.isNodeEdgeAreaLabelsConsistent()\n }\n}\n","import STRtree from '../../index/strtree/STRtree.js'\nimport IsValidOp from './IsValidOp.js'\nimport PointLocation from '../../algorithm/PointLocation.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class IndexedNestedRingTester {\n constructor() {\n IndexedNestedRingTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._graph = null\n this._rings = new ArrayList()\n this._totalEnv = new Envelope()\n this._index = null\n this._nestedPt = null\n const graph = arguments[0]\n this._graph = graph\n }\n buildIndex() {\n this._index = new STRtree()\n for (let i = 0; i < this._rings.size(); i++) {\n const ring = this._rings.get(i)\n const env = ring.getEnvelopeInternal()\n this._index.insert(env, ring)\n }\n }\n getNestedPoint() {\n return this._nestedPt\n }\n isNonNested() {\n this.buildIndex()\n for (let i = 0; i < this._rings.size(); i++) {\n const innerRing = this._rings.get(i)\n const innerRingPts = innerRing.getCoordinates()\n const results = this._index.query(innerRing.getEnvelopeInternal())\n for (let j = 0; j < results.size(); j++) {\n const searchRing = results.get(j)\n const searchRingPts = searchRing.getCoordinates()\n if (innerRing === searchRing) continue\n if (!innerRing.getEnvelopeInternal().intersects(searchRing.getEnvelopeInternal())) continue\n const innerRingPt = IsValidOp.findPtNotNode(innerRingPts, searchRing, this._graph)\n if (innerRingPt === null) continue\n const isInside = PointLocation.isInRing(innerRingPt, searchRingPts)\n if (isInside) {\n this._nestedPt = innerRingPt\n return false\n }\n }\n }\n return true\n }\n add(ring) {\n this._rings.add(ring)\n this._totalEnv.expandToInclude(ring.getEnvelopeInternal())\n }\n}\n","export default class TopologyValidationError {\n constructor() {\n TopologyValidationError.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._errorType = null\n this._pt = null\n if (arguments.length === 1) {\n const errorType = arguments[0]\n TopologyValidationError.constructor_.call(this, errorType, null)\n } else if (arguments.length === 2) {\n const errorType = arguments[0], pt = arguments[1]\n this._errorType = errorType\n if (pt !== null) this._pt = pt.copy()\n }\n }\n getErrorType() {\n return this._errorType\n }\n getMessage() {\n return TopologyValidationError.errMsg[this._errorType]\n }\n getCoordinate() {\n return this._pt\n }\n toString() {\n let locStr = ''\n if (this._pt !== null) locStr = ' at or near point ' + this._pt\n return this.getMessage() + locStr\n }\n}\nTopologyValidationError.ERROR = 0\nTopologyValidationError.REPEATED_POINT = 1\nTopologyValidationError.HOLE_OUTSIDE_SHELL = 2\nTopologyValidationError.NESTED_HOLES = 3\nTopologyValidationError.DISCONNECTED_INTERIOR = 4\nTopologyValidationError.SELF_INTERSECTION = 5\nTopologyValidationError.RING_SELF_INTERSECTION = 6\nTopologyValidationError.NESTED_SHELLS = 7\nTopologyValidationError.DUPLICATE_RINGS = 8\nTopologyValidationError.TOO_FEW_POINTS = 9\nTopologyValidationError.INVALID_COORDINATE = 10\nTopologyValidationError.RING_NOT_CLOSED = 11\nTopologyValidationError.errMsg = ['Topology Validation Error', 'Repeated Point', 'Hole lies outside shell', 'Holes are nested', 'Interior is disconnected', 'Self-intersection', 'Ring Self-intersection', 'Nested shells', 'Duplicate Rings', 'Too few distinct points in geometry component', 'Invalid Coordinate', 'Ring is not closed']\n","import Location from '../../geom/Location.js'\nimport TreeSet from '../../../../../java/util/TreeSet.js'\nimport LineString from '../../geom/LineString.js'\nimport Geometry from '../../geom/Geometry.js'\nimport ConnectedInteriorTester from './ConnectedInteriorTester.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Point from '../../geom/Point.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPoint from '../../geom/MultiPoint.js'\nimport PointLocation from '../../algorithm/PointLocation.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport GeometryGraph from '../../geomgraph/GeometryGraph.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport ConsistentAreaTester from './ConsistentAreaTester.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../../java/lang/UnsupportedOperationException.js'\nimport IndexedNestedRingTester from './IndexedNestedRingTester.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport TopologyValidationError from './TopologyValidationError.js'\nimport IndexedPointInAreaLocator from '../../algorithm/locate/IndexedPointInAreaLocator.js'\nimport Assert from '../../util/Assert.js'\nexport default class IsValidOp {\n constructor() {\n IsValidOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentGeometry = null\n this._isSelfTouchingRingFormingHoleValid = false\n this._validErr = null\n const parentGeometry = arguments[0]\n this._parentGeometry = parentGeometry\n }\n static findPtNotNode(testCoords, searchRing, graph) {\n const searchEdge = graph.findEdge(searchRing)\n const eiList = searchEdge.getEdgeIntersectionList()\n for (let i = 0; i < testCoords.length; i++) {\n const pt = testCoords[i]\n if (!eiList.isIntersection(pt)) return pt\n }\n return null\n }\n static isValid() {\n if (arguments[0] instanceof Geometry) {\n const geom = arguments[0]\n const isValidOp = new IsValidOp(geom)\n return isValidOp.isValid()\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n if (Double.isNaN(coord.x)) return false\n if (Double.isInfinite(coord.x)) return false\n if (Double.isNaN(coord.y)) return false\n if (Double.isInfinite(coord.y)) return false\n return true\n }\n }\n checkInvalidCoordinates() {\n if (arguments[0] instanceof Array) {\n const coords = arguments[0]\n for (let i = 0; i < coords.length; i++) \n if (!IsValidOp.isValid(coords[i])) {\n this._validErr = new TopologyValidationError(TopologyValidationError.INVALID_COORDINATE, coords[i])\n return null\n }\n \n } else if (arguments[0] instanceof Polygon) {\n const poly = arguments[0]\n this.checkInvalidCoordinates(poly.getExteriorRing().getCoordinates())\n if (this._validErr !== null) return null\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n this.checkInvalidCoordinates(poly.getInteriorRingN(i).getCoordinates())\n if (this._validErr !== null) return null\n }\n }\n }\n checkHolesNotNested(p, graph) {\n if (p.getNumInteriorRing() <= 0) return null\n const nestedTester = new IndexedNestedRingTester(graph)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const innerHole = p.getInteriorRingN(i)\n if (innerHole.isEmpty()) continue\n nestedTester.add(innerHole)\n }\n const isNonNested = nestedTester.isNonNested()\n if (!isNonNested) \n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_HOLES, nestedTester.getNestedPoint())\n \n }\n checkConsistentArea(graph) {\n const cat = new ConsistentAreaTester(graph)\n const isValidArea = cat.isNodeConsistentArea()\n if (!isValidArea) {\n this._validErr = new TopologyValidationError(TopologyValidationError.SELF_INTERSECTION, cat.getInvalidPoint())\n return null\n }\n if (cat.hasDuplicateRings()) \n this._validErr = new TopologyValidationError(TopologyValidationError.DUPLICATE_RINGS, cat.getInvalidPoint())\n \n }\n isValid() {\n this.checkValid(this._parentGeometry)\n return this._validErr === null\n }\n checkShellInsideHole(shell, hole, graph) {\n const shellPts = shell.getCoordinates()\n const holePts = hole.getCoordinates()\n const shellPt = IsValidOp.findPtNotNode(shellPts, hole, graph)\n if (shellPt !== null) {\n const insideHole = PointLocation.isInRing(shellPt, holePts)\n if (!insideHole) \n return shellPt\n \n }\n const holePt = IsValidOp.findPtNotNode(holePts, shell, graph)\n if (holePt !== null) {\n const insideShell = PointLocation.isInRing(holePt, shellPts)\n if (insideShell) \n return holePt\n \n return null\n }\n Assert.shouldNeverReachHere('points in shell and hole appear to be equal')\n return null\n }\n checkNoSelfIntersectingRings(graph) {\n for (let i = graph.getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n this.checkNoSelfIntersectingRing(e.getEdgeIntersectionList())\n if (this._validErr !== null) return null\n }\n }\n checkConnectedInteriors(graph) {\n const cit = new ConnectedInteriorTester(graph)\n if (!cit.isInteriorsConnected()) this._validErr = new TopologyValidationError(TopologyValidationError.DISCONNECTED_INTERIOR, cit.getCoordinate())\n }\n checkNoSelfIntersectingRing(eiList) {\n const nodeSet = new TreeSet()\n let isFirst = true\n for (let i = eiList.iterator(); i.hasNext(); ) {\n const ei = i.next()\n if (isFirst) {\n isFirst = false\n continue\n }\n if (nodeSet.contains(ei.coord)) {\n this._validErr = new TopologyValidationError(TopologyValidationError.RING_SELF_INTERSECTION, ei.coord)\n return null\n } else {\n nodeSet.add(ei.coord)\n }\n }\n }\n checkHolesInShell(p, graph) {\n if (p.getNumInteriorRing() <= 0) return null\n const shell = p.getExteriorRing()\n const isShellEmpty = shell.isEmpty()\n const pir = new IndexedPointInAreaLocator(shell)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n let holePt = null\n if (hole.isEmpty()) continue\n holePt = IsValidOp.findPtNotNode(hole.getCoordinates(), shell, graph)\n if (holePt === null) return null\n const outside = isShellEmpty || Location.EXTERIOR === pir.locate(holePt)\n if (outside) {\n this._validErr = new TopologyValidationError(TopologyValidationError.HOLE_OUTSIDE_SHELL, holePt)\n return null\n }\n }\n }\n checkTooFewPoints(graph) {\n if (graph.hasTooFewPoints()) {\n this._validErr = new TopologyValidationError(TopologyValidationError.TOO_FEW_POINTS, graph.getInvalidPoint())\n return null\n }\n }\n getValidationError() {\n this.checkValid(this._parentGeometry)\n return this._validErr\n }\n checkValid() {\n if (arguments[0] instanceof Point) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n } else if (arguments[0] instanceof MultiPoint) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n } else if (arguments[0] instanceof LinearRing) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n if (this._validErr !== null) return null\n this.checkClosedRing(g)\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n const li = new RobustLineIntersector()\n graph.computeSelfNodes(li, true, true)\n this.checkNoSelfIntersectingRings(graph)\n } else if (arguments[0] instanceof LineString) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n } else if (arguments[0] instanceof Polygon) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g)\n if (this._validErr !== null) return null\n this.checkClosedRings(g)\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n this.checkConsistentArea(graph)\n if (this._validErr !== null) return null\n if (!this._isSelfTouchingRingFormingHoleValid) {\n this.checkNoSelfIntersectingRings(graph)\n if (this._validErr !== null) return null\n }\n this.checkHolesInShell(g, graph)\n if (this._validErr !== null) return null\n this.checkHolesNotNested(g, graph)\n if (this._validErr !== null) return null\n this.checkConnectedInteriors(graph)\n } else if (arguments[0] instanceof MultiPolygon) {\n const g = arguments[0]\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkInvalidCoordinates(p)\n if (this._validErr !== null) return null\n this.checkClosedRings(p)\n if (this._validErr !== null) return null\n }\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n this.checkConsistentArea(graph)\n if (this._validErr !== null) return null\n if (!this._isSelfTouchingRingFormingHoleValid) {\n this.checkNoSelfIntersectingRings(graph)\n if (this._validErr !== null) return null\n }\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkHolesInShell(p, graph)\n if (this._validErr !== null) return null\n }\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkHolesNotNested(p, graph)\n if (this._validErr !== null) return null\n }\n this.checkShellsNotNested(g, graph)\n if (this._validErr !== null) return null\n this.checkConnectedInteriors(graph)\n } else if (arguments[0] instanceof GeometryCollection) {\n const gc = arguments[0]\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.checkValid(g)\n if (this._validErr !== null) return null\n }\n } else if (arguments[0] instanceof Geometry) {\n const g = arguments[0]\n this._validErr = null\n if (g.isEmpty()) return null\n if (g instanceof Point) this.checkValid(g); else if (g instanceof MultiPoint) this.checkValid(g); else if (g instanceof LinearRing) this.checkValid(g); else if (g instanceof LineString) this.checkValid(g); else if (g instanceof Polygon) this.checkValid(g); else if (g instanceof MultiPolygon) this.checkValid(g); else if (g instanceof GeometryCollection) this.checkValid(g); else throw new UnsupportedOperationException(g.getGeometryType())\n }\n }\n setSelfTouchingRingFormingHoleValid(isValid) {\n this._isSelfTouchingRingFormingHoleValid = isValid\n }\n checkShellNotNested(shell, p, graph) {\n const shellPts = shell.getCoordinates()\n const polyShell = p.getExteriorRing()\n if (polyShell.isEmpty()) return null\n const polyPts = polyShell.getCoordinates()\n const shellPt = IsValidOp.findPtNotNode(shellPts, polyShell, graph)\n if (shellPt === null) return null\n const insidePolyShell = PointLocation.isInRing(shellPt, polyPts)\n if (!insidePolyShell) return null\n if (p.getNumInteriorRing() <= 0) {\n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_SHELLS, shellPt)\n return null\n }\n let badNestedPt = null\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n badNestedPt = this.checkShellInsideHole(shell, hole, graph)\n if (badNestedPt === null) return null\n }\n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_SHELLS, badNestedPt)\n }\n checkClosedRings(poly) {\n this.checkClosedRing(poly.getExteriorRing())\n if (this._validErr !== null) return null\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n this.checkClosedRing(poly.getInteriorRingN(i))\n if (this._validErr !== null) return null\n }\n }\n checkClosedRing(ring) {\n if (ring.isEmpty()) return null\n if (!ring.isClosed()) {\n let pt = null\n if (ring.getNumPoints() >= 1) pt = ring.getCoordinateN(0)\n this._validErr = new TopologyValidationError(TopologyValidationError.RING_NOT_CLOSED, pt)\n }\n }\n checkShellsNotNested(mp, graph) {\n for (let i = 0; i < mp.getNumGeometries(); i++) {\n const p = mp.getGeometryN(i)\n const shell = p.getExteriorRing()\n for (let j = 0; j < mp.getNumGeometries(); j++) {\n if (i === j) continue\n const p2 = mp.getGeometryN(j)\n this.checkShellNotNested(shell, p2, graph)\n if (this._validErr !== null) return null\n }\n }\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class NodeBase {\n constructor() {\n NodeBase.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._items = new ArrayList()\n this._subnode = new Array(4).fill(null)\n }\n static getSubnodeIndex(env, centrex, centrey) {\n let subnodeIndex = -1\n if (env.getMinX() >= centrex) {\n if (env.getMinY() >= centrey) subnodeIndex = 3\n if (env.getMaxY() <= centrey) subnodeIndex = 1\n }\n if (env.getMaxX() <= centrex) {\n if (env.getMinY() >= centrey) subnodeIndex = 2\n if (env.getMaxY() <= centrey) subnodeIndex = 0\n }\n return subnodeIndex\n }\n hasChildren() {\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) return true\n \n return false\n }\n isPrunable() {\n return !(this.hasChildren() || this.hasItems())\n }\n addAllItems(resultItems) {\n resultItems.addAll(this._items)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].addAllItems(resultItems)\n \n \n return resultItems\n }\n getNodeCount() {\n let subSize = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n subSize += this._subnode[i].size()\n \n \n return subSize + 1\n }\n size() {\n let subSize = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n subSize += this._subnode[i].size()\n \n \n return subSize + this._items.size()\n }\n addAllItemsFromOverlapping(searchEnv, resultItems) {\n if (!this.isSearchMatch(searchEnv)) return null\n resultItems.addAll(this._items)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].addAllItemsFromOverlapping(searchEnv, resultItems)\n \n \n }\n visitItems(searchEnv, visitor) {\n for (let i = this._items.iterator(); i.hasNext(); ) \n visitor.visitItem(i.next())\n \n }\n hasItems() {\n return !this._items.isEmpty()\n }\n remove(itemEnv, item) {\n if (!this.isSearchMatch(itemEnv)) return false\n let found = false\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) {\n found = this._subnode[i].remove(itemEnv, item)\n if (found) {\n if (this._subnode[i].isPrunable()) this._subnode[i] = null\n break\n }\n }\n \n if (found) return found\n found = this._items.remove(item)\n return found\n }\n visit(searchEnv, visitor) {\n if (!this.isSearchMatch(searchEnv)) return null\n this.visitItems(searchEnv, visitor)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].visit(searchEnv, visitor)\n \n \n }\n getItems() {\n return this._items\n }\n depth() {\n let maxSubDepth = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) {\n const sqd = this._subnode[i].depth()\n if (sqd > maxSubDepth) maxSubDepth = sqd\n }\n \n return maxSubDepth + 1\n }\n isEmpty() {\n let isEmpty = true\n if (!this._items.isEmpty()) isEmpty = false; else \n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n if (!this._subnode[i].isEmpty()) {\n isEmpty = false\n break\n }\n \n \n \n return isEmpty\n }\n add(item) {\n this._items.add(item)\n }\n get interfaces_() {\n return [Serializable]\n }\n}\n","export default function DoubleBits() { }\nDoubleBits.exponent = function(d) {\n return CVTFWD(64, d) - 1023\n}\nDoubleBits.powerOf2 = function(exp) {\n return Math.pow(2, exp)\n}\n\n/**\n * Calculates the exponent of the bit-pattern for a number. Uses code from:\n * http://www.merlyn.demon.co.uk/js-exact.htm\n *\n * @param {Number}\n * NumW 32 or 64 to denote the number of bits.\n * @param {Number}\n * Qty the number to calculate the bit pattern for.\n * @return {Number} The integer value of the exponent.\n * @private\n */\nfunction CVTFWD(NumW, Qty) {\n let Sign\n let Expo\n let Mant\n let Bin\n const Inf = {\n 32: {\n d: 0x7F,\n c: 0x80,\n b: 0,\n a: 0\n },\n 64: {\n d: 0x7FF0,\n c: 0,\n b: 0,\n a: 0\n }\n }\n const ExW = {\n 32: 8,\n 64: 11\n }[NumW]\n\n if (!Bin) {\n Sign = Qty < 0 || 1 / Qty < 0 // OK for +-0\n if (!isFinite(Qty)) {\n Bin = Inf[NumW]\n if (Sign) Bin.d += 1 << (NumW / 4 - 1)\n\n Expo = Math.pow(2, ExW) - 1\n Mant = 0\n }\n }\n\n if (!Bin) {\n Expo = {\n 32: 127,\n 64: 1023\n }[NumW]\n Mant = Math.abs(Qty)\n while (Mant >= 2) {\n Expo++\n Mant /= 2\n }\n while (Mant < 1 && Expo > 0) {\n Expo--\n Mant *= 2\n }\n if (Expo <= 0) Mant /= 2\n\n if (NumW === 32 && Expo > 254) {\n Bin = {\n d: Sign ? 0xFF : 0x7F,\n c: 0x80,\n b: 0,\n a: 0\n }\n Expo = Math.pow(2, ExW) - 1\n Mant = 0\n }\n }\n\n return Expo\n}\n","import Coordinate from '../../geom/Coordinate.js'\nimport DoubleBits from './DoubleBits.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class Key {\n constructor() {\n Key.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pt = new Coordinate()\n this._level = 0\n this._env = null\n const itemEnv = arguments[0]\n this.computeKey(itemEnv)\n }\n static computeQuadLevel(env) {\n const dx = env.getWidth()\n const dy = env.getHeight()\n const dMax = dx > dy ? dx : dy\n const level = DoubleBits.exponent(dMax) + 1\n return level\n }\n getLevel() {\n return this._level\n }\n computeKey() {\n if (arguments.length === 1) {\n const itemEnv = arguments[0]\n this._level = Key.computeQuadLevel(itemEnv)\n this._env = new Envelope()\n this.computeKey(this._level, itemEnv)\n while (!this._env.contains(itemEnv)) {\n this._level += 1\n this.computeKey(this._level, itemEnv)\n }\n } else if (arguments.length === 2) {\n const level = arguments[0], itemEnv = arguments[1]\n const quadSize = DoubleBits.powerOf2(level)\n this._pt.x = Math.floor(itemEnv.getMinX() / quadSize) * quadSize\n this._pt.y = Math.floor(itemEnv.getMinY() / quadSize) * quadSize\n this._env.init(this._pt.x, this._pt.x + quadSize, this._pt.y, this._pt.y + quadSize)\n }\n }\n getEnvelope() {\n return this._env\n }\n getCentre() {\n return new Coordinate((this._env.getMinX() + this._env.getMaxX()) / 2, (this._env.getMinY() + this._env.getMaxY()) / 2)\n }\n getPoint() {\n return this._pt\n }\n}\n","import NodeBase from './NodeBase.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nimport Key from './Key.js'\nexport default class Node extends NodeBase {\n constructor() {\n super()\n Node.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._env = null\n this._centrex = null\n this._centrey = null\n this._level = null\n const env = arguments[0], level = arguments[1]\n this._env = env\n this._level = level\n this._centrex = (env.getMinX() + env.getMaxX()) / 2\n this._centrey = (env.getMinY() + env.getMaxY()) / 2\n }\n static createNode(env) {\n const key = new Key(env)\n const node = new Node(key.getEnvelope(), key.getLevel())\n return node\n }\n static createExpanded(node, addEnv) {\n const expandEnv = new Envelope(addEnv)\n if (node !== null) expandEnv.expandToInclude(node._env)\n const largerNode = Node.createNode(expandEnv)\n if (node !== null) largerNode.insertNode(node)\n return largerNode\n }\n find(searchEnv) {\n const subnodeIndex = NodeBase.getSubnodeIndex(searchEnv, this._centrex, this._centrey)\n if (subnodeIndex === -1) return this\n if (this._subnode[subnodeIndex] !== null) {\n const node = this._subnode[subnodeIndex]\n return node.find(searchEnv)\n }\n return this\n }\n isSearchMatch(searchEnv) {\n if (searchEnv === null) return false\n return this._env.intersects(searchEnv)\n }\n getSubnode(index) {\n if (this._subnode[index] === null) \n this._subnode[index] = this.createSubnode(index)\n \n return this._subnode[index]\n }\n getEnvelope() {\n return this._env\n }\n getNode(searchEnv) {\n const subnodeIndex = NodeBase.getSubnodeIndex(searchEnv, this._centrex, this._centrey)\n if (subnodeIndex !== -1) {\n const node = this.getSubnode(subnodeIndex)\n return node.getNode(searchEnv)\n } else {\n return this\n }\n }\n createSubnode(index) {\n let minx = 0.0\n let maxx = 0.0\n let miny = 0.0\n let maxy = 0.0\n switch (index) {\n case 0:\n minx = this._env.getMinX()\n maxx = this._centrex\n miny = this._env.getMinY()\n maxy = this._centrey\n break\n case 1:\n minx = this._centrex\n maxx = this._env.getMaxX()\n miny = this._env.getMinY()\n maxy = this._centrey\n break\n case 2:\n minx = this._env.getMinX()\n maxx = this._centrex\n miny = this._centrey\n maxy = this._env.getMaxY()\n break\n case 3:\n minx = this._centrex\n maxx = this._env.getMaxX()\n miny = this._centrey\n maxy = this._env.getMaxY()\n break\n }\n const sqEnv = new Envelope(minx, maxx, miny, maxy)\n const node = new Node(sqEnv, this._level - 1)\n return node\n }\n insertNode(node) {\n Assert.isTrue(this._env === null || this._env.contains(node._env))\n const index = NodeBase.getSubnodeIndex(node._env, this._centrex, this._centrey)\n if (node._level === this._level - 1) {\n this._subnode[index] = node\n } else {\n const childNode = this.createSubnode(index)\n childNode.insertNode(node)\n this._subnode[index] = childNode\n }\n }\n}\n","import DoubleBits from './DoubleBits.js'\nexport default class IntervalSize {\n static isZeroWidth(min, max) {\n const width = max - min\n if (width === 0.0) return true\n const maxAbs = Math.max(Math.abs(min), Math.abs(max))\n const scaledInterval = width / maxAbs\n const level = DoubleBits.exponent(scaledInterval)\n return level <= IntervalSize.MIN_BINARY_EXPONENT\n }\n}\nIntervalSize.MIN_BINARY_EXPONENT = -50\n","import Coordinate from '../../geom/Coordinate.js'\nimport NodeBase from './NodeBase.js'\nimport Node from './Node.js'\nimport IntervalSize from './IntervalSize.js'\nimport Assert from '../../util/Assert.js'\nexport default class Root extends NodeBase {\n constructor() {\n super()\n }\n insert(itemEnv, item) {\n const index = NodeBase.getSubnodeIndex(itemEnv, Root.origin.x, Root.origin.y)\n if (index === -1) {\n this.add(item)\n return null\n }\n const node = this._subnode[index]\n if (node === null || !node.getEnvelope().contains(itemEnv)) {\n const largerNode = Node.createExpanded(node, itemEnv)\n this._subnode[index] = largerNode\n }\n this.insertContained(this._subnode[index], itemEnv, item)\n }\n isSearchMatch(searchEnv) {\n return true\n }\n insertContained(tree, itemEnv, item) {\n Assert.isTrue(tree.getEnvelope().contains(itemEnv))\n const isZeroX = IntervalSize.isZeroWidth(itemEnv.getMinX(), itemEnv.getMaxX())\n const isZeroY = IntervalSize.isZeroWidth(itemEnv.getMinY(), itemEnv.getMaxY())\n let node = null\n if (isZeroX || isZeroY) node = tree.find(itemEnv); else node = tree.getNode(itemEnv)\n node.add(item)\n }\n}\nRoot.origin = new Coordinate(0.0, 0.0)\n","import Root from './Root.js'\nimport SpatialIndex from '../SpatialIndex.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport ArrayListVisitor from '../ArrayListVisitor.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class Quadtree {\n constructor() {\n Quadtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._root = null\n this._minExtent = 1.0\n this._root = new Root()\n }\n static ensureExtent(itemEnv, minExtent) {\n let minx = itemEnv.getMinX()\n let maxx = itemEnv.getMaxX()\n let miny = itemEnv.getMinY()\n let maxy = itemEnv.getMaxY()\n if (minx !== maxx && miny !== maxy) return itemEnv\n if (minx === maxx) {\n minx = minx - minExtent / 2.0\n maxx = maxx + minExtent / 2.0\n }\n if (miny === maxy) {\n miny = miny - minExtent / 2.0\n maxy = maxy + minExtent / 2.0\n }\n return new Envelope(minx, maxx, miny, maxy)\n }\n size() {\n if (this._root !== null) return this._root.size()\n return 0\n }\n insert(itemEnv, item) {\n this.collectStats(itemEnv)\n const insertEnv = Quadtree.ensureExtent(itemEnv, this._minExtent)\n this._root.insert(insertEnv, item)\n }\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n const visitor = new ArrayListVisitor()\n this.query(searchEnv, visitor)\n return visitor.getItems()\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n this._root.visit(searchEnv, visitor)\n }\n }\n queryAll() {\n const foundItems = new ArrayList()\n this._root.addAllItems(foundItems)\n return foundItems\n }\n remove(itemEnv, item) {\n const posEnv = Quadtree.ensureExtent(itemEnv, this._minExtent)\n return this._root.remove(posEnv, item)\n }\n collectStats(itemEnv) {\n const delX = itemEnv.getWidth()\n if (delX < this._minExtent && delX > 0.0) this._minExtent = delX\n const delY = itemEnv.getHeight()\n if (delY < this._minExtent && delY > 0.0) this._minExtent = delY\n }\n depth() {\n if (this._root !== null) return this._root.depth()\n return 0\n }\n isEmpty() {\n if (this._root === null) return true\n return this._root.isEmpty()\n }\n get interfaces_() {\n return [SpatialIndex, Serializable]\n }\n}\n","import LineSegment from '../geom/LineSegment.js'\nexport default class TaggedLineSegment extends LineSegment {\n constructor() {\n super()\n TaggedLineSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parent = null\n this._index = null\n if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n TaggedLineSegment.constructor_.call(this, p0, p1, null, -1)\n } else if (arguments.length === 4) {\n const p0 = arguments[0], p1 = arguments[1], parent = arguments[2], index = arguments[3]\n LineSegment.constructor_.call(this, p0, p1)\n this._parent = parent\n this._index = index\n }\n }\n getIndex() {\n return this._index\n }\n getParent() {\n return this._parent\n }\n}\n","import TaggedLineSegment from './TaggedLineSegment.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class TaggedLineString {\n constructor() {\n TaggedLineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentLine = null\n this._segs = null\n this._resultSegs = new ArrayList()\n this._minimumSize = null\n if (arguments.length === 1) {\n const parentLine = arguments[0]\n TaggedLineString.constructor_.call(this, parentLine, 2)\n } else if (arguments.length === 2) {\n const parentLine = arguments[0], minimumSize = arguments[1]\n this._parentLine = parentLine\n this._minimumSize = minimumSize\n this.init()\n }\n }\n static extractCoordinates(segs) {\n const pts = new Array(segs.size() + 1).fill(null)\n let seg = null\n for (let i = 0; i < segs.size(); i++) {\n seg = segs.get(i)\n pts[i] = seg.p0\n }\n pts[pts.length - 1] = seg.p1\n return pts\n }\n addToResult(seg) {\n this._resultSegs.add(seg)\n }\n asLineString() {\n return this._parentLine.getFactory().createLineString(TaggedLineString.extractCoordinates(this._resultSegs))\n }\n getResultSize() {\n const resultSegsSize = this._resultSegs.size()\n return resultSegsSize === 0 ? 0 : resultSegsSize + 1\n }\n getParent() {\n return this._parentLine\n }\n getSegment(i) {\n return this._segs[i]\n }\n getParentCoordinates() {\n return this._parentLine.getCoordinates()\n }\n getMinimumSize() {\n return this._minimumSize\n }\n asLinearRing() {\n return this._parentLine.getFactory().createLinearRing(TaggedLineString.extractCoordinates(this._resultSegs))\n }\n getSegments() {\n return this._segs\n }\n init() {\n const pts = this._parentLine.getCoordinates()\n this._segs = new Array(pts.length - 1).fill(null)\n for (let i = 0; i < pts.length - 1; i++) {\n const seg = new TaggedLineSegment(pts[i], pts[i + 1], this._parentLine, i)\n this._segs[i] = seg\n }\n }\n getResultCoordinates() {\n return TaggedLineString.extractCoordinates(this._resultSegs)\n }\n}\n","import Quadtree from '../index/quadtree/Quadtree.js'\nimport ItemVisitor from '../index/ItemVisitor.js'\nimport LineSegment from '../geom/LineSegment.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Envelope from '../geom/Envelope.js'\nimport TaggedLineString from './TaggedLineString.js'\nexport default class LineSegmentIndex {\n constructor() {\n LineSegmentIndex.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._index = new Quadtree()\n }\n remove(seg) {\n this._index.remove(new Envelope(seg.p0, seg.p1), seg)\n }\n add() {\n if (arguments[0] instanceof TaggedLineString) {\n const line = arguments[0]\n const segs = line.getSegments()\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n this.add(seg)\n }\n } else if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n this._index.insert(new Envelope(seg.p0, seg.p1), seg)\n }\n }\n query(querySeg) {\n const env = new Envelope(querySeg.p0, querySeg.p1)\n const visitor = new LineSegmentVisitor(querySeg)\n this._index.query(env, visitor)\n const itemsFound = visitor.getItems()\n return itemsFound\n }\n}\nclass LineSegmentVisitor {\n constructor() {\n LineSegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._querySeg = null\n this._items = new ArrayList()\n const querySeg = arguments[0]\n this._querySeg = querySeg\n }\n visitItem(item) {\n const seg = item\n if (Envelope.intersects(seg.p0, seg.p1, this._querySeg.p0, this._querySeg.p1)) this._items.add(item)\n }\n getItems() {\n return this._items\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\n","import LineSegment from '../geom/LineSegment.js'\nimport LineSegmentIndex from './LineSegmentIndex.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nexport default class TaggedLineStringSimplifier {\n constructor() {\n TaggedLineStringSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._inputIndex = new LineSegmentIndex()\n this._outputIndex = new LineSegmentIndex()\n this._line = null\n this._linePts = null\n this._distanceTolerance = 0.0\n const inputIndex = arguments[0], outputIndex = arguments[1]\n this._inputIndex = inputIndex\n this._outputIndex = outputIndex\n }\n static isInLineSection(line, sectionIndex, seg) {\n if (seg.getParent() !== line.getParent()) return false\n const segIndex = seg.getIndex()\n if (segIndex >= sectionIndex[0] && segIndex < sectionIndex[1]) return true\n return false\n }\n flatten(start, end) {\n const p0 = this._linePts[start]\n const p1 = this._linePts[end]\n const newSeg = new LineSegment(p0, p1)\n this.remove(this._line, start, end)\n this._outputIndex.add(newSeg)\n return newSeg\n }\n hasBadIntersection(parentLine, sectionIndex, candidateSeg) {\n if (this.hasBadOutputIntersection(candidateSeg)) return true\n if (this.hasBadInputIntersection(parentLine, sectionIndex, candidateSeg)) return true\n return false\n }\n setDistanceTolerance(distanceTolerance) {\n this._distanceTolerance = distanceTolerance\n }\n simplifySection(i, j, depth) {\n depth += 1\n const sectionIndex = new Array(2).fill(null)\n if (i + 1 === j) {\n const newSeg = this._line.getSegment(i)\n this._line.addToResult(newSeg)\n return null\n }\n let isValidToSimplify = true\n if (this._line.getResultSize() < this._line.getMinimumSize()) {\n const worstCaseSize = depth + 1\n if (worstCaseSize < this._line.getMinimumSize()) isValidToSimplify = false\n }\n const distance = new Array(1).fill(null)\n const furthestPtIndex = this.findFurthestPoint(this._linePts, i, j, distance)\n if (distance[0] > this._distanceTolerance) isValidToSimplify = false\n const candidateSeg = new LineSegment()\n candidateSeg.p0 = this._linePts[i]\n candidateSeg.p1 = this._linePts[j]\n sectionIndex[0] = i\n sectionIndex[1] = j\n if (this.hasBadIntersection(this._line, sectionIndex, candidateSeg)) isValidToSimplify = false\n if (isValidToSimplify) {\n const newSeg = this.flatten(i, j)\n this._line.addToResult(newSeg)\n return null\n }\n this.simplifySection(i, furthestPtIndex, depth)\n this.simplifySection(furthestPtIndex, j, depth)\n }\n hasBadOutputIntersection(candidateSeg) {\n const querySegs = this._outputIndex.query(candidateSeg)\n for (let i = querySegs.iterator(); i.hasNext(); ) {\n const querySeg = i.next()\n if (this.hasInteriorIntersection(querySeg, candidateSeg)) \n return true\n \n }\n return false\n }\n findFurthestPoint(pts, i, j, maxDistance) {\n const seg = new LineSegment()\n seg.p0 = pts[i]\n seg.p1 = pts[j]\n let maxDist = -1.0\n let maxIndex = i\n for (let k = i + 1; k < j; k++) {\n const midPt = pts[k]\n const distance = seg.distance(midPt)\n if (distance > maxDist) {\n maxDist = distance\n maxIndex = k\n }\n }\n maxDistance[0] = maxDist\n return maxIndex\n }\n simplify(line) {\n this._line = line\n this._linePts = line.getParentCoordinates()\n this.simplifySection(0, this._linePts.length - 1, 0)\n }\n remove(line, start, end) {\n for (let i = start; i < end; i++) {\n const seg = line.getSegment(i)\n this._inputIndex.remove(seg)\n }\n }\n hasInteriorIntersection(seg0, seg1) {\n this._li.computeIntersection(seg0.p0, seg0.p1, seg1.p0, seg1.p1)\n return this._li.isInteriorIntersection()\n }\n hasBadInputIntersection(parentLine, sectionIndex, candidateSeg) {\n const querySegs = this._inputIndex.query(candidateSeg)\n for (let i = querySegs.iterator(); i.hasNext(); ) {\n const querySeg = i.next()\n if (this.hasInteriorIntersection(querySeg, candidateSeg)) {\n if (TaggedLineStringSimplifier.isInLineSection(parentLine, sectionIndex, querySeg)) continue\n return true\n }\n }\n return false\n }\n}\n","import TaggedLineStringSimplifier from './TaggedLineStringSimplifier.js'\nimport LineSegmentIndex from './LineSegmentIndex.js'\nexport default class TaggedLinesSimplifier {\n constructor() {\n TaggedLinesSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputIndex = new LineSegmentIndex()\n this._outputIndex = new LineSegmentIndex()\n this._distanceTolerance = 0.0\n }\n setDistanceTolerance(distanceTolerance) {\n this._distanceTolerance = distanceTolerance\n }\n simplify(taggedLines) {\n for (let i = taggedLines.iterator(); i.hasNext(); ) \n this._inputIndex.add(i.next())\n \n for (let i = taggedLines.iterator(); i.hasNext(); ) {\n const tlss = new TaggedLineStringSimplifier(this._inputIndex, this._outputIndex)\n tlss.setDistanceTolerance(this._distanceTolerance)\n tlss.simplify(i.next())\n }\n }\n}\n","import LineString from '../geom/LineString.js'\nimport HashMap from '../../../../java/util/HashMap.js'\nimport GeometryTransformer from '../geom/util/GeometryTransformer.js'\nimport TaggedLinesSimplifier from './TaggedLinesSimplifier.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from '../geom/GeometryComponentFilter.js'\nimport TaggedLineString from './TaggedLineString.js'\nexport default class TopologyPreservingSimplifier {\n constructor() {\n TopologyPreservingSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._lineSimplifier = new TaggedLinesSimplifier()\n this._linestringMap = null\n const inputGeom = arguments[0]\n this._inputGeom = inputGeom\n }\n static simplify(geom, distanceTolerance) {\n const tss = new TopologyPreservingSimplifier(geom)\n tss.setDistanceTolerance(distanceTolerance)\n return tss.getResultGeometry()\n }\n getResultGeometry() {\n if (this._inputGeom.isEmpty()) return this._inputGeom.copy()\n this._linestringMap = new HashMap()\n this._inputGeom.apply(new LineStringMapBuilderFilter(this))\n this._lineSimplifier.simplify(this._linestringMap.values())\n const result = new LineStringTransformer(this._linestringMap).transform(this._inputGeom)\n return result\n }\n setDistanceTolerance(distanceTolerance) {\n if (distanceTolerance < 0.0) throw new IllegalArgumentException('Tolerance must be non-negative')\n this._lineSimplifier.setDistanceTolerance(distanceTolerance)\n }\n}\nclass LineStringTransformer extends GeometryTransformer {\n constructor() {\n super()\n LineStringTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._linestringMap = null\n const linestringMap = arguments[0]\n this._linestringMap = linestringMap\n }\n transformCoordinates(coords, parent) {\n if (coords.size() === 0) return null\n if (parent instanceof LineString) {\n const taggedLine = this._linestringMap.get(parent)\n return this.createCoordinateSequence(taggedLine.getResultCoordinates())\n }\n return super.transformCoordinates.call(this, coords, parent)\n }\n}\nclass LineStringMapBuilderFilter {\n constructor() {\n LineStringMapBuilderFilter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.tps = null\n const tps = arguments[0]\n this.tps = tps\n }\n filter(geom) {\n if (geom instanceof LineString) {\n const line = geom\n if (line.isEmpty()) return null\n const minSize = line.isClosed() ? 4 : 2\n const taggedLine = new TaggedLineString(line, minSize)\n this.tps._linestringMap.put(line, taggedLine)\n }\n }\n get interfaces_() {\n return [GeometryComponentFilter]\n }\n}\nTopologyPreservingSimplifier.LineStringTransformer = LineStringTransformer\nTopologyPreservingSimplifier.LineStringMapBuilderFilter = LineStringMapBuilderFilter\n","import Exception from '../../../../../java/lang/Exception.js'\nexport default class NoninvertibleTransformationException extends Exception {\n constructor() {\n super()\n NoninvertibleTransformationException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n Exception.constructor_.call(this)\n } else if (arguments.length === 1) {\n const msg = arguments[0]\n Exception.constructor_.call(this, msg)\n }\n }\n}\n","import NoninvertibleTransformationException from './NoninvertibleTransformationException.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Coordinate from '../Coordinate.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Exception from '../../../../../java/lang/Exception.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport Cloneable from '../../../../../java/lang/Cloneable.js'\nimport CoordinateSequenceFilter from '../CoordinateSequenceFilter.js'\nimport Assert from '../../util/Assert.js'\nexport default class AffineTransformation {\n constructor() {\n AffineTransformation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m00 = null\n this._m01 = null\n this._m02 = null\n this._m10 = null\n this._m11 = null\n this._m12 = null\n if (arguments.length === 0) {\n this.setToIdentity()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const matrix = arguments[0]\n this._m00 = matrix[0]\n this._m01 = matrix[1]\n this._m02 = matrix[2]\n this._m10 = matrix[3]\n this._m11 = matrix[4]\n this._m12 = matrix[5]\n } else if (arguments[0] instanceof AffineTransformation) {\n const trans = arguments[0]\n this.setTransformation(trans)\n }\n } else if (arguments.length === 6) {\n if (typeof arguments[5] === 'number' && (typeof arguments[4] === 'number' && (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))))) {\n const m00 = arguments[0], m01 = arguments[1], m02 = arguments[2], m10 = arguments[3], m11 = arguments[4], m12 = arguments[5]\n this.setTransformation(m00, m01, m02, m10, m11, m12)\n } else if (arguments[5] instanceof Coordinate && (arguments[4] instanceof Coordinate && (arguments[3] instanceof Coordinate && (arguments[2] instanceof Coordinate && (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate))))) {\n const src0 = arguments[0], src1 = arguments[1], src2 = arguments[2], dest0 = arguments[3], dest1 = arguments[4], dest2 = arguments[5]\n }\n }\n }\n static translationInstance(x, y) {\n const trans = new AffineTransformation()\n trans.setToTranslation(x, y)\n return trans\n }\n static shearInstance(xShear, yShear) {\n const trans = new AffineTransformation()\n trans.setToShear(xShear, yShear)\n return trans\n }\n static reflectionInstance() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n const trans = new AffineTransformation()\n trans.setToReflection(x, y)\n return trans\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n const trans = new AffineTransformation()\n trans.setToReflection(x0, y0, x1, y1)\n return trans\n }\n }\n static rotationInstance() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n return AffineTransformation.rotationInstance(Math.sin(theta), Math.cos(theta))\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n const trans = new AffineTransformation()\n trans.setToRotation(sinTheta, cosTheta)\n return trans\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n return AffineTransformation.rotationInstance(Math.sin(theta), Math.cos(theta), x, y)\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n const trans = new AffineTransformation()\n trans.setToRotation(sinTheta, cosTheta, x, y)\n return trans\n }\n }\n static scaleInstance() {\n if (arguments.length === 2) {\n const xScale = arguments[0], yScale = arguments[1]\n const trans = new AffineTransformation()\n trans.setToScale(xScale, yScale)\n return trans\n } else if (arguments.length === 4) {\n const xScale = arguments[0], yScale = arguments[1], x = arguments[2], y = arguments[3]\n const trans = new AffineTransformation()\n trans.translate(-x, -y)\n trans.scale(xScale, yScale)\n trans.translate(x, y)\n return trans\n }\n }\n setToReflectionBasic(x0, y0, x1, y1) {\n if (x0 === x1 && y0 === y1) \n throw new IllegalArgumentException('Reflection line points must be distinct')\n \n const dx = x1 - x0\n const dy = y1 - y0\n const d = Math.sqrt(dx * dx + dy * dy)\n const sin = dy / d\n const cos = dx / d\n const cs2 = 2 * sin * cos\n const c2s2 = cos * cos - sin * sin\n this._m00 = c2s2\n this._m01 = cs2\n this._m02 = 0.0\n this._m10 = cs2\n this._m11 = -c2s2\n this._m12 = 0.0\n return this\n }\n getInverse() {\n const det = this.getDeterminant()\n if (det === 0) throw new NoninvertibleTransformationException('Transformation is non-invertible')\n const im00 = this._m11 / det\n const im10 = -this._m10 / det\n const im01 = -this._m01 / det\n const im11 = this._m00 / det\n const im02 = (this._m01 * this._m12 - this._m02 * this._m11) / det\n const im12 = (-this._m00 * this._m12 + this._m10 * this._m02) / det\n return new AffineTransformation(im00, im01, im02, im10, im11, im12)\n }\n compose(trans) {\n const mp00 = trans._m00 * this._m00 + trans._m01 * this._m10\n const mp01 = trans._m00 * this._m01 + trans._m01 * this._m11\n const mp02 = trans._m00 * this._m02 + trans._m01 * this._m12 + trans._m02\n const mp10 = trans._m10 * this._m00 + trans._m11 * this._m10\n const mp11 = trans._m10 * this._m01 + trans._m11 * this._m11\n const mp12 = trans._m10 * this._m02 + trans._m11 * this._m12 + trans._m12\n this._m00 = mp00\n this._m01 = mp01\n this._m02 = mp02\n this._m10 = mp10\n this._m11 = mp11\n this._m12 = mp12\n return this\n }\n equals(obj) {\n if (obj === null) return false\n if (!(obj instanceof AffineTransformation)) return false\n const trans = obj\n return this._m00 === trans._m00 && this._m01 === trans._m01 && this._m02 === trans._m02 && this._m10 === trans._m10 && this._m11 === trans._m11 && this._m12 === trans._m12\n }\n setToScale(xScale, yScale) {\n this._m00 = xScale\n this._m01 = 0.0\n this._m02 = 0.0\n this._m10 = 0.0\n this._m11 = yScale\n this._m12 = 0.0\n return this\n }\n isIdentity() {\n return this._m00 === 1 && this._m01 === 0 && this._m02 === 0 && this._m10 === 0 && this._m11 === 1 && this._m12 === 0\n }\n scale(xScale, yScale) {\n this.compose(AffineTransformation.scaleInstance(xScale, yScale))\n return this\n }\n setToIdentity() {\n this._m00 = 1.0\n this._m01 = 0.0\n this._m02 = 0.0\n this._m10 = 0.0\n this._m11 = 1.0\n this._m12 = 0.0\n return this\n }\n isGeometryChanged() {\n return true\n }\n setTransformation() {\n if (arguments.length === 1) {\n const trans = arguments[0]\n this._m00 = trans._m00\n this._m01 = trans._m01\n this._m02 = trans._m02\n this._m10 = trans._m10\n this._m11 = trans._m11\n this._m12 = trans._m12\n return this\n } else if (arguments.length === 6) {\n const m00 = arguments[0], m01 = arguments[1], m02 = arguments[2], m10 = arguments[3], m11 = arguments[4], m12 = arguments[5]\n this._m00 = m00\n this._m01 = m01\n this._m02 = m02\n this._m10 = m10\n this._m11 = m11\n this._m12 = m12\n return this\n }\n }\n setToRotation() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n this.setToRotation(Math.sin(theta), Math.cos(theta))\n return this\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n this._m00 = cosTheta\n this._m01 = -sinTheta\n this._m02 = 0.0\n this._m10 = sinTheta\n this._m11 = cosTheta\n this._m12 = 0.0\n return this\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n this.setToRotation(Math.sin(theta), Math.cos(theta), x, y)\n return this\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n this._m00 = cosTheta\n this._m01 = -sinTheta\n this._m02 = x - x * cosTheta + y * sinTheta\n this._m10 = sinTheta\n this._m11 = cosTheta\n this._m12 = y - x * sinTheta - y * cosTheta\n return this\n }\n }\n getMatrixEntries() {\n return [this._m00, this._m01, this._m02, this._m10, this._m11, this._m12]\n }\n filter(seq, i) {\n this.transform(seq, i)\n }\n rotate() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n this.compose(AffineTransformation.rotationInstance(theta))\n return this\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n this.compose(AffineTransformation.rotationInstance(sinTheta, cosTheta))\n return this\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n this.compose(AffineTransformation.rotationInstance(theta, x, y))\n return this\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n this.compose(AffineTransformation.rotationInstance(sinTheta, cosTheta, x, y))\n return this\n }\n }\n getDeterminant() {\n return this._m00 * this._m11 - this._m01 * this._m10\n }\n composeBefore(trans) {\n const mp00 = this._m00 * trans._m00 + this._m01 * trans._m10\n const mp01 = this._m00 * trans._m01 + this._m01 * trans._m11\n const mp02 = this._m00 * trans._m02 + this._m01 * trans._m12 + this._m02\n const mp10 = this._m10 * trans._m00 + this._m11 * trans._m10\n const mp11 = this._m10 * trans._m01 + this._m11 * trans._m11\n const mp12 = this._m10 * trans._m02 + this._m11 * trans._m12 + this._m12\n this._m00 = mp00\n this._m01 = mp01\n this._m02 = mp02\n this._m10 = mp10\n this._m11 = mp11\n this._m12 = mp12\n return this\n }\n setToShear(xShear, yShear) {\n this._m00 = 1.0\n this._m01 = xShear\n this._m02 = 0.0\n this._m10 = yShear\n this._m11 = 1.0\n this._m12 = 0.0\n return this\n }\n isDone() {\n return false\n }\n clone() {\n try {\n return null\n } catch (ex) {\n if (ex instanceof Exception) \n Assert.shouldNeverReachHere()\n else throw ex\n } finally {}\n return null\n }\n translate(x, y) {\n this.compose(AffineTransformation.translationInstance(x, y))\n return this\n }\n setToReflection() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (x === 0.0 && y === 0.0) \n throw new IllegalArgumentException('Reflection vector must be non-zero')\n \n if (x === y) {\n this._m00 = 0.0\n this._m01 = 1.0\n this._m02 = 0.0\n this._m10 = 1.0\n this._m11 = 0.0\n this._m12 = 0.0\n return this\n }\n const d = Math.sqrt(x * x + y * y)\n const sin = y / d\n const cos = x / d\n this.rotate(-sin, cos)\n this.scale(1, -1)\n this.rotate(sin, cos)\n return this\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n if (x0 === x1 && y0 === y1) \n throw new IllegalArgumentException('Reflection line points must be distinct')\n \n this.setToTranslation(-x0, -y0)\n const dx = x1 - x0\n const dy = y1 - y0\n const d = Math.sqrt(dx * dx + dy * dy)\n const sin = dy / d\n const cos = dx / d\n this.rotate(-sin, cos)\n this.scale(1, -1)\n this.rotate(sin, cos)\n this.translate(x0, y0)\n return this\n }\n }\n toString() {\n return 'AffineTransformation[[' + this._m00 + ', ' + this._m01 + ', ' + this._m02 + '], [' + this._m10 + ', ' + this._m11 + ', ' + this._m12 + ']]'\n }\n setToTranslation(dx, dy) {\n this._m00 = 1.0\n this._m01 = 0.0\n this._m02 = dx\n this._m10 = 0.0\n this._m11 = 1.0\n this._m12 = dy\n return this\n }\n shear(xShear, yShear) {\n this.compose(AffineTransformation.shearInstance(xShear, yShear))\n return this\n }\n transform() {\n if (arguments.length === 1) {\n const g = arguments[0]\n const g2 = g.copy()\n g2.apply(this)\n return g2\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const src = arguments[0], dest = arguments[1]\n const xp = this._m00 * src.x + this._m01 * src.y + this._m02\n const yp = this._m10 * src.x + this._m11 * src.y + this._m12\n dest.x = xp\n dest.y = yp\n return dest\n } else if (hasInterface(arguments[0], CoordinateSequence) && Number.isInteger(arguments[1])) {\n const seq = arguments[0], i = arguments[1]\n const xp = this._m00 * seq.getOrdinate(i, 0) + this._m01 * seq.getOrdinate(i, 1) + this._m02\n const yp = this._m10 * seq.getOrdinate(i, 0) + this._m11 * seq.getOrdinate(i, 1) + this._m12\n seq.setOrdinate(i, 0, xp)\n seq.setOrdinate(i, 1, yp)\n }\n }\n }\n reflect() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n this.compose(AffineTransformation.reflectionInstance(x, y))\n return this\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n this.compose(AffineTransformation.reflectionInstance(x0, y0, x1, y1))\n return this\n }\n }\n get interfaces_() {\n return [Cloneable, CoordinateSequenceFilter]\n }\n}\n","import GeometryFactory from '../geom/GeometryFactory.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport AffineTransformation from '../geom/util/AffineTransformation.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class GeometricShapeFactory {\n constructor() {\n GeometricShapeFactory.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geomFact = null\n this._precModel = null\n this._dim = new Dimensions()\n this._nPts = 100\n this._rotationAngle = 0.0\n if (arguments.length === 0) {\n GeometricShapeFactory.constructor_.call(this, new GeometryFactory())\n } else if (arguments.length === 1) {\n const geomFact = arguments[0]\n this._geomFact = geomFact\n this._precModel = geomFact.getPrecisionModel()\n }\n }\n createSupercircle(power) {\n const recipPow = 1.0 / power\n const radius = this._dim.getMinSize() / 2\n const centre = this._dim.getCentre()\n const r4 = Math.pow(radius, power)\n const y0 = radius\n const xyInt = Math.pow(r4 / 2, recipPow)\n const nSegsInOct = Math.trunc(this._nPts / 8)\n const totPts = nSegsInOct * 8 + 1\n const pts = new Array(totPts).fill(null)\n const xInc = xyInt / nSegsInOct\n for (let i = 0; i <= nSegsInOct; i++) {\n let x = 0.0\n let y = y0\n if (i !== 0) {\n x = xInc * i\n const x4 = Math.pow(x, power)\n y = Math.pow(r4 - x4, recipPow)\n }\n pts[i] = this.coordTrans(x, y, centre)\n pts[2 * nSegsInOct - i] = this.coordTrans(y, x, centre)\n pts[2 * nSegsInOct + i] = this.coordTrans(y, -x, centre)\n pts[4 * nSegsInOct - i] = this.coordTrans(x, -y, centre)\n pts[4 * nSegsInOct + i] = this.coordTrans(-x, -y, centre)\n pts[6 * nSegsInOct - i] = this.coordTrans(-y, -x, centre)\n pts[6 * nSegsInOct + i] = this.coordTrans(-y, x, centre)\n pts[8 * nSegsInOct - i] = this.coordTrans(-x, y, centre)\n }\n pts[pts.length - 1] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n setNumPoints(nPts) {\n this._nPts = nPts\n }\n setBase(base) {\n this._dim.setBase(base)\n }\n setRotation(radians) {\n this._rotationAngle = radians\n }\n setWidth(width) {\n this._dim.setWidth(width)\n }\n createEllipse() {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n const pts = new Array(this._nPts + 1).fill(null)\n let iPt = 0\n for (let i = 0; i < this._nPts; i++) {\n const ang = i * (2 * Math.PI / this._nPts)\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n pts[iPt] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n coordTrans(x, y, trans) {\n return this.coord(x + trans.x, y + trans.y)\n }\n createSquircle() {\n return this.createSupercircle(4)\n }\n setEnvelope(env) {\n this._dim.setEnvelope(env)\n }\n setCentre(centre) {\n this._dim.setCentre(centre)\n }\n createArc(startAng, angExtent) {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n let angSize = angExtent\n if (angSize <= 0.0 || angSize > 2 * Math.PI) angSize = 2 * Math.PI\n const angInc = angSize / (this._nPts - 1)\n const pts = new Array(this._nPts).fill(null)\n let iPt = 0\n for (let i = 0; i < this._nPts; i++) {\n const ang = startAng + i * angInc\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n const line = this._geomFact.createLineString(pts)\n return this.rotate(line)\n }\n rotate(geom) {\n if (this._rotationAngle !== 0.0) {\n const trans = AffineTransformation.rotationInstance(this._rotationAngle, this._dim.getCentre().x, this._dim.getCentre().y)\n geom.apply(trans)\n }\n return geom\n }\n coord(x, y) {\n const pt = new Coordinate(x, y)\n this._precModel.makePrecise(pt)\n return pt\n }\n createArcPolygon(startAng, angExtent) {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n let angSize = angExtent\n if (angSize <= 0.0 || angSize > 2 * Math.PI) angSize = 2 * Math.PI\n const angInc = angSize / (this._nPts - 1)\n const pts = new Array(this._nPts + 2).fill(null)\n let iPt = 0\n pts[iPt++] = this.coord(centreX, centreY)\n for (let i = 0; i < this._nPts; i++) {\n const ang = startAng + angInc * i\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n pts[iPt++] = this.coord(centreX, centreY)\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n createRectangle() {\n let i = null\n let ipt = 0\n let nSide = Math.trunc(this._nPts / 4)\n if (nSide < 1) nSide = 1\n const XsegLen = this._dim.getEnvelope().getWidth() / nSide\n const YsegLen = this._dim.getEnvelope().getHeight() / nSide\n const pts = new Array(4 * nSide + 1).fill(null)\n const env = this._dim.getEnvelope()\n for ((i = 0); i < nSide; i++) {\n const x = env.getMinX() + i * XsegLen\n const y = env.getMinY()\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMaxX()\n const y = env.getMinY() + i * YsegLen\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMaxX() - i * XsegLen\n const y = env.getMaxY()\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMinX()\n const y = env.getMaxY() - i * YsegLen\n pts[ipt++] = this.coord(x, y)\n }\n pts[ipt++] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n createCircle() {\n return this.createEllipse()\n }\n setHeight(height) {\n this._dim.setHeight(height)\n }\n setSize(size) {\n this._dim.setSize(size)\n }\n}\nclass Dimensions {\n constructor() {\n Dimensions.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.base = null\n this.centre = null\n this.width = null\n this.height = null\n }\n setBase(base) {\n this.base = base\n }\n setWidth(width) {\n this.width = width\n }\n getBase() {\n return this.base\n }\n getWidth() {\n return this.width\n }\n setEnvelope(env) {\n this.width = env.getWidth()\n this.height = env.getHeight()\n this.base = new Coordinate(env.getMinX(), env.getMinY())\n this.centre = new Coordinate(env.centre())\n }\n setCentre(centre) {\n this.centre = centre\n }\n getMinSize() {\n return Math.min(this.width, this.height)\n }\n getEnvelope() {\n if (this.base !== null) \n return new Envelope(this.base.x, this.base.x + this.width, this.base.y, this.base.y + this.height)\n \n if (this.centre !== null) \n return new Envelope(this.centre.x - this.width / 2, this.centre.x + this.width / 2, this.centre.y - this.height / 2, this.centre.y + this.height / 2)\n \n return new Envelope(0, this.width, 0, this.height)\n }\n getCentre() {\n if (this.centre === null) \n this.centre = new Coordinate(this.base.x + this.width / 2, this.base.y + this.height / 2)\n \n return this.centre\n }\n getHeight() {\n return this.height\n }\n setHeight(height) {\n this.height = height\n }\n setSize(size) {\n this.height = size\n this.width = size\n }\n}\nGeometricShapeFactory.Dimensions = Dimensions\n","import Densifier from \"jsts/org/locationtech/jts/densify/Densifier.js\";\nimport Coordinate from \"jsts/org/locationtech/jts/geom/Coordinate.js\";\nimport GeometryFactory from \"jsts/org/locationtech/jts/geom/GeometryFactory.js\";\n// needed by Densifier\nimport LineString from \"jsts/org/locationtech/jts/geom/LineString.js\";\n// needed by Densifier\nimport MultiPolygon from \"jsts/org/locationtech/jts/geom/MultiPolygon.js\";\nimport PrecisionModel from \"jsts/org/locationtech/jts/geom/PrecisionModel.js\";\nimport WKTReader from \"jsts/org/locationtech/jts/io/WKTReader.js\";\nimport WKTWriter from \"jsts/org/locationtech/jts/io/WKTWriter.js\";\nimport { BufferOp } from \"jsts/org/locationtech/jts/operation/buffer\";\nimport OverlayOp from \"jsts/org/locationtech/jts/operation/overlay/OverlayOp.js\";\nimport RelateOp from \"jsts/org/locationtech/jts/operation/relate/RelateOp.js\";\nimport UnionOp from \"jsts/org/locationtech/jts/operation/union/UnionOp.js\";\nimport IsValidOp from \"jsts/org/locationtech/jts/operation/valid/IsValidOp.js\";\nimport TopologyPreservingSimplifier from \"jsts/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js\";\nimport GeometricShapeFactory from \"jsts/org/locationtech/jts/util/GeometricShapeFactory.js\";\nimport GeometryTransformer from \"jsts/org/locationtech/jts/geom/util/GeometryTransformer.js\";\n\n// TODO: various geometry patched functions don't show up in node module\n// see jsts monkey.js for patching\n\nexport const isValid = (geometry) => {\n return IsValidOp.isValid(geometry);\n};\n\nexport const difference = (g1, g2) => {\n return OverlayOp.difference(g1, g2);\n};\n\nexport const intersects = (g1, g2) => {\n return RelateOp.intersects(g1, g2);\n};\n\nexport const touches = (g1, g2) => {\n return RelateOp.touches(g1, g2);\n};\n\nexport const union = (g1, g2) => {\n return UnionOp.union(g1, g2);\n};\n\nexport const intersection = (g1, g2) => {\n return OverlayOp.intersection(g1, g2);\n};\n\nexport const contains = (g1, g2) => {\n return RelateOp.contains(g1, g2);\n};\n\nexport const expandGeometry = (geometry, distance) => {\n return BufferOp.bufferOp(geometry, distance).norm();\n};\n\nexport const geometryToWkt = (geometry) => {\n if (!geometry) {\n return null;\n }\n const precisionModel = new PrecisionModel();\n const factory = new GeometryFactory(precisionModel);\n const wktWriter = new WKTWriter(factory);\n return wktWriter.write(geometry);\n};\n\nexport const wktToGeometry = (wkt) => {\n if (!wkt) {\n return null;\n }\n const wktReader = new WKTReader();\n return wktReader.read(wkt);\n};\n\n// {x, y, height, width}\nexport const rectToPolygon = (rect) => {\n const reader = new WKTReader();\n const polyString = rectToWKTPolygonString(rect);\n return reader.read(polyString);\n};\n\n// {x, y, height, width}\nexport const rectToWKTPolygonString = (rect) => {\n const p = [\n rect.x,\n rect.y,\n rect.x + rect.width,\n rect.y,\n rect.x + rect.width,\n rect.y + rect.height,\n rect.x,\n rect.y + rect.height,\n // close off poly\n rect.x,\n rect.y,\n ];\n return `POLYGON((${p[0]} ${p[1]}, ${p[2]} ${p[3]}, ${p[4]} ${p[5]}, ${p[6]} ${p[7]}, ${p[8]} ${p[9]}))`;\n};\n\nexport const twoPointsToLineString = (x1, y1, x2, y2) => {\n return new GeometryFactory().createLineString([\n new Coordinate(x1, y1),\n new Coordinate(x2, y2),\n ]);\n};\n\n// [[x,y]...]\nexport const pointsToPolygon = (points) => {\n const coords = points.map((p) => new Coordinate(p[0], p[1]));\n return new GeometryFactory().createPolygon(coords);\n};\n\nexport const ellipse = (x, y, width, height) => {\n const gsf = new GeometricShapeFactory();\n const centre = gsf.coord(x, y);\n gsf.setCentre(centre);\n gsf.setWidth(width);\n gsf.setHeight(height);\n return gsf.createEllipse();\n};\n\nexport const slope = (x1, y1, x2, y2) => {\n if (x1 === x2) {\n // vertical line has undefined slope\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n};\n\nexport const inverseSlope = (slope) => {\n if (slope === Infinity) {\n // vertical line; inverse/perpendicular is horizontal\n return 0.0;\n }\n if (slope === 0) {\n // horizontal line; inverse/pendendicular is vertical\n return Infinity;\n }\n return -1.0 / slope;\n};\n\nexport const distanceBetweenPoints = (x1, y1, x2, y2) => {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n};\n\nexport const comparePoints = (x1, y1, x2, y2) => {\n if (x1 < x2 || (x1 === x2 && y1 < y2)) {\n // less than\n return -1;\n } else if (x1 === x2 && y1 === y2) {\n // equal\n return 0;\n } else {\n // greater than\n return 1;\n }\n};\n\nexport const lesserPoint = (x1, y1, x2, y2) => {\n if (comparePoints(x1, y1, x2, y2) === -1) {\n return [x1, y1];\n }\n return [x2, y2];\n};\n\nexport const greaterPoint = (x1, y1, x2, y2) => {\n if (comparePoints(x1, y1, x2, y2) !== -1) {\n return [x1, y1];\n }\n return [x2, y2];\n};\n\nexport const rectangleForSegment = (thickness, x1, y1, x2, y2) => {\n const m = slope(x1, y1, x2, y2);\n const rectDelta = thickness / 2.0;\n\n // slope is delta y / delta x\n if (m === 0) {\n // door is horizontal\n return [\n x1,\n y1 + rectDelta,\n x2,\n y1 + rectDelta,\n x2,\n y1 - rectDelta,\n x1,\n y1 - rectDelta,\n ];\n }\n if (m === Infinity) {\n // door is vertical\n return [\n x1 - rectDelta,\n y1,\n x1 - rectDelta,\n y2,\n x2 + rectDelta,\n y2,\n x2 + rectDelta,\n y1,\n ];\n }\n\n // https://math.stackexchange.com/questions/656500/given-a-point-slope-and-a-distance-along-that-slope-easily-find-a-second-p/656512\n const theta = Math.atan(m);\n // flipped dx/dy and +/- to make things work\n const dy = rectDelta * Math.cos(theta);\n const dx = rectDelta * Math.sin(theta);\n return [\n // lower right - more x, more y\n x1 - dx,\n y1 + dy,\n // upper right - more x, less y\n x2 - dx,\n y2 + dy,\n // upper left - less x, less y\n x2 + dx,\n y2 - dy,\n // lower left - less x, more y\n x1 + dx,\n y1 - dy,\n // close the polygon\n x1 + dy,\n y1 - dx,\n ];\n};\n\nexport const simplify = (geom, distanceTolerance = 5.0) => {\n return TopologyPreservingSimplifier.simplify(geom, distanceTolerance);\n};\n\n// working around \"e.buffer doesn't exist\" monkey patching issue\nclass DensifyTransformer extends GeometryTransformer {\n constructor() {\n super();\n DensifyTransformer.constructor_.apply(this, arguments);\n }\n static constructor_() {\n this.distanceTolerance = null;\n const distanceTolerance = arguments[0];\n this.distanceTolerance = distanceTolerance;\n }\n transformMultiPolygon(geom, parent) {\n const roughGeom = super.transformMultiPolygon.call(this, geom, parent);\n return this.createValidArea(roughGeom);\n }\n transformPolygon(geom, parent) {\n const roughGeom = super.transformPolygon.call(this, geom, parent);\n if (parent instanceof MultiPolygon) return roughGeom;\n\n return this.createValidArea(roughGeom);\n }\n transformCoordinates(coords, parent) {\n const inputPts = coords.toCoordinateArray();\n let newPts = Densifier.densifyPoints(\n inputPts,\n this.distanceTolerance,\n parent.getPrecisionModel()\n );\n if (parent instanceof LineString && newPts.length === 1)\n newPts = new Array(0).fill(null);\n\n return this._factory.getCoordinateSequenceFactory().create(newPts);\n }\n createValidArea(roughAreaGeom) {\n // geometry.buffer function doesn't exist w/out monkey patching\n //return roughAreaGeom.buffer(0.0)\n return BufferOp.bufferOp(roughAreaGeom, 0.0);\n }\n}\n\nexport const densify = (geom, distanceTolerance = 50.0) => {\n //return Densifier.densify(geom, distanceTolerance);\n // return new DensifyTransformer(this._distanceTolerance).transform(this._inputGeom)\n return new DensifyTransformer(distanceTolerance).transform(geom);\n};\n\n// need to smooth each area etc in a multipolygon\nexport const smooth = (geometry) => {\n const polygons = [];\n for (let i = 0; i < geometry.getNumGeometries(); i++) {\n let smoothed = smoothPoly(geometry.getGeometryN(i));\n smoothed = expandGeometry(smoothed, 0.0);\n polygons.push(smoothed);\n }\n return new GeometryFactory().createMultiPolygon(polygons);\n};\n\nexport const smoothPoly = (poly) => {\n const oldCoords = poly.getCoordinates();\n const newCoords = [];\n newCoords.push(oldCoords[0]);\n for (let i = 0; i < oldCoords.length - 1; i++) {\n const c0 = oldCoords[i];\n const c1 = oldCoords[i + 1];\n const q = new Coordinate(\n 0.75 * c0.x + 0.25 * c1.x,\n 0.75 * c0.y + 0.25 * c1.y\n );\n const r = new Coordinate(\n 0.25 * c0.x + 0.75 * c1.x,\n 0.25 * c0.y + 0.75 * c1.y\n );\n newCoords.push(q);\n newCoords.push(r);\n }\n newCoords.push(oldCoords[oldCoords.length - 1]);\n return new GeometryFactory().createPolygon(newCoords);\n};\n\n/**\n * Split the wall if it's drawn over an existing door.\n *\n * @returns [[x1, y1, x2, y2], ...]\n */\nexport const maybeSplitWall = (x1, y1, x2, y2, doors) => {\n // TODO: this logic doesn't handle two doors side by side\n const wallPoly = twoPointsToLineString(x1, y1, x2, y2);\n for (const door of doors) {\n const doorPoly = twoPointsToLineString(door[0], door[1], door[2], door[3]);\n const overlap = contains(wallPoly, doorPoly);\n if (overlap) {\n // make sure points are consistently ordered\n const w1 = lesserPoint(x1, y1, x2, y2);\n const w2 = greaterPoint(x1, y1, x2, y2);\n const d1 = lesserPoint(door[0], door[1], door[2], door[3]);\n const d2 = greaterPoint(door[0], door[1], door[2], door[3]);\n return [\n [w1[0], w1[1], d1[0], d1[1]],\n [d2[0], d2[1], w2[0], w2[1]],\n ];\n }\n }\n // wall didn't contain any door, so return as-is\n return [[x1, y1, x2, y2]];\n};\n","import * as constants from \"./constants.js\";\nimport { Settings } from \"./settings.js\";\nimport * as geo from \"./geo-utils.js\";\n\nexport const makeWalls = async (state) => {\n if (!game.user.isGM) {\n // need GM privs to delete/create walls\n return;\n }\n\n // calculate a new set of walls\n let walls = [];\n if (state.geometry) {\n // simplify our geometry to downsample the amount of walls created\n const simplified = geo.simplify(state.geometry, 10.0);\n const wallBreaks = state.doors.concat(\n state.secretDoors,\n state.invisibleWalls\n );\n walls = makeWallsFromMulti(state.config, simplified, wallBreaks);\n }\n\n const interiorWalls = makeInteriorWalls(state.config, state.interiorWalls);\n const invisibleWalls = makeInvisibleWalls(state.config, state.invisibleWalls);\n const doors = makeDoors(state.config, state.doors);\n const secretDoors = makeSecretDoors(state.config, state.secretDoors);\n const allWalls = walls.concat(\n interiorWalls,\n invisibleWalls,\n doors,\n secretDoors\n );\n\n // figure out what walls need to be created, deleted, or left in place\n const wallDocs = dungeonDrawWallDocuments();\n const wallDocsStillNeeded = [];\n const wallsToCreate = [];\n for (const wall of allWalls) {\n let foundDoc = false;\n for (const wallDoc of wallDocs) {\n if (wallDataEqual(wall, wallDoc)) {\n wallDocsStillNeeded.push(wallDoc);\n foundDoc = true;\n break;\n }\n }\n if (!foundDoc) {\n wallsToCreate.push(wall);\n }\n }\n const idsStillNeeded = wallDocsStillNeeded.map((x) => x.id);\n const idsToDelete = wallDocs\n .filter((x) => !idsStillNeeded.includes(x.id))\n .map((x) => x.id);\n\n // create our new walls before deleting old ones,\n // to prevent any unwanted vision reveals.\n //\n // scene.update() triggers a redraw, which causes an infinite loop of redraw/refresh.\n // so we avoid using it :P\n if (wallsToCreate.length) {\n await canvas.scene.createEmbeddedDocuments(\"Wall\", wallsToCreate);\n }\n // finally, delete the previous set of walls\n if (idsToDelete.length) {\n try {\n await canvas.scene.deleteEmbeddedDocuments(\"Wall\", idsToDelete);\n } catch (error) {\n console.error(error);\n }\n }\n};\n\nconst wallDataEqual = (w1, w2) => {\n return (\n w1.c.length == w2.c.length &&\n w1.c[0] == w2.c[0] &&\n w1.c[1] == w2.c[1] &&\n w1.c[2] == w2.c[2] &&\n w1.c[3] == w2.c[3] &&\n w1.door == w2.door &&\n JSON.stringify(w1.flags) == JSON.stringify(w2.flags)\n );\n};\n\nconst dungeonDrawWallDocuments = () => {\n const walls = canvas.scene.getEmbeddedCollection(\"Wall\");\n const ddWalls = [];\n for (const wall of walls) {\n const flag = wall.getFlag(constants.MODULE_NAME, \"dungeonVersion\");\n if (flag) {\n ddWalls.push(wall);\n }\n }\n return ddWalls;\n};\n\nconst makeWallsFromMulti = (config, multi, doors) => {\n let walls = [];\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n walls = walls.concat(makeWallsFromPoly(config, poly, doors));\n }\n return walls;\n};\n\nconst makeWallsFromPoly = (config, poly, doors) => {\n const allWalls = [];\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n for (let i = 0; i < coords.length - 1; i++) {\n const x1 = coords[i].x;\n const y1 = coords[i].y;\n const x2 = coords[i + 1].x;\n const y2 = coords[i + 1].y;\n const splits = geo.maybeSplitWall(x1, y1, x2, y2, doors);\n for (const split of splits) {\n const data = wallData(config, split[0], split[1], split[2], split[3]);\n allWalls.push(data);\n }\n }\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n for (let i = 0; i < coords.length - 1; i++) {\n const data = wallData(\n config,\n coords[i].x,\n coords[i].y,\n coords[i + 1].x,\n coords[i + 1].y\n );\n allWalls.push(data);\n }\n }\n return allWalls;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeInteriorWalls = (config, walls) => {\n const allWalls = [];\n for (const wall of walls) {\n const data = wallData(config, wall[0], wall[1], wall[2], wall[3]);\n allWalls.push(data);\n }\n return allWalls;\n};\n\nconst makeInvisibleWalls = (config, walls) => {\n const allWalls = [];\n for (const wall of walls) {\n const data = invisibleWallData(config, wall[0], wall[1], wall[2], wall[3]);\n allWalls.push(data);\n }\n return allWalls;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeDoors = (config, doors) => {\n const allDoors = [];\n for (const door of doors) {\n const data = doorData(config, door[0], door[1], door[2], door[3]);\n allDoors.push(data);\n }\n return allDoors;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeSecretDoors = (config, doors) => {\n const allDoors = [];\n for (const door of doors) {\n const data = secretDoorData(config, door[0], door[1], door[2], door[3]);\n allDoors.push(data);\n }\n return allDoors;\n};\n\nconst wallData = (config, x1, y1, x2, y2) => {\n const data = {\n // From Foundry API docs:\n // \"The wall coordinates, a length-4 array of finite numbers [x0,y0,x1,y1]\"\n c: [x1, y1, x2, y2],\n door: 0, // wall\n flags: {},\n };\n data.flags[constants.MODULE_NAME] = {};\n data.flags[constants.MODULE_NAME][constants.FLAG_DUNGEON_VERSION] =\n constants.DUNGEON_VERSION;\n // Maybe set Canvas3D flags\n if (Settings.threeDCanvasEnabled()) {\n data.flags[\"levels-3d-preview\"] = {\n joinWall: true,\n wallDepth: config.wallThickness,\n wallSidesTexture: config.threeDWallSidesTexture,\n wallSidesTint: config.threeDWallSidesTextureTint,\n wallTexture: config.threeDWallTexture,\n wallTint: config.threeDWallTextureTint,\n };\n }\n return data;\n};\n\nconst doorData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 1; // door\n // Maybe set Canvas3D flags\n if (Settings.threeDCanvasEnabled()) {\n data.flags[\"levels-3d-preview\"][\"joinWall\"] = false;\n data.flags[\"levels-3d-preview\"][\"wallTexture\"] = config.threeDDoorTexture;\n data.flags[\"levels-3d-preview\"][\"wallTint\"] = config.threeDDoorTextureTint;\n }\n return data;\n};\n\nconst secretDoorData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 2; // secret\n return data;\n};\n\nconst invisibleWallData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 0; // secret\n data.light = 0;\n data.sight = 0;\n return data;\n};\n","import { FLAG_DUNGEON_STATE, MODULE_NAME } from \"./constants.js\";\nimport { makeWalls } from \"./wallmaker.js\";\nimport * as geo from \"./geo-utils.js\";\nimport { defaultConfig } from \"./themes.js\";\n\nexport class DungeonState {\n static FLAG_KEY = \"dungeonState\";\n\n constructor(\n geometry,\n themeAreas,\n doors,\n secretDoors,\n interiorWalls,\n invisibleWalls,\n config\n ) {\n this.geometry = geometry;\n this.themeAreas = themeAreas;\n this.doors = doors;\n this.secretDoors = secretDoors;\n this.interiorWalls = interiorWalls;\n this.invisibleWalls = invisibleWalls;\n this.config = config;\n }\n\n static startState() {\n return new DungeonState(null, [], [], [], [], [], defaultConfig());\n }\n\n clone() {\n return new DungeonState(\n this.geometry ? this.geometry.copy() : null,\n JSON.parse(JSON.stringify(this.themeAreas)),\n JSON.parse(JSON.stringify(this.doors)),\n this.secretDoors ? [...this.secretDoors] : [],\n this.interiorWalls ? [...this.interiorWalls] : [],\n this.invisibleWalls ? [...this.invisibleWalls] : [],\n JSON.parse(JSON.stringify(this.config))\n );\n }\n\n /* -------------------------------------------- */\n\n toString() {\n return JSON.stringify({\n // serialize the geometry object as a WKT string\n wkt: geo.geometryToWkt(this.geometry),\n themeAreas: this.themeAreas,\n doors: this.doors,\n secretDoors: this.secretDoors,\n interiorWalls: this.interiorWalls,\n invisibleWalls: this.invisibleWalls,\n config: this.config,\n });\n }\n\n // TODO: implement as fromJSON?\n static fromString(s) {\n if (!s) {\n return DungeonState.startState();\n }\n const obj = JSON.parse(s);\n const geometry = geo.wktToGeometry(obj.wkt);\n const themeAreas = obj.themeAreas ? obj.themeAreas : [];\n const doors = obj.doors ? obj.doors : [];\n const secretDoors = obj.secretDoors ? obj.secretDoors : [];\n const interiorWalls = obj.interiorWalls ? obj.interiorWalls : [];\n const invisibleWalls = obj.invisibleWalls ? obj.invisibleWalls : [];\n // fill in any new defaults\n const config = foundry.utils.mergeObject(defaultConfig(), obj.config);\n return new DungeonState(\n geometry,\n themeAreas,\n doors,\n secretDoors,\n interiorWalls,\n invisibleWalls,\n config\n );\n }\n\n /* -------------------------------------------- */\n\n async saveToJournalEntry(journalEntry) {\n const serialized = this.toString();\n // update walls before we update the journal\n await makeWalls(this);\n await journalEntry.setFlag(MODULE_NAME, FLAG_DUNGEON_STATE, serialized);\n }\n\n static async loadFromJournalEntry(journalEntry) {\n await this.maybeMigrateJournalEntry(journalEntry);\n const content = journalEntry.getFlag(MODULE_NAME, FLAG_DUNGEON_STATE);\n return DungeonState.fromString(content);\n }\n\n static async maybeMigrateJournalEntry(journalEntry) {\n if (!game.user.isGM) {\n return;\n }\n if (journalEntry.pages) {\n // v10\n const page = journalEntry.pages.find((p) => p.type === \"text\");\n if (page?.text?.content) {\n console.log(\"Migrating v10 page.text.content\");\n const dungeonState = DungeonState.fromString(page.text.content);\n await dungeonState.saveToJournalEntry(journalEntry);\n await page.delete();\n }\n } else if (journalEntry.data.content) {\n // v9\n console.log(\"Migrating v9 journalEntry.data.content\");\n const dungeonState = DungeonState.fromString(journalEntry.data.content);\n await dungeonState.saveToJournalEntry(journalEntry);\n await journalEntry.update({ content: null });\n }\n }\n}\n","/*!\n * pixi-filters - v4.1.5\n * Compiled Wed, 29 Sep 2021 14:05:57 UTC\n *\n * pixi-filters is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nvar __filters=function(e,n,t,r,o,i,l,a){\"use strict\";var s=function(e,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)};function u(e,n){function t(){this.constructor=e}s(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var f=function(){return(f=Object.assign||function(e){for(var n,t=arguments,r=1,o=arguments.length;r 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\\n rgb.r *= red;\\n rgb.g *= green;\\n rgb.b *= blue;\\n c.rgb = rgb * brightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n gl_FragColor = c * alpha;\\n}\\n\")||this;return t.gamma=1,t.saturation=1,t.contrast=1,t.brightness=1,t.red=1,t.green=1,t.blue=1,t.alpha=1,Object.assign(t,n),t}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,n,t,r)},n}(n.Filter),p=function(e){function n(n){void 0===n&&(n=.5);var t=e.call(this,c,\"\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform float threshold;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccuracy , but good enought for this feature.\\n float _max = max(max(color.r, color.g), color.b);\\n float _min = min(min(color.r, color.g), color.b);\\n float brightness = (_max + _min) * 0.5;\\n\\n if(brightness > threshold) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\\n }\\n}\\n\")||this;return t.threshold=n,t}return u(n,e),Object.defineProperty(n.prototype,\"threshold\",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),n}(n.Filter),d=function(e){function n(n,r,o){void 0===n&&(n=4),void 0===r&&(r=3),void 0===o&&(o=!1);var i=e.call(this,c,o?\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\nuniform vec4 filterClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\\n\":\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\")||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new t.Point,i.pixelSize=1,i._clamp=o,Array.isArray(n)?i.kernels=n:(i._blur=n,i.quality=r),i}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i=this._pixelSize.x/n._frame.width,l=this._pixelSize.y/n._frame.height;if(1===this._quality||0===this._blur)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*l,e.applyFilter(this,n,t,r);else{for(var a=e.getFilterTexture(),s=n,u=a,f=void 0,c=this._quality-1,m=0;m0)for(var r=e,o=e/n,i=1;i0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"clamp\",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"pixelSize\",{get:function(){return this._pixelSize},set:function(e){\"number\"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof t.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"quality\",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blur\",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),n}(n.Filter),h=function(e){function n(t){var o=e.call(this,c,\"uniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D bloomTexture;\\nuniform float bloomScale;\\nuniform float brightness;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n color.rgb *= brightness;\\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\\n bloomColor.rgb *= bloomScale;\\n gl_FragColor = color + bloomColor;\\n}\\n\")||this;o.bloomScale=1,o.brightness=1,o._resolution=r.settings.FILTER_RESOLUTION,\"number\"==typeof t&&(t={threshold:t});var i=Object.assign(n.defaults,t);o.bloomScale=i.bloomScale,o.brightness=i.brightness;var l=i.kernels,a=i.blur,s=i.quality,u=i.pixelSize,f=i.resolution;return o._extractFilter=new p(i.threshold),o._extractFilter.resolution=f,o._blurFilter=l?new d(l):new d(a,s),o.pixelSize=u,o.resolution=f,o}return u(n,e),n.prototype.apply=function(e,n,t,r,o){var i=e.getFilterTexture();this._extractFilter.apply(e,n,i,1,o);var l=e.getFilterTexture();this._blurFilter.apply(e,i,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,n,t,r),e.returnFilterTexture(l),e.returnFilterTexture(i)},Object.defineProperty(n.prototype,\"resolution\",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"threshold\",{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"kernels\",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blur\",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"quality\",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"pixelSize\",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),n.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:r.settings.FILTER_RESOLUTION},n}(n.Filter),g=function(e){function n(n){void 0===n&&(n=8);var t=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform float pixelSize;\\nuniform sampler2D uSampler;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n return floor( coord / size ) * size;\\n}\\n\\nvec2 getMod(vec2 coord, vec2 size)\\n{\\n return mod( coord , size) / size;\\n}\\n\\nfloat character(float n, vec2 p)\\n{\\n p = floor(p*vec2(4.0, -4.0) + 2.5);\\n\\n if (clamp(p.x, 0.0, 4.0) == p.x)\\n {\\n if (clamp(p.y, 0.0, 4.0) == p.y)\\n {\\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\\n }\\n }\\n return 0.0;\\n}\\n\\nvoid main()\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n // get the rounded color..\\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n vec4 color = texture2D(uSampler, pixCoord);\\n\\n // determine the character to use\\n float gray = (color.r + color.g + color.b) / 3.0;\\n\\n float n = 65536.0; // .\\n if (gray > 0.2) n = 65600.0; // :\\n if (gray > 0.3) n = 332772.0; // *\\n if (gray > 0.4) n = 15255086.0; // o\\n if (gray > 0.5) n = 23385164.0; // &\\n if (gray > 0.6) n = 15252014.0; // 8\\n if (gray > 0.7) n = 13199452.0; // @\\n if (gray > 0.8) n = 11512810.0; // #\\n\\n // get the mod..\\n vec2 modd = getMod(coord, vec2(pixelSize));\\n\\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\\n\\n}\\n\")||this;return t.size=n,t}return u(n,e),Object.defineProperty(n.prototype,\"size\",{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),n}(n.Filter),v=function(e){function n(n){var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float transformX;\\nuniform float transformY;\\nuniform vec3 lightColor;\\nuniform float lightAlpha;\\nuniform vec3 shadowColor;\\nuniform float shadowAlpha;\\n\\nvoid main(void) {\\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float light = texture2D(uSampler, vTextureCoord - transform).a;\\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\\n\\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\\n gl_FragColor = vec4(color.rgb * color.a, color.a);\\n}\\n\")||this;return t._thickness=2,t._angle=0,t.uniforms.lightColor=new Float32Array(3),t.uniforms.shadowColor=new Float32Array(3),Object.assign(t,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},n),t.padding=1,t}return u(n,e),n.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(n.prototype,\"rotation\",{get:function(){return this._angle/t.DEG_TO_RAD},set:function(e){this._angle=e*t.DEG_TO_RAD,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"thickness\",{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lightColor\",{get:function(){return o.rgb2hex(this.uniforms.lightColor)},set:function(e){o.hex2rgb(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lightAlpha\",{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"shadowColor\",{get:function(){return o.rgb2hex(this.uniforms.shadowColor)},set:function(e){o.hex2rgb(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"shadowAlpha\",{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),n}(n.Filter),y=function(e){function n(n,o,s,u){void 0===n&&(n=2),void 0===o&&(o=4),void 0===s&&(s=r.settings.FILTER_RESOLUTION),void 0===u&&(u=5);var f,c,m=e.call(this)||this;return\"number\"==typeof n?(f=n,c=n):n instanceof t.Point?(f=n.x,c=n.y):Array.isArray(n)&&(f=n[0],c=n[1]),m.blurXFilter=new a.BlurFilterPass(!0,f,o,s,u),m.blurYFilter=new a.BlurFilterPass(!1,c,o,s,u),m.blurYFilter.blendMode=i.BLEND_MODES.SCREEN,m.defaultFilter=new l.AlphaFilter,m}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this.defaultFilter.apply(e,n,t,r),this.blurXFilter.apply(e,n,o,1),this.blurYFilter.apply(e,o,t,0),e.returnFilterTexture(o)},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blurX\",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blurY\",{get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),n}(n.Filter),b=function(e){function n(t){var r=e.call(this,c,\"uniform float radius;\\nuniform float strength;\\nuniform vec2 center;\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nvoid main()\\n{\\n vec2 coord = vTextureCoord * filterArea.xy;\\n coord -= center * dimensions.xy;\\n float distance = length(coord);\\n if (distance < radius) {\\n float percent = distance / radius;\\n if (strength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\\n }\\n }\\n coord += center * dimensions.xy;\\n coord /= filterArea.xy;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n gl_FragColor = color;\\n}\\n\")||this;return r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),n.defaults={center:[.5,.5],radius:100,strength:1},n}(n.Filter),x=function(e){function t(n,t,r){void 0===t&&(t=!1),void 0===r&&(r=1);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D colorMap;\\nuniform float _mix;\\nuniform float _size;\\nuniform float _sliceSize;\\nuniform float _slicePixelSize;\\nuniform float _sliceInnerSize;\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\\n\\n vec4 adjusted;\\n if (color.a > 0.0) {\\n color.rgb /= color.a;\\n float innerWidth = _size - 1.0;\\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\\n float s0 = xOffset + (zSlice0 * _sliceSize);\\n float s1 = xOffset + (zSlice1 * _sliceSize);\\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\\n float zOffset = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n\\n color.rgb *= color.a;\\n }\\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\\n\\n}\")||this;return o.mix=1,o._size=0,o._sliceSize=0,o._slicePixelSize=0,o._sliceInnerSize=0,o._nearest=!1,o._scaleMode=null,o._colorMap=null,o._scaleMode=null,o.nearest=t,o.mix=r,o.colorMap=n,o}return u(t,e),t.prototype.apply=function(e,n,t,r){this.uniforms._mix=this.mix,e.applyFilter(this,n,t,r)},Object.defineProperty(t.prototype,\"colorSize\",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"colorMap\",{get:function(){return this._colorMap},set:function(e){var t;e&&(e instanceof n.Texture||(e=n.Texture.from(e)),(null===(t=e)||void 0===t?void 0:t.baseTexture)&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=i.MIPMAP_MODES.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nearest\",{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?i.SCALE_MODES.NEAREST:i.SCALE_MODES.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=i.MIPMAP_MODES.OFF,n._updateID++,n.baseTexture.emit(\"update\",n.baseTexture))},enumerable:!1,configurable:!0}),t.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit(\"update\",e.baseTexture),this.colorMap=e)},t.prototype.destroy=function(n){void 0===n&&(n=!1),this._colorMap&&this._colorMap.destroy(n),e.prototype.destroy.call(this)},t}(n.Filter),_=function(e){function n(n,t){void 0===n&&(n=0),void 0===t&&(t=1);var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 color;\\nuniform float alpha;\\n\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a);\\n}\\n\")||this;return r._color=0,r._alpha=1,r.uniforms.color=new Float32Array(3),r.color=n,r.alpha=t,r}return u(n,e),Object.defineProperty(n.prototype,\"color\",{get:function(){return this._color},set:function(e){var n=this.uniforms.color;\"number\"==typeof e?(o.hex2rgb(e,n),this._color=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._color=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),n}(n.Filter),C=function(e){function n(n,t,r){void 0===n&&(n=16711680),void 0===t&&(t=0),void 0===r&&(r=.4);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 originalColor;\\nuniform vec3 newColor;\\nuniform float epsilon;\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\\n float colorDistance = length(colorDiff);\\n float doReplace = step(colorDistance, epsilon);\\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\\n}\\n\")||this;return o._originalColor=16711680,o._newColor=0,o.uniforms.originalColor=new Float32Array(3),o.uniforms.newColor=new Float32Array(3),o.originalColor=n,o.newColor=t,o.epsilon=r,o}return u(n,e),Object.defineProperty(n.prototype,\"originalColor\",{get:function(){return this._originalColor},set:function(e){var n=this.uniforms.originalColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._originalColor=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._originalColor=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"newColor\",{get:function(){return this._newColor},set:function(e){var n=this.uniforms.newColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._newColor=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._newColor=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"epsilon\",{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),n}(n.Filter),S=function(e){function n(n,t,r){void 0===t&&(t=200),void 0===r&&(r=200);var o=e.call(this,c,\"precision mediump float;\\n\\nvarying mediump vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec2 texelSize;\\nuniform float matrix[9];\\n\\nvoid main(void)\\n{\\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\\n\\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\\n\\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\\n\\n gl_FragColor =\\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\\n\\n gl_FragColor.a = c22.a;\\n}\\n\")||this;return o.uniforms.texelSize=new Float32Array(2),o.uniforms.matrix=new Float32Array(9),void 0!==n&&(o.matrix=n),o.width=t,o.height=r,o}return u(n,e),Object.defineProperty(n.prototype,\"matrix\",{get:function(){return this.uniforms.matrix},set:function(e){var n=this;e.forEach((function(e,t){n.uniforms.matrix[t]=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"width\",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"height\",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),n}(n.Filter),F=function(e){function n(){return e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\n\\nvoid main(void)\\n{\\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\\n\\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\\n\\n if (lum < 1.00)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.75)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.50)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.3)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n}\\n\")||this}return u(n,e),n}(n.Filter),z=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nconst float SQRT_2 = 1.414213;\\n\\nconst float light = 1.0;\\n\\nuniform float curvature;\\nuniform float lineWidth;\\nuniform float lineContrast;\\nuniform bool verticalLine;\\nuniform float noise;\\nuniform float noiseSize;\\n\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\n\\nuniform float seed;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 dir = vec2(vTextureCoord.xy - vec2(0.5, 0.5)) * filterArea.xy / dimensions;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 rgb = gl_FragColor.rgb;\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n rgb += _noise * noise;\\n }\\n\\n if (lineWidth > 0.0)\\n {\\n float _c = curvature > 0. ? curvature : 1.;\\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\\n vec2 uv = dir * k;\\n\\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\\n rgb *= j;\\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\\n rgb *= 0.99 + ceil(segment) * 0.015;\\n }\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n gl_FragColor.rgb = rgb;\\n}\\n\")||this;return r.time=0,r.seed=0,r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"curvature\",{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lineWidth\",{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lineContrast\",{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"verticalLine\",{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noise\",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noiseSize\",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignetting\",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingAlpha\",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingBlur\",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),n.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},n}(n.Filter),O=function(e){function n(n,t){void 0===n&&(n=1),void 0===t&&(t=5);var r=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform vec4 filterArea;\\nuniform sampler2D uSampler;\\n\\nuniform float angle;\\nuniform float scale;\\n\\nfloat pattern()\\n{\\n float s = sin(angle), c = cos(angle);\\n vec2 tex = vTextureCoord * filterArea.xy;\\n vec2 point = vec2(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * scale;\\n return (sin(point.x) * sin(point.y)) * 4.0;\\n}\\n\\nvoid main()\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float average = (color.r + color.g + color.b) / 3.0;\\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\\n}\\n\")||this;return r.scale=n,r.angle=t,r}return u(n,e),Object.defineProperty(n.prototype,\"scale\",{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"angle\",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),n}(n.Filter),P=function(e){function i(o){var l=e.call(this)||this;l.angle=45,l._distance=5,l._resolution=r.settings.FILTER_RESOLUTION;var a=o?f(f({},i.defaults),o):i.defaults,s=a.kernels,u=a.blur,m=a.quality,p=a.pixelSize,h=a.resolution;l._tintFilter=new n.Filter(c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform float alpha;\\nuniform vec3 color;\\n\\nuniform vec2 shift;\\nuniform vec4 inputSize;\\n\\nvoid main(void){\\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\\n\\n // Premultiply alpha\\n sample.rgb = color.rgb * sample.a;\\n\\n // alpha user alpha\\n sample *= alpha;\\n\\n gl_FragColor = sample;\\n}\"),l._tintFilter.uniforms.color=new Float32Array(4),l._tintFilter.uniforms.shift=new t.Point,l._tintFilter.resolution=h,l._blurFilter=s?new d(s):new d(u,m),l.pixelSize=p,l.resolution=h;var g=a.shadowOnly,v=a.rotation,y=a.distance,b=a.alpha,x=a.color;return l.shadowOnly=g,l.rotation=v,l.distance=y,l.alpha=b,l.color=x,l._updatePadding(),l}return u(i,e),i.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this._tintFilter.apply(e,n,o,1),this._blurFilter.apply(e,o,t,r),!0!==this.shadowOnly&&e.applyFilter(this,n,t,0),e.returnFilterTexture(o)},i.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},i.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(i.prototype,\"resolution\",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"distance\",{get:function(){return this._distance},set:function(e){this._distance=e,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"rotation\",{get:function(){return this.angle/t.DEG_TO_RAD},set:function(e){this.angle=e*t.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"alpha\",{get:function(){return this._tintFilter.uniforms.alpha},set:function(e){this._tintFilter.uniforms.alpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"color\",{get:function(){return o.rgb2hex(this._tintFilter.uniforms.color)},set:function(e){o.hex2rgb(e,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"kernels\",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"blur\",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"quality\",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"pixelSize\",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),i.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:r.settings.FILTER_RESOLUTION},i}(n.Filter),A=function(e){function n(n){void 0===n&&(n=5);var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float strength;\\nuniform vec4 filterArea;\\n\\n\\nvoid main(void)\\n{\\n\\tvec2 onePixel = vec2(1.0 / filterArea);\\n\\n\\tvec4 color;\\n\\n\\tcolor.rgb = vec3(0.5);\\n\\n\\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\\n\\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\\n\\n\\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\\n\\n\\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\\n\\n\\tgl_FragColor = vec4(color.rgb * alpha, alpha);\\n}\\n\")||this;return t.strength=n,t}return u(n,e),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),n}(n.Filter),T=function(e){function r(t){var o=e.call(this,c,\"// precision highp float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\nuniform float aspect;\\n\\nuniform sampler2D displacementMap;\\nuniform float offset;\\nuniform float sinDir;\\nuniform float cosDir;\\nuniform int fillMode;\\n\\nuniform float seed;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nconst int TRANSPARENT = 0;\\nconst int ORIGINAL = 1;\\nconst int LOOP = 2;\\nconst int CLAMP = 3;\\nconst int MIRROR = 4;\\n\\nvoid main(void)\\n{\\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n return;\\n }\\n\\n float cx = coord.x - 0.5;\\n float cy = (coord.y - 0.5) * aspect;\\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\\n\\n // displacementMap: repeat\\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\\n\\n // displacementMap: mirror\\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\\n\\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\\n\\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\\n\\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n } else {\\n if( coord.x > filterClamp.z ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x -= filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = filterClamp.z * 2.0 - coord.x;\\n }\\n } else if( coord.x < filterClamp.x ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x += filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x *= -filterClamp.z;\\n }\\n }\\n\\n if( coord.y > filterClamp.w ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y -= filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = filterClamp.w * 2.0 - coord.y;\\n }\\n } else if( coord.y < filterClamp.y ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y += filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y *= -filterClamp.w;\\n }\\n }\\n }\\n\\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, coord).a;\\n}\\n\")||this;return o.offset=100,o.fillMode=r.TRANSPARENT,o.average=!1,o.seed=0,o.minSize=8,o.sampleSize=512,o._slices=0,o._offsets=new Float32Array(1),o._sizes=new Float32Array(1),o._direction=-1,o.uniforms.dimensions=new Float32Array(2),o._canvas=document.createElement(\"canvas\"),o._canvas.width=4,o._canvas.height=o.sampleSize,o.texture=n.Texture.from(o._canvas,{scaleMode:i.SCALE_MODES.NEAREST}),Object.assign(o,r.defaults,t),o}return u(r,e),r.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,this.uniforms.aspect=l/i,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,n,t,r)},r.prototype._randomizeSizes=function(){var e=this._sizes,n=this._slices-1,t=this.sampleSize,r=Math.min(this.minSize/t,.9/this._slices);if(this.average){for(var o=this._slices,i=1,l=0;l0;n--){var t=Math.random()*n>>0,r=e[n];e[n]=e[t],e[t]=r}},r.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,s=e<0?-e:0;r.fillStyle=\"rgba(\"+a+\", \"+s+\", 0, 1)\",r.fillRect(0,o>>0,n,l+1>>0),o+=l}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(r.prototype,\"sizes\",{get:function(){return this._sizes},set:function(e){for(var n=Math.min(this._slices,e.length),t=0;t>0)},Object.defineProperty(n.prototype,\"offset\",{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),n}(n.Filter),M=function(e){function n(n,t,r){void 0===t&&(t=.05),void 0===r&&(r=n.length);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float epsilon;\\n\\nconst int MAX_COLORS = %maxColors%;\\n\\nuniform vec3 originalColors[MAX_COLORS];\\nuniform vec3 targetColors[MAX_COLORS];\\n\\nvoid main(void)\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n\\n float alpha = gl_FragColor.a;\\n if (alpha < 0.0001)\\n {\\n return;\\n }\\n\\n vec3 color = gl_FragColor.rgb / alpha;\\n\\n for(int i = 0; i < MAX_COLORS; i++)\\n {\\n vec3 origColor = originalColors[i];\\n if (origColor.r < 0.0)\\n {\\n break;\\n }\\n vec3 colorDiff = origColor - color;\\n if (length(colorDiff) < epsilon)\\n {\\n vec3 targetColor = targetColors[i];\\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\\n return;\\n }\\n }\\n}\\n\".replace(/%maxColors%/g,r.toFixed(0)))||this;return o._replacements=[],o._maxColors=0,o.epsilon=t,o._maxColors=r,o.uniforms.originalColors=new Float32Array(3*r),o.uniforms.targetColors=new Float32Array(3*r),o.replacements=n,o}return u(n,e),Object.defineProperty(n.prototype,\"replacements\",{get:function(){return this._replacements},set:function(e){var n=this.uniforms.originalColors,t=this.uniforms.targetColors,r=e.length;if(r>this._maxColors)throw new Error(\"Length of replacements (\"+r+\") exceeds the maximum colors length (\"+this._maxColors+\")\");n[3*r]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\\n}\\n\\n\\nvoid main()\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 color = gl_FragColor.rgb;\\n\\n if (sepia > 0.0)\\n {\\n float gray = (color.x + color.y + color.z) / 3.0;\\n vec3 grayscale = vec3(gray);\\n\\n color = Overlay(SEPIA_RGB, grayscale);\\n\\n color = grayscale + sepia * (color - grayscale);\\n }\\n\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\\n dir.y *= dimensions.y / dimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n if (scratchDensity > seed && scratch != 0.0)\\n {\\n float phase = seed * 256.0;\\n float s = mod(floor(phase), 2.0);\\n float dist = 1.0 / scratchDensity;\\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\\n if (d < seed * 0.6 + 0.4)\\n {\\n highp float period = scratchDensity * 10.0;\\n\\n float xx = coord.x * period + phase;\\n float aa = abs(mod(xx, 0.5) * 4.0);\\n float bb = mod(floor(xx / 0.5), 2.0);\\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n float kk = 2.0 * period;\\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\\n float dh = dw * kk;\\n\\n float tine = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n float _sign = sign(scratch);\\n\\n tine = s * tine / period + scratch + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color.rgb *= tine;\\n }\\n }\\n }\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\\n // float _noise = snoise(d) * 0.5;\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n color += _noise * noise;\\n }\\n\\n gl_FragColor.rgb = color;\\n}\\n\")||this;return o.seed=0,o.uniforms.dimensions=new Float32Array(2),\"number\"==typeof t?(o.seed=t,t=void 0):o.seed=r,Object.assign(o,n.defaults,t),o}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,this.uniforms.seed=this.seed,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"sepia\",{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noise\",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noiseSize\",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratch\",{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratchDensity\",{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratchWidth\",{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignetting\",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingAlpha\",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingBlur\",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),n.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},n}(n.Filter),E=function(e){function n(t,r,o){void 0===t&&(t=1),void 0===r&&(r=0),void 0===o&&(o=.1);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 thickness;\\nuniform vec4 outlineColor;\\nuniform vec4 filterClamp;\\n\\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\\n\\nvoid main(void) {\\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\\n vec4 curColor;\\n float maxAlpha = 0.;\\n vec2 displaced;\\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\\n maxAlpha = max(maxAlpha, curColor.a);\\n }\\n float resultAlpha = max(maxAlpha, ownColor.a);\\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\\n}\\n\".replace(/\\$\\{angleStep\\}/,n.getAngleStep(o)))||this;return i._thickness=1,i.uniforms.thickness=new Float32Array([0,0]),i.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(i,{thickness:t,color:r,quality:o}),i}return u(n,e),n.getAngleStep=function(e){var t=Math.max(e*n.MAX_SAMPLES,n.MIN_SAMPLES);return(2*Math.PI/t).toFixed(7)},n.prototype.apply=function(e,n,t,r){this.uniforms.thickness[0]=this._thickness/n._frame.width,this.uniforms.thickness[1]=this._thickness/n._frame.height,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"color\",{get:function(){return o.rgb2hex(this.uniforms.outlineColor)},set:function(e){o.hex2rgb(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"thickness\",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),n.MIN_SAMPLES=1,n.MAX_SAMPLES=100,n}(n.Filter),I=function(e){function n(n){void 0===n&&(n=10);var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform vec2 size;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n\\treturn floor( coord / size ) * size;\\n}\\n\\nvoid main(void)\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = pixelate(coord, size);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord);\\n}\\n\")||this;return t.size=n,t}return u(n,e),Object.defineProperty(n.prototype,\"size\",{get:function(){return this.uniforms.size},set:function(e){\"number\"==typeof e&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),n}(n.Filter),k=function(e){function n(n,t,r,o){void 0===n&&(n=0),void 0===t&&(t=[0,0]),void 0===r&&(r=5),void 0===o&&(o=-1);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float uRadian;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform int uKernelSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n float aspect = filterArea.y / filterArea.x;\\n vec2 center = uCenter.xy / filterArea.xy;\\n float gradient = uRadius / filterArea.x * 0.3;\\n float radius = uRadius / filterArea.x - gradient * 0.5;\\n int k = uKernelSize - 1;\\n\\n vec2 coord = vTextureCoord;\\n vec2 dir = vec2(center - coord);\\n float dist = length(vec2(dir.x, dir.y * aspect));\\n\\n float radianStep = uRadian;\\n if (radius >= 0.0 && dist > radius) {\\n float delta = dist - radius;\\n float gap = gradient;\\n float scale = 1.0 - abs(delta / gap);\\n if (scale <= 0.0) {\\n gl_FragColor = color;\\n return;\\n }\\n radianStep *= scale;\\n }\\n radianStep /= float(k);\\n\\n float s = sin(radianStep);\\n float c = cos(radianStep);\\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n\\n vec4 sample = texture2D(uSampler, coord);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample;\\n }\\n\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\")||this;return i._angle=0,i.angle=n,i.center=t,i.kernelSize=r,i.radius=o,i}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"angle\",{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),n}(n.Filter),L=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nuniform bool mirror;\\nuniform float boundary;\\nuniform vec2 amplitude;\\nuniform vec2 waveLength;\\nuniform vec2 alpha;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n if (coord.y < boundary) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\\n float areaY = boundary * dimensions.y / filterArea.y;\\n float v = areaY + areaY - vTextureCoord.y;\\n float y = mirror ? v : vTextureCoord.y;\\n\\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\\n\\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\\n x = clamp(x, filterClamp.x, filterClamp.z);\\n\\n vec4 color = texture2D(uSampler, vec2(x, y));\\n\\n gl_FragColor = color * _alpha;\\n}\\n\")||this;return r.time=0,r.uniforms.amplitude=new Float32Array(2),r.uniforms.waveLength=new Float32Array(2),r.uniforms.alpha=new Float32Array(2),r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"mirror\",{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"boundary\",{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"amplitude\",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"waveLength\",{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),n.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},n}(n.Filter),N=function(e){function n(n,t,r){void 0===n&&(n=[-10,0]),void 0===t&&(t=[0,10]),void 0===r&&(r=[0,0]);var o=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nvoid main(void)\\n{\\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\\n}\\n\")||this;return o.red=n,o.green=t,o.blue=r,o}return u(n,e),Object.defineProperty(n.prototype,\"red\",{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"green\",{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blue\",{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),n}(n.Filter),X=function(e){function n(t,r,o){void 0===t&&(t=[0,0]),void 0===o&&(o=0);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\n\\nuniform vec2 center;\\n\\nuniform float amplitude;\\nuniform float wavelength;\\n// uniform float power;\\nuniform float brightness;\\nuniform float speed;\\nuniform float radius;\\n\\nuniform float time;\\n\\nconst float PI = 3.14159;\\n\\nvoid main()\\n{\\n float halfWavelength = wavelength * 0.5 / filterArea.x;\\n float maxRadius = radius / filterArea.x;\\n float currentRadius = time * speed / filterArea.x;\\n\\n float fade = 1.0;\\n\\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n\\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\\n dir.y *= filterArea.y / filterArea.x;\\n float dist = length(dir);\\n\\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n vec2 diffUV = normalize(dir);\\n\\n float diff = (dist - currentRadius) / halfWavelength;\\n\\n float p = 1.0 - pow(abs(diff), 2.0);\\n\\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\\n\\n vec2 offset = diffUV * powDiff / filterArea.xy;\\n\\n // Do clamp :\\n vec2 coord = vTextureCoord + offset;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n // No clamp :\\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\\n\\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\\n\\n gl_FragColor = color;\\n}\\n\")||this;return i.center=t,Object.assign(i,n.defaults,r),i.time=o,i}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"amplitude\",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"wavelength\",{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"brightness\",{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"speed\",{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),n.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},n}(n.Filter),B=function(e){function n(n,t,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D uLightmap;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\nuniform vec4 ambientColor;\\nvoid main() {\\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\\n vec4 light = texture2D(uLightmap, lightCoord);\\n vec3 ambient = ambientColor.rgb * ambientColor.a;\\n vec3 intensity = ambient + light.rgb;\\n vec3 finalColor = diffuseColor.rgb * intensity;\\n gl_FragColor = vec4(finalColor, diffuseColor.a);\\n}\\n\")||this;return o._color=0,o.uniforms.dimensions=new Float32Array(2),o.uniforms.ambientColor=new Float32Array([0,0,0,r]),o.texture=n,o.color=t,o}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"texture\",{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"color\",{get:function(){return this._color},set:function(e){var n=this.uniforms.ambientColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._color=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],this._color=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),n}(n.Filter),G=function(e){function n(n,r,o,i){void 0===n&&(n=100),void 0===r&&(r=600);var l=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float blur;\\nuniform float gradientBlur;\\nuniform vec2 start;\\nuniform vec2 end;\\nuniform vec2 delta;\\nuniform vec2 texSize;\\n\\nfloat random(vec3 scale, float seed)\\n{\\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\\n}\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n float total = 0.0;\\n\\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\\n\\n for (float t = -30.0; t <= 30.0; t++)\\n {\\n float percent = (t + offset - 0.5) / 30.0;\\n float weight = 1.0 - abs(percent);\\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\\n sample.rgb *= sample.a;\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\")||this;return l.uniforms.blur=n,l.uniforms.gradientBlur=r,l.uniforms.start=o||new t.Point(0,window.innerHeight/2),l.uniforms.end=i||new t.Point(600,window.innerHeight/2),l.uniforms.delta=new t.Point(30,30),l.uniforms.texSize=new t.Point(window.innerWidth,window.innerHeight),l.updateDelta(),l}return u(n,e),n.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"gradientBlur\",{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"start\",{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"end\",{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),n}(n.Filter),K=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return u(n,e),n.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,t=Math.sqrt(e*e+n*n);this.uniforms.delta.x=e/t,this.uniforms.delta.y=n/t},n}(G),q=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return u(n,e),n.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,t=Math.sqrt(e*e+n*n);this.uniforms.delta.x=-n/t,this.uniforms.delta.y=e/t},n}(G),W=function(e){function n(n,t,r,o){void 0===n&&(n=100),void 0===t&&(t=600);var i=e.call(this)||this;return i.tiltShiftXFilter=new K(n,t,r,o),i.tiltShiftYFilter=new q(n,t,r,o),i}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this.tiltShiftXFilter.apply(e,n,o,1),this.tiltShiftYFilter.apply(e,o,t,r),e.returnFilterTexture(o)},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"gradientBlur\",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"start\",{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"end\",{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),n}(n.Filter),Y=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float radius;\\nuniform float angle;\\nuniform vec2 offset;\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 twist(vec2 coord)\\n{\\n coord -= offset;\\n\\n float dist = length(coord);\\n\\n if (dist < radius)\\n {\\n float ratioDist = (radius - dist) / radius;\\n float angleMod = ratioDist * ratioDist * angle;\\n float s = sin(angleMod);\\n float c = cos(angleMod);\\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\\n }\\n\\n coord += offset;\\n\\n return coord;\\n}\\n\\nvoid main(void)\\n{\\n\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = twist(coord);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord );\\n\\n}\\n\")||this;return Object.assign(r,n.defaults,t),r}return u(n,e),Object.defineProperty(n.prototype,\"offset\",{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"angle\",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),n.defaults={radius:200,angle:4,padding:20,offset:new t.Point},n}(n.Filter),Z=function(e){function n(t){var r,o=Object.assign(n.defaults,t),i=o.maxKernelSize,l=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o= 0.0 && dist > radius) { // radius < 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n if (delta > 0.0) {\\n float normalCount = gap / filterArea.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n if (countLimit < 1.0)\\n {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n float offset = rand(vTextureCoord, 0.0);\\n\\n float total = 0.0;\\n vec4 color = vec4(0.0);\\n\\n dir *= strength;\\n\\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\\n float percent = (t + offset) / MAX_KERNEL_SIZE;\\n float weight = 4.0 * (percent - percent * percent);\\n vec2 p = vTextureCoord + dir * percent;\\n vec4 sample = texture2D(uSampler, p);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample * weight;\\n total += weight;\\n\\n if (t > countLimit){\\n break;\\n }\\n }\\n\\n color /= total;\\n // switch back from pre-multiplied alpha\\n // color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\".replace(\"${maxKernelSize}\",i.toFixed(1)))||this,Object.assign(r,l),r}return u(n,e),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"innerRadius\",{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),n.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},n}(n.Filter);return e.AdjustmentFilter=m,e.AdvancedBloomFilter=h,e.AsciiFilter=g,e.BevelFilter=v,e.BloomFilter=y,e.BulgePinchFilter=b,e.CRTFilter=z,e.ColorMapFilter=x,e.ColorOverlayFilter=_,e.ColorReplaceFilter=C,e.ConvolutionFilter=S,e.CrossHatchFilter=F,e.DotFilter=O,e.DropShadowFilter=P,e.EmbossFilter=A,e.GlitchFilter=T,e.GlowFilter=w,e.GodrayFilter=D,e.KawaseBlurFilter=d,e.MotionBlurFilter=j,e.MultiColorReplaceFilter=M,e.OldFilmFilter=R,e.OutlineFilter=E,e.PixelateFilter=I,e.RGBSplitFilter=N,e.RadialBlurFilter=k,e.ReflectionFilter=L,e.ShockwaveFilter=X,e.SimpleLightmapFilter=B,e.TiltShiftAxisFilter=G,e.TiltShiftFilter=W,e.TiltShiftXFilter=K,e.TiltShiftYFilter=q,e.TwistFilter=Y,e.ZoomBlurFilter=Z,Object.defineProperty(e,\"__esModule\",{value:!0}),e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,__filters);\n//# sourceMappingURL=pixi-filters.js.map\n","import * as geo from \"./geo-utils.js\";\n// importing a local copy of PIXI filters, to avoid a long chain of npm pixi dependencies\nimport \"./lib/pixi-filters.min.js\";\n\n/**\n * Render the given dungeon state into the given container.\n */\nexport const render = async (container, state) => {\n // clear everything\n container.clear();\n // main geometry/config render pass\n await renderPass(container, state);\n // draw theme-painted areas as additional render passes\n await drawThemeAreas(container, state);\n};\n\n/** If texture is a video, start playing it. */\nconst maybeStartTextureVideo = (texture) => {\n const source = texture?.baseTexture?.resource?.source;\n const isVideo = source && source.tagName === \"VIDEO\";\n if (isVideo) {\n source.loop = true;\n // set to muted to avoid \"play() failed because the user didn't interact with the document first\" error\n source.muted = true;\n game.video.play(source);\n }\n};\n\n/**\n * Render pass: draw the given dungeon state/config into the given container.\n *\n * Child graphics ordering:\n * - exterior shadow\n * - floor\n * - interior shadow\n * - walls\n * - doors\n */\nconst renderPass = async (container, state) => {\n if (!state.geometry) {\n return;\n }\n\n const floorGfx = new PIXI.Graphics();\n const interiorShadowGfx = new PIXI.Graphics();\n const wallGfx = new PIXI.Graphics();\n const doorGfx = new PIXI.Graphics();\n\n // maybe draw an outer surrounding blurred shadow\n addExteriorShadow(container, state.config, state.geometry);\n\n // use a mask to clip the tiled background and interior shadows\n const clipMask = new PIXI.Graphics();\n drawMultiPolygonMask(clipMask, state.geometry);\n // TODO: verify mask add\n // the add seems necessary for inner shadows to show?\n container.addChild(clipMask);\n\n interiorShadowGfx.mask = clipMask;\n // apply alpha filter once for entire shadow graphics, so overlaps aren't additive\n const alphaFilter = new PIXI.filters.AlphaFilter(\n state.config.interiorShadowOpacity\n );\n const blurFilter = new PIXI.filters.BlurFilter();\n interiorShadowGfx.filters = [alphaFilter, blurFilter];\n\n // draw the dungeon geometry room(s)\n drawMultiPolygonRoom(\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n state.config,\n state.geometry\n );\n\n const wallMask = new PIXI.Graphics();\n const maskConfig = JSON.parse(JSON.stringify(state.config));\n maskConfig.wallColor = \"#000000\";\n\n // draw interior walls\n for (const wall of state.interiorWalls) {\n drawInteriorWallShadow(interiorShadowGfx, state.config, wall);\n if (state.config.wallTexture) {\n drawInteriorWall(wallMask, maskConfig, wall);\n } else {\n drawInteriorWall(wallGfx, state.config, wall);\n }\n }\n\n // draw invisible walls\n for (const wall of state.invisibleWalls) {\n // draw on the door gfx, so invis walls get layered on top of regular\n // walls. E.g., when used as visible windows.\n drawInvisibleWallShadow(interiorShadowGfx, state.config, wall);\n drawInvisibleWall(doorGfx, wallGfx, wallMask, state.config, wall);\n }\n\n // draw doors\n for (const door of state.doors) {\n drawDoorShadow(interiorShadowGfx, state.config, door);\n drawDoor(doorGfx, wallGfx, wallMask, state.config, door);\n }\n for (const secretDoor of state.secretDoors) {\n drawInteriorWallShadow(interiorShadowGfx, state.config, secretDoor);\n drawSecretDoor(doorGfx, wallGfx, wallMask, state.config, secretDoor);\n }\n\n // layer everything properly\n container.addChild(floorGfx);\n container.addChild(interiorShadowGfx);\n if (state.config.wallTexture) {\n drawMultiPolygonWallMask(\n wallMask,\n state.geometry,\n state.config.wallThickness\n );\n // TODO: verify mask add\n container.addChild(wallMask);\n // expand our geometry, so we add sprites\n // under the half of the wall thickness that expands past the geometry\n const expandedGeometry = geo.expandGeometry(\n state.geometry,\n state.config.wallThickness / 2.0\n );\n const texture = await getTexture(state.config.wallTexture);\n if (texture?.valid) {\n let matrix = null;\n if (state.config.wallTextureRotation) {\n matrix = PIXI.Matrix.IDENTITY.clone();\n matrix.rotate(state.config.wallTextureRotation * PIXI.DEG_TO_RAD);\n }\n maybeStartTextureVideo(texture);\n wallGfx.beginTextureFill({\n texture,\n alpha: 1.0,\n matrix,\n });\n const flatCoords = expandedGeometry\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat();\n wallGfx.drawPolygon(flatCoords);\n wallGfx.endFill();\n wallGfx.mask = wallMask;\n if (state.config.wallTextureTint) {\n wallGfx.tint = PIXI.utils.string2hex(state.config.wallTextureTint);\n }\n }\n }\n container.addChild(wallGfx);\n container.addChild(doorGfx);\n};\n\nconst drawThemeAreas = async (container, state) => {\n for (const area of state.themeAreas) {\n // hacky way to pass down the actual theme to paint\n const areaState = state.clone();\n areaState.config = area.config;\n // For now, just keep certain values from the main state config,\n // so the dungeon doors etc look consistent at meet up areas\n areaState.config.doorColor = state.config.doorColor;\n areaState.config.doorFillColor = state.config.doorFillColor;\n areaState.config.doorFillOpacity = state.config.doorFillOpacity;\n areaState.config.doorThickness = state.config.doorThickness;\n if (areaState.config.matchBaseWalls) {\n areaState.config.wallColor = state.config.wallColor;\n areaState.config.wallTexture = state.config.wallTexture;\n areaState.config.wallTextureTint = state.config.wallTextureTint;\n areaState.config.wallThickness = state.config.wallThickness;\n }\n areaState.config.exteriorShadowOpacity = 0.0; // don't draw additional exterior shadows\n\n // mask for our area shape\n const areaContainer = new PIXI.Container();\n const areaMask = new PIXI.Graphics();\n areaMask.beginFill(0xffffff, 1.0);\n areaMask.drawPolygon(area.points.flat());\n areaMask.endFill();\n areaContainer.mask = areaMask;\n\n // render the theme, clipping to our rectangle\n const clipPoly = geo.pointsToPolygon(area.points);\n await renderPass(areaContainer, areaState, { clipPoly });\n\n // TODO: verify mask add\n container.addChild(areaMask);\n container.addChild(areaContainer);\n }\n};\n\n/** Try-catch wrapper around loadTexture. */\nconst getTexture = async (path) => {\n try {\n const texture = await loadTexture(path);\n if (!texture) {\n ui.notifications.error(\n `${game.i18n.localize(\"DD.TextureLoadFailure\")}: ${path}`\n );\n }\n return texture;\n } catch (error) {\n console.log(error);\n }\n};\n\n/** Add an exterior blurred shadow. */\nconst addExteriorShadow = (container, config, geometry) => {\n if (\n !config.exteriorShadowThickness ||\n !config.exteriorShadowOpacity ||\n !geometry\n ) {\n // no visible shadows\n return;\n }\n\n // one graphics for all exterior shadow\n const exteriorShadowGfx = new PIXI.Graphics();\n exteriorShadowGfx.lineStyle({\n width: config.wallThickness + config.exteriorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // draw exterior for each poly\n for (let i = 0; i < geometry.getNumGeometries(); i++) {\n const poly = geometry.getGeometryN(i);\n addExteriorShadowForPoly(exteriorShadowGfx, config, poly);\n }\n\n // filters\n const alphaFilter = new PIXI.filters.AlphaFilter(\n config.exteriorShadowOpacity\n );\n const blurFilter = new PIXI.filters.BlurFilter();\n exteriorShadowGfx.filters = [alphaFilter, blurFilter];\n container.addChild(exteriorShadowGfx);\n};\n\n/** Add an exterior blurred shadow for the given polygon. */\nconst addExteriorShadowForPoly = (exteriorShadowGfx, config, poly) => {\n // draw shadow around the exterior ring of the polygon\n const exterior = poly.getExteriorRing();\n exteriorShadowGfx.drawPolygon(\n exterior\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat()\n );\n\n // draw inner hole shadows\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n exteriorShadowGfx.drawPolygon(\n hole\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat()\n );\n }\n};\n\nconst drawPolygonMask = (gfx, poly) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.beginFill(0xffffff, 1.0);\n gfx.drawPolygon(flatCoords);\n gfx.endFill();\n\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(0, 0x000000, 1.0, 1, 0.5);\n gfx.beginHole();\n gfx.drawPolygon(flatCoords);\n gfx.endHole();\n }\n};\n\nconst drawMultiPolygonMask = (gfx, multi) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonMask(gfx, poly);\n }\n};\n\nconst drawPolygonWallMask = (gfx, poly, wallThickness) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(wallThickness, PIXI.utils.string2hex(\"#000000\"), 1.0, 0.5);\n gfx.drawPolygon(flatCoords);\n\n // draw interior hole wall polys\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(wallThickness, PIXI.utils.string2hex(\"#000000\"), 1.0);\n gfx.drawPolygon(flatCoords);\n }\n};\n\nconst drawMultiPolygonWallMask = (gfx, multi, wallThickness) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonWallMask(gfx, poly, wallThickness);\n }\n};\n\nconst drawMultiPolygonRoom = (\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n config,\n multi\n) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonRoom(floorGfx, interiorShadowGfx, wallGfx, config, poly);\n }\n};\n\nconst drawPolygonRoom = async (\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n config,\n poly\n) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n\n // draw a floor texture if specified, otherwise solid-color floor\n if (config.floorTexture) {\n // TODO: optimize to not load the texture each pass\n const texture = await getTexture(config.floorTexture);\n if (texture?.valid) {\n let matrix = null;\n if (config.floorTextureRotation) {\n matrix = PIXI.Matrix.IDENTITY.clone();\n matrix.rotate(config.floorTextureRotation * PIXI.DEG_TO_RAD);\n }\n maybeStartTextureVideo(texture);\n floorGfx.beginTextureFill({\n texture,\n alpha: config.floorOpacity,\n matrix,\n });\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endFill();\n if (config.floorTextureTint) {\n floorGfx.tint = PIXI.utils.string2hex(config.floorTextureTint);\n }\n }\n } else {\n floorGfx.beginFill(\n PIXI.utils.string2hex(config.floorColor),\n config.floorOpacity\n );\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endFill();\n }\n\n // cut out holes\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n floorGfx.lineStyle(0, 0x000000, 1.0, 1, 0.5);\n floorGfx.beginHole();\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endHole();\n }\n\n // draw inner wall drop shadows\n if (config.interiorShadowOpacity) {\n // TODO: don't need to set this multiple times... bubble up?\n // TODO: there's a weird lag or visual artifact happening between the inner blur shadow and the solid line wall,\n // that sometimes leaves an unshadowed or lighter pixel line/area next to the wall.\n // To (partially) work around that, draw a wider shadow from the middle of the wall, rather than inside.\n interiorShadowGfx.lineStyle({\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n interiorShadowGfx.drawPolygon(flatCoords);\n }\n\n // draw outer wall poly\n if (!config.wallTexture) {\n wallGfx.lineStyle(\n config.wallThickness,\n PIXI.utils.string2hex(config.wallColor),\n 1.0,\n 0.5\n );\n wallGfx.drawPolygon(flatCoords);\n }\n\n // draw interior hole walls/shadows\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n\n // draw hole wall outer drop shadows\n interiorShadowGfx.drawPolygon(flatCoords);\n\n // draw hole wall poly\n if (!config.wallTexture) {\n wallGfx.lineStyle(\n config.wallThickness,\n PIXI.utils.string2hex(config.wallColor),\n 1.0\n );\n wallGfx.drawPolygon(flatCoords);\n }\n }\n};\n\n// [x1, y1, x2, y2]\nconst drawInteriorWall = (wallGfx, config, wall) => {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(wall[0], wall[1]);\n wallGfx.lineTo(wall[2], wall[3]);\n};\n\nconst drawInvisibleWall = (doorGfx, wallGfx, wallMask, config, wall) => {\n const doorConfig = {\n doorColor: config.invisibleWallColor,\n doorLineThickness: config.invisibleWallLineThickness,\n doorFillColor: config.invisibleWallFillColor,\n doorFillOpacity: config.invisibleWallFillOpacity,\n doorThickness: config.invisibleWallThickness,\n wallColor: config.wallColor,\n wallTexture: config.wallTexture,\n wallThickness: config.wallThickness,\n };\n drawDoor(doorGfx, wallGfx, wallMask, doorConfig, wall);\n // and another line across the rectangle\n doorGfx.lineStyle({\n width: config.invisibleWallLineThickness,\n color: PIXI.utils.string2hex(config.invisibleWallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n });\n doorGfx.moveTo(wall[0], wall[1]);\n doorGfx.lineTo(wall[2], wall[3]);\n};\n\nconst drawInteriorWallShadow = (gfx, config, wall) => {\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n cap: \"round\",\n });\n gfx.moveTo(wall[2], wall[3]);\n gfx.lineTo(wall[0], wall[1]);\n};\n\n// [x1, y1, x2, y2]\nconst drawDoor = (doorGfx, wallGfx, wallMask, config, door) => {\n // calculate some door dimensions\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const jambLength = 20;\n const rectLength = totalLength - 2 * jambLength;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n config.doorThickness,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n // draw the door jamb at wall thickness, either into the texture mask or onto the wall graphics\n if (config.wallTexture) {\n wallMask.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallMask.moveTo(door[0], door[1]);\n // left jamb\n wallMask.lineTo(jamb1End[0], jamb1End[1]);\n // right jamb\n wallMask.moveTo(rectEnd[0], rectEnd[1]);\n wallMask.lineTo(door[2], door[3]);\n } else {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(door[0], door[1]);\n // left jamb\n wallGfx.lineTo(jamb1End[0], jamb1End[1]);\n // right jamb\n wallGfx.moveTo(rectEnd[0], rectEnd[1]);\n wallGfx.lineTo(door[2], door[3]);\n }\n // door rectangle\n if (config.doorFillOpacity) {\n doorGfx.beginFill(\n PIXI.utils.string2hex(config.doorFillColor),\n config.doorFillOpacity\n );\n }\n // door rectangle is drawn at a different line thickness\n doorGfx.lineStyle(\n config.doorLineThickness,\n PIXI.utils.string2hex(config.doorColor),\n 1.0,\n 0.5\n );\n doorGfx.drawPolygon(\n doorRect[0],\n doorRect[1],\n doorRect[2],\n doorRect[3],\n doorRect[4],\n doorRect[5],\n doorRect[6],\n doorRect[7],\n doorRect[0],\n doorRect[1]\n );\n if (config.doorFillColor) {\n doorGfx.endFill();\n }\n};\n\nconst drawSecretDoor = (doorGfx, wallGfx, wallMask, config, door) => {\n const isGM = game.user.isGM;\n if (\n (isGM && config.secretDoorStyleGM === \"door\") ||\n (!isGM && config.secretDoorStylePlayer === \"door\")\n ) {\n // TODO: need to draw door shadow. where?\n drawDoor(doorGfx, wallGfx, wallMask, config, door);\n return;\n }\n\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const rectLength = 40.0;\n const jambLength = (totalLength - rectLength) / 2.0;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const middle = [door[0] + deltaX * 0.5, door[1] + deltaY * 0.5];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n 30.0,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n // draw a wall across the door opening\n if (config.wallTexture) {\n wallMask.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(\"#000000\"),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallMask.moveTo(door[0], door[1]);\n wallMask.lineTo(door[2], door[3]);\n } else {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(door[0], door[1]);\n wallGfx.lineTo(door[2], door[3]);\n }\n\n // possibly draw an additional S-shape through the wall\n if (\n (isGM && config.secretDoorStyleGM === \"secret\") ||\n (!isGM && config.secretDoorStylePlayer === \"secret\")\n ) {\n const midRect = geo.rectangleForSegment(\n 50.0,\n jamb1End[0],\n jamb1End[1],\n middle[0],\n middle[1]\n );\n const midRect2 = geo.rectangleForSegment(\n 50.0,\n middle[0],\n middle[1],\n rectEnd[0],\n rectEnd[1]\n );\n doorGfx.lineStyle({\n width: 5.0,\n color: PIXI.utils.string2hex(config.secretDoorSColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n doorGfx.moveTo(doorRect[6], doorRect[7]);\n doorGfx.bezierCurveTo(\n midRect[0],\n midRect[1],\n midRect[2],\n midRect[3],\n middle[0],\n middle[1]\n );\n doorGfx.bezierCurveTo(\n midRect2[6],\n midRect2[7],\n midRect2[4],\n midRect2[5],\n doorRect[2],\n doorRect[3]\n );\n }\n};\n\nconst drawInvisibleWallShadow = (gfx, config, wall) => {\n const doorConfig = {\n doorLineThickness: config.invisibleWallLineThickness,\n doorThickness: config.invisibleWallThickness,\n interiorShadowColor: config.interiorShadowColor,\n interiorShadowThickness: config.interiorShadowThickness,\n wallThickness: config.wallThickness,\n };\n drawDoorShadow(gfx, doorConfig, wall);\n};\n\nconst drawDoorShadow = (gfx, config, door) => {\n // TODO: DRY up these repeated dimension calculations\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const jambLength = 20;\n const rectLength = totalLength - 2 * jambLength;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n config.doorThickness,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // left jamb\n gfx.moveTo(door[2], door[3]);\n gfx.lineTo(rectEnd[0], rectEnd[1]);\n\n // right jamb\n gfx.moveTo(jamb1End[0], jamb1End[1]);\n gfx.lineTo(door[0], door[1]);\n\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.doorLineThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // door rectangle\n gfx.drawPolygon(\n doorRect[0],\n doorRect[1],\n doorRect[2],\n doorRect[3],\n doorRect[4],\n doorRect[5],\n doorRect[6],\n doorRect[7],\n doorRect[0],\n doorRect[1]\n );\n};\n","import { DungeonState } from \"./dungeonstate.js\";\nimport { render } from \"./renderer.js\";\nimport * as geo from \"./geo-utils.js\";\nimport { getTheme, getThemePainterThemeKey } from \"./themes.js\";\n\n/**\n * @extends {PlaceableObject}\n */\n// TODO: does Dungeon even need to be a PlaceableObject? Or could it just extend PIXI.Container?\nexport class Dungeon extends PlaceableObject {\n // expects JournalEntry for constructor\n constructor(journalEntry, note) {\n // note will be saved as this.document\n super(note);\n this.journalEntry = journalEntry;\n // time-ordered array of DungeonStates\n this.history = [DungeonState.startState()];\n this.historyIndex = 0;\n }\n\n /* -------------------------------------------- */\n\n // TODO: figure out what documentName / embeddedName / type we should be using\n /** @inheritdoc */\n static embeddedName = \"Drawing\";\n\n /** Convenience method to get most recent state. */\n state() {\n return this.history[this.historyIndex];\n }\n\n /* -------------------------------------------- */\n\n async deleteAll() {\n // keep our most recent config around\n const lastState = this.state();\n const resetState = DungeonState.startState();\n resetState.config = lastState.config;\n this.history = [resetState];\n this.historyIndex = 0;\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async saveToSceneBackground() {\n const tempContainer = new PIXI.Container();\n\n // clip to just the scene\n const mask = new PIXI.Graphics();\n // padding is rounded up to the nearest grid size increment\n const xOffset =\n Math.ceil(\n (canvas.scene.width * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size;\n const yOffset =\n Math.ceil(\n (canvas.scene.height * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size;\n const maskCoords = [\n xOffset,\n yOffset,\n xOffset + canvas.scene.width,\n yOffset,\n xOffset + canvas.scene.width,\n yOffset + canvas.scene.height,\n xOffset,\n yOffset + canvas.scene.height,\n xOffset,\n yOffset,\n ];\n mask.beginFill(PIXI.utils.string2hex(\"#FFFFFF\"), 1.0);\n mask.drawPolygon(maskCoords);\n mask.endFill();\n tempContainer.mask = mask;\n this.mask = mask;\n\n // force container to scene dimensions\n const sizeForcer = new PIXI.Sprite();\n sizeForcer.height = canvas.scene.height;\n sizeForcer.width = canvas.scene.width;\n sizeForcer.position.x = xOffset;\n sizeForcer.position.y = yOffset;\n tempContainer.addChild(sizeForcer);\n\n tempContainer.addChild(this);\n\n // TODO: decide if we want a folder, and if so, how to precreate\n // const folder = \"Dungeon Draw\";\n const folder = \"\";\n // uncomment for jpg+compression\n //const filename = `${canvas.scene.name}-dungeon.jpg`;\n //const base64 = await canvas.app.renderer.extract.base64(this, \"image/jpeg\", 0.5);\n const filename = `${canvas.scene.name}-dungeon.png`;\n const base64 = await canvas.app.renderer.extract.base64(tempContainer);\n const res = await fetch(base64);\n const blob = await res.blob();\n //const file = new File([blob], filename, { type: \"image/jpeg\" });\n const file = new File([blob], filename, { type: \"image/png\" });\n await FilePicker.upload(\"data\", folder, file, {});\n const path = folder ? folder + \"/\" + filename : filename;\n console.log(path);\n // make sure we don't keep using a cached copy\n // TODO: TextureLoader #cache is now a private instance var\n // TextureLoader.loader.cache.delete(path);\n if (canvas.scene.img === path) {\n // cheat to force a scene update when we're re-saving to the same filename\n await canvas.scene.update({ img: null }, { render: false });\n }\n await canvas.scene.update({ img: path });\n\n // remove our mask\n this.mask = null;\n }\n\n /* -------------------------------------------- */\n /* Rendering */\n /* -------------------------------------------- */\n\n /** @override */\n draw() {\n this.refresh();\n return this;\n }\n\n /** @override */\n refresh() {\n render(this, this.state());\n }\n\n async maybeRefresh(journalEntry) {\n if (journalEntry.id === this.journalEntry.id) {\n const savedState = await DungeonState.loadFromJournalEntry(\n this.journalEntry\n );\n // update state, but don't save to journal\n await this.pushState(savedState, false);\n }\n }\n\n /* -------------------------------------------- */\n\n async loadFromJournalEntry() {\n const savedState = await DungeonState.loadFromJournalEntry(\n this.journalEntry\n );\n this.history = [savedState];\n this.historyIndex = 0;\n this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async undo() {\n this.historyIndex = Math.max(0, this.historyIndex - 1);\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n await this.refresh();\n }\n\n async redo() {\n this.historyIndex = Math.min(\n this.history.length - 1,\n this.historyIndex + 1\n );\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n await this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async pushState(newState, saveToJournalEntry = true) {\n // throw away any history states after current\n for (let i = this.history.length - 1; i > this.historyIndex; i--) {\n this.history.pop();\n }\n // and add our new state\n this.history.push(newState);\n this.historyIndex++;\n\n if (saveToJournalEntry) {\n await newState.saveToJournalEntry(this.journalEntry);\n }\n await this.refresh();\n }\n\n async setConfig(config) {\n const newState = this.state().clone();\n newState.config = config;\n await this.pushState(newState);\n }\n\n async addDoor(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"doors\");\n }\n\n async addSecretDoor(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"secretDoors\");\n }\n\n async addInvisibleWall(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"invisibleWalls\");\n }\n\n async _addDoor(x1, y1, x2, y2, doorProperty) {\n const newState = this.history[this.historyIndex].clone();\n const doorPoly = geo.twoPointsToLineString(x1, y1, x2, y2);\n\n // possibly split interior walls\n const wallsToDelete = [];\n const wallsToAdd = [];\n for (const wall of newState.interiorWalls) {\n const wallPoly = geo.twoPointsToLineString(\n wall[0],\n wall[1],\n wall[2],\n wall[3]\n );\n const contains = geo.contains(wallPoly, doorPoly);\n if (contains) {\n wallsToDelete.push(wall);\n // make sure points are consistently ordered\n const w1 = geo.lesserPoint(wall[0], wall[1], wall[2], wall[3]);\n const w2 = geo.greaterPoint(wall[0], wall[1], wall[2], wall[3]);\n const d1 = geo.lesserPoint(x1, y1, x2, y2);\n const d2 = geo.greaterPoint(x1, y1, x2, y2);\n wallsToAdd.push([w1[0], w1[1], d1[0], d1[1]]);\n wallsToAdd.push([d2[0], d2[1], w2[0], w2[1]]);\n }\n }\n newState.interiorWalls = newState.interiorWalls.filter(\n (w) => wallsToDelete.indexOf(w) === -1\n );\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n newState[doorProperty].push([x1, y1, x2, y2]);\n await this.pushState(newState);\n }\n\n async addInteriorWall(x1, y1, x2, y2) {\n const newState = this.history[this.historyIndex].clone();\n const wallsToAdd = geo.maybeSplitWall(x1, y1, x2, y2, newState.doors);\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async removeInteriorWalls(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const wallsToKeep = this.history[this.historyIndex].interiorWalls.filter(\n (w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(rectPoly, wallPoly);\n }\n );\n if (\n wallsToKeep.length != this.history[this.historyIndex].interiorWalls.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.interiorWalls = wallsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeInvisibleWalls(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const wallsToKeep = this.history[this.historyIndex].invisibleWalls.filter(\n (w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(rectPoly, wallPoly);\n }\n );\n if (\n wallsToKeep.length !=\n this.history[this.historyIndex].invisibleWalls.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.invisibleWalls = wallsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeDoors(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const oldState = this.history[this.historyIndex];\n const doorsToKeep = oldState.doors.filter((d) => {\n const doorPoly = geo.twoPointsToLineString(d[0], d[1], d[2], d[3]);\n return !geo.intersects(rectPoly, doorPoly);\n });\n if (doorsToKeep.length != oldState.doors.length) {\n const newState = oldState.clone();\n newState.doors = doorsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeSecretDoors(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const oldState = this.history[this.historyIndex];\n const secretDoorsToKeep = oldState.secretDoors.filter((d) => {\n const doorPoly = geo.twoPointsToLineString(d[0], d[1], d[2], d[3]);\n return !geo.intersects(rectPoly, doorPoly);\n });\n if (secretDoorsToKeep.length != oldState.secretDoors.length) {\n const newState = oldState.clone();\n newState.secretDoors = secretDoorsToKeep;\n await this.pushState(newState);\n }\n }\n\n async _addPoly(poly) {\n const oldState = this.history[this.historyIndex];\n const newState = oldState.clone();\n if (newState.geometry) {\n newState.geometry = geo.union(newState.geometry, poly);\n const touches = geo.touches(oldState.geometry, poly);\n if (touches) {\n const intersection = geo.intersection(oldState.geometry, poly);\n const coordinates = intersection.getCoordinates();\n // TODO: do we need to handle more complicated overlaps, GeometryCollection etc?\n // this coordinate 2-step is flimsy\n if (coordinates.length > 1 && coordinates.length % 2 === 0) {\n for (let i = 0; i < coordinates.length; i += 2) {\n const wallsToAdd = geo.maybeSplitWall(\n coordinates[i].x,\n coordinates[i].y,\n coordinates[i + 1].x,\n coordinates[i + 1].y,\n newState.doors\n );\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n }\n }\n } else {\n // also nuke any interior walls in this new poly\n const wallsToKeep = newState.interiorWalls.filter((w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(poly, wallPoly);\n });\n if (wallsToKeep.length != newState.interiorWalls.length) {\n newState.interiorWalls = wallsToKeep;\n }\n }\n } else {\n newState.geometry = poly;\n }\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async addRectangle(rect) {\n const poly = geo.rectToPolygon(rect);\n this._addPoly(poly);\n }\n\n // {x:, y:, height:, width:}\n async removeRectangle(rect) {\n const poly = geo.rectToPolygon(rect);\n await this._removePoly(poly);\n }\n\n async _removePoly(poly) {\n // only makes sense to remove if we have geometry\n if (!this.history[this.historyIndex].geometry) {\n return;\n }\n // and if the poly intersects existing geometry\n if (!geo.intersects(this.history[this.historyIndex].geometry, poly)) {\n return;\n }\n const newState = this.history[this.historyIndex].clone();\n newState.geometry = geo.difference(newState.geometry, poly);\n await this.pushState(newState);\n }\n\n // [[x,y]...]\n async addPolygon(points) {\n console.log(points);\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._addPoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorAddingPolygon\"));\n }\n }\n\n // [[x,y]...]\n async removePolygon(points) {\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._removePoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorRemovingPolygon\"));\n }\n }\n\n async addEllipse(x, y, width, height) {\n const poly = geo.ellipse(x, y, width, height);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._addPoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorAddingPolygon\"));\n }\n }\n\n async removeEllipse(x, y, width, height) {\n const poly = geo.ellipse(x, y, width, height);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._removePoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorRemovingPolygon\"));\n }\n }\n\n async addThemeArea(points) {\n // make sure we can create a valid polygon from the points\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n\n const themeKey = getThemePainterThemeKey();\n const theme = getTheme(themeKey);\n const newArea = {\n points,\n config: theme.config,\n };\n const newState = this.history[this.historyIndex].clone();\n newState.themeAreas.push(newArea);\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async removeThemeAreas(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const areasToKeep = this.history[this.historyIndex].themeAreas.filter(\n (a) => {\n try {\n const areaPoly = geo.pointsToPolygon(a.points);\n return !geo.intersects(rectPoly, areaPoly);\n } catch (error) {\n console.log(error);\n return false;\n }\n }\n );\n if (\n areasToKeep.length != this.history[this.historyIndex].themeAreas.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.themeAreas = areasToKeep;\n await this.pushState(newState);\n }\n }\n}\n","exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [], keys = []\n\n if (cycleReplacer == null) cycleReplacer = function(key, value) {\n if (stack[0] === value) return \"[Circular ~]\"\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this)\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n }\n else stack.push(value)\n\n return replacer == null ? value : replacer.call(this, key, value)\n }\n}\n","/*\n * random-seed\n * https://github.com/skratchdot/random-seed\n *\n * This code was originally written by Steve Gibson and can be found here:\n *\n * https://www.grc.com/otg/uheprng.htm\n *\n * It was slightly modified for use in node, to pass jshint, and a few additional\n * helper functions were added.\n *\n * Copyright (c) 2013 skratchdot\n * Dual Licensed under the MIT license and the original GRC copyright/license\n * included below.\n */\n/*\t============================================================================\n\t\t\t\t\t\t\t\t\tGibson Research Corporation\n\t\t\t\tUHEPRNG - Ultra High Entropy Pseudo-Random Number Generator\n\t============================================================================\n\tLICENSE AND COPYRIGHT: THIS CODE IS HEREBY RELEASED INTO THE PUBLIC DOMAIN\n\tGibson Research Corporation releases and disclaims ALL RIGHTS AND TITLE IN\n\tTHIS CODE OR ANY DERIVATIVES. Anyone may be freely use it for any purpose.\n\t============================================================================\n\tThis is GRC's cryptographically strong PRNG (pseudo-random number generator)\n\tfor JavaScript. It is driven by 1536 bits of entropy, stored in an array of\n\t48, 32-bit JavaScript variables. Since many applications of this generator,\n\tincluding ours with the \"Off The Grid\" Latin Square generator, may require\n\tthe deteriministic re-generation of a sequence of PRNs, this PRNG's initial\n\tentropic state can be read and written as a static whole, and incrementally\n\tevolved by pouring new source entropy into the generator's internal state.\n\t----------------------------------------------------------------------------\n\tENDLESS THANKS are due Johannes Baagoe for his careful development of highly\n\trobust JavaScript implementations of JS PRNGs. This work was based upon his\n\tJavaScript \"Alea\" PRNG which is based upon the extremely robust Multiply-\n\tWith-Carry (MWC) PRNG invented by George Marsaglia. MWC Algorithm References:\n\thttp://www.GRC.com/otg/Marsaglia_PRNGs.pdf\n\thttp://www.GRC.com/otg/Marsaglia_MWC_Generators.pdf\n\t----------------------------------------------------------------------------\n\tThe quality of this algorithm's pseudo-random numbers have been verified by\n\tmultiple independent researchers. It handily passes the fermilab.ch tests as\n\twell as the \"diehard\" and \"dieharder\" test suites. For individuals wishing\n\tto further verify the quality of this algorithm's pseudo-random numbers, a\n\t256-megabyte file of this algorithm's output may be downloaded from GRC.com,\n\tand a Microsoft Windows scripting host (WSH) version of this algorithm may be\n\tdownloaded and run from the Windows command prompt to generate unique files\n\tof any size:\n\tThe Fermilab \"ENT\" tests: http://fourmilab.ch/random/\n\tThe 256-megabyte sample PRN file at GRC: https://www.GRC.com/otg/uheprng.bin\n\tThe Windows scripting host version: https://www.GRC.com/otg/wsh-uheprng.js\n\t----------------------------------------------------------------------------\n\tQualifying MWC multipliers are: 187884, 686118, 898134, 1104375, 1250205,\n\t1460910 and 1768863. (We use the largest one that's < 2^21)\n\t============================================================================ */\n'use strict';\nvar stringify = require('json-stringify-safe');\n\n/*\t============================================================================\nThis is based upon Johannes Baagoe's carefully designed and efficient hash\nfunction for use with JavaScript. It has a proven \"avalanche\" effect such\nthat every bit of the input affects every bit of the output 50% of the time,\nwhich is good.\tSee: http://baagoe.com/en/RandomMusings/hash/avalanche.xhtml\n============================================================================\n*/\nvar Mash = function () {\n\tvar n = 0xefc8249d;\n\tvar mash = function (data) {\n\t\tif (data) {\n\t\t\tdata = data.toString();\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tn += data.charCodeAt(i);\n\t\t\t\tvar h = 0.02519603282416938 * n;\n\t\t\t\tn = h >>> 0;\n\t\t\t\th -= n;\n\t\t\t\th *= n;\n\t\t\t\tn = h >>> 0;\n\t\t\t\th -= n;\n\t\t\t\tn += h * 0x100000000; // 2^32\n\t\t\t}\n\t\t\treturn (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n\t\t} else {\n\t\t\tn = 0xefc8249d;\n\t\t}\n\t};\n\treturn mash;\n};\n\nvar uheprng = function (seed) {\n\treturn (function () {\n\t\tvar o = 48; // set the 'order' number of ENTROPY-holding 32-bit values\n\t\tvar c = 1; // init the 'carry' used by the multiply-with-carry (MWC) algorithm\n\t\tvar p = o; // init the 'phase' (max-1) of the intermediate variable pointer\n\t\tvar s = new Array(o); // declare our intermediate variables array\n\t\tvar i; // general purpose local\n\t\tvar j; // general purpose local\n\t\tvar k = 0; // general purpose local\n\n\t\t// when our \"uheprng\" is initially invoked our PRNG state is initialized from the\n\t\t// browser's own local PRNG. This is okay since although its generator might not\n\t\t// be wonderful, it's useful for establishing large startup entropy for our usage.\n\t\tvar mash = new Mash(); // get a pointer to our high-performance \"Mash\" hash\n\n\t\t// fill the array with initial mash hash values\n\t\tfor (i = 0; i < o; i++) {\n\t\t\ts[i] = mash(Math.random());\n\t\t}\n\n\t\t// this PRIVATE (internal access only) function is the heart of the multiply-with-carry\n\t\t// (MWC) PRNG algorithm. When called it returns a pseudo-random number in the form of a\n\t\t// 32-bit JavaScript fraction (0.0 to <1.0) it is a PRIVATE function used by the default\n\t\t// [0-1] return function, and by the random 'string(n)' function which returns 'n'\n\t\t// characters from 33 to 126.\n\t\tvar rawprng = function () {\n\t\t\tif (++p >= o) {\n\t\t\t\tp = 0;\n\t\t\t}\n\t\t\tvar t = 1768863 * s[p] + c * 2.3283064365386963e-10; // 2^-32\n\t\t\treturn s[p] = t - (c = t | 0);\n\t\t};\n\n\t\t// this EXPORTED function is the default function returned by this library.\n\t\t// The values returned are integers in the range from 0 to range-1. We first\n\t\t// obtain two 32-bit fractions (from rawprng) to synthesize a single high\n\t\t// resolution 53-bit prng (0 to <1), then we multiply this by the caller's\n\t\t// \"range\" param and take the \"floor\" to return a equally probable integer.\n\t\tvar random = function (range) {\n\t\t\treturn Math.floor(range * (rawprng() + (rawprng() * 0x200000 | 0) * 1.1102230246251565e-16)); // 2^-53\n\t\t};\n\n\t\t// this EXPORTED function 'string(n)' returns a pseudo-random string of\n\t\t// 'n' printable characters ranging from chr(33) to chr(126) inclusive.\n\t\trandom.string = function (count) {\n\t\t\tvar i;\n\t\t\tvar s = '';\n\t\t\tfor (i = 0; i < count; i++) {\n\t\t\t\ts += String.fromCharCode(33 + random(94));\n\t\t\t}\n\t\t\treturn s;\n\t\t};\n\n\t\t// this PRIVATE \"hash\" function is used to evolve the generator's internal\n\t\t// entropy state. It is also called by the EXPORTED addEntropy() function\n\t\t// which is used to pour entropy into the PRNG.\n\t\tvar hash = function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\tfor (i = 0; i < args.length; i++) {\n\t\t\t\tfor (j = 0; j < o; j++) {\n\t\t\t\t\ts[j] -= mash(args[i]);\n\t\t\t\t\tif (s[j] < 0) {\n\t\t\t\t\t\ts[j] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// this EXPORTED \"clean string\" function removes leading and trailing spaces and non-printing\n\t\t// control characters, including any embedded carriage-return (CR) and line-feed (LF) characters,\n\t\t// from any string it is handed. this is also used by the 'hashstring' function (below) to help\n\t\t// users always obtain the same EFFECTIVE uheprng seeding key.\n\t\trandom.cleanString = function (inStr) {\n\t\t\tinStr = inStr.replace(/(^\\s*)|(\\s*$)/gi, ''); // remove any/all leading spaces\n\t\t\tinStr = inStr.replace(/[\\x00-\\x1F]/gi, ''); // remove any/all control characters\n\t\t\tinStr = inStr.replace(/\\n /, '\\n'); // remove any/all trailing spaces\n\t\t\treturn inStr; // return the cleaned up result\n\t\t};\n\n\t\t// this EXPORTED \"hash string\" function hashes the provided character string after first removing\n\t\t// any leading or trailing spaces and ignoring any embedded carriage returns (CR) or Line Feeds (LF)\n\t\trandom.hashString = function (inStr) {\n\t\t\tinStr = random.cleanString(inStr);\n\t\t\tmash(inStr); // use the string to evolve the 'mash' state\n\t\t\tfor (i = 0; i < inStr.length; i++) { // scan through the characters in our string\n\t\t\t\tk = inStr.charCodeAt(i); // get the character code at the location\n\t\t\t\tfor (j = 0; j < o; j++) { //\t\"mash\" it into the UHEPRNG state\n\t\t\t\t\ts[j] -= mash(k);\n\t\t\t\t\tif (s[j] < 0) {\n\t\t\t\t\t\ts[j] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// this EXPORTED function allows you to seed the random generator.\n\t\trandom.seed = function (seed) {\n\t\t\tif (typeof seed === 'undefined' || seed === null) {\n\t\t\t\tseed = Math.random();\n\t\t\t}\n\t\t\tif (typeof seed !== 'string') {\n\t\t\t\tseed = stringify(seed, function (key, value) {\n\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\treturn (value).toString();\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t}\n\t\t\trandom.initState();\n\t\t\trandom.hashString(seed);\n\t\t};\n\n\t\t// this handy exported function is used to add entropy to our uheprng at any time\n\t\trandom.addEntropy = function ( /* accept zero or more arguments */ ) {\n\t\t\tvar args = [];\n\t\t\tfor (i = 0; i < arguments.length; i++) {\n\t\t\t\targs.push(arguments[i]);\n\t\t\t}\n\t\t\thash((k++) + (new Date().getTime()) + args.join('') + Math.random());\n\t\t};\n\n\t\t// if we want to provide a deterministic startup context for our PRNG,\n\t\t// but without directly setting the internal state variables, this allows\n\t\t// us to initialize the mash hash and PRNG's internal state before providing\n\t\t// some hashing input\n\t\trandom.initState = function () {\n\t\t\tmash(); // pass a null arg to force mash hash to init\n\t\t\tfor (i = 0; i < o; i++) {\n\t\t\t\ts[i] = mash(' '); // fill the array with initial mash hash values\n\t\t\t}\n\t\t\tc = 1; // init our multiply-with-carry carry\n\t\t\tp = o; // init our phase\n\t\t};\n\n\t\t// we use this (optional) exported function to signal the JavaScript interpreter\n\t\t// that we're finished using the \"Mash\" hash function so that it can free up the\n\t\t// local \"instance variables\" is will have been maintaining. It's not strictly\n\t\t// necessary, of course, but it's good JavaScript citizenship.\n\t\trandom.done = function () {\n\t\t\tmash = null;\n\t\t};\n\n\t\t// if we called \"uheprng\" with a seed value, then execute random.seed() before returning\n\t\tif (typeof seed !== 'undefined') {\n\t\t\trandom.seed(seed);\n\t\t}\n\n\t\t// Returns a random integer between 0 (inclusive) and range (exclusive)\n\t\trandom.range = function (range) {\n\t\t\treturn random(range);\n\t\t};\n\n\t\t// Returns a random float between 0 (inclusive) and 1 (exclusive)\n\t\trandom.random = function () {\n\t\t\treturn random(Number.MAX_VALUE - 1) / Number.MAX_VALUE;\n\t\t};\n\n\t\t// Returns a random float between min (inclusive) and max (exclusive)\n\t\trandom.floatBetween = function (min, max) {\n\t\t\treturn random.random() * (max - min) + min;\n\t\t};\n\n\t\t// Returns a random integer between min (inclusive) and max (inclusive)\n\t\trandom.intBetween = function (min, max) {\n\t\t\treturn Math.floor(random.random() * (max - min + 1)) + min;\n\t\t};\n\n\t\t// when our main outer \"uheprng\" function is called, after setting up our\n\t\t// initial variables and entropic state, we return an \"instance pointer\"\n\t\t// to the internal anonymous function which can then be used to access\n\t\t// the uheprng's various exported functions. As with the \".done\" function\n\t\t// above, we should set the returned value to 'null' once we're finished\n\t\t// using any of these functions.\n\t\treturn random;\n\t}());\n};\n\n// Modification for use in node:\nuheprng.create = function (seed) {\n\treturn new uheprng(seed);\n};\nmodule.exports = uheprng;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _randomSeed = require('random-seed');\n\nvar _randomSeed2 = _interopRequireDefault(_randomSeed);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Random = function () {\n function Random(seed) {\n _classCallCheck(this, Random);\n\n this.rng = _randomSeed2.default.create(seed);\n }\n\n _createClass(Random, [{\n key: 'int',\n value: function int(min, max) {\n return this.rng.intBetween(min, max);\n }\n }, {\n key: 'float',\n value: function float() {\n var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n return this.rng.floatBetween(min, max);\n }\n }, {\n key: 'vec',\n value: function vec(min, max) {\n // min and max are vectors [int, int];\n // returns [min[0]<=x<=max[0], min[1]<=y<=max[1]]\n return [this.int(min[0], max[0]), this.int(min[1], max[1])];\n }\n }, {\n key: 'choose',\n value: function choose(items) {\n var remove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var idx = this.rng.intBetween(0, items.length - 1);\n if (remove) {\n return items.splice(idx, 1)[0];\n } else {\n return items[idx];\n }\n }\n }, {\n key: 'maybe',\n value: function maybe(probability) {\n return this.float() <= probability;\n }\n }]);\n\n return Random;\n}();\n\nexports.default = Random;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Array2d = function () {\n function Array2d() {\n var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0];\n var default_value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, Array2d);\n\n this.rows = [];\n this.size = [];\n\n for (var y = 0; y < size[1]; y++) {\n var row = [];\n for (var x = 0; x < size[0]; x++) {\n row.push(default_value);\n }\n this.rows.push(row);\n }\n }\n\n _createClass(Array2d, [{\n key: \"iter\",\n value: function iter(callback, context) {\n for (var y = 0; y < this.size[1]; y++) {\n for (var x = 0; x < this.size[0]; x++) {\n callback.apply(context, [[x, y], this.get([x, y])]);\n }\n }\n }\n }, {\n key: \"get\",\n value: function get(_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n if (this.rows[y] === undefined) {\n return undefined;\n }\n return this.rows[y][x];\n }\n }, {\n key: \"set\",\n value: function set(_ref3, val) {\n var _ref4 = _slicedToArray(_ref3, 2),\n x = _ref4[0],\n y = _ref4[1];\n\n this.rows[y][x] = val;\n }\n }, {\n key: \"set_horizontal_line\",\n value: function set_horizontal_line(_ref5, delta_x, val) {\n var _ref6 = _slicedToArray(_ref5, 2),\n start_x = _ref6[0],\n start_y = _ref6[1];\n\n var c = Math.abs(delta_x);\n var mod = delta_x < 0 ? -1 : 1;\n\n for (var x = 0; x <= c; x++) {\n this.set([start_x + x * mod, start_y], val);\n }\n }\n }, {\n key: \"set_vertical_line\",\n value: function set_vertical_line(_ref7, delta_y, val) {\n var _ref8 = _slicedToArray(_ref7, 2),\n start_x = _ref8[0],\n start_y = _ref8[1];\n\n var c = Math.abs(delta_y);\n var mod = delta_y < 0 ? -1 : 1;\n\n for (var y = 0; y <= c; y++) {\n this.set([start_x, start_y + y * mod], val);\n }\n }\n }, {\n key: \"get_square\",\n value: function get_square(_ref9, _ref10) {\n var _ref12 = _slicedToArray(_ref9, 2),\n x = _ref12[0],\n y = _ref12[1];\n\n var _ref11 = _slicedToArray(_ref10, 2),\n size_x = _ref11[0],\n size_y = _ref11[1];\n\n var retv = new Array2d([size_x, size_y]);\n for (var dx = 0; dx < size_x; dx++) {\n for (var dy = 0; dy < size_y; dy++) {\n retv.set([dx, dy], this.get([x + dx, y + dy]));\n }\n }\n return retv;\n }\n }, {\n key: \"set_square\",\n value: function set_square(_ref13, _ref14, val) {\n var _ref16 = _slicedToArray(_ref13, 2),\n x = _ref16[0],\n y = _ref16[1];\n\n var _ref15 = _slicedToArray(_ref14, 2),\n size_x = _ref15[0],\n size_y = _ref15[1];\n\n var fill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!fill) {\n this.line_h([x, y], size_x - 1, val);\n this.line_h([x, y + size_y - 1], size_x - 1, val);\n this.line_v([x, y], size_y - 1, val);\n this.line_v([x + size_x - 1, y], size_y - 1, val);\n } else {\n for (var dx = 0; dx < size_x; dx++) {\n for (var dy = 0; dy < size_y; dy++) {\n this.set([x + dx, y + dy], val);\n }\n }\n }\n }\n }]);\n\n return Array2d;\n}();\n\nexports.default = Array2d;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/*\n * Rectangle\n * Visit http://createjs.com/ for documentation, updates and examples.\n *\n * Copyright (c) 2010 gskinner.com, inc.\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * @module EaselJS\n */\n\n// constructor:\n/**\n * Represents a rectangle as defined by the points (x, y) and (x+width, y+height).\n *\n *

Example

\n *\n * var rect = new createjs.Rectangle(0, 0, 100, 100);\n *\n * @class Rectangle\n * @param {Number} [x=0] X position.\n * @param {Number} [y=0] Y position.\n * @param {Number} [width=0] The width of the Rectangle.\n * @param {Number} [height=0] The height of the Rectangle.\n * @constructor\n **/\nfunction Rectangle(x, y, width, height) {\n if (Array.isArray(x) && Array.isArray(y)) {\n var _y = y;\n\n var _y2 = _slicedToArray(_y, 2);\n\n width = _y2[0];\n height = _y2[1];\n var _x = x;\n\n var _x2 = _slicedToArray(_x, 2);\n\n x = _x2[0];\n y = _x2[1];\n }\n this.setValues(x, y, width, height);\n\n // public properties:\n // assigned in the setValues method.\n /**\n * X position.\n * @property x\n * @type Number\n **/\n\n /**\n * Y position.\n * @property y\n * @type Number\n **/\n\n /**\n * Width.\n * @property width\n * @type Number\n **/\n\n /**\n * Height.\n * @property height\n * @type Number\n **/\n}\nvar p = Rectangle.prototype;\n\n/**\n * REMOVED. Removed in favor of using `MySuperClass_constructor`.\n * See {{#crossLink \"Utility Methods/extend\"}}{{/crossLink}} and {{#crossLink \"Utility Methods/promote\"}}{{/crossLink}}\n * for details.\n *\n * There is an inheritance tutorial distributed with EaselJS in /tutorials/Inheritance.\n *\n * @method initialize\n * @protected\n * @deprecated\n */\n// p.initialize = function() {}; // searchable for devs wondering where it is.\n\n// public methods:\n/**\n * Sets the specified values on this instance.\n * @method setValues\n * @param {Number} [x=0] X position.\n * @param {Number} [y=0] Y position.\n * @param {Number} [width=0] The width of the Rectangle.\n * @param {Number} [height=0] The height of the Rectangle.\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.setValues = function (x, y, width, height) {\n // don't forget to update docs in the constructor if these change:\n this.x = x || 0;\n this.y = y || 0;\n this.width = width || 0;\n this.height = height || 0;\n return this;\n};\n\n/**\n * Extends the rectangle's bounds to include the described point or rectangle.\n * @method extend\n * @param {Number} x X position of the point or rectangle.\n * @param {Number} y Y position of the point or rectangle.\n * @param {Number} [width=0] The width of the rectangle.\n * @param {Number} [height=0] The height of the rectangle.\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.extend = function (x, y, width, height) {\n width = width || 0;\n height = height || 0;\n if (x + width > this.x + this.width) {\n this.width = x + width - this.x;\n }\n if (y + height > this.y + this.height) {\n this.height = y + height - this.y;\n }\n if (x < this.x) {\n this.width += this.x - x;\n this.x = x;\n }\n if (y < this.y) {\n this.height += this.y - y;\n this.y = y;\n }\n return this;\n};\n\n/**\n * Adds the specified padding to the rectangle's bounds.\n * @method pad\n * @param {Number} top\n * @param {Number} left\n * @param {Number} right\n * @param {Number} bottom\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.pad = function (top, left, bottom, right) {\n this.x -= left;\n this.y -= top;\n this.width += left + right;\n this.height += top + bottom;\n return this;\n};\n\n/**\n * Copies all properties from the specified rectangle to this rectangle.\n * @method copy\n * @param {Rectangle} rectangle The rectangle to copy properties from.\n * @return {Rectangle} This rectangle. Useful for chaining method calls.\n * @chainable\n */\np.copy = function (rectangle) {\n return this.setValues(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n};\n\n/**\n * Returns true if this rectangle fully encloses the described point or rectangle.\n * @method contains\n * @param {Number} x X position of the point or rectangle.\n * @param {Number} y Y position of the point or rectangle.\n * @param {Number} [width=0] The width of the rectangle.\n * @param {Number} [height=0] The height of the rectangle.\n * @return {Boolean} True if the described point or rectangle is contained within this rectangle.\n */\np.contains = function (x, y, width, height) {\n width = width || 0;\n height = height || 0;\n return x >= this.x && x + width <= this.x + this.width && y >= this.y && y + height <= this.y + this.height;\n};\n\n/**\n * Returns a new rectangle which contains this rectangle and the specified rectangle.\n * @method union\n * @param {Rectangle} rect The rectangle to calculate a union with.\n * @return {Rectangle} A new rectangle describing the union.\n */\np.union = function (rect) {\n return this.clone().extend(rect.x, rect.y, rect.width, rect.height);\n};\n\n/**\n * Returns a new rectangle which describes the intersection (overlap) of this rectangle and the specified rectangle,\n * or null if they do not intersect.\n * @method intersection\n * @param {Rectangle} rect The rectangle to calculate an intersection with.\n * @return {Rectangle} A new rectangle describing the intersection or null.\n */\np.intersection = function (rect) {\n var x1 = rect.x;\n var y1 = rect.y;\n var x2 = x1 + rect.width;\n var y2 = y1 + rect.height;\n if (this.x > x1) {\n x1 = this.x;\n }\n if (this.y > y1) {\n y1 = this.y;\n }\n if (this.x + this.width < x2) {\n x2 = this.x + this.width;\n }\n if (this.y + this.height < y2) {\n y2 = this.y + this.height;\n }\n return x2 <= x1 || y2 <= y1 ? null : new Rectangle(x1, y1, x2 - x1, y2 - y1);\n};\n\n/**\n * Returns true if the specified rectangle intersects (has any overlap) with this rectangle.\n * @method intersects\n * @param {Rectangle} rect The rectangle to compare.\n * @return {Boolean} True if the rectangles intersect.\n */\np.intersects = function (rect) {\n return rect.x <= this.x + this.width && this.x <= rect.x + rect.width && rect.y <= this.y + this.height && this.y <= rect.y + rect.height;\n};\n\n/**\n * Returns true if the width or height are equal or less than 0.\n * @method isEmpty\n * @return {Boolean} True if the rectangle is empty.\n */\np.isEmpty = function () {\n return this.width <= 0 || this.height <= 0;\n};\n\n/**\n * Returns a clone of the Rectangle instance.\n * @method clone\n * @return {Rectangle} a clone of the Rectangle instance.\n **/\np.clone = function () {\n return new Rectangle(this.x, this.y, this.width, this.height);\n};\n\n/**\n * Returns a string representation of this object.\n * @method toString\n * @return {String} a string representation of the instance.\n **/\np.toString = function () {\n return '[Rectangle (x=' + this.x + ' y=' + this.y + ' width=' + this.width + ' height=' + this.height + ')]';\n};\n\nexports.default = Rectangle;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _FACING_TO_STRING, _FACING_TO_MOD, _FACING_INVERSE, _FACING_MOD_RIGHT, _FACING_MOD_LEFT;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar TOP = exports.TOP = 0;\nvar RIGHT = exports.RIGHT = 90;\nvar BOTTOM = exports.BOTTOM = 180;\nvar LEFT = exports.LEFT = 270;\n\nvar FACING = exports.FACING = [TOP, RIGHT, BOTTOM, LEFT];\n\nvar FACING_TO_STRING = exports.FACING_TO_STRING = (_FACING_TO_STRING = {}, _defineProperty(_FACING_TO_STRING, TOP, 'top'), _defineProperty(_FACING_TO_STRING, RIGHT, 'right'), _defineProperty(_FACING_TO_STRING, BOTTOM, 'bottom'), _defineProperty(_FACING_TO_STRING, LEFT, 'left'), _FACING_TO_STRING);\n\nvar FACING_TO_MOD = exports.FACING_TO_MOD = (_FACING_TO_MOD = {}, _defineProperty(_FACING_TO_MOD, TOP, [0, -1]), _defineProperty(_FACING_TO_MOD, RIGHT, [1, 0]), _defineProperty(_FACING_TO_MOD, BOTTOM, [0, 1]), _defineProperty(_FACING_TO_MOD, LEFT, [-1, 0]), _FACING_TO_MOD);\n\nvar FACING_INVERSE = exports.FACING_INVERSE = (_FACING_INVERSE = {}, _defineProperty(_FACING_INVERSE, TOP, BOTTOM), _defineProperty(_FACING_INVERSE, RIGHT, LEFT), _defineProperty(_FACING_INVERSE, BOTTOM, TOP), _defineProperty(_FACING_INVERSE, LEFT, RIGHT), _FACING_INVERSE);\n\nvar FACING_MOD_RIGHT = exports.FACING_MOD_RIGHT = (_FACING_MOD_RIGHT = {}, _defineProperty(_FACING_MOD_RIGHT, TOP, RIGHT), _defineProperty(_FACING_MOD_RIGHT, RIGHT, BOTTOM), _defineProperty(_FACING_MOD_RIGHT, BOTTOM, LEFT), _defineProperty(_FACING_MOD_RIGHT, LEFT, TOP), _FACING_MOD_RIGHT);\n\nvar FACING_MOD_LEFT = exports.FACING_MOD_LEFT = (_FACING_MOD_LEFT = {}, _defineProperty(_FACING_MOD_LEFT, TOP, LEFT), _defineProperty(_FACING_MOD_LEFT, RIGHT, TOP), _defineProperty(_FACING_MOD_LEFT, BOTTOM, RIGHT), _defineProperty(_FACING_MOD_LEFT, LEFT, BOTTOM), _FACING_MOD_LEFT);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.iter_adjacent = iter_adjacent;\nexports.iter_2d = iter_2d;\nexports.iter_range = iter_range;\nexports.intersects = intersects;\nexports.array_test = array_test;\nexports.add = add;\nexports.shift = shift;\nexports.shift_left = shift_left;\nexports.shift_right = shift_right;\n\nvar _const = require('../const');\n\nfunction iter_adjacent(_ref, cb) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n cb([x - 1, y]);\n cb([x, y - 1]);\n cb([x + 1, y]);\n cb([x, y + 1]);\n}\n\nfunction iter_2d(size, callback) {\n for (var y = 0; y < size[1]; y++) {\n for (var x = 0; x < size[0]; x++) {\n callback([x, y]);\n }\n }\n}\n\nfunction iter_range(from, to, callback) {\n var fx = void 0,\n fy = void 0,\n tx = void 0,\n ty = void 0;\n if (from[0] < to[0]) {\n fx = from[0];\n tx = to[0];\n } else {\n fx = to[0];\n tx = from[0];\n }\n if (from[1] < to[1]) {\n fy = from[1];\n ty = to[1];\n } else {\n fy = to[1];\n ty = from[1];\n }\n for (var x = fx; x <= tx; x++) {\n for (var y = fy; y <= ty; y++) {\n callback([x, y]);\n }\n }\n}\n\nfunction intersects(pos_1, size_1, pos_2, size_2) {\n return !pos_2[0] > pos_1[0] + size_1[0] || pos_2[0] + size_2[0] < pos_1[0] || pos_2[1] > pos_1[1] + size_1[1] || pos_2[1] + size_2[1] < size_1[1];\n}\n\nfunction array_test(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (test(array[i])) {\n return true;\n }\n }\n return false;\n}\n\nfunction add(p1, p2) {\n return [p1[0] + p2[0], p1[1] + p2[1]];\n}\n\nfunction shift(pos, facing) {\n return add(pos, _const.FACING_TO_MOD[facing]);\n}\n\nfunction shift_left(pos, facing) {\n return shift(pos, (facing - 90 + 360) % 360);\n}\n\nfunction shift_right(pos, facing) {\n return shift(pos, (facing + 90 + 360) % 360);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _array2d = require('../utils/array2d');\n\nvar _array2d2 = _interopRequireDefault(_array2d);\n\nvar _rectangle = require('../utils/rectangle');\n\nvar _rectangle2 = _interopRequireDefault(_rectangle);\n\nvar _utils = require('../utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar next_piece_id = 0;\n\n// base dungeon piece class, to be extended\n\nvar Piece = function () {\n function Piece(options) {\n _classCallCheck(this, Piece);\n\n options = Object.assign({\n size: [1, 1],\n position: [0, 0],\n parent: null,\n max_exits: 10,\n tag: ''\n }, options);\n\n Object.assign(this, options);\n\n this.options = options;\n\n this.id = next_piece_id++;\n this.walls = new _array2d2.default(this.size, true);\n this.perimeter = [];\n this.exits = [];\n this.children = [];\n }\n\n _createClass(Piece, [{\n key: 'is_exit',\n value: function is_exit(_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n return this.exits.filter(function (_ref3) {\n var _ref4 = _toArray(_ref3),\n exit_x = _ref4[0],\n exit_y = _ref4[1],\n rest = _ref4.slice(2);\n\n return exit_x === x && exit_y === y;\n }).length !== 0;\n }\n }, {\n key: 'get_non_wall_tiles',\n value: function get_non_wall_tiles() {\n var retv = [];\n this.walls.iter(function (pos, is_wall) {\n if (!is_wall) {\n retv.push(pos);\n }\n });\n return retv;\n }\n }, {\n key: 'get_perimeter_by_facing',\n value: function get_perimeter_by_facing(facing) {\n return this.perimeter.filter(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n _ref6$ = _slicedToArray(_ref6[0], 2),\n x = _ref6$[0],\n y = _ref6$[1],\n f = _ref6[1];\n\n return facing === f;\n });\n }\n }, {\n key: 'get_inner_perimeter',\n value: function get_inner_perimeter() {\n var _this = this;\n\n // returns array of tiles in the piece that are adjacent to a wall,\n // but not an exit;\n\n var retv = [];\n var haswall = void 0;\n var exit_adjacent = void 0;\n\n this.walls.iter(function (pos, is_wall) {\n if (!is_wall && !_this.is_exit(pos)) {\n haswall = false;\n exit_adjacent = false;\n (0, _utils.iter_adjacent)(pos, function (p) {\n haswall = haswall || _this.walls.get(p);\n exit_adjacent = exit_adjacent || _this.is_exit(p);\n });\n if (haswall && !exit_adjacent) {\n retv.push(pos);\n }\n }\n });\n\n return retv;\n }\n\n // local position to parent position\n\n }, {\n key: 'parent_pos',\n value: function parent_pos(_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n x = _ref8[0],\n y = _ref8[1];\n\n return [this.position[0] + x, this.position[1] + y];\n }\n\n // local position to global position\n\n }, {\n key: 'global_pos',\n value: function global_pos(pos) {\n pos = this.parent_pos(pos);\n if (this.parent) {\n pos = this.parent.global_pos(pos);\n }\n return pos;\n }\n\n // parent position to local position\n\n }, {\n key: 'local_pos',\n value: function local_pos(pos) {\n return [pos[0] - this.position[0], pos[1] - this.position[1]];\n }\n\n // get (roughly) center tile position for the piece\n // @TODO consider if should use Math.floor instead of Math.round\n\n }, {\n key: 'get_center_pos',\n value: function get_center_pos() {\n return [Math.floor(this.size[0] / 2), Math.floor(this.size[1] / 2)];\n }\n }, {\n key: 'add_perimeter',\n value: function add_perimeter(p_from, p_to, facing) {\n var _this2 = this;\n\n (0, _utils.iter_range)(p_from, p_to, function (pos) {\n _this2.perimeter.push([pos, facing]);\n });\n }\n }, {\n key: 'remove_perimeter',\n value: function remove_perimeter(rect) {\n this.perimeter = this.perimeter.filter(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 3),\n x = _ref10[0],\n y = _ref10[1],\n facing = _ref10[2];\n\n return !rect.contains(x, y, 1, 1);\n });\n }\n }, {\n key: 'intersects',\n value: function intersects(piece) {\n return (0, _utils.intersects)(this.position, this.size, piece.position, piece.size);\n }\n }, {\n key: 'add_piece',\n value: function add_piece(piece) {\n var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if ((0, _utils.array_test)(this.children, function (c) {\n return c.id === piece.id;\n })) {\n return;\n }\n piece.parent = this;\n if (position) {\n piece.position = position;\n }\n this.children.push(piece);\n this.paste_in(piece);\n }\n }, {\n key: 'paste_in',\n value: function paste_in(piece) {\n var _this3 = this;\n\n (0, _utils.iter_2d)(piece.size, function (pos) {\n var is_wall = piece.walls.get(pos);\n if (!is_wall) {\n _this3.walls.set(piece.parent_pos(pos), false);\n }\n });\n }\n }, {\n key: 'add_exit',\n value: function add_exit(exit, room) {\n this.walls.set(exit[0], false);\n if (this.parent) {\n this.parent.paste_in(this);\n }\n this.exits.push([exit[0], exit[1], room]);\n }\n }, {\n key: 'print',\n value: function print() {\n for (var y = 0; y < this.size[1]; y++) {\n var row = '';\n for (var x = 0; x < this.size[0]; x++) {\n if (this.start_pos && this.start_pos[0] === x && this.start_pos[1] === y) {\n row += 's';\n } else {\n row += this.walls.get([x, y]) ? 'x' : ' ';\n }\n }\n console.log(row);\n }\n }\n }, {\n key: 'rect',\n get: function get() {\n return new _rectangle2.default(this.position[0], this.position[1], this.size[0], this.size[1]);\n }\n }]);\n\n return Piece;\n}();\n\nexports.default = Piece;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _random = require('../utils/random');\n\nvar _random2 = _interopRequireDefault(_random);\n\nvar _piece = require('../pieces/piece');\n\nvar _piece2 = _interopRequireDefault(_piece);\n\nvar _rectangle = require('../utils/rectangle');\n\nvar _rectangle2 = _interopRequireDefault(_rectangle);\n\nvar _const = require('../const');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Generator = function (_Piece) {\n _inherits(Generator, _Piece);\n\n function Generator(options) {\n _classCallCheck(this, Generator);\n\n var _this = _possibleConstructorReturn(this, (Generator.__proto__ || Object.getPrototypeOf(Generator)).call(this, options));\n\n _this.random = new _random2.default(_this.seed);\n\n _this.start_pos = [0, 0];\n _this.minx = _this.size[0];\n _this.maxx = 0;\n _this.miny = _this.size[1];\n _this.maxy = 0;\n return _this;\n }\n\n _createClass(Generator, [{\n key: 'add_piece',\n value: function add_piece(piece, position) {\n _get(Generator.prototype.__proto__ || Object.getPrototypeOf(Generator.prototype), 'add_piece', this).call(this, piece, position);\n\n this.minx = Math.min(this.minx, piece.position[0]);\n this.maxx = Math.max(this.maxx, piece.position[0] + piece.size[0]);\n\n this.miny = Math.min(this.miny, piece.position[1]);\n this.maxy = Math.max(this.maxy, piece.position[1] + piece.size[1]);\n }\n }, {\n key: 'trim',\n value: function trim() {\n var _this2 = this;\n\n this.size = [this.maxx - this.minx, this.maxy - this.miny];\n this.children.forEach(function (child) {\n child.position = [child.position[0] - _this2.minx, child.position[1] - _this2.miny];\n });\n\n this.start_pos = [this.start_pos[0] - this.minx, this.start_pos[1] - this.miny];\n this.walls = this.walls.get_square([this.minx, this.miny], this.size);\n\n this.minx = 0;\n this.maxx = this.size[0];\n\n this.miny = 0;\n this.maxy = this.size[1];\n }\n }, {\n key: 'generate',\n value: function generate() {\n throw new Error('not implemented');\n }\n }, {\n key: 'fits',\n value: function fits(piece, position) {\n var p = void 0,\n x = void 0,\n y = void 0;\n for (x = 0; x < piece.size[0]; x++) {\n for (y = 0; y < piece.size[1]; y++) {\n p = this.walls.get([position[0] + x, position[1] + y]);\n if (p === false || p === null || p === undefined) {\n return false;\n }\n }\n }\n return true;\n }\n }, {\n key: 'join_exits',\n value: function join_exits(piece1, piece1_exit, piece2, piece2_exit) {\n /*\n register an exit with each piece, remove intersecting perimeter tiles\n */\n\n piece1.add_exit(piece1_exit, piece2);\n piece2.add_exit(piece2_exit, piece1);\n\n var ic = piece1.rect.intersection(piece2.rect);\n if (ic) {\n piece1.remove_perimeter(new _rectangle2.default(piece1.local_pos([ic[0], ic[1]], [ic.width, ic.height])));\n piece2.remove_perimeter(new _rectangle2.default(piece2.local_pos([ic[0], ic[1]], [ic.width, ic.height])));\n }\n }\n }, {\n key: 'join',\n value: function join(piece1, piece2_exit, piece2, piece1_exit) {\n /*\n join piece 1 to piece2 provided at least one exit.\n piece1 should already be placed\n */\n if (!piece1_exit) {\n piece1_exit = this.random.choose(piece1.get_perimeter_by_facing(_const.FACING_INVERSE[piece2_exit[1]]));\n }\n\n // global piece2 exit pos\n var piece2_exit_pos = piece1.parent_pos(piece1_exit[0]);\n\n // figure out piece2 position\n var piece2_pos = [piece2_exit_pos[0] - piece2_exit[0][0], piece2_exit_pos[1] - piece2_exit[0][1]];\n\n if (!this.fits(piece2, piece2_pos)) {\n return false;\n }\n\n this.join_exits(piece1, piece1_exit, piece2, piece2_exit);\n this.add_piece(piece2, piece2_pos);\n\n return true;\n }\n }, {\n key: 'get_open_pieces',\n value: function get_open_pieces(pieces) {\n // filter out pieces\n return pieces.filter(function (piece) {\n return piece.exits.length < piece.max_exits && piece.perimeter.length;\n });\n }\n }]);\n\n return Generator;\n}(_piece2.default);\n\nexports.default = Generator;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _piece = require('./piece');\n\nvar _piece2 = _interopRequireDefault(_piece);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Room = function (_Piece) {\n _inherits(Room, _Piece);\n\n function Room(options) {\n _classCallCheck(this, Room);\n\n /*\n note, size to be provided is size without walls.\n */\n options.room_size = options.size;\n options.size = [options.size[0] + 2, options.size[1] + 2];\n\n options = Object.assign({}, {\n symmetric: false // if true,\n }, options);\n\n var _this = _possibleConstructorReturn(this, (Room.__proto__ || Object.getPrototypeOf(Room)).call(this, options));\n\n _this.walls.set_square([1, 1], _this.room_size, false, true);\n\n if (!_this.symmetric) {\n // any point at any wall can be exit\n _this.add_perimeter([1, 0], [_this.size[0] - 2, 0], 180);\n _this.add_perimeter([0, 1], [0, _this.size[1] - 2], 90);\n _this.add_perimeter([1, _this.size[1] - 1], [_this.size[0] - 2, _this.size[1] - 1], 0);\n _this.add_perimeter([_this.size[0] - 1, 1], [_this.size[0] - 1, _this.size[1] - 2], 270);\n } else {\n // only middle of each wall can be exit\n var _this$get_center_pos = _this.get_center_pos(),\n _this$get_center_pos2 = _slicedToArray(_this$get_center_pos, 2),\n w = _this$get_center_pos2[0],\n h = _this$get_center_pos2[1];\n\n _this.perimeter = [[[w, 0], 180], [[_this.size[0] - 1, h], 270], [[w, _this.size[1] - 1], 0], [[0, h], 90]];\n }\n return _this;\n }\n\n return Room;\n}(_piece2.default);\n\nexports.default = Room;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _room = require('./room');\n\nvar _room2 = _interopRequireDefault(_room);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Corridor = function (_Room) {\n _inherits(Corridor, _Room);\n\n function Corridor(options) {\n _classCallCheck(this, Corridor);\n\n options = Object.assign({}, {\n length: 2,\n facing: 0,\n max_exits: 4\n }, options);\n\n options.size = options.facing === 0 || options.facing === 180 ? [1, options.length] : [options.length, 1];\n\n var _this = _possibleConstructorReturn(this, (Corridor.__proto__ || Object.getPrototypeOf(Corridor)).call(this, options));\n\n var w = _this.size[0] - 1;\n var h = _this.size[1] - 1;\n\n // special perimeter: allow only 4 exit points, to keep this corridor corridor-like..\n if (_this.facing === 180) {\n _this.perimeter = [[[1, h], 0], [[0, 1], 90], [[2, 1], 270], [[1, 0], 180]];\n } else if (_this.facing === 270) {\n _this.perimeter = [[[0, 1], 90], [[w - 1, 0], 180], [[w - 1, 2], 0], [[w, 1], 270]];\n } else if (_this.facing === 0) {\n _this.perimeter = [[[1, 0], 180], [[2, h - 1], 270], [[0, h - 1], 90], [[1, h], 0]];\n } else if (_this.facing === 90) {\n _this.perimeter = [[[w, 1], 270], [[1, 2], 0], [[1, 0], 180], [[0, 1], 90]];\n }\n return _this;\n }\n\n return Corridor;\n}(_room2.default);\n\nexports.default = Corridor;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _generator = require('./generator');\n\nvar _generator2 = _interopRequireDefault(_generator);\n\nvar _corridor = require('../pieces/corridor');\n\nvar _corridor2 = _interopRequireDefault(_corridor);\n\nvar _room = require('../pieces/room');\n\nvar _room2 = _interopRequireDefault(_room);\n\nvar _const = require('../const');\n\nvar _utils = require('../utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dungeon = function (_Generator) {\n _inherits(Dungeon, _Generator);\n\n function Dungeon(options) {\n _classCallCheck(this, Dungeon);\n\n options = Object.assign({}, {\n max_iterations: 50,\n size: [100, 100],\n rooms: {\n initial: {\n min_size: [3, 3],\n max_size: [3, 3],\n max_exits: 1\n },\n any: {\n min_size: [2, 2],\n max_size: [5, 5],\n max_exits: 4\n }\n },\n max_corridor_length: 6,\n min_corridor_length: 2,\n corridor_density: 0.5, // corridors per room\n symmetric_rooms: false, // exits must be in the middle of walls\n interconnects: 1, // extra corridors to connect rooms and make circular paths. not guaranteed\n max_interconnect_length: 10,\n room_count: 10\n }, options);\n\n var _this = _possibleConstructorReturn(this, (Dungeon.__proto__ || Object.getPrototypeOf(Dungeon)).call(this, options));\n\n _this.room_tags = Object.keys(_this.rooms).filter(function (tag) {\n return tag !== 'any' && tag !== 'initial';\n });\n\n for (var i = _this.room_tags.length; i < _this.room_count; i++) {\n _this.room_tags.push('any');\n }\n\n _this.rooms = [];\n _this.corridors = [];\n return _this;\n }\n\n _createClass(Dungeon, [{\n key: 'add_room',\n value: function add_room(room, exit) {\n var add_to_room = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n // add a new piece, exit is local perimeter pos for that exit;\n var choices = void 0,\n old_room = void 0;\n // pick a placed room to connect this piece to\n if (add_to_room) {\n old_room = add_to_room;\n add_to_room = null;\n } else {\n choices = this.get_open_pieces(this.children);\n if (choices && choices.length) {\n old_room = this.random.choose(choices);\n } else {\n console.log('ran out of choices connecting');\n return false;\n }\n }\n\n // if exit is specified, try joining to this specific exit\n if (exit) {\n // try joining the rooms\n if (this.join(old_room, exit, room)) {\n return true;\n }\n // else try all perims to see\n } else {\n var perim = room.perimeter.slice();\n while (perim.length) {\n if (this.join(old_room, this.random.choose(perim, true), room)) {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: 'new_corridor',\n value: function new_corridor() {\n return new _corridor2.default({\n length: this.random.int(this.min_corridor_length, this.max_corridor_length),\n facing: this.random.choose(_const.FACING)\n });\n }\n }, {\n key: 'add_interconnect',\n value: function add_interconnect() {\n var perims = {};\n var hash = void 0;\n var exit = void 0;\n var p = void 0;\n\n // hash all possible exits\n this.children.forEach(function (child) {\n if (child.exits.length < child.max_exits) {\n child.perimeter.forEach(function (exit) {\n p = child.parent_pos(exit[0]);\n hash = p[0] + '_' + p[1];\n perims[hash] = [exit, child];\n });\n }\n });\n\n // search each room for a possible interconnect, backwards\n var room = void 0,\n length = void 0,\n corridor = void 0,\n room2 = void 0;\n for (var i = this.children.length - 1; i--; i >= 0) {\n room = this.children[i];\n\n // if room has exits available\n if (room.exits.length < room.max_exits) {\n // iterate exits\n for (var k = 0; k < room.perimeter.length; k++) {\n exit = room.perimeter[k];\n p = room.parent_pos(exit[0]);\n length = -1;\n\n // try to dig a tunnel from this exit and see if it hits anything\n while (length <= this.max_interconnect_length) {\n // check if space is not occupied\n if (!this.walls.get(p) || !this.walls.get((0, _utils.shift_left)(p, exit[1])) || !this.walls.get((0, _utils.shift_right)(p, exit[1]))) {\n break;\n }\n hash = p[0] + '_' + p[1];\n\n // is there a potential exit at these coordiantes (not of the same room)\n if (perims[hash] && perims[hash][1].id !== room.id) {\n room2 = perims[hash][1];\n\n // rooms cant be joined directly, add a corridor\n if (length > -1) {\n corridor = new _corridor2.default({\n length: length,\n facing: exit[1]\n });\n\n if (this.join(room, corridor.perimeter[0], corridor, exit)) {\n this.join_exits(room2, perims[hash][0], corridor, corridor.perimeter[corridor.perimeter.length - 1]);\n return true;\n } else {\n return false;\n }\n // rooms can be joined directly\n } else {\n this.join_exits(room2, perims[hash][0], room, exit);\n return true;\n }\n }\n\n // exit not found, try to make the interconnect longer\n p = (0, _utils.shift)(p, exit[1]);\n length++;\n }\n }\n }\n }\n }\n }, {\n key: 'new_room',\n value: function new_room(key) {\n // spawn next room\n key = key || this.random.choose(this.room_tags, false);\n\n var opts = this.options.rooms[key];\n\n var room = new _room2.default({\n size: this.random.vec(opts.min_size, opts.max_size),\n max_exits: opts.max_exits,\n symmetric: this.symmetric_rooms,\n tag: key\n });\n\n this.room_tags.splice(this.room_tags.indexOf(key), 1);\n\n if (key === 'initial') {\n this.initial_room = room;\n }\n return room;\n }\n }, {\n key: 'generate',\n value: function generate() {\n var no_rooms = this.options.room_count - 1;\n var room = this.new_room(this.options.rooms.initial ? 'initial' : undefined);\n var no_corridors = Math.round(this.corridor_density * no_rooms);\n\n this.add_piece(room, this.options.rooms.initial && this.options.rooms.initial.position ? this.options.rooms.initial.position : this.get_center_pos());\n\n var k = void 0;\n var iterations = this.max_iterations;\n\n while ((no_corridors || no_rooms) && --iterations) {\n k = this.random.int(1, no_rooms + no_corridors);\n if (k <= no_corridors) {\n var corridor = this.new_corridor();\n var added = this.add_room(corridor, corridor.perimeter[0]);\n no_corridors--;\n\n // try to connect to this corridor next\n if (no_rooms > 0 && added) {\n this.add_room(this.new_room(), null, corridor);\n no_rooms--;\n }\n } else {\n this.add_room(this.new_room());\n no_rooms--;\n }\n }\n\n for (k = 0; k < this.interconnects; k++) {\n this.add_interconnect();\n }\n\n this.trim();\n\n if (this.initial_room) {\n this.start_pos = this.initial_room.global_pos(this.initial_room.get_center_pos());\n }\n\n return iterations > 0;\n }\n }]);\n\n return Dungeon;\n}(_generator2.default);\n\nexports.default = Dungeon;","module.exports = require('./lib/generators/dungeon').default;\n\n","// Chance.js 1.1.8\n// http://chancejs.com\n// (c) 2013 Victor Quinn\n// Chance may be freely distributed or modified under the MIT license.\n\n(function () {\n\n // Constants\n var MAX_INT = 9007199254740992;\n var MIN_INT = -MAX_INT;\n var NUMBERS = '0123456789';\n var CHARS_LOWER = 'abcdefghijklmnopqrstuvwxyz';\n var CHARS_UPPER = CHARS_LOWER.toUpperCase();\n var HEX_POOL = NUMBERS + \"abcdef\";\n\n // Errors\n function UnsupportedError(message) {\n this.name = 'UnsupportedError';\n this.message = message || 'This feature is not supported on this platform';\n }\n\n UnsupportedError.prototype = new Error();\n UnsupportedError.prototype.constructor = UnsupportedError;\n\n // Cached array helpers\n var slice = Array.prototype.slice;\n\n // Constructor\n function Chance (seed) {\n if (!(this instanceof Chance)) {\n if (!seed) { seed = null; } // handle other non-truthy seeds, as described in issue #322\n return seed === null ? new Chance() : new Chance(seed);\n }\n\n // if user has provided a function, use that as the generator\n if (typeof seed === 'function') {\n this.random = seed;\n return this;\n }\n\n if (arguments.length) {\n // set a starting value of zero so we can add to it\n this.seed = 0;\n }\n\n // otherwise, leave this.seed blank so that MT will receive a blank\n\n for (var i = 0; i < arguments.length; i++) {\n var seedling = 0;\n if (Object.prototype.toString.call(arguments[i]) === '[object String]') {\n for (var j = 0; j < arguments[i].length; j++) {\n // create a numeric hash for each argument, add to seedling\n var hash = 0;\n for (var k = 0; k < arguments[i].length; k++) {\n hash = arguments[i].charCodeAt(k) + (hash << 6) + (hash << 16) - hash;\n }\n seedling += hash;\n }\n } else {\n seedling = arguments[i];\n }\n this.seed += (arguments.length - i) * seedling;\n }\n\n // If no generator function was provided, use our MT\n this.mt = this.mersenne_twister(this.seed);\n this.bimd5 = this.blueimp_md5();\n this.random = function () {\n return this.mt.random(this.seed);\n };\n\n return this;\n }\n\n Chance.prototype.VERSION = \"1.1.8\";\n\n // Random helper functions\n function initOptions(options, defaults) {\n options = options || {};\n\n if (defaults) {\n for (var i in defaults) {\n if (typeof options[i] === 'undefined') {\n options[i] = defaults[i];\n }\n }\n }\n\n return options;\n }\n\n function range(size) {\n return Array.apply(null, Array(size)).map(function (_, i) {return i;});\n }\n\n function testRange(test, errorMessage) {\n if (test) {\n throw new RangeError(errorMessage);\n }\n }\n\n /**\n * Encode the input string with Base64.\n */\n var base64 = function() {\n throw new Error('No Base64 encoder available.');\n };\n\n // Select proper Base64 encoder.\n (function determineBase64Encoder() {\n if (typeof btoa === 'function') {\n base64 = btoa;\n } else if (typeof Buffer === 'function') {\n base64 = function(input) {\n return new Buffer(input).toString('base64');\n };\n }\n })();\n\n // -- Basics --\n\n /**\n * Return a random bool, either true or false\n *\n * @param {Object} [options={ likelihood: 50 }] alter the likelihood of\n * receiving a true or false value back.\n * @throws {RangeError} if the likelihood is out of bounds\n * @returns {Bool} either true or false\n */\n Chance.prototype.bool = function (options) {\n // likelihood of success (true)\n options = initOptions(options, {likelihood : 50});\n\n // Note, we could get some minor perf optimizations by checking range\n // prior to initializing defaults, but that makes code a bit messier\n // and the check more complicated as we have to check existence of\n // the object then existence of the key before checking constraints.\n // Since the options initialization should be minor computationally,\n // decision made for code cleanliness intentionally. This is mentioned\n // here as it's the first occurrence, will not be mentioned again.\n testRange(\n options.likelihood < 0 || options.likelihood > 100,\n \"Chance: Likelihood accepts values from 0 to 100.\"\n );\n\n return this.random() * 100 < options.likelihood;\n };\n\n Chance.prototype.falsy = function (options) {\n // return a random falsy value\n options = initOptions(options, {pool: [false, null, 0, NaN, '']})\n var pool = options.pool,\n index = this.integer({min: 0, max: pool.length}),\n value = pool[index];\n\n return value;\n }\n\n Chance.prototype.animal = function (options){\n //returns a random animal\n options = initOptions(options);\n\n if(typeof options.type !== 'undefined'){\n //if user does not put in a valid animal type, user will get an error\n testRange(\n !this.get(\"animals\")[options.type.toLowerCase()],\n \"Please pick from desert, ocean, grassland, forest, zoo, pets, farm.\"\n );\n //if user does put in valid animal type, will return a random animal of that type\n return this.pick(this.get(\"animals\")[options.type.toLowerCase()]);\n }\n //if user does not put in any animal type, will return a random animal regardless\n var animalTypeArray = [\"desert\",\"forest\",\"ocean\",\"zoo\",\"farm\",\"pet\",\"grassland\"];\n return this.pick(this.get(\"animals\")[this.pick(animalTypeArray)]);\n };\n\n /**\n * Return a random character.\n *\n * @param {Object} [options={}] can specify a character pool or alpha,\n * numeric, symbols and casing (lower or upper)\n * @returns {String} a single random character\n */\n Chance.prototype.character = function (options) {\n options = initOptions(options);\n\n var symbols = \"!@#$%^&*()[]\",\n letters, pool;\n\n if (options.casing === 'lower') {\n letters = CHARS_LOWER;\n } else if (options.casing === 'upper') {\n letters = CHARS_UPPER;\n } else {\n letters = CHARS_LOWER + CHARS_UPPER;\n }\n\n if (options.pool) {\n pool = options.pool;\n } else {\n pool = '';\n if (options.alpha) {\n pool += letters;\n }\n if (options.numeric) {\n pool += NUMBERS;\n }\n if (options.symbols) {\n pool += symbols;\n }\n if (!pool) {\n pool = letters + NUMBERS + symbols;\n }\n }\n\n return pool.charAt(this.natural({max: (pool.length - 1)}));\n };\n\n // Note, wanted to use \"float\" or \"double\" but those are both JS reserved words.\n\n // Note, fixed means N OR LESS digits after the decimal. This because\n // It could be 14.9000 but in JavaScript, when this is cast as a number,\n // the trailing zeroes are dropped. Left to the consumer if trailing zeroes are\n // needed\n /**\n * Return a random floating point number\n *\n * @param {Object} [options={}] can specify a fixed precision, min, max\n * @returns {Number} a single floating point number\n * @throws {RangeError} Can only specify fixed or precision, not both. Also\n * min cannot be greater than max\n */\n Chance.prototype.floating = function (options) {\n options = initOptions(options, {fixed : 4});\n testRange(\n options.fixed && options.precision,\n \"Chance: Cannot specify both fixed and precision.\"\n );\n\n var num;\n var fixed = Math.pow(10, options.fixed);\n\n var max = MAX_INT / fixed;\n var min = -max;\n\n testRange(\n options.min && options.fixed && options.min < min,\n \"Chance: Min specified is out of range with fixed. Min should be, at least, \" + min\n );\n testRange(\n options.max && options.fixed && options.max > max,\n \"Chance: Max specified is out of range with fixed. Max should be, at most, \" + max\n );\n\n options = initOptions(options, { min : min, max : max });\n\n // Todo - Make this work!\n // options.precision = (typeof options.precision !== \"undefined\") ? options.precision : false;\n\n num = this.integer({min: options.min * fixed, max: options.max * fixed});\n var num_fixed = (num / fixed).toFixed(options.fixed);\n\n return parseFloat(num_fixed);\n };\n\n /**\n * Return a random integer\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.integer({min: 1, max: 3});\n * would return either 1, 2, or 3.\n *\n * @param {Object} [options={}] can specify a min and/or max\n * @returns {Number} a single random integer number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.integer = function (options) {\n // 9007199254740992 (2^53) is the max integer number in JavaScript\n // See: http://vq.io/132sa2j\n options = initOptions(options, {min: MIN_INT, max: MAX_INT});\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return Math.floor(this.random() * (options.max - options.min + 1) + options.min);\n };\n\n /**\n * Return a random natural\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.natural({min: 1, max: 3});\n * would return either 1, 2, or 3.\n *\n * @param {Object} [options={}] can specify a min and/or max or a numerals count.\n * @returns {Number} a single random integer number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.natural = function (options) {\n options = initOptions(options, {min: 0, max: MAX_INT});\n if (typeof options.numerals === 'number'){\n testRange(options.numerals < 1, \"Chance: Numerals cannot be less than one.\");\n options.min = Math.pow(10, options.numerals - 1);\n options.max = Math.pow(10, options.numerals) - 1;\n }\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n\n if (options.exclude) {\n testRange(!Array.isArray(options.exclude), \"Chance: exclude must be an array.\")\n\n for (var exclusionIndex in options.exclude) {\n testRange(!Number.isInteger(options.exclude[exclusionIndex]), \"Chance: exclude must be numbers.\")\n }\n\n var random = options.min + this.natural({max: options.max - options.min - options.exclude.length})\n var sortedExclusions = options.exclude.sort();\n for (var sortedExclusionIndex in sortedExclusions) {\n if (random < sortedExclusions[sortedExclusionIndex]) {\n break\n }\n random++\n }\n return random\n }\n return this.integer(options);\n };\n\n /**\n * Return a random prime number\n *\n * NOTE the max and min are INCLUDED in the range.\n *\n * @param {Object} [options={}] can specify a min and/or max\n * @returns {Number} a single random prime number\n * @throws {RangeError} min cannot be greater than max nor negative\n */\n Chance.prototype.prime = function (options) {\n options = initOptions(options, {min: 0, max: 10000});\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n var lastPrime = data.primes[data.primes.length - 1];\n if (options.max > lastPrime) {\n for (var i = lastPrime + 2; i <= options.max; ++i) {\n if (this.is_prime(i)) {\n data.primes.push(i);\n }\n }\n }\n var targetPrimes = data.primes.filter(function (prime) {\n return prime >= options.min && prime <= options.max;\n });\n return this.pick(targetPrimes);\n };\n\n /**\n * Determine whether a given number is prime or not.\n */\n Chance.prototype.is_prime = function (n) {\n if (n % 1 || n < 2) {\n return false;\n }\n if (n % 2 === 0) {\n return n === 2;\n }\n if (n % 3 === 0) {\n return n === 3;\n }\n var m = Math.sqrt(n);\n for (var i = 5; i <= m; i += 6) {\n if (n % i === 0 || n % (i + 2) === 0) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * Return a random hex number as string\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.hex({min: '9', max: 'B'});\n * would return either '9', 'A' or 'B'.\n *\n * @param {Object} [options={}] can specify a min and/or max and/or casing\n * @returns {String} a single random string hex number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.hex = function (options) {\n options = initOptions(options, {min: 0, max: MAX_INT, casing: 'lower'});\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n\t\tvar integer = this.natural({min: options.min, max: options.max});\n\t\tif (options.casing === 'upper') {\n\t\t\treturn integer.toString(16).toUpperCase();\n\t\t}\n\t\treturn integer.toString(16);\n };\n\n Chance.prototype.letter = function(options) {\n options = initOptions(options, {casing: 'lower'});\n var pool = \"abcdefghijklmnopqrstuvwxyz\";\n var letter = this.character({pool: pool});\n if (options.casing === 'upper') {\n letter = letter.toUpperCase();\n }\n return letter;\n }\n\n /**\n * Return a random string\n *\n * @param {Object} [options={}] can specify a length or min and max\n * @returns {String} a string of random length\n * @throws {RangeError} length cannot be less than zero\n */\n Chance.prototype.string = function (options) {\n options = initOptions(options, { min: 5, max: 20 });\n\n if (!options.length) {\n options.length = this.natural({ min: options.min, max: options.max })\n }\n\n testRange(options.length < 0, \"Chance: Length cannot be less than zero.\");\n var length = options.length,\n text = this.n(this.character, length, options);\n\n return text.join(\"\");\n };\n\n function CopyToken(c) {\n this.c = c\n }\n\n CopyToken.prototype = {\n substitute: function () {\n return this.c\n }\n }\n\n function EscapeToken(c) {\n this.c = c\n }\n\n EscapeToken.prototype = {\n substitute: function () {\n if (!/[{}\\\\]/.test(this.c)) {\n throw new Error('Invalid escape sequence: \"\\\\' + this.c + '\".')\n }\n return this.c\n }\n }\n\n function ReplaceToken(c) {\n this.c = c\n }\n\n ReplaceToken.prototype = {\n replacers: {\n '#': function (chance) { return chance.character({ pool: NUMBERS }) },\n 'A': function (chance) { return chance.character({ pool: CHARS_UPPER }) },\n 'a': function (chance) { return chance.character({ pool: CHARS_LOWER }) },\n },\n\n substitute: function (chance) {\n var replacer = this.replacers[this.c]\n if (!replacer) {\n throw new Error('Invalid replacement character: \"' + this.c + '\".')\n }\n return replacer(chance)\n }\n }\n\n function parseTemplate(template) {\n var tokens = []\n var mode = 'identity'\n for (var i = 0; i MAX_DUPLICATES) {\n throw new RangeError(\"Chance: num is likely too large for sample set\");\n }\n }\n return arr;\n };\n\n /**\n * Gives an array of n random terms\n *\n * @param {Function} fn the function that generates something random\n * @param {Number} n number of terms to generate\n * @returns {Array} an array of length `n` with items generated by `fn`\n *\n * There can be more parameters after these. All additional parameters are provided to the given function\n */\n Chance.prototype.n = function(fn, n) {\n testRange(\n typeof fn !== \"function\",\n \"Chance: The first argument must be a function.\"\n );\n\n if (typeof n === 'undefined') {\n n = 1;\n }\n var i = n, arr = [], params = slice.call(arguments, 2);\n\n // Providing a negative count should result in a noop.\n i = Math.max( 0, i );\n\n for (null; i--; null) {\n arr.push(fn.apply(this, params));\n }\n\n return arr;\n };\n\n // H/T to SO for this one: http://vq.io/OtUrZ5\n Chance.prototype.pad = function (number, width, pad) {\n // Default pad to 0 if none provided\n pad = pad || '0';\n // Convert number to a string\n number = number + '';\n return number.length >= width ? number : new Array(width - number.length + 1).join(pad) + number;\n };\n\n // DEPRECATED on 2015-10-01\n Chance.prototype.pick = function (arr, count) {\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pick() from an empty array\");\n }\n if (!count || count === 1) {\n return arr[this.natural({max: arr.length - 1})];\n } else {\n return this.shuffle(arr).slice(0, count);\n }\n };\n\n // Given an array, returns a single random element\n Chance.prototype.pickone = function (arr) {\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pickone() from an empty array\");\n }\n return arr[this.natural({max: arr.length - 1})];\n };\n\n // Given an array, returns a random set with 'count' elements\n Chance.prototype.pickset = function (arr, count) {\n if (count === 0) {\n return [];\n }\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pickset() from an empty array\");\n }\n if (count < 0) {\n throw new RangeError(\"Chance: Count must be a positive number\");\n }\n if (!count || count === 1) {\n return [ this.pickone(arr) ];\n } else {\n var array = arr.slice(0);\n var end = array.length;\n\n return this.n(function () {\n var index = this.natural({max: --end});\n var value = array[index];\n array[index] = array[end];\n return value;\n }, Math.min(end, count));\n }\n };\n\n Chance.prototype.shuffle = function (arr) {\n var new_array = [],\n j = 0,\n length = Number(arr.length),\n source_indexes = range(length),\n last_source_index = length - 1,\n selected_source_index;\n\n for (var i = 0; i < length; i++) {\n // Pick a random index from the array\n selected_source_index = this.natural({max: last_source_index});\n j = source_indexes[selected_source_index];\n\n // Add it to the new array\n new_array[i] = arr[j];\n\n // Mark the source index as used\n source_indexes[selected_source_index] = source_indexes[last_source_index];\n last_source_index -= 1;\n }\n\n return new_array;\n };\n\n // Returns a single item from an array with relative weighting of odds\n Chance.prototype.weighted = function (arr, weights, trim) {\n if (arr.length !== weights.length) {\n throw new RangeError(\"Chance: Length of array and weights must match\");\n }\n\n // scan weights array and sum valid entries\n var sum = 0;\n var val;\n for (var weightIndex = 0; weightIndex < weights.length; ++weightIndex) {\n val = weights[weightIndex];\n if (isNaN(val)) {\n throw new RangeError(\"Chance: All weights must be numbers\");\n }\n\n if (val > 0) {\n sum += val;\n }\n }\n\n if (sum === 0) {\n throw new RangeError(\"Chance: No valid entries in array weights\");\n }\n\n // select a value within range\n var selected = this.random() * sum;\n\n // find array entry corresponding to selected value\n var total = 0;\n var lastGoodIdx = -1;\n var chosenIdx;\n for (weightIndex = 0; weightIndex < weights.length; ++weightIndex) {\n val = weights[weightIndex];\n total += val;\n if (val > 0) {\n if (selected <= total) {\n chosenIdx = weightIndex;\n break;\n }\n lastGoodIdx = weightIndex;\n }\n\n // handle any possible rounding error comparison to ensure something is picked\n if (weightIndex === (weights.length - 1)) {\n chosenIdx = lastGoodIdx;\n }\n }\n\n var chosen = arr[chosenIdx];\n trim = (typeof trim === 'undefined') ? false : trim;\n if (trim) {\n arr.splice(chosenIdx, 1);\n weights.splice(chosenIdx, 1);\n }\n\n return chosen;\n };\n\n // -- End Helpers --\n\n // -- Text --\n\n Chance.prototype.paragraph = function (options) {\n options = initOptions(options);\n\n var sentences = options.sentences || this.natural({min: 3, max: 7}),\n sentence_array = this.n(this.sentence, sentences),\n separator = options.linebreak === true ? '\\n' : ' ';\n\n return sentence_array.join(separator);\n };\n\n // Could get smarter about this than generating random words and\n // chaining them together. Such as: http://vq.io/1a5ceOh\n Chance.prototype.sentence = function (options) {\n options = initOptions(options);\n\n var words = options.words || this.natural({min: 12, max: 18}),\n punctuation = options.punctuation,\n text, word_array = this.n(this.word, words);\n\n text = word_array.join(' ');\n\n // Capitalize first letter of sentence\n text = this.capitalize(text);\n\n // Make sure punctuation has a usable value\n if (punctuation !== false && !/^[.?;!:]$/.test(punctuation)) {\n punctuation = '.';\n }\n\n // Add punctuation mark\n if (punctuation) {\n text += punctuation;\n }\n\n return text;\n };\n\n Chance.prototype.syllable = function (options) {\n options = initOptions(options);\n\n var length = options.length || this.natural({min: 2, max: 3}),\n consonants = 'bcdfghjklmnprstvwz', // consonants except hard to speak ones\n vowels = 'aeiou', // vowels\n all = consonants + vowels, // all\n text = '',\n chr;\n\n // I'm sure there's a more elegant way to do this, but this works\n // decently well.\n for (var i = 0; i < length; i++) {\n if (i === 0) {\n // First character can be anything\n chr = this.character({pool: all});\n } else if (consonants.indexOf(chr) === -1) {\n // Last character was a vowel, now we want a consonant\n chr = this.character({pool: consonants});\n } else {\n // Last character was a consonant, now we want a vowel\n chr = this.character({pool: vowels});\n }\n\n text += chr;\n }\n\n if (options.capitalize) {\n text = this.capitalize(text);\n }\n\n return text;\n };\n\n Chance.prototype.word = function (options) {\n options = initOptions(options);\n\n testRange(\n options.syllables && options.length,\n \"Chance: Cannot specify both syllables AND length.\"\n );\n\n var syllables = options.syllables || this.natural({min: 1, max: 3}),\n text = '';\n\n if (options.length) {\n // Either bound word by length\n do {\n text += this.syllable();\n } while (text.length < options.length);\n text = text.substring(0, options.length);\n } else {\n // Or by number of syllables\n for (var i = 0; i < syllables; i++) {\n text += this.syllable();\n }\n }\n\n if (options.capitalize) {\n text = this.capitalize(text);\n }\n\n return text;\n };\n\n // -- End Text --\n\n // -- Person --\n\n Chance.prototype.age = function (options) {\n options = initOptions(options);\n var ageRange;\n\n switch (options.type) {\n case 'child':\n ageRange = {min: 0, max: 12};\n break;\n case 'teen':\n ageRange = {min: 13, max: 19};\n break;\n case 'adult':\n ageRange = {min: 18, max: 65};\n break;\n case 'senior':\n ageRange = {min: 65, max: 100};\n break;\n case 'all':\n ageRange = {min: 0, max: 100};\n break;\n default:\n ageRange = {min: 18, max: 65};\n break;\n }\n\n return this.natural(ageRange);\n };\n\n Chance.prototype.birthday = function (options) {\n var age = this.age(options);\n var currentYear = new Date().getFullYear();\n\n if (options && options.type) {\n var min = new Date();\n var max = new Date();\n min.setFullYear(currentYear - age - 1);\n max.setFullYear(currentYear - age);\n\n options = initOptions(options, {\n min: min,\n max: max\n });\n } else {\n options = initOptions(options, {\n year: currentYear - age\n });\n }\n\n return this.date(options);\n };\n\n // CPF; ID to identify taxpayers in Brazil\n Chance.prototype.cpf = function (options) {\n options = initOptions(options, {\n formatted: true\n });\n\n var n = this.n(this.natural, 9, { max: 9 });\n var d1 = n[8]*2+n[7]*3+n[6]*4+n[5]*5+n[4]*6+n[3]*7+n[2]*8+n[1]*9+n[0]*10;\n d1 = 11 - (d1 % 11);\n if (d1>=10) {\n d1 = 0;\n }\n var d2 = d1*2+n[8]*3+n[7]*4+n[6]*5+n[5]*6+n[4]*7+n[3]*8+n[2]*9+n[1]*10+n[0]*11;\n d2 = 11 - (d2 % 11);\n if (d2>=10) {\n d2 = 0;\n }\n var cpf = ''+n[0]+n[1]+n[2]+'.'+n[3]+n[4]+n[5]+'.'+n[6]+n[7]+n[8]+'-'+d1+d2;\n return options.formatted ? cpf : cpf.replace(/\\D/g,'');\n };\n\n // CNPJ: ID to identify companies in Brazil\n Chance.prototype.cnpj = function (options) {\n options = initOptions(options, {\n formatted: true\n });\n\n var n = this.n(this.natural, 12, { max: 12 });\n var d1 = n[11]*2+n[10]*3+n[9]*4+n[8]*5+n[7]*6+n[6]*7+n[5]*8+n[4]*9+n[3]*2+n[2]*3+n[1]*4+n[0]*5;\n d1 = 11 - (d1 % 11);\n if (d1<2) {\n d1 = 0;\n }\n var d2 = d1*2+n[11]*3+n[10]*4+n[9]*5+n[8]*6+n[7]*7+n[6]*8+n[5]*9+n[4]*2+n[3]*3+n[2]*4+n[1]*5+n[0]*6;\n d2 = 11 - (d2 % 11);\n if (d2<2) {\n d2 = 0;\n }\n var cnpj = ''+n[0]+n[1]+'.'+n[2]+n[3]+n[4]+'.'+n[5]+n[6]+n[7]+'/'+n[8]+n[9]+n[10]+n[11]+'-'+d1+d2;\n return options.formatted ? cnpj : cnpj.replace(/\\D/g,'');\n };\n\n Chance.prototype.first = function (options) {\n options = initOptions(options, {gender: this.gender(), nationality: 'en'});\n return this.pick(this.get(\"firstNames\")[options.gender.toLowerCase()][options.nationality.toLowerCase()]);\n };\n\n Chance.prototype.profession = function (options) {\n options = initOptions(options);\n if(options.rank){\n return this.pick(['Apprentice ', 'Junior ', 'Senior ', 'Lead ']) + this.pick(this.get(\"profession\"));\n } else{\n return this.pick(this.get(\"profession\"));\n }\n };\n\n Chance.prototype.company = function (){\n return this.pick(this.get(\"company\"));\n };\n\n Chance.prototype.gender = function (options) {\n options = initOptions(options, {extraGenders: []});\n return this.pick(['Male', 'Female'].concat(options.extraGenders));\n };\n\n Chance.prototype.last = function (options) {\n options = initOptions(options, {nationality: '*'});\n if (options.nationality === \"*\") {\n var allLastNames = []\n var lastNames = this.get(\"lastNames\")\n Object.keys(lastNames).forEach(function(key){\n allLastNames = allLastNames.concat(lastNames[key])\n })\n return this.pick(allLastNames)\n }\n else {\n return this.pick(this.get(\"lastNames\")[options.nationality.toLowerCase()]);\n }\n\n };\n\n Chance.prototype.israelId=function(){\n var x=this.string({pool: '0123456789',length:8});\n var y=0;\n for (var i=0;i hex\n * -> rgb\n * -> rgba\n * -> 0x\n * -> named color\n *\n * #Examples:\n * ===============================================\n * * Geerate random hex color\n * chance.color() => '#79c157' / 'rgb(110,52,164)' / '0x67ae0b' / '#e2e2e2' / '#29CFA7'\n *\n * * Generate Hex based color value\n * chance.color({format: 'hex'}) => '#d67118'\n *\n * * Generate simple rgb value\n * chance.color({format: 'rgb'}) => 'rgb(110,52,164)'\n *\n * * Generate Ox based color value\n * chance.color({format: '0x'}) => '0x67ae0b'\n *\n * * Generate graiscale based value\n * chance.color({grayscale: true}) => '#e2e2e2'\n *\n * * Return valide color name\n * chance.color({format: 'name'}) => 'red'\n *\n * * Make color uppercase\n * chance.color({casing: 'upper'}) => '#29CFA7'\n *\n * * Min Max values for RGBA\n * var light_red = chance.color({format: 'hex', min_red: 200, max_red: 255, max_green: 0, max_blue: 0, min_alpha: .2, max_alpha: .3});\n *\n * @param [object] options\n * @return [string] color value\n */\n Chance.prototype.color = function (options) {\n function gray(value, delimiter) {\n return [value, value, value].join(delimiter || '');\n }\n\n function rgb(hasAlpha) {\n var rgbValue = (hasAlpha) ? 'rgba' : 'rgb';\n var alphaChannel = (hasAlpha) ? (',' + this.floating({min:min_alpha, max:max_alpha})) : \"\";\n var colorValue = (isGrayscale) ? (gray(this.natural({min: min_rgb, max: max_rgb}), ',')) : (this.natural({min: min_green, max: max_green}) + ',' + this.natural({min: min_blue, max: max_blue}) + ',' + this.natural({max: 255}));\n return rgbValue + '(' + colorValue + alphaChannel + ')';\n }\n\n function hex(start, end, withHash) {\n var symbol = (withHash) ? \"#\" : \"\";\n var hexstring = \"\";\n\n if (isGrayscale) {\n hexstring = gray(this.pad(this.hex({min: min_rgb, max: max_rgb}), 2));\n if (options.format === \"shorthex\") {\n hexstring = gray(this.hex({min: 0, max: 15}));\n }\n }\n else {\n if (options.format === \"shorthex\") {\n hexstring = this.pad(this.hex({min: Math.floor(min_red / 16), max: Math.floor(max_red / 16)}), 1) + this.pad(this.hex({min: Math.floor(min_green / 16), max: Math.floor(max_green / 16)}), 1) + this.pad(this.hex({min: Math.floor(min_blue / 16), max: Math.floor(max_blue / 16)}), 1);\n }\n else if (min_red !== undefined || max_red !== undefined || min_green !== undefined || max_green !== undefined || min_blue !== undefined || max_blue !== undefined) {\n hexstring = this.pad(this.hex({min: min_red, max: max_red}), 2) + this.pad(this.hex({min: min_green, max: max_green}), 2) + this.pad(this.hex({min: min_blue, max: max_blue}), 2);\n }\n else {\n hexstring = this.pad(this.hex({min: min_rgb, max: max_rgb}), 2) + this.pad(this.hex({min: min_rgb, max: max_rgb}), 2) + this.pad(this.hex({min: min_rgb, max: max_rgb}), 2);\n }\n }\n\n return symbol + hexstring;\n }\n\n options = initOptions(options, {\n format: this.pick(['hex', 'shorthex', 'rgb', 'rgba', '0x', 'name']),\n grayscale: false,\n casing: 'lower',\n min: 0,\n max: 255,\n min_red: undefined,\n max_red: undefined,\n min_green: undefined,\n max_green: undefined,\n min_blue: undefined,\n max_blue: undefined,\n min_alpha: 0,\n max_alpha: 1\n });\n\n var isGrayscale = options.grayscale;\n var min_rgb = options.min;\n var max_rgb = options.max;\n var min_red = options.min_red;\n var max_red = options.max_red;\n var min_green = options.min_green;\n var max_green = options.max_green;\n var min_blue = options.min_blue;\n var max_blue = options.max_blue;\n var min_alpha = options.min_alpha;\n var max_alpha = options.max_alpha;\n if (options.min_red === undefined) { min_red = min_rgb; }\n if (options.max_red === undefined) { max_red = max_rgb; }\n if (options.min_green === undefined) { min_green = min_rgb; }\n if (options.max_green === undefined) { max_green = max_rgb; }\n if (options.min_blue === undefined) { min_blue = min_rgb; }\n if (options.max_blue === undefined) { max_blue = max_rgb; }\n if (options.min_alpha === undefined) { min_alpha = 0; }\n if (options.max_alpha === undefined) { max_alpha = 1; }\n if (isGrayscale && min_rgb === 0 && max_rgb === 255 && min_red !== undefined && max_red !== undefined) {\n min_rgb = ((min_red + min_green + min_blue) / 3);\n max_rgb = ((max_red + max_green + max_blue) / 3);\n }\n var colorValue;\n\n if (options.format === 'hex') {\n colorValue = hex.call(this, 2, 6, true);\n }\n else if (options.format === 'shorthex') {\n colorValue = hex.call(this, 1, 3, true);\n }\n else if (options.format === 'rgb') {\n colorValue = rgb.call(this, false);\n }\n else if (options.format === 'rgba') {\n colorValue = rgb.call(this, true);\n }\n else if (options.format === '0x') {\n colorValue = '0x' + hex.call(this, 2, 6);\n }\n else if(options.format === 'name') {\n return this.pick(this.get(\"colorNames\"));\n }\n else {\n throw new RangeError('Invalid format provided. Please provide one of \"hex\", \"shorthex\", \"rgb\", \"rgba\", \"0x\" or \"name\".');\n }\n\n if (options.casing === 'upper' ) {\n colorValue = colorValue.toUpperCase();\n }\n\n return colorValue;\n };\n\n Chance.prototype.domain = function (options) {\n options = initOptions(options);\n return this.word() + '.' + (options.tld || this.tld());\n };\n\n Chance.prototype.email = function (options) {\n options = initOptions(options);\n return this.word({length: options.length}) + '@' + (options.domain || this.domain());\n };\n\n /**\n * #Description:\n * ===============================================\n * Generate a random Facebook id, aka fbid.\n *\n * NOTE: At the moment (Sep 2017), Facebook ids are\n * \"numeric strings\" of length 16.\n * However, Facebook Graph API documentation states that\n * \"it is extremely likely to change over time\".\n * @see https://developers.facebook.com/docs/graph-api/overview/\n *\n * #Examples:\n * ===============================================\n * chance.fbid() => '1000035231661304'\n *\n * @return [string] facebook id\n */\n Chance.prototype.fbid = function () {\n return '10000' + this.string({pool: \"1234567890\", length: 11});\n };\n\n Chance.prototype.google_analytics = function () {\n var account = this.pad(this.natural({max: 999999}), 6);\n var property = this.pad(this.natural({max: 99}), 2);\n\n return 'UA-' + account + '-' + property;\n };\n\n Chance.prototype.hashtag = function () {\n return '#' + this.word();\n };\n\n Chance.prototype.ip = function () {\n // Todo: This could return some reserved IPs. See http://vq.io/137dgYy\n // this should probably be updated to account for that rare as it may be\n return this.natural({min: 1, max: 254}) + '.' +\n this.natural({max: 255}) + '.' +\n this.natural({max: 255}) + '.' +\n this.natural({min: 1, max: 254});\n };\n\n Chance.prototype.ipv6 = function () {\n var ip_addr = this.n(this.hash, 8, {length: 4});\n\n return ip_addr.join(\":\");\n };\n\n Chance.prototype.klout = function () {\n return this.natural({min: 1, max: 99});\n };\n\n Chance.prototype.mac = function (options) {\n // Todo: This could also be extended to EUI-64 based MACs\n // (https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml#ethernet-numbers-4)\n // Todo: This can return some reserved MACs (similar to IP function)\n // this should probably be updated to account for that rare as it may be\n options = initOptions(options, { delimiter: ':' });\n return this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2);\n };\n\n Chance.prototype.semver = function (options) {\n options = initOptions(options, { include_prerelease: true });\n\n var range = this.pickone([\"^\", \"~\", \"<\", \">\", \"<=\", \">=\", \"=\"]);\n if (options.range) {\n range = options.range;\n }\n\n var prerelease = \"\";\n if (options.include_prerelease) {\n prerelease = this.weighted([\"\", \"-dev\", \"-beta\", \"-alpha\"], [50, 10, 5, 1]);\n }\n return range + this.rpg('3d10').join('.') + prerelease;\n };\n\n Chance.prototype.tlds = function () {\n return ['com', 'org', 'edu', 'gov', 'co.uk', 'net', 'io', 'ac', 'ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'ao', 'aq', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'cr', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', 'eg', 'eh', 'er', 'es', 'et', 'eu', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt', 'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'ss', 'st', 'su', 'sv', 'sx', 'sy', 'sz', 'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'ye', 'yt', 'za', 'zm', 'zw'];\n };\n\n Chance.prototype.tld = function () {\n return this.pick(this.tlds());\n };\n\n Chance.prototype.twitter = function () {\n return '@' + this.word();\n };\n\n Chance.prototype.url = function (options) {\n options = initOptions(options, { protocol: \"http\", domain: this.domain(options), domain_prefix: \"\", path: this.word(), extensions: []});\n\n var extension = options.extensions.length > 0 ? \".\" + this.pick(options.extensions) : \"\";\n var domain = options.domain_prefix ? options.domain_prefix + \".\" + options.domain : options.domain;\n\n return options.protocol + \"://\" + domain + \"/\" + options.path + extension;\n };\n\n Chance.prototype.port = function() {\n return this.integer({min: 0, max: 65535});\n };\n\n Chance.prototype.locale = function (options) {\n options = initOptions(options);\n if (options.region){\n return this.pick(this.get(\"locale_regions\"));\n } else {\n return this.pick(this.get(\"locale_languages\"));\n }\n };\n\n Chance.prototype.locales = function (options) {\n options = initOptions(options);\n if (options.region){\n return this.get(\"locale_regions\");\n } else {\n return this.get(\"locale_languages\");\n }\n };\n\n Chance.prototype.loremPicsum = function (options) {\n options = initOptions(options, { width: 500, height: 500, greyscale: false, blurred: false });\n\n var greyscale = options.greyscale ? 'g/' : '';\n var query = options.blurred ? '/?blur' : '/?random';\n\n return 'https://picsum.photos/' + greyscale + options.width + '/' + options.height + query;\n }\n\n // -- End Web --\n\n // -- Location --\n\n Chance.prototype.address = function (options) {\n options = initOptions(options);\n return this.natural({min: 5, max: 2000}) + ' ' + this.street(options);\n };\n\n Chance.prototype.altitude = function (options) {\n options = initOptions(options, {fixed: 5, min: 0, max: 8848});\n return this.floating({\n min: options.min,\n max: options.max,\n fixed: options.fixed\n });\n };\n\n Chance.prototype.areacode = function (options) {\n options = initOptions(options, {parens : true});\n // Don't want area codes to start with 1, or have a 9 as the second digit\n var areacode = options.exampleNumber ?\n \"555\" :\n this.natural({min: 2, max: 9}).toString() +\n this.natural({min: 0, max: 8}).toString() +\n this.natural({min: 0, max: 9}).toString();\n\n return options.parens ? '(' + areacode + ')' : areacode;\n };\n\n Chance.prototype.city = function () {\n return this.capitalize(this.word({syllables: 3}));\n };\n\n Chance.prototype.coordinates = function (options) {\n return this.latitude(options) + ', ' + this.longitude(options);\n };\n\n Chance.prototype.countries = function () {\n return this.get(\"countries\");\n };\n\n Chance.prototype.country = function (options) {\n options = initOptions(options);\n var country = this.pick(this.countries());\n return options.raw ? country : options.full ? country.name : country.abbreviation;\n };\n\n Chance.prototype.depth = function (options) {\n options = initOptions(options, {fixed: 5, min: -10994, max: 0});\n return this.floating({\n min: options.min,\n max: options.max,\n fixed: options.fixed\n });\n };\n\n Chance.prototype.geohash = function (options) {\n options = initOptions(options, { length: 7 });\n return this.string({ length: options.length, pool: '0123456789bcdefghjkmnpqrstuvwxyz' });\n };\n\n Chance.prototype.geojson = function (options) {\n return this.latitude(options) + ', ' + this.longitude(options) + ', ' + this.altitude(options);\n };\n\n Chance.prototype.latitude = function (options) {\n // Constants - Formats\n var [DDM, DMS, DD] = ['ddm', 'dms', 'dd'];\n\n options = initOptions(\noptions,\n options && options.format && [DDM, DMS].includes(options.format.toLowerCase()) ?\n {min: 0, max: 89, fixed: 4} :\n {fixed: 5, min: -90, max: 90, format: DD}\n);\n\n var format = options.format.toLowerCase();\n\n if (format === DDM || format === DMS) {\n testRange(options.min < 0 || options.min > 89, \"Chance: Min specified is out of range. Should be between 0 - 89\");\n testRange(options.max < 0 || options.max > 89, \"Chance: Max specified is out of range. Should be between 0 - 89\");\n testRange(options.fixed > 4, 'Chance: Fixed specified should be below or equal to 4');\n }\n\n switch (format) {\n case DDM: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.floating({min: 0, max: 59, fixed: options.fixed});\n }\n case DMS: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.integer({min: 0, max: 59}) + '’' +\n this.floating({min: 0, max: 59, fixed: options.fixed}) + '”';\n }\n case DD:\n default: {\n return this.floating({min: options.min, max: options.max, fixed: options.fixed});\n }\n }\n };\n\n Chance.prototype.longitude = function (options) {\n // Constants - Formats\n var [DDM, DMS, DD] = ['ddm', 'dms', 'dd'];\n\n options = initOptions(\noptions,\n options && options.format && [DDM, DMS].includes(options.format.toLowerCase()) ?\n {min: 0, max: 179, fixed: 4} :\n {fixed: 5, min: -180, max: 180, format: DD}\n);\n\n var format = options.format.toLowerCase();\n\n if (format === DDM || format === DMS) {\n testRange(options.min < 0 || options.min > 179, \"Chance: Min specified is out of range. Should be between 0 - 179\");\n testRange(options.max < 0 || options.max > 179, \"Chance: Max specified is out of range. Should be between 0 - 179\");\n testRange(options.fixed > 4, 'Chance: Fixed specified should be below or equal to 4');\n }\n\n switch (format) {\n case DDM: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.floating({min: 0, max: 59.9999, fixed: options.fixed})\n }\n case DMS: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.integer({min: 0, max: 59}) + '’' +\n this.floating({min: 0, max: 59.9999, fixed: options.fixed}) + '”';\n }\n case DD:\n default: {\n return this.floating({min: options.min, max: options.max, fixed: options.fixed});\n }\n }\n };\n\n Chance.prototype.phone = function (options) {\n var self = this,\n numPick,\n ukNum = function (parts) {\n var section = [];\n //fills the section part of the phone number with random numbers.\n parts.sections.forEach(function(n) {\n section.push(self.string({ pool: '0123456789', length: n}));\n });\n return parts.area + section.join(' ');\n };\n options = initOptions(options, {\n formatted: true,\n country: 'us',\n mobile: false,\n exampleNumber: false,\n });\n if (!options.formatted) {\n options.parens = false;\n }\n var phone;\n switch (options.country) {\n case 'fr':\n if (!options.mobile) {\n numPick = this.pick([\n // Valid zone and département codes.\n '01' + this.pick(['30', '34', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '53', '55', '56', '58', '60', '64', '69', '70', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83']) + self.string({ pool: '0123456789', length: 6}),\n '02' + this.pick(['14', '18', '22', '23', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '40', '41', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '56', '57', '61', '62', '69', '72', '76', '77', '78', '85', '90', '96', '97', '98', '99']) + self.string({ pool: '0123456789', length: 6}),\n '03' + this.pick(['10', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '39', '44', '45', '51', '52', '54', '55', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90']) + self.string({ pool: '0123456789', length: 6}),\n '04' + this.pick(['11', '13', '15', '20', '22', '26', '27', '30', '32', '34', '37', '42', '43', '44', '50', '56', '57', '63', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '88', '89', '90', '91', '92', '93', '94', '95', '97', '98']) + self.string({ pool: '0123456789', length: 6}),\n '05' + this.pick(['08', '16', '17', '19', '24', '31', '32', '33', '34', '35', '40', '45', '46', '47', '49', '53', '55', '56', '57', '58', '59', '61', '62', '63', '64', '65', '67', '79', '81', '82', '86', '87', '90', '94']) + self.string({ pool: '0123456789', length: 6}),\n '09' + self.string({ pool: '0123456789', length: 8}),\n ]);\n phone = options.formatted ? numPick.match(/../g).join(' ') : numPick;\n } else {\n numPick = this.pick(['06', '07']) + self.string({ pool: '0123456789', length: 8});\n phone = options.formatted ? numPick.match(/../g).join(' ') : numPick;\n }\n break;\n case 'uk':\n if (!options.mobile) {\n numPick = this.pick([\n //valid area codes of major cities/counties followed by random numbers in required format.\n\n { area: '01' + this.character({ pool: '234569' }) + '1 ', sections: [3,4] },\n { area: '020 ' + this.character({ pool: '378' }), sections: [3,4] },\n { area: '023 ' + this.character({ pool: '89' }), sections: [3,4] },\n { area: '024 7', sections: [3,4] },\n { area: '028 ' + this.pick(['25','28','37','71','82','90','92','95']), sections: [2,4] },\n { area: '012' + this.pick(['04','08','54','76','97','98']) + ' ', sections: [6] },\n { area: '013' + this.pick(['63','64','84','86']) + ' ', sections: [6] },\n { area: '014' + this.pick(['04','20','60','61','80','88']) + ' ', sections: [6] },\n { area: '015' + this.pick(['24','27','62','66']) + ' ', sections: [6] },\n { area: '016' + this.pick(['06','29','35','47','59','95']) + ' ', sections: [6] },\n { area: '017' + this.pick(['26','44','50','68']) + ' ', sections: [6] },\n { area: '018' + this.pick(['27','37','84','97']) + ' ', sections: [6] },\n { area: '019' + this.pick(['00','05','35','46','49','63','95']) + ' ', sections: [6] }\n ]);\n phone = options.formatted ? ukNum(numPick) : ukNum(numPick).replace(' ', '', 'g');\n } else {\n numPick = this.pick([\n { area: '07' + this.pick(['4','5','7','8','9']), sections: [2,6] },\n { area: '07624 ', sections: [6] }\n ]);\n phone = options.formatted ? ukNum(numPick) : ukNum(numPick).replace(' ', '');\n }\n break;\n case 'za':\n if (!options.mobile) {\n numPick = this.pick([\n '01' + this.pick(['0', '1', '2', '3', '4', '5', '6', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n '02' + this.pick(['1', '2', '3', '4', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n '03' + this.pick(['1', '2', '3', '5', '6', '9']) + self.string({ pool: '0123456789', length: 7}),\n '04' + this.pick(['1', '2', '3', '4', '5','6','7', '8','9']) + self.string({ pool: '0123456789', length: 7}),\n '05' + this.pick(['1', '3', '4', '6', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n ]);\n phone = options.formatted || numPick;\n } else {\n numPick = this.pick([\n '060' + this.pick(['3','4','5','6','7','8','9']) + self.string({ pool: '0123456789', length: 6}),\n '061' + this.pick(['0','1','2','3','4','5','8']) + self.string({ pool: '0123456789', length: 6}),\n '06' + self.string({ pool: '0123456789', length: 7}),\n '071' + this.pick(['0','1','2','3','4','5','6','7','8','9']) + self.string({ pool: '0123456789', length: 6}),\n '07' + this.pick(['2','3','4','6','7','8','9']) + self.string({ pool: '0123456789', length: 7}),\n '08' + this.pick(['0','1','2','3','4','5']) + self.string({ pool: '0123456789', length: 7}),\n ]);\n phone = options.formatted || numPick;\n }\n break;\n case 'us':\n var areacode = this.areacode(options).toString();\n var exchange = this.natural({ min: 2, max: 9 }).toString() +\n this.natural({ min: 0, max: 9 }).toString() +\n this.natural({ min: 0, max: 9 }).toString();\n var subscriber = this.natural({ min: 1000, max: 9999 }).toString(); // this could be random [0-9]{4}\n phone = options.formatted ? areacode + ' ' + exchange + '-' + subscriber : areacode + exchange + subscriber;\n break;\n case 'br':\n var areaCode = this.pick([\"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"21\", \"22\", \"24\", \"27\", \"28\", \"31\", \"32\", \"33\", \"34\", \"35\", \"37\", \"38\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\", \"51\", \"53\", \"54\", \"55\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"71\", \"73\", \"74\", \"75\", \"77\", \"79\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"]);\n var prefix;\n if (options.mobile) {\n // Brasilian official reference (mobile): http://www.anatel.gov.br/setorregulado/plano-de-numeracao-brasileiro?id=330\n prefix = '9' + self.string({ pool: '0123456789', length: 4});\n } else {\n // Brasilian official reference: http://www.anatel.gov.br/setorregulado/plano-de-numeracao-brasileiro?id=331\n prefix = this.natural({ min: 2000, max: 5999 }).toString();\n }\n var mcdu = self.string({ pool: '0123456789', length: 4});\n phone = options.formatted ? '(' + areaCode + ') ' + prefix + '-' + mcdu : areaCode + prefix + mcdu;\n break;\n }\n return phone;\n };\n\n Chance.prototype.postal = function () {\n // Postal District\n var pd = this.character({pool: \"XVTSRPNKLMHJGECBA\"});\n // Forward Sortation Area (FSA)\n var fsa = pd + this.natural({max: 9}) + this.character({alpha: true, casing: \"upper\"});\n // Local Delivery Unut (LDU)\n var ldu = this.natural({max: 9}) + this.character({alpha: true, casing: \"upper\"}) + this.natural({max: 9});\n\n return fsa + \" \" + ldu;\n };\n\n Chance.prototype.postcode = function () {\n // Area\n var area = this.pick(this.get(\"postcodeAreas\")).code;\n // District\n var district = this.natural({max: 9});\n // Sub-District\n var subDistrict = this.bool() ? this.character({alpha: true, casing: \"upper\"}) : \"\";\n // Outward Code\n var outward = area + district + subDistrict;\n // Sector\n var sector = this.natural({max: 9});\n // Unit\n var unit = this.character({alpha: true, casing: \"upper\"}) + this.character({alpha: true, casing: \"upper\"});\n // Inward Code\n var inward = sector + unit;\n\n return outward + \" \" + inward;\n };\n\n Chance.prototype.counties = function (options) {\n options = initOptions(options, { country: 'uk' });\n return this.get(\"counties\")[options.country.toLowerCase()];\n };\n\n Chance.prototype.county = function (options) {\n return this.pick(this.counties(options)).name;\n };\n\n Chance.prototype.provinces = function (options) {\n options = initOptions(options, { country: 'ca' });\n return this.get(\"provinces\")[options.country.toLowerCase()];\n };\n\n Chance.prototype.province = function (options) {\n return (options && options.full) ?\n this.pick(this.provinces(options)).name :\n this.pick(this.provinces(options)).abbreviation;\n };\n\n Chance.prototype.state = function (options) {\n return (options && options.full) ?\n this.pick(this.states(options)).name :\n this.pick(this.states(options)).abbreviation;\n };\n\n Chance.prototype.states = function (options) {\n options = initOptions(options, { country: 'us', us_states_and_dc: true } );\n\n var states;\n\n switch (options.country.toLowerCase()) {\n case 'us':\n var us_states_and_dc = this.get(\"us_states_and_dc\"),\n territories = this.get(\"territories\"),\n armed_forces = this.get(\"armed_forces\");\n\n states = [];\n\n if (options.us_states_and_dc) {\n states = states.concat(us_states_and_dc);\n }\n if (options.territories) {\n states = states.concat(territories);\n }\n if (options.armed_forces) {\n states = states.concat(armed_forces);\n }\n break;\n case 'it':\n case 'mx':\n states = this.get(\"country_regions\")[options.country.toLowerCase()];\n break;\n case 'uk':\n states = this.get(\"counties\")[options.country.toLowerCase()];\n break;\n }\n\n return states;\n };\n\n Chance.prototype.street = function (options) {\n options = initOptions(options, { country: 'us', syllables: 2 });\n var street;\n\n switch (options.country.toLowerCase()) {\n case 'us':\n street = this.word({ syllables: options.syllables });\n street = this.capitalize(street);\n street += ' ';\n street += options.short_suffix ?\n this.street_suffix(options).abbreviation :\n this.street_suffix(options).name;\n break;\n case 'it':\n street = this.word({ syllables: options.syllables });\n street = this.capitalize(street);\n street = (options.short_suffix ?\n this.street_suffix(options).abbreviation :\n this.street_suffix(options).name) + \" \" + street;\n break;\n }\n return street;\n };\n\n Chance.prototype.street_suffix = function (options) {\n options = initOptions(options, { country: 'us' });\n return this.pick(this.street_suffixes(options));\n };\n\n Chance.prototype.street_suffixes = function (options) {\n options = initOptions(options, { country: 'us' });\n // These are the most common suffixes.\n return this.get(\"street_suffixes\")[options.country.toLowerCase()];\n };\n\n // Note: only returning US zip codes, internationalization will be a whole\n // other beast to tackle at some point.\n Chance.prototype.zip = function (options) {\n var zip = this.n(this.natural, 5, {max: 9});\n\n if (options && options.plusfour === true) {\n zip.push('-');\n zip = zip.concat(this.n(this.natural, 4, {max: 9}));\n }\n\n return zip.join(\"\");\n };\n\n // -- End Location --\n\n // -- Time\n\n Chance.prototype.ampm = function () {\n return this.bool() ? 'am' : 'pm';\n };\n\n Chance.prototype.date = function (options) {\n var date_string, date;\n\n // If interval is specified we ignore preset\n if(options && (options.min || options.max)) {\n options = initOptions(options, {\n american: true,\n string: false\n });\n var min = typeof options.min !== \"undefined\" ? options.min.getTime() : 1;\n // 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. http://es5.github.io/#x15.9.1.1\n var max = typeof options.max !== \"undefined\" ? options.max.getTime() : 8640000000000000;\n\n date = new Date(this.integer({min: min, max: max}));\n } else {\n var m = this.month({raw: true});\n var daysInMonth = m.days;\n\n if(options && options.month) {\n // Mod 12 to allow months outside range of 0-11 (not encouraged, but also not prevented).\n daysInMonth = this.get('months')[((options.month % 12) + 12) % 12].days;\n }\n\n options = initOptions(options, {\n year: parseInt(this.year(), 10),\n // Necessary to subtract 1 because Date() 0-indexes month but not day or year\n // for some reason.\n month: m.numeric - 1,\n day: this.natural({min: 1, max: daysInMonth}),\n hour: this.hour({twentyfour: true}),\n minute: this.minute(),\n second: this.second(),\n millisecond: this.millisecond(),\n american: true,\n string: false\n });\n\n date = new Date(options.year, options.month, options.day, options.hour, options.minute, options.second, options.millisecond);\n }\n\n if (options.american) {\n // Adding 1 to the month is necessary because Date() 0-indexes\n // months but not day for some odd reason.\n date_string = (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();\n } else {\n date_string = date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear();\n }\n\n return options.string ? date_string : date;\n };\n\n Chance.prototype.hammertime = function (options) {\n return this.date(options).getTime();\n };\n\n Chance.prototype.hour = function (options) {\n options = initOptions(options, {\n min: options && options.twentyfour ? 0 : 1,\n max: options && options.twentyfour ? 23 : 12\n });\n\n testRange(options.min < 0, \"Chance: Min cannot be less than 0.\");\n testRange(options.twentyfour && options.max > 23, \"Chance: Max cannot be greater than 23 for twentyfour option.\");\n testRange(!options.twentyfour && options.max > 12, \"Chance: Max cannot be greater than 12.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return this.natural({min: options.min, max: options.max});\n };\n\n Chance.prototype.millisecond = function () {\n return this.natural({max: 999});\n };\n\n Chance.prototype.minute = Chance.prototype.second = function (options) {\n options = initOptions(options, {min: 0, max: 59});\n\n testRange(options.min < 0, \"Chance: Min cannot be less than 0.\");\n testRange(options.max > 59, \"Chance: Max cannot be greater than 59.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return this.natural({min: options.min, max: options.max});\n };\n\n Chance.prototype.month = function (options) {\n options = initOptions(options, {min: 1, max: 12});\n\n testRange(options.min < 1, \"Chance: Min cannot be less than 1.\");\n testRange(options.max > 12, \"Chance: Max cannot be greater than 12.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n var month = this.pick(this.months().slice(options.min - 1, options.max));\n return options.raw ? month : month.name;\n };\n\n Chance.prototype.months = function () {\n return this.get(\"months\");\n };\n\n Chance.prototype.second = function () {\n return this.natural({max: 59});\n };\n\n Chance.prototype.timestamp = function () {\n return this.natural({min: 1, max: parseInt(new Date().getTime() / 1000, 10)});\n };\n\n Chance.prototype.weekday = function (options) {\n options = initOptions(options, {weekday_only: false});\n var weekdays = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\"];\n if (!options.weekday_only) {\n weekdays.push(\"Saturday\");\n weekdays.push(\"Sunday\");\n }\n return this.pickone(weekdays);\n };\n\n Chance.prototype.year = function (options) {\n // Default to current year as min if none specified\n options = initOptions(options, {min: new Date().getFullYear()});\n\n // Default to one century after current year as max if none specified\n options.max = (typeof options.max !== \"undefined\") ? options.max : options.min + 100;\n\n return this.natural(options).toString();\n };\n\n // -- End Time\n\n // -- Finance --\n\n Chance.prototype.cc = function (options) {\n options = initOptions(options);\n\n var type, number, to_generate;\n\n type = (options.type) ?\n this.cc_type({ name: options.type, raw: true }) :\n this.cc_type({ raw: true });\n\n number = type.prefix.split(\"\");\n to_generate = type.length - type.prefix.length - 1;\n\n // Generates n - 1 digits\n number = number.concat(this.n(this.integer, to_generate, {min: 0, max: 9}));\n\n // Generates the last digit according to Luhn algorithm\n number.push(this.luhn_calculate(number.join(\"\")));\n\n return number.join(\"\");\n };\n\n Chance.prototype.cc_types = function () {\n // http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\n return this.get(\"cc_types\");\n };\n\n Chance.prototype.cc_type = function (options) {\n options = initOptions(options);\n var types = this.cc_types(),\n type = null;\n\n if (options.name) {\n for (var i = 0; i < types.length; i++) {\n // Accept either name or short_name to specify card type\n if (types[i].name === options.name || types[i].short_name === options.name) {\n type = types[i];\n break;\n }\n }\n if (type === null) {\n throw new RangeError(\"Chance: Credit card type '\" + options.name + \"' is not supported\");\n }\n } else {\n type = this.pick(types);\n }\n\n return options.raw ? type : type.name;\n };\n\n // return all world currency by ISO 4217\n Chance.prototype.currency_types = function () {\n return this.get(\"currency_types\");\n };\n\n // return random world currency by ISO 4217\n Chance.prototype.currency = function () {\n return this.pick(this.currency_types());\n };\n\n // return all timezones available\n Chance.prototype.timezones = function () {\n return this.get(\"timezones\");\n };\n\n // return random timezone\n Chance.prototype.timezone = function () {\n return this.pick(this.timezones());\n };\n\n //Return random correct currency exchange pair (e.g. EUR/USD) or array of currency code\n Chance.prototype.currency_pair = function (returnAsString) {\n var currencies = this.unique(this.currency, 2, {\n comparator: function(arr, val) {\n\n return arr.reduce(function(acc, item) {\n // If a match has been found, short circuit check and just return\n return acc || (item.code === val.code);\n }, false);\n }\n });\n\n if (returnAsString) {\n return currencies[0].code + '/' + currencies[1].code;\n } else {\n return currencies;\n }\n };\n\n Chance.prototype.dollar = function (options) {\n // By default, a somewhat more sane max for dollar than all available numbers\n options = initOptions(options, {max : 10000, min : 0});\n\n var dollar = this.floating({min: options.min, max: options.max, fixed: 2}).toString(),\n cents = dollar.split('.')[1];\n\n if (cents === undefined) {\n dollar += '.00';\n } else if (cents.length < 2) {\n dollar = dollar + '0';\n }\n\n if (dollar < 0) {\n return '-$' + dollar.replace('-', '');\n } else {\n return '$' + dollar;\n }\n };\n\n Chance.prototype.euro = function (options) {\n return Number(this.dollar(options).replace(\"$\", \"\")).toLocaleString() + \"€\";\n };\n\n Chance.prototype.exp = function (options) {\n options = initOptions(options);\n var exp = {};\n\n exp.year = this.exp_year();\n\n // If the year is this year, need to ensure month is greater than the\n // current month or this expiration will not be valid\n if (exp.year === (new Date().getFullYear()).toString()) {\n exp.month = this.exp_month({future: true});\n } else {\n exp.month = this.exp_month();\n }\n\n return options.raw ? exp : exp.month + '/' + exp.year;\n };\n\n Chance.prototype.exp_month = function (options) {\n options = initOptions(options);\n var month, month_int,\n // Date object months are 0 indexed\n curMonth = new Date().getMonth() + 1;\n\n if (options.future && (curMonth !== 12)) {\n do {\n month = this.month({raw: true}).numeric;\n month_int = parseInt(month, 10);\n } while (month_int <= curMonth);\n } else {\n month = this.month({raw: true}).numeric;\n }\n\n return month;\n };\n\n Chance.prototype.exp_year = function () {\n var curMonth = new Date().getMonth() + 1,\n curYear = new Date().getFullYear();\n\n return this.year({min: ((curMonth === 12) ? (curYear + 1) : curYear), max: (curYear + 10)});\n };\n\n Chance.prototype.vat = function (options) {\n options = initOptions(options, { country: 'it' });\n switch (options.country.toLowerCase()) {\n case 'it':\n return this.it_vat();\n }\n };\n\n /**\n * Generate a string matching IBAN pattern (https://en.wikipedia.org/wiki/International_Bank_Account_Number).\n * No country-specific formats support (yet)\n */\n Chance.prototype.iban = function () {\n var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n var alphanum = alpha + '0123456789';\n var iban =\n this.string({ length: 2, pool: alpha }) +\n this.pad(this.integer({ min: 0, max: 99 }), 2) +\n this.string({ length: 4, pool: alphanum }) +\n this.pad(this.natural(), this.natural({ min: 6, max: 26 }));\n return iban;\n };\n\n // -- End Finance\n\n // -- Regional\n\n Chance.prototype.it_vat = function () {\n var it_vat = this.natural({min: 1, max: 1800000});\n\n it_vat = this.pad(it_vat, 7) + this.pad(this.pick(this.provinces({ country: 'it' })).code, 3);\n return it_vat + this.luhn_calculate(it_vat);\n };\n\n /*\n * this generator is written following the official algorithm\n * all data can be passed explicitely or randomized by calling chance.cf() without options\n * the code does not check that the input data is valid (it goes beyond the scope of the generator)\n *\n * @param [Object] options = { first: first name,\n * last: last name,\n * gender: female|male,\n birthday: JavaScript date object,\n city: string(4), 1 letter + 3 numbers\n }\n * @return [string] codice fiscale\n *\n */\n Chance.prototype.cf = function (options) {\n options = options || {};\n var gender = !!options.gender ? options.gender : this.gender(),\n first = !!options.first ? options.first : this.first( { gender: gender, nationality: 'it'} ),\n last = !!options.last ? options.last : this.last( { nationality: 'it'} ),\n birthday = !!options.birthday ? options.birthday : this.birthday(),\n city = !!options.city ? options.city : this.pickone(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'L', 'M', 'Z']) + this.pad(this.natural({max:999}), 3),\n cf = [],\n name_generator = function(name, isLast) {\n var temp,\n return_value = [];\n\n if (name.length < 3) {\n return_value = name.split(\"\").concat(\"XXX\".split(\"\")).splice(0,3);\n }\n else {\n temp = name.toUpperCase().split('').map(function(c){\n return (\"BCDFGHJKLMNPRSTVWZ\".indexOf(c) !== -1) ? c : undefined;\n }).join('');\n if (temp.length > 3) {\n if (isLast) {\n temp = temp.substr(0,3);\n } else {\n temp = temp[0] + temp.substr(2,2);\n }\n }\n if (temp.length < 3) {\n return_value = temp;\n temp = name.toUpperCase().split('').map(function(c){\n return (\"AEIOU\".indexOf(c) !== -1) ? c : undefined;\n }).join('').substr(0, 3 - return_value.length);\n }\n return_value = return_value + temp;\n }\n\n return return_value;\n },\n date_generator = function(birthday, gender, that) {\n var lettermonths = ['A', 'B', 'C', 'D', 'E', 'H', 'L', 'M', 'P', 'R', 'S', 'T'];\n\n return birthday.getFullYear().toString().substr(2) +\n lettermonths[birthday.getMonth()] +\n that.pad(birthday.getDate() + ((gender.toLowerCase() === \"female\") ? 40 : 0), 2);\n },\n checkdigit_generator = function(cf) {\n var range1 = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n range2 = \"ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n evens = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n odds = \"BAKPLCQDREVOSFTGUHMINJWZYX\",\n digit = 0;\n\n\n for(var i = 0; i < 15; i++) {\n if (i % 2 !== 0) {\n digit += evens.indexOf(range2[range1.indexOf(cf[i])]);\n }\n else {\n digit += odds.indexOf(range2[range1.indexOf(cf[i])]);\n }\n }\n return evens[digit % 26];\n };\n\n cf = cf.concat(name_generator(last, true), name_generator(first), date_generator(birthday, gender, this), city.toUpperCase().split(\"\")).join(\"\");\n cf += checkdigit_generator(cf.toUpperCase(), this);\n\n return cf.toUpperCase();\n };\n\n Chance.prototype.pl_pesel = function () {\n var number = this.natural({min: 1, max: 9999999999});\n var arr = this.pad(number, 10).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (1 * arr[0] + 3 * arr[1] + 7 * arr[2] + 9 * arr[3] + 1 * arr[4] + 3 * arr[5] + 7 * arr[6] + 9 * arr[7] + 1 * arr[8] + 3 * arr[9]) % 10;\n if(controlNumber !== 0) {\n controlNumber = 10 - controlNumber;\n }\n\n return arr.join('') + controlNumber;\n };\n\n Chance.prototype.pl_nip = function () {\n var number = this.natural({min: 1, max: 999999999});\n var arr = this.pad(number, 9).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (6 * arr[0] + 5 * arr[1] + 7 * arr[2] + 2 * arr[3] + 3 * arr[4] + 4 * arr[5] + 5 * arr[6] + 6 * arr[7] + 7 * arr[8]) % 11;\n if(controlNumber === 10) {\n return this.pl_nip();\n }\n\n return arr.join('') + controlNumber;\n };\n\n Chance.prototype.pl_regon = function () {\n var number = this.natural({min: 1, max: 99999999});\n var arr = this.pad(number, 8).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (8 * arr[0] + 9 * arr[1] + 2 * arr[2] + 3 * arr[3] + 4 * arr[4] + 5 * arr[5] + 6 * arr[6] + 7 * arr[7]) % 11;\n if(controlNumber === 10) {\n controlNumber = 0;\n }\n\n return arr.join('') + controlNumber;\n };\n\n // -- End Regional\n\n // -- Music --\n\n Chance.prototype.note = function(options) {\n // choices for 'notes' option:\n // flatKey - chromatic scale with flat notes (default)\n // sharpKey - chromatic scale with sharp notes\n // flats - just flat notes\n // sharps - just sharp notes\n // naturals - just natural notes\n // all - naturals, sharps and flats\n options = initOptions(options, { notes : 'flatKey'});\n var scales = {\n naturals: ['C', 'D', 'E', 'F', 'G', 'A', 'B'],\n flats: ['D♭', 'E♭', 'G♭', 'A♭', 'B♭'],\n sharps: ['C♯', 'D♯', 'F♯', 'G♯', 'A♯']\n };\n scales.all = scales.naturals.concat(scales.flats.concat(scales.sharps))\n scales.flatKey = scales.naturals.concat(scales.flats)\n scales.sharpKey = scales.naturals.concat(scales.sharps)\n return this.pickone(scales[options.notes]);\n }\n\n Chance.prototype.midi_note = function(options) {\n var min = 0;\n var max = 127;\n options = initOptions(options, { min : min, max : max });\n return this.integer({min: options.min, max: options.max});\n }\n\n Chance.prototype.chord_quality = function(options) {\n options = initOptions(options, { jazz: true });\n var chord_qualities = ['maj', 'min', 'aug', 'dim'];\n if (options.jazz){\n chord_qualities = [\n 'maj7',\n 'min7',\n '7',\n 'sus',\n 'dim',\n 'ø'\n ];\n }\n return this.pickone(chord_qualities);\n }\n\n Chance.prototype.chord = function (options) {\n options = initOptions(options);\n return this.note(options) + this.chord_quality(options);\n }\n\n Chance.prototype.tempo = function (options) {\n var min = 40;\n var max = 320;\n options = initOptions(options, {min: min, max: max});\n return this.integer({min: options.min, max: options.max});\n }\n\n // -- End Music\n\n // -- Miscellaneous --\n\n // Coin - Flip, flip, flipadelphia\n Chance.prototype.coin = function() {\n return this.bool() ? \"heads\" : \"tails\";\n }\n\n // Dice - For all the board game geeks out there, myself included ;)\n function diceFn (range) {\n return function () {\n return this.natural(range);\n };\n }\n Chance.prototype.d4 = diceFn({min: 1, max: 4});\n Chance.prototype.d6 = diceFn({min: 1, max: 6});\n Chance.prototype.d8 = diceFn({min: 1, max: 8});\n Chance.prototype.d10 = diceFn({min: 1, max: 10});\n Chance.prototype.d12 = diceFn({min: 1, max: 12});\n Chance.prototype.d20 = diceFn({min: 1, max: 20});\n Chance.prototype.d30 = diceFn({min: 1, max: 30});\n Chance.prototype.d100 = diceFn({min: 1, max: 100});\n\n Chance.prototype.rpg = function (thrown, options) {\n options = initOptions(options);\n if (!thrown) {\n throw new RangeError(\"Chance: A type of die roll must be included\");\n } else {\n var bits = thrown.toLowerCase().split(\"d\"),\n rolls = [];\n\n if (bits.length !== 2 || !parseInt(bits[0], 10) || !parseInt(bits[1], 10)) {\n throw new Error(\"Chance: Invalid format provided. Please provide #d# where the first # is the number of dice to roll, the second # is the max of each die\");\n }\n for (var i = bits[0]; i > 0; i--) {\n rolls[i - 1] = this.natural({min: 1, max: bits[1]});\n }\n return (typeof options.sum !== 'undefined' && options.sum) ? rolls.reduce(function (p, c) { return p + c; }) : rolls;\n }\n };\n\n // Guid\n Chance.prototype.guid = function (options) {\n options = initOptions(options, { version: 5 });\n\n var guid_pool = \"abcdef1234567890\",\n variant_pool = \"ab89\",\n guid = this.string({ pool: guid_pool, length: 8 }) + '-' +\n this.string({ pool: guid_pool, length: 4 }) + '-' +\n // The Version\n options.version +\n this.string({ pool: guid_pool, length: 3 }) + '-' +\n // The Variant\n this.string({ pool: variant_pool, length: 1 }) +\n this.string({ pool: guid_pool, length: 3 }) + '-' +\n this.string({ pool: guid_pool, length: 12 });\n return guid;\n };\n\n // Hash\n Chance.prototype.hash = function (options) {\n options = initOptions(options, {length : 40, casing: 'lower'});\n var pool = options.casing === 'upper' ? HEX_POOL.toUpperCase() : HEX_POOL;\n return this.string({pool: pool, length: options.length});\n };\n\n Chance.prototype.luhn_check = function (num) {\n var str = num.toString();\n var checkDigit = +str.substring(str.length - 1);\n return checkDigit === this.luhn_calculate(+str.substring(0, str.length - 1));\n };\n\n Chance.prototype.luhn_calculate = function (num) {\n var digits = num.toString().split(\"\").reverse();\n var sum = 0;\n var digit;\n\n for (var i = 0, l = digits.length; l > i; ++i) {\n digit = +digits[i];\n if (i % 2 === 0) {\n digit *= 2;\n if (digit > 9) {\n digit -= 9;\n }\n }\n sum += digit;\n }\n return (sum * 9) % 10;\n };\n\n // MD5 Hash\n Chance.prototype.md5 = function(options) {\n var opts = { str: '', key: null, raw: false };\n\n if (!options) {\n opts.str = this.string();\n options = {};\n }\n else if (typeof options === 'string') {\n opts.str = options;\n options = {};\n }\n else if (typeof options !== 'object') {\n return null;\n }\n else if(options.constructor === 'Array') {\n return null;\n }\n\n opts = initOptions(options, opts);\n\n if(!opts.str){\n throw new Error('A parameter is required to return an md5 hash.');\n }\n\n return this.bimd5.md5(opts.str, opts.key, opts.raw);\n };\n\n /**\n * #Description:\n * =====================================================\n * Generate random file name with extension\n *\n * The argument provide extension type\n * -> raster\n * -> vector\n * -> 3d\n * -> document\n *\n * If nothing is provided the function return random file name with random\n * extension type of any kind\n *\n * The user can validate the file name length range\n * If nothing provided the generated file name is random\n *\n * #Extension Pool :\n * * Currently the supported extensions are\n * -> some of the most popular raster image extensions\n * -> some of the most popular vector image extensions\n * -> some of the most popular 3d image extensions\n * -> some of the most popular document extensions\n *\n * #Examples :\n * =====================================================\n *\n * Return random file name with random extension. The file extension\n * is provided by a predefined collection of extensions. More about the extension\n * pool can be found in #Extension Pool section\n *\n * chance.file()\n * => dsfsdhjf.xml\n *\n * In order to generate a file name with specific length, specify the\n * length property and integer value. The extension is going to be random\n *\n * chance.file({length : 10})\n * => asrtineqos.pdf\n *\n * In order to generate file with extension from some of the predefined groups\n * of the extension pool just specify the extension pool category in fileType property\n *\n * chance.file({fileType : 'raster'})\n * => dshgssds.psd\n *\n * You can provide specific extension for your files\n * chance.file({extension : 'html'})\n * => djfsd.html\n *\n * Or you could pass custom collection of extensions by array or by object\n * chance.file({extensions : [...]})\n * => dhgsdsd.psd\n *\n * chance.file({extensions : { key : [...], key : [...]}})\n * => djsfksdjsd.xml\n *\n * @param [collection] options\n * @return [string]\n *\n */\n Chance.prototype.file = function(options) {\n\n var fileOptions = options || {};\n var poolCollectionKey = \"fileExtension\";\n var typeRange = Object.keys(this.get(\"fileExtension\"));//['raster', 'vector', '3d', 'document'];\n var fileName;\n var fileExtension;\n\n // Generate random file name\n fileName = this.word({length : fileOptions.length});\n\n // Generate file by specific extension provided by the user\n if(fileOptions.extension) {\n\n fileExtension = fileOptions.extension;\n return (fileName + '.' + fileExtension);\n }\n\n // Generate file by specific extension collection\n if(fileOptions.extensions) {\n\n if(Array.isArray(fileOptions.extensions)) {\n\n fileExtension = this.pickone(fileOptions.extensions);\n return (fileName + '.' + fileExtension);\n }\n else if(fileOptions.extensions.constructor === Object) {\n\n var extensionObjectCollection = fileOptions.extensions;\n var keys = Object.keys(extensionObjectCollection);\n\n fileExtension = this.pickone(extensionObjectCollection[this.pickone(keys)]);\n return (fileName + '.' + fileExtension);\n }\n\n throw new Error(\"Chance: Extensions must be an Array or Object\");\n }\n\n // Generate file extension based on specific file type\n if(fileOptions.fileType) {\n\n var fileType = fileOptions.fileType;\n if(typeRange.indexOf(fileType) !== -1) {\n\n fileExtension = this.pickone(this.get(poolCollectionKey)[fileType]);\n return (fileName + '.' + fileExtension);\n }\n\n throw new RangeError(\"Chance: Expect file type value to be 'raster', 'vector', '3d' or 'document'\");\n }\n\n // Generate random file name if no extension options are passed\n fileExtension = this.pickone(this.get(poolCollectionKey)[this.pickone(typeRange)]);\n return (fileName + '.' + fileExtension);\n };\n\n var data = {\n\n firstNames: {\n \"male\": {\n \"en\": [\"James\", \"John\", \"Robert\", \"Michael\", \"William\", \"David\", \"Richard\", \"Joseph\", \"Charles\", \"Thomas\", \"Christopher\", \"Daniel\", \"Matthew\", \"George\", \"Donald\", \"Anthony\", \"Paul\", \"Mark\", \"Edward\", \"Steven\", \"Kenneth\", \"Andrew\", \"Brian\", \"Joshua\", \"Kevin\", \"Ronald\", \"Timothy\", \"Jason\", \"Jeffrey\", \"Frank\", \"Gary\", \"Ryan\", \"Nicholas\", \"Eric\", \"Stephen\", \"Jacob\", \"Larry\", \"Jonathan\", \"Scott\", \"Raymond\", \"Justin\", \"Brandon\", \"Gregory\", \"Samuel\", \"Benjamin\", \"Patrick\", \"Jack\", \"Henry\", \"Walter\", \"Dennis\", \"Jerry\", \"Alexander\", \"Peter\", \"Tyler\", \"Douglas\", \"Harold\", \"Aaron\", \"Jose\", \"Adam\", \"Arthur\", \"Zachary\", \"Carl\", \"Nathan\", \"Albert\", \"Kyle\", \"Lawrence\", \"Joe\", \"Willie\", \"Gerald\", \"Roger\", \"Keith\", \"Jeremy\", \"Terry\", \"Harry\", \"Ralph\", \"Sean\", \"Jesse\", \"Roy\", \"Louis\", \"Billy\", \"Austin\", \"Bruce\", \"Eugene\", \"Christian\", \"Bryan\", \"Wayne\", \"Russell\", \"Howard\", \"Fred\", \"Ethan\", \"Jordan\", \"Philip\", \"Alan\", \"Juan\", \"Randy\", \"Vincent\", \"Bobby\", \"Dylan\", \"Johnny\", \"Phillip\", \"Victor\", \"Clarence\", \"Ernest\", \"Martin\", \"Craig\", \"Stanley\", \"Shawn\", \"Travis\", \"Bradley\", \"Leonard\", \"Earl\", \"Gabriel\", \"Jimmy\", \"Francis\", \"Todd\", \"Noah\", \"Danny\", \"Dale\", \"Cody\", \"Carlos\", \"Allen\", \"Frederick\", \"Logan\", \"Curtis\", \"Alex\", \"Joel\", \"Luis\", \"Norman\", \"Marvin\", \"Glenn\", \"Tony\", \"Nathaniel\", \"Rodney\", \"Melvin\", \"Alfred\", \"Steve\", \"Cameron\", \"Chad\", \"Edwin\", \"Caleb\", \"Evan\", \"Antonio\", \"Lee\", \"Herbert\", \"Jeffery\", \"Isaac\", \"Derek\", \"Ricky\", \"Marcus\", \"Theodore\", \"Elijah\", \"Luke\", \"Jesus\", \"Eddie\", \"Troy\", \"Mike\", \"Dustin\", \"Ray\", \"Adrian\", \"Bernard\", \"Leroy\", \"Angel\", \"Randall\", \"Wesley\", \"Ian\", \"Jared\", \"Mason\", \"Hunter\", \"Calvin\", \"Oscar\", \"Clifford\", \"Jay\", \"Shane\", \"Ronnie\", \"Barry\", \"Lucas\", \"Corey\", \"Manuel\", \"Leo\", \"Tommy\", \"Warren\", \"Jackson\", \"Isaiah\", \"Connor\", \"Don\", \"Dean\", \"Jon\", \"Julian\", \"Miguel\", \"Bill\", \"Lloyd\", \"Charlie\", \"Mitchell\", \"Leon\", \"Jerome\", \"Darrell\", \"Jeremiah\", \"Alvin\", \"Brett\", \"Seth\", \"Floyd\", \"Jim\", \"Blake\", \"Micheal\", \"Gordon\", \"Trevor\", \"Lewis\", \"Erik\", \"Edgar\", \"Vernon\", \"Devin\", \"Gavin\", \"Jayden\", \"Chris\", \"Clyde\", \"Tom\", \"Derrick\", \"Mario\", \"Brent\", \"Marc\", \"Herman\", \"Chase\", \"Dominic\", \"Ricardo\", \"Franklin\", \"Maurice\", \"Max\", \"Aiden\", \"Owen\", \"Lester\", \"Gilbert\", \"Elmer\", \"Gene\", \"Francisco\", \"Glen\", \"Cory\", \"Garrett\", \"Clayton\", \"Sam\", \"Jorge\", \"Chester\", \"Alejandro\", \"Jeff\", \"Harvey\", \"Milton\", \"Cole\", \"Ivan\", \"Andre\", \"Duane\", \"Landon\"],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0163\n \"it\": [\"Adolfo\", \"Alberto\", \"Aldo\", \"Alessandro\", \"Alessio\", \"Alfredo\", \"Alvaro\", \"Andrea\", \"Angelo\", \"Angiolo\", \"Antonino\", \"Antonio\", \"Attilio\", \"Benito\", \"Bernardo\", \"Bruno\", \"Carlo\", \"Cesare\", \"Christian\", \"Claudio\", \"Corrado\", \"Cosimo\", \"Cristian\", \"Cristiano\", \"Daniele\", \"Dario\", \"David\", \"Davide\", \"Diego\", \"Dino\", \"Domenico\", \"Duccio\", \"Edoardo\", \"Elia\", \"Elio\", \"Emanuele\", \"Emiliano\", \"Emilio\", \"Enrico\", \"Enzo\", \"Ettore\", \"Fabio\", \"Fabrizio\", \"Federico\", \"Ferdinando\", \"Fernando\", \"Filippo\", \"Francesco\", \"Franco\", \"Gabriele\", \"Giacomo\", \"Giampaolo\", \"Giampiero\", \"Giancarlo\", \"Gianfranco\", \"Gianluca\", \"Gianmarco\", \"Gianni\", \"Gino\", \"Giorgio\", \"Giovanni\", \"Giuliano\", \"Giulio\", \"Giuseppe\", \"Graziano\", \"Gregorio\", \"Guido\", \"Iacopo\", \"Jacopo\", \"Lapo\", \"Leonardo\", \"Lorenzo\", \"Luca\", \"Luciano\", \"Luigi\", \"Manuel\", \"Marcello\", \"Marco\", \"Marino\", \"Mario\", \"Massimiliano\", \"Massimo\", \"Matteo\", \"Mattia\", \"Maurizio\", \"Mauro\", \"Michele\", \"Mirko\", \"Mohamed\", \"Nello\", \"Neri\", \"Niccolò\", \"Nicola\", \"Osvaldo\", \"Otello\", \"Paolo\", \"Pier Luigi\", \"Piero\", \"Pietro\", \"Raffaele\", \"Remo\", \"Renato\", \"Renzo\", \"Riccardo\", \"Roberto\", \"Rolando\", \"Romano\", \"Salvatore\", \"Samuele\", \"Sandro\", \"Sergio\", \"Silvano\", \"Simone\", \"Stefano\", \"Thomas\", \"Tommaso\", \"Ubaldo\", \"Ugo\", \"Umberto\", \"Valerio\", \"Valter\", \"Vasco\", \"Vincenzo\", \"Vittorio\"],\n // Data taken from http://www.svbkindernamen.nl/int/nl/kindernamen/index.html\n \"nl\": [\"Aaron\",\"Abel\",\"Adam\",\"Adriaan\",\"Albert\",\"Alexander\",\"Ali\",\"Arjen\",\"Arno\",\"Bart\",\"Bas\",\"Bastiaan\",\"Benjamin\",\"Bob\", \"Boris\",\"Bram\",\"Brent\",\"Cas\",\"Casper\",\"Chris\",\"Christiaan\",\"Cornelis\",\"Daan\",\"Daley\",\"Damian\",\"Dani\",\"Daniel\",\"Daniël\",\"David\",\"Dean\",\"Dirk\",\"Dylan\",\"Egbert\",\"Elijah\",\"Erik\",\"Erwin\",\"Evert\",\"Ezra\",\"Fabian\",\"Fedde\",\"Finn\",\"Florian\",\"Floris\",\"Frank\",\"Frans\",\"Frederik\",\"Freek\",\"Geert\",\"Gerard\",\"Gerben\",\"Gerrit\",\"Gijs\",\"Guus\",\"Hans\",\"Hendrik\",\"Henk\",\"Herman\",\"Hidde\",\"Hugo\",\"Jaap\",\"Jan Jaap\",\"Jan-Willem\",\"Jack\",\"Jacob\",\"Jan\",\"Jason\",\"Jasper\",\"Jayden\",\"Jelle\",\"Jelte\",\"Jens\",\"Jeroen\",\"Jesse\",\"Jim\",\"Job\",\"Joep\",\"Johannes\",\"John\",\"Jonathan\",\"Joris\",\"Joshua\",\"Joël\",\"Julian\",\"Kees\",\"Kevin\",\"Koen\",\"Lars\",\"Laurens\",\"Leendert\",\"Lennard\",\"Lodewijk\",\"Luc\",\"Luca\",\"Lucas\",\"Lukas\",\"Luuk\",\"Maarten\",\"Marcus\",\"Martijn\",\"Martin\",\"Matthijs\",\"Maurits\",\"Max\",\"Mees\",\"Melle\",\"Mick\",\"Mika\",\"Milan\",\"Mohamed\",\"Mohammed\",\"Morris\",\"Muhammed\",\"Nathan\",\"Nick\",\"Nico\",\"Niek\",\"Niels\",\"Noah\",\"Noud\",\"Olivier\",\"Oscar\",\"Owen\",\"Paul\",\"Pepijn\",\"Peter\",\"Pieter\",\"Pim\",\"Quinten\",\"Reinier\",\"Rens\",\"Robin\",\"Ruben\",\"Sam\",\"Samuel\",\"Sander\",\"Sebastiaan\",\"Sem\",\"Sep\",\"Sepp\",\"Siem\",\"Simon\",\"Stan\",\"Stef\",\"Steven\",\"Stijn\",\"Sven\",\"Teun\",\"Thijmen\",\"Thijs\",\"Thomas\",\"Tijn\",\"Tim\",\"Timo\",\"Tobias\",\"Tom\",\"Victor\",\"Vince\",\"Willem\",\"Wim\",\"Wouter\",\"Yusuf\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_de_pr%C3%A9noms_fran%C3%A7ais_et_de_la_francophonie\n \"fr\": [\"Aaron\",\"Abdon\",\"Abel\",\"Abélard\",\"Abelin\",\"Abondance\",\"Abraham\",\"Absalon\",\"Acace\",\"Achaire\",\"Achille\",\"Adalard\",\"Adalbald\",\"Adalbéron\",\"Adalbert\",\"Adalric\",\"Adam\",\"Adegrin\",\"Adel\",\"Adelin\",\"Andelin\",\"Adelphe\",\"Adam\",\"Adéodat\",\"Adhémar\",\"Adjutor\",\"Adolphe\",\"Adonis\",\"Adon\",\"Adrien\",\"Agapet\",\"Agathange\",\"Agathon\",\"Agilbert\",\"Agénor\",\"Agnan\",\"Aignan\",\"Agrippin\",\"Aimable\",\"Aimé\",\"Alain\",\"Alban\",\"Albin\",\"Aubin\",\"Albéric\",\"Albert\",\"Albertet\",\"Alcibiade\",\"Alcide\",\"Alcée\",\"Alcime\",\"Aldonce\",\"Aldric\",\"Aldéric\",\"Aleaume\",\"Alexandre\",\"Alexis\",\"Alix\",\"Alliaume\",\"Aleaume\",\"Almine\",\"Almire\",\"Aloïs\",\"Alphée\",\"Alphonse\",\"Alpinien\",\"Alverède\",\"Amalric\",\"Amaury\",\"Amandin\",\"Amant\",\"Ambroise\",\"Amédée\",\"Amélien\",\"Amiel\",\"Amour\",\"Anaël\",\"Anastase\",\"Anatole\",\"Ancelin\",\"Andéol\",\"Andoche\",\"André\",\"Andoche\",\"Ange\",\"Angelin\",\"Angilbe\",\"Anglebert\",\"Angoustan\",\"Anicet\",\"Anne\",\"Annibal\",\"Ansbert\",\"Anselme\",\"Anthelme\",\"Antheaume\",\"Anthime\",\"Antide\",\"Antoine\",\"Antonius\",\"Antonin\",\"Apollinaire\",\"Apollon\",\"Aquilin\",\"Arcade\",\"Archambaud\",\"Archambeau\",\"Archange\",\"Archibald\",\"Arian\",\"Ariel\",\"Ariste\",\"Aristide\",\"Armand\",\"Armel\",\"Armin\",\"Arnould\",\"Arnaud\",\"Arolde\",\"Arsène\",\"Arsinoé\",\"Arthaud\",\"Arthème\",\"Arthur\",\"Ascelin\",\"Athanase\",\"Aubry\",\"Audebert\",\"Audouin\",\"Audran\",\"Audric\",\"Auguste\",\"Augustin\",\"Aurèle\",\"Aurélien\",\"Aurian\",\"Auxence\",\"Axel\",\"Aymard\",\"Aymeric\",\"Aymon\",\"Aymond\",\"Balthazar\",\"Baptiste\",\"Barnabé\",\"Barthélemy\",\"Bartimée\",\"Basile\",\"Bastien\",\"Baudouin\",\"Bénigne\",\"Benjamin\",\"Benoît\",\"Bérenger\",\"Bérard\",\"Bernard\",\"Bertrand\",\"Blaise\",\"Bon\",\"Boniface\",\"Bouchard\",\"Brice\",\"Brieuc\",\"Bruno\",\"Brunon\",\"Calixte\",\"Calliste\",\"Camélien\",\"Camille\",\"Camillien\",\"Candide\",\"Caribert\",\"Carloman\",\"Cassandre\",\"Cassien\",\"Cédric\",\"Céleste\",\"Célestin\",\"Célien\",\"Césaire\",\"César\",\"Charles\",\"Charlemagne\",\"Childebert\",\"Chilpéric\",\"Chrétien\",\"Christian\",\"Christodule\",\"Christophe\",\"Chrysostome\",\"Clarence\",\"Claude\",\"Claudien\",\"Cléandre\",\"Clément\",\"Clotaire\",\"Côme\",\"Constance\",\"Constant\",\"Constantin\",\"Corentin\",\"Cyprien\",\"Cyriaque\",\"Cyrille\",\"Cyril\",\"Damien\",\"Daniel\",\"David\",\"Delphin\",\"Denis\",\"Désiré\",\"Didier\",\"Dieudonné\",\"Dimitri\",\"Dominique\",\"Dorian\",\"Dorothée\",\"Edgard\",\"Edmond\",\"Édouard\",\"Éleuthère\",\"Élie\",\"Élisée\",\"Émeric\",\"Émile\",\"Émilien\",\"Emmanuel\",\"Enguerrand\",\"Épiphane\",\"Éric\",\"Esprit\",\"Ernest\",\"Étienne\",\"Eubert\",\"Eudes\",\"Eudoxe\",\"Eugène\",\"Eusèbe\",\"Eustache\",\"Évariste\",\"Évrard\",\"Fabien\",\"Fabrice\",\"Falba\",\"Félicité\",\"Félix\",\"Ferdinand\",\"Fiacre\",\"Fidèle\",\"Firmin\",\"Flavien\",\"Flodoard\",\"Florent\",\"Florentin\",\"Florestan\",\"Florian\",\"Fortuné\",\"Foulques\",\"Francisque\",\"François\",\"Français\",\"Franciscus\",\"Francs\",\"Frédéric\",\"Fulbert\",\"Fulcran\",\"Fulgence\",\"Gabin\",\"Gabriel\",\"Gaël\",\"Garnier\",\"Gaston\",\"Gaspard\",\"Gatien\",\"Gaud\",\"Gautier\",\"Gédéon\",\"Geoffroy\",\"Georges\",\"Géraud\",\"Gérard\",\"Gerbert\",\"Germain\",\"Gervais\",\"Ghislain\",\"Gilbert\",\"Gilles\",\"Girart\",\"Gislebert\",\"Gondebaud\",\"Gonthier\",\"Gontran\",\"Gonzague\",\"Grégoire\",\"Guérin\",\"Gui\",\"Guillaume\",\"Gustave\",\"Guy\",\"Guyot\",\"Hardouin\",\"Hector\",\"Hédelin\",\"Hélier\",\"Henri\",\"Herbert\",\"Herluin\",\"Hervé\",\"Hilaire\",\"Hildebert\",\"Hincmar\",\"Hippolyte\",\"Honoré\",\"Hubert\",\"Hugues\",\"Innocent\",\"Isabeau\",\"Isidore\",\"Jacques\",\"Japhet\",\"Jason\",\"Jean\",\"Jeannel\",\"Jeannot\",\"Jérémie\",\"Jérôme\",\"Joachim\",\"Joanny\",\"Job\",\"Jocelyn\",\"Joël\",\"Johan\",\"Jonas\",\"Jonathan\",\"Joseph\",\"Josse\",\"Josselin\",\"Jourdain\",\"Jude\",\"Judicaël\",\"Jules\",\"Julien\",\"Juste\",\"Justin\",\"Lambert\",\"Landry\",\"Laurent\",\"Lazare\",\"Léandre\",\"Léon\",\"Léonard\",\"Léopold\",\"Leu\",\"Loup\",\"Leufroy\",\"Libère\",\"Liétald\",\"Lionel\",\"Loïc\",\"Longin\",\"Lorrain\",\"Lorraine\",\"Lothaire\",\"Louis\",\"Loup\",\"Luc\",\"Lucas\",\"Lucien\",\"Ludolphe\",\"Ludovic\",\"Macaire\",\"Malo\",\"Mamert\",\"Manassé\",\"Marc\",\"Marceau\",\"Marcel\",\"Marcelin\",\"Marius\",\"Marseille\",\"Martial\",\"Martin\",\"Mathurin\",\"Matthias\",\"Mathias\",\"Matthieu\",\"Maugis\",\"Maurice\",\"Mauricet\",\"Maxence\",\"Maxime\",\"Maximilien\",\"Mayeul\",\"Médéric\",\"Melchior\",\"Mence\",\"Merlin\",\"Mérovée\",\"Michaël\",\"Michel\",\"Moïse\",\"Morgan\",\"Nathan\",\"Nathanaël\",\"Narcisse\",\"Néhémie\",\"Nestor\",\"Nestor\",\"Nicéphore\",\"Nicolas\",\"Noé\",\"Noël\",\"Norbert\",\"Normand\",\"Normands\",\"Octave\",\"Odilon\",\"Odon\",\"Oger\",\"Olivier\",\"Oury\",\"Pacôme\",\"Palémon\",\"Parfait\",\"Pascal\",\"Paterne\",\"Patrice\",\"Paul\",\"Pépin\",\"Perceval\",\"Philémon\",\"Philibert\",\"Philippe\",\"Philothée\",\"Pie\",\"Pierre\",\"Pierrick\",\"Prosper\",\"Quentin\",\"Raoul\",\"Raphaël\",\"Raymond\",\"Régis\",\"Réjean\",\"Rémi\",\"Renaud\",\"René\",\"Reybaud\",\"Richard\",\"Robert\",\"Roch\",\"Rodolphe\",\"Rodrigue\",\"Roger\",\"Roland\",\"Romain\",\"Romuald\",\"Roméo\",\"Rome\",\"Ronan\",\"Roselin\",\"Salomon\",\"Samuel\",\"Savin\",\"Savinien\",\"Scholastique\",\"Sébastien\",\"Séraphin\",\"Serge\",\"Séverin\",\"Sidoine\",\"Sigebert\",\"Sigismond\",\"Silvère\",\"Simon\",\"Siméon\",\"Sixte\",\"Stanislas\",\"Stéphane\",\"Stephan\",\"Sylvain\",\"Sylvestre\",\"Tancrède\",\"Tanguy\",\"Taurin\",\"Théodore\",\"Théodose\",\"Théophile\",\"Théophraste\",\"Thibault\",\"Thibert\",\"Thierry\",\"Thomas\",\"Timoléon\",\"Timothée\",\"Titien\",\"Tonnin\",\"Toussaint\",\"Trajan\",\"Tristan\",\"Turold\",\"Tim\",\"Ulysse\",\"Urbain\",\"Valentin\",\"Valère\",\"Valéry\",\"Venance\",\"Venant\",\"Venceslas\",\"Vianney\",\"Victor\",\"Victorien\",\"Victorin\",\"Vigile\",\"Vincent\",\"Vital\",\"Vitalien\",\"Vivien\",\"Waleran\",\"Wandrille\",\"Xavier\",\"Xénophon\",\"Yves\",\"Zacharie\",\"Zaché\",\"Zéphirin\"]\n },\n\n \"female\": {\n \"en\": [\"Mary\", \"Emma\", \"Elizabeth\", \"Minnie\", \"Margaret\", \"Ida\", \"Alice\", \"Bertha\", \"Sarah\", \"Annie\", \"Clara\", \"Ella\", \"Florence\", \"Cora\", \"Martha\", \"Laura\", \"Nellie\", \"Grace\", \"Carrie\", \"Maude\", \"Mabel\", \"Bessie\", \"Jennie\", \"Gertrude\", \"Julia\", \"Hattie\", \"Edith\", \"Mattie\", \"Rose\", \"Catherine\", \"Lillian\", \"Ada\", \"Lillie\", \"Helen\", \"Jessie\", \"Louise\", \"Ethel\", \"Lula\", \"Myrtle\", \"Eva\", \"Frances\", \"Lena\", \"Lucy\", \"Edna\", \"Maggie\", \"Pearl\", \"Daisy\", \"Fannie\", \"Josephine\", \"Dora\", \"Rosa\", \"Katherine\", \"Agnes\", \"Marie\", \"Nora\", \"May\", \"Mamie\", \"Blanche\", \"Stella\", \"Ellen\", \"Nancy\", \"Effie\", \"Sallie\", \"Nettie\", \"Della\", \"Lizzie\", \"Flora\", \"Susie\", \"Maud\", \"Mae\", \"Etta\", \"Harriet\", \"Sadie\", \"Caroline\", \"Katie\", \"Lydia\", \"Elsie\", \"Kate\", \"Susan\", \"Mollie\", \"Alma\", \"Addie\", \"Georgia\", \"Eliza\", \"Lulu\", \"Nannie\", \"Lottie\", \"Amanda\", \"Belle\", \"Charlotte\", \"Rebecca\", \"Ruth\", \"Viola\", \"Olive\", \"Amelia\", \"Hannah\", \"Jane\", \"Virginia\", \"Emily\", \"Matilda\", \"Irene\", \"Kathryn\", \"Esther\", \"Willie\", \"Henrietta\", \"Ollie\", \"Amy\", \"Rachel\", \"Sara\", \"Estella\", \"Theresa\", \"Augusta\", \"Ora\", \"Pauline\", \"Josie\", \"Lola\", \"Sophia\", \"Leona\", \"Anne\", \"Mildred\", \"Ann\", \"Beulah\", \"Callie\", \"Lou\", \"Delia\", \"Eleanor\", \"Barbara\", \"Iva\", \"Louisa\", \"Maria\", \"Mayme\", \"Evelyn\", \"Estelle\", \"Nina\", \"Betty\", \"Marion\", \"Bettie\", \"Dorothy\", \"Luella\", \"Inez\", \"Lela\", \"Rosie\", \"Allie\", \"Millie\", \"Janie\", \"Cornelia\", \"Victoria\", \"Ruby\", \"Winifred\", \"Alta\", \"Celia\", \"Christine\", \"Beatrice\", \"Birdie\", \"Harriett\", \"Mable\", \"Myra\", \"Sophie\", \"Tillie\", \"Isabel\", \"Sylvia\", \"Carolyn\", \"Isabelle\", \"Leila\", \"Sally\", \"Ina\", \"Essie\", \"Bertie\", \"Nell\", \"Alberta\", \"Katharine\", \"Lora\", \"Rena\", \"Mina\", \"Rhoda\", \"Mathilda\", \"Abbie\", \"Eula\", \"Dollie\", \"Hettie\", \"Eunice\", \"Fanny\", \"Ola\", \"Lenora\", \"Adelaide\", \"Christina\", \"Lelia\", \"Nelle\", \"Sue\", \"Johanna\", \"Lilly\", \"Lucinda\", \"Minerva\", \"Lettie\", \"Roxie\", \"Cynthia\", \"Helena\", \"Hilda\", \"Hulda\", \"Bernice\", \"Genevieve\", \"Jean\", \"Cordelia\", \"Marian\", \"Francis\", \"Jeanette\", \"Adeline\", \"Gussie\", \"Leah\", \"Lois\", \"Lura\", \"Mittie\", \"Hallie\", \"Isabella\", \"Olga\", \"Phoebe\", \"Teresa\", \"Hester\", \"Lida\", \"Lina\", \"Winnie\", \"Claudia\", \"Marguerite\", \"Vera\", \"Cecelia\", \"Bess\", \"Emilie\", \"Rosetta\", \"Verna\", \"Myrtie\", \"Cecilia\", \"Elva\", \"Olivia\", \"Ophelia\", \"Georgie\", \"Elnora\", \"Violet\", \"Adele\", \"Lily\", \"Linnie\", \"Loretta\", \"Madge\", \"Polly\", \"Virgie\", \"Eugenia\", \"Lucile\", \"Lucille\", \"Mabelle\", \"Rosalie\"],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0162\n \"it\": [\"Ada\", \"Adriana\", \"Alessandra\", \"Alessia\", \"Alice\", \"Angela\", \"Anna\", \"Anna Maria\", \"Annalisa\", \"Annita\", \"Annunziata\", \"Antonella\", \"Arianna\", \"Asia\", \"Assunta\", \"Aurora\", \"Barbara\", \"Beatrice\", \"Benedetta\", \"Bianca\", \"Bruna\", \"Camilla\", \"Carla\", \"Carlotta\", \"Carmela\", \"Carolina\", \"Caterina\", \"Catia\", \"Cecilia\", \"Chiara\", \"Cinzia\", \"Clara\", \"Claudia\", \"Costanza\", \"Cristina\", \"Daniela\", \"Debora\", \"Diletta\", \"Dina\", \"Donatella\", \"Elena\", \"Eleonora\", \"Elisa\", \"Elisabetta\", \"Emanuela\", \"Emma\", \"Eva\", \"Federica\", \"Fernanda\", \"Fiorella\", \"Fiorenza\", \"Flora\", \"Franca\", \"Francesca\", \"Gabriella\", \"Gaia\", \"Gemma\", \"Giada\", \"Gianna\", \"Gina\", \"Ginevra\", \"Giorgia\", \"Giovanna\", \"Giulia\", \"Giuliana\", \"Giuseppa\", \"Giuseppina\", \"Grazia\", \"Graziella\", \"Greta\", \"Ida\", \"Ilaria\", \"Ines\", \"Iolanda\", \"Irene\", \"Irma\", \"Isabella\", \"Jessica\", \"Laura\", \"Lea\", \"Letizia\", \"Licia\", \"Lidia\", \"Liliana\", \"Lina\", \"Linda\", \"Lisa\", \"Livia\", \"Loretta\", \"Luana\", \"Lucia\", \"Luciana\", \"Lucrezia\", \"Luisa\", \"Manuela\", \"Mara\", \"Marcella\", \"Margherita\", \"Maria\", \"Maria Cristina\", \"Maria Grazia\", \"Maria Luisa\", \"Maria Pia\", \"Maria Teresa\", \"Marina\", \"Marisa\", \"Marta\", \"Martina\", \"Marzia\", \"Matilde\", \"Melissa\", \"Michela\", \"Milena\", \"Mirella\", \"Monica\", \"Natalina\", \"Nella\", \"Nicoletta\", \"Noemi\", \"Olga\", \"Paola\", \"Patrizia\", \"Piera\", \"Pierina\", \"Raffaella\", \"Rebecca\", \"Renata\", \"Rina\", \"Rita\", \"Roberta\", \"Rosa\", \"Rosanna\", \"Rossana\", \"Rossella\", \"Sabrina\", \"Sandra\", \"Sara\", \"Serena\", \"Silvana\", \"Silvia\", \"Simona\", \"Simonetta\", \"Sofia\", \"Sonia\", \"Stefania\", \"Susanna\", \"Teresa\", \"Tina\", \"Tiziana\", \"Tosca\", \"Valentina\", \"Valeria\", \"Vanda\", \"Vanessa\", \"Vanna\", \"Vera\", \"Veronica\", \"Vilma\", \"Viola\", \"Virginia\", \"Vittoria\"],\n // Data taken from http://www.svbkindernamen.nl/int/nl/kindernamen/index.html\n \"nl\": [\"Ada\", \"Arianne\", \"Afke\", \"Amanda\", \"Amber\", \"Amy\", \"Aniek\", \"Anita\", \"Anja\", \"Anna\", \"Anne\", \"Annelies\", \"Annemarie\", \"Annette\", \"Anouk\", \"Astrid\", \"Aukje\", \"Barbara\", \"Bianca\", \"Carla\", \"Carlijn\", \"Carolien\", \"Chantal\", \"Charlotte\", \"Claudia\", \"Daniëlle\", \"Debora\", \"Diane\", \"Dora\", \"Eline\", \"Elise\", \"Ella\", \"Ellen\", \"Emma\", \"Esmee\", \"Evelien\", \"Esther\", \"Erica\", \"Eva\", \"Femke\", \"Fleur\", \"Floor\", \"Froukje\", \"Gea\", \"Gerda\", \"Hanna\", \"Hanneke\", \"Heleen\", \"Hilde\", \"Ilona\", \"Ina\", \"Inge\", \"Ingrid\", \"Iris\", \"Isabel\", \"Isabelle\", \"Janneke\", \"Jasmijn\", \"Jeanine\", \"Jennifer\", \"Jessica\", \"Johanna\", \"Joke\", \"Julia\", \"Julie\", \"Karen\", \"Karin\", \"Katja\", \"Kim\", \"Lara\", \"Laura\", \"Lena\", \"Lianne\", \"Lieke\", \"Lilian\", \"Linda\", \"Lisa\", \"Lisanne\", \"Lotte\", \"Louise\", \"Maaike\", \"Manon\", \"Marga\", \"Maria\", \"Marissa\", \"Marit\", \"Marjolein\", \"Martine\", \"Marleen\", \"Melissa\", \"Merel\", \"Miranda\", \"Michelle\", \"Mirjam\", \"Mirthe\", \"Naomi\", \"Natalie\", 'Nienke', \"Nina\", \"Noortje\", \"Olivia\", \"Patricia\", \"Paula\", \"Paulien\", \"Ramona\", \"Ria\", \"Rianne\", \"Roos\", \"Rosanne\", \"Ruth\", \"Sabrina\", \"Sandra\", \"Sanne\", \"Sara\", \"Saskia\", \"Silvia\", \"Sofia\", \"Sophie\", \"Sonja\", \"Suzanne\", \"Tamara\", \"Tess\", \"Tessa\", \"Tineke\", \"Valerie\", \"Vanessa\", \"Veerle\", \"Vera\", \"Victoria\", \"Wendy\", \"Willeke\", \"Yvonne\", \"Zoë\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_de_pr%C3%A9noms_fran%C3%A7ais_et_de_la_francophonie\n \"fr\": [\"Abdon\",\"Abel\",\"Abigaëlle\",\"Abigaïl\",\"Acacius\",\"Acanthe\",\"Adalbert\",\"Adalsinde\",\"Adegrine\",\"Adélaïde\",\"Adèle\",\"Adélie\",\"Adeline\",\"Adeltrude\",\"Adolphe\",\"Adonis\",\"Adrastée\",\"Adrehilde\",\"Adrienne\",\"Agathe\",\"Agilbert\",\"Aglaé\",\"Aignan\",\"Agneflète\",\"Agnès\",\"Agrippine\",\"Aimé\",\"Alaine\",\"Alaïs\",\"Albane\",\"Albérade\",\"Alberte\",\"Alcide\",\"Alcine\",\"Alcyone\",\"Aldegonde\",\"Aleth\",\"Alexandrine\",\"Alexine\",\"Alice\",\"Aliénor\",\"Aliette\",\"Aline\",\"Alix\",\"Alizé\",\"Aloïse\",\"Aloyse\",\"Alphonsine\",\"Althée\",\"Amaliane\",\"Amalthée\",\"Amande\",\"Amandine\",\"Amant\",\"Amarande\",\"Amaranthe\",\"Amaryllis\",\"Ambre\",\"Ambroisie\",\"Amélie\",\"Améthyste\",\"Aminte\",\"Anaël\",\"Anaïs\",\"Anastasie\",\"Anatole\",\"Ancelin\",\"Andrée\",\"Anémone\",\"Angadrême\",\"Angèle\",\"Angeline\",\"Angélique\",\"Angilbert\",\"Anicet\",\"Annabelle\",\"Anne\",\"Annette\",\"Annick\",\"Annie\",\"Annonciade\",\"Ansbert\",\"Anstrudie\",\"Anthelme\",\"Antigone\",\"Antoinette\",\"Antonine\",\"Aphélie\",\"Apolline\",\"Apollonie\",\"Aquiline\",\"Arabelle\",\"Arcadie\",\"Archange\",\"Argine\",\"Ariane\",\"Aricie\",\"Ariel\",\"Arielle\",\"Arlette\",\"Armance\",\"Armande\",\"Armandine\",\"Armelle\",\"Armide\",\"Armelle\",\"Armin\",\"Arnaud\",\"Arsène\",\"Arsinoé\",\"Artémis\",\"Arthur\",\"Ascelin\",\"Ascension\",\"Assomption\",\"Astarté\",\"Astérie\",\"Astrée\",\"Astrid\",\"Athalie\",\"Athanasie\",\"Athina\",\"Aube\",\"Albert\",\"Aude\",\"Audrey\",\"Augustine\",\"Aure\",\"Aurélie\",\"Aurélien\",\"Aurèle\",\"Aurore\",\"Auxence\",\"Aveline\",\"Abigaëlle\",\"Avoye\",\"Axelle\",\"Aymard\",\"Azalée\",\"Adèle\",\"Adeline\",\"Barbe\",\"Basilisse\",\"Bathilde\",\"Béatrice\",\"Béatrix\",\"Bénédicte\",\"Bérengère\",\"Bernadette\",\"Berthe\",\"Bertille\",\"Beuve\",\"Blanche\",\"Blanc\",\"Blandine\",\"Brigitte\",\"Brune\",\"Brunehilde\",\"Callista\",\"Camille\",\"Capucine\",\"Carine\",\"Caroline\",\"Cassandre\",\"Catherine\",\"Cécile\",\"Céleste\",\"Célestine\",\"Céline\",\"Chantal\",\"Charlène\",\"Charline\",\"Charlotte\",\"Chloé\",\"Christelle\",\"Christiane\",\"Christine\",\"Claire\",\"Clara\",\"Claude\",\"Claudine\",\"Clarisse\",\"Clémence\",\"Clémentine\",\"Cléo\",\"Clio\",\"Clotilde\",\"Coline\",\"Conception\",\"Constance\",\"Coralie\",\"Coraline\",\"Corentine\",\"Corinne\",\"Cyrielle\",\"Daniel\",\"Daniel\",\"Daphné\",\"Débora\",\"Delphine\",\"Denise\",\"Diane\",\"Dieudonné\",\"Dominique\",\"Doriane\",\"Dorothée\",\"Douce\",\"Édith\",\"Edmée\",\"Éléonore\",\"Éliane\",\"Élia\",\"Éliette\",\"Élisabeth\",\"Élise\",\"Ella\",\"Élodie\",\"Éloïse\",\"Elsa\",\"Émeline\",\"Émérance\",\"Émérentienne\",\"Émérencie\",\"Émilie\",\"Emma\",\"Emmanuelle\",\"Emmelie\",\"Ernestine\",\"Esther\",\"Estelle\",\"Eudoxie\",\"Eugénie\",\"Eulalie\",\"Euphrasie\",\"Eusébie\",\"Évangéline\",\"Eva\",\"Ève\",\"Évelyne\",\"Fanny\",\"Fantine\",\"Faustine\",\"Félicie\",\"Fernande\",\"Flavie\",\"Fleur\",\"Flore\",\"Florence\",\"Florie\",\"Fortuné\",\"France\",\"Francia\",\"Françoise\",\"Francine\",\"Gabrielle\",\"Gaëlle\",\"Garance\",\"Geneviève\",\"Georgette\",\"Gerberge\",\"Germaine\",\"Gertrude\",\"Gisèle\",\"Guenièvre\",\"Guilhemine\",\"Guillemette\",\"Gustave\",\"Gwenael\",\"Hélène\",\"Héloïse\",\"Henriette\",\"Hermine\",\"Hermione\",\"Hippolyte\",\"Honorine\",\"Hortense\",\"Huguette\",\"Ines\",\"Irène\",\"Irina\",\"Iris\",\"Isabeau\",\"Isabelle\",\"Iseult\",\"Isolde\",\"Ismérie\",\"Jacinthe\",\"Jacqueline\",\"Jade\",\"Janine\",\"Jeanne\",\"Jocelyne\",\"Joëlle\",\"Joséphine\",\"Judith\",\"Julia\",\"Julie\",\"Jules\",\"Juliette\",\"Justine\",\"Katy\",\"Kathy\",\"Katie\",\"Laura\",\"Laure\",\"Laureline\",\"Laurence\",\"Laurene\",\"Lauriane\",\"Laurianne\",\"Laurine\",\"Léa\",\"Léna\",\"Léonie\",\"Léon\",\"Léontine\",\"Lorraine\",\"Lucie\",\"Lucienne\",\"Lucille\",\"Ludivine\",\"Lydie\",\"Lydie\",\"Megane\",\"Madeleine\",\"Magali\",\"Maguelone\",\"Mallaury\",\"Manon\",\"Marceline\",\"Margot\",\"Marguerite\",\"Marianne\",\"Marie\",\"Myriam\",\"Marie\",\"Marine\",\"Marion\",\"Marlène\",\"Marthe\",\"Martine\",\"Mathilde\",\"Maud\",\"Maureen\",\"Mauricette\",\"Maxime\",\"Mélanie\",\"Melissa\",\"Mélissandre\",\"Mélisande\",\"Mélodie\",\"Michel\",\"Micheline\",\"Mireille\",\"Miriam\",\"Moïse\",\"Monique\",\"Morgane\",\"Muriel\",\"Mylène\",\"Nadège\",\"Nadine\",\"Nathalie\",\"Nicole\",\"Nicolette\",\"Nine\",\"Noël\",\"Noémie\",\"Océane\",\"Odette\",\"Odile\",\"Olive\",\"Olivia\",\"Olympe\",\"Ombline\",\"Ombeline\",\"Ophélie\",\"Oriande\",\"Oriane\",\"Ozanne\",\"Pascale\",\"Pascaline\",\"Paule\",\"Paulette\",\"Pauline\",\"Priscille\",\"Prisca\",\"Prisque\",\"Pécine\",\"Pélagie\",\"Pénélope\",\"Perrine\",\"Pétronille\",\"Philippine\",\"Philomène\",\"Philothée\",\"Primerose\",\"Prudence\",\"Pulchérie\",\"Quentine\",\"Quiéta\",\"Quintia\",\"Quintilla\",\"Rachel\",\"Raphaëlle\",\"Raymonde\",\"Rebecca\",\"Régine\",\"Réjeanne\",\"René\",\"Rita\",\"Rita\",\"Rolande\",\"Romane\",\"Rosalie\",\"Rose\",\"Roseline\",\"Sabine\",\"Salomé\",\"Sandra\",\"Sandrine\",\"Sarah\",\"Ségolène\",\"Séverine\",\"Sibylle\",\"Simone\",\"Sixt\",\"Solange\",\"Soline\",\"Solène\",\"Sophie\",\"Stéphanie\",\"Suzanne\",\"Sylvain\",\"Sylvie\",\"Tatiana\",\"Thaïs\",\"Théodora\",\"Thérèse\",\"Tiphaine\",\"Ursule\",\"Valentine\",\"Valérie\",\"Véronique\",\"Victoire\",\"Victorine\",\"Vinciane\",\"Violette\",\"Virginie\",\"Viviane\",\"Xavière\",\"Yolande\",\"Ysaline\",\"Yvette\",\"Yvonne\",\"Zélie\",\"Zita\",\"Zoé\"]\n }\n },\n\n lastNames: {\n \"en\": ['Smith', 'Johnson', 'Williams', 'Jones', 'Brown', 'Davis', 'Miller', 'Wilson', 'Moore', 'Taylor', 'Anderson', 'Thomas', 'Jackson', 'White', 'Harris', 'Martin', 'Thompson', 'Garcia', 'Martinez', 'Robinson', 'Clark', 'Rodriguez', 'Lewis', 'Lee', 'Walker', 'Hall', 'Allen', 'Young', 'Hernandez', 'King', 'Wright', 'Lopez', 'Hill', 'Scott', 'Green', 'Adams', 'Baker', 'Gonzalez', 'Nelson', 'Carter', 'Mitchell', 'Perez', 'Roberts', 'Turner', 'Phillips', 'Campbell', 'Parker', 'Evans', 'Edwards', 'Collins', 'Stewart', 'Sanchez', 'Morris', 'Rogers', 'Reed', 'Cook', 'Morgan', 'Bell', 'Murphy', 'Bailey', 'Rivera', 'Cooper', 'Richardson', 'Cox', 'Howard', 'Ward', 'Torres', 'Peterson', 'Gray', 'Ramirez', 'James', 'Watson', 'Brooks', 'Kelly', 'Sanders', 'Price', 'Bennett', 'Wood', 'Barnes', 'Ross', 'Henderson', 'Coleman', 'Jenkins', 'Perry', 'Powell', 'Long', 'Patterson', 'Hughes', 'Flores', 'Washington', 'Butler', 'Simmons', 'Foster', 'Gonzales', 'Bryant', 'Alexander', 'Russell', 'Griffin', 'Diaz', 'Hayes', 'Myers', 'Ford', 'Hamilton', 'Graham', 'Sullivan', 'Wallace', 'Woods', 'Cole', 'West', 'Jordan', 'Owens', 'Reynolds', 'Fisher', 'Ellis', 'Harrison', 'Gibson', 'McDonald', 'Cruz', 'Marshall', 'Ortiz', 'Gomez', 'Murray', 'Freeman', 'Wells', 'Webb', 'Simpson', 'Stevens', 'Tucker', 'Porter', 'Hunter', 'Hicks', 'Crawford', 'Henry', 'Boyd', 'Mason', 'Morales', 'Kennedy', 'Warren', 'Dixon', 'Ramos', 'Reyes', 'Burns', 'Gordon', 'Shaw', 'Holmes', 'Rice', 'Robertson', 'Hunt', 'Black', 'Daniels', 'Palmer', 'Mills', 'Nichols', 'Grant', 'Knight', 'Ferguson', 'Rose', 'Stone', 'Hawkins', 'Dunn', 'Perkins', 'Hudson', 'Spencer', 'Gardner', 'Stephens', 'Payne', 'Pierce', 'Berry', 'Matthews', 'Arnold', 'Wagner', 'Willis', 'Ray', 'Watkins', 'Olson', 'Carroll', 'Duncan', 'Snyder', 'Hart', 'Cunningham', 'Bradley', 'Lane', 'Andrews', 'Ruiz', 'Harper', 'Fox', 'Riley', 'Armstrong', 'Carpenter', 'Weaver', 'Greene', 'Lawrence', 'Elliott', 'Chavez', 'Sims', 'Austin', 'Peters', 'Kelley', 'Franklin', 'Lawson', 'Fields', 'Gutierrez', 'Ryan', 'Schmidt', 'Carr', 'Vasquez', 'Castillo', 'Wheeler', 'Chapman', 'Oliver', 'Montgomery', 'Richards', 'Williamson', 'Johnston', 'Banks', 'Meyer', 'Bishop', 'McCoy', 'Howell', 'Alvarez', 'Morrison', 'Hansen', 'Fernandez', 'Garza', 'Harvey', 'Little', 'Burton', 'Stanley', 'Nguyen', 'George', 'Jacobs', 'Reid', 'Kim', 'Fuller', 'Lynch', 'Dean', 'Gilbert', 'Garrett', 'Romero', 'Welch', 'Larson', 'Frazier', 'Burke', 'Hanson', 'Day', 'Mendoza', 'Moreno', 'Bowman', 'Medina', 'Fowler', 'Brewer', 'Hoffman', 'Carlson', 'Silva', 'Pearson', 'Holland', 'Douglas', 'Fleming', 'Jensen', 'Vargas', 'Byrd', 'Davidson', 'Hopkins', 'May', 'Terry', 'Herrera', 'Wade', 'Soto', 'Walters', 'Curtis', 'Neal', 'Caldwell', 'Lowe', 'Jennings', 'Barnett', 'Graves', 'Jimenez', 'Horton', 'Shelton', 'Barrett', 'Obrien', 'Castro', 'Sutton', 'Gregory', 'McKinney', 'Lucas', 'Miles', 'Craig', 'Rodriquez', 'Chambers', 'Holt', 'Lambert', 'Fletcher', 'Watts', 'Bates', 'Hale', 'Rhodes', 'Pena', 'Beck', 'Newman', 'Haynes', 'McDaniel', 'Mendez', 'Bush', 'Vaughn', 'Parks', 'Dawson', 'Santiago', 'Norris', 'Hardy', 'Love', 'Steele', 'Curry', 'Powers', 'Schultz', 'Barker', 'Guzman', 'Page', 'Munoz', 'Ball', 'Keller', 'Chandler', 'Weber', 'Leonard', 'Walsh', 'Lyons', 'Ramsey', 'Wolfe', 'Schneider', 'Mullins', 'Benson', 'Sharp', 'Bowen', 'Daniel', 'Barber', 'Cummings', 'Hines', 'Baldwin', 'Griffith', 'Valdez', 'Hubbard', 'Salazar', 'Reeves', 'Warner', 'Stevenson', 'Burgess', 'Santos', 'Tate', 'Cross', 'Garner', 'Mann', 'Mack', 'Moss', 'Thornton', 'Dennis', 'McGee', 'Farmer', 'Delgado', 'Aguilar', 'Vega', 'Glover', 'Manning', 'Cohen', 'Harmon', 'Rodgers', 'Robbins', 'Newton', 'Todd', 'Blair', 'Higgins', 'Ingram', 'Reese', 'Cannon', 'Strickland', 'Townsend', 'Potter', 'Goodwin', 'Walton', 'Rowe', 'Hampton', 'Ortega', 'Patton', 'Swanson', 'Joseph', 'Francis', 'Goodman', 'Maldonado', 'Yates', 'Becker', 'Erickson', 'Hodges', 'Rios', 'Conner', 'Adkins', 'Webster', 'Norman', 'Malone', 'Hammond', 'Flowers', 'Cobb', 'Moody', 'Quinn', 'Blake', 'Maxwell', 'Pope', 'Floyd', 'Osborne', 'Paul', 'McCarthy', 'Guerrero', 'Lindsey', 'Estrada', 'Sandoval', 'Gibbs', 'Tyler', 'Gross', 'Fitzgerald', 'Stokes', 'Doyle', 'Sherman', 'Saunders', 'Wise', 'Colon', 'Gill', 'Alvarado', 'Greer', 'Padilla', 'Simon', 'Waters', 'Nunez', 'Ballard', 'Schwartz', 'McBride', 'Houston', 'Christensen', 'Klein', 'Pratt', 'Briggs', 'Parsons', 'McLaughlin', 'Zimmerman', 'French', 'Buchanan', 'Moran', 'Copeland', 'Roy', 'Pittman', 'Brady', 'McCormick', 'Holloway', 'Brock', 'Poole', 'Frank', 'Logan', 'Owen', 'Bass', 'Marsh', 'Drake', 'Wong', 'Jefferson', 'Park', 'Morton', 'Abbott', 'Sparks', 'Patrick', 'Norton', 'Huff', 'Clayton', 'Massey', 'Lloyd', 'Figueroa', 'Carson', 'Bowers', 'Roberson', 'Barton', 'Tran', 'Lamb', 'Harrington', 'Casey', 'Boone', 'Cortez', 'Clarke', 'Mathis', 'Singleton', 'Wilkins', 'Cain', 'Bryan', 'Underwood', 'Hogan', 'McKenzie', 'Collier', 'Luna', 'Phelps', 'McGuire', 'Allison', 'Bridges', 'Wilkerson', 'Nash', 'Summers', 'Atkins'],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0164 (first 1000)\n \"it\": [\"Acciai\", \"Aglietti\", \"Agostini\", \"Agresti\", \"Ahmed\", \"Aiazzi\", \"Albanese\", \"Alberti\", \"Alessi\", \"Alfani\", \"Alinari\", \"Alterini\", \"Amato\", \"Ammannati\", \"Ancillotti\", \"Andrei\", \"Andreini\", \"Andreoni\", \"Angeli\", \"Anichini\", \"Antonelli\", \"Antonini\", \"Arena\", \"Ariani\", \"Arnetoli\", \"Arrighi\", \"Baccani\", \"Baccetti\", \"Bacci\", \"Bacherini\", \"Badii\", \"Baggiani\", \"Baglioni\", \"Bagni\", \"Bagnoli\", \"Baldassini\", \"Baldi\", \"Baldini\", \"Ballerini\", \"Balli\", \"Ballini\", \"Balloni\", \"Bambi\", \"Banchi\", \"Bandinelli\", \"Bandini\", \"Bani\", \"Barbetti\", \"Barbieri\", \"Barchielli\", \"Bardazzi\", \"Bardelli\", \"Bardi\", \"Barducci\", \"Bargellini\", \"Bargiacchi\", \"Barni\", \"Baroncelli\", \"Baroncini\", \"Barone\", \"Baroni\", \"Baronti\", \"Bartalesi\", \"Bartoletti\", \"Bartoli\", \"Bartolini\", \"Bartoloni\", \"Bartolozzi\", \"Basagni\", \"Basile\", \"Bassi\", \"Batacchi\", \"Battaglia\", \"Battaglini\", \"Bausi\", \"Becagli\", \"Becattini\", \"Becchi\", \"Becucci\", \"Bellandi\", \"Bellesi\", \"Belli\", \"Bellini\", \"Bellucci\", \"Bencini\", \"Benedetti\", \"Benelli\", \"Beni\", \"Benini\", \"Bensi\", \"Benucci\", \"Benvenuti\", \"Berlincioni\", \"Bernacchioni\", \"Bernardi\", \"Bernardini\", \"Berni\", \"Bernini\", \"Bertelli\", \"Berti\", \"Bertini\", \"Bessi\", \"Betti\", \"Bettini\", \"Biagi\", \"Biagini\", \"Biagioni\", \"Biagiotti\", \"Biancalani\", \"Bianchi\", \"Bianchini\", \"Bianco\", \"Biffoli\", \"Bigazzi\", \"Bigi\", \"Biliotti\", \"Billi\", \"Binazzi\", \"Bindi\", \"Bini\", \"Biondi\", \"Bizzarri\", \"Bocci\", \"Bogani\", \"Bolognesi\", \"Bonaiuti\", \"Bonanni\", \"Bonciani\", \"Boncinelli\", \"Bondi\", \"Bonechi\", \"Bongini\", \"Boni\", \"Bonini\", \"Borchi\", \"Boretti\", \"Borghi\", \"Borghini\", \"Borgioli\", \"Borri\", \"Borselli\", \"Boschi\", \"Bottai\", \"Bracci\", \"Braccini\", \"Brandi\", \"Braschi\", \"Bravi\", \"Brazzini\", \"Breschi\", \"Brilli\", \"Brizzi\", \"Brogelli\", \"Brogi\", \"Brogioni\", \"Brunelli\", \"Brunetti\", \"Bruni\", \"Bruno\", \"Brunori\", \"Bruschi\", \"Bucci\", \"Bucciarelli\", \"Buccioni\", \"Bucelli\", \"Bulli\", \"Burberi\", \"Burchi\", \"Burgassi\", \"Burroni\", \"Bussotti\", \"Buti\", \"Caciolli\", \"Caiani\", \"Calabrese\", \"Calamai\", \"Calamandrei\", \"Caldini\", \"Calo'\", \"Calonaci\", \"Calosi\", \"Calvelli\", \"Cambi\", \"Camiciottoli\", \"Cammelli\", \"Cammilli\", \"Campolmi\", \"Cantini\", \"Capanni\", \"Capecchi\", \"Caponi\", \"Cappelletti\", \"Cappelli\", \"Cappellini\", \"Cappugi\", \"Capretti\", \"Caputo\", \"Carbone\", \"Carboni\", \"Cardini\", \"Carlesi\", \"Carletti\", \"Carli\", \"Caroti\", \"Carotti\", \"Carrai\", \"Carraresi\", \"Carta\", \"Caruso\", \"Casalini\", \"Casati\", \"Caselli\", \"Casini\", \"Castagnoli\", \"Castellani\", \"Castelli\", \"Castellucci\", \"Catalano\", \"Catarzi\", \"Catelani\", \"Cavaciocchi\", \"Cavallaro\", \"Cavallini\", \"Cavicchi\", \"Cavini\", \"Ceccarelli\", \"Ceccatelli\", \"Ceccherelli\", \"Ceccherini\", \"Cecchi\", \"Cecchini\", \"Cecconi\", \"Cei\", \"Cellai\", \"Celli\", \"Cellini\", \"Cencetti\", \"Ceni\", \"Cenni\", \"Cerbai\", \"Cesari\", \"Ceseri\", \"Checcacci\", \"Checchi\", \"Checcucci\", \"Cheli\", \"Chellini\", \"Chen\", \"Cheng\", \"Cherici\", \"Cherubini\", \"Chiaramonti\", \"Chiarantini\", \"Chiarelli\", \"Chiari\", \"Chiarini\", \"Chiarugi\", \"Chiavacci\", \"Chiesi\", \"Chimenti\", \"Chini\", \"Chirici\", \"Chiti\", \"Ciabatti\", \"Ciampi\", \"Cianchi\", \"Cianfanelli\", \"Cianferoni\", \"Ciani\", \"Ciapetti\", \"Ciappi\", \"Ciardi\", \"Ciatti\", \"Cicali\", \"Ciccone\", \"Cinelli\", \"Cini\", \"Ciobanu\", \"Ciolli\", \"Cioni\", \"Cipriani\", \"Cirillo\", \"Cirri\", \"Ciucchi\", \"Ciuffi\", \"Ciulli\", \"Ciullini\", \"Clemente\", \"Cocchi\", \"Cognome\", \"Coli\", \"Collini\", \"Colombo\", \"Colzi\", \"Comparini\", \"Conforti\", \"Consigli\", \"Conte\", \"Conti\", \"Contini\", \"Coppini\", \"Coppola\", \"Corsi\", \"Corsini\", \"Corti\", \"Cortini\", \"Cosi\", \"Costa\", \"Costantini\", \"Costantino\", \"Cozzi\", \"Cresci\", \"Crescioli\", \"Cresti\", \"Crini\", \"Curradi\", \"D'Agostino\", \"D'Alessandro\", \"D'Amico\", \"D'Angelo\", \"Daddi\", \"Dainelli\", \"Dallai\", \"Danti\", \"Davitti\", \"De Angelis\", \"De Luca\", \"De Marco\", \"De Rosa\", \"De Santis\", \"De Simone\", \"De Vita\", \"Degl'Innocenti\", \"Degli Innocenti\", \"Dei\", \"Del Lungo\", \"Del Re\", \"Di Marco\", \"Di Stefano\", \"Dini\", \"Diop\", \"Dobre\", \"Dolfi\", \"Donati\", \"Dondoli\", \"Dong\", \"Donnini\", \"Ducci\", \"Dumitru\", \"Ermini\", \"Esposito\", \"Evangelisti\", \"Fabbri\", \"Fabbrini\", \"Fabbrizzi\", \"Fabbroni\", \"Fabbrucci\", \"Fabiani\", \"Facchini\", \"Faggi\", \"Fagioli\", \"Failli\", \"Faini\", \"Falciani\", \"Falcini\", \"Falcone\", \"Fallani\", \"Falorni\", \"Falsini\", \"Falugiani\", \"Fancelli\", \"Fanelli\", \"Fanetti\", \"Fanfani\", \"Fani\", \"Fantappie'\", \"Fantechi\", \"Fanti\", \"Fantini\", \"Fantoni\", \"Farina\", \"Fattori\", \"Favilli\", \"Fedi\", \"Fei\", \"Ferrante\", \"Ferrara\", \"Ferrari\", \"Ferraro\", \"Ferretti\", \"Ferri\", \"Ferrini\", \"Ferroni\", \"Fiaschi\", \"Fibbi\", \"Fiesoli\", \"Filippi\", \"Filippini\", \"Fini\", \"Fioravanti\", \"Fiore\", \"Fiorentini\", \"Fiorini\", \"Fissi\", \"Focardi\", \"Foggi\", \"Fontana\", \"Fontanelli\", \"Fontani\", \"Forconi\", \"Formigli\", \"Forte\", \"Forti\", \"Fortini\", \"Fossati\", \"Fossi\", \"Francalanci\", \"Franceschi\", \"Franceschini\", \"Franchi\", \"Franchini\", \"Franci\", \"Francini\", \"Francioni\", \"Franco\", \"Frassineti\", \"Frati\", \"Fratini\", \"Frilli\", \"Frizzi\", \"Frosali\", \"Frosini\", \"Frullini\", \"Fusco\", \"Fusi\", \"Gabbrielli\", \"Gabellini\", \"Gagliardi\", \"Galanti\", \"Galardi\", \"Galeotti\", \"Galletti\", \"Galli\", \"Gallo\", \"Gallori\", \"Gambacciani\", \"Gargani\", \"Garofalo\", \"Garuglieri\", \"Gashi\", \"Gasperini\", \"Gatti\", \"Gelli\", \"Gensini\", \"Gentile\", \"Gentili\", \"Geri\", \"Gerini\", \"Gheri\", \"Ghini\", \"Giachetti\", \"Giachi\", \"Giacomelli\", \"Gianassi\", \"Giani\", \"Giannelli\", \"Giannetti\", \"Gianni\", \"Giannini\", \"Giannoni\", \"Giannotti\", \"Giannozzi\", \"Gigli\", \"Giordano\", \"Giorgetti\", \"Giorgi\", \"Giovacchini\", \"Giovannelli\", \"Giovannetti\", \"Giovannini\", \"Giovannoni\", \"Giuliani\", \"Giunti\", \"Giuntini\", \"Giusti\", \"Gonnelli\", \"Goretti\", \"Gori\", \"Gradi\", \"Gramigni\", \"Grassi\", \"Grasso\", \"Graziani\", \"Grazzini\", \"Greco\", \"Grifoni\", \"Grillo\", \"Grimaldi\", \"Grossi\", \"Gualtieri\", \"Guarducci\", \"Guarino\", \"Guarnieri\", \"Guasti\", \"Guerra\", \"Guerri\", \"Guerrini\", \"Guidi\", \"Guidotti\", \"He\", \"Hoxha\", \"Hu\", \"Huang\", \"Iandelli\", \"Ignesti\", \"Innocenti\", \"Jin\", \"La Rosa\", \"Lai\", \"Landi\", \"Landini\", \"Lanini\", \"Lapi\", \"Lapini\", \"Lari\", \"Lascialfari\", \"Lastrucci\", \"Latini\", \"Lazzeri\", \"Lazzerini\", \"Lelli\", \"Lenzi\", \"Leonardi\", \"Leoncini\", \"Leone\", \"Leoni\", \"Lepri\", \"Li\", \"Liao\", \"Lin\", \"Linari\", \"Lippi\", \"Lisi\", \"Livi\", \"Lombardi\", \"Lombardini\", \"Lombardo\", \"Longo\", \"Lopez\", \"Lorenzi\", \"Lorenzini\", \"Lorini\", \"Lotti\", \"Lu\", \"Lucchesi\", \"Lucherini\", \"Lunghi\", \"Lupi\", \"Madiai\", \"Maestrini\", \"Maffei\", \"Maggi\", \"Maggini\", \"Magherini\", \"Magini\", \"Magnani\", \"Magnelli\", \"Magni\", \"Magnolfi\", \"Magrini\", \"Malavolti\", \"Malevolti\", \"Manca\", \"Mancini\", \"Manetti\", \"Manfredi\", \"Mangani\", \"Mannelli\", \"Manni\", \"Mannini\", \"Mannucci\", \"Manuelli\", \"Manzini\", \"Marcelli\", \"Marchese\", \"Marchetti\", \"Marchi\", \"Marchiani\", \"Marchionni\", \"Marconi\", \"Marcucci\", \"Margheri\", \"Mari\", \"Mariani\", \"Marilli\", \"Marinai\", \"Marinari\", \"Marinelli\", \"Marini\", \"Marino\", \"Mariotti\", \"Marsili\", \"Martelli\", \"Martinelli\", \"Martini\", \"Martino\", \"Marzi\", \"Masi\", \"Masini\", \"Masoni\", \"Massai\", \"Materassi\", \"Mattei\", \"Matteini\", \"Matteucci\", \"Matteuzzi\", \"Mattioli\", \"Mattolini\", \"Matucci\", \"Mauro\", \"Mazzanti\", \"Mazzei\", \"Mazzetti\", \"Mazzi\", \"Mazzini\", \"Mazzocchi\", \"Mazzoli\", \"Mazzoni\", \"Mazzuoli\", \"Meacci\", \"Mecocci\", \"Meini\", \"Melani\", \"Mele\", \"Meli\", \"Mengoni\", \"Menichetti\", \"Meoni\", \"Merlini\", \"Messeri\", \"Messina\", \"Meucci\", \"Miccinesi\", \"Miceli\", \"Micheli\", \"Michelini\", \"Michelozzi\", \"Migliori\", \"Migliorini\", \"Milani\", \"Miniati\", \"Misuri\", \"Monaco\", \"Montagnani\", \"Montagni\", \"Montanari\", \"Montelatici\", \"Monti\", \"Montigiani\", \"Montini\", \"Morandi\", \"Morandini\", \"Morelli\", \"Moretti\", \"Morganti\", \"Mori\", \"Morini\", \"Moroni\", \"Morozzi\", \"Mugnai\", \"Mugnaini\", \"Mustafa\", \"Naldi\", \"Naldini\", \"Nannelli\", \"Nanni\", \"Nannini\", \"Nannucci\", \"Nardi\", \"Nardini\", \"Nardoni\", \"Natali\", \"Ndiaye\", \"Nencetti\", \"Nencini\", \"Nencioni\", \"Neri\", \"Nesi\", \"Nesti\", \"Niccolai\", \"Niccoli\", \"Niccolini\", \"Nigi\", \"Nistri\", \"Nocentini\", \"Noferini\", \"Novelli\", \"Nucci\", \"Nuti\", \"Nutini\", \"Oliva\", \"Olivieri\", \"Olmi\", \"Orlandi\", \"Orlandini\", \"Orlando\", \"Orsini\", \"Ortolani\", \"Ottanelli\", \"Pacciani\", \"Pace\", \"Paci\", \"Pacini\", \"Pagani\", \"Pagano\", \"Paggetti\", \"Pagliai\", \"Pagni\", \"Pagnini\", \"Paladini\", \"Palagi\", \"Palchetti\", \"Palloni\", \"Palmieri\", \"Palumbo\", \"Pampaloni\", \"Pancani\", \"Pandolfi\", \"Pandolfini\", \"Panerai\", \"Panichi\", \"Paoletti\", \"Paoli\", \"Paolini\", \"Papi\", \"Papini\", \"Papucci\", \"Parenti\", \"Parigi\", \"Parisi\", \"Parri\", \"Parrini\", \"Pasquini\", \"Passeri\", \"Pecchioli\", \"Pecorini\", \"Pellegrini\", \"Pepi\", \"Perini\", \"Perrone\", \"Peruzzi\", \"Pesci\", \"Pestelli\", \"Petri\", \"Petrini\", \"Petrucci\", \"Pettini\", \"Pezzati\", \"Pezzatini\", \"Piani\", \"Piazza\", \"Piazzesi\", \"Piazzini\", \"Piccardi\", \"Picchi\", \"Piccini\", \"Piccioli\", \"Pieraccini\", \"Pieraccioni\", \"Pieralli\", \"Pierattini\", \"Pieri\", \"Pierini\", \"Pieroni\", \"Pietrini\", \"Pini\", \"Pinna\", \"Pinto\", \"Pinzani\", \"Pinzauti\", \"Piras\", \"Pisani\", \"Pistolesi\", \"Poggesi\", \"Poggi\", \"Poggiali\", \"Poggiolini\", \"Poli\", \"Pollastri\", \"Porciani\", \"Pozzi\", \"Pratellesi\", \"Pratesi\", \"Prosperi\", \"Pruneti\", \"Pucci\", \"Puccini\", \"Puccioni\", \"Pugi\", \"Pugliese\", \"Puliti\", \"Querci\", \"Quercioli\", \"Raddi\", \"Radu\", \"Raffaelli\", \"Ragazzini\", \"Ranfagni\", \"Ranieri\", \"Rastrelli\", \"Raugei\", \"Raveggi\", \"Renai\", \"Renzi\", \"Rettori\", \"Ricci\", \"Ricciardi\", \"Ridi\", \"Ridolfi\", \"Rigacci\", \"Righi\", \"Righini\", \"Rinaldi\", \"Risaliti\", \"Ristori\", \"Rizzo\", \"Rocchi\", \"Rocchini\", \"Rogai\", \"Romagnoli\", \"Romanelli\", \"Romani\", \"Romano\", \"Romei\", \"Romeo\", \"Romiti\", \"Romoli\", \"Romolini\", \"Rontini\", \"Rosati\", \"Roselli\", \"Rosi\", \"Rossetti\", \"Rossi\", \"Rossini\", \"Rovai\", \"Ruggeri\", \"Ruggiero\", \"Russo\", \"Sabatini\", \"Saccardi\", \"Sacchetti\", \"Sacchi\", \"Sacco\", \"Salerno\", \"Salimbeni\", \"Salucci\", \"Salvadori\", \"Salvestrini\", \"Salvi\", \"Salvini\", \"Sanesi\", \"Sani\", \"Sanna\", \"Santi\", \"Santini\", \"Santoni\", \"Santoro\", \"Santucci\", \"Sardi\", \"Sarri\", \"Sarti\", \"Sassi\", \"Sbolci\", \"Scali\", \"Scarpelli\", \"Scarselli\", \"Scopetani\", \"Secci\", \"Selvi\", \"Senatori\", \"Senesi\", \"Serafini\", \"Sereni\", \"Serra\", \"Sestini\", \"Sguanci\", \"Sieni\", \"Signorini\", \"Silvestri\", \"Simoncini\", \"Simonetti\", \"Simoni\", \"Singh\", \"Sodi\", \"Soldi\", \"Somigli\", \"Sorbi\", \"Sorelli\", \"Sorrentino\", \"Sottili\", \"Spina\", \"Spinelli\", \"Staccioli\", \"Staderini\", \"Stefanelli\", \"Stefani\", \"Stefanini\", \"Stella\", \"Susini\", \"Tacchi\", \"Tacconi\", \"Taddei\", \"Tagliaferri\", \"Tamburini\", \"Tanganelli\", \"Tani\", \"Tanini\", \"Tapinassi\", \"Tarchi\", \"Tarchiani\", \"Targioni\", \"Tassi\", \"Tassini\", \"Tempesti\", \"Terzani\", \"Tesi\", \"Testa\", \"Testi\", \"Tilli\", \"Tinti\", \"Tirinnanzi\", \"Toccafondi\", \"Tofanari\", \"Tofani\", \"Tognaccini\", \"Tonelli\", \"Tonini\", \"Torelli\", \"Torrini\", \"Tosi\", \"Toti\", \"Tozzi\", \"Trambusti\", \"Trapani\", \"Tucci\", \"Turchi\", \"Ugolini\", \"Ulivi\", \"Valente\", \"Valenti\", \"Valentini\", \"Vangelisti\", \"Vanni\", \"Vannini\", \"Vannoni\", \"Vannozzi\", \"Vannucchi\", \"Vannucci\", \"Ventura\", \"Venturi\", \"Venturini\", \"Vestri\", \"Vettori\", \"Vichi\", \"Viciani\", \"Vieri\", \"Vigiani\", \"Vignoli\", \"Vignolini\", \"Vignozzi\", \"Villani\", \"Vinci\", \"Visani\", \"Vitale\", \"Vitali\", \"Viti\", \"Viviani\", \"Vivoli\", \"Volpe\", \"Volpi\", \"Wang\", \"Wu\", \"Xu\", \"Yang\", \"Ye\", \"Zagli\", \"Zani\", \"Zanieri\", \"Zanobini\", \"Zecchi\", \"Zetti\", \"Zhang\", \"Zheng\", \"Zhou\", \"Zhu\", \"Zingoni\", \"Zini\", \"Zoppi\"],\n // http://www.voornamelijk.nl/meest-voorkomende-achternamen-in-nederland-en-amsterdam/\n \"nl\":[\"Albers\", \"Alblas\", \"Appelman\", \"Baars\", \"Baas\", \"Bakker\", \"Blank\", \"Bleeker\", \"Blok\", \"Blom\", \"Boer\", \"Boers\", \"Boldewijn\", \"Boon\", \"Boot\", \"Bos\", \"Bosch\", \"Bosma\", \"Bosman\", \"Bouma\", \"Bouman\", \"Bouwman\", \"Brands\", \"Brouwer\", \"Burger\", \"Buijs\", \"Buitenhuis\", \"Ceder\", \"Cohen\", \"Dekker\", \"Dekkers\", \"Dijkman\", \"Dijkstra\", \"Driessen\", \"Drost\", \"Engel\", \"Evers\", \"Faber\", \"Franke\", \"Gerritsen\", \"Goedhart\", \"Goossens\", \"Groen\", \"Groenenberg\", \"Groot\", \"Haan\", \"Hart\", \"Heemskerk\", \"Hendriks\", \"Hermans\", \"Hoekstra\", \"Hofman\", \"Hopman\", \"Huisman\", \"Jacobs\", \"Jansen\", \"Janssen\", \"Jonker\", \"Jaspers\", \"Keijzer\", \"Klaassen\", \"Klein\", \"Koek\", \"Koenders\", \"Kok\", \"Kool\", \"Koopman\", \"Koopmans\", \"Koning\", \"Koster\", \"Kramer\", \"Kroon\", \"Kuijpers\", \"Kuiper\", \"Kuipers\", \"Kurt\", \"Koster\", \"Kwakman\", \"Los\", \"Lubbers\", \"Maas\", \"Markus\", \"Martens\", \"Meijer\", \"Mol\", \"Molenaar\", \"Mulder\", \"Nieuwenhuis\", \"Peeters\", \"Peters\", \"Pengel\", \"Pieters\", \"Pool\", \"Post\", \"Postma\", \"Prins\", \"Pronk\", \"Reijnders\", \"Rietveld\", \"Roest\", \"Roos\", \"Sanders\", \"Schaap\", \"Scheffer\", \"Schenk\", \"Schilder\", \"Schipper\", \"Schmidt\", \"Scholten\", \"Schouten\", \"Schut\", \"Schutte\", \"Schuurman\", \"Simons\", \"Smeets\", \"Smit\", \"Smits\", \"Snel\", \"Swinkels\", \"Tas\", \"Terpstra\", \"Timmermans\", \"Tol\", \"Tromp\", \"Troost\", \"Valk\", \"Veenstra\", \"Veldkamp\", \"Verbeek\", \"Verheul\", \"Verhoeven\", \"Vermeer\", \"Vermeulen\", \"Verweij\", \"Vink\", \"Visser\", \"Voorn\", \"Vos\", \"Wagenaar\", \"Wiersema\", \"Willems\", \"Willemsen\", \"Witteveen\", \"Wolff\", \"Wolters\", \"Zijlstra\", \"Zwart\", \"de Beer\", \"de Boer\", \"de Bruijn\", \"de Bruin\", \"de Graaf\", \"de Groot\", \"de Haan\", \"de Haas\", \"de Jager\", \"de Jong\", \"de Jonge\", \"de Koning\", \"de Lange\", \"de Leeuw\", \"de Ridder\", \"de Rooij\", \"de Ruiter\", \"de Vos\", \"de Vries\", \"de Waal\", \"de Wit\", \"de Zwart\", \"van Beek\", \"van Boven\", \"van Dam\", \"van Dijk\", \"van Dongen\", \"van Doorn\", \"van Egmond\", \"van Eijk\", \"van Es\", \"van Gelder\", \"van Gelderen\", \"van Houten\", \"van Hulst\", \"van Kempen\", \"van Kesteren\", \"van Leeuwen\", \"van Loon\", \"van Mill\", \"van Noord\", \"van Ommen\", \"van Ommeren\", \"van Oosten\", \"van Oostveen\", \"van Rijn\", \"van Schaik\", \"van Veen\", \"van Vliet\", \"van Wijk\", \"van Wijngaarden\", \"van den Poel\", \"van de Pol\", \"van den Ploeg\", \"van de Ven\", \"van den Berg\", \"van den Bosch\", \"van den Brink\", \"van den Broek\", \"van den Heuvel\", \"van der Heijden\", \"van der Horst\", \"van der Hulst\", \"van der Kroon\", \"van der Laan\", \"van der Linden\", \"van der Meer\", \"van der Meij\", \"van der Meulen\", \"van der Molen\", \"van der Sluis\", \"van der Spek\", \"van der Veen\", \"van der Velde\", \"van der Velden\", \"van der Vliet\", \"van der Wal\"],\n // https://surnames.behindthename.com/top/lists/england-wales/1991\n \"uk\":[\"Smith\",\"Jones\",\"Williams\",\"Taylor\",\"Brown\",\"Davies\",\"Evans\",\"Wilson\",\"Thomas\",\"Johnson\",\"Roberts\",\"Robinson\",\"Thompson\",\"Wright\",\"Walker\",\"White\",\"Edwards\",\"Hughes\",\"Green\",\"Hall\",\"Lewis\",\"Harris\",\"Clarke\",\"Patel\",\"Jackson\",\"Wood\",\"Turner\",\"Martin\",\"Cooper\",\"Hill\",\"Ward\",\"Morris\",\"Moore\",\"Clark\",\"Lee\",\"King\",\"Baker\",\"Harrison\",\"Morgan\",\"Allen\",\"James\",\"Scott\",\"Phillips\",\"Watson\",\"Davis\",\"Parker\",\"Price\",\"Bennett\",\"Young\",\"Griffiths\",\"Mitchell\",\"Kelly\",\"Cook\",\"Carter\",\"Richardson\",\"Bailey\",\"Collins\",\"Bell\",\"Shaw\",\"Murphy\",\"Miller\",\"Cox\",\"Richards\",\"Khan\",\"Marshall\",\"Anderson\",\"Simpson\",\"Ellis\",\"Adams\",\"Singh\",\"Begum\",\"Wilkinson\",\"Foster\",\"Chapman\",\"Powell\",\"Webb\",\"Rogers\",\"Gray\",\"Mason\",\"Ali\",\"Hunt\",\"Hussain\",\"Campbell\",\"Matthews\",\"Owen\",\"Palmer\",\"Holmes\",\"Mills\",\"Barnes\",\"Knight\",\"Lloyd\",\"Butler\",\"Russell\",\"Barker\",\"Fisher\",\"Stevens\",\"Jenkins\",\"Murray\",\"Dixon\",\"Harvey\",\"Graham\",\"Pearson\",\"Ahmed\",\"Fletcher\",\"Walsh\",\"Kaur\",\"Gibson\",\"Howard\",\"Andrews\",\"Stewart\",\"Elliott\",\"Reynolds\",\"Saunders\",\"Payne\",\"Fox\",\"Ford\",\"Pearce\",\"Day\",\"Brooks\",\"West\",\"Lawrence\",\"Cole\",\"Atkinson\",\"Bradley\",\"Spencer\",\"Gill\",\"Dawson\",\"Ball\",\"Burton\",\"O'brien\",\"Watts\",\"Rose\",\"Booth\",\"Perry\",\"Ryan\",\"Grant\",\"Wells\",\"Armstrong\",\"Francis\",\"Rees\",\"Hayes\",\"Hart\",\"Hudson\",\"Newman\",\"Barrett\",\"Webster\",\"Hunter\",\"Gregory\",\"Carr\",\"Lowe\",\"Page\",\"Marsh\",\"Riley\",\"Dunn\",\"Woods\",\"Parsons\",\"Berry\",\"Stone\",\"Reid\",\"Holland\",\"Hawkins\",\"Harding\",\"Porter\",\"Robertson\",\"Newton\",\"Oliver\",\"Reed\",\"Kennedy\",\"Williamson\",\"Bird\",\"Gardner\",\"Shah\",\"Dean\",\"Lane\",\"Cooke\",\"Bates\",\"Henderson\",\"Parry\",\"Burgess\",\"Bishop\",\"Walton\",\"Burns\",\"Nicholson\",\"Shepherd\",\"Ross\",\"Cross\",\"Long\",\"Freeman\",\"Warren\",\"Nicholls\",\"Hamilton\",\"Byrne\",\"Sutton\",\"Mcdonald\",\"Yates\",\"Hodgson\",\"Robson\",\"Curtis\",\"Hopkins\",\"O'connor\",\"Harper\",\"Coleman\",\"Watkins\",\"Moss\",\"Mccarthy\",\"Chambers\",\"O'neill\",\"Griffin\",\"Sharp\",\"Hardy\",\"Wheeler\",\"Potter\",\"Osborne\",\"Johnston\",\"Gordon\",\"Doyle\",\"Wallace\",\"George\",\"Jordan\",\"Hutchinson\",\"Rowe\",\"Burke\",\"May\",\"Pritchard\",\"Gilbert\",\"Willis\",\"Higgins\",\"Read\",\"Miles\",\"Stevenson\",\"Stephenson\",\"Hammond\",\"Arnold\",\"Buckley\",\"Walters\",\"Hewitt\",\"Barber\",\"Nelson\",\"Slater\",\"Austin\",\"Sullivan\",\"Whitehead\",\"Mann\",\"Frost\",\"Lambert\",\"Stephens\",\"Blake\",\"Akhtar\",\"Lynch\",\"Goodwin\",\"Barton\",\"Woodward\",\"Thomson\",\"Cunningham\",\"Quinn\",\"Barnett\",\"Baxter\",\"Bibi\",\"Clayton\",\"Nash\",\"Greenwood\",\"Jennings\",\"Holt\",\"Kemp\",\"Poole\",\"Gallagher\",\"Bond\",\"Stokes\",\"Tucker\",\"Davidson\",\"Fowler\",\"Heath\",\"Norman\",\"Middleton\",\"Lawson\",\"Banks\",\"French\",\"Stanley\",\"Jarvis\",\"Gibbs\",\"Ferguson\",\"Hayward\",\"Carroll\",\"Douglas\",\"Dickinson\",\"Todd\",\"Barlow\",\"Peters\",\"Lucas\",\"Knowles\",\"Hartley\",\"Miah\",\"Simmons\",\"Morton\",\"Alexander\",\"Field\",\"Morrison\",\"Norris\",\"Townsend\",\"Preston\",\"Hancock\",\"Thornton\",\"Baldwin\",\"Burrows\",\"Briggs\",\"Parkinson\",\"Reeves\",\"Macdonald\",\"Lamb\",\"Black\",\"Abbott\",\"Sanders\",\"Thorpe\",\"Holden\",\"Tomlinson\",\"Perkins\",\"Ashton\",\"Rhodes\",\"Fuller\",\"Howe\",\"Bryant\",\"Vaughan\",\"Dale\",\"Davey\",\"Weston\",\"Bartlett\",\"Whittaker\",\"Davison\",\"Kent\",\"Skinner\",\"Birch\",\"Morley\",\"Daniels\",\"Glover\",\"Howell\",\"Cartwright\",\"Pugh\",\"Humphreys\",\"Goddard\",\"Brennan\",\"Wall\",\"Kirby\",\"Bowen\",\"Savage\",\"Bull\",\"Wong\",\"Dobson\",\"Smart\",\"Wilkins\",\"Kirk\",\"Fraser\",\"Duffy\",\"Hicks\",\"Patterson\",\"Bradshaw\",\"Little\",\"Archer\",\"Warner\",\"Waters\",\"O'sullivan\",\"Farrell\",\"Brookes\",\"Atkins\",\"Kay\",\"Dodd\",\"Bentley\",\"Flynn\",\"John\",\"Schofield\",\"Short\",\"Haynes\",\"Wade\",\"Butcher\",\"Henry\",\"Sanderson\",\"Crawford\",\"Sheppard\",\"Bolton\",\"Coates\",\"Giles\",\"Gould\",\"Houghton\",\"Gibbons\",\"Pratt\",\"Manning\",\"Law\",\"Hooper\",\"Noble\",\"Dyer\",\"Rahman\",\"Clements\",\"Moran\",\"Sykes\",\"Chan\",\"Doherty\",\"Connolly\",\"Joyce\",\"Franklin\",\"Hobbs\",\"Coles\",\"Herbert\",\"Steele\",\"Kerr\",\"Leach\",\"Winter\",\"Owens\",\"Duncan\",\"Naylor\",\"Fleming\",\"Horton\",\"Finch\",\"Fitzgerald\",\"Randall\",\"Carpenter\",\"Marsden\",\"Browne\",\"Garner\",\"Pickering\",\"Hale\",\"Dennis\",\"Vincent\",\"Chadwick\",\"Chandler\",\"Sharpe\",\"Nolan\",\"Lyons\",\"Hurst\",\"Collier\",\"Peacock\",\"Howarth\",\"Faulkner\",\"Rice\",\"Pollard\",\"Welch\",\"Norton\",\"Gough\",\"Sinclair\",\"Blackburn\",\"Bryan\",\"Conway\",\"Power\",\"Cameron\",\"Daly\",\"Allan\",\"Hanson\",\"Gardiner\",\"Boyle\",\"Myers\",\"Turnbull\",\"Wallis\",\"Mahmood\",\"Sims\",\"Swift\",\"Iqbal\",\"Pope\",\"Brady\",\"Chamberlain\",\"Rowley\",\"Tyler\",\"Farmer\",\"Metcalfe\",\"Hilton\",\"Godfrey\",\"Holloway\",\"Parkin\",\"Bray\",\"Talbot\",\"Donnelly\",\"Nixon\",\"Charlton\",\"Benson\",\"Whitehouse\",\"Barry\",\"Hope\",\"Lord\",\"North\",\"Storey\",\"Connor\",\"Potts\",\"Bevan\",\"Hargreaves\",\"Mclean\",\"Mistry\",\"Bruce\",\"Howells\",\"Hyde\",\"Parkes\",\"Wyatt\",\"Fry\",\"Lees\",\"O'donnell\",\"Craig\",\"Forster\",\"Mckenzie\",\"Humphries\",\"Mellor\",\"Carey\",\"Ingram\",\"Summers\",\"Leonard\"],\n // https://surnames.behindthename.com/top/lists/germany/2017\n \"de\": [\"Müller\",\"Schmidt\",\"Schneider\",\"Fischer\",\"Weber\",\"Meyer\",\"Wagner\",\"Becker\",\"Schulz\",\"Hoffmann\",\"Schäfer\",\"Koch\",\"Bauer\",\"Richter\",\"Klein\",\"Wolf\",\"Schröder\",\"Neumann\",\"Schwarz\",\"Zimmermann\",\"Braun\",\"Krüger\",\"Hofmann\",\"Hartmann\",\"Lange\",\"Schmitt\",\"Werner\",\"Schmitz\",\"Krause\",\"Meier\",\"Lehmann\",\"Schmid\",\"Schulze\",\"Maier\",\"Köhler\",\"Herrmann\",\"König\",\"Walter\",\"Mayer\",\"Huber\",\"Kaiser\",\"Fuchs\",\"Peters\",\"Lang\",\"Scholz\",\"Möller\",\"Weiß\",\"Jung\",\"Hahn\",\"Schubert\",\"Vogel\",\"Friedrich\",\"Keller\",\"Günther\",\"Frank\",\"Berger\",\"Winkler\",\"Roth\",\"Beck\",\"Lorenz\",\"Baumann\",\"Franke\",\"Albrecht\",\"Schuster\",\"Simon\",\"Ludwig\",\"Böhm\",\"Winter\",\"Kraus\",\"Martin\",\"Schumacher\",\"Krämer\",\"Vogt\",\"Stein\",\"Jäger\",\"Otto\",\"Sommer\",\"Groß\",\"Seidel\",\"Heinrich\",\"Brandt\",\"Haas\",\"Schreiber\",\"Graf\",\"Schulte\",\"Dietrich\",\"Ziegler\",\"Kuhn\",\"Kühn\",\"Pohl\",\"Engel\",\"Horn\",\"Busch\",\"Bergmann\",\"Thomas\",\"Voigt\",\"Sauer\",\"Arnold\",\"Wolff\",\"Pfeiffer\"],\n // http://www.japantimes.co.jp/life/2009/10/11/lifestyle/japans-top-100-most-common-family-names/\n \"jp\": [\"Sato\",\"Suzuki\",\"Takahashi\",\"Tanaka\",\"Watanabe\",\"Ito\",\"Yamamoto\",\"Nakamura\",\"Kobayashi\",\"Kato\",\"Yoshida\",\"Yamada\",\"Sasaki\",\"Yamaguchi\",\"Saito\",\"Matsumoto\",\"Inoue\",\"Kimura\",\"Hayashi\",\"Shimizu\",\"Yamazaki\",\"Mori\",\"Abe\",\"Ikeda\",\"Hashimoto\",\"Yamashita\",\"Ishikawa\",\"Nakajima\",\"Maeda\",\"Fujita\",\"Ogawa\",\"Goto\",\"Okada\",\"Hasegawa\",\"Murakami\",\"Kondo\",\"Ishii\",\"Saito\",\"Sakamoto\",\"Endo\",\"Aoki\",\"Fujii\",\"Nishimura\",\"Fukuda\",\"Ota\",\"Miura\",\"Fujiwara\",\"Okamoto\",\"Matsuda\",\"Nakagawa\",\"Nakano\",\"Harada\",\"Ono\",\"Tamura\",\"Takeuchi\",\"Kaneko\",\"Wada\",\"Nakayama\",\"Ishida\",\"Ueda\",\"Morita\",\"Hara\",\"Shibata\",\"Sakai\",\"Kudo\",\"Yokoyama\",\"Miyazaki\",\"Miyamoto\",\"Uchida\",\"Takagi\",\"Ando\",\"Taniguchi\",\"Ohno\",\"Maruyama\",\"Imai\",\"Takada\",\"Fujimoto\",\"Takeda\",\"Murata\",\"Ueno\",\"Sugiyama\",\"Masuda\",\"Sugawara\",\"Hirano\",\"Kojima\",\"Otsuka\",\"Chiba\",\"Kubo\",\"Matsui\",\"Iwasaki\",\"Sakurai\",\"Kinoshita\",\"Noguchi\",\"Matsuo\",\"Nomura\",\"Kikuchi\",\"Sano\",\"Onishi\",\"Sugimoto\",\"Arai\"],\n // http://www.lowchensaustralia.com/names/popular-spanish-names.htm\n \"es\": [\"Garcia\",\"Fernandez\",\"Lopez\",\"Martinez\",\"Gonzalez\",\"Rodriguez\",\"Sanchez\",\"Perez\",\"Martin\",\"Gomez\",\"Ruiz\",\"Diaz\",\"Hernandez\",\"Alvarez\",\"Jimenez\",\"Moreno\",\"Munoz\",\"Alonso\",\"Romero\",\"Navarro\",\"Gutierrez\",\"Torres\",\"Dominguez\",\"Gil\",\"Vazquez\",\"Blanco\",\"Serrano\",\"Ramos\",\"Castro\",\"Suarez\",\"Sanz\",\"Rubio\",\"Ortega\",\"Molina\",\"Delgado\",\"Ortiz\",\"Morales\",\"Ramirez\",\"Marin\",\"Iglesias\",\"Santos\",\"Castillo\",\"Garrido\",\"Calvo\",\"Pena\",\"Cruz\",\"Cano\",\"Nunez\",\"Prieto\",\"Diez\",\"Lozano\",\"Vidal\",\"Pascual\",\"Ferrer\",\"Medina\",\"Vega\",\"Leon\",\"Herrero\",\"Vicente\",\"Mendez\",\"Guerrero\",\"Fuentes\",\"Campos\",\"Nieto\",\"Cortes\",\"Caballero\",\"Ibanez\",\"Lorenzo\",\"Pastor\",\"Gimenez\",\"Saez\",\"Soler\",\"Marquez\",\"Carrasco\",\"Herrera\",\"Montero\",\"Arias\",\"Crespo\",\"Flores\",\"Andres\",\"Aguilar\",\"Hidalgo\",\"Cabrera\",\"Mora\",\"Duran\",\"Velasco\",\"Rey\",\"Pardo\",\"Roman\",\"Vila\",\"Bravo\",\"Merino\",\"Moya\",\"Soto\",\"Izquierdo\",\"Reyes\",\"Redondo\",\"Marcos\",\"Carmona\",\"Menendez\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_des_noms_de_famille_les_plus_courants_en_France\n \"fr\": [\"Martin\",\"Bernard\",\"Thomas\",\"Petit\",\"Robert\",\"Richard\",\"Durand\",\"Dubois\",\"Moreau\",\"Laurent\",\"Simon\",\"Michel\",\"Lefèvre\",\"Leroy\",\"Roux\",\"David\",\"Bertrand\",\"Morel\",\"Fournier\",\"Girard\",\"Bonnet\",\"Dupont\",\"Lambert\",\"Fontaine\",\"Rousseau\",\"Vincent\",\"Müller\",\"Lefèvre\",\"Faure\",\"André\",\"Mercier\",\"Blanc\",\"Guérin\",\"Boyer\",\"Garnier\",\"Chevalier\",\"François\",\"Legrand\",\"Gauthier\",\"Garcia\",\"Perrin\",\"Robin\",\"Clément\",\"Morin\",\"Nicolas\",\"Henry\",\"Roussel\",\"Matthieu\",\"Gautier\",\"Masson\",\"Marchand\",\"Duval\",\"Denis\",\"Dumont\",\"Marie\",\"Lemaire\",\"Noël\",\"Meyer\",\"Dufour\",\"Meunier\",\"Brun\",\"Blanchard\",\"Giraud\",\"Joly\",\"Rivière\",\"Lucas\",\"Brunet\",\"Gaillard\",\"Barbier\",\"Arnaud\",\"Martínez\",\"Gérard\",\"Roche\",\"Renard\",\"Schmitt\",\"Roy\",\"Leroux\",\"Colin\",\"Vidal\",\"Caron\",\"Picard\",\"Roger\",\"Fabre\",\"Aubert\",\"Lemoine\",\"Renaud\",\"Dumas\",\"Lacroix\",\"Olivier\",\"Philippe\",\"Bourgeois\",\"Pierre\",\"Benoît\",\"Rey\",\"Leclerc\",\"Payet\",\"Rolland\",\"Leclercq\",\"Guillaume\",\"Lecomte\",\"López\",\"Jean\",\"Dupuy\",\"Guillot\",\"Hubert\",\"Berger\",\"Carpentier\",\"Sánchez\",\"Dupuis\",\"Moulin\",\"Louis\",\"Deschamps\",\"Huet\",\"Vasseur\",\"Perez\",\"Boucher\",\"Fleury\",\"Royer\",\"Klein\",\"Jacquet\",\"Adam\",\"Paris\",\"Poirier\",\"Marty\",\"Aubry\",\"Guyot\",\"Carré\",\"Charles\",\"Renault\",\"Charpentier\",\"Ménard\",\"Maillard\",\"Baron\",\"Bertin\",\"Bailly\",\"Hervé\",\"Schneider\",\"Fernández\",\"Le GallGall\",\"Collet\",\"Léger\",\"Bouvier\",\"Julien\",\"Prévost\",\"Millet\",\"Perrot\",\"Daniel\",\"Le RouxRoux\",\"Cousin\",\"Germain\",\"Breton\",\"Besson\",\"Langlois\",\"Rémi\",\"Le GoffGoff\",\"Pelletier\",\"Lévêque\",\"Perrier\",\"Leblanc\",\"Barré\",\"Lebrun\",\"Marchal\",\"Weber\",\"Mallet\",\"Hamon\",\"Boulanger\",\"Jacob\",\"Monnier\",\"Michaud\",\"Rodríguez\",\"Guichard\",\"Gillet\",\"Étienne\",\"Grondin\",\"Poulain\",\"Tessier\",\"Chevallier\",\"Collin\",\"Chauvin\",\"Da SilvaSilva\",\"Bouchet\",\"Gay\",\"Lemaître\",\"Bénard\",\"Maréchal\",\"Humbert\",\"Reynaud\",\"Antoine\",\"Hoarau\",\"Perret\",\"Barthélemy\",\"Cordier\",\"Pichon\",\"Lejeune\",\"Gilbert\",\"Lamy\",\"Delaunay\",\"Pasquier\",\"Carlier\",\"LaporteLaporte\"]\n },\n\n // Data taken from http://geoportal.statistics.gov.uk/datasets/ons-postcode-directory-latest-centroids\n postcodeAreas: [{code: 'AB'}, {code: 'AL'}, {code: 'B'}, {code: 'BA'}, {code: 'BB'}, {code: 'BD'}, {code: 'BH'}, {code: 'BL'}, {code: 'BN'}, {code: 'BR'}, {code: 'BS'}, {code: 'BT'}, {code: 'CA'}, {code: 'CB'}, {code: 'CF'}, {code: 'CH'}, {code: 'CM'}, {code: 'CO'}, {code: 'CR'}, {code: 'CT'}, {code: 'CV'}, {code: 'CW'}, {code: 'DA'}, {code: 'DD'}, {code: 'DE'}, {code: 'DG'}, {code: 'DH'}, {code: 'DL'}, {code: 'DN'}, {code: 'DT'}, {code: 'DY'}, {code: 'E'}, {code: 'EC'}, {code: 'EH'}, {code: 'EN'}, {code: 'EX'}, {code: 'FK'}, {code: 'FY'}, {code: 'G'}, {code: 'GL'}, {code: 'GU'}, {code: 'GY'}, {code: 'HA'}, {code: 'HD'}, {code: 'HG'}, {code: 'HP'}, {code: 'HR'}, {code: 'HS'}, {code: 'HU'}, {code: 'HX'}, {code: 'IG'}, {code: 'IM'}, {code: 'IP'}, {code: 'IV'}, {code: 'JE'}, {code: 'KA'}, {code: 'KT'}, {code: 'KW'}, {code: 'KY'}, {code: 'L'}, {code: 'LA'}, {code: 'LD'}, {code: 'LE'}, {code: 'LL'}, {code: 'LN'}, {code: 'LS'}, {code: 'LU'}, {code: 'M'}, {code: 'ME'}, {code: 'MK'}, {code: 'ML'}, {code: 'N'}, {code: 'NE'}, {code: 'NG'}, {code: 'NN'}, {code: 'NP'}, {code: 'NR'}, {code: 'NW'}, {code: 'OL'}, {code: 'OX'}, {code: 'PA'}, {code: 'PE'}, {code: 'PH'}, {code: 'PL'}, {code: 'PO'}, {code: 'PR'}, {code: 'RG'}, {code: 'RH'}, {code: 'RM'}, {code: 'S'}, {code: 'SA'}, {code: 'SE'}, {code: 'SG'}, {code: 'SK'}, {code: 'SL'}, {code: 'SM'}, {code: 'SN'}, {code: 'SO'}, {code: 'SP'}, {code: 'SR'}, {code: 'SS'}, {code: 'ST'}, {code: 'SW'}, {code: 'SY'}, {code: 'TA'}, {code: 'TD'}, {code: 'TF'}, {code: 'TN'}, {code: 'TQ'}, {code: 'TR'}, {code: 'TS'}, {code: 'TW'}, {code: 'UB'}, {code: 'W'}, {code: 'WA'}, {code: 'WC'}, {code: 'WD'}, {code: 'WF'}, {code: 'WN'}, {code: 'WR'}, {code: 'WS'}, {code: 'WV'}, {code: 'YO'}, {code: 'ZE'}],\n\n // Data taken from https://github.com/umpirsky/country-list/blob/master/data/en_US/country.json\n countries: [{\"name\":\"Afghanistan\",\"abbreviation\":\"AF\"},{\"name\":\"Åland Islands\",\"abbreviation\":\"AX\"},{\"name\":\"Albania\",\"abbreviation\":\"AL\"},{\"name\":\"Algeria\",\"abbreviation\":\"DZ\"},{\"name\":\"American Samoa\",\"abbreviation\":\"AS\"},{\"name\":\"Andorra\",\"abbreviation\":\"AD\"},{\"name\":\"Angola\",\"abbreviation\":\"AO\"},{\"name\":\"Anguilla\",\"abbreviation\":\"AI\"},{\"name\":\"Antarctica\",\"abbreviation\":\"AQ\"},{\"name\":\"Antigua & Barbuda\",\"abbreviation\":\"AG\"},{\"name\":\"Argentina\",\"abbreviation\":\"AR\"},{\"name\":\"Armenia\",\"abbreviation\":\"AM\"},{\"name\":\"Aruba\",\"abbreviation\":\"AW\"},{\"name\":\"Ascension Island\",\"abbreviation\":\"AC\"},{\"name\":\"Australia\",\"abbreviation\":\"AU\"},{\"name\":\"Austria\",\"abbreviation\":\"AT\"},{\"name\":\"Azerbaijan\",\"abbreviation\":\"AZ\"},{\"name\":\"Bahamas\",\"abbreviation\":\"BS\"},{\"name\":\"Bahrain\",\"abbreviation\":\"BH\"},{\"name\":\"Bangladesh\",\"abbreviation\":\"BD\"},{\"name\":\"Barbados\",\"abbreviation\":\"BB\"},{\"name\":\"Belarus\",\"abbreviation\":\"BY\"},{\"name\":\"Belgium\",\"abbreviation\":\"BE\"},{\"name\":\"Belize\",\"abbreviation\":\"BZ\"},{\"name\":\"Benin\",\"abbreviation\":\"BJ\"},{\"name\":\"Bermuda\",\"abbreviation\":\"BM\"},{\"name\":\"Bhutan\",\"abbreviation\":\"BT\"},{\"name\":\"Bolivia\",\"abbreviation\":\"BO\"},{\"name\":\"Bosnia & Herzegovina\",\"abbreviation\":\"BA\"},{\"name\":\"Botswana\",\"abbreviation\":\"BW\"},{\"name\":\"Brazil\",\"abbreviation\":\"BR\"},{\"name\":\"British Indian Ocean Territory\",\"abbreviation\":\"IO\"},{\"name\":\"British Virgin Islands\",\"abbreviation\":\"VG\"},{\"name\":\"Brunei\",\"abbreviation\":\"BN\"},{\"name\":\"Bulgaria\",\"abbreviation\":\"BG\"},{\"name\":\"Burkina Faso\",\"abbreviation\":\"BF\"},{\"name\":\"Burundi\",\"abbreviation\":\"BI\"},{\"name\":\"Cambodia\",\"abbreviation\":\"KH\"},{\"name\":\"Cameroon\",\"abbreviation\":\"CM\"},{\"name\":\"Canada\",\"abbreviation\":\"CA\"},{\"name\":\"Canary Islands\",\"abbreviation\":\"IC\"},{\"name\":\"Cape Verde\",\"abbreviation\":\"CV\"},{\"name\":\"Caribbean Netherlands\",\"abbreviation\":\"BQ\"},{\"name\":\"Cayman Islands\",\"abbreviation\":\"KY\"},{\"name\":\"Central African Republic\",\"abbreviation\":\"CF\"},{\"name\":\"Ceuta & Melilla\",\"abbreviation\":\"EA\"},{\"name\":\"Chad\",\"abbreviation\":\"TD\"},{\"name\":\"Chile\",\"abbreviation\":\"CL\"},{\"name\":\"China\",\"abbreviation\":\"CN\"},{\"name\":\"Christmas Island\",\"abbreviation\":\"CX\"},{\"name\":\"Cocos (Keeling) Islands\",\"abbreviation\":\"CC\"},{\"name\":\"Colombia\",\"abbreviation\":\"CO\"},{\"name\":\"Comoros\",\"abbreviation\":\"KM\"},{\"name\":\"Congo - Brazzaville\",\"abbreviation\":\"CG\"},{\"name\":\"Congo - Kinshasa\",\"abbreviation\":\"CD\"},{\"name\":\"Cook Islands\",\"abbreviation\":\"CK\"},{\"name\":\"Costa Rica\",\"abbreviation\":\"CR\"},{\"name\":\"Côte d'Ivoire\",\"abbreviation\":\"CI\"},{\"name\":\"Croatia\",\"abbreviation\":\"HR\"},{\"name\":\"Cuba\",\"abbreviation\":\"CU\"},{\"name\":\"Curaçao\",\"abbreviation\":\"CW\"},{\"name\":\"Cyprus\",\"abbreviation\":\"CY\"},{\"name\":\"Czech Republic\",\"abbreviation\":\"CZ\"},{\"name\":\"Denmark\",\"abbreviation\":\"DK\"},{\"name\":\"Diego Garcia\",\"abbreviation\":\"DG\"},{\"name\":\"Djibouti\",\"abbreviation\":\"DJ\"},{\"name\":\"Dominica\",\"abbreviation\":\"DM\"},{\"name\":\"Dominican Republic\",\"abbreviation\":\"DO\"},{\"name\":\"Ecuador\",\"abbreviation\":\"EC\"},{\"name\":\"Egypt\",\"abbreviation\":\"EG\"},{\"name\":\"El Salvador\",\"abbreviation\":\"SV\"},{\"name\":\"Equatorial Guinea\",\"abbreviation\":\"GQ\"},{\"name\":\"Eritrea\",\"abbreviation\":\"ER\"},{\"name\":\"Estonia\",\"abbreviation\":\"EE\"},{\"name\":\"Ethiopia\",\"abbreviation\":\"ET\"},{\"name\":\"Falkland Islands\",\"abbreviation\":\"FK\"},{\"name\":\"Faroe Islands\",\"abbreviation\":\"FO\"},{\"name\":\"Fiji\",\"abbreviation\":\"FJ\"},{\"name\":\"Finland\",\"abbreviation\":\"FI\"},{\"name\":\"France\",\"abbreviation\":\"FR\"},{\"name\":\"French Guiana\",\"abbreviation\":\"GF\"},{\"name\":\"French Polynesia\",\"abbreviation\":\"PF\"},{\"name\":\"French Southern Territories\",\"abbreviation\":\"TF\"},{\"name\":\"Gabon\",\"abbreviation\":\"GA\"},{\"name\":\"Gambia\",\"abbreviation\":\"GM\"},{\"name\":\"Georgia\",\"abbreviation\":\"GE\"},{\"name\":\"Germany\",\"abbreviation\":\"DE\"},{\"name\":\"Ghana\",\"abbreviation\":\"GH\"},{\"name\":\"Gibraltar\",\"abbreviation\":\"GI\"},{\"name\":\"Greece\",\"abbreviation\":\"GR\"},{\"name\":\"Greenland\",\"abbreviation\":\"GL\"},{\"name\":\"Grenada\",\"abbreviation\":\"GD\"},{\"name\":\"Guadeloupe\",\"abbreviation\":\"GP\"},{\"name\":\"Guam\",\"abbreviation\":\"GU\"},{\"name\":\"Guatemala\",\"abbreviation\":\"GT\"},{\"name\":\"Guernsey\",\"abbreviation\":\"GG\"},{\"name\":\"Guinea\",\"abbreviation\":\"GN\"},{\"name\":\"Guinea-Bissau\",\"abbreviation\":\"GW\"},{\"name\":\"Guyana\",\"abbreviation\":\"GY\"},{\"name\":\"Haiti\",\"abbreviation\":\"HT\"},{\"name\":\"Honduras\",\"abbreviation\":\"HN\"},{\"name\":\"Hong Kong SAR China\",\"abbreviation\":\"HK\"},{\"name\":\"Hungary\",\"abbreviation\":\"HU\"},{\"name\":\"Iceland\",\"abbreviation\":\"IS\"},{\"name\":\"India\",\"abbreviation\":\"IN\"},{\"name\":\"Indonesia\",\"abbreviation\":\"ID\"},{\"name\":\"Iran\",\"abbreviation\":\"IR\"},{\"name\":\"Iraq\",\"abbreviation\":\"IQ\"},{\"name\":\"Ireland\",\"abbreviation\":\"IE\"},{\"name\":\"Isle of Man\",\"abbreviation\":\"IM\"},{\"name\":\"Israel\",\"abbreviation\":\"IL\"},{\"name\":\"Italy\",\"abbreviation\":\"IT\"},{\"name\":\"Jamaica\",\"abbreviation\":\"JM\"},{\"name\":\"Japan\",\"abbreviation\":\"JP\"},{\"name\":\"Jersey\",\"abbreviation\":\"JE\"},{\"name\":\"Jordan\",\"abbreviation\":\"JO\"},{\"name\":\"Kazakhstan\",\"abbreviation\":\"KZ\"},{\"name\":\"Kenya\",\"abbreviation\":\"KE\"},{\"name\":\"Kiribati\",\"abbreviation\":\"KI\"},{\"name\":\"Kosovo\",\"abbreviation\":\"XK\"},{\"name\":\"Kuwait\",\"abbreviation\":\"KW\"},{\"name\":\"Kyrgyzstan\",\"abbreviation\":\"KG\"},{\"name\":\"Laos\",\"abbreviation\":\"LA\"},{\"name\":\"Latvia\",\"abbreviation\":\"LV\"},{\"name\":\"Lebanon\",\"abbreviation\":\"LB\"},{\"name\":\"Lesotho\",\"abbreviation\":\"LS\"},{\"name\":\"Liberia\",\"abbreviation\":\"LR\"},{\"name\":\"Libya\",\"abbreviation\":\"LY\"},{\"name\":\"Liechtenstein\",\"abbreviation\":\"LI\"},{\"name\":\"Lithuania\",\"abbreviation\":\"LT\"},{\"name\":\"Luxembourg\",\"abbreviation\":\"LU\"},{\"name\":\"Macau SAR China\",\"abbreviation\":\"MO\"},{\"name\":\"Macedonia\",\"abbreviation\":\"MK\"},{\"name\":\"Madagascar\",\"abbreviation\":\"MG\"},{\"name\":\"Malawi\",\"abbreviation\":\"MW\"},{\"name\":\"Malaysia\",\"abbreviation\":\"MY\"},{\"name\":\"Maldives\",\"abbreviation\":\"MV\"},{\"name\":\"Mali\",\"abbreviation\":\"ML\"},{\"name\":\"Malta\",\"abbreviation\":\"MT\"},{\"name\":\"Marshall Islands\",\"abbreviation\":\"MH\"},{\"name\":\"Martinique\",\"abbreviation\":\"MQ\"},{\"name\":\"Mauritania\",\"abbreviation\":\"MR\"},{\"name\":\"Mauritius\",\"abbreviation\":\"MU\"},{\"name\":\"Mayotte\",\"abbreviation\":\"YT\"},{\"name\":\"Mexico\",\"abbreviation\":\"MX\"},{\"name\":\"Micronesia\",\"abbreviation\":\"FM\"},{\"name\":\"Moldova\",\"abbreviation\":\"MD\"},{\"name\":\"Monaco\",\"abbreviation\":\"MC\"},{\"name\":\"Mongolia\",\"abbreviation\":\"MN\"},{\"name\":\"Montenegro\",\"abbreviation\":\"ME\"},{\"name\":\"Montserrat\",\"abbreviation\":\"MS\"},{\"name\":\"Morocco\",\"abbreviation\":\"MA\"},{\"name\":\"Mozambique\",\"abbreviation\":\"MZ\"},{\"name\":\"Myanmar (Burma)\",\"abbreviation\":\"MM\"},{\"name\":\"Namibia\",\"abbreviation\":\"NA\"},{\"name\":\"Nauru\",\"abbreviation\":\"NR\"},{\"name\":\"Nepal\",\"abbreviation\":\"NP\"},{\"name\":\"Netherlands\",\"abbreviation\":\"NL\"},{\"name\":\"New Caledonia\",\"abbreviation\":\"NC\"},{\"name\":\"New Zealand\",\"abbreviation\":\"NZ\"},{\"name\":\"Nicaragua\",\"abbreviation\":\"NI\"},{\"name\":\"Niger\",\"abbreviation\":\"NE\"},{\"name\":\"Nigeria\",\"abbreviation\":\"NG\"},{\"name\":\"Niue\",\"abbreviation\":\"NU\"},{\"name\":\"Norfolk Island\",\"abbreviation\":\"NF\"},{\"name\":\"North Korea\",\"abbreviation\":\"KP\"},{\"name\":\"Northern Mariana Islands\",\"abbreviation\":\"MP\"},{\"name\":\"Norway\",\"abbreviation\":\"NO\"},{\"name\":\"Oman\",\"abbreviation\":\"OM\"},{\"name\":\"Pakistan\",\"abbreviation\":\"PK\"},{\"name\":\"Palau\",\"abbreviation\":\"PW\"},{\"name\":\"Palestinian Territories\",\"abbreviation\":\"PS\"},{\"name\":\"Panama\",\"abbreviation\":\"PA\"},{\"name\":\"Papua New Guinea\",\"abbreviation\":\"PG\"},{\"name\":\"Paraguay\",\"abbreviation\":\"PY\"},{\"name\":\"Peru\",\"abbreviation\":\"PE\"},{\"name\":\"Philippines\",\"abbreviation\":\"PH\"},{\"name\":\"Pitcairn Islands\",\"abbreviation\":\"PN\"},{\"name\":\"Poland\",\"abbreviation\":\"PL\"},{\"name\":\"Portugal\",\"abbreviation\":\"PT\"},{\"name\":\"Puerto Rico\",\"abbreviation\":\"PR\"},{\"name\":\"Qatar\",\"abbreviation\":\"QA\"},{\"name\":\"Réunion\",\"abbreviation\":\"RE\"},{\"name\":\"Romania\",\"abbreviation\":\"RO\"},{\"name\":\"Russia\",\"abbreviation\":\"RU\"},{\"name\":\"Rwanda\",\"abbreviation\":\"RW\"},{\"name\":\"Samoa\",\"abbreviation\":\"WS\"},{\"name\":\"San Marino\",\"abbreviation\":\"SM\"},{\"name\":\"São Tomé and Príncipe\",\"abbreviation\":\"ST\"},{\"name\":\"Saudi Arabia\",\"abbreviation\":\"SA\"},{\"name\":\"Senegal\",\"abbreviation\":\"SN\"},{\"name\":\"Serbia\",\"abbreviation\":\"RS\"},{\"name\":\"Seychelles\",\"abbreviation\":\"SC\"},{\"name\":\"Sierra Leone\",\"abbreviation\":\"SL\"},{\"name\":\"Singapore\",\"abbreviation\":\"SG\"},{\"name\":\"Sint Maarten\",\"abbreviation\":\"SX\"},{\"name\":\"Slovakia\",\"abbreviation\":\"SK\"},{\"name\":\"Slovenia\",\"abbreviation\":\"SI\"},{\"name\":\"Solomon Islands\",\"abbreviation\":\"SB\"},{\"name\":\"Somalia\",\"abbreviation\":\"SO\"},{\"name\":\"South Africa\",\"abbreviation\":\"ZA\"},{\"name\":\"South Georgia & South Sandwich Islands\",\"abbreviation\":\"GS\"},{\"name\":\"South Korea\",\"abbreviation\":\"KR\"},{\"name\":\"South Sudan\",\"abbreviation\":\"SS\"},{\"name\":\"Spain\",\"abbreviation\":\"ES\"},{\"name\":\"Sri Lanka\",\"abbreviation\":\"LK\"},{\"name\":\"St. Barthélemy\",\"abbreviation\":\"BL\"},{\"name\":\"St. Helena\",\"abbreviation\":\"SH\"},{\"name\":\"St. Kitts & Nevis\",\"abbreviation\":\"KN\"},{\"name\":\"St. Lucia\",\"abbreviation\":\"LC\"},{\"name\":\"St. Martin\",\"abbreviation\":\"MF\"},{\"name\":\"St. Pierre & Miquelon\",\"abbreviation\":\"PM\"},{\"name\":\"St. Vincent & Grenadines\",\"abbreviation\":\"VC\"},{\"name\":\"Sudan\",\"abbreviation\":\"SD\"},{\"name\":\"Suriname\",\"abbreviation\":\"SR\"},{\"name\":\"Svalbard & Jan Mayen\",\"abbreviation\":\"SJ\"},{\"name\":\"Swaziland\",\"abbreviation\":\"SZ\"},{\"name\":\"Sweden\",\"abbreviation\":\"SE\"},{\"name\":\"Switzerland\",\"abbreviation\":\"CH\"},{\"name\":\"Syria\",\"abbreviation\":\"SY\"},{\"name\":\"Taiwan\",\"abbreviation\":\"TW\"},{\"name\":\"Tajikistan\",\"abbreviation\":\"TJ\"},{\"name\":\"Tanzania\",\"abbreviation\":\"TZ\"},{\"name\":\"Thailand\",\"abbreviation\":\"TH\"},{\"name\":\"Timor-Leste\",\"abbreviation\":\"TL\"},{\"name\":\"Togo\",\"abbreviation\":\"TG\"},{\"name\":\"Tokelau\",\"abbreviation\":\"TK\"},{\"name\":\"Tonga\",\"abbreviation\":\"TO\"},{\"name\":\"Trinidad & Tobago\",\"abbreviation\":\"TT\"},{\"name\":\"Tristan da Cunha\",\"abbreviation\":\"TA\"},{\"name\":\"Tunisia\",\"abbreviation\":\"TN\"},{\"name\":\"Turkey\",\"abbreviation\":\"TR\"},{\"name\":\"Turkmenistan\",\"abbreviation\":\"TM\"},{\"name\":\"Turks & Caicos Islands\",\"abbreviation\":\"TC\"},{\"name\":\"Tuvalu\",\"abbreviation\":\"TV\"},{\"name\":\"U.S. Outlying Islands\",\"abbreviation\":\"UM\"},{\"name\":\"U.S. Virgin Islands\",\"abbreviation\":\"VI\"},{\"name\":\"Uganda\",\"abbreviation\":\"UG\"},{\"name\":\"Ukraine\",\"abbreviation\":\"UA\"},{\"name\":\"United Arab Emirates\",\"abbreviation\":\"AE\"},{\"name\":\"United Kingdom\",\"abbreviation\":\"GB\"},{\"name\":\"United States\",\"abbreviation\":\"US\"},{\"name\":\"Uruguay\",\"abbreviation\":\"UY\"},{\"name\":\"Uzbekistan\",\"abbreviation\":\"UZ\"},{\"name\":\"Vanuatu\",\"abbreviation\":\"VU\"},{\"name\":\"Vatican City\",\"abbreviation\":\"VA\"},{\"name\":\"Venezuela\",\"abbreviation\":\"VE\"},{\"name\":\"Vietnam\",\"abbreviation\":\"VN\"},{\"name\":\"Wallis & Futuna\",\"abbreviation\":\"WF\"},{\"name\":\"Western Sahara\",\"abbreviation\":\"EH\"},{\"name\":\"Yemen\",\"abbreviation\":\"YE\"},{\"name\":\"Zambia\",\"abbreviation\":\"ZM\"},{\"name\":\"Zimbabwe\",\"abbreviation\":\"ZW\"}],\n\n counties: {\n // Data taken from http://www.downloadexcelfiles.com/gb_en/download-excel-file-list-counties-uk\n \"uk\": [\n {name: 'Bath and North East Somerset'},\n {name: 'Aberdeenshire'},\n {name: 'Anglesey'},\n {name: 'Angus'},\n {name: 'Bedford'},\n {name: 'Blackburn with Darwen'},\n {name: 'Blackpool'},\n {name: 'Bournemouth'},\n {name: 'Bracknell Forest'},\n {name: 'Brighton & Hove'},\n {name: 'Bristol'},\n {name: 'Buckinghamshire'},\n {name: 'Cambridgeshire'},\n {name: 'Carmarthenshire'},\n {name: 'Central Bedfordshire'},\n {name: 'Ceredigion'},\n {name: 'Cheshire East'},\n {name: 'Cheshire West and Chester'},\n {name: 'Clackmannanshire'},\n {name: 'Conwy'},\n {name: 'Cornwall'},\n {name: 'County Antrim'},\n {name: 'County Armagh'},\n {name: 'County Down'},\n {name: 'County Durham'},\n {name: 'County Fermanagh'},\n {name: 'County Londonderry'},\n {name: 'County Tyrone'},\n {name: 'Cumbria'},\n {name: 'Darlington'},\n {name: 'Denbighshire'},\n {name: 'Derby'},\n {name: 'Derbyshire'},\n {name: 'Devon'},\n {name: 'Dorset'},\n {name: 'Dumfries and Galloway'},\n {name: 'Dundee'},\n {name: 'East Lothian'},\n {name: 'East Riding of Yorkshire'},\n {name: 'East Sussex'},\n {name: 'Edinburgh?'},\n {name: 'Essex'},\n {name: 'Falkirk'},\n {name: 'Fife'},\n {name: 'Flintshire'},\n {name: 'Gloucestershire'},\n {name: 'Greater London'},\n {name: 'Greater Manchester'},\n {name: 'Gwent'},\n {name: 'Gwynedd'},\n {name: 'Halton'},\n {name: 'Hampshire'},\n {name: 'Hartlepool'},\n {name: 'Herefordshire'},\n {name: 'Hertfordshire'},\n {name: 'Highlands'},\n {name: 'Hull'},\n {name: 'Isle of Wight'},\n {name: 'Isles of Scilly'},\n {name: 'Kent'},\n {name: 'Lancashire'},\n {name: 'Leicester'},\n {name: 'Leicestershire'},\n {name: 'Lincolnshire'},\n {name: 'Lothian'},\n {name: 'Luton'},\n {name: 'Medway'},\n {name: 'Merseyside'},\n {name: 'Mid Glamorgan'},\n {name: 'Middlesbrough'},\n {name: 'Milton Keynes'},\n {name: 'Monmouthshire'},\n {name: 'Moray'},\n {name: 'Norfolk'},\n {name: 'North East Lincolnshire'},\n {name: 'North Lincolnshire'},\n {name: 'North Somerset'},\n {name: 'North Yorkshire'},\n {name: 'Northamptonshire'},\n {name: 'Northumberland'},\n {name: 'Nottingham'},\n {name: 'Nottinghamshire'},\n {name: 'Oxfordshire'},\n {name: 'Pembrokeshire'},\n {name: 'Perth and Kinross'},\n {name: 'Peterborough'},\n {name: 'Plymouth'},\n {name: 'Poole'},\n {name: 'Portsmouth'},\n {name: 'Powys'},\n {name: 'Reading'},\n {name: 'Redcar and Cleveland'},\n {name: 'Rutland'},\n {name: 'Scottish Borders'},\n {name: 'Shropshire'},\n {name: 'Slough'},\n {name: 'Somerset'},\n {name: 'South Glamorgan'},\n {name: 'South Gloucestershire'},\n {name: 'South Yorkshire'},\n {name: 'Southampton'},\n {name: 'Southend-on-Sea'},\n {name: 'Staffordshire'},\n {name: 'Stirlingshire'},\n {name: 'Stockton-on-Tees'},\n {name: 'Stoke-on-Trent'},\n {name: 'Strathclyde'},\n {name: 'Suffolk'},\n {name: 'Surrey'},\n {name: 'Swindon'},\n {name: 'Telford and Wrekin'},\n {name: 'Thurrock'},\n {name: 'Torbay'},\n {name: 'Tyne and Wear'},\n {name: 'Warrington'},\n {name: 'Warwickshire'},\n {name: 'West Berkshire'},\n {name: 'West Glamorgan'},\n {name: 'West Lothian'},\n {name: 'West Midlands'},\n {name: 'West Sussex'},\n {name: 'West Yorkshire'},\n {name: 'Western Isles'},\n {name: 'Wiltshire'},\n {name: 'Windsor and Maidenhead'},\n {name: 'Wokingham'},\n {name: 'Worcestershire'},\n {name: 'Wrexham'},\n {name: 'York'}]\n },\n provinces: {\n \"ca\": [\n {name: 'Alberta', abbreviation: 'AB'},\n {name: 'British Columbia', abbreviation: 'BC'},\n {name: 'Manitoba', abbreviation: 'MB'},\n {name: 'New Brunswick', abbreviation: 'NB'},\n {name: 'Newfoundland and Labrador', abbreviation: 'NL'},\n {name: 'Nova Scotia', abbreviation: 'NS'},\n {name: 'Ontario', abbreviation: 'ON'},\n {name: 'Prince Edward Island', abbreviation: 'PE'},\n {name: 'Quebec', abbreviation: 'QC'},\n {name: 'Saskatchewan', abbreviation: 'SK'},\n\n // The case could be made that the following are not actually provinces\n // since they are technically considered \"territories\" however they all\n // look the same on an envelope!\n {name: 'Northwest Territories', abbreviation: 'NT'},\n {name: 'Nunavut', abbreviation: 'NU'},\n {name: 'Yukon', abbreviation: 'YT'}\n ],\n \"it\": [\n { name: \"Agrigento\", abbreviation: \"AG\", code: 84 },\n { name: \"Alessandria\", abbreviation: \"AL\", code: 6 },\n { name: \"Ancona\", abbreviation: \"AN\", code: 42 },\n { name: \"Aosta\", abbreviation: \"AO\", code: 7 },\n { name: \"L'Aquila\", abbreviation: \"AQ\", code: 66 },\n { name: \"Arezzo\", abbreviation: \"AR\", code: 51 },\n { name: \"Ascoli-Piceno\", abbreviation: \"AP\", code: 44 },\n { name: \"Asti\", abbreviation: \"AT\", code: 5 },\n { name: \"Avellino\", abbreviation: \"AV\", code: 64 },\n { name: \"Bari\", abbreviation: \"BA\", code: 72 },\n { name: \"Barletta-Andria-Trani\", abbreviation: \"BT\", code: 72 },\n { name: \"Belluno\", abbreviation: \"BL\", code: 25 },\n { name: \"Benevento\", abbreviation: \"BN\", code: 62 },\n { name: \"Bergamo\", abbreviation: \"BG\", code: 16 },\n { name: \"Biella\", abbreviation: \"BI\", code: 96 },\n { name: \"Bologna\", abbreviation: \"BO\", code: 37 },\n { name: \"Bolzano\", abbreviation: \"BZ\", code: 21 },\n { name: \"Brescia\", abbreviation: \"BS\", code: 17 },\n { name: \"Brindisi\", abbreviation: \"BR\", code: 74 },\n { name: \"Cagliari\", abbreviation: \"CA\", code: 92 },\n { name: \"Caltanissetta\", abbreviation: \"CL\", code: 85 },\n { name: \"Campobasso\", abbreviation: \"CB\", code: 70 },\n { name: \"Carbonia Iglesias\", abbreviation: \"CI\", code: 70 },\n { name: \"Caserta\", abbreviation: \"CE\", code: 61 },\n { name: \"Catania\", abbreviation: \"CT\", code: 87 },\n { name: \"Catanzaro\", abbreviation: \"CZ\", code: 79 },\n { name: \"Chieti\", abbreviation: \"CH\", code: 69 },\n { name: \"Como\", abbreviation: \"CO\", code: 13 },\n { name: \"Cosenza\", abbreviation: \"CS\", code: 78 },\n { name: \"Cremona\", abbreviation: \"CR\", code: 19 },\n { name: \"Crotone\", abbreviation: \"KR\", code: 101 },\n { name: \"Cuneo\", abbreviation: \"CN\", code: 4 },\n { name: \"Enna\", abbreviation: \"EN\", code: 86 },\n { name: \"Fermo\", abbreviation: \"FM\", code: 86 },\n { name: \"Ferrara\", abbreviation: \"FE\", code: 38 },\n { name: \"Firenze\", abbreviation: \"FI\", code: 48 },\n { name: \"Foggia\", abbreviation: \"FG\", code: 71 },\n { name: \"Forli-Cesena\", abbreviation: \"FC\", code: 71 },\n { name: \"Frosinone\", abbreviation: \"FR\", code: 60 },\n { name: \"Genova\", abbreviation: \"GE\", code: 10 },\n { name: \"Gorizia\", abbreviation: \"GO\", code: 31 },\n { name: \"Grosseto\", abbreviation: \"GR\", code: 53 },\n { name: \"Imperia\", abbreviation: \"IM\", code: 8 },\n { name: \"Isernia\", abbreviation: \"IS\", code: 94 },\n { name: \"La-Spezia\", abbreviation: \"SP\", code: 66 },\n { name: \"Latina\", abbreviation: \"LT\", code: 59 },\n { name: \"Lecce\", abbreviation: \"LE\", code: 75 },\n { name: \"Lecco\", abbreviation: \"LC\", code: 97 },\n { name: \"Livorno\", abbreviation: \"LI\", code: 49 },\n { name: \"Lodi\", abbreviation: \"LO\", code: 98 },\n { name: \"Lucca\", abbreviation: \"LU\", code: 46 },\n { name: \"Macerata\", abbreviation: \"MC\", code: 43 },\n { name: \"Mantova\", abbreviation: \"MN\", code: 20 },\n { name: \"Massa-Carrara\", abbreviation: \"MS\", code: 45 },\n { name: \"Matera\", abbreviation: \"MT\", code: 77 },\n { name: \"Medio Campidano\", abbreviation: \"VS\", code: 77 },\n { name: \"Messina\", abbreviation: \"ME\", code: 83 },\n { name: \"Milano\", abbreviation: \"MI\", code: 15 },\n { name: \"Modena\", abbreviation: \"MO\", code: 36 },\n { name: \"Monza-Brianza\", abbreviation: \"MB\", code: 36 },\n { name: \"Napoli\", abbreviation: \"NA\", code: 63 },\n { name: \"Novara\", abbreviation: \"NO\", code: 3 },\n { name: \"Nuoro\", abbreviation: \"NU\", code: 91 },\n { name: \"Ogliastra\", abbreviation: \"OG\", code: 91 },\n { name: \"Olbia Tempio\", abbreviation: \"OT\", code: 91 },\n { name: \"Oristano\", abbreviation: \"OR\", code: 95 },\n { name: \"Padova\", abbreviation: \"PD\", code: 28 },\n { name: \"Palermo\", abbreviation: \"PA\", code: 82 },\n { name: \"Parma\", abbreviation: \"PR\", code: 34 },\n { name: \"Pavia\", abbreviation: \"PV\", code: 18 },\n { name: \"Perugia\", abbreviation: \"PG\", code: 54 },\n { name: \"Pesaro-Urbino\", abbreviation: \"PU\", code: 41 },\n { name: \"Pescara\", abbreviation: \"PE\", code: 68 },\n { name: \"Piacenza\", abbreviation: \"PC\", code: 33 },\n { name: \"Pisa\", abbreviation: \"PI\", code: 50 },\n { name: \"Pistoia\", abbreviation: \"PT\", code: 47 },\n { name: \"Pordenone\", abbreviation: \"PN\", code: 93 },\n { name: \"Potenza\", abbreviation: \"PZ\", code: 76 },\n { name: \"Prato\", abbreviation: \"PO\", code: 100 },\n { name: \"Ragusa\", abbreviation: \"RG\", code: 88 },\n { name: \"Ravenna\", abbreviation: \"RA\", code: 39 },\n { name: \"Reggio-Calabria\", abbreviation: \"RC\", code: 35 },\n { name: \"Reggio-Emilia\", abbreviation: \"RE\", code: 35 },\n { name: \"Rieti\", abbreviation: \"RI\", code: 57 },\n { name: \"Rimini\", abbreviation: \"RN\", code: 99 },\n { name: \"Roma\", abbreviation: \"Roma\", code: 58 },\n { name: \"Rovigo\", abbreviation: \"RO\", code: 29 },\n { name: \"Salerno\", abbreviation: \"SA\", code: 65 },\n { name: \"Sassari\", abbreviation: \"SS\", code: 90 },\n { name: \"Savona\", abbreviation: \"SV\", code: 9 },\n { name: \"Siena\", abbreviation: \"SI\", code: 52 },\n { name: \"Siracusa\", abbreviation: \"SR\", code: 89 },\n { name: \"Sondrio\", abbreviation: \"SO\", code: 14 },\n { name: \"Taranto\", abbreviation: \"TA\", code: 73 },\n { name: \"Teramo\", abbreviation: \"TE\", code: 67 },\n { name: \"Terni\", abbreviation: \"TR\", code: 55 },\n { name: \"Torino\", abbreviation: \"TO\", code: 1 },\n { name: \"Trapani\", abbreviation: \"TP\", code: 81 },\n { name: \"Trento\", abbreviation: \"TN\", code: 22 },\n { name: \"Treviso\", abbreviation: \"TV\", code: 26 },\n { name: \"Trieste\", abbreviation: \"TS\", code: 32 },\n { name: \"Udine\", abbreviation: \"UD\", code: 30 },\n { name: \"Varese\", abbreviation: \"VA\", code: 12 },\n { name: \"Venezia\", abbreviation: \"VE\", code: 27 },\n { name: \"Verbania\", abbreviation: \"VB\", code: 27 },\n { name: \"Vercelli\", abbreviation: \"VC\", code: 2 },\n { name: \"Verona\", abbreviation: \"VR\", code: 23 },\n { name: \"Vibo-Valentia\", abbreviation: \"VV\", code: 102 },\n { name: \"Vicenza\", abbreviation: \"VI\", code: 24 },\n { name: \"Viterbo\", abbreviation: \"VT\", code: 56 }\n ]\n },\n\n // from: https://github.com/samsargent/Useful-Autocomplete-Data/blob/master/data/nationalities.json\n nationalities: [\n {name: 'Afghan'},\n {name: 'Albanian'},\n {name: 'Algerian'},\n {name: 'American'},\n {name: 'Andorran'},\n {name: 'Angolan'},\n {name: 'Antiguans'},\n {name: 'Argentinean'},\n {name: 'Armenian'},\n {name: 'Australian'},\n {name: 'Austrian'},\n {name: 'Azerbaijani'},\n {name: 'Bahami'},\n {name: 'Bahraini'},\n {name: 'Bangladeshi'},\n {name: 'Barbadian'},\n {name: 'Barbudans'},\n {name: 'Batswana'},\n {name: 'Belarusian'},\n {name: 'Belgian'},\n {name: 'Belizean'},\n {name: 'Beninese'},\n {name: 'Bhutanese'},\n {name: 'Bolivian'},\n {name: 'Bosnian'},\n {name: 'Brazilian'},\n {name: 'British'},\n {name: 'Bruneian'},\n {name: 'Bulgarian'},\n {name: 'Burkinabe'},\n {name: 'Burmese'},\n {name: 'Burundian'},\n {name: 'Cambodian'},\n {name: 'Cameroonian'},\n {name: 'Canadian'},\n {name: 'Cape Verdean'},\n {name: 'Central African'},\n {name: 'Chadian'},\n {name: 'Chilean'},\n {name: 'Chinese'},\n {name: 'Colombian'},\n {name: 'Comoran'},\n {name: 'Congolese'},\n {name: 'Costa Rican'},\n {name: 'Croatian'},\n {name: 'Cuban'},\n {name: 'Cypriot'},\n {name: 'Czech'},\n {name: 'Danish'},\n {name: 'Djibouti'},\n {name: 'Dominican'},\n {name: 'Dutch'},\n {name: 'East Timorese'},\n {name: 'Ecuadorean'},\n {name: 'Egyptian'},\n {name: 'Emirian'},\n {name: 'Equatorial Guinean'},\n {name: 'Eritrean'},\n {name: 'Estonian'},\n {name: 'Ethiopian'},\n {name: 'Fijian'},\n {name: 'Filipino'},\n {name: 'Finnish'},\n {name: 'French'},\n {name: 'Gabonese'},\n {name: 'Gambian'},\n {name: 'Georgian'},\n {name: 'German'},\n {name: 'Ghanaian'},\n {name: 'Greek'},\n {name: 'Grenadian'},\n {name: 'Guatemalan'},\n {name: 'Guinea-Bissauan'},\n {name: 'Guinean'},\n {name: 'Guyanese'},\n {name: 'Haitian'},\n {name: 'Herzegovinian'},\n {name: 'Honduran'},\n {name: 'Hungarian'},\n {name: 'I-Kiribati'},\n {name: 'Icelander'},\n {name: 'Indian'},\n {name: 'Indonesian'},\n {name: 'Iranian'},\n {name: 'Iraqi'},\n {name: 'Irish'},\n {name: 'Israeli'},\n {name: 'Italian'},\n {name: 'Ivorian'},\n {name: 'Jamaican'},\n {name: 'Japanese'},\n {name: 'Jordanian'},\n {name: 'Kazakhstani'},\n {name: 'Kenyan'},\n {name: 'Kittian and Nevisian'},\n {name: 'Kuwaiti'},\n {name: 'Kyrgyz'},\n {name: 'Laotian'},\n {name: 'Latvian'},\n {name: 'Lebanese'},\n {name: 'Liberian'},\n {name: 'Libyan'},\n {name: 'Liechtensteiner'},\n {name: 'Lithuanian'},\n {name: 'Luxembourger'},\n {name: 'Macedonian'},\n {name: 'Malagasy'},\n {name: 'Malawian'},\n {name: 'Malaysian'},\n {name: 'Maldivan'},\n {name: 'Malian'},\n {name: 'Maltese'},\n {name: 'Marshallese'},\n {name: 'Mauritanian'},\n {name: 'Mauritian'},\n {name: 'Mexican'},\n {name: 'Micronesian'},\n {name: 'Moldovan'},\n {name: 'Monacan'},\n {name: 'Mongolian'},\n {name: 'Moroccan'},\n {name: 'Mosotho'},\n {name: 'Motswana'},\n {name: 'Mozambican'},\n {name: 'Namibian'},\n {name: 'Nauruan'},\n {name: 'Nepalese'},\n {name: 'New Zealander'},\n {name: 'Nicaraguan'},\n {name: 'Nigerian'},\n {name: 'Nigerien'},\n {name: 'North Korean'},\n {name: 'Northern Irish'},\n {name: 'Norwegian'},\n {name: 'Omani'},\n {name: 'Pakistani'},\n {name: 'Palauan'},\n {name: 'Panamanian'},\n {name: 'Papua New Guinean'},\n {name: 'Paraguayan'},\n {name: 'Peruvian'},\n {name: 'Polish'},\n {name: 'Portuguese'},\n {name: 'Qatari'},\n {name: 'Romani'},\n {name: 'Russian'},\n {name: 'Rwandan'},\n {name: 'Saint Lucian'},\n {name: 'Salvadoran'},\n {name: 'Samoan'},\n {name: 'San Marinese'},\n {name: 'Sao Tomean'},\n {name: 'Saudi'},\n {name: 'Scottish'},\n {name: 'Senegalese'},\n {name: 'Serbian'},\n {name: 'Seychellois'},\n {name: 'Sierra Leonean'},\n {name: 'Singaporean'},\n {name: 'Slovakian'},\n {name: 'Slovenian'},\n {name: 'Solomon Islander'},\n {name: 'Somali'},\n {name: 'South African'},\n {name: 'South Korean'},\n {name: 'Spanish'},\n {name: 'Sri Lankan'},\n {name: 'Sudanese'},\n {name: 'Surinamer'},\n {name: 'Swazi'},\n {name: 'Swedish'},\n {name: 'Swiss'},\n {name: 'Syrian'},\n {name: 'Taiwanese'},\n {name: 'Tajik'},\n {name: 'Tanzanian'},\n {name: 'Thai'},\n {name: 'Togolese'},\n {name: 'Tongan'},\n {name: 'Trinidadian or Tobagonian'},\n {name: 'Tunisian'},\n {name: 'Turkish'},\n {name: 'Tuvaluan'},\n {name: 'Ugandan'},\n {name: 'Ukrainian'},\n {name: 'Uruguaya'},\n {name: 'Uzbekistani'},\n {name: 'Venezuela'},\n {name: 'Vietnamese'},\n {name: 'Wels'},\n {name: 'Yemenit'},\n {name: 'Zambia'},\n {name: 'Zimbabwe'},\n ],\n // http://www.loc.gov/standards/iso639-2/php/code_list.php (ISO-639-1 codes)\n locale_languages: [\n \"aa\",\n \"ab\",\n \"ae\",\n \"af\",\n \"ak\",\n \"am\",\n \"an\",\n \"ar\",\n \"as\",\n \"av\",\n \"ay\",\n \"az\",\n \"ba\",\n \"be\",\n \"bg\",\n \"bh\",\n \"bi\",\n \"bm\",\n \"bn\",\n \"bo\",\n \"br\",\n \"bs\",\n \"ca\",\n \"ce\",\n \"ch\",\n \"co\",\n \"cr\",\n \"cs\",\n \"cu\",\n \"cv\",\n \"cy\",\n \"da\",\n \"de\",\n \"dv\",\n \"dz\",\n \"ee\",\n \"el\",\n \"en\",\n \"eo\",\n \"es\",\n \"et\",\n \"eu\",\n \"fa\",\n \"ff\",\n \"fi\",\n \"fj\",\n \"fo\",\n \"fr\",\n \"fy\",\n \"ga\",\n \"gd\",\n \"gl\",\n \"gn\",\n \"gu\",\n \"gv\",\n \"ha\",\n \"he\",\n \"hi\",\n \"ho\",\n \"hr\",\n \"ht\",\n \"hu\",\n \"hy\",\n \"hz\",\n \"ia\",\n \"id\",\n \"ie\",\n \"ig\",\n \"ii\",\n \"ik\",\n \"io\",\n \"is\",\n \"it\",\n \"iu\",\n \"ja\",\n \"jv\",\n \"ka\",\n \"kg\",\n \"ki\",\n \"kj\",\n \"kk\",\n \"kl\",\n \"km\",\n \"kn\",\n \"ko\",\n \"kr\",\n \"ks\",\n \"ku\",\n \"kv\",\n \"kw\",\n \"ky\",\n \"la\",\n \"lb\",\n \"lg\",\n \"li\",\n \"ln\",\n \"lo\",\n \"lt\",\n \"lu\",\n \"lv\",\n \"mg\",\n \"mh\",\n \"mi\",\n \"mk\",\n \"ml\",\n \"mn\",\n \"mr\",\n \"ms\",\n \"mt\",\n \"my\",\n \"na\",\n \"nb\",\n \"nd\",\n \"ne\",\n \"ng\",\n \"nl\",\n \"nn\",\n \"no\",\n \"nr\",\n \"nv\",\n \"ny\",\n \"oc\",\n \"oj\",\n \"om\",\n \"or\",\n \"os\",\n \"pa\",\n \"pi\",\n \"pl\",\n \"ps\",\n \"pt\",\n \"qu\",\n \"rm\",\n \"rn\",\n \"ro\",\n \"ru\",\n \"rw\",\n \"sa\",\n \"sc\",\n \"sd\",\n \"se\",\n \"sg\",\n \"si\",\n \"sk\",\n \"sl\",\n \"sm\",\n \"sn\",\n \"so\",\n \"sq\",\n \"sr\",\n \"ss\",\n \"st\",\n \"su\",\n \"sv\",\n \"sw\",\n \"ta\",\n \"te\",\n \"tg\",\n \"th\",\n \"ti\",\n \"tk\",\n \"tl\",\n \"tn\",\n \"to\",\n \"tr\",\n \"ts\",\n \"tt\",\n \"tw\",\n \"ty\",\n \"ug\",\n \"uk\",\n \"ur\",\n \"uz\",\n \"ve\",\n \"vi\",\n \"vo\",\n \"wa\",\n \"wo\",\n \"xh\",\n \"yi\",\n \"yo\",\n \"za\",\n \"zh\",\n \"zu\"\n ],\n\n // From http://data.okfn.org/data/core/language-codes#resource-language-codes-full (IETF language tags)\n locale_regions: [\n \"agq-CM\",\n \"asa-TZ\",\n \"ast-ES\",\n \"bas-CM\",\n \"bem-ZM\",\n \"bez-TZ\",\n \"brx-IN\",\n \"cgg-UG\",\n \"chr-US\",\n \"dav-KE\",\n \"dje-NE\",\n \"dsb-DE\",\n \"dua-CM\",\n \"dyo-SN\",\n \"ebu-KE\",\n \"ewo-CM\",\n \"fil-PH\",\n \"fur-IT\",\n \"gsw-CH\",\n \"gsw-FR\",\n \"gsw-LI\",\n \"guz-KE\",\n \"haw-US\",\n \"hsb-DE\",\n \"jgo-CM\",\n \"jmc-TZ\",\n \"kab-DZ\",\n \"kam-KE\",\n \"kde-TZ\",\n \"kea-CV\",\n \"khq-ML\",\n \"kkj-CM\",\n \"kln-KE\",\n \"kok-IN\",\n \"ksb-TZ\",\n \"ksf-CM\",\n \"ksh-DE\",\n \"lag-TZ\",\n \"lkt-US\",\n \"luo-KE\",\n \"luy-KE\",\n \"mas-KE\",\n \"mas-TZ\",\n \"mer-KE\",\n \"mfe-MU\",\n \"mgh-MZ\",\n \"mgo-CM\",\n \"mua-CM\",\n \"naq-NA\",\n \"nmg-CM\",\n \"nnh-CM\",\n \"nus-SD\",\n \"nyn-UG\",\n \"rof-TZ\",\n \"rwk-TZ\",\n \"sah-RU\",\n \"saq-KE\",\n \"sbp-TZ\",\n \"seh-MZ\",\n \"ses-ML\",\n \"shi-Latn\",\n \"shi-Latn-MA\",\n \"shi-Tfng\",\n \"shi-Tfng-MA\",\n \"smn-FI\",\n \"teo-KE\",\n \"teo-UG\",\n \"twq-NE\",\n \"tzm-Latn\",\n \"tzm-Latn-MA\",\n \"vai-Latn\",\n \"vai-Latn-LR\",\n \"vai-Vaii\",\n \"vai-Vaii-LR\",\n \"vun-TZ\",\n \"wae-CH\",\n \"xog-UG\",\n \"yav-CM\",\n \"zgh-MA\",\n \"af-NA\",\n \"af-ZA\",\n \"ak-GH\",\n \"am-ET\",\n \"ar-001\",\n \"ar-AE\",\n \"ar-BH\",\n \"ar-DJ\",\n \"ar-DZ\",\n \"ar-EG\",\n \"ar-EH\",\n \"ar-ER\",\n \"ar-IL\",\n \"ar-IQ\",\n \"ar-JO\",\n \"ar-KM\",\n \"ar-KW\",\n \"ar-LB\",\n \"ar-LY\",\n \"ar-MA\",\n \"ar-MR\",\n \"ar-OM\",\n \"ar-PS\",\n \"ar-QA\",\n \"ar-SA\",\n \"ar-SD\",\n \"ar-SO\",\n \"ar-SS\",\n \"ar-SY\",\n \"ar-TD\",\n \"ar-TN\",\n \"ar-YE\",\n \"as-IN\",\n \"az-Cyrl\",\n \"az-Cyrl-AZ\",\n \"az-Latn\",\n \"az-Latn-AZ\",\n \"be-BY\",\n \"bg-BG\",\n \"bm-Latn\",\n \"bm-Latn-ML\",\n \"bn-BD\",\n \"bn-IN\",\n \"bo-CN\",\n \"bo-IN\",\n \"br-FR\",\n \"bs-Cyrl\",\n \"bs-Cyrl-BA\",\n \"bs-Latn\",\n \"bs-Latn-BA\",\n \"ca-AD\",\n \"ca-ES\",\n \"ca-ES-VALENCIA\",\n \"ca-FR\",\n \"ca-IT\",\n \"cs-CZ\",\n \"cy-GB\",\n \"da-DK\",\n \"da-GL\",\n \"de-AT\",\n \"de-BE\",\n \"de-CH\",\n \"de-DE\",\n \"de-LI\",\n \"de-LU\",\n \"dz-BT\",\n \"ee-GH\",\n \"ee-TG\",\n \"el-CY\",\n \"el-GR\",\n \"en-001\",\n \"en-150\",\n \"en-AG\",\n \"en-AI\",\n \"en-AS\",\n \"en-AU\",\n \"en-BB\",\n \"en-BE\",\n \"en-BM\",\n \"en-BS\",\n \"en-BW\",\n \"en-BZ\",\n \"en-CA\",\n \"en-CC\",\n \"en-CK\",\n \"en-CM\",\n \"en-CX\",\n \"en-DG\",\n \"en-DM\",\n \"en-ER\",\n \"en-FJ\",\n \"en-FK\",\n \"en-FM\",\n \"en-GB\",\n \"en-GD\",\n \"en-GG\",\n \"en-GH\",\n \"en-GI\",\n \"en-GM\",\n \"en-GU\",\n \"en-GY\",\n \"en-HK\",\n \"en-IE\",\n \"en-IM\",\n \"en-IN\",\n \"en-IO\",\n \"en-JE\",\n \"en-JM\",\n \"en-KE\",\n \"en-KI\",\n \"en-KN\",\n \"en-KY\",\n \"en-LC\",\n \"en-LR\",\n \"en-LS\",\n \"en-MG\",\n \"en-MH\",\n \"en-MO\",\n \"en-MP\",\n \"en-MS\",\n \"en-MT\",\n \"en-MU\",\n \"en-MW\",\n \"en-MY\",\n \"en-NA\",\n \"en-NF\",\n \"en-NG\",\n \"en-NR\",\n \"en-NU\",\n \"en-NZ\",\n \"en-PG\",\n \"en-PH\",\n \"en-PK\",\n \"en-PN\",\n \"en-PR\",\n \"en-PW\",\n \"en-RW\",\n \"en-SB\",\n \"en-SC\",\n \"en-SD\",\n \"en-SG\",\n \"en-SH\",\n \"en-SL\",\n \"en-SS\",\n \"en-SX\",\n \"en-SZ\",\n \"en-TC\",\n \"en-TK\",\n \"en-TO\",\n \"en-TT\",\n \"en-TV\",\n \"en-TZ\",\n \"en-UG\",\n \"en-UM\",\n \"en-US\",\n \"en-US-POSIX\",\n \"en-VC\",\n \"en-VG\",\n \"en-VI\",\n \"en-VU\",\n \"en-WS\",\n \"en-ZA\",\n \"en-ZM\",\n \"en-ZW\",\n \"eo-001\",\n \"es-419\",\n \"es-AR\",\n \"es-BO\",\n \"es-CL\",\n \"es-CO\",\n \"es-CR\",\n \"es-CU\",\n \"es-DO\",\n \"es-EA\",\n \"es-EC\",\n \"es-ES\",\n \"es-GQ\",\n \"es-GT\",\n \"es-HN\",\n \"es-IC\",\n \"es-MX\",\n \"es-NI\",\n \"es-PA\",\n \"es-PE\",\n \"es-PH\",\n \"es-PR\",\n \"es-PY\",\n \"es-SV\",\n \"es-US\",\n \"es-UY\",\n \"es-VE\",\n \"et-EE\",\n \"eu-ES\",\n \"fa-AF\",\n \"fa-IR\",\n \"ff-CM\",\n \"ff-GN\",\n \"ff-MR\",\n \"ff-SN\",\n \"fi-FI\",\n \"fo-FO\",\n \"fr-BE\",\n \"fr-BF\",\n \"fr-BI\",\n \"fr-BJ\",\n \"fr-BL\",\n \"fr-CA\",\n \"fr-CD\",\n \"fr-CF\",\n \"fr-CG\",\n \"fr-CH\",\n \"fr-CI\",\n \"fr-CM\",\n \"fr-DJ\",\n \"fr-DZ\",\n \"fr-FR\",\n \"fr-GA\",\n \"fr-GF\",\n \"fr-GN\",\n \"fr-GP\",\n \"fr-GQ\",\n \"fr-HT\",\n \"fr-KM\",\n \"fr-LU\",\n \"fr-MA\",\n \"fr-MC\",\n \"fr-MF\",\n \"fr-MG\",\n \"fr-ML\",\n \"fr-MQ\",\n \"fr-MR\",\n \"fr-MU\",\n \"fr-NC\",\n \"fr-NE\",\n \"fr-PF\",\n \"fr-PM\",\n \"fr-RE\",\n \"fr-RW\",\n \"fr-SC\",\n \"fr-SN\",\n \"fr-SY\",\n \"fr-TD\",\n \"fr-TG\",\n \"fr-TN\",\n \"fr-VU\",\n \"fr-WF\",\n \"fr-YT\",\n \"fy-NL\",\n \"ga-IE\",\n \"gd-GB\",\n \"gl-ES\",\n \"gu-IN\",\n \"gv-IM\",\n \"ha-Latn\",\n \"ha-Latn-GH\",\n \"ha-Latn-NE\",\n \"ha-Latn-NG\",\n \"he-IL\",\n \"hi-IN\",\n \"hr-BA\",\n \"hr-HR\",\n \"hu-HU\",\n \"hy-AM\",\n \"id-ID\",\n \"ig-NG\",\n \"ii-CN\",\n \"is-IS\",\n \"it-CH\",\n \"it-IT\",\n \"it-SM\",\n \"ja-JP\",\n \"ka-GE\",\n \"ki-KE\",\n \"kk-Cyrl\",\n \"kk-Cyrl-KZ\",\n \"kl-GL\",\n \"km-KH\",\n \"kn-IN\",\n \"ko-KP\",\n \"ko-KR\",\n \"ks-Arab\",\n \"ks-Arab-IN\",\n \"kw-GB\",\n \"ky-Cyrl\",\n \"ky-Cyrl-KG\",\n \"lb-LU\",\n \"lg-UG\",\n \"ln-AO\",\n \"ln-CD\",\n \"ln-CF\",\n \"ln-CG\",\n \"lo-LA\",\n \"lt-LT\",\n \"lu-CD\",\n \"lv-LV\",\n \"mg-MG\",\n \"mk-MK\",\n \"ml-IN\",\n \"mn-Cyrl\",\n \"mn-Cyrl-MN\",\n \"mr-IN\",\n \"ms-Latn\",\n \"ms-Latn-BN\",\n \"ms-Latn-MY\",\n \"ms-Latn-SG\",\n \"mt-MT\",\n \"my-MM\",\n \"nb-NO\",\n \"nb-SJ\",\n \"nd-ZW\",\n \"ne-IN\",\n \"ne-NP\",\n \"nl-AW\",\n \"nl-BE\",\n \"nl-BQ\",\n \"nl-CW\",\n \"nl-NL\",\n \"nl-SR\",\n \"nl-SX\",\n \"nn-NO\",\n \"om-ET\",\n \"om-KE\",\n \"or-IN\",\n \"os-GE\",\n \"os-RU\",\n \"pa-Arab\",\n \"pa-Arab-PK\",\n \"pa-Guru\",\n \"pa-Guru-IN\",\n \"pl-PL\",\n \"ps-AF\",\n \"pt-AO\",\n \"pt-BR\",\n \"pt-CV\",\n \"pt-GW\",\n \"pt-MO\",\n \"pt-MZ\",\n \"pt-PT\",\n \"pt-ST\",\n \"pt-TL\",\n \"qu-BO\",\n \"qu-EC\",\n \"qu-PE\",\n \"rm-CH\",\n \"rn-BI\",\n \"ro-MD\",\n \"ro-RO\",\n \"ru-BY\",\n \"ru-KG\",\n \"ru-KZ\",\n \"ru-MD\",\n \"ru-RU\",\n \"ru-UA\",\n \"rw-RW\",\n \"se-FI\",\n \"se-NO\",\n \"se-SE\",\n \"sg-CF\",\n \"si-LK\",\n \"sk-SK\",\n \"sl-SI\",\n \"sn-ZW\",\n \"so-DJ\",\n \"so-ET\",\n \"so-KE\",\n \"so-SO\",\n \"sq-AL\",\n \"sq-MK\",\n \"sq-XK\",\n \"sr-Cyrl\",\n \"sr-Cyrl-BA\",\n \"sr-Cyrl-ME\",\n \"sr-Cyrl-RS\",\n \"sr-Cyrl-XK\",\n \"sr-Latn\",\n \"sr-Latn-BA\",\n \"sr-Latn-ME\",\n \"sr-Latn-RS\",\n \"sr-Latn-XK\",\n \"sv-AX\",\n \"sv-FI\",\n \"sv-SE\",\n \"sw-CD\",\n \"sw-KE\",\n \"sw-TZ\",\n \"sw-UG\",\n \"ta-IN\",\n \"ta-LK\",\n \"ta-MY\",\n \"ta-SG\",\n \"te-IN\",\n \"th-TH\",\n \"ti-ER\",\n \"ti-ET\",\n \"to-TO\",\n \"tr-CY\",\n \"tr-TR\",\n \"ug-Arab\",\n \"ug-Arab-CN\",\n \"uk-UA\",\n \"ur-IN\",\n \"ur-PK\",\n \"uz-Arab\",\n \"uz-Arab-AF\",\n \"uz-Cyrl\",\n \"uz-Cyrl-UZ\",\n \"uz-Latn\",\n \"uz-Latn-UZ\",\n \"vi-VN\",\n \"yi-001\",\n \"yo-BJ\",\n \"yo-NG\",\n \"zh-Hans\",\n \"zh-Hans-CN\",\n \"zh-Hans-HK\",\n \"zh-Hans-MO\",\n \"zh-Hans-SG\",\n \"zh-Hant\",\n \"zh-Hant-HK\",\n \"zh-Hant-MO\",\n \"zh-Hant-TW\",\n \"zu-ZA\"\n ],\n\n us_states_and_dc: [\n {name: 'Alabama', abbreviation: 'AL'},\n {name: 'Alaska', abbreviation: 'AK'},\n {name: 'Arizona', abbreviation: 'AZ'},\n {name: 'Arkansas', abbreviation: 'AR'},\n {name: 'California', abbreviation: 'CA'},\n {name: 'Colorado', abbreviation: 'CO'},\n {name: 'Connecticut', abbreviation: 'CT'},\n {name: 'Delaware', abbreviation: 'DE'},\n {name: 'District of Columbia', abbreviation: 'DC'},\n {name: 'Florida', abbreviation: 'FL'},\n {name: 'Georgia', abbreviation: 'GA'},\n {name: 'Hawaii', abbreviation: 'HI'},\n {name: 'Idaho', abbreviation: 'ID'},\n {name: 'Illinois', abbreviation: 'IL'},\n {name: 'Indiana', abbreviation: 'IN'},\n {name: 'Iowa', abbreviation: 'IA'},\n {name: 'Kansas', abbreviation: 'KS'},\n {name: 'Kentucky', abbreviation: 'KY'},\n {name: 'Louisiana', abbreviation: 'LA'},\n {name: 'Maine', abbreviation: 'ME'},\n {name: 'Maryland', abbreviation: 'MD'},\n {name: 'Massachusetts', abbreviation: 'MA'},\n {name: 'Michigan', abbreviation: 'MI'},\n {name: 'Minnesota', abbreviation: 'MN'},\n {name: 'Mississippi', abbreviation: 'MS'},\n {name: 'Missouri', abbreviation: 'MO'},\n {name: 'Montana', abbreviation: 'MT'},\n {name: 'Nebraska', abbreviation: 'NE'},\n {name: 'Nevada', abbreviation: 'NV'},\n {name: 'New Hampshire', abbreviation: 'NH'},\n {name: 'New Jersey', abbreviation: 'NJ'},\n {name: 'New Mexico', abbreviation: 'NM'},\n {name: 'New York', abbreviation: 'NY'},\n {name: 'North Carolina', abbreviation: 'NC'},\n {name: 'North Dakota', abbreviation: 'ND'},\n {name: 'Ohio', abbreviation: 'OH'},\n {name: 'Oklahoma', abbreviation: 'OK'},\n {name: 'Oregon', abbreviation: 'OR'},\n {name: 'Pennsylvania', abbreviation: 'PA'},\n {name: 'Rhode Island', abbreviation: 'RI'},\n {name: 'South Carolina', abbreviation: 'SC'},\n {name: 'South Dakota', abbreviation: 'SD'},\n {name: 'Tennessee', abbreviation: 'TN'},\n {name: 'Texas', abbreviation: 'TX'},\n {name: 'Utah', abbreviation: 'UT'},\n {name: 'Vermont', abbreviation: 'VT'},\n {name: 'Virginia', abbreviation: 'VA'},\n {name: 'Washington', abbreviation: 'WA'},\n {name: 'West Virginia', abbreviation: 'WV'},\n {name: 'Wisconsin', abbreviation: 'WI'},\n {name: 'Wyoming', abbreviation: 'WY'}\n ],\n\n territories: [\n {name: 'American Samoa', abbreviation: 'AS'},\n {name: 'Federated States of Micronesia', abbreviation: 'FM'},\n {name: 'Guam', abbreviation: 'GU'},\n {name: 'Marshall Islands', abbreviation: 'MH'},\n {name: 'Northern Mariana Islands', abbreviation: 'MP'},\n {name: 'Puerto Rico', abbreviation: 'PR'},\n {name: 'Virgin Islands, U.S.', abbreviation: 'VI'}\n ],\n\n armed_forces: [\n {name: 'Armed Forces Europe', abbreviation: 'AE'},\n {name: 'Armed Forces Pacific', abbreviation: 'AP'},\n {name: 'Armed Forces the Americas', abbreviation: 'AA'}\n ],\n\n country_regions: {\n it: [\n { name: \"Valle d'Aosta\", abbreviation: \"VDA\" },\n { name: \"Piemonte\", abbreviation: \"PIE\" },\n { name: \"Lombardia\", abbreviation: \"LOM\" },\n { name: \"Veneto\", abbreviation: \"VEN\" },\n { name: \"Trentino Alto Adige\", abbreviation: \"TAA\" },\n { name: \"Friuli Venezia Giulia\", abbreviation: \"FVG\" },\n { name: \"Liguria\", abbreviation: \"LIG\" },\n { name: \"Emilia Romagna\", abbreviation: \"EMR\" },\n { name: \"Toscana\", abbreviation: \"TOS\" },\n { name: \"Umbria\", abbreviation: \"UMB\" },\n { name: \"Marche\", abbreviation: \"MAR\" },\n { name: \"Abruzzo\", abbreviation: \"ABR\" },\n { name: \"Lazio\", abbreviation: \"LAZ\" },\n { name: \"Campania\", abbreviation: \"CAM\" },\n { name: \"Puglia\", abbreviation: \"PUG\" },\n { name: \"Basilicata\", abbreviation: \"BAS\" },\n { name: \"Molise\", abbreviation: \"MOL\" },\n { name: \"Calabria\", abbreviation: \"CAL\" },\n { name: \"Sicilia\", abbreviation: \"SIC\" },\n { name: \"Sardegna\", abbreviation: \"SAR\" }\n ],\n mx: [\n { name: 'Aguascalientes', abbreviation: 'AGU' },\n { name: 'Baja California', abbreviation: 'BCN' },\n { name: 'Baja California Sur', abbreviation: 'BCS' },\n { name: 'Campeche', abbreviation: 'CAM' },\n { name: 'Chiapas', abbreviation: 'CHP' },\n { name: 'Chihuahua', abbreviation: 'CHH' },\n { name: 'Ciudad de México', abbreviation: 'DIF' },\n { name: 'Coahuila', abbreviation: 'COA' },\n { name: 'Colima', abbreviation: 'COL' },\n { name: 'Durango', abbreviation: 'DUR' },\n { name: 'Guanajuato', abbreviation: 'GUA' },\n { name: 'Guerrero', abbreviation: 'GRO' },\n { name: 'Hidalgo', abbreviation: 'HID' },\n { name: 'Jalisco', abbreviation: 'JAL' },\n { name: 'México', abbreviation: 'MEX' },\n { name: 'Michoacán', abbreviation: 'MIC' },\n { name: 'Morelos', abbreviation: 'MOR' },\n { name: 'Nayarit', abbreviation: 'NAY' },\n { name: 'Nuevo León', abbreviation: 'NLE' },\n { name: 'Oaxaca', abbreviation: 'OAX' },\n { name: 'Puebla', abbreviation: 'PUE' },\n { name: 'Querétaro', abbreviation: 'QUE' },\n { name: 'Quintana Roo', abbreviation: 'ROO' },\n { name: 'San Luis Potosí', abbreviation: 'SLP' },\n { name: 'Sinaloa', abbreviation: 'SIN' },\n { name: 'Sonora', abbreviation: 'SON' },\n { name: 'Tabasco', abbreviation: 'TAB' },\n { name: 'Tamaulipas', abbreviation: 'TAM' },\n { name: 'Tlaxcala', abbreviation: 'TLA' },\n { name: 'Veracruz', abbreviation: 'VER' },\n { name: 'Yucatán', abbreviation: 'YUC' },\n { name: 'Zacatecas', abbreviation: 'ZAC' }\n ]\n },\n\n street_suffixes: {\n 'us': [\n {name: 'Avenue', abbreviation: 'Ave'},\n {name: 'Boulevard', abbreviation: 'Blvd'},\n {name: 'Center', abbreviation: 'Ctr'},\n {name: 'Circle', abbreviation: 'Cir'},\n {name: 'Court', abbreviation: 'Ct'},\n {name: 'Drive', abbreviation: 'Dr'},\n {name: 'Extension', abbreviation: 'Ext'},\n {name: 'Glen', abbreviation: 'Gln'},\n {name: 'Grove', abbreviation: 'Grv'},\n {name: 'Heights', abbreviation: 'Hts'},\n {name: 'Highway', abbreviation: 'Hwy'},\n {name: 'Junction', abbreviation: 'Jct'},\n {name: 'Key', abbreviation: 'Key'},\n {name: 'Lane', abbreviation: 'Ln'},\n {name: 'Loop', abbreviation: 'Loop'},\n {name: 'Manor', abbreviation: 'Mnr'},\n {name: 'Mill', abbreviation: 'Mill'},\n {name: 'Park', abbreviation: 'Park'},\n {name: 'Parkway', abbreviation: 'Pkwy'},\n {name: 'Pass', abbreviation: 'Pass'},\n {name: 'Path', abbreviation: 'Path'},\n {name: 'Pike', abbreviation: 'Pike'},\n {name: 'Place', abbreviation: 'Pl'},\n {name: 'Plaza', abbreviation: 'Plz'},\n {name: 'Point', abbreviation: 'Pt'},\n {name: 'Ridge', abbreviation: 'Rdg'},\n {name: 'River', abbreviation: 'Riv'},\n {name: 'Road', abbreviation: 'Rd'},\n {name: 'Square', abbreviation: 'Sq'},\n {name: 'Street', abbreviation: 'St'},\n {name: 'Terrace', abbreviation: 'Ter'},\n {name: 'Trail', abbreviation: 'Trl'},\n {name: 'Turnpike', abbreviation: 'Tpke'},\n {name: 'View', abbreviation: 'Vw'},\n {name: 'Way', abbreviation: 'Way'}\n ],\n 'it': [\n { name: 'Accesso', abbreviation: 'Acc.' },\n { name: 'Alzaia', abbreviation: 'Alz.' },\n { name: 'Arco', abbreviation: 'Arco' },\n { name: 'Archivolto', abbreviation: 'Acv.' },\n { name: 'Arena', abbreviation: 'Arena' },\n { name: 'Argine', abbreviation: 'Argine' },\n { name: 'Bacino', abbreviation: 'Bacino' },\n { name: 'Banchi', abbreviation: 'Banchi' },\n { name: 'Banchina', abbreviation: 'Ban.' },\n { name: 'Bastioni', abbreviation: 'Bas.' },\n { name: 'Belvedere', abbreviation: 'Belv.' },\n { name: 'Borgata', abbreviation: 'B.ta' },\n { name: 'Borgo', abbreviation: 'B.go' },\n { name: 'Calata', abbreviation: 'Cal.' },\n { name: 'Calle', abbreviation: 'Calle' },\n { name: 'Campiello', abbreviation: 'Cam.' },\n { name: 'Campo', abbreviation: 'Cam.' },\n { name: 'Canale', abbreviation: 'Can.' },\n { name: 'Carraia', abbreviation: 'Carr.' },\n { name: 'Cascina', abbreviation: 'Cascina' },\n { name: 'Case sparse', abbreviation: 'c.s.' },\n { name: 'Cavalcavia', abbreviation: 'Cv.' },\n { name: 'Circonvallazione', abbreviation: 'Cv.' },\n { name: 'Complanare', abbreviation: 'C.re' },\n { name: 'Contrada', abbreviation: 'C.da' },\n { name: 'Corso', abbreviation: 'C.so' },\n { name: 'Corte', abbreviation: 'C.te' },\n { name: 'Cortile', abbreviation: 'C.le' },\n { name: 'Diramazione', abbreviation: 'Dir.' },\n { name: 'Fondaco', abbreviation: 'F.co' },\n { name: 'Fondamenta', abbreviation: 'F.ta' },\n { name: 'Fondo', abbreviation: 'F.do' },\n { name: 'Frazione', abbreviation: 'Fr.' },\n { name: 'Isola', abbreviation: 'Is.' },\n { name: 'Largo', abbreviation: 'L.go' },\n { name: 'Litoranea', abbreviation: 'Lit.' },\n { name: 'Lungolago', abbreviation: 'L.go lago' },\n { name: 'Lungo Po', abbreviation: 'l.go Po' },\n { name: 'Molo', abbreviation: 'Molo' },\n { name: 'Mura', abbreviation: 'Mura' },\n { name: 'Passaggio privato', abbreviation: 'pass. priv.' },\n { name: 'Passeggiata', abbreviation: 'Pass.' },\n { name: 'Piazza', abbreviation: 'P.zza' },\n { name: 'Piazzale', abbreviation: 'P.le' },\n { name: 'Ponte', abbreviation: 'P.te' },\n { name: 'Portico', abbreviation: 'P.co' },\n { name: 'Rampa', abbreviation: 'Rampa' },\n { name: 'Regione', abbreviation: 'Reg.' },\n { name: 'Rione', abbreviation: 'R.ne' },\n { name: 'Rio', abbreviation: 'Rio' },\n { name: 'Ripa', abbreviation: 'Ripa' },\n { name: 'Riva', abbreviation: 'Riva' },\n { name: 'Rondò', abbreviation: 'Rondò' },\n { name: 'Rotonda', abbreviation: 'Rot.' },\n { name: 'Sagrato', abbreviation: 'Sagr.' },\n { name: 'Salita', abbreviation: 'Sal.' },\n { name: 'Scalinata', abbreviation: 'Scal.' },\n { name: 'Scalone', abbreviation: 'Scal.' },\n { name: 'Slargo', abbreviation: 'Sl.' },\n { name: 'Sottoportico', abbreviation: 'Sott.' },\n { name: 'Strada', abbreviation: 'Str.' },\n { name: 'Stradale', abbreviation: 'Str.le' },\n { name: 'Strettoia', abbreviation: 'Strett.' },\n { name: 'Traversa', abbreviation: 'Trav.' },\n { name: 'Via', abbreviation: 'V.' },\n { name: 'Viale', abbreviation: 'V.le' },\n { name: 'Vicinale', abbreviation: 'Vic.le' },\n { name: 'Vicolo', abbreviation: 'Vic.' }\n ],\n 'uk' : [\n {name: 'Avenue', abbreviation: 'Ave'},\n {name: 'Close', abbreviation: 'Cl'},\n {name: 'Court', abbreviation: 'Ct'},\n {name: 'Crescent', abbreviation: 'Cr'},\n {name: 'Drive', abbreviation: 'Dr'},\n {name: 'Garden', abbreviation: 'Gdn'},\n {name: 'Gardens', abbreviation: 'Gdns'},\n {name: 'Green', abbreviation: 'Gn'},\n {name: 'Grove', abbreviation: 'Gr'},\n {name: 'Lane', abbreviation: 'Ln'},\n {name: 'Mount', abbreviation: 'Mt'},\n {name: 'Place', abbreviation: 'Pl'},\n {name: 'Park', abbreviation: 'Pk'},\n {name: 'Ridge', abbreviation: 'Rdg'},\n {name: 'Road', abbreviation: 'Rd'},\n {name: 'Square', abbreviation: 'Sq'},\n {name: 'Street', abbreviation: 'St'},\n {name: 'Terrace', abbreviation: 'Ter'},\n {name: 'Valley', abbreviation: 'Val'}\n ]\n },\n\n months: [\n {name: 'January', short_name: 'Jan', numeric: '01', days: 31},\n // Not messing with leap years...\n {name: 'February', short_name: 'Feb', numeric: '02', days: 28},\n {name: 'March', short_name: 'Mar', numeric: '03', days: 31},\n {name: 'April', short_name: 'Apr', numeric: '04', days: 30},\n {name: 'May', short_name: 'May', numeric: '05', days: 31},\n {name: 'June', short_name: 'Jun', numeric: '06', days: 30},\n {name: 'July', short_name: 'Jul', numeric: '07', days: 31},\n {name: 'August', short_name: 'Aug', numeric: '08', days: 31},\n {name: 'September', short_name: 'Sep', numeric: '09', days: 30},\n {name: 'October', short_name: 'Oct', numeric: '10', days: 31},\n {name: 'November', short_name: 'Nov', numeric: '11', days: 30},\n {name: 'December', short_name: 'Dec', numeric: '12', days: 31}\n ],\n\n // http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\n cc_types: [\n {name: \"American Express\", short_name: 'amex', prefix: '34', length: 15},\n {name: \"Bankcard\", short_name: 'bankcard', prefix: '5610', length: 16},\n {name: \"China UnionPay\", short_name: 'chinaunion', prefix: '62', length: 16},\n {name: \"Diners Club Carte Blanche\", short_name: 'dccarte', prefix: '300', length: 14},\n {name: \"Diners Club enRoute\", short_name: 'dcenroute', prefix: '2014', length: 15},\n {name: \"Diners Club International\", short_name: 'dcintl', prefix: '36', length: 14},\n {name: \"Diners Club United States & Canada\", short_name: 'dcusc', prefix: '54', length: 16},\n {name: \"Discover Card\", short_name: 'discover', prefix: '6011', length: 16},\n {name: \"InstaPayment\", short_name: 'instapay', prefix: '637', length: 16},\n {name: \"JCB\", short_name: 'jcb', prefix: '3528', length: 16},\n {name: \"Laser\", short_name: 'laser', prefix: '6304', length: 16},\n {name: \"Maestro\", short_name: 'maestro', prefix: '5018', length: 16},\n {name: \"Mastercard\", short_name: 'mc', prefix: '51', length: 16},\n {name: \"Solo\", short_name: 'solo', prefix: '6334', length: 16},\n {name: \"Switch\", short_name: 'switch', prefix: '4903', length: 16},\n {name: \"Visa\", short_name: 'visa', prefix: '4', length: 16},\n {name: \"Visa Electron\", short_name: 'electron', prefix: '4026', length: 16}\n ],\n\n //return all world currency by ISO 4217\n currency_types: [\n {'code' : 'AED', 'name' : 'United Arab Emirates Dirham'},\n {'code' : 'AFN', 'name' : 'Afghanistan Afghani'},\n {'code' : 'ALL', 'name' : 'Albania Lek'},\n {'code' : 'AMD', 'name' : 'Armenia Dram'},\n {'code' : 'ANG', 'name' : 'Netherlands Antilles Guilder'},\n {'code' : 'AOA', 'name' : 'Angola Kwanza'},\n {'code' : 'ARS', 'name' : 'Argentina Peso'},\n {'code' : 'AUD', 'name' : 'Australia Dollar'},\n {'code' : 'AWG', 'name' : 'Aruba Guilder'},\n {'code' : 'AZN', 'name' : 'Azerbaijan New Manat'},\n {'code' : 'BAM', 'name' : 'Bosnia and Herzegovina Convertible Marka'},\n {'code' : 'BBD', 'name' : 'Barbados Dollar'},\n {'code' : 'BDT', 'name' : 'Bangladesh Taka'},\n {'code' : 'BGN', 'name' : 'Bulgaria Lev'},\n {'code' : 'BHD', 'name' : 'Bahrain Dinar'},\n {'code' : 'BIF', 'name' : 'Burundi Franc'},\n {'code' : 'BMD', 'name' : 'Bermuda Dollar'},\n {'code' : 'BND', 'name' : 'Brunei Darussalam Dollar'},\n {'code' : 'BOB', 'name' : 'Bolivia Boliviano'},\n {'code' : 'BRL', 'name' : 'Brazil Real'},\n {'code' : 'BSD', 'name' : 'Bahamas Dollar'},\n {'code' : 'BTN', 'name' : 'Bhutan Ngultrum'},\n {'code' : 'BWP', 'name' : 'Botswana Pula'},\n {'code' : 'BYR', 'name' : 'Belarus Ruble'},\n {'code' : 'BZD', 'name' : 'Belize Dollar'},\n {'code' : 'CAD', 'name' : 'Canada Dollar'},\n {'code' : 'CDF', 'name' : 'Congo/Kinshasa Franc'},\n {'code' : 'CHF', 'name' : 'Switzerland Franc'},\n {'code' : 'CLP', 'name' : 'Chile Peso'},\n {'code' : 'CNY', 'name' : 'China Yuan Renminbi'},\n {'code' : 'COP', 'name' : 'Colombia Peso'},\n {'code' : 'CRC', 'name' : 'Costa Rica Colon'},\n {'code' : 'CUC', 'name' : 'Cuba Convertible Peso'},\n {'code' : 'CUP', 'name' : 'Cuba Peso'},\n {'code' : 'CVE', 'name' : 'Cape Verde Escudo'},\n {'code' : 'CZK', 'name' : 'Czech Republic Koruna'},\n {'code' : 'DJF', 'name' : 'Djibouti Franc'},\n {'code' : 'DKK', 'name' : 'Denmark Krone'},\n {'code' : 'DOP', 'name' : 'Dominican Republic Peso'},\n {'code' : 'DZD', 'name' : 'Algeria Dinar'},\n {'code' : 'EGP', 'name' : 'Egypt Pound'},\n {'code' : 'ERN', 'name' : 'Eritrea Nakfa'},\n {'code' : 'ETB', 'name' : 'Ethiopia Birr'},\n {'code' : 'EUR', 'name' : 'Euro Member Countries'},\n {'code' : 'FJD', 'name' : 'Fiji Dollar'},\n {'code' : 'FKP', 'name' : 'Falkland Islands (Malvinas) Pound'},\n {'code' : 'GBP', 'name' : 'United Kingdom Pound'},\n {'code' : 'GEL', 'name' : 'Georgia Lari'},\n {'code' : 'GGP', 'name' : 'Guernsey Pound'},\n {'code' : 'GHS', 'name' : 'Ghana Cedi'},\n {'code' : 'GIP', 'name' : 'Gibraltar Pound'},\n {'code' : 'GMD', 'name' : 'Gambia Dalasi'},\n {'code' : 'GNF', 'name' : 'Guinea Franc'},\n {'code' : 'GTQ', 'name' : 'Guatemala Quetzal'},\n {'code' : 'GYD', 'name' : 'Guyana Dollar'},\n {'code' : 'HKD', 'name' : 'Hong Kong Dollar'},\n {'code' : 'HNL', 'name' : 'Honduras Lempira'},\n {'code' : 'HRK', 'name' : 'Croatia Kuna'},\n {'code' : 'HTG', 'name' : 'Haiti Gourde'},\n {'code' : 'HUF', 'name' : 'Hungary Forint'},\n {'code' : 'IDR', 'name' : 'Indonesia Rupiah'},\n {'code' : 'ILS', 'name' : 'Israel Shekel'},\n {'code' : 'IMP', 'name' : 'Isle of Man Pound'},\n {'code' : 'INR', 'name' : 'India Rupee'},\n {'code' : 'IQD', 'name' : 'Iraq Dinar'},\n {'code' : 'IRR', 'name' : 'Iran Rial'},\n {'code' : 'ISK', 'name' : 'Iceland Krona'},\n {'code' : 'JEP', 'name' : 'Jersey Pound'},\n {'code' : 'JMD', 'name' : 'Jamaica Dollar'},\n {'code' : 'JOD', 'name' : 'Jordan Dinar'},\n {'code' : 'JPY', 'name' : 'Japan Yen'},\n {'code' : 'KES', 'name' : 'Kenya Shilling'},\n {'code' : 'KGS', 'name' : 'Kyrgyzstan Som'},\n {'code' : 'KHR', 'name' : 'Cambodia Riel'},\n {'code' : 'KMF', 'name' : 'Comoros Franc'},\n {'code' : 'KPW', 'name' : 'Korea (North) Won'},\n {'code' : 'KRW', 'name' : 'Korea (South) Won'},\n {'code' : 'KWD', 'name' : 'Kuwait Dinar'},\n {'code' : 'KYD', 'name' : 'Cayman Islands Dollar'},\n {'code' : 'KZT', 'name' : 'Kazakhstan Tenge'},\n {'code' : 'LAK', 'name' : 'Laos Kip'},\n {'code' : 'LBP', 'name' : 'Lebanon Pound'},\n {'code' : 'LKR', 'name' : 'Sri Lanka Rupee'},\n {'code' : 'LRD', 'name' : 'Liberia Dollar'},\n {'code' : 'LSL', 'name' : 'Lesotho Loti'},\n {'code' : 'LTL', 'name' : 'Lithuania Litas'},\n {'code' : 'LYD', 'name' : 'Libya Dinar'},\n {'code' : 'MAD', 'name' : 'Morocco Dirham'},\n {'code' : 'MDL', 'name' : 'Moldova Leu'},\n {'code' : 'MGA', 'name' : 'Madagascar Ariary'},\n {'code' : 'MKD', 'name' : 'Macedonia Denar'},\n {'code' : 'MMK', 'name' : 'Myanmar (Burma) Kyat'},\n {'code' : 'MNT', 'name' : 'Mongolia Tughrik'},\n {'code' : 'MOP', 'name' : 'Macau Pataca'},\n {'code' : 'MRO', 'name' : 'Mauritania Ouguiya'},\n {'code' : 'MUR', 'name' : 'Mauritius Rupee'},\n {'code' : 'MVR', 'name' : 'Maldives (Maldive Islands) Rufiyaa'},\n {'code' : 'MWK', 'name' : 'Malawi Kwacha'},\n {'code' : 'MXN', 'name' : 'Mexico Peso'},\n {'code' : 'MYR', 'name' : 'Malaysia Ringgit'},\n {'code' : 'MZN', 'name' : 'Mozambique Metical'},\n {'code' : 'NAD', 'name' : 'Namibia Dollar'},\n {'code' : 'NGN', 'name' : 'Nigeria Naira'},\n {'code' : 'NIO', 'name' : 'Nicaragua Cordoba'},\n {'code' : 'NOK', 'name' : 'Norway Krone'},\n {'code' : 'NPR', 'name' : 'Nepal Rupee'},\n {'code' : 'NZD', 'name' : 'New Zealand Dollar'},\n {'code' : 'OMR', 'name' : 'Oman Rial'},\n {'code' : 'PAB', 'name' : 'Panama Balboa'},\n {'code' : 'PEN', 'name' : 'Peru Nuevo Sol'},\n {'code' : 'PGK', 'name' : 'Papua New Guinea Kina'},\n {'code' : 'PHP', 'name' : 'Philippines Peso'},\n {'code' : 'PKR', 'name' : 'Pakistan Rupee'},\n {'code' : 'PLN', 'name' : 'Poland Zloty'},\n {'code' : 'PYG', 'name' : 'Paraguay Guarani'},\n {'code' : 'QAR', 'name' : 'Qatar Riyal'},\n {'code' : 'RON', 'name' : 'Romania New Leu'},\n {'code' : 'RSD', 'name' : 'Serbia Dinar'},\n {'code' : 'RUB', 'name' : 'Russia Ruble'},\n {'code' : 'RWF', 'name' : 'Rwanda Franc'},\n {'code' : 'SAR', 'name' : 'Saudi Arabia Riyal'},\n {'code' : 'SBD', 'name' : 'Solomon Islands Dollar'},\n {'code' : 'SCR', 'name' : 'Seychelles Rupee'},\n {'code' : 'SDG', 'name' : 'Sudan Pound'},\n {'code' : 'SEK', 'name' : 'Sweden Krona'},\n {'code' : 'SGD', 'name' : 'Singapore Dollar'},\n {'code' : 'SHP', 'name' : 'Saint Helena Pound'},\n {'code' : 'SLL', 'name' : 'Sierra Leone Leone'},\n {'code' : 'SOS', 'name' : 'Somalia Shilling'},\n {'code' : 'SPL', 'name' : 'Seborga Luigino'},\n {'code' : 'SRD', 'name' : 'Suriname Dollar'},\n {'code' : 'STD', 'name' : 'São Tomé and Príncipe Dobra'},\n {'code' : 'SVC', 'name' : 'El Salvador Colon'},\n {'code' : 'SYP', 'name' : 'Syria Pound'},\n {'code' : 'SZL', 'name' : 'Swaziland Lilangeni'},\n {'code' : 'THB', 'name' : 'Thailand Baht'},\n {'code' : 'TJS', 'name' : 'Tajikistan Somoni'},\n {'code' : 'TMT', 'name' : 'Turkmenistan Manat'},\n {'code' : 'TND', 'name' : 'Tunisia Dinar'},\n {'code' : 'TOP', 'name' : 'Tonga Pa\\'anga'},\n {'code' : 'TRY', 'name' : 'Turkey Lira'},\n {'code' : 'TTD', 'name' : 'Trinidad and Tobago Dollar'},\n {'code' : 'TVD', 'name' : 'Tuvalu Dollar'},\n {'code' : 'TWD', 'name' : 'Taiwan New Dollar'},\n {'code' : 'TZS', 'name' : 'Tanzania Shilling'},\n {'code' : 'UAH', 'name' : 'Ukraine Hryvnia'},\n {'code' : 'UGX', 'name' : 'Uganda Shilling'},\n {'code' : 'USD', 'name' : 'United States Dollar'},\n {'code' : 'UYU', 'name' : 'Uruguay Peso'},\n {'code' : 'UZS', 'name' : 'Uzbekistan Som'},\n {'code' : 'VEF', 'name' : 'Venezuela Bolivar'},\n {'code' : 'VND', 'name' : 'Viet Nam Dong'},\n {'code' : 'VUV', 'name' : 'Vanuatu Vatu'},\n {'code' : 'WST', 'name' : 'Samoa Tala'},\n {'code' : 'XAF', 'name' : 'Communauté Financière Africaine (BEAC) CFA Franc BEAC'},\n {'code' : 'XCD', 'name' : 'East Caribbean Dollar'},\n {'code' : 'XDR', 'name' : 'International Monetary Fund (IMF) Special Drawing Rights'},\n {'code' : 'XOF', 'name' : 'Communauté Financière Africaine (BCEAO) Franc'},\n {'code' : 'XPF', 'name' : 'Comptoirs Français du Pacifique (CFP) Franc'},\n {'code' : 'YER', 'name' : 'Yemen Rial'},\n {'code' : 'ZAR', 'name' : 'South Africa Rand'},\n {'code' : 'ZMW', 'name' : 'Zambia Kwacha'},\n {'code' : 'ZWD', 'name' : 'Zimbabwe Dollar'}\n ],\n\n // return the names of all valide colors\n colorNames : [ \"AliceBlue\", \"Black\", \"Navy\", \"DarkBlue\", \"MediumBlue\", \"Blue\", \"DarkGreen\", \"Green\", \"Teal\", \"DarkCyan\", \"DeepSkyBlue\", \"DarkTurquoise\", \"MediumSpringGreen\", \"Lime\", \"SpringGreen\",\n \"Aqua\", \"Cyan\", \"MidnightBlue\", \"DodgerBlue\", \"LightSeaGreen\", \"ForestGreen\", \"SeaGreen\", \"DarkSlateGray\", \"LimeGreen\", \"MediumSeaGreen\", \"Turquoise\", \"RoyalBlue\", \"SteelBlue\", \"DarkSlateBlue\", \"MediumTurquoise\",\n \"Indigo\", \"DarkOliveGreen\", \"CadetBlue\", \"CornflowerBlue\", \"RebeccaPurple\", \"MediumAquaMarine\", \"DimGray\", \"SlateBlue\", \"OliveDrab\", \"SlateGray\", \"LightSlateGray\", \"MediumSlateBlue\", \"LawnGreen\", \"Chartreuse\",\n \"Aquamarine\", \"Maroon\", \"Purple\", \"Olive\", \"Gray\", \"SkyBlue\", \"LightSkyBlue\", \"BlueViolet\", \"DarkRed\", \"DarkMagenta\", \"SaddleBrown\", \"Ivory\", \"White\",\n \"DarkSeaGreen\", \"LightGreen\", \"MediumPurple\", \"DarkViolet\", \"PaleGreen\", \"DarkOrchid\", \"YellowGreen\", \"Sienna\", \"Brown\", \"DarkGray\", \"LightBlue\", \"GreenYellow\", \"PaleTurquoise\", \"LightSteelBlue\", \"PowderBlue\",\n \"FireBrick\", \"DarkGoldenRod\", \"MediumOrchid\", \"RosyBrown\", \"DarkKhaki\", \"Silver\", \"MediumVioletRed\", \"IndianRed\", \"Peru\", \"Chocolate\", \"Tan\", \"LightGray\", \"Thistle\", \"Orchid\", \"GoldenRod\", \"PaleVioletRed\",\n \"Crimson\", \"Gainsboro\", \"Plum\", \"BurlyWood\", \"LightCyan\", \"Lavender\", \"DarkSalmon\", \"Violet\", \"PaleGoldenRod\", \"LightCoral\", \"Khaki\", \"AliceBlue\", \"HoneyDew\", \"Azure\", \"SandyBrown\", \"Wheat\", \"Beige\", \"WhiteSmoke\",\n \"MintCream\", \"GhostWhite\", \"Salmon\", \"AntiqueWhite\", \"Linen\", \"LightGoldenRodYellow\", \"OldLace\", \"Red\", \"Fuchsia\", \"Magenta\", \"DeepPink\", \"OrangeRed\", \"Tomato\", \"HotPink\", \"Coral\", \"DarkOrange\", \"LightSalmon\", \"Orange\",\n \"LightPink\", \"Pink\", \"Gold\", \"PeachPuff\", \"NavajoWhite\", \"Moccasin\", \"Bisque\", \"MistyRose\", \"BlanchedAlmond\", \"PapayaWhip\", \"LavenderBlush\", \"SeaShell\", \"Cornsilk\", \"LemonChiffon\", \"FloralWhite\", \"Snow\", \"Yellow\", \"LightYellow\"\n ],\n\n // Data taken from https://www.sec.gov/rules/other/4-460list.htm\n company: [ \"3Com Corp\",\n \"3M Company\",\n \"A.G. Edwards Inc.\",\n \"Abbott Laboratories\",\n \"Abercrombie & Fitch Co.\",\n \"ABM Industries Incorporated\",\n \"Ace Hardware Corporation\",\n \"ACT Manufacturing Inc.\",\n \"Acterna Corp.\",\n \"Adams Resources & Energy, Inc.\",\n \"ADC Telecommunications, Inc.\",\n \"Adelphia Communications Corporation\",\n \"Administaff, Inc.\",\n \"Adobe Systems Incorporated\",\n \"Adolph Coors Company\",\n \"Advance Auto Parts, Inc.\",\n \"Advanced Micro Devices, Inc.\",\n \"AdvancePCS, Inc.\",\n \"Advantica Restaurant Group, Inc.\",\n \"The AES Corporation\",\n \"Aetna Inc.\",\n \"Affiliated Computer Services, Inc.\",\n \"AFLAC Incorporated\",\n \"AGCO Corporation\",\n \"Agilent Technologies, Inc.\",\n \"Agway Inc.\",\n \"Apartment Investment and Management Company\",\n \"Air Products and Chemicals, Inc.\",\n \"Airborne, Inc.\",\n \"Airgas, Inc.\",\n \"AK Steel Holding Corporation\",\n \"Alaska Air Group, Inc.\",\n \"Alberto-Culver Company\",\n \"Albertson's, Inc.\",\n \"Alcoa Inc.\",\n \"Alleghany Corporation\",\n \"Allegheny Energy, Inc.\",\n \"Allegheny Technologies Incorporated\",\n \"Allergan, Inc.\",\n \"ALLETE, Inc.\",\n \"Alliant Energy Corporation\",\n \"Allied Waste Industries, Inc.\",\n \"Allmerica Financial Corporation\",\n \"The Allstate Corporation\",\n \"ALLTEL Corporation\",\n \"The Alpine Group, Inc.\",\n \"Amazon.com, Inc.\",\n \"AMC Entertainment Inc.\",\n \"American Power Conversion Corporation\",\n \"Amerada Hess Corporation\",\n \"AMERCO\",\n \"Ameren Corporation\",\n \"America West Holdings Corporation\",\n \"American Axle & Manufacturing Holdings, Inc.\",\n \"American Eagle Outfitters, Inc.\",\n \"American Electric Power Company, Inc.\",\n \"American Express Company\",\n \"American Financial Group, Inc.\",\n \"American Greetings Corporation\",\n \"American International Group, Inc.\",\n \"American Standard Companies Inc.\",\n \"American Water Works Company, Inc.\",\n \"AmerisourceBergen Corporation\",\n \"Ames Department Stores, Inc.\",\n \"Amgen Inc.\",\n \"Amkor Technology, Inc.\",\n \"AMR Corporation\",\n \"AmSouth Bancorp.\",\n \"Amtran, Inc.\",\n \"Anadarko Petroleum Corporation\",\n \"Analog Devices, Inc.\",\n \"Anheuser-Busch Companies, Inc.\",\n \"Anixter International Inc.\",\n \"AnnTaylor Inc.\",\n \"Anthem, Inc.\",\n \"AOL Time Warner Inc.\",\n \"Aon Corporation\",\n \"Apache Corporation\",\n \"Apple Computer, Inc.\",\n \"Applera Corporation\",\n \"Applied Industrial Technologies, Inc.\",\n \"Applied Materials, Inc.\",\n \"Aquila, Inc.\",\n \"ARAMARK Corporation\",\n \"Arch Coal, Inc.\",\n \"Archer Daniels Midland Company\",\n \"Arkansas Best Corporation\",\n \"Armstrong Holdings, Inc.\",\n \"Arrow Electronics, Inc.\",\n \"ArvinMeritor, Inc.\",\n \"Ashland Inc.\",\n \"Astoria Financial Corporation\",\n \"AT&T Corp.\",\n \"Atmel Corporation\",\n \"Atmos Energy Corporation\",\n \"Audiovox Corporation\",\n \"Autoliv, Inc.\",\n \"Automatic Data Processing, Inc.\",\n \"AutoNation, Inc.\",\n \"AutoZone, Inc.\",\n \"Avaya Inc.\",\n \"Avery Dennison Corporation\",\n \"Avista Corporation\",\n \"Avnet, Inc.\",\n \"Avon Products, Inc.\",\n \"Baker Hughes Incorporated\",\n \"Ball Corporation\",\n \"Bank of America Corporation\",\n \"The Bank of New York Company, Inc.\",\n \"Bank One Corporation\",\n \"Banknorth Group, Inc.\",\n \"Banta Corporation\",\n \"Barnes & Noble, Inc.\",\n \"Bausch & Lomb Incorporated\",\n \"Baxter International Inc.\",\n \"BB&T Corporation\",\n \"The Bear Stearns Companies Inc.\",\n \"Beazer Homes USA, Inc.\",\n \"Beckman Coulter, Inc.\",\n \"Becton, Dickinson and Company\",\n \"Bed Bath & Beyond Inc.\",\n \"Belk, Inc.\",\n \"Bell Microproducts Inc.\",\n \"BellSouth Corporation\",\n \"Belo Corp.\",\n \"Bemis Company, Inc.\",\n \"Benchmark Electronics, Inc.\",\n \"Berkshire Hathaway Inc.\",\n \"Best Buy Co., Inc.\",\n \"Bethlehem Steel Corporation\",\n \"Beverly Enterprises, Inc.\",\n \"Big Lots, Inc.\",\n \"BJ Services Company\",\n \"BJ's Wholesale Club, Inc.\",\n \"The Black & Decker Corporation\",\n \"Black Hills Corporation\",\n \"BMC Software, Inc.\",\n \"The Boeing Company\",\n \"Boise Cascade Corporation\",\n \"Borders Group, Inc.\",\n \"BorgWarner Inc.\",\n \"Boston Scientific Corporation\",\n \"Bowater Incorporated\",\n \"Briggs & Stratton Corporation\",\n \"Brightpoint, Inc.\",\n \"Brinker International, Inc.\",\n \"Bristol-Myers Squibb Company\",\n \"Broadwing, Inc.\",\n \"Brown Shoe Company, Inc.\",\n \"Brown-Forman Corporation\",\n \"Brunswick Corporation\",\n \"Budget Group, Inc.\",\n \"Burlington Coat Factory Warehouse Corporation\",\n \"Burlington Industries, Inc.\",\n \"Burlington Northern Santa Fe Corporation\",\n \"Burlington Resources Inc.\",\n \"C. H. Robinson Worldwide Inc.\",\n \"Cablevision Systems Corp\",\n \"Cabot Corp\",\n \"Cadence Design Systems, Inc.\",\n \"Calpine Corp.\",\n \"Campbell Soup Co.\",\n \"Capital One Financial Corp.\",\n \"Cardinal Health Inc.\",\n \"Caremark Rx Inc.\",\n \"Carlisle Cos. Inc.\",\n \"Carpenter Technology Corp.\",\n \"Casey's General Stores Inc.\",\n \"Caterpillar Inc.\",\n \"CBRL Group Inc.\",\n \"CDI Corp.\",\n \"CDW Computer Centers Inc.\",\n \"CellStar Corp.\",\n \"Cendant Corp\",\n \"Cenex Harvest States Cooperatives\",\n \"Centex Corp.\",\n \"CenturyTel Inc.\",\n \"Ceridian Corp.\",\n \"CH2M Hill Cos. Ltd.\",\n \"Champion Enterprises Inc.\",\n \"Charles Schwab Corp.\",\n \"Charming Shoppes Inc.\",\n \"Charter Communications Inc.\",\n \"Charter One Financial Inc.\",\n \"ChevronTexaco Corp.\",\n \"Chiquita Brands International Inc.\",\n \"Chubb Corp\",\n \"Ciena Corp.\",\n \"Cigna Corp\",\n \"Cincinnati Financial Corp.\",\n \"Cinergy Corp.\",\n \"Cintas Corp.\",\n \"Circuit City Stores Inc.\",\n \"Cisco Systems Inc.\",\n \"Citigroup, Inc\",\n \"Citizens Communications Co.\",\n \"CKE Restaurants Inc.\",\n \"Clear Channel Communications Inc.\",\n \"The Clorox Co.\",\n \"CMGI Inc.\",\n \"CMS Energy Corp.\",\n \"CNF Inc.\",\n \"Coca-Cola Co.\",\n \"Coca-Cola Enterprises Inc.\",\n \"Colgate-Palmolive Co.\",\n \"Collins & Aikman Corp.\",\n \"Comcast Corp.\",\n \"Comdisco Inc.\",\n \"Comerica Inc.\",\n \"Comfort Systems USA Inc.\",\n \"Commercial Metals Co.\",\n \"Community Health Systems Inc.\",\n \"Compass Bancshares Inc\",\n \"Computer Associates International Inc.\",\n \"Computer Sciences Corp.\",\n \"Compuware Corp.\",\n \"Comverse Technology Inc.\",\n \"ConAgra Foods Inc.\",\n \"Concord EFS Inc.\",\n \"Conectiv, Inc\",\n \"Conoco Inc\",\n \"Conseco Inc.\",\n \"Consolidated Freightways Corp.\",\n \"Consolidated Edison Inc.\",\n \"Constellation Brands Inc.\",\n \"Constellation Emergy Group Inc.\",\n \"Continental Airlines Inc.\",\n \"Convergys Corp.\",\n \"Cooper Cameron Corp.\",\n \"Cooper Industries Ltd.\",\n \"Cooper Tire & Rubber Co.\",\n \"Corn Products International Inc.\",\n \"Corning Inc.\",\n \"Costco Wholesale Corp.\",\n \"Countrywide Credit Industries Inc.\",\n \"Coventry Health Care Inc.\",\n \"Cox Communications Inc.\",\n \"Crane Co.\",\n \"Crompton Corp.\",\n \"Crown Cork & Seal Co. Inc.\",\n \"CSK Auto Corp.\",\n \"CSX Corp.\",\n \"Cummins Inc.\",\n \"CVS Corp.\",\n \"Cytec Industries Inc.\",\n \"D&K Healthcare Resources, Inc.\",\n \"D.R. Horton Inc.\",\n \"Dana Corporation\",\n \"Danaher Corporation\",\n \"Darden Restaurants Inc.\",\n \"DaVita Inc.\",\n \"Dean Foods Company\",\n \"Deere & Company\",\n \"Del Monte Foods Co\",\n \"Dell Computer Corporation\",\n \"Delphi Corp.\",\n \"Delta Air Lines Inc.\",\n \"Deluxe Corporation\",\n \"Devon Energy Corporation\",\n \"Di Giorgio Corporation\",\n \"Dial Corporation\",\n \"Diebold Incorporated\",\n \"Dillard's Inc.\",\n \"DIMON Incorporated\",\n \"Dole Food Company, Inc.\",\n \"Dollar General Corporation\",\n \"Dollar Tree Stores, Inc.\",\n \"Dominion Resources, Inc.\",\n \"Domino's Pizza LLC\",\n \"Dover Corporation, Inc.\",\n \"Dow Chemical Company\",\n \"Dow Jones & Company, Inc.\",\n \"DPL Inc.\",\n \"DQE Inc.\",\n \"Dreyer's Grand Ice Cream, Inc.\",\n \"DST Systems, Inc.\",\n \"DTE Energy Co.\",\n \"E.I. Du Pont de Nemours and Company\",\n \"Duke Energy Corp\",\n \"Dun & Bradstreet Inc.\",\n \"DURA Automotive Systems Inc.\",\n \"DynCorp\",\n \"Dynegy Inc.\",\n \"E*Trade Group, Inc.\",\n \"E.W. Scripps Company\",\n \"Earthlink, Inc.\",\n \"Eastman Chemical Company\",\n \"Eastman Kodak Company\",\n \"Eaton Corporation\",\n \"Echostar Communications Corporation\",\n \"Ecolab Inc.\",\n \"Edison International\",\n \"EGL Inc.\",\n \"El Paso Corporation\",\n \"Electronic Arts Inc.\",\n \"Electronic Data Systems Corp.\",\n \"Eli Lilly and Company\",\n \"EMC Corporation\",\n \"Emcor Group Inc.\",\n \"Emerson Electric Co.\",\n \"Encompass Services Corporation\",\n \"Energizer Holdings Inc.\",\n \"Energy East Corporation\",\n \"Engelhard Corporation\",\n \"Enron Corp.\",\n \"Entergy Corporation\",\n \"Enterprise Products Partners L.P.\",\n \"EOG Resources, Inc.\",\n \"Equifax Inc.\",\n \"Equitable Resources Inc.\",\n \"Equity Office Properties Trust\",\n \"Equity Residential Properties Trust\",\n \"Estee Lauder Companies Inc.\",\n \"Exelon Corporation\",\n \"Exide Technologies\",\n \"Expeditors International of Washington Inc.\",\n \"Express Scripts Inc.\",\n \"ExxonMobil Corporation\",\n \"Fairchild Semiconductor International Inc.\",\n \"Family Dollar Stores Inc.\",\n \"Farmland Industries Inc.\",\n \"Federal Mogul Corp.\",\n \"Federated Department Stores Inc.\",\n \"Federal Express Corp.\",\n \"Felcor Lodging Trust Inc.\",\n \"Ferro Corp.\",\n \"Fidelity National Financial Inc.\",\n \"Fifth Third Bancorp\",\n \"First American Financial Corp.\",\n \"First Data Corp.\",\n \"First National of Nebraska Inc.\",\n \"First Tennessee National Corp.\",\n \"FirstEnergy Corp.\",\n \"Fiserv Inc.\",\n \"Fisher Scientific International Inc.\",\n \"FleetBoston Financial Co.\",\n \"Fleetwood Enterprises Inc.\",\n \"Fleming Companies Inc.\",\n \"Flowers Foods Inc.\",\n \"Flowserv Corp\",\n \"Fluor Corp\",\n \"FMC Corp\",\n \"Foamex International Inc\",\n \"Foot Locker Inc\",\n \"Footstar Inc.\",\n \"Ford Motor Co\",\n \"Forest Laboratories Inc.\",\n \"Fortune Brands Inc.\",\n \"Foster Wheeler Ltd.\",\n \"FPL Group Inc.\",\n \"Franklin Resources Inc.\",\n \"Freeport McMoran Copper & Gold Inc.\",\n \"Frontier Oil Corp\",\n \"Furniture Brands International Inc.\",\n \"Gannett Co., Inc.\",\n \"Gap Inc.\",\n \"Gateway Inc.\",\n \"GATX Corporation\",\n \"Gemstar-TV Guide International Inc.\",\n \"GenCorp Inc.\",\n \"General Cable Corporation\",\n \"General Dynamics Corporation\",\n \"General Electric Company\",\n \"General Mills Inc\",\n \"General Motors Corporation\",\n \"Genesis Health Ventures Inc.\",\n \"Gentek Inc.\",\n \"Gentiva Health Services Inc.\",\n \"Genuine Parts Company\",\n \"Genuity Inc.\",\n \"Genzyme Corporation\",\n \"Georgia Gulf Corporation\",\n \"Georgia-Pacific Corporation\",\n \"Gillette Company\",\n \"Gold Kist Inc.\",\n \"Golden State Bancorp Inc.\",\n \"Golden West Financial Corporation\",\n \"Goldman Sachs Group Inc.\",\n \"Goodrich Corporation\",\n \"The Goodyear Tire & Rubber Company\",\n \"Granite Construction Incorporated\",\n \"Graybar Electric Company Inc.\",\n \"Great Lakes Chemical Corporation\",\n \"Great Plains Energy Inc.\",\n \"GreenPoint Financial Corp.\",\n \"Greif Bros. Corporation\",\n \"Grey Global Group Inc.\",\n \"Group 1 Automotive Inc.\",\n \"Guidant Corporation\",\n \"H&R Block Inc.\",\n \"H.B. Fuller Company\",\n \"H.J. Heinz Company\",\n \"Halliburton Co.\",\n \"Harley-Davidson Inc.\",\n \"Harman International Industries Inc.\",\n \"Harrah's Entertainment Inc.\",\n \"Harris Corp.\",\n \"Harsco Corp.\",\n \"Hartford Financial Services Group Inc.\",\n \"Hasbro Inc.\",\n \"Hawaiian Electric Industries Inc.\",\n \"HCA Inc.\",\n \"Health Management Associates Inc.\",\n \"Health Net Inc.\",\n \"Healthsouth Corp\",\n \"Henry Schein Inc.\",\n \"Hercules Inc.\",\n \"Herman Miller Inc.\",\n \"Hershey Foods Corp.\",\n \"Hewlett-Packard Company\",\n \"Hibernia Corp.\",\n \"Hillenbrand Industries Inc.\",\n \"Hilton Hotels Corp.\",\n \"Hollywood Entertainment Corp.\",\n \"Home Depot Inc.\",\n \"Hon Industries Inc.\",\n \"Honeywell International Inc.\",\n \"Hormel Foods Corp.\",\n \"Host Marriott Corp.\",\n \"Household International Corp.\",\n \"Hovnanian Enterprises Inc.\",\n \"Hub Group Inc.\",\n \"Hubbell Inc.\",\n \"Hughes Supply Inc.\",\n \"Humana Inc.\",\n \"Huntington Bancshares Inc.\",\n \"Idacorp Inc.\",\n \"IDT Corporation\",\n \"IKON Office Solutions Inc.\",\n \"Illinois Tool Works Inc.\",\n \"IMC Global Inc.\",\n \"Imperial Sugar Company\",\n \"IMS Health Inc.\",\n \"Ingles Market Inc\",\n \"Ingram Micro Inc.\",\n \"Insight Enterprises Inc.\",\n \"Integrated Electrical Services Inc.\",\n \"Intel Corporation\",\n \"International Paper Co.\",\n \"Interpublic Group of Companies Inc.\",\n \"Interstate Bakeries Corporation\",\n \"International Business Machines Corp.\",\n \"International Flavors & Fragrances Inc.\",\n \"International Multifoods Corporation\",\n \"Intuit Inc.\",\n \"IT Group Inc.\",\n \"ITT Industries Inc.\",\n \"Ivax Corp.\",\n \"J.B. Hunt Transport Services Inc.\",\n \"J.C. Penny Co.\",\n \"J.P. Morgan Chase & Co.\",\n \"Jabil Circuit Inc.\",\n \"Jack In The Box Inc.\",\n \"Jacobs Engineering Group Inc.\",\n \"JDS Uniphase Corp.\",\n \"Jefferson-Pilot Co.\",\n \"John Hancock Financial Services Inc.\",\n \"Johnson & Johnson\",\n \"Johnson Controls Inc.\",\n \"Jones Apparel Group Inc.\",\n \"KB Home\",\n \"Kellogg Company\",\n \"Kellwood Company\",\n \"Kelly Services Inc.\",\n \"Kemet Corp.\",\n \"Kennametal Inc.\",\n \"Kerr-McGee Corporation\",\n \"KeyCorp\",\n \"KeySpan Corp.\",\n \"Kimball International Inc.\",\n \"Kimberly-Clark Corporation\",\n \"Kindred Healthcare Inc.\",\n \"KLA-Tencor Corporation\",\n \"K-Mart Corp.\",\n \"Knight-Ridder Inc.\",\n \"Kohl's Corp.\",\n \"KPMG Consulting Inc.\",\n \"Kroger Co.\",\n \"L-3 Communications Holdings Inc.\",\n \"Laboratory Corporation of America Holdings\",\n \"Lam Research Corporation\",\n \"LandAmerica Financial Group Inc.\",\n \"Lands' End Inc.\",\n \"Landstar System Inc.\",\n \"La-Z-Boy Inc.\",\n \"Lear Corporation\",\n \"Legg Mason Inc.\",\n \"Leggett & Platt Inc.\",\n \"Lehman Brothers Holdings Inc.\",\n \"Lennar Corporation\",\n \"Lennox International Inc.\",\n \"Level 3 Communications Inc.\",\n \"Levi Strauss & Co.\",\n \"Lexmark International Inc.\",\n \"Limited Inc.\",\n \"Lincoln National Corporation\",\n \"Linens 'n Things Inc.\",\n \"Lithia Motors Inc.\",\n \"Liz Claiborne Inc.\",\n \"Lockheed Martin Corporation\",\n \"Loews Corporation\",\n \"Longs Drug Stores Corporation\",\n \"Louisiana-Pacific Corporation\",\n \"Lowe's Companies Inc.\",\n \"LSI Logic Corporation\",\n \"The LTV Corporation\",\n \"The Lubrizol Corporation\",\n \"Lucent Technologies Inc.\",\n \"Lyondell Chemical Company\",\n \"M & T Bank Corporation\",\n \"Magellan Health Services Inc.\",\n \"Mail-Well Inc.\",\n \"Mandalay Resort Group\",\n \"Manor Care Inc.\",\n \"Manpower Inc.\",\n \"Marathon Oil Corporation\",\n \"Mariner Health Care Inc.\",\n \"Markel Corporation\",\n \"Marriott International Inc.\",\n \"Marsh & McLennan Companies Inc.\",\n \"Marsh Supermarkets Inc.\",\n \"Marshall & Ilsley Corporation\",\n \"Martin Marietta Materials Inc.\",\n \"Masco Corporation\",\n \"Massey Energy Company\",\n \"MasTec Inc.\",\n \"Mattel Inc.\",\n \"Maxim Integrated Products Inc.\",\n \"Maxtor Corporation\",\n \"Maxxam Inc.\",\n \"The May Department Stores Company\",\n \"Maytag Corporation\",\n \"MBNA Corporation\",\n \"McCormick & Company Incorporated\",\n \"McDonald's Corporation\",\n \"The McGraw-Hill Companies Inc.\",\n \"McKesson Corporation\",\n \"McLeodUSA Incorporated\",\n \"M.D.C. Holdings Inc.\",\n \"MDU Resources Group Inc.\",\n \"MeadWestvaco Corporation\",\n \"Medtronic Inc.\",\n \"Mellon Financial Corporation\",\n \"The Men's Wearhouse Inc.\",\n \"Merck & Co., Inc.\",\n \"Mercury General Corporation\",\n \"Merrill Lynch & Co. Inc.\",\n \"Metaldyne Corporation\",\n \"Metals USA Inc.\",\n \"MetLife Inc.\",\n \"Metris Companies Inc\",\n \"MGIC Investment Corporation\",\n \"MGM Mirage\",\n \"Michaels Stores Inc.\",\n \"Micron Technology Inc.\",\n \"Microsoft Corporation\",\n \"Milacron Inc.\",\n \"Millennium Chemicals Inc.\",\n \"Mirant Corporation\",\n \"Mohawk Industries Inc.\",\n \"Molex Incorporated\",\n \"The MONY Group Inc.\",\n \"Morgan Stanley Dean Witter & Co.\",\n \"Motorola Inc.\",\n \"MPS Group Inc.\",\n \"Murphy Oil Corporation\",\n \"Nabors Industries Inc\",\n \"Nacco Industries Inc\",\n \"Nash Finch Company\",\n \"National City Corp.\",\n \"National Commerce Financial Corporation\",\n \"National Fuel Gas Company\",\n \"National Oilwell Inc\",\n \"National Rural Utilities Cooperative Finance Corporation\",\n \"National Semiconductor Corporation\",\n \"National Service Industries Inc\",\n \"Navistar International Corporation\",\n \"NCR Corporation\",\n \"The Neiman Marcus Group Inc.\",\n \"New Jersey Resources Corporation\",\n \"New York Times Company\",\n \"Newell Rubbermaid Inc\",\n \"Newmont Mining Corporation\",\n \"Nextel Communications Inc\",\n \"Nicor Inc\",\n \"Nike Inc\",\n \"NiSource Inc\",\n \"Noble Energy Inc\",\n \"Nordstrom Inc\",\n \"Norfolk Southern Corporation\",\n \"Nortek Inc\",\n \"North Fork Bancorporation Inc\",\n \"Northeast Utilities System\",\n \"Northern Trust Corporation\",\n \"Northrop Grumman Corporation\",\n \"NorthWestern Corporation\",\n \"Novellus Systems Inc\",\n \"NSTAR\",\n \"NTL Incorporated\",\n \"Nucor Corp\",\n \"Nvidia Corp\",\n \"NVR Inc\",\n \"Northwest Airlines Corp\",\n \"Occidental Petroleum Corp\",\n \"Ocean Energy Inc\",\n \"Office Depot Inc.\",\n \"OfficeMax Inc\",\n \"OGE Energy Corp\",\n \"Oglethorpe Power Corp.\",\n \"Ohio Casualty Corp.\",\n \"Old Republic International Corp.\",\n \"Olin Corp.\",\n \"OM Group Inc\",\n \"Omnicare Inc\",\n \"Omnicom Group\",\n \"On Semiconductor Corp\",\n \"ONEOK Inc\",\n \"Oracle Corp\",\n \"Oshkosh Truck Corp\",\n \"Outback Steakhouse Inc.\",\n \"Owens & Minor Inc.\",\n \"Owens Corning\",\n \"Owens-Illinois Inc\",\n \"Oxford Health Plans Inc\",\n \"Paccar Inc\",\n \"PacifiCare Health Systems Inc\",\n \"Packaging Corp. of America\",\n \"Pactiv Corp\",\n \"Pall Corp\",\n \"Pantry Inc\",\n \"Park Place Entertainment Corp\",\n \"Parker Hannifin Corp.\",\n \"Pathmark Stores Inc.\",\n \"Paychex Inc\",\n \"Payless Shoesource Inc\",\n \"Penn Traffic Co.\",\n \"Pennzoil-Quaker State Company\",\n \"Pentair Inc\",\n \"Peoples Energy Corp.\",\n \"PeopleSoft Inc\",\n \"Pep Boys Manny, Moe & Jack\",\n \"Potomac Electric Power Co.\",\n \"Pepsi Bottling Group Inc.\",\n \"PepsiAmericas Inc.\",\n \"PepsiCo Inc.\",\n \"Performance Food Group Co.\",\n \"Perini Corp\",\n \"PerkinElmer Inc\",\n \"Perot Systems Corp\",\n \"Petco Animal Supplies Inc.\",\n \"Peter Kiewit Sons', Inc.\",\n \"PETsMART Inc\",\n \"Pfizer Inc\",\n \"Pacific Gas & Electric Corp.\",\n \"Pharmacia Corp\",\n \"Phar Mor Inc.\",\n \"Phelps Dodge Corp.\",\n \"Philip Morris Companies Inc.\",\n \"Phillips Petroleum Co\",\n \"Phillips Van Heusen Corp.\",\n \"Phoenix Companies Inc\",\n \"Pier 1 Imports Inc.\",\n \"Pilgrim's Pride Corporation\",\n \"Pinnacle West Capital Corp\",\n \"Pioneer-Standard Electronics Inc.\",\n \"Pitney Bowes Inc.\",\n \"Pittston Brinks Group\",\n \"Plains All American Pipeline LP\",\n \"PNC Financial Services Group Inc.\",\n \"PNM Resources Inc\",\n \"Polaris Industries Inc.\",\n \"Polo Ralph Lauren Corp\",\n \"PolyOne Corp\",\n \"Popular Inc\",\n \"Potlatch Corp\",\n \"PPG Industries Inc\",\n \"PPL Corp\",\n \"Praxair Inc\",\n \"Precision Castparts Corp\",\n \"Premcor Inc.\",\n \"Pride International Inc\",\n \"Primedia Inc\",\n \"Principal Financial Group Inc.\",\n \"Procter & Gamble Co.\",\n \"Pro-Fac Cooperative Inc.\",\n \"Progress Energy Inc\",\n \"Progressive Corporation\",\n \"Protective Life Corp\",\n \"Provident Financial Group\",\n \"Providian Financial Corp.\",\n \"Prudential Financial Inc.\",\n \"PSS World Medical Inc\",\n \"Public Service Enterprise Group Inc.\",\n \"Publix Super Markets Inc.\",\n \"Puget Energy Inc.\",\n \"Pulte Homes Inc\",\n \"Qualcomm Inc\",\n \"Quanta Services Inc.\",\n \"Quantum Corp\",\n \"Quest Diagnostics Inc.\",\n \"Questar Corp\",\n \"Quintiles Transnational\",\n \"Qwest Communications Intl Inc\",\n \"R.J. Reynolds Tobacco Company\",\n \"R.R. Donnelley & Sons Company\",\n \"Radio Shack Corporation\",\n \"Raymond James Financial Inc.\",\n \"Raytheon Company\",\n \"Reader's Digest Association Inc.\",\n \"Reebok International Ltd.\",\n \"Regions Financial Corp.\",\n \"Regis Corporation\",\n \"Reliance Steel & Aluminum Co.\",\n \"Reliant Energy Inc.\",\n \"Rent A Center Inc\",\n \"Republic Services Inc\",\n \"Revlon Inc\",\n \"RGS Energy Group Inc\",\n \"Rite Aid Corp\",\n \"Riverwood Holding Inc.\",\n \"RoadwayCorp\",\n \"Robert Half International Inc.\",\n \"Rock-Tenn Co\",\n \"Rockwell Automation Inc\",\n \"Rockwell Collins Inc\",\n \"Rohm & Haas Co.\",\n \"Ross Stores Inc\",\n \"RPM Inc.\",\n \"Ruddick Corp\",\n \"Ryder System Inc\",\n \"Ryerson Tull Inc\",\n \"Ryland Group Inc.\",\n \"Sabre Holdings Corp\",\n \"Safeco Corp\",\n \"Safeguard Scientifics Inc.\",\n \"Safeway Inc\",\n \"Saks Inc\",\n \"Sanmina-SCI Inc\",\n \"Sara Lee Corp\",\n \"SBC Communications Inc\",\n \"Scana Corp.\",\n \"Schering-Plough Corp\",\n \"Scholastic Corp\",\n \"SCI Systems Onc.\",\n \"Science Applications Intl. Inc.\",\n \"Scientific-Atlanta Inc\",\n \"Scotts Company\",\n \"Seaboard Corp\",\n \"Sealed Air Corp\",\n \"Sears Roebuck & Co\",\n \"Sempra Energy\",\n \"Sequa Corp\",\n \"Service Corp. International\",\n \"ServiceMaster Co\",\n \"Shaw Group Inc\",\n \"Sherwin-Williams Company\",\n \"Shopko Stores Inc\",\n \"Siebel Systems Inc\",\n \"Sierra Health Services Inc\",\n \"Sierra Pacific Resources\",\n \"Silgan Holdings Inc.\",\n \"Silicon Graphics Inc\",\n \"Simon Property Group Inc\",\n \"SLM Corporation\",\n \"Smith International Inc\",\n \"Smithfield Foods Inc\",\n \"Smurfit-Stone Container Corp\",\n \"Snap-On Inc\",\n \"Solectron Corp\",\n \"Solutia Inc\",\n \"Sonic Automotive Inc.\",\n \"Sonoco Products Co.\",\n \"Southern Company\",\n \"Southern Union Company\",\n \"SouthTrust Corp.\",\n \"Southwest Airlines Co\",\n \"Southwest Gas Corp\",\n \"Sovereign Bancorp Inc.\",\n \"Spartan Stores Inc\",\n \"Spherion Corp\",\n \"Sports Authority Inc\",\n \"Sprint Corp.\",\n \"SPX Corp\",\n \"St. Jude Medical Inc\",\n \"St. Paul Cos.\",\n \"Staff Leasing Inc.\",\n \"StanCorp Financial Group Inc\",\n \"Standard Pacific Corp.\",\n \"Stanley Works\",\n \"Staples Inc\",\n \"Starbucks Corp\",\n \"Starwood Hotels & Resorts Worldwide Inc\",\n \"State Street Corp.\",\n \"Stater Bros. Holdings Inc.\",\n \"Steelcase Inc\",\n \"Stein Mart Inc\",\n \"Stewart & Stevenson Services Inc\",\n \"Stewart Information Services Corp\",\n \"Stilwell Financial Inc\",\n \"Storage Technology Corporation\",\n \"Stryker Corp\",\n \"Sun Healthcare Group Inc.\",\n \"Sun Microsystems Inc.\",\n \"SunGard Data Systems Inc.\",\n \"Sunoco Inc.\",\n \"SunTrust Banks Inc\",\n \"Supervalu Inc\",\n \"Swift Transportation, Co., Inc\",\n \"Symbol Technologies Inc\",\n \"Synovus Financial Corp.\",\n \"Sysco Corp\",\n \"Systemax Inc.\",\n \"Target Corp.\",\n \"Tech Data Corporation\",\n \"TECO Energy Inc\",\n \"Tecumseh Products Company\",\n \"Tektronix Inc\",\n \"Teleflex Incorporated\",\n \"Telephone & Data Systems Inc\",\n \"Tellabs Inc.\",\n \"Temple-Inland Inc\",\n \"Tenet Healthcare Corporation\",\n \"Tenneco Automotive Inc.\",\n \"Teradyne Inc\",\n \"Terex Corp\",\n \"Tesoro Petroleum Corp.\",\n \"Texas Industries Inc.\",\n \"Texas Instruments Incorporated\",\n \"Textron Inc\",\n \"Thermo Electron Corporation\",\n \"Thomas & Betts Corporation\",\n \"Tiffany & Co\",\n \"Timken Company\",\n \"TJX Companies Inc\",\n \"TMP Worldwide Inc\",\n \"Toll Brothers Inc\",\n \"Torchmark Corporation\",\n \"Toro Company\",\n \"Tower Automotive Inc.\",\n \"Toys 'R' Us Inc\",\n \"Trans World Entertainment Corp.\",\n \"TransMontaigne Inc\",\n \"Transocean Inc\",\n \"TravelCenters of America Inc.\",\n \"Triad Hospitals Inc\",\n \"Tribune Company\",\n \"Trigon Healthcare Inc.\",\n \"Trinity Industries Inc\",\n \"Trump Hotels & Casino Resorts Inc.\",\n \"TruServ Corporation\",\n \"TRW Inc\",\n \"TXU Corp\",\n \"Tyson Foods Inc\",\n \"U.S. Bancorp\",\n \"U.S. Industries Inc.\",\n \"UAL Corporation\",\n \"UGI Corporation\",\n \"Unified Western Grocers Inc\",\n \"Union Pacific Corporation\",\n \"Union Planters Corp\",\n \"Unisource Energy Corp\",\n \"Unisys Corporation\",\n \"United Auto Group Inc\",\n \"United Defense Industries Inc.\",\n \"United Parcel Service Inc\",\n \"United Rentals Inc\",\n \"United Stationers Inc\",\n \"United Technologies Corporation\",\n \"UnitedHealth Group Incorporated\",\n \"Unitrin Inc\",\n \"Universal Corporation\",\n \"Universal Forest Products Inc\",\n \"Universal Health Services Inc\",\n \"Unocal Corporation\",\n \"Unova Inc\",\n \"UnumProvident Corporation\",\n \"URS Corporation\",\n \"US Airways Group Inc\",\n \"US Oncology Inc\",\n \"USA Interactive\",\n \"USFreighways Corporation\",\n \"USG Corporation\",\n \"UST Inc\",\n \"Valero Energy Corporation\",\n \"Valspar Corporation\",\n \"Value City Department Stores Inc\",\n \"Varco International Inc\",\n \"Vectren Corporation\",\n \"Veritas Software Corporation\",\n \"Verizon Communications Inc\",\n \"VF Corporation\",\n \"Viacom Inc\",\n \"Viad Corp\",\n \"Viasystems Group Inc\",\n \"Vishay Intertechnology Inc\",\n \"Visteon Corporation\",\n \"Volt Information Sciences Inc\",\n \"Vulcan Materials Company\",\n \"W.R. Berkley Corporation\",\n \"W.R. Grace & Co\",\n \"W.W. Grainger Inc\",\n \"Wachovia Corporation\",\n \"Wakenhut Corporation\",\n \"Walgreen Co\",\n \"Wallace Computer Services Inc\",\n \"Wal-Mart Stores Inc\",\n \"Walt Disney Co\",\n \"Walter Industries Inc\",\n \"Washington Mutual Inc\",\n \"Washington Post Co.\",\n \"Waste Management Inc\",\n \"Watsco Inc\",\n \"Weatherford International Inc\",\n \"Weis Markets Inc.\",\n \"Wellpoint Health Networks Inc\",\n \"Wells Fargo & Company\",\n \"Wendy's International Inc\",\n \"Werner Enterprises Inc\",\n \"WESCO International Inc\",\n \"Western Digital Inc\",\n \"Western Gas Resources Inc\",\n \"WestPoint Stevens Inc\",\n \"Weyerhauser Company\",\n \"WGL Holdings Inc\",\n \"Whirlpool Corporation\",\n \"Whole Foods Market Inc\",\n \"Willamette Industries Inc.\",\n \"Williams Companies Inc\",\n \"Williams Sonoma Inc\",\n \"Winn Dixie Stores Inc\",\n \"Wisconsin Energy Corporation\",\n \"Wm Wrigley Jr Company\",\n \"World Fuel Services Corporation\",\n \"WorldCom Inc\",\n \"Worthington Industries Inc\",\n \"WPS Resources Corporation\",\n \"Wyeth\",\n \"Wyndham International Inc\",\n \"Xcel Energy Inc\",\n \"Xerox Corp\",\n \"Xilinx Inc\",\n \"XO Communications Inc\",\n \"Yellow Corporation\",\n \"York International Corp\",\n \"Yum Brands Inc.\",\n \"Zale Corporation\",\n \"Zions Bancorporation\"\n ],\n\n fileExtension : {\n \"raster\" : [\"bmp\", \"gif\", \"gpl\", \"ico\", \"jpeg\", \"psd\", \"png\", \"psp\", \"raw\", \"tiff\"],\n \"vector\" : [\"3dv\", \"amf\", \"awg\", \"ai\", \"cgm\", \"cdr\", \"cmx\", \"dxf\", \"e2d\", \"egt\", \"eps\", \"fs\", \"odg\", \"svg\", \"xar\"],\n \"3d\" : [\"3dmf\", \"3dm\", \"3mf\", \"3ds\", \"an8\", \"aoi\", \"blend\", \"cal3d\", \"cob\", \"ctm\", \"iob\", \"jas\", \"max\", \"mb\", \"mdx\", \"obj\", \"x\", \"x3d\"],\n \"document\" : [\"doc\", \"docx\", \"dot\", \"html\", \"xml\", \"odt\", \"odm\", \"ott\", \"csv\", \"rtf\", \"tex\", \"xhtml\", \"xps\"]\n },\n\n // Data taken from https://github.com/dmfilipenko/timezones.json/blob/master/timezones.json\n timezones: [\n {\n \"name\": \"Dateline Standard Time\",\n \"abbr\": \"DST\",\n \"offset\": -12,\n \"isdst\": false,\n \"text\": \"(UTC-12:00) International Date Line West\",\n \"utc\": [\n \"Etc/GMT+12\"\n ]\n },\n {\n \"name\": \"UTC-11\",\n \"abbr\": \"U\",\n \"offset\": -11,\n \"isdst\": false,\n \"text\": \"(UTC-11:00) Coordinated Universal Time-11\",\n \"utc\": [\n \"Etc/GMT+11\",\n \"Pacific/Midway\",\n \"Pacific/Niue\",\n \"Pacific/Pago_Pago\"\n ]\n },\n {\n \"name\": \"Hawaiian Standard Time\",\n \"abbr\": \"HST\",\n \"offset\": -10,\n \"isdst\": false,\n \"text\": \"(UTC-10:00) Hawaii\",\n \"utc\": [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\"\n ]\n },\n {\n \"name\": \"Alaskan Standard Time\",\n \"abbr\": \"AKDT\",\n \"offset\": -8,\n \"isdst\": true,\n \"text\": \"(UTC-09:00) Alaska\",\n \"utc\": [\n \"America/Anchorage\",\n \"America/Juneau\",\n \"America/Nome\",\n \"America/Sitka\",\n \"America/Yakutat\"\n ]\n },\n {\n \"name\": \"Pacific Standard Time (Mexico)\",\n \"abbr\": \"PDT\",\n \"offset\": -7,\n \"isdst\": true,\n \"text\": \"(UTC-08:00) Baja California\",\n \"utc\": [\n \"America/Santa_Isabel\"\n ]\n },\n {\n \"name\": \"Pacific Daylight Time\",\n \"abbr\": \"PDT\",\n \"offset\": -7,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Pacific Time (US & Canada)\",\n \"utc\": [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\"\n ]\n },\n {\n \"name\": \"Pacific Standard Time\",\n \"abbr\": \"PST\",\n \"offset\": -8,\n \"isdst\": false,\n \"text\": \"(UTC-08:00) Pacific Time (US & Canada)\",\n \"utc\": [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\",\n \"PST8PDT\"\n ]\n },\n {\n \"name\": \"US Mountain Standard Time\",\n \"abbr\": \"UMST\",\n \"offset\": -7,\n \"isdst\": false,\n \"text\": \"(UTC-07:00) Arizona\",\n \"utc\": [\n \"America/Creston\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"Etc/GMT+7\"\n ]\n },\n {\n \"name\": \"Mountain Standard Time (Mexico)\",\n \"abbr\": \"MDT\",\n \"offset\": -6,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Chihuahua, La Paz, Mazatlan\",\n \"utc\": [\n \"America/Chihuahua\",\n \"America/Mazatlan\"\n ]\n },\n {\n \"name\": \"Mountain Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": -6,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Mountain Time (US & Canada)\",\n \"utc\": [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\"\n ]\n },\n {\n \"name\": \"Central America Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": -6,\n \"isdst\": false,\n \"text\": \"(UTC-06:00) Central America\",\n \"utc\": [\n \"America/Belize\",\n \"America/Costa_Rica\",\n \"America/El_Salvador\",\n \"America/Guatemala\",\n \"America/Managua\",\n \"America/Tegucigalpa\",\n \"Etc/GMT+6\",\n \"Pacific/Galapagos\"\n ]\n },\n {\n \"name\": \"Central Standard Time\",\n \"abbr\": \"CDT\",\n \"offset\": -5,\n \"isdst\": true,\n \"text\": \"(UTC-06:00) Central Time (US & Canada)\",\n \"utc\": [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\"\n ]\n },\n {\n \"name\": \"Central Standard Time (Mexico)\",\n \"abbr\": \"CDT\",\n \"offset\": -5,\n \"isdst\": true,\n \"text\": \"(UTC-06:00) Guadalajara, Mexico City, Monterrey\",\n \"utc\": [\n \"America/Bahia_Banderas\",\n \"America/Cancun\",\n \"America/Merida\",\n \"America/Mexico_City\",\n \"America/Monterrey\"\n ]\n },\n {\n \"name\": \"Canada Central Standard Time\",\n \"abbr\": \"CCST\",\n \"offset\": -6,\n \"isdst\": false,\n \"text\": \"(UTC-06:00) Saskatchewan\",\n \"utc\": [\n \"America/Regina\",\n \"America/Swift_Current\"\n ]\n },\n {\n \"name\": \"SA Pacific Standard Time\",\n \"abbr\": \"SPST\",\n \"offset\": -5,\n \"isdst\": false,\n \"text\": \"(UTC-05:00) Bogota, Lima, Quito\",\n \"utc\": [\n \"America/Bogota\",\n \"America/Cayman\",\n \"America/Coral_Harbour\",\n \"America/Eirunepe\",\n \"America/Guayaquil\",\n \"America/Jamaica\",\n \"America/Lima\",\n \"America/Panama\",\n \"America/Rio_Branco\",\n \"Etc/GMT+5\"\n ]\n },\n {\n \"name\": \"Eastern Standard Time\",\n \"abbr\": \"EDT\",\n \"offset\": -4,\n \"isdst\": true,\n \"text\": \"(UTC-05:00) Eastern Time (US & Canada)\",\n \"utc\": [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n \"EST5EDT\"\n ]\n },\n {\n \"name\": \"US Eastern Standard Time\",\n \"abbr\": \"UEDT\",\n \"offset\": -4,\n \"isdst\": true,\n \"text\": \"(UTC-05:00) Indiana (East)\",\n \"utc\": [\n \"America/Indiana/Marengo\",\n \"America/Indiana/Vevay\",\n \"America/Indianapolis\"\n ]\n },\n {\n \"name\": \"Venezuela Standard Time\",\n \"abbr\": \"VST\",\n \"offset\": -4.5,\n \"isdst\": false,\n \"text\": \"(UTC-04:30) Caracas\",\n \"utc\": [\n \"America/Caracas\"\n ]\n },\n {\n \"name\": \"Paraguay Standard Time\",\n \"abbr\": \"PYT\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Asuncion\",\n \"utc\": [\n \"America/Asuncion\"\n ]\n },\n {\n \"name\": \"Atlantic Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": -3,\n \"isdst\": true,\n \"text\": \"(UTC-04:00) Atlantic Time (Canada)\",\n \"utc\": [\n \"America/Glace_Bay\",\n \"America/Goose_Bay\",\n \"America/Halifax\",\n \"America/Moncton\",\n \"America/Thule\",\n \"Atlantic/Bermuda\"\n ]\n },\n {\n \"name\": \"Central Brazilian Standard Time\",\n \"abbr\": \"CBST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Cuiaba\",\n \"utc\": [\n \"America/Campo_Grande\",\n \"America/Cuiaba\"\n ]\n },\n {\n \"name\": \"SA Western Standard Time\",\n \"abbr\": \"SWST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan\",\n \"utc\": [\n \"America/Anguilla\",\n \"America/Antigua\",\n \"America/Aruba\",\n \"America/Barbados\",\n \"America/Blanc-Sablon\",\n \"America/Boa_Vista\",\n \"America/Curacao\",\n \"America/Dominica\",\n \"America/Grand_Turk\",\n \"America/Grenada\",\n \"America/Guadeloupe\",\n \"America/Guyana\",\n \"America/Kralendijk\",\n \"America/La_Paz\",\n \"America/Lower_Princes\",\n \"America/Manaus\",\n \"America/Marigot\",\n \"America/Martinique\",\n \"America/Montserrat\",\n \"America/Port_of_Spain\",\n \"America/Porto_Velho\",\n \"America/Puerto_Rico\",\n \"America/Santo_Domingo\",\n \"America/St_Barthelemy\",\n \"America/St_Kitts\",\n \"America/St_Lucia\",\n \"America/St_Thomas\",\n \"America/St_Vincent\",\n \"America/Tortola\",\n \"Etc/GMT+4\"\n ]\n },\n {\n \"name\": \"Pacific SA Standard Time\",\n \"abbr\": \"PSST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Santiago\",\n \"utc\": [\n \"America/Santiago\",\n \"Antarctica/Palmer\"\n ]\n },\n {\n \"name\": \"Newfoundland Standard Time\",\n \"abbr\": \"NDT\",\n \"offset\": -2.5,\n \"isdst\": true,\n \"text\": \"(UTC-03:30) Newfoundland\",\n \"utc\": [\n \"America/St_Johns\"\n ]\n },\n {\n \"name\": \"E. South America Standard Time\",\n \"abbr\": \"ESAST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Brasilia\",\n \"utc\": [\n \"America/Sao_Paulo\"\n ]\n },\n {\n \"name\": \"Argentina Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Buenos Aires\",\n \"utc\": [\n \"America/Argentina/La_Rioja\",\n \"America/Argentina/Rio_Gallegos\",\n \"America/Argentina/Salta\",\n \"America/Argentina/San_Juan\",\n \"America/Argentina/San_Luis\",\n \"America/Argentina/Tucuman\",\n \"America/Argentina/Ushuaia\",\n \"America/Buenos_Aires\",\n \"America/Catamarca\",\n \"America/Cordoba\",\n \"America/Jujuy\",\n \"America/Mendoza\"\n ]\n },\n {\n \"name\": \"SA Eastern Standard Time\",\n \"abbr\": \"SEST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Cayenne, Fortaleza\",\n \"utc\": [\n \"America/Araguaina\",\n \"America/Belem\",\n \"America/Cayenne\",\n \"America/Fortaleza\",\n \"America/Maceio\",\n \"America/Paramaribo\",\n \"America/Recife\",\n \"America/Santarem\",\n \"Antarctica/Rothera\",\n \"Atlantic/Stanley\",\n \"Etc/GMT+3\"\n ]\n },\n {\n \"name\": \"Greenland Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": -3,\n \"isdst\": true,\n \"text\": \"(UTC-03:00) Greenland\",\n \"utc\": [\n \"America/Godthab\"\n ]\n },\n {\n \"name\": \"Montevideo Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Montevideo\",\n \"utc\": [\n \"America/Montevideo\"\n ]\n },\n {\n \"name\": \"Bahia Standard Time\",\n \"abbr\": \"BST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Salvador\",\n \"utc\": [\n \"America/Bahia\"\n ]\n },\n {\n \"name\": \"UTC-02\",\n \"abbr\": \"U\",\n \"offset\": -2,\n \"isdst\": false,\n \"text\": \"(UTC-02:00) Coordinated Universal Time-02\",\n \"utc\": [\n \"America/Noronha\",\n \"Atlantic/South_Georgia\",\n \"Etc/GMT+2\"\n ]\n },\n {\n \"name\": \"Mid-Atlantic Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": -1,\n \"isdst\": true,\n \"text\": \"(UTC-02:00) Mid-Atlantic - Old\",\n \"utc\": []\n },\n {\n \"name\": \"Azores Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": 0,\n \"isdst\": true,\n \"text\": \"(UTC-01:00) Azores\",\n \"utc\": [\n \"America/Scoresbysund\",\n \"Atlantic/Azores\"\n ]\n },\n {\n \"name\": \"Cape Verde Standard Time\",\n \"abbr\": \"CVST\",\n \"offset\": -1,\n \"isdst\": false,\n \"text\": \"(UTC-01:00) Cape Verde Is.\",\n \"utc\": [\n \"Atlantic/Cape_Verde\",\n \"Etc/GMT+1\"\n ]\n },\n {\n \"name\": \"Morocco Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC) Casablanca\",\n \"utc\": [\n \"Africa/Casablanca\",\n \"Africa/El_Aaiun\"\n ]\n },\n {\n \"name\": \"UTC\",\n \"abbr\": \"UTC\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Coordinated Universal Time\",\n \"utc\": [\n \"America/Danmarkshavn\",\n \"Etc/GMT\"\n ]\n },\n {\n \"name\": \"GMT Standard Time\",\n \"abbr\": \"GMT\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Edinburgh, London\",\n \"utc\": [\n \"Europe/Isle_of_Man\",\n \"Europe/Guernsey\",\n \"Europe/Jersey\",\n \"Europe/London\"\n ]\n },\n {\n \"name\": \"British Summer Time\",\n \"abbr\": \"BST\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Edinburgh, London\",\n \"utc\": [\n \"Europe/Isle_of_Man\",\n \"Europe/Guernsey\",\n \"Europe/Jersey\",\n \"Europe/London\"\n ]\n },\n {\n \"name\": \"GMT Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC) Dublin, Lisbon\",\n \"utc\": [\n \"Atlantic/Canary\",\n \"Atlantic/Faeroe\",\n \"Atlantic/Madeira\",\n \"Europe/Dublin\",\n \"Europe/Lisbon\"\n ]\n },\n {\n \"name\": \"Greenwich Standard Time\",\n \"abbr\": \"GST\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Monrovia, Reykjavik\",\n \"utc\": [\n \"Africa/Abidjan\",\n \"Africa/Accra\",\n \"Africa/Bamako\",\n \"Africa/Banjul\",\n \"Africa/Bissau\",\n \"Africa/Conakry\",\n \"Africa/Dakar\",\n \"Africa/Freetown\",\n \"Africa/Lome\",\n \"Africa/Monrovia\",\n \"Africa/Nouakchott\",\n \"Africa/Ouagadougou\",\n \"Africa/Sao_Tome\",\n \"Atlantic/Reykjavik\",\n \"Atlantic/St_Helena\"\n ]\n },\n {\n \"name\": \"W. Europe Standard Time\",\n \"abbr\": \"WEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\n \"utc\": [\n \"Arctic/Longyearbyen\",\n \"Europe/Amsterdam\",\n \"Europe/Andorra\",\n \"Europe/Berlin\",\n \"Europe/Busingen\",\n \"Europe/Gibraltar\",\n \"Europe/Luxembourg\",\n \"Europe/Malta\",\n \"Europe/Monaco\",\n \"Europe/Oslo\",\n \"Europe/Rome\",\n \"Europe/San_Marino\",\n \"Europe/Stockholm\",\n \"Europe/Vaduz\",\n \"Europe/Vatican\",\n \"Europe/Vienna\",\n \"Europe/Zurich\"\n ]\n },\n {\n \"name\": \"Central Europe Standard Time\",\n \"abbr\": \"CEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\n \"utc\": [\n \"Europe/Belgrade\",\n \"Europe/Bratislava\",\n \"Europe/Budapest\",\n \"Europe/Ljubljana\",\n \"Europe/Podgorica\",\n \"Europe/Prague\",\n \"Europe/Tirane\"\n ]\n },\n {\n \"name\": \"Romance Standard Time\",\n \"abbr\": \"RDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris\",\n \"utc\": [\n \"Africa/Ceuta\",\n \"Europe/Brussels\",\n \"Europe/Copenhagen\",\n \"Europe/Madrid\",\n \"Europe/Paris\"\n ]\n },\n {\n \"name\": \"Central European Standard Time\",\n \"abbr\": \"CEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb\",\n \"utc\": [\n \"Europe/Sarajevo\",\n \"Europe/Skopje\",\n \"Europe/Warsaw\",\n \"Europe/Zagreb\"\n ]\n },\n {\n \"name\": \"W. Central Africa Standard Time\",\n \"abbr\": \"WCAST\",\n \"offset\": 1,\n \"isdst\": false,\n \"text\": \"(UTC+01:00) West Central Africa\",\n \"utc\": [\n \"Africa/Algiers\",\n \"Africa/Bangui\",\n \"Africa/Brazzaville\",\n \"Africa/Douala\",\n \"Africa/Kinshasa\",\n \"Africa/Lagos\",\n \"Africa/Libreville\",\n \"Africa/Luanda\",\n \"Africa/Malabo\",\n \"Africa/Ndjamena\",\n \"Africa/Niamey\",\n \"Africa/Porto-Novo\",\n \"Africa/Tunis\",\n \"Etc/GMT-1\"\n ]\n },\n {\n \"name\": \"Namibia Standard Time\",\n \"abbr\": \"NST\",\n \"offset\": 1,\n \"isdst\": false,\n \"text\": \"(UTC+01:00) Windhoek\",\n \"utc\": [\n \"Africa/Windhoek\"\n ]\n },\n {\n \"name\": \"GTB Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Athens, Bucharest\",\n \"utc\": [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\"\n ]\n },\n {\n \"name\": \"Middle East Standard Time\",\n \"abbr\": \"MEDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Beirut\",\n \"utc\": [\n \"Asia/Beirut\"\n ]\n },\n {\n \"name\": \"Egypt Standard Time\",\n \"abbr\": \"EST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Cairo\",\n \"utc\": [\n \"Africa/Cairo\"\n ]\n },\n {\n \"name\": \"Syria Standard Time\",\n \"abbr\": \"SDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Damascus\",\n \"utc\": [\n \"Asia/Damascus\"\n ]\n },\n {\n \"name\": \"E. Europe Standard Time\",\n \"abbr\": \"EEDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) E. Europe\",\n \"utc\": [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\",\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Nicosia\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\"\n ]\n },\n {\n \"name\": \"South Africa Standard Time\",\n \"abbr\": \"SAST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Harare, Pretoria\",\n \"utc\": [\n \"Africa/Blantyre\",\n \"Africa/Bujumbura\",\n \"Africa/Gaborone\",\n \"Africa/Harare\",\n \"Africa/Johannesburg\",\n \"Africa/Kigali\",\n \"Africa/Lubumbashi\",\n \"Africa/Lusaka\",\n \"Africa/Maputo\",\n \"Africa/Maseru\",\n \"Africa/Mbabane\",\n \"Etc/GMT-2\"\n ]\n },\n {\n \"name\": \"FLE Standard Time\",\n \"abbr\": \"FDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n \"utc\": [\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\"\n ]\n },\n {\n \"name\": \"Turkey Standard Time\",\n \"abbr\": \"TDT\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Istanbul\",\n \"utc\": [\n \"Europe/Istanbul\"\n ]\n },\n {\n \"name\": \"Israel Standard Time\",\n \"abbr\": \"JDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Jerusalem\",\n \"utc\": [\n \"Asia/Jerusalem\"\n ]\n },\n {\n \"name\": \"Libya Standard Time\",\n \"abbr\": \"LST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Tripoli\",\n \"utc\": [\n \"Africa/Tripoli\"\n ]\n },\n {\n \"name\": \"Jordan Standard Time\",\n \"abbr\": \"JST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Amman\",\n \"utc\": [\n \"Asia/Amman\"\n ]\n },\n {\n \"name\": \"Arabic Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Baghdad\",\n \"utc\": [\n \"Asia/Baghdad\"\n ]\n },\n {\n \"name\": \"Kaliningrad Standard Time\",\n \"abbr\": \"KST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Kaliningrad\",\n \"utc\": [\n \"Europe/Kaliningrad\"\n ]\n },\n {\n \"name\": \"Arab Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Kuwait, Riyadh\",\n \"utc\": [\n \"Asia/Aden\",\n \"Asia/Bahrain\",\n \"Asia/Kuwait\",\n \"Asia/Qatar\",\n \"Asia/Riyadh\"\n ]\n },\n {\n \"name\": \"E. Africa Standard Time\",\n \"abbr\": \"EAST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Nairobi\",\n \"utc\": [\n \"Africa/Addis_Ababa\",\n \"Africa/Asmera\",\n \"Africa/Dar_es_Salaam\",\n \"Africa/Djibouti\",\n \"Africa/Juba\",\n \"Africa/Kampala\",\n \"Africa/Khartoum\",\n \"Africa/Mogadishu\",\n \"Africa/Nairobi\",\n \"Antarctica/Syowa\",\n \"Etc/GMT-3\",\n \"Indian/Antananarivo\",\n \"Indian/Comoro\",\n \"Indian/Mayotte\"\n ]\n },\n {\n \"name\": \"Moscow Standard Time\",\n \"abbr\": \"MSK\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk\",\n \"utc\": [\n \"Europe/Kirov\",\n \"Europe/Moscow\",\n \"Europe/Simferopol\",\n \"Europe/Volgograd\",\n \"Europe/Minsk\"\n ]\n },\n {\n \"name\": \"Samara Time\",\n \"abbr\": \"SAMT\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Samara, Ulyanovsk, Saratov\",\n \"utc\": [\n \"Europe/Astrakhan\",\n \"Europe/Samara\",\n \"Europe/Ulyanovsk\"\n ]\n },\n {\n \"name\": \"Iran Standard Time\",\n \"abbr\": \"IDT\",\n \"offset\": 4.5,\n \"isdst\": true,\n \"text\": \"(UTC+03:30) Tehran\",\n \"utc\": [\n \"Asia/Tehran\"\n ]\n },\n {\n \"name\": \"Arabian Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Abu Dhabi, Muscat\",\n \"utc\": [\n \"Asia/Dubai\",\n \"Asia/Muscat\",\n \"Etc/GMT-4\"\n ]\n },\n {\n \"name\": \"Azerbaijan Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": 5,\n \"isdst\": true,\n \"text\": \"(UTC+04:00) Baku\",\n \"utc\": [\n \"Asia/Baku\"\n ]\n },\n {\n \"name\": \"Mauritius Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Port Louis\",\n \"utc\": [\n \"Indian/Mahe\",\n \"Indian/Mauritius\",\n \"Indian/Reunion\"\n ]\n },\n {\n \"name\": \"Georgian Standard Time\",\n \"abbr\": \"GET\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Tbilisi\",\n \"utc\": [\n \"Asia/Tbilisi\"\n ]\n },\n {\n \"name\": \"Caucasus Standard Time\",\n \"abbr\": \"CST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Yerevan\",\n \"utc\": [\n \"Asia/Yerevan\"\n ]\n },\n {\n \"name\": \"Afghanistan Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 4.5,\n \"isdst\": false,\n \"text\": \"(UTC+04:30) Kabul\",\n \"utc\": [\n \"Asia/Kabul\"\n ]\n },\n {\n \"name\": \"West Asia Standard Time\",\n \"abbr\": \"WAST\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Ashgabat, Tashkent\",\n \"utc\": [\n \"Antarctica/Mawson\",\n \"Asia/Aqtau\",\n \"Asia/Aqtobe\",\n \"Asia/Ashgabat\",\n \"Asia/Dushanbe\",\n \"Asia/Oral\",\n \"Asia/Samarkand\",\n \"Asia/Tashkent\",\n \"Etc/GMT-5\",\n \"Indian/Kerguelen\",\n \"Indian/Maldives\"\n ]\n },\n {\n \"name\": \"Yekaterinburg Time\",\n \"abbr\": \"YEKT\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Yekaterinburg\",\n \"utc\": [\n \"Asia/Yekaterinburg\"\n ]\n },\n {\n \"name\": \"Pakistan Standard Time\",\n \"abbr\": \"PKT\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Islamabad, Karachi\",\n \"utc\": [\n \"Asia/Karachi\"\n ]\n },\n {\n \"name\": \"India Standard Time\",\n \"abbr\": \"IST\",\n \"offset\": 5.5,\n \"isdst\": false,\n \"text\": \"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi\",\n \"utc\": [\n \"Asia/Kolkata\"\n ]\n },\n {\n \"name\": \"Sri Lanka Standard Time\",\n \"abbr\": \"SLST\",\n \"offset\": 5.5,\n \"isdst\": false,\n \"text\": \"(UTC+05:30) Sri Jayawardenepura\",\n \"utc\": [\n \"Asia/Colombo\"\n ]\n },\n {\n \"name\": \"Nepal Standard Time\",\n \"abbr\": \"NST\",\n \"offset\": 5.75,\n \"isdst\": false,\n \"text\": \"(UTC+05:45) Kathmandu\",\n \"utc\": [\n \"Asia/Kathmandu\"\n ]\n },\n {\n \"name\": \"Central Asia Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": 6,\n \"isdst\": false,\n \"text\": \"(UTC+06:00) Nur-Sultan (Astana)\",\n \"utc\": [\n \"Antarctica/Vostok\",\n \"Asia/Almaty\",\n \"Asia/Bishkek\",\n \"Asia/Qyzylorda\",\n \"Asia/Urumqi\",\n \"Etc/GMT-6\",\n \"Indian/Chagos\"\n ]\n },\n {\n \"name\": \"Bangladesh Standard Time\",\n \"abbr\": \"BST\",\n \"offset\": 6,\n \"isdst\": false,\n \"text\": \"(UTC+06:00) Dhaka\",\n \"utc\": [\n \"Asia/Dhaka\",\n \"Asia/Thimphu\"\n ]\n },\n {\n \"name\": \"Myanmar Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 6.5,\n \"isdst\": false,\n \"text\": \"(UTC+06:30) Yangon (Rangoon)\",\n \"utc\": [\n \"Asia/Rangoon\",\n \"Indian/Cocos\"\n ]\n },\n {\n \"name\": \"SE Asia Standard Time\",\n \"abbr\": \"SAST\",\n \"offset\": 7,\n \"isdst\": false,\n \"text\": \"(UTC+07:00) Bangkok, Hanoi, Jakarta\",\n \"utc\": [\n \"Antarctica/Davis\",\n \"Asia/Bangkok\",\n \"Asia/Hovd\",\n \"Asia/Jakarta\",\n \"Asia/Phnom_Penh\",\n \"Asia/Pontianak\",\n \"Asia/Saigon\",\n \"Asia/Vientiane\",\n \"Etc/GMT-7\",\n \"Indian/Christmas\"\n ]\n },\n {\n \"name\": \"N. Central Asia Standard Time\",\n \"abbr\": \"NCAST\",\n \"offset\": 7,\n \"isdst\": false,\n \"text\": \"(UTC+07:00) Novosibirsk\",\n \"utc\": [\n \"Asia/Novokuznetsk\",\n \"Asia/Novosibirsk\",\n \"Asia/Omsk\"\n ]\n },\n {\n \"name\": \"China Standard Time\",\n \"abbr\": \"CST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi\",\n \"utc\": [\n \"Asia/Hong_Kong\",\n \"Asia/Macau\",\n \"Asia/Shanghai\"\n ]\n },\n {\n \"name\": \"North Asia Standard Time\",\n \"abbr\": \"NAST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Krasnoyarsk\",\n \"utc\": [\n \"Asia/Krasnoyarsk\"\n ]\n },\n {\n \"name\": \"Singapore Standard Time\",\n \"abbr\": \"MPST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Kuala Lumpur, Singapore\",\n \"utc\": [\n \"Asia/Brunei\",\n \"Asia/Kuala_Lumpur\",\n \"Asia/Kuching\",\n \"Asia/Makassar\",\n \"Asia/Manila\",\n \"Asia/Singapore\",\n \"Etc/GMT-8\"\n ]\n },\n {\n \"name\": \"W. Australia Standard Time\",\n \"abbr\": \"WAST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Perth\",\n \"utc\": [\n \"Antarctica/Casey\",\n \"Australia/Perth\"\n ]\n },\n {\n \"name\": \"Taipei Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Taipei\",\n \"utc\": [\n \"Asia/Taipei\"\n ]\n },\n {\n \"name\": \"Ulaanbaatar Standard Time\",\n \"abbr\": \"UST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Ulaanbaatar\",\n \"utc\": [\n \"Asia/Choibalsan\",\n \"Asia/Ulaanbaatar\"\n ]\n },\n {\n \"name\": \"North Asia East Standard Time\",\n \"abbr\": \"NAEST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Irkutsk\",\n \"utc\": [\n \"Asia/Irkutsk\"\n ]\n },\n {\n \"name\": \"Japan Standard Time\",\n \"abbr\": \"JST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Osaka, Sapporo, Tokyo\",\n \"utc\": [\n \"Asia/Dili\",\n \"Asia/Jayapura\",\n \"Asia/Tokyo\",\n \"Etc/GMT-9\",\n \"Pacific/Palau\"\n ]\n },\n {\n \"name\": \"Korea Standard Time\",\n \"abbr\": \"KST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Seoul\",\n \"utc\": [\n \"Asia/Pyongyang\",\n \"Asia/Seoul\"\n ]\n },\n {\n \"name\": \"Cen. Australia Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": 9.5,\n \"isdst\": false,\n \"text\": \"(UTC+09:30) Adelaide\",\n \"utc\": [\n \"Australia/Adelaide\",\n \"Australia/Broken_Hill\"\n ]\n },\n {\n \"name\": \"AUS Central Standard Time\",\n \"abbr\": \"ACST\",\n \"offset\": 9.5,\n \"isdst\": false,\n \"text\": \"(UTC+09:30) Darwin\",\n \"utc\": [\n \"Australia/Darwin\"\n ]\n },\n {\n \"name\": \"E. Australia Standard Time\",\n \"abbr\": \"EAST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Brisbane\",\n \"utc\": [\n \"Australia/Brisbane\",\n \"Australia/Lindeman\"\n ]\n },\n {\n \"name\": \"AUS Eastern Standard Time\",\n \"abbr\": \"AEST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Canberra, Melbourne, Sydney\",\n \"utc\": [\n \"Australia/Melbourne\",\n \"Australia/Sydney\"\n ]\n },\n {\n \"name\": \"West Pacific Standard Time\",\n \"abbr\": \"WPST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Guam, Port Moresby\",\n \"utc\": [\n \"Antarctica/DumontDUrville\",\n \"Etc/GMT-10\",\n \"Pacific/Guam\",\n \"Pacific/Port_Moresby\",\n \"Pacific/Saipan\",\n \"Pacific/Truk\"\n ]\n },\n {\n \"name\": \"Tasmania Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Hobart\",\n \"utc\": [\n \"Australia/Currie\",\n \"Australia/Hobart\"\n ]\n },\n {\n \"name\": \"Yakutsk Standard Time\",\n \"abbr\": \"YST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Yakutsk\",\n \"utc\": [\n \"Asia/Chita\",\n \"Asia/Khandyga\",\n \"Asia/Yakutsk\"\n ]\n },\n {\n \"name\": \"Central Pacific Standard Time\",\n \"abbr\": \"CPST\",\n \"offset\": 11,\n \"isdst\": false,\n \"text\": \"(UTC+11:00) Solomon Is., New Caledonia\",\n \"utc\": [\n \"Antarctica/Macquarie\",\n \"Etc/GMT-11\",\n \"Pacific/Efate\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Kosrae\",\n \"Pacific/Noumea\",\n \"Pacific/Ponape\"\n ]\n },\n {\n \"name\": \"Vladivostok Standard Time\",\n \"abbr\": \"VST\",\n \"offset\": 11,\n \"isdst\": false,\n \"text\": \"(UTC+11:00) Vladivostok\",\n \"utc\": [\n \"Asia/Sakhalin\",\n \"Asia/Ust-Nera\",\n \"Asia/Vladivostok\"\n ]\n },\n {\n \"name\": \"New Zealand Standard Time\",\n \"abbr\": \"NZST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Auckland, Wellington\",\n \"utc\": [\n \"Antarctica/McMurdo\",\n \"Pacific/Auckland\"\n ]\n },\n {\n \"name\": \"UTC+12\",\n \"abbr\": \"U\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Coordinated Universal Time+12\",\n \"utc\": [\n \"Etc/GMT-12\",\n \"Pacific/Funafuti\",\n \"Pacific/Kwajalein\",\n \"Pacific/Majuro\",\n \"Pacific/Nauru\",\n \"Pacific/Tarawa\",\n \"Pacific/Wake\",\n \"Pacific/Wallis\"\n ]\n },\n {\n \"name\": \"Fiji Standard Time\",\n \"abbr\": \"FST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Fiji\",\n \"utc\": [\n \"Pacific/Fiji\"\n ]\n },\n {\n \"name\": \"Magadan Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Magadan\",\n \"utc\": [\n \"Asia/Anadyr\",\n \"Asia/Kamchatka\",\n \"Asia/Magadan\",\n \"Asia/Srednekolymsk\"\n ]\n },\n {\n \"name\": \"Kamchatka Standard Time\",\n \"abbr\": \"KDT\",\n \"offset\": 13,\n \"isdst\": true,\n \"text\": \"(UTC+12:00) Petropavlovsk-Kamchatsky - Old\",\n \"utc\": [\n \"Asia/Kamchatka\"\n ]\n },\n {\n \"name\": \"Tonga Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 13,\n \"isdst\": false,\n \"text\": \"(UTC+13:00) Nuku'alofa\",\n \"utc\": [\n \"Etc/GMT-13\",\n \"Pacific/Enderbury\",\n \"Pacific/Fakaofo\",\n \"Pacific/Tongatapu\"\n ]\n },\n {\n \"name\": \"Samoa Standard Time\",\n \"abbr\": \"SST\",\n \"offset\": 13,\n \"isdst\": false,\n \"text\": \"(UTC+13:00) Samoa\",\n \"utc\": [\n \"Pacific/Apia\"\n ]\n }\n ],\n //List source: http://answers.google.com/answers/threadview/id/589312.html\n profession: [\n \"Airline Pilot\",\n \"Academic Team\",\n \"Accountant\",\n \"Account Executive\",\n \"Actor\",\n \"Actuary\",\n \"Acquisition Analyst\",\n \"Administrative Asst.\",\n \"Administrative Analyst\",\n \"Administrator\",\n \"Advertising Director\",\n \"Aerospace Engineer\",\n \"Agent\",\n \"Agricultural Inspector\",\n \"Agricultural Scientist\",\n \"Air Traffic Controller\",\n \"Animal Trainer\",\n \"Anthropologist\",\n \"Appraiser\",\n \"Architect\",\n \"Art Director\",\n \"Artist\",\n \"Astronomer\",\n \"Athletic Coach\",\n \"Auditor\",\n \"Author\",\n \"Baker\",\n \"Banker\",\n \"Bankruptcy Attorney\",\n \"Benefits Manager\",\n \"Biologist\",\n \"Bio-feedback Specialist\",\n \"Biomedical Engineer\",\n \"Biotechnical Researcher\",\n \"Broadcaster\",\n \"Broker\",\n \"Building Manager\",\n \"Building Contractor\",\n \"Building Inspector\",\n \"Business Analyst\",\n \"Business Planner\",\n \"Business Manager\",\n \"Buyer\",\n \"Call Center Manager\",\n \"Career Counselor\",\n \"Cash Manager\",\n \"Ceramic Engineer\",\n \"Chief Executive Officer\",\n \"Chief Operation Officer\",\n \"Chef\",\n \"Chemical Engineer\",\n \"Chemist\",\n \"Child Care Manager\",\n \"Chief Medical Officer\",\n \"Chiropractor\",\n \"Cinematographer\",\n \"City Housing Manager\",\n \"City Manager\",\n \"Civil Engineer\",\n \"Claims Manager\",\n \"Clinical Research Assistant\",\n \"Collections Manager\",\n \"Compliance Manager\",\n \"Comptroller\",\n \"Computer Manager\",\n \"Commercial Artist\",\n \"Communications Affairs Director\",\n \"Communications Director\",\n \"Communications Engineer\",\n \"Compensation Analyst\",\n \"Computer Programmer\",\n \"Computer Ops. Manager\",\n \"Computer Engineer\",\n \"Computer Operator\",\n \"Computer Graphics Specialist\",\n \"Construction Engineer\",\n \"Construction Manager\",\n \"Consultant\",\n \"Consumer Relations Manager\",\n \"Contract Administrator\",\n \"Copyright Attorney\",\n \"Copywriter\",\n \"Corporate Planner\",\n \"Corrections Officer\",\n \"Cosmetologist\",\n \"Credit Analyst\",\n \"Cruise Director\",\n \"Chief Information Officer\",\n \"Chief Technology Officer\",\n \"Customer Service Manager\",\n \"Cryptologist\",\n \"Dancer\",\n \"Data Security Manager\",\n \"Database Manager\",\n \"Day Care Instructor\",\n \"Dentist\",\n \"Designer\",\n \"Design Engineer\",\n \"Desktop Publisher\",\n \"Developer\",\n \"Development Officer\",\n \"Diamond Merchant\",\n \"Dietitian\",\n \"Direct Marketer\",\n \"Director\",\n \"Distribution Manager\",\n \"Diversity Manager\",\n \"Economist\",\n \"EEO Compliance Manager\",\n \"Editor\",\n \"Education Adminator\",\n \"Electrical Engineer\",\n \"Electro Optical Engineer\",\n \"Electronics Engineer\",\n \"Embassy Management\",\n \"Employment Agent\",\n \"Engineer Technician\",\n \"Entrepreneur\",\n \"Environmental Analyst\",\n \"Environmental Attorney\",\n \"Environmental Engineer\",\n \"Environmental Specialist\",\n \"Escrow Officer\",\n \"Estimator\",\n \"Executive Assistant\",\n \"Executive Director\",\n \"Executive Recruiter\",\n \"Facilities Manager\",\n \"Family Counselor\",\n \"Fashion Events Manager\",\n \"Fashion Merchandiser\",\n \"Fast Food Manager\",\n \"Film Producer\",\n \"Film Production Assistant\",\n \"Financial Analyst\",\n \"Financial Planner\",\n \"Financier\",\n \"Fine Artist\",\n \"Wildlife Specialist\",\n \"Fitness Consultant\",\n \"Flight Attendant\",\n \"Flight Engineer\",\n \"Floral Designer\",\n \"Food & Beverage Director\",\n \"Food Service Manager\",\n \"Forestry Technician\",\n \"Franchise Management\",\n \"Franchise Sales\",\n \"Fraud Investigator\",\n \"Freelance Writer\",\n \"Fund Raiser\",\n \"General Manager\",\n \"Geologist\",\n \"General Counsel\",\n \"Geriatric Specialist\",\n \"Gerontologist\",\n \"Glamour Photographer\",\n \"Golf Club Manager\",\n \"Gourmet Chef\",\n \"Graphic Designer\",\n \"Grounds Keeper\",\n \"Hazardous Waste Manager\",\n \"Health Care Manager\",\n \"Health Therapist\",\n \"Health Service Administrator\",\n \"Hearing Officer\",\n \"Home Economist\",\n \"Horticulturist\",\n \"Hospital Administrator\",\n \"Hotel Manager\",\n \"Human Resources Manager\",\n \"Importer\",\n \"Industrial Designer\",\n \"Industrial Engineer\",\n \"Information Director\",\n \"Inside Sales\",\n \"Insurance Adjuster\",\n \"Interior Decorator\",\n \"Internal Controls Director\",\n \"International Acct.\",\n \"International Courier\",\n \"International Lawyer\",\n \"Interpreter\",\n \"Investigator\",\n \"Investment Banker\",\n \"Investment Manager\",\n \"IT Architect\",\n \"IT Project Manager\",\n \"IT Systems Analyst\",\n \"Jeweler\",\n \"Joint Venture Manager\",\n \"Journalist\",\n \"Labor Negotiator\",\n \"Labor Organizer\",\n \"Labor Relations Manager\",\n \"Lab Services Director\",\n \"Lab Technician\",\n \"Land Developer\",\n \"Landscape Architect\",\n \"Law Enforcement Officer\",\n \"Lawyer\",\n \"Lead Software Engineer\",\n \"Lead Software Test Engineer\",\n \"Leasing Manager\",\n \"Legal Secretary\",\n \"Library Manager\",\n \"Litigation Attorney\",\n \"Loan Officer\",\n \"Lobbyist\",\n \"Logistics Manager\",\n \"Maintenance Manager\",\n \"Management Consultant\",\n \"Managed Care Director\",\n \"Managing Partner\",\n \"Manufacturing Director\",\n \"Manpower Planner\",\n \"Marine Biologist\",\n \"Market Res. Analyst\",\n \"Marketing Director\",\n \"Materials Manager\",\n \"Mathematician\",\n \"Membership Chairman\",\n \"Mechanic\",\n \"Mechanical Engineer\",\n \"Media Buyer\",\n \"Medical Investor\",\n \"Medical Secretary\",\n \"Medical Technician\",\n \"Mental Health Counselor\",\n \"Merchandiser\",\n \"Metallurgical Engineering\",\n \"Meteorologist\",\n \"Microbiologist\",\n \"MIS Manager\",\n \"Motion Picture Director\",\n \"Multimedia Director\",\n \"Musician\",\n \"Network Administrator\",\n \"Network Specialist\",\n \"Network Operator\",\n \"New Product Manager\",\n \"Novelist\",\n \"Nuclear Engineer\",\n \"Nuclear Specialist\",\n \"Nutritionist\",\n \"Nursing Administrator\",\n \"Occupational Therapist\",\n \"Oceanographer\",\n \"Office Manager\",\n \"Operations Manager\",\n \"Operations Research Director\",\n \"Optical Technician\",\n \"Optometrist\",\n \"Organizational Development Manager\",\n \"Outplacement Specialist\",\n \"Paralegal\",\n \"Park Ranger\",\n \"Patent Attorney\",\n \"Payroll Specialist\",\n \"Personnel Specialist\",\n \"Petroleum Engineer\",\n \"Pharmacist\",\n \"Photographer\",\n \"Physical Therapist\",\n \"Physician\",\n \"Physician Assistant\",\n \"Physicist\",\n \"Planning Director\",\n \"Podiatrist\",\n \"Political Analyst\",\n \"Political Scientist\",\n \"Politician\",\n \"Portfolio Manager\",\n \"Preschool Management\",\n \"Preschool Teacher\",\n \"Principal\",\n \"Private Banker\",\n \"Private Investigator\",\n \"Probation Officer\",\n \"Process Engineer\",\n \"Producer\",\n \"Product Manager\",\n \"Product Engineer\",\n \"Production Engineer\",\n \"Production Planner\",\n \"Professional Athlete\",\n \"Professional Coach\",\n \"Professor\",\n \"Project Engineer\",\n \"Project Manager\",\n \"Program Manager\",\n \"Property Manager\",\n \"Public Administrator\",\n \"Public Safety Director\",\n \"PR Specialist\",\n \"Publisher\",\n \"Purchasing Agent\",\n \"Publishing Director\",\n \"Quality Assurance Specialist\",\n \"Quality Control Engineer\",\n \"Quality Control Inspector\",\n \"Radiology Manager\",\n \"Railroad Engineer\",\n \"Real Estate Broker\",\n \"Recreational Director\",\n \"Recruiter\",\n \"Redevelopment Specialist\",\n \"Regulatory Affairs Manager\",\n \"Registered Nurse\",\n \"Rehabilitation Counselor\",\n \"Relocation Manager\",\n \"Reporter\",\n \"Research Specialist\",\n \"Restaurant Manager\",\n \"Retail Store Manager\",\n \"Risk Analyst\",\n \"Safety Engineer\",\n \"Sales Engineer\",\n \"Sales Trainer\",\n \"Sales Promotion Manager\",\n \"Sales Representative\",\n \"Sales Manager\",\n \"Service Manager\",\n \"Sanitation Engineer\",\n \"Scientific Programmer\",\n \"Scientific Writer\",\n \"Securities Analyst\",\n \"Security Consultant\",\n \"Security Director\",\n \"Seminar Presenter\",\n \"Ship's Officer\",\n \"Singer\",\n \"Social Director\",\n \"Social Program Planner\",\n \"Social Research\",\n \"Social Scientist\",\n \"Social Worker\",\n \"Sociologist\",\n \"Software Developer\",\n \"Software Engineer\",\n \"Software Test Engineer\",\n \"Soil Scientist\",\n \"Special Events Manager\",\n \"Special Education Teacher\",\n \"Special Projects Director\",\n \"Speech Pathologist\",\n \"Speech Writer\",\n \"Sports Event Manager\",\n \"Statistician\",\n \"Store Manager\",\n \"Strategic Alliance Director\",\n \"Strategic Planning Director\",\n \"Stress Reduction Specialist\",\n \"Stockbroker\",\n \"Surveyor\",\n \"Structural Engineer\",\n \"Superintendent\",\n \"Supply Chain Director\",\n \"System Engineer\",\n \"Systems Analyst\",\n \"Systems Programmer\",\n \"System Administrator\",\n \"Tax Specialist\",\n \"Teacher\",\n \"Technical Support Specialist\",\n \"Technical Illustrator\",\n \"Technical Writer\",\n \"Technology Director\",\n \"Telecom Analyst\",\n \"Telemarketer\",\n \"Theatrical Director\",\n \"Title Examiner\",\n \"Tour Escort\",\n \"Tour Guide Director\",\n \"Traffic Manager\",\n \"Trainer Translator\",\n \"Transportation Manager\",\n \"Travel Agent\",\n \"Treasurer\",\n \"TV Programmer\",\n \"Underwriter\",\n \"Union Representative\",\n \"University Administrator\",\n \"University Dean\",\n \"Urban Planner\",\n \"Veterinarian\",\n \"Vendor Relations Director\",\n \"Viticulturist\",\n \"Warehouse Manager\"\n ],\n animals : {\n //list of ocean animals comes from https://owlcation.com/stem/list-of-ocean-animals\n \"ocean\" : [\"Acantharea\",\"Anemone\",\"Angelfish King\",\"Ahi Tuna\",\"Albacore\",\"American Oyster\",\"Anchovy\",\"Armored Snail\",\"Arctic Char\",\"Atlantic Bluefin Tuna\",\"Atlantic Cod\",\"Atlantic Goliath Grouper\",\"Atlantic Trumpetfish\",\"Atlantic Wolffish\",\"Baleen Whale\",\"Banded Butterflyfish\",\"Banded Coral Shrimp\",\"Banded Sea Krait\",\"Barnacle\",\"Barndoor Skate\",\"Barracuda\",\"Basking Shark\",\"Bass\",\"Beluga Whale\",\"Bluebanded Goby\",\"Bluehead Wrasse\",\"Bluefish\",\"Bluestreak Cleaner-Wrasse\",\"Blue Marlin\",\"Blue Shark\",\"Blue Spiny Lobster\",\"Blue Tang\",\"Blue Whale\",\"Broadclub Cuttlefish\",\"Bull Shark\",\"Chambered Nautilus\",\"Chilean Basket Star\",\"Chilean Jack Mackerel\",\"Chinook Salmon\",\"Christmas Tree Worm\",\"Clam\",\"Clown Anemonefish\",\"Clown Triggerfish\",\"Cod\",\"Coelacanth\",\"Cockscomb Cup Coral\",\"Common Fangtooth\",\"Conch\",\"Cookiecutter Shark\",\"Copepod\",\"Coral\",\"Corydoras\",\"Cownose Ray\",\"Crab\",\"Crown-of-Thorns Starfish\",\"Cushion Star\",\"Cuttlefish\",\"California Sea Otters\",\"Dolphin\",\"Dolphinfish\",\"Dory\",\"Devil Fish\",\"Dugong\",\"Dumbo Octopus\",\"Dungeness Crab\",\"Eccentric Sand Dollar\",\"Edible Sea Cucumber\",\"Eel\",\"Elephant Seal\",\"Elkhorn Coral\",\"Emperor Shrimp\",\"Estuarine Crocodile\",\"Fathead Sculpin\",\"Fiddler Crab\",\"Fin Whale\",\"Flameback\",\"Flamingo Tongue Snail\",\"Flashlight Fish\",\"Flatback Turtle\",\"Flatfish\",\"Flying Fish\",\"Flounder\",\"Fluke\",\"French Angelfish\",\"Frilled Shark\",\"Fugu (also called Pufferfish)\",\"Gar\",\"Geoduck\",\"Giant Barrel Sponge\",\"Giant Caribbean Sea Anemone\",\"Giant Clam\",\"Giant Isopod\",\"Giant Kingfish\",\"Giant Oarfish\",\"Giant Pacific Octopus\",\"Giant Pyrosome\",\"Giant Sea Star\",\"Giant Squid\",\"Glowing Sucker Octopus\",\"Giant Tube Worm\",\"Goblin Shark\",\"Goosefish\",\"Great White Shark\",\"Greenland Shark\",\"Grey Atlantic Seal\",\"Grouper\",\"Grunion\",\"Guineafowl Puffer\",\"Haddock\",\"Hake\",\"Halibut\",\"Hammerhead Shark\",\"Hapuka\",\"Harbor Porpoise\",\"Harbor Seal\",\"Hatchetfish\",\"Hawaiian Monk Seal\",\"Hawksbill Turtle\",\"Hector's Dolphin\",\"Hermit Crab\",\"Herring\",\"Hoki\",\"Horn Shark\",\"Horseshoe Crab\",\"Humpback Anglerfish\",\"Humpback Whale\",\"Icefish\",\"Imperator Angelfish\",\"Irukandji Jellyfish\",\"Isopod\",\"Ivory Bush Coral\",\"Japanese Spider Crab\",\"Jellyfish\",\"John Dory\",\"Juan Fernandez Fur Seal\",\"Killer Whale\",\"Kiwa Hirsuta\",\"Krill\",\"Lagoon Triggerfish\",\"Lamprey\",\"Leafy Seadragon\",\"Leopard Seal\",\"Limpet\",\"Ling\",\"Lionfish\",\"Lions Mane Jellyfish\",\"Lobe Coral\",\"Lobster\",\"Loggerhead Turtle\",\"Longnose Sawshark\",\"Longsnout Seahorse\",\"Lophelia Coral\",\"Marrus Orthocanna\",\"Manatee\",\"Manta Ray\",\"Marlin\",\"Megamouth Shark\",\"Mexican Lookdown\",\"Mimic Octopus\",\"Moon Jelly\",\"Mollusk\",\"Monkfish\",\"Moray Eel\",\"Mullet\",\"Mussel\",\"Megaladon\",\"Napoleon Wrasse\",\"Nassau Grouper\",\"Narwhal\",\"Nautilus\",\"Needlefish\",\"Northern Seahorse\",\"North Atlantic Right Whale\",\"Northern Red Snapper\",\"Norway Lobster\",\"Nudibranch\",\"Nurse Shark\",\"Oarfish\",\"Ocean Sunfish\",\"Oceanic Whitetip Shark\",\"Octopus\",\"Olive Sea Snake\",\"Orange Roughy\",\"Ostracod\",\"Otter\",\"Oyster\",\"Pacific Angelshark\",\"Pacific Blackdragon\",\"Pacific Halibut\",\"Pacific Sardine\",\"Pacific Sea Nettle Jellyfish\",\"Pacific White Sided Dolphin\",\"Pantropical Spotted Dolphin\",\"Patagonian Toothfish\",\"Peacock Mantis Shrimp\",\"Pelagic Thresher Shark\",\"Penguin\",\"Peruvian Anchoveta\",\"Pilchard\",\"Pink Salmon\",\"Pinniped\",\"Plankton\",\"Porpoise\",\"Polar Bear\",\"Portuguese Man o' War\",\"Pycnogonid Sea Spider\",\"Quahog\",\"Queen Angelfish\",\"Queen Conch\",\"Queen Parrotfish\",\"Queensland Grouper\",\"Ragfish\",\"Ratfish\",\"Rattail Fish\",\"Ray\",\"Red Drum\",\"Red King Crab\",\"Ringed Seal\",\"Risso's Dolphin\",\"Ross Seals\",\"Sablefish\",\"Salmon\",\"Sand Dollar\",\"Sandbar Shark\",\"Sawfish\",\"Sarcastic Fringehead\",\"Scalloped Hammerhead Shark\",\"Seahorse\",\"Sea Cucumber\",\"Sea Lion\",\"Sea Urchin\",\"Seal\",\"Shark\",\"Shortfin Mako Shark\",\"Shovelnose Guitarfish\",\"Shrimp\",\"Silverside Fish\",\"Skipjack Tuna\",\"Slender Snipe Eel\",\"Smalltooth Sawfish\",\"Smelts\",\"Sockeye Salmon\",\"Southern Stingray\",\"Sponge\",\"Spotted Porcupinefish\",\"Spotted Dolphin\",\"Spotted Eagle Ray\",\"Spotted Moray\",\"Squid\",\"Squidworm\",\"Starfish\",\"Stickleback\",\"Stonefish\",\"Stoplight Loosejaw\",\"Sturgeon\",\"Swordfish\",\"Tan Bristlemouth\",\"Tasseled Wobbegong\",\"Terrible Claw Lobster\",\"Threespot Damselfish\",\"Tiger Prawn\",\"Tiger Shark\",\"Tilefish\",\"Toadfish\",\"Tropical Two-Wing Flyfish\",\"Tuna\",\"Umbrella Squid\",\"Velvet Crab\",\"Venus Flytrap Sea Anemone\",\"Vigtorniella Worm\",\"Viperfish\",\"Vampire Squid\",\"Vaquita\",\"Wahoo\",\"Walrus\",\"West Indian Manatee\",\"Whale\",\"Whale Shark\",\"Whiptail Gulper\",\"White-Beaked Dolphin\",\"White-Ring Garden Eel\",\"White Shrimp\",\"Wobbegong\",\"Wrasse\",\"Wreckfish\",\"Xiphosura\",\"Yellowtail Damselfish\",\"Yelloweye Rockfish\",\"Yellow Cup Black Coral\",\"Yellow Tube Sponge\",\"Yellowfin Tuna\",\"Zebrashark\",\"Zooplankton\"],\n //list of desert, grassland, and forest animals comes from http://www.skyenimals.com/\n \"desert\" : [\"Aardwolf\",\"Addax\",\"African Wild Ass\",\"Ant\",\"Antelope\",\"Armadillo\",\"Baboon\",\"Badger\",\"Bat\",\"Bearded Dragon\",\"Beetle\",\"Bird\",\"Black-footed Cat\",\"Boa\",\"Brown Bear\",\"Bustard\",\"Butterfly\",\"Camel\",\"Caracal\",\"Caracara\",\"Caterpillar\",\"Centipede\",\"Cheetah\",\"Chipmunk\",\"Chuckwalla\",\"Climbing Mouse\",\"Coati\",\"Cobra\",\"Cotton Rat\",\"Cougar\",\"Courser\",\"Crane Fly\",\"Crow\",\"Dassie Rat\",\"Dove\",\"Dunnart\",\"Eagle\",\"Echidna\",\"Elephant\",\"Emu\",\"Falcon\",\"Fly\",\"Fox\",\"Frogmouth\",\"Gecko\",\"Geoffroy's Cat\",\"Gerbil\",\"Grasshopper\",\"Guanaco\",\"Gundi\",\"Hamster\",\"Hawk\",\"Hedgehog\",\"Hyena\",\"Hyrax\",\"Jackal\",\"Kangaroo\",\"Kangaroo Rat\",\"Kestrel\",\"Kowari\",\"Kultarr\",\"Leopard\",\"Lion\",\"Macaw\",\"Meerkat\",\"Mouse\",\"Oryx\",\"Ostrich\",\"Owl\",\"Pronghorn\",\"Python\",\"Rabbit\",\"Raccoon\",\"Rattlesnake\",\"Rhinoceros\",\"Sand Cat\",\"Spectacled Bear\",\"Spiny Mouse\",\"Starling\",\"Stick Bug\",\"Tarantula\",\"Tit\",\"Toad\",\"Tortoise\",\"Tyrant Flycatcher\",\"Viper\",\"Vulture\",\"Waxwing\",\"Xerus\",\"Zebra\"],\n \"grassland\" : [\"Aardvark\",\"Aardwolf\",\"Accentor\",\"African Buffalo\",\"African Wild Dog\",\"Alpaca\",\"Anaconda\",\"Ant\",\"Anteater\",\"Antelope\",\"Armadillo\",\"Baboon\",\"Badger\",\"Bandicoot\",\"Barbet\",\"Bat\",\"Bee\",\"Bee-eater\",\"Beetle\",\"Bird\",\"Bison\",\"Black-footed Cat\",\"Black-footed Ferret\",\"Bluebird\",\"Boa\",\"Bowerbird\",\"Brown Bear\",\"Bush Dog\",\"Bushshrike\",\"Bustard\",\"Butterfly\",\"Buzzard\",\"Caracal\",\"Caracara\",\"Cardinal\",\"Caterpillar\",\"Cheetah\",\"Chipmunk\",\"Civet\",\"Climbing Mouse\",\"Clouded Leopard\",\"Coati\",\"Cobra\",\"Cockatoo\",\"Cockroach\",\"Common Genet\",\"Cotton Rat\",\"Cougar\",\"Courser\",\"Coyote\",\"Crane\",\"Crane Fly\",\"Cricket\",\"Crow\",\"Culpeo\",\"Death Adder\",\"Deer\",\"Deer Mouse\",\"Dingo\",\"Dinosaur\",\"Dove\",\"Drongo\",\"Duck\",\"Duiker\",\"Dunnart\",\"Eagle\",\"Echidna\",\"Elephant\",\"Elk\",\"Emu\",\"Falcon\",\"Finch\",\"Flea\",\"Fly\",\"Flying Frog\",\"Fox\",\"Frog\",\"Frogmouth\",\"Garter Snake\",\"Gazelle\",\"Gecko\",\"Geoffroy's Cat\",\"Gerbil\",\"Giant Tortoise\",\"Giraffe\",\"Grasshopper\",\"Grison\",\"Groundhog\",\"Grouse\",\"Guanaco\",\"Guinea Pig\",\"Hamster\",\"Harrier\",\"Hartebeest\",\"Hawk\",\"Hedgehog\",\"Helmetshrike\",\"Hippopotamus\",\"Hornbill\",\"Hyena\",\"Hyrax\",\"Impala\",\"Jackal\",\"Jaguar\",\"Jaguarundi\",\"Kangaroo\",\"Kangaroo Rat\",\"Kestrel\",\"Kultarr\",\"Ladybug\",\"Leopard\",\"Lion\",\"Macaw\",\"Meerkat\",\"Mouse\",\"Newt\",\"Oryx\",\"Ostrich\",\"Owl\",\"Pangolin\",\"Pheasant\",\"Prairie Dog\",\"Pronghorn\",\"Przewalski's Horse\",\"Python\",\"Quoll\",\"Rabbit\",\"Raven\",\"Rhinoceros\",\"Shelduck\",\"Sloth Bear\",\"Spectacled Bear\",\"Squirrel\",\"Starling\",\"Stick Bug\",\"Tamandua\",\"Tasmanian Devil\",\"Thornbill\",\"Thrush\",\"Toad\",\"Tortoise\"],\n \"forest\" : [\"Agouti\",\"Anaconda\",\"Anoa\",\"Ant\",\"Anteater\",\"Antelope\",\"Armadillo\",\"Asian Black Bear\",\"Aye-aye\",\"Babirusa\",\"Baboon\",\"Badger\",\"Bandicoot\",\"Banteng\",\"Barbet\",\"Basilisk\",\"Bat\",\"Bearded Dragon\",\"Bee\",\"Bee-eater\",\"Beetle\",\"Bettong\",\"Binturong\",\"Bird-of-paradise\",\"Bongo\",\"Bowerbird\",\"Bulbul\",\"Bush Dog\",\"Bushbaby\",\"Bushshrike\",\"Butterfly\",\"Buzzard\",\"Caecilian\",\"Cardinal\",\"Cassowary\",\"Caterpillar\",\"Centipede\",\"Chameleon\",\"Chimpanzee\",\"Cicada\",\"Civet\",\"Clouded Leopard\",\"Coati\",\"Cobra\",\"Cockatoo\",\"Cockroach\",\"Colugo\",\"Cotinga\",\"Cotton Rat\",\"Cougar\",\"Crane Fly\",\"Cricket\",\"Crocodile\",\"Crow\",\"Cuckoo\",\"Cuscus\",\"Death Adder\",\"Deer\",\"Dhole\",\"Dingo\",\"Dinosaur\",\"Drongo\",\"Duck\",\"Duiker\",\"Eagle\",\"Echidna\",\"Elephant\",\"Finch\",\"Flat-headed Cat\",\"Flea\",\"Flowerpecker\",\"Fly\",\"Flying Frog\",\"Fossa\",\"Frog\",\"Frogmouth\",\"Gaur\",\"Gecko\",\"Gorilla\",\"Grison\",\"Hawaiian Honeycreeper\",\"Hawk\",\"Hedgehog\",\"Helmetshrike\",\"Hornbill\",\"Hyrax\",\"Iguana\",\"Jackal\",\"Jaguar\",\"Jaguarundi\",\"Kestrel\",\"Ladybug\",\"Lemur\",\"Leopard\",\"Lion\",\"Macaw\",\"Mandrill\",\"Margay\",\"Monkey\",\"Mouse\",\"Mouse Deer\",\"Newt\",\"Okapi\",\"Old World Flycatcher\",\"Orangutan\",\"Owl\",\"Pangolin\",\"Peafowl\",\"Pheasant\",\"Possum\",\"Python\",\"Quokka\",\"Rabbit\",\"Raccoon\",\"Red Panda\",\"Red River Hog\",\"Rhinoceros\",\"Sloth Bear\",\"Spectacled Bear\",\"Squirrel\",\"Starling\",\"Stick Bug\",\"Sun Bear\",\"Tamandua\",\"Tamarin\",\"Tapir\",\"Tarantula\",\"Thrush\",\"Tiger\",\"Tit\",\"Toad\",\"Tortoise\",\"Toucan\",\"Trogon\",\"Trumpeter\",\"Turaco\",\"Turtle\",\"Tyrant Flycatcher\",\"Viper\",\"Vulture\",\"Wallaby\",\"Warbler\",\"Wasp\",\"Waxwing\",\"Weaver\",\"Weaver-finch\",\"Whistler\",\"White-eye\",\"Whydah\",\"Woodswallow\",\"Worm\",\"Wren\",\"Xenops\",\"Yellowjacket\",\"Accentor\",\"African Buffalo\",\"American Black Bear\",\"Anole\",\"Bird\",\"Bison\",\"Boa\",\"Brown Bear\",\"Chipmunk\",\"Common Genet\",\"Copperhead\",\"Coyote\",\"Deer Mouse\",\"Dormouse\",\"Elk\",\"Emu\",\"Fisher\",\"Fox\",\"Garter Snake\",\"Giant Panda\",\"Giant Tortoise\",\"Groundhog\",\"Grouse\",\"Guanaco\",\"Himalayan Tahr\",\"Kangaroo\",\"Koala\",\"Numbat\",\"Quoll\",\"Raccoon dog\",\"Tasmanian Devil\",\"Thornbill\",\"Turkey\",\"Vole\",\"Weasel\",\"Wildcat\",\"Wolf\",\"Wombat\",\"Woodchuck\",\"Woodpecker\"],\n //list of farm animals comes from https://www.buzzle.com/articles/farm-animals-list.html\n \"farm\" : [\"Alpaca\",\"Buffalo\",\"Banteng\",\"Cow\",\"Cat\",\"Chicken\",\"Carp\",\"Camel\",\"Donkey\",\"Dog\",\"Duck\",\"Emu\",\"Goat\",\"Gayal\",\"Guinea\",\"Goose\",\"Horse\",\"Honey\",\"Llama\",\"Pig\",\"Pigeon\",\"Rhea\",\"Rabbit\",\"Sheep\",\"Silkworm\",\"Turkey\",\"Yak\",\"Zebu\"],\n //list of pet animals comes from https://www.dogbreedinfo.com/pets/pet.htm\n \"pet\" : [\"Bearded Dragon\",\"Birds\",\"Burro\",\"Cats\",\"Chameleons\",\"Chickens\",\"Chinchillas\",\"Chinese Water Dragon\",\"Cows\",\"Dogs\",\"Donkey\",\"Ducks\",\"Ferrets\",\"Fish\",\"Geckos\",\"Geese\",\"Gerbils\",\"Goats\",\"Guinea Fowl\",\"Guinea Pigs\",\"Hamsters\",\"Hedgehogs\",\"Horses\",\"Iguanas\",\"Llamas\",\"Lizards\",\"Mice\",\"Mule\",\"Peafowl\",\"Pigs and Hogs\",\"Pigeons\",\"Ponies\",\"Pot Bellied Pig\",\"Rabbits\",\"Rats\",\"Sheep\",\"Skinks\",\"Snakes\",\"Stick Insects\",\"Sugar Gliders\",\"Tarantula\",\"Turkeys\",\"Turtles\"],\n //list of zoo animals comes from https://bronxzoo.com/animals\n \"zoo\" : [\"Aardvark\",\"African Wild Dog\",\"Aldabra Tortoise\",\"American Alligator\",\"American Bison\",\"Amur Tiger\",\"Anaconda\",\"Andean Condor\",\"Asian Elephant\",\"Baby Doll Sheep\",\"Bald Eagle\",\"Barred Owl\",\"Blue Iguana\",\"Boer Goat\",\"California Sea Lion\",\"Caribbean Flamingo\",\"Chinchilla\",\"Collared Lemur\",\"Coquerel's Sifaka\",\"Cuban Amazon Parrot\",\"Ebony Langur\",\"Fennec Fox\",\"Fossa\",\"Gelada\",\"Giant Anteater\",\"Giraffe\",\"Gorilla\",\"Grizzly Bear\",\"Henkel's Leaf-tailed Gecko\",\"Indian Gharial\",\"Indian Rhinoceros\",\"King Cobra\",\"King Vulture\",\"Komodo Dragon\",\"Linne's Two-toed Sloth\",\"Lion\",\"Little Penguin\",\"Madagascar Tree Boa\",\"Magellanic Penguin\",\"Malayan Tapir\",\"Malayan Tiger\",\"Matschies Tree Kangaroo\",\"Mini Donkey\",\"Monarch Butterfly\",\"Nile crocodile\",\"North American Porcupine\",\"Nubian Ibex\",\"Okapi\",\"Poison Dart Frog\",\"Polar Bear\",\"Pygmy Marmoset\",\"Radiated Tortoise\",\"Red Panda\",\"Red Ruffed Lemur\",\"Ring-tailed Lemur\",\"Ring-tailed Mongoose\",\"Rock Hyrax\",\"Small Clawed Asian Otter\",\"Snow Leopard\",\"Snowy Owl\",\"Southern White-faced Owl\",\"Southern White Rhinocerous\",\"Squirrel Monkey\",\"Tufted Puffin\",\"White Cheeked Gibbon\",\"White-throated Bee Eater\",\"Zebra\"]\n },\n primes: [\n // 1230 first primes, i.e. all primes up to the first one greater than 10000, inclusive.\n 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007\n ],\n emotions: [\n \"love\",\n \"joy\",\n \"surprise\",\n \"anger\",\n \"sadness\",\n \"fear\"\n ],\n };\n\n var o_hasOwnProperty = Object.prototype.hasOwnProperty;\n var o_keys = (Object.keys || function(obj) {\n var result = [];\n for (var key in obj) {\n if (o_hasOwnProperty.call(obj, key)) {\n result.push(key);\n }\n }\n\n return result;\n });\n\n\n function _copyObject(source, target) {\n var keys = o_keys(source);\n var key;\n\n for (var i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n target[key] = source[key] || target[key];\n }\n }\n\n function _copyArray(source, target) {\n for (var i = 0, l = source.length; i < l; i++) {\n target[i] = source[i];\n }\n }\n\n function copyObject(source, _target) {\n var isArray = Array.isArray(source);\n var target = _target || (isArray ? new Array(source.length) : {});\n\n if (isArray) {\n _copyArray(source, target);\n } else {\n _copyObject(source, target);\n }\n\n return target;\n }\n\n /** Get the data based on key**/\n Chance.prototype.get = function (name) {\n return copyObject(data[name]);\n };\n\n // Mac Address\n Chance.prototype.mac_address = function(options){\n // typically mac addresses are separated by \":\"\n // however they can also be separated by \"-\"\n // the network variant uses a dot every fourth byte\n\n options = initOptions(options);\n if(!options.separator) {\n options.separator = options.networkVersion ? \".\" : \":\";\n }\n\n var mac_pool=\"ABCDEF1234567890\",\n mac = \"\";\n if(!options.networkVersion) {\n mac = this.n(this.string, 6, { pool: mac_pool, length:2 }).join(options.separator);\n } else {\n mac = this.n(this.string, 3, { pool: mac_pool, length:4 }).join(options.separator);\n }\n\n return mac;\n };\n\n Chance.prototype.normal = function (options) {\n options = initOptions(options, {mean : 0, dev : 1, pool : []});\n\n testRange(\n options.pool.constructor !== Array,\n \"Chance: The pool option must be a valid array.\"\n );\n testRange(\n typeof options.mean !== 'number',\n \"Chance: Mean (mean) must be a number\"\n );\n testRange(\n typeof options.dev !== 'number',\n \"Chance: Standard deviation (dev) must be a number\"\n );\n\n // If a pool has been passed, then we are returning an item from that pool,\n // using the normal distribution settings that were passed in\n if (options.pool.length > 0) {\n return this.normal_pool(options);\n }\n\n // The Marsaglia Polar method\n var s, u, v, norm,\n mean = options.mean,\n dev = options.dev;\n\n do {\n // U and V are from the uniform distribution on (-1, 1)\n u = this.random() * 2 - 1;\n v = this.random() * 2 - 1;\n\n s = u * u + v * v;\n } while (s >= 1);\n\n // Compute the standard normal variate\n norm = u * Math.sqrt(-2 * Math.log(s) / s);\n\n // Shape and scale\n return dev * norm + mean;\n };\n\n Chance.prototype.normal_pool = function(options) {\n var performanceCounter = 0;\n do {\n var idx = Math.round(this.normal({ mean: options.mean, dev: options.dev }));\n if (idx < options.pool.length && idx >= 0) {\n return options.pool[idx];\n } else {\n performanceCounter++;\n }\n } while(performanceCounter < 100);\n\n throw new RangeError(\"Chance: Your pool is too small for the given mean and standard deviation. Please adjust.\");\n };\n\n Chance.prototype.radio = function (options) {\n // Initial Letter (Typically Designated by Side of Mississippi River)\n options = initOptions(options, {side : \"?\"});\n var fl = \"\";\n switch (options.side.toLowerCase()) {\n case \"east\":\n case \"e\":\n fl = \"W\";\n break;\n case \"west\":\n case \"w\":\n fl = \"K\";\n break;\n default:\n fl = this.character({pool: \"KW\"});\n break;\n }\n\n return fl + this.character({alpha: true, casing: \"upper\"}) +\n this.character({alpha: true, casing: \"upper\"}) +\n this.character({alpha: true, casing: \"upper\"});\n };\n\n // Set the data as key and data or the data map\n Chance.prototype.set = function (name, values) {\n if (typeof name === \"string\") {\n data[name] = values;\n } else {\n data = copyObject(name, data);\n }\n };\n\n Chance.prototype.tv = function (options) {\n return this.radio(options);\n };\n\n // ID number for Brazil companies\n Chance.prototype.cnpj = function () {\n var n = this.n(this.natural, 8, { max: 9 });\n var d1 = 2+n[7]*6+n[6]*7+n[5]*8+n[4]*9+n[3]*2+n[2]*3+n[1]*4+n[0]*5;\n d1 = 11 - (d1 % 11);\n if (d1>=10){\n d1 = 0;\n }\n var d2 = d1*2+3+n[7]*7+n[6]*8+n[5]*9+n[4]*2+n[3]*3+n[2]*4+n[1]*5+n[0]*6;\n d2 = 11 - (d2 % 11);\n if (d2>=10){\n d2 = 0;\n }\n return ''+n[0]+n[1]+'.'+n[2]+n[3]+n[4]+'.'+n[5]+n[6]+n[7]+'/0001-'+d1+d2;\n };\n\n Chance.prototype.emotion = function () {\n return this.pick(this.get(\"emotions\"));\n };\n\n // -- End Miscellaneous --\n\n Chance.prototype.mersenne_twister = function (seed) {\n return new MersenneTwister(seed);\n };\n\n Chance.prototype.blueimp_md5 = function () {\n return new BlueImpMD5();\n };\n\n // Mersenne Twister from https://gist.github.com/banksean/300494\n /*\n A C-program for MT19937, with initialization improved 2002/1/26.\n Coded by Takuji Nishimura and Makoto Matsumoto.\n\n Before using, initialize the state by using init_genrand(seed)\n or init_by_array(init_key, key_length).\n\n Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n 3. The names of its contributors may not be used to endorse or promote\n products derived from this software without specific prior written\n permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n Any feedback is very welcome.\n http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html\n email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)\n */\n var MersenneTwister = function (seed) {\n if (seed === undefined) {\n // kept random number same size as time used previously to ensure no unexpected results downstream\n seed = Math.floor(Math.random()*Math.pow(10,13));\n }\n /* Period parameters */\n this.N = 624;\n this.M = 397;\n this.MATRIX_A = 0x9908b0df; /* constant vector a */\n this.UPPER_MASK = 0x80000000; /* most significant w-r bits */\n this.LOWER_MASK = 0x7fffffff; /* least significant r bits */\n\n this.mt = new Array(this.N); /* the array for the state vector */\n this.mti = this.N + 1; /* mti==N + 1 means mt[N] is not initialized */\n\n this.init_genrand(seed);\n };\n\n /* initializes mt[N] with a seed */\n MersenneTwister.prototype.init_genrand = function (s) {\n this.mt[0] = s >>> 0;\n for (this.mti = 1; this.mti < this.N; this.mti++) {\n s = this.mt[this.mti - 1] ^ (this.mt[this.mti - 1] >>> 30);\n this.mt[this.mti] = (((((s & 0xffff0000) >>> 16) * 1812433253) << 16) + (s & 0x0000ffff) * 1812433253) + this.mti;\n /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */\n /* In the previous versions, MSBs of the seed affect */\n /* only MSBs of the array mt[]. */\n /* 2002/01/09 modified by Makoto Matsumoto */\n this.mt[this.mti] >>>= 0;\n /* for >32 bit machines */\n }\n };\n\n /* initialize by an array with array-length */\n /* init_key is the array for initializing keys */\n /* key_length is its length */\n /* slight change for C++, 2004/2/26 */\n MersenneTwister.prototype.init_by_array = function (init_key, key_length) {\n var i = 1, j = 0, k, s;\n this.init_genrand(19650218);\n k = (this.N > key_length ? this.N : key_length);\n for (; k; k--) {\n s = this.mt[i - 1] ^ (this.mt[i - 1] >>> 30);\n this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1664525) << 16) + ((s & 0x0000ffff) * 1664525))) + init_key[j] + j; /* non linear */\n this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */\n i++;\n j++;\n if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; }\n if (j >= key_length) { j = 0; }\n }\n for (k = this.N - 1; k; k--) {\n s = this.mt[i - 1] ^ (this.mt[i - 1] >>> 30);\n this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1566083941) << 16) + (s & 0x0000ffff) * 1566083941)) - i; /* non linear */\n this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */\n i++;\n if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; }\n }\n\n this.mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */\n };\n\n /* generates a random number on [0,0xffffffff]-interval */\n MersenneTwister.prototype.genrand_int32 = function () {\n var y;\n var mag01 = new Array(0x0, this.MATRIX_A);\n /* mag01[x] = x * MATRIX_A for x=0,1 */\n\n if (this.mti >= this.N) { /* generate N words at one time */\n var kk;\n\n if (this.mti === this.N + 1) { /* if init_genrand() has not been called, */\n this.init_genrand(5489); /* a default initial seed is used */\n }\n for (kk = 0; kk < this.N - this.M; kk++) {\n y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk + 1]&this.LOWER_MASK);\n this.mt[kk] = this.mt[kk + this.M] ^ (y >>> 1) ^ mag01[y & 0x1];\n }\n for (;kk < this.N - 1; kk++) {\n y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk + 1]&this.LOWER_MASK);\n this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ (y >>> 1) ^ mag01[y & 0x1];\n }\n y = (this.mt[this.N - 1]&this.UPPER_MASK)|(this.mt[0]&this.LOWER_MASK);\n this.mt[this.N - 1] = this.mt[this.M - 1] ^ (y >>> 1) ^ mag01[y & 0x1];\n\n this.mti = 0;\n }\n\n y = this.mt[this.mti++];\n\n /* Tempering */\n y ^= (y >>> 11);\n y ^= (y << 7) & 0x9d2c5680;\n y ^= (y << 15) & 0xefc60000;\n y ^= (y >>> 18);\n\n return y >>> 0;\n };\n\n /* generates a random number on [0,0x7fffffff]-interval */\n MersenneTwister.prototype.genrand_int31 = function () {\n return (this.genrand_int32() >>> 1);\n };\n\n /* generates a random number on [0,1]-real-interval */\n MersenneTwister.prototype.genrand_real1 = function () {\n return this.genrand_int32() * (1.0 / 4294967295.0);\n /* divided by 2^32-1 */\n };\n\n /* generates a random number on [0,1)-real-interval */\n MersenneTwister.prototype.random = function () {\n return this.genrand_int32() * (1.0 / 4294967296.0);\n /* divided by 2^32 */\n };\n\n /* generates a random number on (0,1)-real-interval */\n MersenneTwister.prototype.genrand_real3 = function () {\n return (this.genrand_int32() + 0.5) * (1.0 / 4294967296.0);\n /* divided by 2^32 */\n };\n\n /* generates a random number on [0,1) with 53-bit resolution*/\n MersenneTwister.prototype.genrand_res53 = function () {\n var a = this.genrand_int32()>>>5, b = this.genrand_int32()>>>6;\n return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0);\n };\n\n // BlueImp MD5 hashing algorithm from https://github.com/blueimp/JavaScript-MD5\n var BlueImpMD5 = function () {};\n\n BlueImpMD5.prototype.VERSION = '1.0.1';\n\n /*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n BlueImpMD5.prototype.safe_add = function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n };\n\n /*\n * Bitwise rotate a 32-bit number to the left.\n */\n BlueImpMD5.prototype.bit_roll = function (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt));\n };\n\n /*\n * These functions implement the five basic operations the algorithm uses.\n */\n BlueImpMD5.prototype.md5_cmn = function (q, a, b, x, s, t) {\n return this.safe_add(this.bit_roll(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b);\n };\n BlueImpMD5.prototype.md5_ff = function (a, b, c, d, x, s, t) {\n return this.md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_gg = function (a, b, c, d, x, s, t) {\n return this.md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_hh = function (a, b, c, d, x, s, t) {\n return this.md5_cmn(b ^ c ^ d, a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_ii = function (a, b, c, d, x, s, t) {\n return this.md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\n };\n\n /*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n BlueImpMD5.prototype.binl_md5 = function (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = this.md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = this.md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = this.md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = this.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = this.md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = this.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = this.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = this.md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = this.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = this.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = this.md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = this.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = this.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = this.md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = this.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = this.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = this.md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = this.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = this.md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = this.md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = this.md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = this.md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = this.md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = this.md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = this.md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = this.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = this.md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = this.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = this.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = this.md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = this.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = this.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = this.md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = this.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = this.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = this.md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = this.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = this.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = this.md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = this.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = this.md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = this.md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = this.md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = this.md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = this.md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = this.md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = this.md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = this.md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = this.md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = this.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = this.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = this.md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = this.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = this.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = this.md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = this.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = this.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = this.md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = this.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = this.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = this.md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = this.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = this.md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = this.md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = this.safe_add(a, olda);\n b = this.safe_add(b, oldb);\n c = this.safe_add(c, oldc);\n d = this.safe_add(d, oldd);\n }\n return [a, b, c, d];\n };\n\n /*\n * Convert an array of little-endian words to a string\n */\n BlueImpMD5.prototype.binl2rstr = function (input) {\n var i,\n output = '';\n for (i = 0; i < input.length * 32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF);\n }\n return output;\n };\n\n /*\n * Convert a raw string to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n BlueImpMD5.prototype.rstr2binl = function (input) {\n var i,\n output = [];\n output[(input.length >> 2) - 1] = undefined;\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < input.length * 8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32);\n }\n return output;\n };\n\n /*\n * Calculate the MD5 of a raw string\n */\n BlueImpMD5.prototype.rstr_md5 = function (s) {\n return this.binl2rstr(this.binl_md5(this.rstr2binl(s), s.length * 8));\n };\n\n /*\n * Calculate the HMAC-MD5, of a key and some data (raw strings)\n */\n BlueImpMD5.prototype.rstr_hmac_md5 = function (key, data) {\n var i,\n bkey = this.rstr2binl(key),\n ipad = [],\n opad = [],\n hash;\n ipad[15] = opad[15] = undefined;\n if (bkey.length > 16) {\n bkey = this.binl_md5(bkey, key.length * 8);\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636;\n opad[i] = bkey[i] ^ 0x5C5C5C5C;\n }\n hash = this.binl_md5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8);\n return this.binl2rstr(this.binl_md5(opad.concat(hash), 512 + 128));\n };\n\n /*\n * Convert a raw string to a hex string\n */\n BlueImpMD5.prototype.rstr2hex = function (input) {\n var hex_tab = '0123456789abcdef',\n output = '',\n x,\n i;\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i);\n output += hex_tab.charAt((x >>> 4) & 0x0F) +\n hex_tab.charAt(x & 0x0F);\n }\n return output;\n };\n\n /*\n * Encode a string as utf-8\n */\n BlueImpMD5.prototype.str2rstr_utf8 = function (input) {\n return unescape(encodeURIComponent(input));\n };\n\n /*\n * Take string arguments and return either raw or hex encoded strings\n */\n BlueImpMD5.prototype.raw_md5 = function (s) {\n return this.rstr_md5(this.str2rstr_utf8(s));\n };\n BlueImpMD5.prototype.hex_md5 = function (s) {\n return this.rstr2hex(this.raw_md5(s));\n };\n BlueImpMD5.prototype.raw_hmac_md5 = function (k, d) {\n return this.rstr_hmac_md5(this.str2rstr_utf8(k), this.str2rstr_utf8(d));\n };\n BlueImpMD5.prototype.hex_hmac_md5 = function (k, d) {\n return this.rstr2hex(this.raw_hmac_md5(k, d));\n };\n\n BlueImpMD5.prototype.md5 = function (string, key, raw) {\n if (!key) {\n if (!raw) {\n return this.hex_md5(string);\n }\n\n return this.raw_md5(string);\n }\n\n if (!raw) {\n return this.hex_hmac_md5(key, string);\n }\n\n return this.raw_hmac_md5(key, string);\n };\n\n // CommonJS module\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = Chance;\n }\n exports.Chance = Chance;\n }\n\n // Register as an anonymous AMD module\n if (typeof define === 'function' && define.amd) {\n define([], function () {\n return Chance;\n });\n }\n\n // if there is a importsScrips object define chance for worker\n // allows worker to use full Chance functionality with seed\n if (typeof importScripts !== 'undefined') {\n chance = new Chance();\n self.Chance = Chance;\n }\n\n // If there is a window object, that at least has a document property,\n // instantiate and define chance on the window\n if (typeof window === \"object\" && typeof window.document === \"object\") {\n window.Chance = Chance;\n window.chance = new Chance();\n }\n})();\n","exports = module.exports = Victor;\n\n/**\n * # Victor - A JavaScript 2D vector class with methods for common vector operations\n */\n\n/**\n * Constructor. Will also work without the `new` keyword\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = Victor(42, 1337);\n *\n * @param {Number} x Value of the x axis\n * @param {Number} y Value of the y axis\n * @return {Victor}\n * @api public\n */\nfunction Victor (x, y) {\n\tif (!(this instanceof Victor)) {\n\t\treturn new Victor(x, y);\n\t}\n\n\t/**\n\t * The X axis\n\t *\n\t * ### Examples:\n\t * var vec = new Victor.fromArray(42, 21);\n\t *\n\t * vec.x;\n\t * // => 42\n\t *\n\t * @api public\n\t */\n\tthis.x = x || 0;\n\n\t/**\n\t * The Y axis\n\t *\n\t * ### Examples:\n\t * var vec = new Victor.fromArray(42, 21);\n\t *\n\t * vec.y;\n\t * // => 21\n\t *\n\t * @api public\n\t */\n\tthis.y = y || 0;\n};\n\n/**\n * # Static\n */\n\n/**\n * Creates a new instance from an array\n *\n * ### Examples:\n * var vec = Victor.fromArray([42, 21]);\n *\n * vec.toString();\n * // => x:42, y:21\n *\n * @name Victor.fromArray\n * @param {Array} array Array with the x and y values at index 0 and 1 respectively\n * @return {Victor} The new instance\n * @api public\n */\nVictor.fromArray = function (arr) {\n\treturn new Victor(arr[0] || 0, arr[1] || 0);\n};\n\n/**\n * Creates a new instance from an object\n *\n * ### Examples:\n * var vec = Victor.fromObject({ x: 42, y: 21 });\n *\n * vec.toString();\n * // => x:42, y:21\n *\n * @name Victor.fromObject\n * @param {Object} obj Object with the values for x and y\n * @return {Victor} The new instance\n * @api public\n */\nVictor.fromObject = function (obj) {\n\treturn new Victor(obj.x || 0, obj.y || 0);\n};\n\n/**\n * # Manipulation\n *\n * These functions are chainable.\n */\n\n/**\n * Adds another vector's X axis to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.addX(vec2);\n * vec1.toString();\n * // => x:30, y:10\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addX = function (vec) {\n\tthis.x += vec.x;\n\treturn this;\n};\n\n/**\n * Adds another vector's Y axis to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.addY(vec2);\n * vec1.toString();\n * // => x:10, y:40\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addY = function (vec) {\n\tthis.y += vec.y;\n\treturn this;\n};\n\n/**\n * Adds another vector to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.add(vec2);\n * vec1.toString();\n * // => x:30, y:40\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.add = function (vec) {\n\tthis.x += vec.x;\n\tthis.y += vec.y;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to both vector axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalar(2);\n * vec.toString();\n * // => x: 3, y: 4\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalar = function (scalar) {\n\tthis.x += scalar;\n\tthis.y += scalar;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to the X axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalarX(2);\n * vec.toString();\n * // => x: 3, y: 2\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalarX = function (scalar) {\n\tthis.x += scalar;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to the Y axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalarY(2);\n * vec.toString();\n * // => x: 1, y: 4\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalarY = function (scalar) {\n\tthis.y += scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the X axis of another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtractX(vec2);\n * vec1.toString();\n * // => x:80, y:50\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractX = function (vec) {\n\tthis.x -= vec.x;\n\treturn this;\n};\n\n/**\n * Subtracts the Y axis of another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtractY(vec2);\n * vec1.toString();\n * // => x:100, y:20\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractY = function (vec) {\n\tthis.y -= vec.y;\n\treturn this;\n};\n\n/**\n * Subtracts another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtract(vec2);\n * vec1.toString();\n * // => x:80, y:20\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtract = function (vec) {\n\tthis.x -= vec.x;\n\tthis.y -= vec.y;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from both axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalar(20);\n * vec.toString();\n * // => x: 80, y: 180\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalar = function (scalar) {\n\tthis.x -= scalar;\n\tthis.y -= scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from the X axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalarX(20);\n * vec.toString();\n * // => x: 80, y: 200\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalarX = function (scalar) {\n\tthis.x -= scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from the Y axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalarY(20);\n * vec.toString();\n * // => x: 100, y: 180\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalarY = function (scalar) {\n\tthis.y -= scalar;\n\treturn this;\n};\n\n/**\n * Divides the X axis by the x component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 0);\n *\n * vec.divideX(vec2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Victor} vector The other vector you want divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideX = function (vector) {\n\tthis.x /= vector.x;\n\treturn this;\n};\n\n/**\n * Divides the Y axis by the y component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(0, 2);\n *\n * vec.divideY(vec2);\n * vec.toString();\n * // => x:100, y:25\n *\n * @param {Victor} vector The other vector you want divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideY = function (vector) {\n\tthis.y /= vector.y;\n\treturn this;\n};\n\n/**\n * Divides both vector axis by a axis values of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 2);\n *\n * vec.divide(vec2);\n * vec.toString();\n * // => x:50, y:25\n *\n * @param {Victor} vector The vector to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divide = function (vector) {\n\tthis.x /= vector.x;\n\tthis.y /= vector.y;\n\treturn this;\n};\n\n/**\n * Divides both vector axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalar(2);\n * vec.toString();\n * // => x:50, y:25\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalar = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.x /= scalar;\n\t\tthis.y /= scalar;\n\t} else {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}\n\n\treturn this;\n};\n\n/**\n * Divides the X axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalarX(2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalarX = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.x /= scalar;\n\t} else {\n\t\tthis.x = 0;\n\t}\n\treturn this;\n};\n\n/**\n * Divides the Y axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalarY(2);\n * vec.toString();\n * // => x:100, y:25\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalarY = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.y /= scalar;\n\t} else {\n\t\tthis.y = 0;\n\t}\n\treturn this;\n};\n\n/**\n * Inverts the X axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invertX();\n * vec.toString();\n * // => x:-100, y:50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invertX = function () {\n\tthis.x *= -1;\n\treturn this;\n};\n\n/**\n * Inverts the Y axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invertY();\n * vec.toString();\n * // => x:100, y:-50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invertY = function () {\n\tthis.y *= -1;\n\treturn this;\n};\n\n/**\n * Inverts both axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invert();\n * vec.toString();\n * // => x:-100, y:-50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invert = function () {\n\tthis.invertX();\n\tthis.invertY();\n\treturn this;\n};\n\n/**\n * Multiplies the X axis by X component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 0);\n *\n * vec.multiplyX(vec2);\n * vec.toString();\n * // => x:200, y:50\n *\n * @param {Victor} vector The vector to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyX = function (vector) {\n\tthis.x *= vector.x;\n\treturn this;\n};\n\n/**\n * Multiplies the Y axis by Y component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(0, 2);\n *\n * vec.multiplyX(vec2);\n * vec.toString();\n * // => x:100, y:100\n *\n * @param {Victor} vector The vector to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyY = function (vector) {\n\tthis.y *= vector.y;\n\treturn this;\n};\n\n/**\n * Multiplies both vector axis by values from a given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 2);\n *\n * vec.multiply(vec2);\n * vec.toString();\n * // => x:200, y:100\n *\n * @param {Victor} vector The vector to multiply by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiply = function (vector) {\n\tthis.x *= vector.x;\n\tthis.y *= vector.y;\n\treturn this;\n};\n\n/**\n * Multiplies both vector axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalar(2);\n * vec.toString();\n * // => x:200, y:100\n *\n * @param {Number} The scalar to multiply by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalar = function (scalar) {\n\tthis.x *= scalar;\n\tthis.y *= scalar;\n\treturn this;\n};\n\n/**\n * Multiplies the X axis by the given scalar\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalarX(2);\n * vec.toString();\n * // => x:200, y:50\n *\n * @param {Number} The scalar to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalarX = function (scalar) {\n\tthis.x *= scalar;\n\treturn this;\n};\n\n/**\n * Multiplies the Y axis by the given scalar\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalarY(2);\n * vec.toString();\n * // => x:100, y:100\n *\n * @param {Number} The scalar to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalarY = function (scalar) {\n\tthis.y *= scalar;\n\treturn this;\n};\n\n/**\n * Normalize\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.normalize = function () {\n\tvar length = this.length();\n\n\tif (length === 0) {\n\t\tthis.x = 1;\n\t\tthis.y = 0;\n\t} else {\n\t\tthis.divide(Victor(length, length));\n\t}\n\treturn this;\n};\n\nVictor.prototype.norm = Victor.prototype.normalize;\n\n/**\n * If the absolute vector axis is greater than `max`, multiplies the axis by `factor`\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.limit(80, 0.9);\n * vec.toString();\n * // => x:90, y:50\n *\n * @param {Number} max The maximum value for both x and y axis\n * @param {Number} factor Factor by which the axis are to be multiplied with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.limit = function (max, factor) {\n\tif (Math.abs(this.x) > max){ this.x *= factor; }\n\tif (Math.abs(this.y) > max){ this.y *= factor; }\n\treturn this;\n};\n\n/**\n * Randomizes both vector axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomize(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:67, y:73\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomize = function (topLeft, bottomRight) {\n\tthis.randomizeX(topLeft, bottomRight);\n\tthis.randomizeY(topLeft, bottomRight);\n\n\treturn this;\n};\n\n/**\n * Randomizes the y axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeX(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:55, y:50\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeX = function (topLeft, bottomRight) {\n\tvar min = Math.min(topLeft.x, bottomRight.x);\n\tvar max = Math.max(topLeft.x, bottomRight.x);\n\tthis.x = random(min, max);\n\treturn this;\n};\n\n/**\n * Randomizes the y axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeY(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:100, y:66\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeY = function (topLeft, bottomRight) {\n\tvar min = Math.min(topLeft.y, bottomRight.y);\n\tvar max = Math.max(topLeft.y, bottomRight.y);\n\tthis.y = random(min, max);\n\treturn this;\n};\n\n/**\n * Randomly randomizes either axis between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeAny(new Victor(50, 60), new Victor(70, 80));\n * vec.toString();\n * // => x:100, y:77\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeAny = function (topLeft, bottomRight) {\n\tif (!! Math.round(Math.random())) {\n\t\tthis.randomizeX(topLeft, bottomRight);\n\t} else {\n\t\tthis.randomizeY(topLeft, bottomRight);\n\t}\n\treturn this;\n};\n\n/**\n * Rounds both axis to an integer value\n *\n * ### Examples:\n * var vec = new Victor(100.2, 50.9);\n *\n * vec.unfloat();\n * vec.toString();\n * // => x:100, y:51\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.unfloat = function () {\n\tthis.x = Math.round(this.x);\n\tthis.y = Math.round(this.y);\n\treturn this;\n};\n\n/**\n * Rounds both axis to a certain precision\n *\n * ### Examples:\n * var vec = new Victor(100.2, 50.9);\n *\n * vec.unfloat();\n * vec.toString();\n * // => x:100, y:51\n *\n * @param {Number} Precision (default: 8)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.toFixed = function (precision) {\n\tif (typeof precision === 'undefined') { precision = 8; }\n\tthis.x = this.x.toFixed(precision);\n\tthis.y = this.y.toFixed(precision);\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation of the X axis towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mixX(vec2, 0.5);\n * vec.toString();\n * // => x:150, y:100\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mixX = function (vec, amount) {\n\tif (typeof amount === 'undefined') {\n\t\tamount = 0.5;\n\t}\n\n\tthis.x = (1 - amount) * this.x + amount * vec.x;\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation of the Y axis towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mixY(vec2, 0.5);\n * vec.toString();\n * // => x:100, y:150\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mixY = function (vec, amount) {\n\tif (typeof amount === 'undefined') {\n\t\tamount = 0.5;\n\t}\n\n\tthis.y = (1 - amount) * this.y + amount * vec.y;\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mix(vec2, 0.5);\n * vec.toString();\n * // => x:150, y:150\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mix = function (vec, amount) {\n\tthis.mixX(vec, amount);\n\tthis.mixY(vec, amount);\n\treturn this;\n};\n\n/**\n * # Products\n */\n\n/**\n * Creates a clone of this vector\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = vec1.clone();\n *\n * vec2.toString();\n * // => x:10, y:10\n *\n * @return {Victor} A clone of the vector\n * @api public\n */\nVictor.prototype.clone = function () {\n\treturn new Victor(this.x, this.y);\n};\n\n/**\n * Copies another vector's X component in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copyX(vec1);\n *\n * vec2.toString();\n * // => x:20, y:10\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copyX = function (vec) {\n\tthis.x = vec.x;\n\treturn this;\n};\n\n/**\n * Copies another vector's Y component in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copyY(vec1);\n *\n * vec2.toString();\n * // => x:10, y:20\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copyY = function (vec) {\n\tthis.y = vec.y;\n\treturn this;\n};\n\n/**\n * Copies another vector's X and Y components in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copy(vec1);\n *\n * vec2.toString();\n * // => x:20, y:20\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copy = function (vec) {\n\tthis.copyX(vec);\n\tthis.copyY(vec);\n\treturn this;\n};\n\n/**\n * Sets the vector to zero (0,0)\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n *\t\t var1.zero();\n * vec1.toString();\n * // => x:0, y:0\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.zero = function () {\n\tthis.x = this.y = 0;\n\treturn this;\n};\n\n/**\n * Calculates the dot product of this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.dot(vec2);\n * // => 23000\n *\n * @param {Victor} vector The second vector\n * @return {Number} Dot product\n * @api public\n */\nVictor.prototype.dot = function (vec2) {\n\treturn this.x * vec2.x + this.y * vec2.y;\n};\n\nVictor.prototype.cross = function (vec2) {\n\treturn (this.x * vec2.y ) - (this.y * vec2.x );\n};\n\n/**\n * Projects a vector onto another vector, setting itself to the result.\n *\n * ### Examples:\n * var vec = new Victor(100, 0);\n * var vec2 = new Victor(100, 100);\n *\n * vec.projectOnto(vec2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Victor} vector The other vector you want to project this vector onto\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.projectOnto = function (vec2) {\n var coeff = ( (this.x * vec2.x)+(this.y * vec2.y) ) / ((vec2.x*vec2.x)+(vec2.y*vec2.y));\n this.x = coeff * vec2.x;\n this.y = coeff * vec2.y;\n return this;\n};\n\n\nVictor.prototype.horizontalAngle = function () {\n\treturn Math.atan2(this.y, this.x);\n};\n\nVictor.prototype.horizontalAngleDeg = function () {\n\treturn radian2degrees(this.horizontalAngle());\n};\n\nVictor.prototype.verticalAngle = function () {\n\treturn Math.atan2(this.x, this.y);\n};\n\nVictor.prototype.verticalAngleDeg = function () {\n\treturn radian2degrees(this.verticalAngle());\n};\n\nVictor.prototype.angle = Victor.prototype.horizontalAngle;\nVictor.prototype.angleDeg = Victor.prototype.horizontalAngleDeg;\nVictor.prototype.direction = Victor.prototype.horizontalAngle;\n\nVictor.prototype.rotate = function (angle) {\n\tvar nx = (this.x * Math.cos(angle)) - (this.y * Math.sin(angle));\n\tvar ny = (this.x * Math.sin(angle)) + (this.y * Math.cos(angle));\n\n\tthis.x = nx;\n\tthis.y = ny;\n\n\treturn this;\n};\n\nVictor.prototype.rotateDeg = function (angle) {\n\tangle = degrees2radian(angle);\n\treturn this.rotate(angle);\n};\n\nVictor.prototype.rotateTo = function(rotation) {\n\treturn this.rotate(rotation-this.angle());\n};\n\nVictor.prototype.rotateToDeg = function(rotation) {\n\trotation = degrees2radian(rotation);\n\treturn this.rotateTo(rotation);\n};\n\nVictor.prototype.rotateBy = function (rotation) {\n\tvar angle = this.angle() + rotation;\n\n\treturn this.rotate(angle);\n};\n\nVictor.prototype.rotateByDeg = function (rotation) {\n\trotation = degrees2radian(rotation);\n\treturn this.rotateBy(rotation);\n};\n\n/**\n * Calculates the distance of the X axis between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceX(vec2);\n * // => -100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceX = function (vec) {\n\treturn this.x - vec.x;\n};\n\n/**\n * Same as `distanceX()` but always returns an absolute number\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.absDistanceX(vec2);\n * // => 100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Absolute distance\n * @api public\n */\nVictor.prototype.absDistanceX = function (vec) {\n\treturn Math.abs(this.distanceX(vec));\n};\n\n/**\n * Calculates the distance of the Y axis between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceY(vec2);\n * // => -10\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceY = function (vec) {\n\treturn this.y - vec.y;\n};\n\n/**\n * Same as `distanceY()` but always returns an absolute number\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceY(vec2);\n * // => 10\n *\n * @param {Victor} vector The second vector\n * @return {Number} Absolute distance\n * @api public\n */\nVictor.prototype.absDistanceY = function (vec) {\n\treturn Math.abs(this.distanceY(vec));\n};\n\n/**\n * Calculates the euclidean distance between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distance(vec2);\n * // => 100.4987562112089\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distance = function (vec) {\n\treturn Math.sqrt(this.distanceSq(vec));\n};\n\n/**\n * Calculates the squared euclidean distance between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceSq(vec2);\n * // => 10100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceSq = function (vec) {\n\tvar dx = this.distanceX(vec),\n\t\tdy = this.distanceY(vec);\n\n\treturn dx * dx + dy * dy;\n};\n\n/**\n * Calculates the length or magnitude of the vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.length();\n * // => 111.80339887498948\n *\n * @return {Number} Length / Magnitude\n * @api public\n */\nVictor.prototype.length = function () {\n\treturn Math.sqrt(this.lengthSq());\n};\n\n/**\n * Squared length / magnitude\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.lengthSq();\n * // => 12500\n *\n * @return {Number} Length / Magnitude\n * @api public\n */\nVictor.prototype.lengthSq = function () {\n\treturn this.x * this.x + this.y * this.y;\n};\n\nVictor.prototype.magnitude = Victor.prototype.length;\n\n/**\n * Returns a true if vector is (0, 0)\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * vec.zero();\n *\n * // => true\n *\n * @return {Boolean}\n * @api public\n */\nVictor.prototype.isZero = function() {\n\treturn this.x === 0 && this.y === 0;\n};\n\n/**\n * Returns a true if this vector is the same as another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(100, 50);\n * vec1.isEqualTo(vec2);\n *\n * // => true\n *\n * @return {Boolean}\n * @api public\n */\nVictor.prototype.isEqualTo = function(vec2) {\n\treturn this.x === vec2.x && this.y === vec2.y;\n};\n\n/**\n * # Utility Methods\n */\n\n/**\n * Returns an string representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toString();\n * // => x:10, y:20\n *\n * @return {String}\n * @api public\n */\nVictor.prototype.toString = function () {\n\treturn 'x:' + this.x + ', y:' + this.y;\n};\n\n/**\n * Returns an array representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toArray();\n * // => [10, 20]\n *\n * @return {Array}\n * @api public\n */\nVictor.prototype.toArray = function () {\n\treturn [ this.x, this.y ];\n};\n\n/**\n * Returns an object representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toObject();\n * // => { x: 10, y: 20 }\n *\n * @return {Object}\n * @api public\n */\nVictor.prototype.toObject = function () {\n\treturn { x: this.x, y: this.y };\n};\n\n\nvar degrees = 180 / Math.PI;\n\nfunction random (min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\nfunction radian2degrees (rad) {\n\treturn rad * degrees;\n}\n\nfunction degrees2radian (deg) {\n\treturn deg / degrees;\n}\n","// Current version.\nexport var VERSION = '1.13.2';\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nexport var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n Function('return this')() ||\n {};\n\n// Save bytes in the minified (but not gzipped) version:\nexport var ArrayProto = Array.prototype, ObjProto = Object.prototype;\nexport var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nexport var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n// Modern feature detection.\nexport var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n supportsDataView = typeof DataView !== 'undefined';\n\n// All **ECMAScript 5+** native function implementations that we hope to use\n// are declared here.\nexport var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create,\n nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n// Create references to these builtin functions because we override them.\nexport var _isNaN = isNaN,\n _isFinite = isFinite;\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nexport var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nexport var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n// The largest integer that can be represented exactly.\nexport var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n","// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nexport default function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n}\n","// Is a given variable an object?\nexport default function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n}\n","// Is a given variable undefined?\nexport default function isUndefined(obj) {\n return obj === void 0;\n}\n","import { toString } from './_setup.js';\n\n// Is a given value a boolean?\nexport default function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n}\n","import { toString } from './_setup.js';\n\n// Internal function for creating a `toString`-based type tester.\nexport default function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n}\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('String');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Number');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Date');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('RegExp');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Error');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Symbol');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('ArrayBuffer');\n","import tagTester from './_tagTester.js';\nimport { root } from './_setup.js';\n\nvar isFunction = tagTester('Function');\n\n// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = root.document && root.document.childNodes;\nif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n}\n\nexport default isFunction;\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n","import { supportsDataView } from './_setup.js';\nimport hasObjectTag from './_hasObjectTag.js';\n\n// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n// In IE 11, the most common among them, this problem also applies to\n// `Map`, `WeakMap` and `Set`.\nexport var hasStringTagBug = (\n supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))\n ),\n isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n","import tagTester from './_tagTester.js';\nimport isFunction from './isFunction.js';\nimport isArrayBuffer from './isArrayBuffer.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\n\nvar isDataView = tagTester('DataView');\n\n// In IE 10 - Edge 13, we need a different heuristic\n// to determine whether an object is a `DataView`.\nfunction ie10IsDataView(obj) {\n return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);\n}\n\nexport default (hasStringTagBug ? ie10IsDataView : isDataView);\n","import { nativeIsArray } from './_setup.js';\nimport tagTester from './_tagTester.js';\n\n// Is a given value an array?\n// Delegates to ECMA5's native `Array.isArray`.\nexport default nativeIsArray || tagTester('Array');\n","import { hasOwnProperty } from './_setup.js';\n\n// Internal function to check whether `key` is an own property name of `obj`.\nexport default function has(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n}\n","import tagTester from './_tagTester.js';\nimport has from './_has.js';\n\nvar isArguments = tagTester('Arguments');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n}());\n\nexport default isArguments;\n","import { _isNaN } from './_setup.js';\nimport isNumber from './isNumber.js';\n\n// Is the given value `NaN`?\nexport default function isNaN(obj) {\n return isNumber(obj) && _isNaN(obj);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function constant(value) {\n return function() {\n return value;\n };\n}\n","import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n","// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `byteLength` property of an object.\nexport default shallowProperty('byteLength');\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getByteLength from './_getByteLength.js';\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\nexport default createSizePropertyCheck(getByteLength);\n","import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';\nimport isDataView from './isDataView.js';\nimport constant from './constant.js';\nimport isBufferLike from './_isBufferLike.js';\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n}\n\nexport default supportsArrayBuffer ? isTypedArray : constant(false);\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `length` property of an object.\nexport default shallowProperty('length');\n","import { nonEnumerableProps, ObjProto } from './_setup.js';\nimport isFunction from './isFunction.js';\nimport has from './_has.js';\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nexport default function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n}\n","import isObject from './isObject.js';\nimport { nativeKeys, hasEnumBug } from './_setup.js';\nimport has from './_has.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport default function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import keys from './keys.js';\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport default function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n","import { VERSION } from './_setup.js';\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n_.VERSION = VERSION;\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import getByteLength from './_getByteLength.js';\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nexport default function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n}\n","import _ from './underscore.js';\nimport { toString, SymbolProto } from './_setup.js';\nimport getByteLength from './_getByteLength.js';\nimport isTypedArray from './isTypedArray.js';\nimport isFunction from './isFunction.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\nimport isDataView from './isDataView.js';\nimport keys from './keys.js';\nimport has from './_has.js';\nimport toBufferView from './_toBufferView.js';\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {\n if (!isDataView(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport default function isEqual(a, b) {\n return eq(a, b);\n}\n","import isObject from './isObject.js';\nimport { hasEnumBug } from './_setup.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve all the enumerable property names of an object.\nexport default function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isFunction from './isFunction.js';\nimport allKeys from './allKeys.js';\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nexport function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction(obj[forEachName]);\n };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nexport var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, mapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, setMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('WeakSet');\n","import keys from './keys.js';\n\n// Retrieve the values of an object's properties.\nexport default function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n","import keys from './keys.js';\n\n// Invert the keys and values of an object. The values must be serializable.\nexport default function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n","import isFunction from './isFunction.js';\n\n// Return a sorted list of the function names available on the object.\nexport default function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\n","// An internal function for creating assigner functions.\nexport default function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Extend a given object with all the properties in passed-in object(s).\nexport default createAssigner(allKeys);\n","import createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport default createAssigner(keys);\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Fill in a given object with default properties.\nexport default createAssigner(allKeys, true);\n","import isObject from './isObject.js';\nimport { nativeCreate } from './_setup.js';\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nexport default function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n","import _ from './underscore.js';\nimport isArray from './isArray.js';\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nexport default function toPath(path) {\n return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n","import _ from './underscore.js';\nimport './toPath.js';\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nexport default function toPath(path) {\n return _.toPath(path);\n}\n","// Internal function to obtain a nested property in `obj` along `path`.\nexport default function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n","import toPath from './_toPath.js';\nimport deepGet from './_deepGet.js';\nimport isUndefined from './isUndefined.js';\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nexport default function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n}\n","// Keep the identity function around for default iteratees.\nexport default function identity(value) {\n return value;\n}\n","import extendOwn from './extendOwn.js';\nimport isMatch from './isMatch.js';\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport default function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\n","import deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nexport default function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n","// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nexport default function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n","import identity from './identity.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport matcher from './matcher.js';\nimport property from './property.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nexport default function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nexport default function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee;\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\nimport iteratee from './iteratee.js';\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nexport default function cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function noop(){}\n","// Return a random integer between `min` and `max` (inclusive).\nexport default function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n","// A (possibly faster) way to get the current timestamp as an integer.\nexport default Date.now || function() {\n return new Date().getTime();\n};\n","import keys from './keys.js';\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nexport default function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\n","// Internal list of HTML entities for escaping.\nexport default {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n","import createEscaper from './_createEscaper.js';\nimport escapeMap from './_escapeMap.js';\n\n// Function for escaping strings to HTML interpolation.\nexport default createEscaper(escapeMap);\n","import createEscaper from './_createEscaper.js';\nimport unescapeMap from './_unescapeMap.js';\n\n// Function for unescaping strings from HTML interpolation.\nexport default createEscaper(unescapeMap);\n","import invert from './invert.js';\nimport escapeMap from './_escapeMap.js';\n\n// Internal list of HTML entities for unescaping.\nexport default invert(escapeMap);\n","import _ from './underscore.js';\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\nexport default _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n","import defaults from './defaults.js';\nimport _ from './underscore.js';\nimport './templateSettings.js';\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport default function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n","// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport default function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n","import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nexport default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n","import restArguments from './restArguments.js';\nimport executeBound from './_executeBound.js';\nimport _ from './underscore.js';\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\nexport default partial;\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport executeBound from './_executeBound.js';\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\nexport default restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getLength from './_getLength.js';\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nexport default createSizePropertyCheck(getLength);\n","import getLength from './_getLength.js';\nimport isArrayLike from './_isArrayLike.js';\nimport isArray from './isArray.js';\nimport isArguments from './isArguments.js';\n\n// Internal implementation of a recursive `flatten` function.\nexport default function flatten(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport bind from './bind.js';\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport default restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n});\n","import restArguments from './restArguments.js';\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport default restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n","import partial from './partial.js';\nimport delay from './delay.js';\nimport _ from './underscore.js';\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport default partial(delay, _, 1);\n","// Returns a negated version of the passed-in predicate.\nexport default function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n","// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nexport default function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n","import partial from './partial.js';\nimport before from './before.js';\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport default partial(before, 2);\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the first key on an object that passes a truth test.\nexport default function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nexport default function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the first index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(1);\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the last index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(-1);\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport default function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n","import getLength from './_getLength.js';\nimport { slice } from './_setup.js';\nimport isNaN from './isNaN.js';\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nexport default function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n","import sortedIndex from './sortedIndex.js';\nimport findIndex from './findIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport default createIndexFinder(1, findIndex, sortedIndex);\n","import findLastIndex from './findLastIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\nexport default createIndexFinder(-1, findLastIndex);\n","import isArrayLike from './_isArrayLike.js';\nimport findIndex from './findIndex.js';\nimport findKey from './findKey.js';\n\n// Return the first value which passes a truth test.\nexport default function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\n","import optimizeCb from './_optimizeCb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport default function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the results of applying the iteratee to each element.\nexport default function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// Internal helper to create a reducing function, iterating left or right.\nexport default function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n","import createReduce from './_createReduce.js';\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport default createReduce(1);\n","import createReduce from './_createReduce.js';\n\n// The right-associative version of reduce, also known as `foldr`.\nexport default createReduce(-1);\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// Return all the elements that pass a truth test.\nexport default function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine whether all of the elements pass a truth test.\nexport default function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine if at least one element in the object passes a truth test.\nexport default function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport indexOf from './indexOf.js';\n\n// Determine if the array or object contains a given item (using `===`).\nexport default function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport map from './map.js';\nimport deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Invoke a method (with arguments) on every item in a collection.\nexport default restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n","import map from './map.js';\nimport property from './property.js';\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nexport default function pluck(obj, key) {\n return map(obj, property(key));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the maximum element (or element-based computation).\nexport default function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArray from './isArray.js';\nimport { slice } from './_setup.js';\nimport isString from './isString.js';\nimport isArrayLike from './_isArrayLike.js';\nimport map from './map.js';\nimport identity from './identity.js';\nimport values from './values.js';\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nexport default function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport getLength from './_getLength.js';\nimport random from './random.js';\nimport toArray from './toArray.js';\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nexport default function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// An internal function used for aggregate \"group by\" operations.\nexport default function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n});\n","import group from './_group.js';\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\nexport default group(function(result, value, key) {\n result[key] = value;\n});\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n});\n","import group from './_group.js';\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\nexport default group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n","// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport optimizeCb from './_optimizeCb.js';\nimport allKeys from './allKeys.js';\nimport keyInObj from './_keyInObj.js';\nimport flatten from './_flatten.js';\n\n// Return a copy of the object only containing the allowed properties.\nexport default restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport negate from './negate.js';\nimport map from './map.js';\nimport flatten from './_flatten.js';\nimport contains from './contains.js';\nimport pick from './pick.js';\n\n// Return a copy of the object without the disallowed properties.\nexport default restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n","import { slice } from './_setup.js';\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport default function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n","import initial from './initial.js';\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nexport default function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\n","import { slice } from './_setup.js';\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nexport default function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport filter from './filter.js';\nimport contains from './contains.js';\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport default restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n","import restArguments from './restArguments.js';\nimport difference from './difference.js';\n\n// Return a version of the array that does not contain the specified value(s).\nexport default restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n","import isBoolean from './isBoolean.js';\nimport cb from './_cb.js';\nimport getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport default function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport uniq from './uniq.js';\nimport flatten from './_flatten.js';\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport default restArguments(function(arrays) {\n return uniq(flatten(arrays, true, true));\n});\n","import max from './max.js';\nimport getLength from './_getLength.js';\nimport pluck from './pluck.js';\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport default function unzip(array) {\n var length = array && max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport unzip from './unzip.js';\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport default restArguments(unzip);\n","import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport functions from './functions.js';\nimport { push } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add your own custom functions to the Underscore object.\nexport default function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport { ArrayProto } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n});\n\nexport default _;\n","// Is a given value equal to null?\nexport default function isNull(obj) {\n return obj === null;\n}\n","// Is a given value a DOM element?\nexport default function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n","import { _isFinite } from './_setup.js';\nimport isSymbol from './isSymbol.js';\n\n// Is a given object a finite number?\nexport default function isFinite(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n}\n","import getLength from './_getLength.js';\nimport isArray from './isArray.js';\nimport isString from './isString.js';\nimport isArguments from './isArguments.js';\nimport keys from './keys.js';\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport default function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n}\n","import keys from './keys.js';\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nexport default function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n","import baseCreate from './_baseCreate.js';\nimport extendOwn from './extendOwn.js';\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport default function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n","import isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport extend from './extend.js';\n\n// Create a (shallow-cloned) duplicate of an object.\nexport default function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n","// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport default function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n","import _has from './_has.js';\nimport toPath from './_toPath.js';\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nexport default function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!_has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n}\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nexport default function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import noop from './noop.js';\nimport get from './get.js';\n\n// Generates a function for a given object that returns a given property.\nexport default function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n}\n","import optimizeCb from './_optimizeCb.js';\n\n// Run a function **n** times.\nexport default function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n","import isFunction from './isFunction.js';\nimport toPath from './_toPath.js';\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport default function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n","import _ from './underscore.js';\n\n// Start chaining a wrapped Underscore object.\nexport default function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n","import has from './_has.js';\n\n// Memoize an expensive function by storing its results.\nexport default function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n","import now from './now.js';\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport default function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import restArguments from './restArguments.js';\nimport now from './now.js';\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nexport default function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n}\n","import partial from './partial.js';\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport default function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n","// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport default function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n","// Returns a function that will only be executed on and after the Nth call.\nexport default function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n","import find from './find.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nexport default function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n","import filter from './filter.js';\nimport negate from './negate.js';\nimport cb from './_cb.js';\n\n// Return all the elements for which a truth test fails.\nexport default function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n","import filter from './filter.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nexport default function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the minimum element (or element-based computation).\nexport default function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import sample from './sample.js';\n\n// Shuffle a collection.\nexport default function shuffle(obj) {\n return sample(obj, Infinity);\n}\n","import cb from './_cb.js';\nimport pluck from './pluck.js';\nimport map from './map.js';\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport default function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the number of elements in a collection.\nexport default function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n","import rest from './rest.js';\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport default function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n","import filter from './filter.js';\n\n// Trim out all falsy values from an array.\nexport default function compact(array) {\n return filter(array, Boolean);\n}\n","import _flatten from './_flatten.js';\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nexport default function flatten(array, depth) {\n return _flatten(array, depth, false);\n}\n","import getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport default function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n","import getLength from './_getLength.js';\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nexport default function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n","// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport default function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n","import { slice } from './_setup.js';\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport default function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n","// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\nimport * as allExports from './index.js';\nimport { mixin } from './index.js';\n\n// Add all of the Underscore functions to the wrapper object.\nvar _ = mixin(allExports);\n// Legacy Node.js API.\n_._ = _;\n// Export the Underscore API.\nexport default _;\n","'use strict'\n\n/**\n * @desc Helper class for drawing rooms when generating dungeons\n * @constructor\n *\n * @param {Number} x - The x coordinate of the top side of the room\n * @param {Number} y - The y coordinate of the left hand side of the room\n * @param {Number} width - The width of the room\n * @param {Number} height - The height of the room\n */\nconst Room = function Room (x, y, width, height) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n}\n\n/**\n * @desc Returns the bounding box for this room\n * @function\n *\n * @returns {Object} - Bounding box object containing a top, right, bottom and\n * left value.\n */\nRoom.prototype.getBoundingBox = function getBoundingBox () {\n return {\n top: this.y,\n right: this.x + this.width - 1,\n bottom: this.y + this.height - 1,\n left: this.x\n }\n}\n\nRoom.prototype.containsTile = function containsPoint (x, y) {\n const boundingBox = this.getBoundingBox()\n return !(\n x < boundingBox.left ||\n x > boundingBox.right ||\n y < boundingBox.top ||\n y > boundingBox.bottom\n )\n}\n\n/**\n * @desc Compares this room with an entity that has a bounding box method to see\n * if they intersect.\n *\n * @param {Object} other - An object with a getBoundingBox() method\n *\n * @returns {Boolean} - true if there is an intersection\n */\nRoom.prototype.intersects = function intersects (other) {\n if (!other.getBoundingBox) {\n throw new Error('Given entity has no method getBoundingBox')\n }\n var r1 = this.getBoundingBox()\n var r2 = other.getBoundingBox()\n\n return !(r2.left > r1.right ||\n r2.right < r1.left ||\n r2.top > r1.bottom ||\n r2.bottom < r1.top)\n}\n\n/**\n * @desc Returns a simple POJO representing this room\n *\n * @returns {Object} - A POJO\n */\nRoom.prototype.toJS = function toJS () {\n return {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n }\n}\n\nmodule.exports = Room\n","'use strict'\n\n/**\n * @desc Class for a single tilein a dungeon\n * @constructor\n *\n * @param {String} type - The type of tile, e.g. 'wall', 'floor'\n */\nconst Tile = function Tile (type, x, y) {\n this.type = type\n this.neighbours = []\n this.x = x\n this.y = y\n}\n\n/**\n * @desc Sets an array containing this tiles immediate neighbours\n *\n * @param {Object[]} neighbours - An array of neighbouring Tiles\n *\n * @return {Object} - returns the Tile object, useful for chaining\n */\nTile.prototype.setNeighbours = function (neighbours) {\n this.neighbours = neighbours\n return this\n}\n\n/**\n * @desc Returns a simple POJO representing this tile\n *\n * @returns {Object} - A POJO\n */\nTile.prototype.toJS = function toJS () {\n return {\n x: this.x,\n y: this.y,\n type: this.type\n }\n}\n\nmodule.exports = Tile\n","/**\n * Based on Bob Nystrom's procedural dungeon generation logic that he wrote for Hauberk\n * http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/\n */\n\n'use strict'\n\nconst Chance = require('chance')\nconst Victor = require('victor')\nconst _ = require('underscore')\n\nconst Room = require('./room')\nconst Tile = require('./tile')\n\nconst getTileNESW = (tile) => {\n const tiles = []\n if (tile.neighbours.n) {\n tiles.push(tile.neighbours.n)\n }\n if (tile.neighbours.e) {\n tiles.push(tile.neighbours.e)\n }\n if (tile.neighbours.s) {\n tiles.push(tile.neighbours.s)\n }\n if (tile.neighbours.w) {\n tiles.push(tile.neighbours.w)\n }\n\n return tiles\n}\n\nconst nameChance = new Chance()\n\n/**\n * @desc The random dungeon generator.\n *\n * Starting with a stage of solid walls, it works like so:\n *\n * 1. Place a number of randomly sized and positioned rooms. If a room\n * overlaps an existing room, it is discarded. Any remaining rooms are\n * carved out.\n * 2. Any remaining solid areas are filled in with mazes. The maze generator\n * will grow and fill in even odd-shaped areas, but will not touch any\n * rooms.\n * 3. The result of the previous two steps is a series of unconnected rooms\n * and mazes. We walk the stage and find every tile that can be a\n * \"connector\". This is a solid tile that is adjacent to two unconnected\n * regions.\n * 4. We randomly choose connectors and open them or place a door there until\n * all of the unconnected regions have been joined. There is also a slight\n * chance to carve a connector between two already-joined regions, so that\n * the dungeon isn't single connected.\n * 5. The mazes will have a lot of dead ends. Finally, we remove those by\n * repeatedly filling in any open tile that's closed on three sides. When\n * this is done, every corridor in a maze actually leads somewhere.\n *\n * The end result of this is a multiply-connected dungeon with rooms and lots\n * of winding corridors.\n *\n * @constructor\n */\nconst Dungeon = function Dungeon () {\n var numRoomTries = 50\n\n // The inverse chance of adding a connector between two regions that have\n // already been joined. Increasing this leads to more loosely connected\n // dungeons.\n var extraConnectorChance = 50\n\n // Increasing this allows rooms to be larger.\n var roomExtraSize = 0\n\n var windingPercent = 50\n\n var _rooms = []\n\n // The index of the current region being carved.\n var _currentRegion = -1\n\n var stage\n var rng\n\n const n = new Victor(0, 1)\n const e = new Victor(1, 0)\n const s = new Victor(0, -1)\n const w = new Victor(-1, 0)\n\n // The four cardinal directions: north, south, east, and west.\n const cardinalDirections = [n, e, s, w]\n\n const bindStage = (givenStage) => {\n stage = givenStage\n }\n\n let _tiles = []\n let _seed\n\n const randBetween = (min, max) => {\n return rng.integer({ min, max })\n }\n\n /**\n * @desc returns a tile at the provided coordinates\n *\n * @param {Number} x - The x coordinate to retrieve\n * @param {Number} y - The y coordinate to retrieve\n *\n * @returns {Object} - A Tile object\n */\n const getTile = (x, y) => {\n return _tiles[x][y]\n }\n\n /**\n * @desc Sets a tile's type and region. This function will thrown an error if\n * the tile doesn't exist.\n *\n * @param {Number} x - The x coordinate of the tile to set\n * @param {Number} y - The y coordinate of the tile to set\n * @param {String} type - The type to set on the tile\n *\n * @returns {Object} - The Tile object or null if the tile was not found\n *\n */\n const setTile = (x, y, type) => {\n if (_tiles[x] && _tiles[x][y]) {\n _tiles[x][y].type = type\n _tiles[x][y].region = _currentRegion\n\n return _tiles[x][y]\n }\n\n throw new RangeError(`tile at ${x}, ${y} is unreachable`)\n }\n\n /**\n * @desc Generates tile data to the dimension of the stage.\n *\n * @param {String} type - The tile type to set on newly created tiles\n *\n * @returns {Array} - The _tiles array\n */\n const fill = (type) => {\n let neighbours = {}\n var x\n var y\n\n for (x = 0; x < stage.width; x++) {\n _tiles.push([])\n for (y = 0; y < stage.height; y++) {\n _tiles[x].push(new Tile(type, x, y))\n }\n }\n\n for (x = 0; x < stage.width; x++) {\n for (y = 0; y < stage.height; y++) {\n neighbours = {}\n if (_tiles[x][y - 1]) {\n neighbours.n = _tiles[x][y - 1]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y - 1]) {\n neighbours.ne = _tiles[x + 1][y - 1]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y]) {\n neighbours.e = _tiles[x + 1][y]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y + 1]) {\n neighbours.se = _tiles[x + 1][y + 1]\n }\n if (_tiles[x] && _tiles[x][y + 1]) {\n neighbours.s = _tiles[x][y + 1]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y + 1]) {\n neighbours.sw = _tiles[x - 1][y + 1]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y]) {\n neighbours.w = _tiles[x - 1][y]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y - 1]) {\n neighbours.nw = _tiles[x - 1][y - 1]\n }\n _tiles[x][y].setNeighbours(neighbours)\n }\n }\n\n return _tiles\n }\n\n /**\n * @desc Master function for generating a dungeon\n *\n * @param {Object} stage - An object with a width key and a height key. Used\n * to determine the size of the dungeon. Must be odd with and height.\n *\n * @returns {Object} - Tile information for the dungeon\n */\n const build = (stage) => {\n if (stage.width < 5) {\n throw new RangeError(`DungeoneerError: options.width must not be less than 5, received ${stage.width}`)\n }\n\n if (stage.height < 5) {\n throw new RangeError(`DungeoneerError: options.height must not be less than 5, received ${stage.height}`)\n }\n\n if (stage.width % 2 === 0) {\n stage.width += 1\n }\n\n if (stage.height % 2 === 0) {\n stage.height += 1\n }\n\n const seed = stage.seed || `${nameChance.word({ length: 7 })}-${nameChance.word({ length: 7 })}`\n\n rng = new Chance(seed)\n\n _seed = seed\n\n bindStage(stage)\n\n fill('wall')\n\n _addRooms()\n\n // Fill in all of the empty space with mazes.\n for (var y = 1; y < stage.height; y += 2) {\n for (var x = 1; x < stage.width; x += 2) {\n // Skip the maze generation if the tile is already carved\n if (getTile(x, y).type === 'floor') {\n continue\n }\n _growMaze(x, y)\n }\n }\n\n _connectRegions()\n\n _removeDeadEnds()\n\n return {\n rooms: _rooms,\n tiles: _tiles,\n seed,\n toJS: _toJS\n }\n }\n\n const _toJS = () => {\n const rooms = []\n const tiles = []\n\n for (const room of _rooms) {\n rooms.push(room.toJS())\n }\n\n for (let x = 0; x < _tiles.length; x++) {\n if (!tiles[x]) {\n tiles.push([])\n }\n for (let y = 0; y < _tiles[x].length; y++) {\n const tile = _tiles[x][y]\n tiles[x].push(tile.toJS())\n }\n }\n\n return {\n tiles,\n rooms,\n seed: _seed\n }\n }\n\n /**\n * @desc Implementation of the \"growing tree\" algorithm from here:\n * http://www.astrolog.org/labyrnth/algrithm.htm.\n *\n * @param {Number} startX - The x coordinate to start at\n * @param {Number} startY - The y coordinate to start at\n *\n * @returns {void}\n */\n const _growMaze = (startX, startY) => {\n var cells = []\n var lastDir\n\n if (Object.keys(_tiles[startX][startY].neighbours).filter(x => x.type === 'floor').length > 0) {\n return\n }\n\n _startRegion()\n\n _carve(startX, startY)\n\n cells.push(new Victor(startX, startY))\n\n let count = 0\n\n while (cells.length && count < 500) {\n count++\n var cell = cells[cells.length - 1]\n\n // See which adjacent cells are open.\n var unmadeCells = []\n\n for (let dir of cardinalDirections) {\n if (_canCarve(cell, dir)) {\n unmadeCells.push(dir)\n }\n }\n\n if (unmadeCells.length) {\n // Based on how \"windy\" passages are, try to prefer carving in the\n // same direction.\n var dir\n var stringifiedCells = unmadeCells.map(v => v.toString())\n if (lastDir && stringifiedCells.indexOf(lastDir.toString()) > -1 && randBetween(1, 100) > windingPercent) {\n dir = lastDir.clone()\n } else {\n let rand = randBetween(0, unmadeCells.length - 1)\n dir = unmadeCells[rand].clone()\n }\n\n let carveLoc1 = cell.clone().add(dir).toObject()\n _carve(carveLoc1.x, carveLoc1.y)\n\n let carveLoc2 = cell.clone().add(dir).add(dir).toObject()\n _carve(carveLoc2.x, carveLoc2.y)\n\n cells.push(cell.clone().add(dir).add(dir))\n\n lastDir = dir.clone()\n } else {\n // No adjacent uncarved cells.\n cells.pop()\n\n // This path has ended.\n lastDir = null\n }\n }\n }\n\n /**\n * @desc Creates rooms in the dungeon by repeatedly creating random rooms and\n * seeing if they overlap. Rooms that overlap are discarded. This process is\n * repeated until it hits the maximum tries determined by the 'numRoomTries'\n * variable.\n *\n * @returns {void}\n */\n const _addRooms = () => {\n for (var i = 0; i < numRoomTries; i++) {\n // Pick a random room size. The funny math here does two things:\n // - It makes sure rooms are odd-sized to line up with maze.\n // - It avoids creating rooms that are too rectangular: too tall and\n // narrow or too wide and flat.\n var size = randBetween(1, 3 + roomExtraSize) * 2 + 1\n var rectangularity = randBetween(0, 1 + Math.floor(size / 2)) * 2\n var width = size\n var height = size\n if (_oneIn(2)) {\n width += rectangularity\n } else {\n height += rectangularity\n }\n\n // Restrict the size of rooms relative to the stage size\n width = Math.min(width, stage.width - 4)\n height = Math.min(width, stage.height - 4)\n\n var x = randBetween(0, Math.floor((stage.width - width) / 2)) * 2 + 1\n var y = randBetween(0, Math.floor((stage.height - height) / 2)) * 2 + 1\n\n // Make sure X dimension doesn't overflow\n if (x + width > stage.width) {\n x = Math.max(1, stage.width - width - 1)\n }\n\n // Make sure Y dimension doesn't overflow\n if (y + height > stage.height) {\n y = Math.max(1, stage.height - height - 1)\n }\n\n var room = new Room(x, y, width, height)\n\n var overlaps = false\n\n for (var other of _rooms) {\n if (room.intersects(other)) {\n overlaps = true\n break\n }\n }\n\n if (overlaps) {\n continue\n }\n\n _rooms.push(room)\n\n _startRegion()\n\n // Convert room tiles to floor\n carveArea(x, y, width, height)\n }\n }\n\n /**\n * @desc converts an area of tiles to floor type\n *\n * @param {Number} x - The starting x coordinate\n * @param {Number} y - The starting y coordinate\n * @param {Number} width - The width of the area to carve\n * @param {Number} height - The height of the area to carve\n *\n * @returns {void}\n */\n const carveArea = (x, y, width, height) => {\n for (var i = x; i < x + width; i++) {\n for (var j = y; j < y + height; j++) {\n _carve(i, j)\n }\n }\n }\n\n /**\n * @desc Creates doorways between each generated region of tiles\n *\n * @return {void}\n */\n const _connectRegions = () => {\n let regionConnections = {}\n _tiles.forEach(row => {\n row.forEach(tile => {\n if (tile.type === 'floor') {\n return\n }\n\n let tileRegions = _.unique(\n getTileNESW(tile).map(x => x.region)\n .filter(x => !_.isUndefined(x))\n )\n if (tileRegions.length <= 1) {\n return\n }\n\n let key = tileRegions.join('-')\n if (!regionConnections[key]) {\n regionConnections[key] = []\n }\n regionConnections[key].push(tile)\n })\n })\n\n _.each(regionConnections, (connections) => {\n let index = randBetween(0, connections.length - 1)\n connections[index].type = 'door'\n connections.splice(index, 1)\n\n // Occasional open up additional connections\n connections.forEach(conn => {\n if (_oneIn(extraConnectorChance)) {\n conn.type = 'door'\n }\n })\n })\n }\n\n /**\n * @desc Helper function for calculating random chance. The higher the number\n * provided the less likely this value is to return true.\n *\n * @param {Number} num - The ceiling number that could be calculated\n *\n * @returns {Boolean} - True if the function rolled a one\n *\n * @example\n * _oneIn(50); // - Has a 1 in 50 chance of returning true\n */\n const _oneIn = (num) => {\n return randBetween(1, num) === 1\n }\n\n /**\n * @desc Fills in dead ends in the dungeon with wall tiles\n *\n * @returns {void}\n */\n const _removeDeadEnds = () => {\n var done = false\n\n const cycle = () => {\n let done = true\n _tiles.forEach((row) => {\n row.forEach((tile) => {\n // If it only has one exit, it's a dead end --> fill it in!\n if (tile.type === 'wall') {\n return\n }\n if (\n getTileNESW(tile).filter(t => t.type !== 'wall').length <= 1 &&\n !_rooms.find((room) => room.containsTile(tile.x, tile.y))\n ) {\n tile.type = 'wall'\n done = false\n }\n })\n })\n\n return done\n }\n\n while (!done) {\n done = true\n done = cycle()\n }\n }\n\n /**\n * @desc Gets whether or not an opening can be carved from the given starting\n * [Cell] at [pos] to the adjacent Cell facing [direction]. Returns `true`\n * if the starting Cell is in bounds and the destination Cell is filled\n * (or out of bounds).\n *\n * @param {Victor} cell - Victor JS vector object\n * @param {Victor} direction - Victor JS vector object indicating direction\n *\n * @return {Boolean} - true if the path can be carved\n */\n const _canCarve = (cell, direction) => {\n // Must end in bounds.\n let end = cell.clone().add(direction).add(direction).add(direction).toObject()\n\n if (!_tiles[end.x] || !_tiles[end.x][end.y]) {\n return false\n }\n\n if (getTile(end.x, end.y).type !== 'wall') {\n return false\n }\n\n // Destination must not be open.\n let dest = cell.clone().add(direction).add(direction).toObject()\n return getTile(dest.x, dest.y).type !== 'floor'\n }\n\n /**\n * @desc Increments the current region. Typically called every time a new area\n * starts being carved\n *\n * @returns {Number} - The current region number\n */\n const _startRegion = () => {\n _currentRegion++\n return _currentRegion\n }\n\n /**\n * @desc Changes the Tile at a given coordinate to a provided type. Typically\n * used to change the type to 'floor'\n *\n * @param {Number} x - The x coordinate to change\n * @param {Number} y - The y coordinate to change\n * @param {String} type - The type to change the tile to. Defaults to 'floor'\n *\n * @returns {void}\n */\n const _carve = (x, y, type = 'floor') => {\n setTile(x, y, type)\n }\n\n return {\n build\n }\n}\n\nconst build = (options) => {\n return new Dungeon().build(options)\n}\n\nmodule.exports = {\n build\n}\n","/**\n * This code is an implementation of Alea algorithm; (C) 2010 Johannes Baagøe.\n * Alea is licensed according to the http://en.wikipedia.org/wiki/MIT_License.\n */\nconst FRAC = 2.3283064365386963e-10; /* 2^-32 */\nclass RNG {\n constructor() {\n this._seed = 0;\n this._s0 = 0;\n this._s1 = 0;\n this._s2 = 0;\n this._c = 0;\n }\n getSeed() { return this._seed; }\n /**\n * Seed the number generator\n */\n setSeed(seed) {\n seed = (seed < 1 ? 1 / seed : seed);\n this._seed = seed;\n this._s0 = (seed >>> 0) * FRAC;\n seed = (seed * 69069 + 1) >>> 0;\n this._s1 = seed * FRAC;\n seed = (seed * 69069 + 1) >>> 0;\n this._s2 = seed * FRAC;\n this._c = 1;\n return this;\n }\n /**\n * @returns Pseudorandom value [0,1), uniformly distributed\n */\n getUniform() {\n let t = 2091639 * this._s0 + this._c * FRAC;\n this._s0 = this._s1;\n this._s1 = this._s2;\n this._c = t | 0;\n this._s2 = t - this._c;\n return this._s2;\n }\n /**\n * @param lowerBound The lower end of the range to return a value from, inclusive\n * @param upperBound The upper end of the range to return a value from, inclusive\n * @returns Pseudorandom value [lowerBound, upperBound], using ROT.RNG.getUniform() to distribute the value\n */\n getUniformInt(lowerBound, upperBound) {\n let max = Math.max(lowerBound, upperBound);\n let min = Math.min(lowerBound, upperBound);\n return Math.floor(this.getUniform() * (max - min + 1)) + min;\n }\n /**\n * @param mean Mean value\n * @param stddev Standard deviation. ~95% of the absolute values will be lower than 2*stddev.\n * @returns A normally distributed pseudorandom value\n */\n getNormal(mean = 0, stddev = 1) {\n let u, v, r;\n do {\n u = 2 * this.getUniform() - 1;\n v = 2 * this.getUniform() - 1;\n r = u * u + v * v;\n } while (r > 1 || r == 0);\n let gauss = u * Math.sqrt(-2 * Math.log(r) / r);\n return mean + gauss * stddev;\n }\n /**\n * @returns Pseudorandom value [1,100] inclusive, uniformly distributed\n */\n getPercentage() {\n return 1 + Math.floor(this.getUniform() * 100);\n }\n /**\n * @returns Randomly picked item, null when length=0\n */\n getItem(array) {\n if (!array.length) {\n return null;\n }\n return array[Math.floor(this.getUniform() * array.length)];\n }\n /**\n * @returns New array with randomized items\n */\n shuffle(array) {\n let result = [];\n let clone = array.slice();\n while (clone.length) {\n let index = clone.indexOf(this.getItem(clone));\n result.push(clone.splice(index, 1)[0]);\n }\n return result;\n }\n /**\n * @param data key=whatever, value=weight (relative probability)\n * @returns whatever\n */\n getWeightedValue(data) {\n let total = 0;\n for (let id in data) {\n total += data[id];\n }\n let random = this.getUniform() * total;\n let id, part = 0;\n for (id in data) {\n part += data[id];\n if (random < part) {\n return id;\n }\n }\n // If by some floating-point annoyance we have\n // random >= total, just return the last id.\n return id;\n }\n /**\n * Get RNG state. Useful for storing the state and re-setting it via setState.\n * @returns Internal state\n */\n getState() { return [this._s0, this._s1, this._s2, this._c]; }\n /**\n * Set a previously retrieved state.\n */\n setState(state) {\n this._s0 = state[0];\n this._s1 = state[1];\n this._s2 = state[2];\n this._c = state[3];\n return this;\n }\n /**\n * Returns a cloned RNG\n */\n clone() {\n let clone = new RNG();\n return clone.setState(this.getState());\n }\n}\nexport default new RNG().setSeed(Date.now());\n","import Canvas from \"./canvas.js\";\n/**\n * @class Rectangular backend\n * @private\n */\nlet Rect = /** @class */ (() => {\n class Rect extends Canvas {\n constructor() {\n super();\n this._spacingX = 0;\n this._spacingY = 0;\n this._canvasCache = {};\n }\n setOptions(options) {\n super.setOptions(options);\n this._canvasCache = {};\n }\n draw(data, clearBefore) {\n if (Rect.cache) {\n this._drawWithCache(data);\n }\n else {\n this._drawNoCache(data, clearBefore);\n }\n }\n _drawWithCache(data) {\n let [x, y, ch, fg, bg] = data;\n let hash = \"\" + ch + fg + bg;\n let canvas;\n if (hash in this._canvasCache) {\n canvas = this._canvasCache[hash];\n }\n else {\n let b = this._options.border;\n canvas = document.createElement(\"canvas\");\n let ctx = canvas.getContext(\"2d\");\n canvas.width = this._spacingX;\n canvas.height = this._spacingY;\n ctx.fillStyle = bg;\n ctx.fillRect(b, b, canvas.width - b, canvas.height - b);\n if (ch) {\n ctx.fillStyle = fg;\n ctx.font = this._ctx.font;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n let chars = [].concat(ch);\n for (let i = 0; i < chars.length; i++) {\n ctx.fillText(chars[i], this._spacingX / 2, Math.ceil(this._spacingY / 2));\n }\n }\n this._canvasCache[hash] = canvas;\n }\n this._ctx.drawImage(canvas, x * this._spacingX, y * this._spacingY);\n }\n _drawNoCache(data, clearBefore) {\n let [x, y, ch, fg, bg] = data;\n if (clearBefore) {\n let b = this._options.border;\n this._ctx.fillStyle = bg;\n this._ctx.fillRect(x * this._spacingX + b, y * this._spacingY + b, this._spacingX - b, this._spacingY - b);\n }\n if (!ch) {\n return;\n }\n this._ctx.fillStyle = fg;\n let chars = [].concat(ch);\n for (let i = 0; i < chars.length; i++) {\n this._ctx.fillText(chars[i], (x + 0.5) * this._spacingX, Math.ceil((y + 0.5) * this._spacingY));\n }\n }\n computeSize(availWidth, availHeight) {\n let width = Math.floor(availWidth / this._spacingX);\n let height = Math.floor(availHeight / this._spacingY);\n return [width, height];\n }\n computeFontSize(availWidth, availHeight) {\n let boxWidth = Math.floor(availWidth / this._options.width);\n let boxHeight = Math.floor(availHeight / this._options.height);\n /* compute char ratio */\n let oldFont = this._ctx.font;\n this._ctx.font = \"100px \" + this._options.fontFamily;\n let width = Math.ceil(this._ctx.measureText(\"W\").width);\n this._ctx.font = oldFont;\n let ratio = width / 100;\n let widthFraction = ratio * boxHeight / boxWidth;\n if (widthFraction > 1) { /* too wide with current aspect ratio */\n boxHeight = Math.floor(boxHeight / widthFraction);\n }\n return Math.floor(boxHeight / this._options.spacing);\n }\n _normalizedEventToPosition(x, y) {\n return [Math.floor(x / this._spacingX), Math.floor(y / this._spacingY)];\n }\n _updateSize() {\n const opts = this._options;\n const charWidth = Math.ceil(this._ctx.measureText(\"W\").width);\n this._spacingX = Math.ceil(opts.spacing * charWidth);\n this._spacingY = Math.ceil(opts.spacing * opts.fontSize);\n if (opts.forceSquareRatio) {\n this._spacingX = this._spacingY = Math.max(this._spacingX, this._spacingY);\n }\n this._ctx.canvas.width = opts.width * this._spacingX;\n this._ctx.canvas.height = opts.height * this._spacingY;\n }\n }\n Rect.cache = false;\n return Rect;\n})();\nexport default Rect;\n","import Backend from \"./backend.js\";\nexport default class Canvas extends Backend {\n constructor() {\n super();\n this._ctx = document.createElement(\"canvas\").getContext(\"2d\");\n }\n schedule(cb) { requestAnimationFrame(cb); }\n getContainer() { return this._ctx.canvas; }\n setOptions(opts) {\n super.setOptions(opts);\n const style = (opts.fontStyle ? `${opts.fontStyle} ` : ``);\n const font = `${style} ${opts.fontSize}px ${opts.fontFamily}`;\n this._ctx.font = font;\n this._updateSize();\n this._ctx.font = font;\n this._ctx.textAlign = \"center\";\n this._ctx.textBaseline = \"middle\";\n }\n clear() {\n this._ctx.fillStyle = this._options.bg;\n this._ctx.fillRect(0, 0, this._ctx.canvas.width, this._ctx.canvas.height);\n }\n eventToPosition(x, y) {\n let canvas = this._ctx.canvas;\n let rect = canvas.getBoundingClientRect();\n x -= rect.left;\n y -= rect.top;\n x *= canvas.width / rect.width;\n y *= canvas.height / rect.height;\n if (x < 0 || y < 0 || x >= canvas.width || y >= canvas.height) {\n return [-1, -1];\n }\n return this._normalizedEventToPosition(x, y);\n }\n}\n","/**\n * @class Abstract display backend module\n * @private\n */\nexport default class Backend {\n getContainer() { return null; }\n setOptions(options) { this._options = options; }\n}\n","import Backend from \"./backend.js\";\nimport * as Color from \"../color.js\";\n/**\n * @class Tile backend\n * @private\n */\nexport default class TileGL extends Backend {\n constructor() {\n super();\n this._uniforms = {};\n try {\n this._gl = this._initWebGL();\n }\n catch (e) {\n alert(e.message);\n }\n }\n static isSupported() {\n return !!document.createElement(\"canvas\").getContext(\"webgl2\", { preserveDrawingBuffer: true });\n }\n schedule(cb) { requestAnimationFrame(cb); }\n getContainer() { return this._gl.canvas; }\n setOptions(opts) {\n super.setOptions(opts);\n this._updateSize();\n let tileSet = this._options.tileSet;\n if (tileSet && \"complete\" in tileSet && !tileSet.complete) {\n tileSet.addEventListener(\"load\", () => this._updateTexture(tileSet));\n }\n else {\n this._updateTexture(tileSet);\n }\n }\n draw(data, clearBefore) {\n const gl = this._gl;\n const opts = this._options;\n let [x, y, ch, fg, bg] = data;\n let scissorY = gl.canvas.height - (y + 1) * opts.tileHeight;\n gl.scissor(x * opts.tileWidth, scissorY, opts.tileWidth, opts.tileHeight);\n if (clearBefore) {\n if (opts.tileColorize) {\n gl.clearColor(0, 0, 0, 0);\n }\n else {\n gl.clearColor(...parseColor(bg));\n }\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n if (!ch) {\n return;\n }\n let chars = [].concat(ch);\n let bgs = [].concat(bg);\n let fgs = [].concat(fg);\n gl.uniform2fv(this._uniforms[\"targetPosRel\"], [x, y]);\n for (let i = 0; i < chars.length; i++) {\n let tile = this._options.tileMap[chars[i]];\n if (!tile) {\n throw new Error(`Char \"${chars[i]}\" not found in tileMap`);\n }\n gl.uniform1f(this._uniforms[\"colorize\"], opts.tileColorize ? 1 : 0);\n gl.uniform2fv(this._uniforms[\"tilesetPosAbs\"], tile);\n if (opts.tileColorize) {\n gl.uniform4fv(this._uniforms[\"tint\"], parseColor(fgs[i]));\n gl.uniform4fv(this._uniforms[\"bg\"], parseColor(bgs[i]));\n }\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n }\n /*\n \n \n for (let i=0;i= canvas.width || y >= canvas.height) {\n return [-1, -1];\n }\n return this._normalizedEventToPosition(x, y);\n }\n _initWebGL() {\n let gl = document.createElement(\"canvas\").getContext(\"webgl2\", { preserveDrawingBuffer: true });\n window.gl = gl;\n let program = createProgram(gl, VS, FS);\n gl.useProgram(program);\n createQuad(gl);\n UNIFORMS.forEach(name => this._uniforms[name] = gl.getUniformLocation(program, name));\n this._program = program;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.enable(gl.SCISSOR_TEST);\n return gl;\n }\n _normalizedEventToPosition(x, y) {\n return [Math.floor(x / this._options.tileWidth), Math.floor(y / this._options.tileHeight)];\n }\n _updateSize() {\n const gl = this._gl;\n const opts = this._options;\n const canvasSize = [opts.width * opts.tileWidth, opts.height * opts.tileHeight];\n gl.canvas.width = canvasSize[0];\n gl.canvas.height = canvasSize[1];\n gl.viewport(0, 0, canvasSize[0], canvasSize[1]);\n gl.uniform2fv(this._uniforms[\"tileSize\"], [opts.tileWidth, opts.tileHeight]);\n gl.uniform2fv(this._uniforms[\"targetSize\"], canvasSize);\n }\n _updateTexture(tileSet) {\n createTexture(this._gl, tileSet);\n }\n}\nconst UNIFORMS = [\"targetPosRel\", \"tilesetPosAbs\", \"tileSize\", \"targetSize\", \"colorize\", \"bg\", \"tint\"];\nconst VS = `\n#version 300 es\n\nin vec2 tilePosRel;\nout vec2 tilesetPosPx;\n\nuniform vec2 tilesetPosAbs;\nuniform vec2 tileSize;\nuniform vec2 targetSize;\nuniform vec2 targetPosRel;\n\nvoid main() {\n\tvec2 targetPosPx = (targetPosRel + tilePosRel) * tileSize;\n\tvec2 targetPosNdc = ((targetPosPx / targetSize)-0.5)*2.0;\n\ttargetPosNdc.y *= -1.0;\n\n\tgl_Position = vec4(targetPosNdc, 0.0, 1.0);\n\ttilesetPosPx = tilesetPosAbs + tilePosRel * tileSize;\n}`.trim();\nconst FS = `\n#version 300 es\nprecision highp float;\n\nin vec2 tilesetPosPx;\nout vec4 fragColor;\nuniform sampler2D image;\nuniform bool colorize;\nuniform vec4 bg;\nuniform vec4 tint;\n\nvoid main() {\n\tfragColor = vec4(0, 0, 0, 1);\n\n\tvec4 texel = texelFetch(image, ivec2(tilesetPosPx), 0);\n\n\tif (colorize) {\n\t\ttexel.rgb = tint.a * tint.rgb + (1.0-tint.a) * texel.rgb;\n\t\tfragColor.rgb = texel.a*texel.rgb + (1.0-texel.a)*bg.rgb;\n\t\tfragColor.a = texel.a + (1.0-texel.a)*bg.a;\n\t} else {\n\t\tfragColor = texel;\n\t}\n}`.trim();\nfunction createProgram(gl, vss, fss) {\n const vs = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vs, vss);\n gl.compileShader(vs);\n if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS)) {\n throw new Error(gl.getShaderInfoLog(vs) || \"\");\n }\n const fs = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fs, fss);\n gl.compileShader(fs);\n if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS)) {\n throw new Error(gl.getShaderInfoLog(fs) || \"\");\n }\n const p = gl.createProgram();\n gl.attachShader(p, vs);\n gl.attachShader(p, fs);\n gl.linkProgram(p);\n if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {\n throw new Error(gl.getProgramInfoLog(p) || \"\");\n }\n return p;\n}\nfunction createQuad(gl) {\n const pos = new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]);\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n gl.bufferData(gl.ARRAY_BUFFER, pos, gl.STATIC_DRAW);\n gl.enableVertexAttribArray(0);\n gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);\n}\nfunction createTexture(gl, data) {\n let t = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, t);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 0);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, data);\n return t;\n}\nlet colorCache = {};\nfunction parseColor(color) {\n if (!(color in colorCache)) {\n let parsed;\n if (color == \"transparent\") {\n parsed = [0, 0, 0, 0];\n }\n else if (color.indexOf(\"rgba\") > -1) {\n parsed = (color.match(/[\\d.]+/g) || []).map(Number);\n for (let i = 0; i < 3; i++) {\n parsed[i] = parsed[i] / 255;\n }\n }\n else {\n parsed = Color.fromString(color).map($ => $ / 255);\n parsed.push(1);\n }\n colorCache[color] = parsed;\n }\n return colorCache[color];\n}\n","/** Default with for display and map generators */\nexport let DEFAULT_WIDTH = 80;\n/** Default height for display and map generators */\nexport let DEFAULT_HEIGHT = 25;\nexport const DIRS = {\n 4: [[0, -1], [1, 0], [0, 1], [-1, 0]],\n 8: [[0, -1], [1, -1], [1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1]],\n 6: [[-1, -1], [1, -1], [2, 0], [1, 1], [-1, 1], [-2, 0]]\n};\nexport const KEYS = {\n /** Cancel key. */\n VK_CANCEL: 3,\n /** Help key. */\n VK_HELP: 6,\n /** Backspace key. */\n VK_BACK_SPACE: 8,\n /** Tab key. */\n VK_TAB: 9,\n /** 5 key on Numpad when NumLock is unlocked. Or on Mac, clear key which is positioned at NumLock key. */\n VK_CLEAR: 12,\n /** Return/enter key on the main keyboard. */\n VK_RETURN: 13,\n /** Reserved, but not used. */\n VK_ENTER: 14,\n /** Shift key. */\n VK_SHIFT: 16,\n /** Control key. */\n VK_CONTROL: 17,\n /** Alt (Option on Mac) key. */\n VK_ALT: 18,\n /** Pause key. */\n VK_PAUSE: 19,\n /** Caps lock. */\n VK_CAPS_LOCK: 20,\n /** Escape key. */\n VK_ESCAPE: 27,\n /** Space bar. */\n VK_SPACE: 32,\n /** Page Up key. */\n VK_PAGE_UP: 33,\n /** Page Down key. */\n VK_PAGE_DOWN: 34,\n /** End key. */\n VK_END: 35,\n /** Home key. */\n VK_HOME: 36,\n /** Left arrow. */\n VK_LEFT: 37,\n /** Up arrow. */\n VK_UP: 38,\n /** Right arrow. */\n VK_RIGHT: 39,\n /** Down arrow. */\n VK_DOWN: 40,\n /** Print Screen key. */\n VK_PRINTSCREEN: 44,\n /** Ins(ert) key. */\n VK_INSERT: 45,\n /** Del(ete) key. */\n VK_DELETE: 46,\n /***/\n VK_0: 48,\n /***/\n VK_1: 49,\n /***/\n VK_2: 50,\n /***/\n VK_3: 51,\n /***/\n VK_4: 52,\n /***/\n VK_5: 53,\n /***/\n VK_6: 54,\n /***/\n VK_7: 55,\n /***/\n VK_8: 56,\n /***/\n VK_9: 57,\n /** Colon (:) key. Requires Gecko 15.0 */\n VK_COLON: 58,\n /** Semicolon (;) key. */\n VK_SEMICOLON: 59,\n /** Less-than (<) key. Requires Gecko 15.0 */\n VK_LESS_THAN: 60,\n /** Equals (=) key. */\n VK_EQUALS: 61,\n /** Greater-than (>) key. Requires Gecko 15.0 */\n VK_GREATER_THAN: 62,\n /** Question mark (?) key. Requires Gecko 15.0 */\n VK_QUESTION_MARK: 63,\n /** Atmark (@) key. Requires Gecko 15.0 */\n VK_AT: 64,\n /***/\n VK_A: 65,\n /***/\n VK_B: 66,\n /***/\n VK_C: 67,\n /***/\n VK_D: 68,\n /***/\n VK_E: 69,\n /***/\n VK_F: 70,\n /***/\n VK_G: 71,\n /***/\n VK_H: 72,\n /***/\n VK_I: 73,\n /***/\n VK_J: 74,\n /***/\n VK_K: 75,\n /***/\n VK_L: 76,\n /***/\n VK_M: 77,\n /***/\n VK_N: 78,\n /***/\n VK_O: 79,\n /***/\n VK_P: 80,\n /***/\n VK_Q: 81,\n /***/\n VK_R: 82,\n /***/\n VK_S: 83,\n /***/\n VK_T: 84,\n /***/\n VK_U: 85,\n /***/\n VK_V: 86,\n /***/\n VK_W: 87,\n /***/\n VK_X: 88,\n /***/\n VK_Y: 89,\n /***/\n VK_Z: 90,\n /***/\n VK_CONTEXT_MENU: 93,\n /** 0 on the numeric keypad. */\n VK_NUMPAD0: 96,\n /** 1 on the numeric keypad. */\n VK_NUMPAD1: 97,\n /** 2 on the numeric keypad. */\n VK_NUMPAD2: 98,\n /** 3 on the numeric keypad. */\n VK_NUMPAD3: 99,\n /** 4 on the numeric keypad. */\n VK_NUMPAD4: 100,\n /** 5 on the numeric keypad. */\n VK_NUMPAD5: 101,\n /** 6 on the numeric keypad. */\n VK_NUMPAD6: 102,\n /** 7 on the numeric keypad. */\n VK_NUMPAD7: 103,\n /** 8 on the numeric keypad. */\n VK_NUMPAD8: 104,\n /** 9 on the numeric keypad. */\n VK_NUMPAD9: 105,\n /** * on the numeric keypad. */\n VK_MULTIPLY: 106,\n /** + on the numeric keypad. */\n VK_ADD: 107,\n /***/\n VK_SEPARATOR: 108,\n /** - on the numeric keypad. */\n VK_SUBTRACT: 109,\n /** Decimal point on the numeric keypad. */\n VK_DECIMAL: 110,\n /** / on the numeric keypad. */\n VK_DIVIDE: 111,\n /** F1 key. */\n VK_F1: 112,\n /** F2 key. */\n VK_F2: 113,\n /** F3 key. */\n VK_F3: 114,\n /** F4 key. */\n VK_F4: 115,\n /** F5 key. */\n VK_F5: 116,\n /** F6 key. */\n VK_F6: 117,\n /** F7 key. */\n VK_F7: 118,\n /** F8 key. */\n VK_F8: 119,\n /** F9 key. */\n VK_F9: 120,\n /** F10 key. */\n VK_F10: 121,\n /** F11 key. */\n VK_F11: 122,\n /** F12 key. */\n VK_F12: 123,\n /** F13 key. */\n VK_F13: 124,\n /** F14 key. */\n VK_F14: 125,\n /** F15 key. */\n VK_F15: 126,\n /** F16 key. */\n VK_F16: 127,\n /** F17 key. */\n VK_F17: 128,\n /** F18 key. */\n VK_F18: 129,\n /** F19 key. */\n VK_F19: 130,\n /** F20 key. */\n VK_F20: 131,\n /** F21 key. */\n VK_F21: 132,\n /** F22 key. */\n VK_F22: 133,\n /** F23 key. */\n VK_F23: 134,\n /** F24 key. */\n VK_F24: 135,\n /** Num Lock key. */\n VK_NUM_LOCK: 144,\n /** Scroll Lock key. */\n VK_SCROLL_LOCK: 145,\n /** Circumflex (^) key. Requires Gecko 15.0 */\n VK_CIRCUMFLEX: 160,\n /** Exclamation (!) key. Requires Gecko 15.0 */\n VK_EXCLAMATION: 161,\n /** Double quote () key. Requires Gecko 15.0 */\n VK_DOUBLE_QUOTE: 162,\n /** Hash (#) key. Requires Gecko 15.0 */\n VK_HASH: 163,\n /** Dollar sign ($) key. Requires Gecko 15.0 */\n VK_DOLLAR: 164,\n /** Percent (%) key. Requires Gecko 15.0 */\n VK_PERCENT: 165,\n /** Ampersand (&) key. Requires Gecko 15.0 */\n VK_AMPERSAND: 166,\n /** Underscore (_) key. Requires Gecko 15.0 */\n VK_UNDERSCORE: 167,\n /** Open parenthesis (() key. Requires Gecko 15.0 */\n VK_OPEN_PAREN: 168,\n /** Close parenthesis ()) key. Requires Gecko 15.0 */\n VK_CLOSE_PAREN: 169,\n /* Asterisk (*) key. Requires Gecko 15.0 */\n VK_ASTERISK: 170,\n /** Plus (+) key. Requires Gecko 15.0 */\n VK_PLUS: 171,\n /** Pipe (|) key. Requires Gecko 15.0 */\n VK_PIPE: 172,\n /** Hyphen-US/docs/Minus (-) key. Requires Gecko 15.0 */\n VK_HYPHEN_MINUS: 173,\n /** Open curly bracket ({) key. Requires Gecko 15.0 */\n VK_OPEN_CURLY_BRACKET: 174,\n /** Close curly bracket (}) key. Requires Gecko 15.0 */\n VK_CLOSE_CURLY_BRACKET: 175,\n /** Tilde (~) key. Requires Gecko 15.0 */\n VK_TILDE: 176,\n /** Comma (,) key. */\n VK_COMMA: 188,\n /** Period (.) key. */\n VK_PERIOD: 190,\n /** Slash (/) key. */\n VK_SLASH: 191,\n /** Back tick (`) key. */\n VK_BACK_QUOTE: 192,\n /** Open square bracket ([) key. */\n VK_OPEN_BRACKET: 219,\n /** Back slash (\\) key. */\n VK_BACK_SLASH: 220,\n /** Close square bracket (]) key. */\n VK_CLOSE_BRACKET: 221,\n /** Quote (''') key. */\n VK_QUOTE: 222,\n /** Meta key on Linux, Command key on Mac. */\n VK_META: 224,\n /** AltGr key on Linux. Requires Gecko 15.0 */\n VK_ALTGR: 225,\n /** Windows logo key on Windows. Or Super or Hyper key on Linux. Requires Gecko 15.0 */\n VK_WIN: 91,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_KANA: 21,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_HANGUL: 21,\n /** 英数 key on Japanese Mac keyboard. Requires Gecko 15.0 */\n VK_EISU: 22,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_JUNJA: 23,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_FINAL: 24,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_HANJA: 25,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_KANJI: 25,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_CONVERT: 28,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_NONCONVERT: 29,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_ACCEPT: 30,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_MODECHANGE: 31,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_SELECT: 41,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_PRINT: 42,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_EXECUTE: 43,\n /** Linux support for this keycode was added in Gecko 4.0.\t */\n VK_SLEEP: 95\n};\n","import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from \"../constants.js\";\n;\nexport default class Map {\n /**\n * @class Base map generator\n * @param {int} [width=ROT.DEFAULT_WIDTH]\n * @param {int} [height=ROT.DEFAULT_HEIGHT]\n */\n constructor(width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\n this._width = width;\n this._height = height;\n }\n ;\n _fillMap(value) {\n let map = [];\n for (let i = 0; i < this._width; i++) {\n map.push([]);\n for (let j = 0; j < this._height; j++) {\n map[i].push(value);\n }\n }\n return map;\n }\n}\n","import Map from \"./map.js\";\n/**\n * @class Dungeon map: has rooms and corridors\n * @augments ROT.Map\n */\nexport default class Dungeon extends Map {\n constructor(width, height) {\n super(width, height);\n this._rooms = [];\n this._corridors = [];\n }\n /**\n * Get all generated rooms\n * @returns {ROT.Map.Feature.Room[]}\n */\n getRooms() { return this._rooms; }\n /**\n * Get all generated corridors\n * @returns {ROT.Map.Feature.Corridor[]}\n */\n getCorridors() { return this._corridors; }\n}\n","import RNG from \"../rng.js\";\n;\n/**\n * @class Dungeon feature; has own .create() method\n */\nclass Feature {\n}\n/**\n * @class Room\n * @augments ROT.Map.Feature\n * @param {int} x1\n * @param {int} y1\n * @param {int} x2\n * @param {int} y2\n * @param {int} [doorX]\n * @param {int} [doorY]\n */\nexport class Room extends Feature {\n constructor(x1, y1, x2, y2, doorX, doorY) {\n super();\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n this._doors = {};\n if (doorX !== undefined && doorY !== undefined) {\n this.addDoor(doorX, doorY);\n }\n }\n ;\n /**\n * Room of random size, with a given doors and direction\n */\n static createRandomAt(x, y, dx, dy, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n if (dx == 1) { /* to the right */\n let y2 = y - Math.floor(RNG.getUniform() * height);\n return new this(x + 1, y2, x + width, y2 + height - 1, x, y);\n }\n if (dx == -1) { /* to the left */\n let y2 = y - Math.floor(RNG.getUniform() * height);\n return new this(x - width, y2, x - 1, y2 + height - 1, x, y);\n }\n if (dy == 1) { /* to the bottom */\n let x2 = x - Math.floor(RNG.getUniform() * width);\n return new this(x2, y + 1, x2 + width - 1, y + height, x, y);\n }\n if (dy == -1) { /* to the top */\n let x2 = x - Math.floor(RNG.getUniform() * width);\n return new this(x2, y - height, x2 + width - 1, y - 1, x, y);\n }\n throw new Error(\"dx or dy must be 1 or -1\");\n }\n /**\n * Room of random size, positioned around center coords\n */\n static createRandomCenter(cx, cy, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n let x1 = cx - Math.floor(RNG.getUniform() * width);\n let y1 = cy - Math.floor(RNG.getUniform() * height);\n let x2 = x1 + width - 1;\n let y2 = y1 + height - 1;\n return new this(x1, y1, x2, y2);\n }\n /**\n * Room of random size within a given dimensions\n */\n static createRandom(availWidth, availHeight, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n let left = availWidth - width - 1;\n let top = availHeight - height - 1;\n let x1 = 1 + Math.floor(RNG.getUniform() * left);\n let y1 = 1 + Math.floor(RNG.getUniform() * top);\n let x2 = x1 + width - 1;\n let y2 = y1 + height - 1;\n return new this(x1, y1, x2, y2);\n }\n addDoor(x, y) {\n this._doors[x + \",\" + y] = 1;\n return this;\n }\n /**\n * @param {function}\n */\n getDoors(cb) {\n for (let key in this._doors) {\n let parts = key.split(\",\");\n cb(parseInt(parts[0]), parseInt(parts[1]));\n }\n return this;\n }\n clearDoors() {\n this._doors = {};\n return this;\n }\n addDoors(isWallCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x != left && x != right && y != top && y != bottom) {\n continue;\n }\n if (isWallCallback(x, y)) {\n continue;\n }\n this.addDoor(x, y);\n }\n }\n return this;\n }\n debug() {\n console.log(\"room\", this._x1, this._y1, this._x2, this._y2);\n }\n isValid(isWallCallback, canBeDugCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x == left || x == right || y == top || y == bottom) {\n if (!isWallCallback(x, y)) {\n return false;\n }\n }\n else {\n if (!canBeDugCallback(x, y)) {\n return false;\n }\n }\n }\n }\n return true;\n }\n /**\n * @param {function} digCallback Dig callback with a signature (x, y, value). Values: 0 = empty, 1 = wall, 2 = door. Multiple doors are allowed.\n */\n create(digCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n let value = 0;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x + \",\" + y in this._doors) {\n value = 2;\n }\n else if (x == left || x == right || y == top || y == bottom) {\n value = 1;\n }\n else {\n value = 0;\n }\n digCallback(x, y, value);\n }\n }\n }\n getCenter() {\n return [Math.round((this._x1 + this._x2) / 2), Math.round((this._y1 + this._y2) / 2)];\n }\n getLeft() { return this._x1; }\n getRight() { return this._x2; }\n getTop() { return this._y1; }\n getBottom() { return this._y2; }\n}\n/**\n * @class Corridor\n * @augments ROT.Map.Feature\n * @param {int} startX\n * @param {int} startY\n * @param {int} endX\n * @param {int} endY\n */\nexport class Corridor extends Feature {\n constructor(startX, startY, endX, endY) {\n super();\n this._startX = startX;\n this._startY = startY;\n this._endX = endX;\n this._endY = endY;\n this._endsWithAWall = true;\n }\n static createRandomAt(x, y, dx, dy, options) {\n let min = options.corridorLength[0];\n let max = options.corridorLength[1];\n let length = RNG.getUniformInt(min, max);\n return new this(x, y, x + dx * length, y + dy * length);\n }\n debug() {\n console.log(\"corridor\", this._startX, this._startY, this._endX, this._endY);\n }\n isValid(isWallCallback, canBeDugCallback) {\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n let length = 1 + Math.max(Math.abs(dx), Math.abs(dy));\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n let nx = dy;\n let ny = -dx;\n let ok = true;\n for (let i = 0; i < length; i++) {\n let x = sx + i * dx;\n let y = sy + i * dy;\n if (!canBeDugCallback(x, y)) {\n ok = false;\n }\n if (!isWallCallback(x + nx, y + ny)) {\n ok = false;\n }\n if (!isWallCallback(x - nx, y - ny)) {\n ok = false;\n }\n if (!ok) {\n length = i;\n this._endX = x - dx;\n this._endY = y - dy;\n break;\n }\n }\n /**\n * If the length degenerated, this corridor might be invalid\n */\n /* not supported */\n if (length == 0) {\n return false;\n }\n /* length 1 allowed only if the next space is empty */\n if (length == 1 && isWallCallback(this._endX + dx, this._endY + dy)) {\n return false;\n }\n /**\n * We do not want the corridor to crash into a corner of a room;\n * if any of the ending corners is empty, the N+1th cell of this corridor must be empty too.\n *\n * Situation:\n * #######1\n * .......?\n * #######2\n *\n * The corridor was dug from left to right.\n * 1, 2 - problematic corners, ? = N+1th cell (not dug)\n */\n let firstCornerBad = !isWallCallback(this._endX + dx + nx, this._endY + dy + ny);\n let secondCornerBad = !isWallCallback(this._endX + dx - nx, this._endY + dy - ny);\n this._endsWithAWall = isWallCallback(this._endX + dx, this._endY + dy);\n if ((firstCornerBad || secondCornerBad) && this._endsWithAWall) {\n return false;\n }\n return true;\n }\n /**\n * @param {function} digCallback Dig callback with a signature (x, y, value). Values: 0 = empty.\n */\n create(digCallback) {\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n let length = 1 + Math.max(Math.abs(dx), Math.abs(dy));\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n for (let i = 0; i < length; i++) {\n let x = sx + i * dx;\n let y = sy + i * dy;\n digCallback(x, y, 0);\n }\n return true;\n }\n createPriorityWalls(priorityWallCallback) {\n if (!this._endsWithAWall) {\n return;\n }\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n let nx = dy;\n let ny = -dx;\n priorityWallCallback(this._endX + dx, this._endY + dy);\n priorityWallCallback(this._endX + nx, this._endY + ny);\n priorityWallCallback(this._endX - nx, this._endY - ny);\n }\n}\n","import Dungeon from \"./dungeon.js\";\nimport { Room, Corridor } from \"./features.js\";\nimport RNG from \"../rng.js\";\nimport { DIRS } from \"../constants.js\";\nconst FEATURES = {\n \"room\": Room,\n \"corridor\": Corridor\n};\n/**\n * Random dungeon generator using human-like digging patterns.\n * Heavily based on Mike Anderson's ideas from the \"Tyrant\" algo, mentioned at\n * http://www.roguebasin.roguelikedevelopment.org/index.php?title=Dungeon-Building_Algorithm.\n */\nexport default class Digger extends Dungeon {\n constructor(width, height, options = {}) {\n super(width, height);\n this._options = Object.assign({\n roomWidth: [3, 9],\n roomHeight: [3, 5],\n corridorLength: [3, 10],\n dugPercentage: 0.2,\n timeLimit: 1000 /* we stop after this much time has passed (msec) */\n }, options);\n this._features = {\n \"room\": 4,\n \"corridor\": 4\n };\n this._map = [];\n this._featureAttempts = 20; /* how many times do we try to create a feature on a suitable wall */\n this._walls = {}; /* these are available for digging */\n this._dug = 0;\n this._digCallback = this._digCallback.bind(this);\n this._canBeDugCallback = this._canBeDugCallback.bind(this);\n this._isWallCallback = this._isWallCallback.bind(this);\n this._priorityWallCallback = this._priorityWallCallback.bind(this);\n }\n create(callback) {\n this._rooms = [];\n this._corridors = [];\n this._map = this._fillMap(1);\n this._walls = {};\n this._dug = 0;\n let area = (this._width - 2) * (this._height - 2);\n this._firstRoom();\n let t1 = Date.now();\n let priorityWalls;\n do {\n priorityWalls = 0;\n let t2 = Date.now();\n if (t2 - t1 > this._options.timeLimit) {\n break;\n }\n /* find a good wall */\n let wall = this._findWall();\n if (!wall) {\n break;\n } /* no more walls */\n let parts = wall.split(\",\");\n let x = parseInt(parts[0]);\n let y = parseInt(parts[1]);\n let dir = this._getDiggingDirection(x, y);\n if (!dir) {\n continue;\n } /* this wall is not suitable */\n //\t\tconsole.log(\"wall\", x, y);\n /* try adding a feature */\n let featureAttempts = 0;\n do {\n featureAttempts++;\n if (this._tryFeature(x, y, dir[0], dir[1])) { /* feature added */\n //if (this._rooms.length + this._corridors.length == 2) { this._rooms[0].addDoor(x, y); } /* first room oficially has doors */\n this._removeSurroundingWalls(x, y);\n this._removeSurroundingWalls(x - dir[0], y - dir[1]);\n break;\n }\n } while (featureAttempts < this._featureAttempts);\n for (let id in this._walls) {\n if (this._walls[id] > 1) {\n priorityWalls++;\n }\n }\n } while (this._dug / area < this._options.dugPercentage || priorityWalls); /* fixme number of priority walls */\n this._addDoors();\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n this._walls = {};\n this._map = [];\n return this;\n }\n _digCallback(x, y, value) {\n if (value == 0 || value == 2) { /* empty */\n this._map[x][y] = 0;\n this._dug++;\n }\n else { /* wall */\n this._walls[x + \",\" + y] = 1;\n }\n }\n _isWallCallback(x, y) {\n if (x < 0 || y < 0 || x >= this._width || y >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _canBeDugCallback(x, y) {\n if (x < 1 || y < 1 || x + 1 >= this._width || y + 1 >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _priorityWallCallback(x, y) { this._walls[x + \",\" + y] = 2; }\n ;\n _firstRoom() {\n let cx = Math.floor(this._width / 2);\n let cy = Math.floor(this._height / 2);\n let room = Room.createRandomCenter(cx, cy, this._options);\n this._rooms.push(room);\n room.create(this._digCallback);\n }\n /**\n * Get a suitable wall\n */\n _findWall() {\n let prio1 = [];\n let prio2 = [];\n for (let id in this._walls) {\n let prio = this._walls[id];\n if (prio == 2) {\n prio2.push(id);\n }\n else {\n prio1.push(id);\n }\n }\n let arr = (prio2.length ? prio2 : prio1);\n if (!arr.length) {\n return null;\n } /* no walls :/ */\n let id = RNG.getItem(arr.sort()); // sort to make the order deterministic\n delete this._walls[id];\n return id;\n }\n /**\n * Tries adding a feature\n * @returns {bool} was this a successful try?\n */\n _tryFeature(x, y, dx, dy) {\n let featureName = RNG.getWeightedValue(this._features);\n let ctor = FEATURES[featureName];\n let feature = ctor.createRandomAt(x, y, dx, dy, this._options);\n if (!feature.isValid(this._isWallCallback, this._canBeDugCallback)) {\n //\t\tconsole.log(\"not valid\");\n //\t\tfeature.debug();\n return false;\n }\n feature.create(this._digCallback);\n //\tfeature.debug();\n if (feature instanceof Room) {\n this._rooms.push(feature);\n }\n if (feature instanceof Corridor) {\n feature.createPriorityWalls(this._priorityWallCallback);\n this._corridors.push(feature);\n }\n return true;\n }\n _removeSurroundingWalls(cx, cy) {\n let deltas = DIRS[4];\n for (let i = 0; i < deltas.length; i++) {\n let delta = deltas[i];\n let x = cx + delta[0];\n let y = cy + delta[1];\n delete this._walls[x + \",\" + y];\n x = cx + 2 * delta[0];\n y = cy + 2 * delta[1];\n delete this._walls[x + \",\" + y];\n }\n }\n /**\n * Returns vector in \"digging\" direction, or false, if this does not exist (or is not unique)\n */\n _getDiggingDirection(cx, cy) {\n if (cx <= 0 || cy <= 0 || cx >= this._width - 1 || cy >= this._height - 1) {\n return null;\n }\n let result = null;\n let deltas = DIRS[4];\n for (let i = 0; i < deltas.length; i++) {\n let delta = deltas[i];\n let x = cx + delta[0];\n let y = cy + delta[1];\n if (!this._map[x][y]) { /* there already is another empty neighbor! */\n if (result) {\n return null;\n }\n result = delta;\n }\n }\n /* no empty neighbor */\n if (!result) {\n return null;\n }\n return [-result[0], -result[1]];\n }\n /**\n * Find empty spaces surrounding rooms, and apply doors.\n */\n _addDoors() {\n let data = this._map;\n function isWallCallback(x, y) {\n return (data[x][y] == 1);\n }\n ;\n for (let i = 0; i < this._rooms.length; i++) {\n let room = this._rooms[i];\n room.clearDoors();\n room.addDoors(isWallCallback);\n }\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * Join lists with \"i\" and \"i+1\"\n */\nfunction addToList(i, L, R) {\n R[L[i + 1]] = R[i];\n L[R[i]] = L[i + 1];\n R[i] = i + 1;\n L[i + 1] = i;\n}\n/**\n * Remove \"i\" from its list\n */\nfunction removeFromList(i, L, R) {\n R[L[i]] = R[i];\n L[R[i]] = L[i];\n R[i] = i;\n L[i] = i;\n}\n/**\n * Maze generator - Eller's algorithm\n * See http://homepages.cwi.nl/~tromp/maze.html for explanation\n */\nexport default class EllerMaze extends Map {\n create(callback) {\n let map = this._fillMap(1);\n let w = Math.ceil((this._width - 2) / 2);\n let rand = 9 / 24;\n let L = [];\n let R = [];\n for (let i = 0; i < w; i++) {\n L.push(i);\n R.push(i);\n }\n L.push(w - 1); /* fake stop-block at the right side */\n let j;\n for (j = 1; j + 3 < this._height; j += 2) {\n /* one row */\n for (let i = 0; i < w; i++) {\n /* cell coords (will be always empty) */\n let x = 2 * i + 1;\n let y = j;\n map[x][y] = 0;\n /* right connection */\n if (i != L[i + 1] && RNG.getUniform() > rand) {\n addToList(i, L, R);\n map[x + 1][y] = 0;\n }\n /* bottom connection */\n if (i != L[i] && RNG.getUniform() > rand) {\n /* remove connection */\n removeFromList(i, L, R);\n }\n else {\n /* create connection */\n map[x][y + 1] = 0;\n }\n }\n }\n /* last row */\n for (let i = 0; i < w; i++) {\n /* cell coords (will be always empty) */\n let x = 2 * i + 1;\n let y = j;\n map[x][y] = 0;\n /* right connection */\n if (i != L[i + 1] && (i == L[i] || RNG.getUniform() > rand)) {\n /* dig right also if the cell is separated, so it gets connected to the rest of maze */\n addToList(i, L, R);\n map[x + 1][y] = 0;\n }\n removeFromList(i, L, R);\n }\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, map[i][j]);\n }\n }\n return this;\n }\n}\n","import Arena from \"./arena.js\";\nimport Uniform from \"./uniform.js\";\nimport Cellular from \"./cellular.js\";\nimport Digger from \"./digger.js\";\nimport EllerMaze from \"./ellermaze.js\";\nimport DividedMaze from \"./dividedmaze.js\";\nimport IceyMaze from \"./iceymaze.js\";\nimport Rogue from \"./rogue.js\";\nexport default { Arena, Uniform, Cellular, Digger, EllerMaze, DividedMaze, IceyMaze, Rogue };\n","import Map from \"./map.js\";\n/**\n * @class Simple empty rectangular room\n * @augments ROT.Map\n */\nexport default class Arena extends Map {\n create(callback) {\n let w = this._width - 1;\n let h = this._height - 1;\n for (let i = 0; i <= w; i++) {\n for (let j = 0; j <= h; j++) {\n let empty = (i && j && i < w && j < h);\n callback(i, j, empty ? 0 : 1);\n }\n }\n return this;\n }\n}\n","import Dungeon from \"./dungeon.js\";\nimport { Room, Corridor } from \"./features.js\";\nimport RNG from \"../rng.js\";\n;\n/**\n * @class Dungeon generator which tries to fill the space evenly. Generates independent rooms and tries to connect them.\n * @augments ROT.Map.Dungeon\n */\nexport default class Uniform extends Dungeon {\n constructor(width, height, options) {\n super(width, height);\n this._options = {\n roomWidth: [3, 9],\n roomHeight: [3, 5],\n roomDugPercentage: 0.1,\n timeLimit: 1000 /* we stop after this much time has passed (msec) */\n };\n Object.assign(this._options, options);\n this._map = [];\n this._dug = 0;\n this._roomAttempts = 20; /* new room is created N-times until is considered as impossible to generate */\n this._corridorAttempts = 20; /* corridors are tried N-times until the level is considered as impossible to connect */\n this._connected = []; /* list of already connected rooms */\n this._unconnected = []; /* list of remaining unconnected rooms */\n this._digCallback = this._digCallback.bind(this);\n this._canBeDugCallback = this._canBeDugCallback.bind(this);\n this._isWallCallback = this._isWallCallback.bind(this);\n }\n /**\n * Create a map. If the time limit has been hit, returns null.\n * @see ROT.Map#create\n */\n create(callback) {\n let t1 = Date.now();\n while (1) {\n let t2 = Date.now();\n if (t2 - t1 > this._options.timeLimit) {\n return null;\n } /* time limit! */\n this._map = this._fillMap(1);\n this._dug = 0;\n this._rooms = [];\n this._unconnected = [];\n this._generateRooms();\n if (this._rooms.length < 2) {\n continue;\n }\n if (this._generateCorridors()) {\n break;\n }\n }\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n return this;\n }\n /**\n * Generates a suitable amount of rooms\n */\n _generateRooms() {\n let w = this._width - 2;\n let h = this._height - 2;\n let room;\n do {\n room = this._generateRoom();\n if (this._dug / (w * h) > this._options.roomDugPercentage) {\n break;\n } /* achieved requested amount of free space */\n } while (room);\n /* either enough rooms, or not able to generate more of them :) */\n }\n /**\n * Try to generate one room\n */\n _generateRoom() {\n let count = 0;\n while (count < this._roomAttempts) {\n count++;\n let room = Room.createRandom(this._width, this._height, this._options);\n if (!room.isValid(this._isWallCallback, this._canBeDugCallback)) {\n continue;\n }\n room.create(this._digCallback);\n this._rooms.push(room);\n return room;\n }\n /* no room was generated in a given number of attempts */\n return null;\n }\n /**\n * Generates connectors beween rooms\n * @returns {bool} success Was this attempt successfull?\n */\n _generateCorridors() {\n let cnt = 0;\n while (cnt < this._corridorAttempts) {\n cnt++;\n this._corridors = [];\n /* dig rooms into a clear map */\n this._map = this._fillMap(1);\n for (let i = 0; i < this._rooms.length; i++) {\n let room = this._rooms[i];\n room.clearDoors();\n room.create(this._digCallback);\n }\n this._unconnected = RNG.shuffle(this._rooms.slice());\n this._connected = [];\n if (this._unconnected.length) {\n this._connected.push(this._unconnected.pop());\n } /* first one is always connected */\n while (1) {\n /* 1. pick random connected room */\n let connected = RNG.getItem(this._connected);\n if (!connected) {\n break;\n }\n /* 2. find closest unconnected */\n let room1 = this._closestRoom(this._unconnected, connected);\n if (!room1) {\n break;\n }\n /* 3. connect it to closest connected */\n let room2 = this._closestRoom(this._connected, room1);\n if (!room2) {\n break;\n }\n let ok = this._connectRooms(room1, room2);\n if (!ok) {\n break;\n } /* stop connecting, re-shuffle */\n if (!this._unconnected.length) {\n return true;\n } /* done; no rooms remain */\n }\n }\n return false;\n }\n ;\n /**\n * For a given room, find the closest one from the list\n */\n _closestRoom(rooms, room) {\n let dist = Infinity;\n let center = room.getCenter();\n let result = null;\n for (let i = 0; i < rooms.length; i++) {\n let r = rooms[i];\n let c = r.getCenter();\n let dx = c[0] - center[0];\n let dy = c[1] - center[1];\n let d = dx * dx + dy * dy;\n if (d < dist) {\n dist = d;\n result = r;\n }\n }\n return result;\n }\n _connectRooms(room1, room2) {\n /*\n room1.debug();\n room2.debug();\n */\n let center1 = room1.getCenter();\n let center2 = room2.getCenter();\n let diffX = center2[0] - center1[0];\n let diffY = center2[1] - center1[1];\n let start;\n let end;\n let dirIndex1, dirIndex2, min, max, index;\n if (Math.abs(diffX) < Math.abs(diffY)) { /* first try connecting north-south walls */\n dirIndex1 = (diffY > 0 ? 2 : 0);\n dirIndex2 = (dirIndex1 + 2) % 4;\n min = room2.getLeft();\n max = room2.getRight();\n index = 0;\n }\n else { /* first try connecting east-west walls */\n dirIndex1 = (diffX > 0 ? 1 : 3);\n dirIndex2 = (dirIndex1 + 2) % 4;\n min = room2.getTop();\n max = room2.getBottom();\n index = 1;\n }\n start = this._placeInWall(room1, dirIndex1); /* corridor will start here */\n if (!start) {\n return false;\n }\n if (start[index] >= min && start[index] <= max) { /* possible to connect with straight line (I-like) */\n end = start.slice();\n let value = 0;\n switch (dirIndex2) {\n case 0:\n value = room2.getTop() - 1;\n break;\n case 1:\n value = room2.getRight() + 1;\n break;\n case 2:\n value = room2.getBottom() + 1;\n break;\n case 3:\n value = room2.getLeft() - 1;\n break;\n }\n end[(index + 1) % 2] = value;\n this._digLine([start, end]);\n }\n else if (start[index] < min - 1 || start[index] > max + 1) { /* need to switch target wall (L-like) */\n let diff = start[index] - center2[index];\n let rotation = 0;\n switch (dirIndex2) {\n case 0:\n case 1:\n rotation = (diff < 0 ? 3 : 1);\n break;\n case 2:\n case 3:\n rotation = (diff < 0 ? 1 : 3);\n break;\n }\n dirIndex2 = (dirIndex2 + rotation) % 4;\n end = this._placeInWall(room2, dirIndex2);\n if (!end) {\n return false;\n }\n let mid = [0, 0];\n mid[index] = start[index];\n let index2 = (index + 1) % 2;\n mid[index2] = end[index2];\n this._digLine([start, mid, end]);\n }\n else { /* use current wall pair, but adjust the line in the middle (S-like) */\n let index2 = (index + 1) % 2;\n end = this._placeInWall(room2, dirIndex2);\n if (!end) {\n return false;\n }\n let mid = Math.round((end[index2] + start[index2]) / 2);\n let mid1 = [0, 0];\n let mid2 = [0, 0];\n mid1[index] = start[index];\n mid1[index2] = mid;\n mid2[index] = end[index];\n mid2[index2] = mid;\n this._digLine([start, mid1, mid2, end]);\n }\n room1.addDoor(start[0], start[1]);\n room2.addDoor(end[0], end[1]);\n index = this._unconnected.indexOf(room1);\n if (index != -1) {\n this._unconnected.splice(index, 1);\n this._connected.push(room1);\n }\n index = this._unconnected.indexOf(room2);\n if (index != -1) {\n this._unconnected.splice(index, 1);\n this._connected.push(room2);\n }\n return true;\n }\n _placeInWall(room, dirIndex) {\n let start = [0, 0];\n let dir = [0, 0];\n let length = 0;\n switch (dirIndex) {\n case 0:\n dir = [1, 0];\n start = [room.getLeft(), room.getTop() - 1];\n length = room.getRight() - room.getLeft() + 1;\n break;\n case 1:\n dir = [0, 1];\n start = [room.getRight() + 1, room.getTop()];\n length = room.getBottom() - room.getTop() + 1;\n break;\n case 2:\n dir = [1, 0];\n start = [room.getLeft(), room.getBottom() + 1];\n length = room.getRight() - room.getLeft() + 1;\n break;\n case 3:\n dir = [0, 1];\n start = [room.getLeft() - 1, room.getTop()];\n length = room.getBottom() - room.getTop() + 1;\n break;\n }\n let avail = [];\n let lastBadIndex = -2;\n for (let i = 0; i < length; i++) {\n let x = start[0] + i * dir[0];\n let y = start[1] + i * dir[1];\n avail.push(null);\n let isWall = (this._map[x][y] == 1);\n if (isWall) {\n if (lastBadIndex != i - 1) {\n avail[i] = [x, y];\n }\n }\n else {\n lastBadIndex = i;\n if (i) {\n avail[i - 1] = null;\n }\n }\n }\n for (let i = avail.length - 1; i >= 0; i--) {\n if (!avail[i]) {\n avail.splice(i, 1);\n }\n }\n return (avail.length ? RNG.getItem(avail) : null);\n }\n /**\n * Dig a polyline.\n */\n _digLine(points) {\n for (let i = 1; i < points.length; i++) {\n let start = points[i - 1];\n let end = points[i];\n let corridor = new Corridor(start[0], start[1], end[0], end[1]);\n corridor.create(this._digCallback);\n this._corridors.push(corridor);\n }\n }\n _digCallback(x, y, value) {\n this._map[x][y] = value;\n if (value == 0) {\n this._dug++;\n }\n }\n _isWallCallback(x, y) {\n if (x < 0 || y < 0 || x >= this._width || y >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _canBeDugCallback(x, y) {\n if (x < 1 || y < 1 || x + 1 >= this._width || y + 1 >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n}\n","import Map from \"./map.js\";\nimport { DIRS } from \"../constants.js\";\nimport RNG from \"../rng.js\";\n;\n/**\n * @class Cellular automaton map generator\n * @augments ROT.Map\n * @param {int} [width=ROT.DEFAULT_WIDTH]\n * @param {int} [height=ROT.DEFAULT_HEIGHT]\n * @param {object} [options] Options\n * @param {int[]} [options.born] List of neighbor counts for a new cell to be born in empty space\n * @param {int[]} [options.survive] List of neighbor counts for an existing cell to survive\n * @param {int} [options.topology] Topology 4 or 6 or 8\n */\nexport default class Cellular extends Map {\n constructor(width, height, options = {}) {\n super(width, height);\n this._options = {\n born: [5, 6, 7, 8],\n survive: [4, 5, 6, 7, 8],\n topology: 8\n };\n this.setOptions(options);\n this._dirs = DIRS[this._options.topology];\n this._map = this._fillMap(0);\n }\n /**\n * Fill the map with random values\n * @param {float} probability Probability for a cell to become alive; 0 = all empty, 1 = all full\n */\n randomize(probability) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n this._map[i][j] = (RNG.getUniform() < probability ? 1 : 0);\n }\n }\n return this;\n }\n /**\n * Change options.\n * @see ROT.Map.Cellular\n */\n setOptions(options) { Object.assign(this._options, options); }\n set(x, y, value) { this._map[x][y] = value; }\n create(callback) {\n let newMap = this._fillMap(0);\n let born = this._options.born;\n let survive = this._options.survive;\n for (let j = 0; j < this._height; j++) {\n let widthStep = 1;\n let widthStart = 0;\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStart = j % 2;\n }\n for (let i = widthStart; i < this._width; i += widthStep) {\n let cur = this._map[i][j];\n let ncount = this._getNeighbors(i, j);\n if (cur && survive.indexOf(ncount) != -1) { /* survive */\n newMap[i][j] = 1;\n }\n else if (!cur && born.indexOf(ncount) != -1) { /* born */\n newMap[i][j] = 1;\n }\n }\n }\n this._map = newMap;\n callback && this._serviceCallback(callback);\n }\n _serviceCallback(callback) {\n for (let j = 0; j < this._height; j++) {\n let widthStep = 1;\n let widthStart = 0;\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStart = j % 2;\n }\n for (let i = widthStart; i < this._width; i += widthStep) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n /**\n * Get neighbor count at [i,j] in this._map\n */\n _getNeighbors(cx, cy) {\n let result = 0;\n for (let i = 0; i < this._dirs.length; i++) {\n let dir = this._dirs[i];\n let x = cx + dir[0];\n let y = cy + dir[1];\n if (x < 0 || x >= this._width || y < 0 || y >= this._height) {\n continue;\n }\n result += (this._map[x][y] == 1 ? 1 : 0);\n }\n return result;\n }\n /**\n * Make sure every non-wall space is accessible.\n * @param {function} callback to call to display map when do\n * @param {int} value to consider empty space - defaults to 0\n * @param {function} callback to call when a new connection is made\n */\n connect(callback, value, connectionCallback) {\n if (!value)\n value = 0;\n let allFreeSpace = [];\n let notConnected = {};\n // find all free space\n let widthStep = 1;\n let widthStarts = [0, 0];\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStarts = [0, 1];\n }\n for (let y = 0; y < this._height; y++) {\n for (let x = widthStarts[y % 2]; x < this._width; x += widthStep) {\n if (this._freeSpace(x, y, value)) {\n let p = [x, y];\n notConnected[this._pointKey(p)] = p;\n allFreeSpace.push([x, y]);\n }\n }\n }\n let start = allFreeSpace[RNG.getUniformInt(0, allFreeSpace.length - 1)];\n let key = this._pointKey(start);\n let connected = {};\n connected[key] = start;\n delete notConnected[key];\n // find what's connected to the starting point\n this._findConnected(connected, notConnected, [start], false, value);\n while (Object.keys(notConnected).length > 0) {\n // find two points from notConnected to connected\n let p = this._getFromTo(connected, notConnected);\n let from = p[0]; // notConnected\n let to = p[1]; // connected\n // find everything connected to the starting point\n let local = {};\n local[this._pointKey(from)] = from;\n this._findConnected(local, notConnected, [from], true, value);\n // connect to a connected cell\n let tunnelFn = (this._options.topology == 6 ? this._tunnelToConnected6 : this._tunnelToConnected);\n tunnelFn.call(this, to, from, connected, notConnected, value, connectionCallback);\n // now all of local is connected\n for (let k in local) {\n let pp = local[k];\n this._map[pp[0]][pp[1]] = value;\n connected[k] = pp;\n delete notConnected[k];\n }\n }\n callback && this._serviceCallback(callback);\n }\n /**\n * Find random points to connect. Search for the closest point in the larger space.\n * This is to minimize the length of the passage while maintaining good performance.\n */\n _getFromTo(connected, notConnected) {\n let from = [0, 0], to = [0, 0], d;\n let connectedKeys = Object.keys(connected);\n let notConnectedKeys = Object.keys(notConnected);\n for (let i = 0; i < 5; i++) {\n if (connectedKeys.length < notConnectedKeys.length) {\n let keys = connectedKeys;\n to = connected[keys[RNG.getUniformInt(0, keys.length - 1)]];\n from = this._getClosest(to, notConnected);\n }\n else {\n let keys = notConnectedKeys;\n from = notConnected[keys[RNG.getUniformInt(0, keys.length - 1)]];\n to = this._getClosest(from, connected);\n }\n d = (from[0] - to[0]) * (from[0] - to[0]) + (from[1] - to[1]) * (from[1] - to[1]);\n if (d < 64) {\n break;\n }\n }\n // console.log(\">>> connected=\" + to + \" notConnected=\" + from + \" dist=\" + d);\n return [from, to];\n }\n _getClosest(point, space) {\n let minPoint = null;\n let minDist = null;\n for (let k in space) {\n let p = space[k];\n let d = (p[0] - point[0]) * (p[0] - point[0]) + (p[1] - point[1]) * (p[1] - point[1]);\n if (minDist == null || d < minDist) {\n minDist = d;\n minPoint = p;\n }\n }\n return minPoint;\n }\n _findConnected(connected, notConnected, stack, keepNotConnected, value) {\n while (stack.length > 0) {\n let p = stack.splice(0, 1)[0];\n let tests;\n if (this._options.topology == 6) {\n tests = [\n [p[0] + 2, p[1]],\n [p[0] + 1, p[1] - 1],\n [p[0] - 1, p[1] - 1],\n [p[0] - 2, p[1]],\n [p[0] - 1, p[1] + 1],\n [p[0] + 1, p[1] + 1],\n ];\n }\n else {\n tests = [\n [p[0] + 1, p[1]],\n [p[0] - 1, p[1]],\n [p[0], p[1] + 1],\n [p[0], p[1] - 1]\n ];\n }\n for (let i = 0; i < tests.length; i++) {\n let key = this._pointKey(tests[i]);\n if (connected[key] == null && this._freeSpace(tests[i][0], tests[i][1], value)) {\n connected[key] = tests[i];\n if (!keepNotConnected) {\n delete notConnected[key];\n }\n stack.push(tests[i]);\n }\n }\n }\n }\n _tunnelToConnected(to, from, connected, notConnected, value, connectionCallback) {\n let a, b;\n if (from[0] < to[0]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n for (let xx = a[0]; xx <= b[0]; xx++) {\n this._map[xx][a[1]] = value;\n let p = [xx, a[1]];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback && a[0] < b[0]) {\n connectionCallback(a, [b[0], a[1]]);\n }\n // x is now fixed\n let x = b[0];\n if (from[1] < to[1]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n for (let yy = a[1]; yy < b[1]; yy++) {\n this._map[x][yy] = value;\n let p = [x, yy];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback && a[1] < b[1]) {\n connectionCallback([b[0], a[1]], [b[0], b[1]]);\n }\n }\n _tunnelToConnected6(to, from, connected, notConnected, value, connectionCallback) {\n let a, b;\n if (from[0] < to[0]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n // tunnel diagonally until horizontally level\n let xx = a[0];\n let yy = a[1];\n while (!(xx == b[0] && yy == b[1])) {\n let stepWidth = 2;\n if (yy < b[1]) {\n yy++;\n stepWidth = 1;\n }\n else if (yy > b[1]) {\n yy--;\n stepWidth = 1;\n }\n if (xx < b[0]) {\n xx += stepWidth;\n }\n else if (xx > b[0]) {\n xx -= stepWidth;\n }\n else if (b[1] % 2) {\n // Won't step outside map if destination on is map's right edge\n xx -= stepWidth;\n }\n else {\n // ditto for left edge\n xx += stepWidth;\n }\n this._map[xx][yy] = value;\n let p = [xx, yy];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback) {\n connectionCallback(from, to);\n }\n }\n _freeSpace(x, y, value) {\n return x >= 0 && x < this._width && y >= 0 && y < this._height && this._map[x][y] == value;\n }\n _pointKey(p) { return p[0] + \".\" + p[1]; }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * @class Recursively divided maze, http://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_division_method\n * @augments ROT.Map\n */\nexport default class DividedMaze extends Map {\n constructor() {\n super(...arguments);\n this._stack = [];\n this._map = [];\n }\n create(callback) {\n let w = this._width;\n let h = this._height;\n this._map = [];\n for (let i = 0; i < w; i++) {\n this._map.push([]);\n for (let j = 0; j < h; j++) {\n let border = (i == 0 || j == 0 || i + 1 == w || j + 1 == h);\n this._map[i].push(border ? 1 : 0);\n }\n }\n this._stack = [\n [1, 1, w - 2, h - 2]\n ];\n this._process();\n for (let i = 0; i < w; i++) {\n for (let j = 0; j < h; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n this._map = [];\n return this;\n }\n _process() {\n while (this._stack.length) {\n let room = this._stack.shift(); /* [left, top, right, bottom] */\n this._partitionRoom(room);\n }\n }\n _partitionRoom(room) {\n let availX = [];\n let availY = [];\n for (let i = room[0] + 1; i < room[2]; i++) {\n let top = this._map[i][room[1] - 1];\n let bottom = this._map[i][room[3] + 1];\n if (top && bottom && !(i % 2)) {\n availX.push(i);\n }\n }\n for (let j = room[1] + 1; j < room[3]; j++) {\n let left = this._map[room[0] - 1][j];\n let right = this._map[room[2] + 1][j];\n if (left && right && !(j % 2)) {\n availY.push(j);\n }\n }\n if (!availX.length || !availY.length) {\n return;\n }\n let x = RNG.getItem(availX);\n let y = RNG.getItem(availY);\n this._map[x][y] = 1;\n let walls = [];\n let w = [];\n walls.push(w); /* left part */\n for (let i = room[0]; i < x; i++) {\n this._map[i][y] = 1;\n if (i % 2)\n w.push([i, y]);\n }\n w = [];\n walls.push(w); /* right part */\n for (let i = x + 1; i <= room[2]; i++) {\n this._map[i][y] = 1;\n if (i % 2)\n w.push([i, y]);\n }\n w = [];\n walls.push(w); /* top part */\n for (let j = room[1]; j < y; j++) {\n this._map[x][j] = 1;\n if (j % 2)\n w.push([x, j]);\n }\n w = [];\n walls.push(w); /* bottom part */\n for (let j = y + 1; j <= room[3]; j++) {\n this._map[x][j] = 1;\n if (j % 2)\n w.push([x, j]);\n }\n let solid = RNG.getItem(walls);\n for (let i = 0; i < walls.length; i++) {\n let w = walls[i];\n if (w == solid) {\n continue;\n }\n let hole = RNG.getItem(w);\n this._map[hole[0]][hole[1]] = 0;\n }\n this._stack.push([room[0], room[1], x - 1, y - 1]); /* left top */\n this._stack.push([x + 1, room[1], room[2], y - 1]); /* right top */\n this._stack.push([room[0], y + 1, x - 1, room[3]]); /* left bottom */\n this._stack.push([x + 1, y + 1, room[2], room[3]]); /* right bottom */\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * Icey's Maze generator\n * See http://www.roguebasin.roguelikedevelopment.org/index.php?title=Simple_maze for explanation\n */\nexport default class IceyMaze extends Map {\n constructor(width, height, regularity = 0) {\n super(width, height);\n this._regularity = regularity;\n this._map = [];\n }\n create(callback) {\n let width = this._width;\n let height = this._height;\n let map = this._fillMap(1);\n width -= (width % 2 ? 1 : 2);\n height -= (height % 2 ? 1 : 2);\n let cx = 0;\n let cy = 0;\n let nx = 0;\n let ny = 0;\n let done = 0;\n let blocked = false;\n let dirs = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ];\n do {\n cx = 1 + 2 * Math.floor(RNG.getUniform() * (width - 1) / 2);\n cy = 1 + 2 * Math.floor(RNG.getUniform() * (height - 1) / 2);\n if (!done) {\n map[cx][cy] = 0;\n }\n if (!map[cx][cy]) {\n this._randomize(dirs);\n do {\n if (Math.floor(RNG.getUniform() * (this._regularity + 1)) == 0) {\n this._randomize(dirs);\n }\n blocked = true;\n for (let i = 0; i < 4; i++) {\n nx = cx + dirs[i][0] * 2;\n ny = cy + dirs[i][1] * 2;\n if (this._isFree(map, nx, ny, width, height)) {\n map[nx][ny] = 0;\n map[cx + dirs[i][0]][cy + dirs[i][1]] = 0;\n cx = nx;\n cy = ny;\n blocked = false;\n done++;\n break;\n }\n }\n } while (!blocked);\n }\n } while (done + 1 < width * height / 4);\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, map[i][j]);\n }\n }\n this._map = [];\n return this;\n }\n _randomize(dirs) {\n for (let i = 0; i < 4; i++) {\n dirs[i][0] = 0;\n dirs[i][1] = 0;\n }\n switch (Math.floor(RNG.getUniform() * 4)) {\n case 0:\n dirs[0][0] = -1;\n dirs[1][0] = 1;\n dirs[2][1] = -1;\n dirs[3][1] = 1;\n break;\n case 1:\n dirs[3][0] = -1;\n dirs[2][0] = 1;\n dirs[1][1] = -1;\n dirs[0][1] = 1;\n break;\n case 2:\n dirs[2][0] = -1;\n dirs[3][0] = 1;\n dirs[0][1] = -1;\n dirs[1][1] = 1;\n break;\n case 3:\n dirs[1][0] = -1;\n dirs[0][0] = 1;\n dirs[3][1] = -1;\n dirs[2][1] = 1;\n break;\n }\n }\n _isFree(map, x, y, width, height) {\n if (x < 1 || y < 1 || x >= width || y >= height) {\n return false;\n }\n return map[x][y];\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\nimport { DIRS } from \"../constants.js\";\n/**\n * Dungeon generator which uses the \"orginal\" Rogue dungeon generation algorithm. See http://kuoi.com/~kamikaze/GameDesign/art07_rogue_dungeon.php\n * @author hyakugei\n */\nexport default class Rogue extends Map {\n constructor(width, height, options) {\n super(width, height);\n this.map = [];\n this.rooms = [];\n this.connectedCells = [];\n options = Object.assign({\n cellWidth: 3,\n cellHeight: 3 // ie. as an array with min-max values for each direction....\n }, options);\n /*\n Set the room sizes according to the over-all width of the map,\n and the cell sizes.\n */\n if (!options.hasOwnProperty(\"roomWidth\")) {\n options[\"roomWidth\"] = this._calculateRoomSize(this._width, options[\"cellWidth\"]);\n }\n if (!options.hasOwnProperty(\"roomHeight\")) {\n options[\"roomHeight\"] = this._calculateRoomSize(this._height, options[\"cellHeight\"]);\n }\n this._options = options;\n }\n create(callback) {\n this.map = this._fillMap(1);\n this.rooms = [];\n this.connectedCells = [];\n this._initRooms();\n this._connectRooms();\n this._connectUnconnectedRooms();\n this._createRandomRoomConnections();\n this._createRooms();\n this._createCorridors();\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this.map[i][j]);\n }\n }\n }\n return this;\n }\n _calculateRoomSize(size, cell) {\n let max = Math.floor((size / cell) * 0.8);\n let min = Math.floor((size / cell) * 0.25);\n if (min < 2) {\n min = 2;\n }\n if (max < 2) {\n max = 2;\n }\n return [min, max];\n }\n _initRooms() {\n // create rooms array. This is the \"grid\" list from the algo.\n for (let i = 0; i < this._options.cellWidth; i++) {\n this.rooms.push([]);\n for (let j = 0; j < this._options.cellHeight; j++) {\n this.rooms[i].push({ \"x\": 0, \"y\": 0, \"width\": 0, \"height\": 0, \"connections\": [], \"cellx\": i, \"celly\": j });\n }\n }\n }\n _connectRooms() {\n //pick random starting grid\n let cgx = RNG.getUniformInt(0, this._options.cellWidth - 1);\n let cgy = RNG.getUniformInt(0, this._options.cellHeight - 1);\n let idx;\n let ncgx;\n let ncgy;\n let found = false;\n let room;\n let otherRoom;\n let dirToCheck;\n // find unconnected neighbour cells\n do {\n //dirToCheck = [0, 1, 2, 3, 4, 5, 6, 7];\n dirToCheck = [0, 2, 4, 6];\n dirToCheck = RNG.shuffle(dirToCheck);\n do {\n found = false;\n idx = dirToCheck.pop();\n ncgx = cgx + DIRS[8][idx][0];\n ncgy = cgy + DIRS[8][idx][1];\n if (ncgx < 0 || ncgx >= this._options.cellWidth) {\n continue;\n }\n if (ncgy < 0 || ncgy >= this._options.cellHeight) {\n continue;\n }\n room = this.rooms[cgx][cgy];\n if (room[\"connections\"].length > 0) {\n // as long as this room doesn't already coonect to me, we are ok with it.\n if (room[\"connections\"][0][0] == ncgx && room[\"connections\"][0][1] == ncgy) {\n break;\n }\n }\n otherRoom = this.rooms[ncgx][ncgy];\n if (otherRoom[\"connections\"].length == 0) {\n otherRoom[\"connections\"].push([cgx, cgy]);\n this.connectedCells.push([ncgx, ncgy]);\n cgx = ncgx;\n cgy = ncgy;\n found = true;\n }\n } while (dirToCheck.length > 0 && found == false);\n } while (dirToCheck.length > 0);\n }\n _connectUnconnectedRooms() {\n //While there are unconnected rooms, try to connect them to a random connected neighbor\n //(if a room has no connected neighbors yet, just keep cycling, you'll fill out to it eventually).\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n this.connectedCells = RNG.shuffle(this.connectedCells);\n let room;\n let otherRoom;\n let validRoom;\n for (let i = 0; i < this._options.cellWidth; i++) {\n for (let j = 0; j < this._options.cellHeight; j++) {\n room = this.rooms[i][j];\n if (room[\"connections\"].length == 0) {\n let directions = [0, 2, 4, 6];\n directions = RNG.shuffle(directions);\n validRoom = false;\n do {\n let dirIdx = directions.pop();\n let newI = i + DIRS[8][dirIdx][0];\n let newJ = j + DIRS[8][dirIdx][1];\n if (newI < 0 || newI >= cw || newJ < 0 || newJ >= ch) {\n continue;\n }\n otherRoom = this.rooms[newI][newJ];\n validRoom = true;\n if (otherRoom[\"connections\"].length == 0) {\n break;\n }\n for (let k = 0; k < otherRoom[\"connections\"].length; k++) {\n if (otherRoom[\"connections\"][k][0] == i && otherRoom[\"connections\"][k][1] == j) {\n validRoom = false;\n break;\n }\n }\n if (validRoom) {\n break;\n }\n } while (directions.length);\n if (validRoom) {\n room[\"connections\"].push([otherRoom[\"cellx\"], otherRoom[\"celly\"]]);\n }\n else {\n console.log(\"-- Unable to connect room.\");\n }\n }\n }\n }\n }\n _createRandomRoomConnections() {\n // Empty for now.\n }\n _createRooms() {\n let w = this._width;\n let h = this._height;\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n let cwp = Math.floor(this._width / cw);\n let chp = Math.floor(this._height / ch);\n let roomw;\n let roomh;\n let roomWidth = this._options[\"roomWidth\"];\n let roomHeight = this._options[\"roomHeight\"];\n let sx;\n let sy;\n let otherRoom;\n for (let i = 0; i < cw; i++) {\n for (let j = 0; j < ch; j++) {\n sx = cwp * i;\n sy = chp * j;\n if (sx == 0) {\n sx = 1;\n }\n if (sy == 0) {\n sy = 1;\n }\n roomw = RNG.getUniformInt(roomWidth[0], roomWidth[1]);\n roomh = RNG.getUniformInt(roomHeight[0], roomHeight[1]);\n if (j > 0) {\n otherRoom = this.rooms[i][j - 1];\n while (sy - (otherRoom[\"y\"] + otherRoom[\"height\"]) < 3) {\n sy++;\n }\n }\n if (i > 0) {\n otherRoom = this.rooms[i - 1][j];\n while (sx - (otherRoom[\"x\"] + otherRoom[\"width\"]) < 3) {\n sx++;\n }\n }\n let sxOffset = Math.round(RNG.getUniformInt(0, cwp - roomw) / 2);\n let syOffset = Math.round(RNG.getUniformInt(0, chp - roomh) / 2);\n while (sx + sxOffset + roomw >= w) {\n if (sxOffset) {\n sxOffset--;\n }\n else {\n roomw--;\n }\n }\n while (sy + syOffset + roomh >= h) {\n if (syOffset) {\n syOffset--;\n }\n else {\n roomh--;\n }\n }\n sx = sx + sxOffset;\n sy = sy + syOffset;\n this.rooms[i][j][\"x\"] = sx;\n this.rooms[i][j][\"y\"] = sy;\n this.rooms[i][j][\"width\"] = roomw;\n this.rooms[i][j][\"height\"] = roomh;\n for (let ii = sx; ii < sx + roomw; ii++) {\n for (let jj = sy; jj < sy + roomh; jj++) {\n this.map[ii][jj] = 0;\n }\n }\n }\n }\n }\n _getWallPosition(aRoom, aDirection) {\n let rx;\n let ry;\n let door;\n if (aDirection == 1 || aDirection == 3) {\n rx = RNG.getUniformInt(aRoom[\"x\"] + 1, aRoom[\"x\"] + aRoom[\"width\"] - 2);\n if (aDirection == 1) {\n ry = aRoom[\"y\"] - 2;\n door = ry + 1;\n }\n else {\n ry = aRoom[\"y\"] + aRoom[\"height\"] + 1;\n door = ry - 1;\n }\n this.map[rx][door] = 0; // i'm not setting a specific 'door' tile value right now, just empty space.\n }\n else {\n ry = RNG.getUniformInt(aRoom[\"y\"] + 1, aRoom[\"y\"] + aRoom[\"height\"] - 2);\n if (aDirection == 2) {\n rx = aRoom[\"x\"] + aRoom[\"width\"] + 1;\n door = rx - 1;\n }\n else {\n rx = aRoom[\"x\"] - 2;\n door = rx + 1;\n }\n this.map[door][ry] = 0; // i'm not setting a specific 'door' tile value right now, just empty space.\n }\n return [rx, ry];\n }\n _drawCorridor(startPosition, endPosition) {\n let xOffset = endPosition[0] - startPosition[0];\n let yOffset = endPosition[1] - startPosition[1];\n let xpos = startPosition[0];\n let ypos = startPosition[1];\n let tempDist;\n let xDir;\n let yDir;\n let move; // 2 element array, element 0 is the direction, element 1 is the total value to move.\n let moves = []; // a list of 2 element arrays\n let xAbs = Math.abs(xOffset);\n let yAbs = Math.abs(yOffset);\n let percent = RNG.getUniform(); // used to split the move at different places along the long axis\n let firstHalf = percent;\n let secondHalf = 1 - percent;\n xDir = xOffset > 0 ? 2 : 6;\n yDir = yOffset > 0 ? 4 : 0;\n if (xAbs < yAbs) {\n // move firstHalf of the y offset\n tempDist = Math.ceil(yAbs * firstHalf);\n moves.push([yDir, tempDist]);\n // move all the x offset\n moves.push([xDir, xAbs]);\n // move sendHalf of the y offset\n tempDist = Math.floor(yAbs * secondHalf);\n moves.push([yDir, tempDist]);\n }\n else {\n // move firstHalf of the x offset\n tempDist = Math.ceil(xAbs * firstHalf);\n moves.push([xDir, tempDist]);\n // move all the y offset\n moves.push([yDir, yAbs]);\n // move secondHalf of the x offset.\n tempDist = Math.floor(xAbs * secondHalf);\n moves.push([xDir, tempDist]);\n }\n this.map[xpos][ypos] = 0;\n while (moves.length > 0) {\n move = moves.pop();\n while (move[1] > 0) {\n xpos += DIRS[8][move[0]][0];\n ypos += DIRS[8][move[0]][1];\n this.map[xpos][ypos] = 0;\n move[1] = move[1] - 1;\n }\n }\n }\n _createCorridors() {\n // Draw Corridors between connected rooms\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n let room;\n let connection;\n let otherRoom;\n let wall;\n let otherWall;\n for (let i = 0; i < cw; i++) {\n for (let j = 0; j < ch; j++) {\n room = this.rooms[i][j];\n for (let k = 0; k < room[\"connections\"].length; k++) {\n connection = room[\"connections\"][k];\n otherRoom = this.rooms[connection[0]][connection[1]];\n // figure out what wall our corridor will start one.\n // figure out what wall our corridor will end on.\n if (otherRoom[\"cellx\"] > room[\"cellx\"]) {\n wall = 2;\n otherWall = 4;\n }\n else if (otherRoom[\"cellx\"] < room[\"cellx\"]) {\n wall = 4;\n otherWall = 2;\n }\n else if (otherRoom[\"celly\"] > room[\"celly\"]) {\n wall = 3;\n otherWall = 1;\n }\n else {\n wall = 1;\n otherWall = 3;\n }\n this._drawCorridor(this._getWallPosition(room, wall), this._getWallPosition(otherRoom, otherWall));\n }\n }\n }\n }\n}\n","import TwoDDungeon from \"2d-dungeon\";\nimport * as dungeoneer from \"dungeoneer\";\nimport * as geo from \"./geo-utils.js\";\nimport * as ROT from \"rot-js\";\n\nexport const regenerate = async (dungeon, config = {}) => {\n try {\n switch (config.algorithm) {\n case \"2d-dungeon\":\n await generate2DDungeon(dungeon, config);\n break;\n case \"rot-js-cellular\":\n await generateRotJsCellular(dungeon, config);\n break;\n case \"dungeoneer\":\n await generateDungeoneer(dungeon, config);\n break;\n }\n } catch (err) {\n console.error(err);\n ui.notifications.error(\"Error generating dungeon... please try again.\");\n }\n};\n\nconst xOffset = () => {\n return (\n Math.ceil(\n (canvas.scene.width * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size\n );\n};\n\nconst yOffset = () => {\n return (\n Math.ceil(\n (canvas.scene.height * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size\n );\n};\n\n/**\n * rot.js Cellular Automata - http://ondras.github.io/rot.js/manual/#map/cellular\n */\nexport const generateRotJsCellular = async (dungeon, config) => {\n const scalingFactor = 1.0;\n const height = config.height * scalingFactor;\n const width = config.width * scalingFactor;\n const map = new ROT.Map.Cellular(width, height);\n map.randomize(0.5); // cells with 1/2 probability\n for (let i = 0; i < 4; i++) {\n map.create();\n }\n if (config.connectCaves) {\n map.connect(null, 1);\n }\n\n const gridSize = canvas.scene.grid.size / scalingFactor;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n if (map._map[y][x]) {\n const oneSquare = {\n x: xOff + x * gridSize,\n y: yOff + y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n if (config.smoothing) {\n for (let i = 0; i < config.smoothing; i++) {\n geometry = geo.smooth(geometry);\n }\n }\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n await dungeon.pushState(newState);\n};\n\n/**\n * 2D Dungeon - https://github.com/Prozi/dungeon-generator\n */\nexport const generate2DDungeon = async (dungeon, config) => {\n const height = config.height;\n const width = config.width;\n const map = new TwoDDungeon({\n max_iterations: 50,\n size: [width, height],\n rooms: {\n any: {\n min_size: [config.minRoomSize, config.minRoomSize],\n max_size: [config.maxRoomSize, config.maxRoomSize],\n max_exits: 4,\n },\n },\n min_corridor_length: 2,\n max_corridor_length: 8,\n corridor_density: 0.5, // corridors per room\n symmetric_rooms: config.centerExits, // exits must be in the center of a wall if true\n interconnects: config.circularPaths ? 1 : 0, //extra corridors to connect rooms and make circular paths. not 100% guaranteed\n max_interconnect_length: 10,\n room_count: config.roomCount,\n });\n map.generate();\n\n const gridSize = canvas.scene.grid.size;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n // TODO: is this flipped / rotated, and we're iterating wrong?\n const isWall = map.walls.get([x, y]);\n if (isWall === false) {\n const oneSquare = {\n x: xOff + x * gridSize,\n y: yOff + y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n\n const doors = [];\n for (const piece of map.children) {\n if (piece.room_size[0] === 1 || piece.room_size[1] === 1) {\n // skip doors in corridors\n continue;\n }\n for (const exit of piece.exits) {\n const [[doorX, doorY], direction] = exit;\n const x = piece.position[0] + doorX;\n const y = piece.position[1] + doorY;\n if (direction === 90) {\n // vertical, east side\n doors.push([\n xOff + (x + 1) * gridSize,\n yOff + y * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n } else if (direction === 270) {\n // vertical, west side\n doors.push([\n xOff + x * gridSize,\n yOff + y * gridSize,\n xOff + x * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n } else if (direction === 0) {\n // horizontal, north side\n doors.push([\n xOff + x * gridSize,\n yOff + y * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + y * gridSize,\n ]);\n } else if (direction === 180) {\n // horizontal, south side\n doors.push([\n xOff + x * gridSize,\n yOff + (y + 1) * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n }\n }\n }\n\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n newState.doors = config.generate2DDungeonDoors ? doors : [];\n await dungeon.pushState(newState);\n};\n\n/**\n * Dungeoneer - https://github.com/LucianBuzzo/dungeoneer\n */\nexport const generateDungeoneer = async (dungeon, config) => {\n const map = dungeoneer.build({\n width: config.width,\n height: config.height,\n });\n const gridSize = canvas.scene.grid.size;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n const doors = [];\n for (const row of map.tiles) {\n for (const cell of row) {\n if (cell.type === \"floor\" || cell.type === \"door\") {\n const oneSquare = {\n x: xOff + cell.x * gridSize,\n y: yOff + cell.y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n if (cell.type === \"door\") {\n if (cell.neighbours.w?.type === \"floor\") {\n // east-west passage, thus vertical door\n doors.push([\n xOff + (cell.x + 0.5) * gridSize,\n yOff + cell.y * gridSize,\n xOff + (cell.x + 0.5) * gridSize,\n yOff + (cell.y + 1) * gridSize,\n ]);\n } else {\n // horizontal door\n doors.push([\n xOff + cell.x * gridSize,\n yOff + (cell.y + 0.5) * gridSize,\n xOff + (cell.x + 1) * gridSize,\n yOff + (cell.y + 0.5) * gridSize,\n ]);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n newState.doors = config.generateDungeoneerDoors ? doors : [];\n await dungeon.pushState(newState);\n};\n","import * as constants from \"./constants.js\";\nimport { Dungeon } from \"./dungeon.js\";\nimport { regenerate } from \"./generator.js\";\nimport { Settings } from \"./settings.js\";\n\nconst FOLDER_NAME = \"Dungeon Draw\";\n\n/** Handle both v8 and v9 styles of detecting shift */\nconst shiftPressed = () => {\n if (KeyboardManager.MODIFIER_KEYS?.SHIFT) {\n return game.keyboard.isModifierActive(KeyboardManager.MODIFIER_KEYS.SHIFT);\n }\n return game.keyboard.isDown(\"SHIFT\");\n};\n\nconst findDungeonEntryAndNote = () => {\n for (const note of canvas.scene.notes) {\n const journalEntry = game.journal.get(note.entryId);\n if (journalEntry) {\n const flag = journalEntry.getFlag(\n constants.MODULE_NAME,\n \"dungeonVersion\"\n );\n if (flag) {\n return { journalEntry, note };\n }\n }\n }\n return { journalEntry: null, note: null };\n};\n\nconst createDungeonEntryAndNote = async () => {\n const journalEntry = await createDungeonEntry();\n const note = await createDungeonNote(journalEntry);\n return { journalEntry, note };\n};\n\nconst createDungeonEntry = async () => {\n let folder = game.folders\n .filter((f) => f.type === \"JournalEntry\" && f.name === FOLDER_NAME)\n .pop();\n if (!folder) {\n folder = await Folder.create({\n name: FOLDER_NAME,\n type: \"JournalEntry\",\n });\n }\n\n const journalEntry = await JournalEntry.create({\n name: canvas.scene.name,\n folder: folder.id,\n flags: {\n \"dungeon-draw\": {\n // extract string constant somewhere\n dungeonVersion: \"1.0\",\n },\n },\n });\n return journalEntry;\n};\n\nconst createDungeonNote = async (journalEntry) => {\n await canvas.scene.createEmbeddedDocuments(\"Note\", [\n {\n entryId: journalEntry.id,\n fontSize: 20,\n icon: \"icons/svg/cave.svg\",\n iconSize: 32,\n textAnchor: 1,\n textColor: \"#FFFFFF\",\n x: 50,\n y: 50,\n iconTint: \"\",\n text: \"Dungeon Draw\",\n flags: {},\n },\n ]);\n};\n\nconst onFreeHandMouseDraw = (preview, event) => {\n const { destination } = event.data;\n const position = destination;\n const now = Date.now();\n const temporary =\n now - preview._drawTime < preview.constructor.FREEHAND_SAMPLE_RATE;\n const snap = false;\n preview._addPoint(position, { snap, temporary });\n preview.refresh();\n};\n\nconst createDataOffsetPoints = (createData) => {\n const offsetPoints = [];\n for (let i = 0; i <= createData.shape.points.length - 2; i += 2) {\n offsetPoints.push([\n createData.shape.points[i] + createData.x,\n createData.shape.points[i + 1] + createData.y,\n ]);\n }\n return offsetPoints;\n};\n\n/**\n *\n * @extends {PlaceablesLayer}\n */\nexport class DungeonLayer extends PlaceablesLayer {\n static LAYER_NAME = \"dungeon\";\n\n constructor() {\n super();\n this.dungeon = null;\n }\n\n /** @inheritdoc */\n static get layerOptions() {\n return foundry.utils.mergeObject(super.layerOptions, {\n name: DungeonLayer.LAYER_NAME,\n canDragCreate: true,\n // we use our own snapToGrid setting to control snap\n snapToGrid: Settings.snapToGrid(),\n zIndex: -1, // under tiles and background image\n quadtree: true,\n });\n }\n\n /**\n * Use an adaptive precision depending on the size of the grid\n * @type {number}\n */\n // get gridPrecision() {\n // if ( canvas.scene.data.gridType === CONST.GRID_TYPES.GRIDLESS ) return 0;\n // return canvas.dimensions.size >= 128 ? 16 : 8;\n // }\n\n // TODO: figure out what documentName / embeddedName / type we should be using\n /** @inheritdoc */\n static documentName = \"Drawing\";\n\n /**\n * Get initial data for a new drawing.\n * Start with some global defaults, apply user default config, then apply mandatory overrides per tool.\n * @param {Object} origin The initial coordinate\n * @return {Object} The new drawing data\n */\n _getNewDrawingData(origin) {\n const data = {\n fillColor: game.user.color,\n strokeColor: game.user.color,\n strokeWidth: 8,\n };\n // Mandatory additions\n data.x = origin.x;\n data.y = origin.y;\n data.author = game.user.id;\n data.shape = {};\n\n if (game.activeDungeonDrawMode === \"add\") {\n switch (game.activeDungeonDrawTool) {\n case \"rectangle\":\n data.shape.type = CONST.DRAWING_TYPES.RECTANGLE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n case \"polygon\":\n case \"interiorwall\":\n case \"door\":\n case \"secretdoor\":\n case \"invisiblewall\":\n case \"themepainter\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = 0;\n break;\n case \"freehand\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = data.bezierFactor ?? 0.5;\n break;\n case \"ellipse\":\n data.type = CONST.DRAWING_TYPES.ELLIPSE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n }\n } else if (game.activeDungeonDrawMode === \"remove\") {\n switch (game.activeDungeonDrawTool) {\n case \"rectangle\":\n case \"interiorwall\":\n case \"door\":\n case \"secretdoor\":\n case \"invisiblewall\":\n case \"themepainter\":\n data.type = CONST.DRAWING_TYPES.RECTANGLE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n case \"polygon\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = 0;\n break;\n case \"freehand\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = data.bezierFactor ?? 0.5;\n break;\n case \"ellipse\":\n data.type = CONST.DRAWING_TYPES.ELLIPSE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n }\n }\n return data;\n }\n\n /** @override */\n async undoHistory() {\n return super.undoHistory();\n }\n\n /** @override */\n async deleteAll() {\n if (!game.user.isGM) {\n throw new Error(`You do not have permission to clear all.`);\n }\n return Dialog.confirm({\n title: game.i18n.localize(\"DD.ButtonTitleClearAll\"),\n content: `

${game.i18n.localize(\"DD.ClearAllDialogContent\")}

`,\n yes: () => this.dungeon?.deleteAll(),\n });\n }\n\n async generate(config) {\n if (this.dungeon) {\n await this.dungeon.deleteAll();\n } else {\n await this.createNewDungeon();\n }\n await regenerate(this.dungeon, config);\n }\n\n /* -------------------------------------------- */\n\n async loadDungeon() {\n const { journalEntry, note } = await findDungeonEntryAndNote();\n if (journalEntry) {\n this.dungeon = new Dungeon(journalEntry, note);\n await this.dungeon.loadFromJournalEntry();\n // add dungeon underneath any placeables or drawing preview\n this.addChildAt(this.dungeon, 0);\n } else {\n // no journal entry and note found, so make sure dungeon is nulled on this layer\n this.dungeon = null;\n }\n }\n\n async createNewDungeon() {\n await createDungeonEntryAndNote();\n await this.loadDungeon();\n }\n\n /* -------------------------------------------- */\n /* Rendering */\n /* -------------------------------------------- */\n\n /** @inheritdoc */\n async draw() {\n await super.draw();\n return this;\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n _onClickLeft(event) {\n const { preview, createState, originalEvent } = event.data;\n\n // Continue polygon point placement\n if (createState >= 1 && preview.isPolygon) {\n let point = event.data.destination;\n if (!originalEvent.shiftKey)\n point = canvas.grid.getSnappedPosition(\n point.x,\n point.y,\n this.gridPrecision\n );\n preview._addPoint(point, false);\n preview._chain = true; // Note that we are now in chain mode\n return preview.refresh();\n }\n super._onClickLeft(event);\n }\n\n /** @override */\n _onClickLeft2(event) {\n const { createState, preview } = event.data;\n\n // Conclude polygon placement with double-click\n if (createState >= 1 && preview.isPolygon) {\n event.data.createState = 2;\n return this._onDragLeftDrop(event);\n }\n\n super._onClickLeft2(event);\n }\n\n /** @override */\n async _onDragLeftStart(event) {\n // TODO: DrawingsLayer _onDragLeftStart isn't seeing the shift key press,\n // so set it for them ourselves :P\n event.data.originalEvent.isShift = shiftPressed();\n\n // superclass will handle layerOptions.snapToGrid\n await super._onDragLeftStart(event);\n\n // TODO: why is super._onDragleftStart() not setting createState?\n event.data.createState = 1;\n\n // we use a Drawing as our preview, but then on end-drag/completion,\n // update our single Dungeon instance.\n const data = this._getNewDrawingData(event.data.origin);\n const document = new DrawingDocument(data, { parent: canvas.scene });\n const drawing = new Drawing(document);\n event.data.preview = this.preview.addChild(drawing);\n return drawing.draw();\n }\n\n /** @override */\n _onDragLeftMove(event) {\n const { preview, createState } = event.data;\n if (!preview || preview._destroyed) {\n return;\n }\n if (preview.parent === null) {\n // In theory this should never happen, but rarely does\n this.preview.addChild(preview);\n }\n if (createState >= 1) {\n // TODO: deal with v10 having freehand-tool specific handling in DrawingShape :P\n if (game.activeDungeonDrawTool === \"freehand\") {\n onFreeHandMouseDraw(preview, event);\n } else {\n preview._onMouseDraw(event);\n }\n // easy single opcode\n const opcode = game.activeDungeonDrawMode + game.activeDungeonDrawTool;\n if (\n preview.document.shape.type !== CONST.DRAWING_TYPES.POLYGON ||\n opcode === \"adddoor\" ||\n opcode === \"addinteriorwall\" ||\n opcode === \"addsecretdoor\" ||\n opcode === \"addinvisiblewall\"\n ) {\n event.data.createState = 2;\n }\n }\n }\n\n _maybeSnappedRect(createData) {\n if (Settings.snapToGrid() && !shiftPressed()) {\n const snapPos = canvas.grid.getSnappedPosition(\n createData.x + createData.shape.width,\n createData.y + createData.shape.height,\n this.gridPrecision\n );\n createData.shape.height = snapPos.y - createData.y;\n createData.shape.width = snapPos.x - createData.x;\n }\n const rect = {\n x: createData.x,\n y: createData.y,\n height: createData.shape.height,\n width: createData.shape.width,\n };\n return rect;\n }\n\n _maybeSnapLastPoint(createData) {\n const length = createData.shape.points.length;\n if (length === 0) {\n return;\n }\n if (Settings.snapToGrid() && !shiftPressed()) {\n const snapPos = canvas.grid.getSnappedPosition(\n createData.shape.points[length - 2],\n createData.shape.points[length - 1],\n this.gridPrecision\n );\n createData.shape.points[length - 2] = snapPos.x;\n createData.shape.points[length - 1] = snapPos.y;\n }\n }\n\n _autoClosePolygon(createData) {\n const length = createData.shape.points.length;\n if (\n length > 4 &&\n (createData.shape.points[0] !== createData.shape.points[length - 2] ||\n createData.shape.points[1] !== createData.shape.points[length - 1])\n ) {\n // auto-close the polygon\n createData.shape.points.push(\n createData.shape.points[0],\n createData.shape.points[1]\n );\n }\n }\n\n /** @override */\n async _onDragLeftDrop(event) {\n // preview is of type Drawing.\n // Drawing.DrawingDocument.shape is shape data\n const { createState, destination, origin, preview } = event.data;\n // easy single opcode\n const opcode = game.activeDungeonDrawMode + game.activeDungeonDrawTool;\n\n // Successful drawing completion\n // TODO: why is freehand not properly advancing createState?\n if (createState === 2 || game.activeDungeonDrawTool === \"freehand\") {\n // if (createState === 2) {\n // create a new dungeon if we don't already have one\n if (!this.dungeon) {\n await this.createNewDungeon();\n }\n\n // TODO: v9 calculate distance vs origin, v10 vs preview?\n // Worse, preview.x / y don't exist when starting a new scene/first drawing,\n // which causes an error.\n // preview.document.shape.x / y do, tho\n // const distance = Math.hypot(\n // destination.x - preview.x,\n // destination.y - preview.y\n // );\n const distance = Math.hypot(\n destination.x - origin.x,\n destination.y - origin.y\n );\n const minDistance = distance >= canvas.dimensions.size / 8;\n\n // preview.isPolygon && preview.data.points.length > 2;\n // XXXX\n // in foundry v10, drawing.document.shape.points is a flat array\n const completePolygon =\n preview.isPolygon && preview.document.shape.points.length > 4;\n\n // Clean up and DRY up these if/else blocks\n if (opcode === \"adddoor\") {\n event.data.createState = 0;\n // clone the shape data\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addDoor(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addsecretdoor\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addSecretDoor(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addinteriorwall\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addInteriorWall(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addinvisiblewall\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addInvisibleWall(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (minDistance || completePolygon) {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n // TODO: do we care about normalizing the shape? maybe for freehand curves/lines?\n const createData = this.constructor.placeableClass.normalizeShape(data);\n if (opcode === \"addellipse\") {\n const x = createData.x + createData.shape.width / 2;\n const y = createData.y + createData.shape.height / 2;\n await this.dungeon.addEllipse(\n x,\n y,\n createData.shape.width,\n createData.shape.height\n );\n } else if (opcode === \"addfreehand\") {\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addPolygon(offsetPoints);\n } else if (opcode === \"addpolygon\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addPolygon(offsetPoints);\n } else if (opcode === \"addrectangle\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.addRectangle(rect);\n } else if (opcode === \"addthemepainter\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addThemeArea(offsetPoints);\n } else if (opcode === \"removedoor\") {\n const rect = this._maybeSnappedRect(createData);\n // TODO: need to spam out methods to various different flavor deletions\n await this.dungeon.removeDoors(rect);\n } else if (opcode === \"removeellipse\") {\n const x = createData.x + createData.shape.width / 2;\n const y = createData.y + createData.shape.height / 2;\n await this.dungeon.removeEllipse(\n x,\n y,\n createData.shape.width,\n createData.shape.height\n );\n } else if (opcode === \"removefreehand\") {\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.removePolygon(offsetPoints);\n } else if (opcode === \"removesecretdoor\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeSecretDoors(rect);\n } else if (opcode === \"removeinteriorwall\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeInteriorWalls(rect);\n } else if (opcode === \"removeinvisiblewall\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeInvisibleWalls(rect);\n } else if (opcode === \"removepolygon\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.removePolygon(offsetPoints);\n } else if (opcode === \"removerectangle\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeRectangle(rect);\n } else if (opcode === \"removethemepainter\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeThemeAreas(rect);\n }\n }\n\n // Cancel the preview\n return this._onDragLeftCancel(event);\n }\n\n // In-progress polygon\n if (createState === 1 && preview.isPolygon) {\n event.data.originalEvent.preventDefault();\n if (preview._chain) {\n return;\n }\n return this._onClickLeft(event);\n }\n\n // Incomplete drawing\n return this._onDragLeftCancel(event);\n }\n}\n","/**\n * Sheet for dungeon generation ettings.\n *\n * @extends {FormApplication}\n */\nexport class GeneratorSheet extends FormApplication {\n constructor(activeTab = \"settings\") {\n super();\n this._tabs[0].active = activeTab;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-generator-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/generator-sheet.html\",\n width: 480,\n height: 800,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.GeneratorSheetTitle\");\n }\n\n /** @override */\n getData() {\n return {\n height: 30,\n width: 30,\n\n // 2d-dungeon\n centerExits: false,\n circularPaths: false,\n generate2DDungeonDoors: true,\n maxRoomSize: 7,\n minRoomSize: 3,\n roomCount: 15,\n\n // dungeoneer\n generateDungeoneerDoors: true,\n\n // rot-js-cellular\n connectCaves: true,\n smoothing: 0,\n };\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html.find('button[name=\"generate\"]').click(this.generate.bind(this));\n html\n .find('select[name=\"algorithm\"]')\n .change(this.changeAlgorithm.bind(this));\n this.changeAlgorithm();\n }\n\n async changeAlgorithm(event) {\n event?.preventDefault();\n const formData = this._getSubmitData();\n const algClass = `.${formData.algorithm}`;\n $(\".alg-fields\").filter(algClass).show();\n $(\".alg-fields\").not(algClass).hide();\n }\n\n async generate(event) {\n event.preventDefault();\n const formData = this._getSubmitData();\n await canvas.dungeon.generate(formData);\n }\n}\n","import * as constants from \"./constants.js\";\nimport { DungeonLayer } from \"./dungeonlayer.js\";\n\nexport class Keybindings {\n static register() {\n game.keybindings.register(constants.MODULE_NAME, \"redo\", {\n name: \"DD.ButtonTitleRedo\",\n uneditable: [\n { key: \"KeyY\", modifiers: [KeyboardManager.MODIFIER_KEYS.CONTROL] },\n ],\n onDown: Keybindings.onRedo,\n });\n\n game.keybindings.register(constants.MODULE_NAME, \"undo\", {\n name: \"DD.ButtonTitleUndo\",\n uneditable: [\n { key: \"KeyZ\", modifiers: [KeyboardManager.MODIFIER_KEYS.CONTROL] },\n ],\n onDown: Keybindings.onUndo,\n });\n }\n\n static onRedo() {\n if (!canvas.ready) {\n return false;\n }\n const layer = canvas.activeLayer;\n if (!(layer instanceof DungeonLayer)) {\n return false;\n }\n\n layer.dungeon?.redo();\n return true;\n }\n\n static onUndo() {\n if (!canvas.ready) {\n return false;\n }\n const layer = canvas.activeLayer;\n if (!(layer instanceof DungeonLayer)) {\n return false;\n }\n\n layer.dungeon?.undo();\n return true;\n }\n}\n","import {\n getCustomThemes,\n getThemePainterThemeKey,\n setThemePainterThemeKey,\n themes,\n} from \"./themes.js\";\n\nexport class Toolbar extends Application {\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-toolbar\",\n // classes: [\"sheet\"],\n popOut: false,\n template: \"modules/dungeon-draw/templates/toolbar.html\",\n // width: 480,\n // height: 500,\n // tabs: [\n // { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n // ],\n });\n }\n\n constructor() {\n super();\n }\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html.find(\".addremove-toggle\").click(this.addRemoveClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this.themeSelectChange.bind(this));\n html.find(\".control-tool\").click(this.controlToolClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this.themeSelectChange.bind(this));\n }\n\n /** @override */\n getData() {\n const customThemes = getCustomThemes();\n const customThemeKeys = Object.keys(customThemes).sort();\n const themeKeys = Object.keys(themes).sort();\n const themePainterThemeKey = getThemePainterThemeKey();\n const toggleAddClass =\n game.activeDungeonDrawMode === \"add\" ? \"toggle-on\" : \"\";\n const toggleRemoveClass =\n game.activeDungeonDrawMode === \"remove\" ? \"toggle-on\" : \"\";\n\n const data = {\n customThemes,\n customThemeKeys,\n row1: [\n {\n name: \"rectangle\",\n title: \"DD.ButtonTitleRectangle\",\n icon: \"fas fa-square\",\n class: \"add\",\n isActive: game.activeDungeonDrawTool === \"rectangle\",\n },\n {\n name: \"polygon\",\n title: \"DD.ButtonTitlePolygon\",\n icon: \"fas fa-draw-polygon\",\n isActive: game.activeDungeonDrawTool === \"polygon\",\n },\n {\n name: \"ellipse\",\n title: \"DD.ButtonTitleEllipse\",\n icon: \"fas fa-circle\",\n isActive: game.activeDungeonDrawTool === \"ellipse\",\n },\n {\n name: \"freehand\",\n title: \"DD.ButtonTitleFreehand\",\n icon: \"fas fa-signature\",\n isActive: game.activeDungeonDrawTool === \"freehand\",\n },\n ],\n row2: [\n {\n name: \"interiorwall\",\n title: \"DD.ButtonTitleInteriorWall\",\n icon: \"fas fa-bars\",\n isActive: game.activeDungeonDrawTool === \"interiorwall\",\n },\n {\n name: \"door\",\n title: \"DD.ButtonTitleDoor\",\n icon: \"fas fa-door-open\",\n isActive: game.activeDungeonDrawTool === \"door\",\n },\n {\n name: \"secretdoor\",\n title: \"DD.ButtonTitleSecretDoor\",\n icon: \"fas fa-user-secret\",\n isActive: game.activeDungeonDrawTool === \"secretdoor\",\n },\n {\n name: \"invisiblewall\",\n title: \"DD.ButtonTitleInvisibleWall\",\n icon: \"fas fa-eye-slash\",\n isActive: game.activeDungeonDrawTool === \"invisiblewall\",\n },\n ],\n row3: [\n {\n name: \"themepainter\",\n title: \"DD.ButtonTitleThemePainter\",\n icon: \"fas fa-brush\",\n isActive: game.activeDungeonDrawTool === \"themepainter\",\n },\n ],\n themeKeys,\n themePainterThemeKey,\n themes,\n toggleAddClass,\n toggleRemoveClass,\n };\n return data;\n }\n\n render(force = false, options = {}) {\n super.render(force, options);\n }\n\n updateActiveCss() {\n this._element.find(\".control-tool\").removeClass(\"active\");\n this._element\n .find(`[data-tool='${game.activeDungeonDrawTool}']`)\n .addClass(\"active\");\n }\n\n addRemoveClick(event) {\n game.activeDungeonDrawMode = $(event.target).data(\"addremove\");\n this._element.find(\".addremove-toggle\").removeClass(\"toggle-on\");\n $(event.currentTarget).addClass(\"toggle-on\");\n }\n\n controlToolClick(event) {\n const activeTool = $(event.currentTarget).data(\"tool\");\n game.activeDungeonDrawTool = activeTool;\n this.updateActiveCss();\n }\n\n themeSelectChange(event) {\n const themeKey = $(event.currentTarget).val();\n setThemePainterThemeKey(themeKey);\n }\n}\n","import { ConfigSheet } from \"./configsheet.js\";\nimport { DungeonLayer } from \"./dungeonlayer.js\";\nimport * as constants from \"./constants.js\";\nimport { GeneratorSheet } from \"./generatorsheet.js\";\nimport { Keybindings } from \"./keybindings\";\nimport { Settings } from \"./settings\";\nimport { Toolbar } from \"./toolbar\";\n\nconst toolbar = new Toolbar();\n\nexport class DungeonDraw {\n static init() {\n Settings.register();\n Keybindings.register();\n\n game.activeDungeonDrawTool = \"rectangle\";\n game.activeDungeonDrawMode = \"add\";\n }\n\n static ready() {}\n\n static controlsVisible() {\n if (game.user.isGM) {\n return true;\n }\n const allowTrustedPlayer = game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_ALLOW_TRUSTED_PLAYER\n );\n return allowTrustedPlayer && game.user.isTrusted;\n }\n\n static getSceneControlButtons(controls) {\n CONFIG.Canvas.layers.dungeon = {\n layerClass: DungeonLayer,\n group: \"primary\",\n };\n CONFIG.Dungeon = {\n layerClass: DungeonLayer,\n };\n\n controls.push({\n name: \"dungeondraw\",\n title: \"DD.SceneControlTitle\",\n layer: DungeonLayer.LAYER_NAME,\n icon: \"fas fa-dungeon\",\n visible: DungeonDraw.controlsVisible(),\n tools: [\n {\n name: \"drawmap\",\n title: \"DD.ButtonTitleDrawMap\",\n icon: \"fas fa-dungeon\",\n },\n {\n name: \"undo\",\n title: \"DD.ButtonTitleUndo\",\n icon: \"fas fa-undo\",\n onClick: async () => {\n await canvas.dungeon.dungeon.undo();\n },\n button: true,\n },\n {\n name: \"redo\",\n title: \"DD.ButtonTitleRedo\",\n icon: \"fas fa-redo\",\n onClick: async () => {\n await canvas.dungeon.dungeon.redo();\n },\n button: true,\n },\n {\n name: \"generate\",\n title: \"DD.ButtonTitleGenerate\",\n icon: \"fas fa-magic\",\n onClick: async () => new GeneratorSheet().render(true),\n button: true,\n },\n {\n name: \"config\",\n title: \"DD.ButtonTitleConfig\",\n icon: \"fas fa-cog\",\n onClick: () => new ConfigSheet().render(true),\n button: true,\n },\n {\n name: \"savetoscene\",\n title: \"DD.ButtonTitleSaveToSceneBackground\",\n icon: \"fas fa-sign-out-alt\",\n visible: game.user.isGM,\n onClick: async () => {\n await canvas.dungeon.dungeon.saveToSceneBackground();\n },\n button: true,\n },\n {\n name: \"clear\",\n title: \"DD.ButtonTitleClearAll\",\n icon: \"fas fa-trash\",\n visible: game.user.isGM,\n onClick: () => canvas.dungeon.deleteAll(),\n button: true,\n },\n ],\n activeTool: \"drawmap\",\n });\n }\n\n static async canvasReady(canvas) {\n await canvas.dungeon.loadDungeon();\n }\n\n static async updateJournalEntry(document, change, options, userId) {\n if (game.user.id !== userId) {\n // if somebody else changed the backing JournalEntry, we need to refresh\n await canvas.dungeon.dungeon?.maybeRefresh(document);\n }\n }\n\n static async renderSceneControls(controls) {\n if (controls.activeControl !== \"dungeondraw\") {\n // TODO: not found?\n await toolbar.close();\n return;\n }\n toolbar.render(true);\n }\n}\n\nHooks.on(\"init\", DungeonDraw.init);\nHooks.on(\"ready\", DungeonDraw.ready);\nHooks.on(\"getSceneControlButtons\", DungeonDraw.getSceneControlButtons);\nHooks.on(\"canvasReady\", DungeonDraw.canvasReady);\nHooks.on(\"updateJournalEntry\", DungeonDraw.updateJournalEntry);\nHooks.on(\"renderSceneControls\", DungeonDraw.renderSceneControls);\n"],"names":["MODULE_NAME","Settings","static","game","settings","register","constants.MODULE_NAME","name","i18n","localize","scope","default","type","Boolean","config","onChange","value","canvas","dungeon","options","snapToGrid","String","get","getCustomThemes","customThemesString","themeObj","JSON","parse","Object","keys","forEach","key","foundry","utils","mergeObject","doorColor","doorFillColor","doorFillOpacity","doorLineThickness","doorThickness","exteriorShadowColor","exteriorShadowThickness","exteriorShadowOpacity","floorColor","floorOpacity","floorTexture","floorTextureRotation","floorTextureTint","interiorShadowColor","interiorShadowThickness","interiorShadowOpacity","invisibleWallColor","invisibleWallFillColor","invisibleWallLineThickness","invisibleWallFillOpacity","invisibleWallThickness","matchBaseWalls","sceneBackgroundColor","sceneGridColor","sceneGridOpacity","secretDoorSColor","secretDoorStyleGM","secretDoorStylePlayer","threeDDoorTexture","threeDDoorTextureTint","threeDWallTexture","threeDWallTextureTint","threeDWallSidesTexture","threeDWallSidesTextureTint","wallColor","wallTexture","wallTextureTint","wallThickness","e","console","log","setCustomThemes","customThemes","themesString","stringify","set","getThemePainterThemeKey","setThemePainterThemeKey","themeKey","themes","arcPavement","basicBlack","cavern","checkerboard","cobblestone","dirt","dungeonSquares","grass","groovyCarpet","hexagon","marble","metalGrid","metalSquares","moldvayBlue","neonBlueprint","ruddyPaper","water","woodPlanks","xenomorph","ThemeSheet","FormApplication","constructor","super","this","defaultOptions","id","classes","template","width","height","threeDCanvasEnabled","tabs","navSelector","contentSelector","initial","title","getData","theme","themeName","async","event","formData","refresh","ConfigSheet","activeTab","_tabs","active","state","customThemeKeys","sort","themeKeys","themePainterThemeKey","customThemeName","themePainterTheme","setConfig","user","isGM","scene","update","backgroundColor","gridAlpha","sceneGridAlpha","gridColor","close","preview","removeChildren","activateListeners","html","find","click","_onResetDefaults","bind","_onThemeNameClick","_onSaveAsThemeClick","_onEditThemeClick","_onCopyThemeClick","_onDeleteThemeClick","change","_onThemePainterThemeSelect","_onExportThemesClick","_onImportThemesClick","preventDefault","render","themeRow","$","currentTarget","parent","data","newConfig","saveAsThemeName","closest","children","val","_getSubmitData","oldTheme","newTheme","newName","num","done","saveDataToFile","Dialog","content","renderTemplate","hint","buttons","import","icon","label","callback","form","files","length","ui","notifications","error","readTextFromFile","then","text","newJson","wipe","checked","oldJson","mergedJson","no","Exception","Error","message","toString","IllegalArgumentException","GeometryComponentFilter","filter","geom","Comparable","Clonable","Serializable","NumberUtil","x1","x2","tolerance","Math","abs","Long","high","low","i","mask","result","Double","Comparator","NaN","isNaN","n","Number","isInfinite","isFinite","MAX_VALUE","POSITIVE_INFINITY","NEGATIVE_INFINITY","Float64Array","Int32Array","EXP_BIT_MASK","f64buf","i32buf","buffer","doubleToLongBits","longBitsToDouble","bits","BIAS","log2","floor","pow","MAX_REL_BITS_INTEGER","x","y","f","skip","sign","exp","Infinity","fract","RuntimeException","AssertionFailedException","constructor_","apply","arguments","call","Assert","shouldNeverReachHere","assertion","isTrue","expectedValue","actualValue","equals","kBuf","ArrayBuffer","kBufAsF64","kBufAsI32","Coordinate","z","c","getZ","NULL_ORDINATE","getM","setOrdinate","ordinateIndex","X","Y","Z","setZ","equals2D","other","equalsWithTolerance","setM","m","M","getOrdinate","equals3D","equalInZ","setX","compareTo","o","getX","clone","CloneNotSupportedException","copy","distance3D","dx","dy","dz","sqrt","getY","setY","distance","hashCode","setCoordinate","interfaces_","Cloneable","DimensionalComparator","_dimensionsToTest","dimensionsToTest","a","b","compare","c1","c2","compX","compY","Envelope","_minx","_maxx","_miny","_maxy","init","p","env","p1","p2","y1","y2","q","q1","q2","minq","min","maxq","max","minp","maxp","getArea","getWidth","getHeight","otherEnvelope","isNull","getMaxX","getMaxY","getMinX","getMinY","intersection","intersects","intMinX","intMinY","intMaxX","intMaxY","covers","getDiameter","w","h","expandToInclude","minExtent","translate","transX","transY","setToNull","disjoint","maxExtent","expandBy","deltaX","deltaY","contains","centre","Geometry","isGeometryCollection","getTypeCode","TYPECODE_GEOMETRYCOLLECTION","getFactory","_factory","getGeometryN","isRectangle","equalsExact","geometryChanged","geometryChangedFilter","geometryChangedAction","_envelope","equalsNorm","g","norm","getLength","getNumGeometries","isEmpty","compareToSameClass","comp","getUserData","_userData","getSRID","_SRID","getEnvelope","toGeometry","getEnvelopeInternal","checkNotGeometryCollection","equal","normalize","reverse","res","reverseInternal","envelope","setSRID","copyInternal","getPrecisionModel","computeEnvelopeInternal","SRID","setUserData","userData","iterator","j","hasNext","aElement","next","bElement","comparison","isEquivalentClass","getClass","isGeometryCollectionOrDerived","TYPECODE_MULTIPOINT","TYPECODE_MULTILINESTRING","TYPECODE_MULTIPOLYGON","geometries","array","factory","TYPECODE_POINT","TYPECODE_LINESTRING","TYPECODE_LINEARRING","TYPECODE_POLYGON","TYPENAME_POINT","TYPENAME_MULTIPOINT","TYPENAME_LINESTRING","TYPENAME_LINEARRING","TYPENAME_MULTILINESTRING","TYPENAME_POLYGON","TYPENAME_MULTIPOLYGON","TYPENAME_GEOMETRYCOLLECTION","CoordinateFilter","coord","indexOf","Lineal","CoordinateSequence","index","hasM","mIndex","getDimension","getMeasures","hasZ","size","getCoordinate","getCoordinateCopy","createCoordinate","expandEnvelope","toCoordinateArray","CoordinateSequences","src","srcPos","dest","destPos","minDim","dim","seq","hasInterface","isInteger","indexOfFirstCoordinate","scroll","isRing","firstCoordinate","ensureRing","last","k","cs1","cs2","cs1Size","d","v1","v2","minCoordinateIndex","to","minCoordIndex","minCoord","testCoord","fact","newseq","create","mid","trunc","swap","tmp","copyCoord","createClosedRing","coordinate","UnsupportedOperationException","Character","toUpperCase","Dimension","dimensionValue","FALSE","SYM_FALSE","TRUE","SYM_TRUE","DONTCARE","SYM_DONTCARE","P","SYM_P","L","SYM_L","A","SYM_A","dimensionSymbol","GeometryFilter","CoordinateSequenceFilter","isDone","isGeometryChanged","LineString","_points","points","isClosed","isSimple","getCoordinates","otherLineString","getBoundaryDimension","getCoordinateN","getNumPoints","createLineString","getEndPoint","getPointN","pts","len","x0","y0","ofLine","line","getBoundary","getGeometryType","getCoordinateSequence","getCoordinateSequenceFactory","isCoordinate","pt","getStartPoint","createPoint","Collection","add","addAll","toArray","remove","IndexOutOfBoundsException","List","NoSuchElementException","ArrayList","ensureCapacity","push","splice","clear","element","oldElement","Iterator","comparator","slice","Symbol","values","arrayList","position","CoordinateList","allowRepeated","isChanged","coordArrayType","Array","fill","obj","start","end","inc","closeRing","duplicate","CoordinateSequenceFactory","dimension","Puntal","Point","_coordinates","coordinates","IllegalStateException","point","createGeometryCollection","Area","ring","ofRingSigned","sum","p0","Arrays","t","r","concat","original","newLength","StringBuffer","str","append","setCharAt","substr","Integer","intValue","DD","_hi","_lo","dd","hi","lo","determinant","valueOf","multiply","selfSubtract","selfMultiply","strlen","isWhitespace","charAt","isNegative","signCh","numDigits","numBeforeDec","hasDecimalChar","ch","isDigit","TEN","selfAdd","expStr","substring","parseInt","ex","NumberFormatException","val2","numDecPlaces","scale","divide","negate","xAbs","xLog10","xMag","buf","le","extractSignificantDigits","insertDecimalPoint","magnitude","mag","gt","lt","ONE","decimalPointPos","MAX_PRINT_DIGITS","digit","rebiasBy10","digitChar","subtract","continueExtractingDigits","remMag","sqr","doubleValue","isZero","getSpecialNumberString","selfDivide","yhi","ylo","hc","tc","hy","ty","C","U","u","SPLIT","dump","createNaN","ge","s","reciprocal","ceil","fhi","flo","rint","setValue","ax","axdd","d2","H","S","T","zhi","zlo","hx","tx","selfSqr","toStandardNotation","toSciNotation","specialStr","sigDigits","stringOfChar","numZeroes","SCI_NOT_ZERO","digits","SCI_NOT_EXPONENT_CHAR","trailingDigits","digitsWithDecimal","isPositive","signum","PI","TWO_PI","PI_2","E","EPS","CGAlgorithmsDD","orientationIndexFilter","dx1","dy1","dx2","dy2","px","py","pw","qx","qy","qw","xInt","yInt","pa","pb","pc","detsum","detleft","detright","det","errbound","DP_SAFE_EPSILON","Orientation","orientationIndex","nPts","hiPt","hiIndex","iPrev","iNext","prev","disc","isCCW","CLOCKWISE","RIGHT","COUNTERCLOCKWISE","LEFT","COLLINEAR","STRAIGHT","Polygonal","Polygon","_shell","_holes","shell","holes","createLinearRing","hasNullElements","hasNonEmptyElements","shellCoordinates","childCoordinates","area","ofRing","shellCopy","holeCopies","getNumInteriorRing","prevX","prevY","otherPolygon","thisShell","otherPolygonShell","normalized","clockwise","getExteriorRing","getInteriorRingN","createPolygon","numPoints","convexHull","otherShell","poly","shellComp","nHole1","nHole2","thisHole","otherHole","holeComp","createMultiLineString","rings","Set","SortedSet","TreeSet","GeometryCollection","_geometries","otherCollection","numGeometries","reversed","buildGeometry","theseElements","asList","otherElements","gc","n1","n2","thisGeom","otherGeom","MultiPoint","isValid","LinearRing","validateConstruction","MINIMUM_VALID_SIZE","CoordinateXY","CoordinateXYM","_m","CoordinateXYZM","Coordinates","measures","MathUtil","ln","LOG_10","v3","v4","System","CoordinateArrays","testPts","testPt","newCoordinates","arraycopy","coord1","coord2","coordinateComparator","coordList","hasRepeatedPoints","nonNull","newCoord","srcStart","destStart","pts1","pts2","clamp","npts","extractPts","iPts","ForwardComparator","o1","o2","BidirectionalComparator","forwardComp","isEqualReversed","OLDcompare","dir1","increasingDirection","dir2","i1","i2","comparePt","StringBuilder","CoordinateArraySequence","_dimension","_measures","coordSeq","cloneCoordinates","strBuilder","CoordinateArraySequenceFactory","instanceObject","readResolve","instance","spatial","MultiPolygon","polygons","allRings","allRingsArray","Map","put","entrySet","HashSet","map","has","from","current","HashMap","MapInterface","it","hashSet","entries","entry","PrecisionModel","_modelType","_scale","FLOATING","Type","modelType","FIXED","setScale","pm","pm1","pm2","otherPrecisionModel","getMaximumSignificantDigits","otherSigDigits","getScale","isFloating","FLOATING_SINGLE","getType","description","makePrecise","round","maxSigDigits","_name","nameToTypeMap","maximumPreciseValue","MultiLineString","lineStrings","GeometryFactory","_precisionModel","_coordinateSequenceFactory","coordinateSequenceFactory","precisionModel","getDefaultCoordinateSequenceFactory","multiPolygons","multiPolygonArray","geometryArray","multiLineStrings","multiLineStringArray","lineStringArray","multiPoints","multiPointArray","linearRings","linearRingArray","pointArray","polygonArray","exemplar","createEmpty","geomList","geomType","isHeterogeneous","hasGeometryCollection","partType","toGeometryArray","geom0","createMultiPolygon","toPolygonArray","toLineStringArray","createMultiPoint","toPointArray","createMultiPointFromCoords","ptSeq","GeometryTransformer","_inputGeom","_pruneEmptyGeometry","_preserveGeometryCollectionType","_preserveCollections","_preserveType","transformPoint","transformCoordinates","transformPolygon","isAllValidLinearRings","transformLinearRing","hole","components","createCoordinateSequence","coords","getInputGeometry","transformMultiLineString","transGeomList","transformGeom","transformLineString","transformMultiPoint","transformMultiPolygon","transformGeometryCollection","transform","inputGeom","seqSize","Intersection","minX0","minY0","maxX0","maxY0","minX1","minY1","maxX1","maxY1","midx","midy","p1x","p1y","p2x","p2y","q1x","q1y","q2x","q2y","Distance","B","D","pointToSegment","noIntersection","denom","r_num","len2","minDistance","dist","GeometryLayout","GeometryType","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","TokenType","WKTGeometryType","Lexer","wkt","index_","isAlpha_","isNumeric_","opt_decimal","undefined","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","decimal","scientificNotation","parseFloat","Parser","lexer","lexer_","token_","layout_","consume_","isTokenType","match","isMatch","parseGeometry_","parseGeometryLayout_","layout","dimToken","dimInfo","parseGeometryCollectionText_","isEmptyGeometry_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","dimensions","token","o2c","ordinates","ca2p","encodePointGeometry","cs","join","encodeLineStringGeometry","ii","encodePolygonGeometry","GeometryEncoder","encode","geometryEncoder","encodeGeometryLayout","WKTParser","geometryFactory","read","write","geometry","WKTWriter","parser","LineIntersector","_result","_inputLines","_intPt","_intLineIndex","_isProper","_pa","_pb","pdx","pdy","getIndexAlongSegment","segmentIndex","intIndex","computeIntLineIndex","getTopologySummary","catBuilder","isEndPoint","isCollinear","computeIntersection","p3","p4","computeIntersect","getIntersectionNum","getEdgeDistance","isProper","hasIntersection","setPrecisionModel","isInteriorIntersection","inputLineIndex","getIntersection","NO_INTERSECTION","computeEdgeDistance","COLLINEAR_INTERSECTION","toLineString","getEndpoint","ptIndex","isIntersection","getIntersectionAlongSegment","DONT_INTERSECT","DO_INTERSECT","POINT_INTERSECTION","RobustLineIntersector","nearestPt","minDist","isInSegmentEnvelopes","intPt","env0","env1","intersectionSafe","nearestEndpoint","checkDD","intPtDD","isIn","out","println","computeCollinearIntersection","p1q1p2","p1q2p2","q1p1q2","q1p2q2","Pq1","Pq2","Qp1","Qp2","LineSegment","ls","minX","seg","orient0","orient1","geomFactory","isVertical","li","project","projectionFactor","pf0","pf1","newp0","newp1","angle","atan2","distancePerpendicular","pointToLinePerpendicular","minY","midPoint","closestPoints","closestPt","close00","closestPoint","close01","close10","close11","factor","maxX","comp0","temp","equalsTopo","lineIntersection","maxY","pointAlongOffset","segmentLengthFraction","offsetDistance","segx","segy","ux","uy","setCoordinates","segmentFraction","inputPt","segFrac","isHorizontal","reflect","A2plusB2","A2subB2","segmentToSegment","pointAlong","bits0","hash0","bits1","WKTReader","BufferParameters","_quadrantSegments","DEFAULT_QUADRANT_SEGMENTS","_endCapStyle","CAP_ROUND","_joinStyle","JOIN_ROUND","_mitreLimit","DEFAULT_MITRE_LIMIT","_isSingleSided","_simplifyFactor","DEFAULT_SIMPLIFY_FACTOR","quadrantSegments","setQuadrantSegments","endCapStyle","setEndCapStyle","joinStyle","mitreLimit","setJoinStyle","setMitreLimit","quadSegs","alpha","cos","getEndCapStyle","isSingleSided","JOIN_BEVEL","JOIN_MITRE","getJoinStyle","setSimplifyFactor","simplifyFactor","getSimplifyFactor","getQuadrantSegments","getMitreLimit","setSingleSided","CAP_FLAT","CAP_SQUARE","Location","locationValue","EXTERIOR","BOUNDARY","INTERIOR","NONE","Position","ON","EmptyStackException","Stack","pop","peek","empty","search","RightmostEdgeFinder","_minIndex","_minCoord","_minDe","_orientedDe","getRightmostSide","de","side","getRightmostSideOfSegment","checkForRightmostCoordinate","findRightmostEdgeAtVertex","getEdge","pPrev","pNext","orientation","usePrev","pos","findRightmostEdgeAtNode","star","getNode","getEdges","getRightmostEdge","isForward","getSym","findEdge","dirEdgeList","TopologyException","msg","LinkedList","addLast","removeFirst","shift","BufferSubgraph","_finder","_dirEdgeList","_nodes","_rightMostCoord","_env","clearVisitedEdges","setVisited","getRightmostCoordinate","computeNodeDepth","startEdge","isVisited","computeDepths","copySymDepths","computeDepth","outsideDepth","getLabel","setEdgeDepths","node","addReachable","findResultEdges","getDepth","isInteriorAreaEdge","setInResult","nodesVisited","nodeQueue","startNode","sym","adjNode","graph","edgeEnv","nodeStack","setDepth","symNode","getNodes","getDirectedEdges","RayCrossingCounter","_p","_crossingCount","_isPointOnSegment","counter","countSegment","isOnSegment","getLocation","minx","maxx","orient","isPointInPolygon","PointLocation","lineIntersector","locatePointInRing","locateInRing","TopologyLocation","location","on","gl","left","right","setAllLocations","locValue","setAllLocationsIfNull","isLine","merge","newLoc","getLocations","flip","toLocationSymbol","setLocations","posIndex","isArea","isAnyNull","setLocation","locIndex","isEqualOnSide","allPositionsEqual","loc","Label","elt","onLoc","lbl","geomIndex","leftLoc","rightLoc","lineLabel","getGeometryCount","count","toLine","EdgeRing","_startDe","_maxNodeDegree","_edges","_pts","_label","_ring","_isHole","_geometryFactory","computePoints","computeRing","isIsolated","isFirstEdge","getEdgeRing","mergeLabel","addPoints","setEdgeRing","getNext","getLinearRing","computeMaxNodeDegree","degree","getOutgoingDegree","edge","edgePts","startIndex","isHole","containsPoint","isInRing","addHole","isShell","getMaxNodeDegree","getShell","deLabel","setShell","toPolygon","holeLR","MinimalEdgeRing","er","setMinEdgeRing","getNextMin","MaximalEdgeRing","buildMinimalRings","minEdgeRings","getMinEdgeRing","minEr","linkDirectedEdgesForMinimalEdgeRings","linkMinimalDirectedEdges","GraphComponent","_isInResult","_isCovered","_isCoveredSet","_isVisited","isInResult","isCovered","isCoveredSet","setLabel","setCovered","updateIM","im","computeIM","Node","_coord","edges","isIncidentEdgeInResult","print","computeMergedLocation","label2","eltIndex","nLoc","argIndex","onLocation","insert","setNode","setLabelBoundary","SortedMap","colorOf","color","parentOf","setColor","leftOf","rightOf","TreeMap","root_","size_","cmp","getValue","getKey","oldValue","fixAfterInsertion","rotateLeft","rotateRight","getFirstEntry","successor","l","containsKey","NodeMap","nodeMap","nodeFact","addNode","createNode","getBoundaryNodes","bdyNodes","Quadrant","quad","NE","NW","quad1","quad2","halfPlane","SE","SW","EdgeEnd","_edge","_node","_p0","_p1","_dx","_dy","_quadrant","compareDirection","getDy","className","getName","lastDotPos","lastIndexOf","getDirectedCoordinate","getDx","getQuadrant","computeLabel","boundaryNodeRule","quadrant","DirectedEdge","_isForward","_sym","_next","_nextMin","_edgeRing","_minEdgeRing","_depth","computeDirectedLabel","currLocation","nextLocation","depthVal","setNextMin","nextMin","getDepthDelta","minEdgeRing","isLineEdge","isExteriorIfArea0","isExteriorIfArea1","edgeRing","depthDelta","printEdge","printReverse","setSym","setVisitedEdge","depth","directionFactor","oppositePos","opposite","oppositeDepth","setNext","NodeFactory","PlanarGraph","_edgeEndList","nodes","nodeit","linkResultDirectedEdges","printEdges","eiList","getNodeIterator","debugPrintln","isBoundaryNode","linkAllDirectedEdges","matchInSameDirection","ep0","ep1","getEdgeEnds","debugPrint","getEdgeIterator","findEdgeInSameDirection","eCoord","insertEdge","findEdgeEnd","ee","addEdges","edgesToAdd","de1","de2","PolygonBuilder","_shellList","testEr","shellList","testRing","testEnv","minShell","minShellEnv","tryShell","tryShellRing","tryShellEnv","ptNotInList","isContained","sortShellsAndHoles","edgeRings","freeHoleList","computePolygons","resultPolyList","placeFreeHoles","findEdgeRingContaining","buildMinimalEdgeRings","maxEdgeRings","findShell","placePolygonHoles","buildMaximalEdgeRings","dirEdges","getPolygons","shellCount","Boundable","getBounds","ItemBoundable","_bounds","_item","bounds","item","getItem","PriorityQueue","_size","_items","poll","minItem","reorder","child","SpatialIndex","itemEnv","query","AbstractNode","_childBoundables","_level","level","getLevel","getChildBoundables","addChildBoundable","childBoundable","computeBounds","Collections","reverseOrder","alen","singletonList","EnvelopeDistance","ax1","ay1","ax2","ay2","bx1","by1","bx2","by2","env2","miny","maxy","aminx","aminy","amaxx","amaxy","bminx","bminy","bmaxx","bmaxy","maxDistance","BoundablePair","_boundable1","_boundable2","_distance","_itemDistance","boundable1","boundable2","itemDistance","maximumDistance","expandToQueue","priQ","isComp1","isComposite","isComp2","expand","isLeaves","nd","bndComposite","bndOther","isFlipped","bp","getDistance","getBoundable","ItemVisitor","visitItem","AbstractSTRtree","_root","_built","_itemBoundables","_nodeCapacity","DEFAULT_NODE_CAPACITY","nodeCapacity","queryInternal","searchBounds","visitor","childBoundables","getIntersectsOp","matches","getNodeCapacity","lastNode","build","removeItem","childToRemove","itemsTree","valuesTree","valuesTreeForNode","valuesTreeForChild","boundablesAtLevel","boundables","top","boundable","createHigherLevels","getRoot","found","childToPrune","boundablesOfALevel","parentBoundables","createParentBoundables","maxChildDepth","childDepth","newLevel","sortedChildBoundables","getComparator","IntersectsOp","ItemDistance","item1","item2","STRtree","avg","kNearestNeighbors","items","createParentBoundablesFromVerticalSlices","verticalSlices","createParentBoundablesFromVerticalSlice","nearestNeighbourK","initBndPair","distanceLowerBound","bndPair","pairDistance","getItems","STRtreeNode","intersectsOp","sliceCount","sliceCapacity","slices","boundablesAddedToSlice","searchEnv","yComparator","minLeafCount","xComparator","nearestNeighbour","itemDist","minPair","tree","bnd","isWithinDistance","distanceUpperBound","compareDoubles","centreX","centreY","aBounds","bBounds","SegmentPointComparator","octant","xSign","relativeSign","ySign","compareValue","compareSign0","compareSign1","SegmentNode","_segString","_segmentOctant","_isInterior","segString","segmentOctant","maxSegmentIndex","isInterior","SegmentNodeList","_nodeMap","getSplitCoordinates","addEndpoints","eiPrev","ei","addEdgeCoordinates","addCollapsedNodes","collapsedVertexIndexes","findCollapsesFromInsertedNodes","findCollapsesFromExistingVertices","vertexIndex","createSplitEdgePts","ei0","ei1","lastSegStartPt","useIntPt1","ipt","addSplitEdges","edgeList","newEdge","createSplitEdge","findCollapseIndex","collapsedVertexIndex","numVerticesBetween","maxSegIndex","NodedSegmentString","eiNew","getSegmentOctant","checkSplitEdgesCorrectness","splitEdges","pt0","splitnPts","ptn","Octant","adx","ady","SegmentString","setData","NodableSegmentString","addIntersection","_nodeList","_data","segStrings","resultEdgelist","getNodedSubstrings","getNodeList","safeOctant","addIntersectionNode","normalizedSegmentIndex","nextSegIndex","nextPt","addIntersections","MonotoneChainOverlapAction","_overlapSeg1","_overlapSeg2","overlap","start1","mc2","start2","getLineSegment","MonotoneChain","_start","_end","_context","_id","context","computeSelect","start0","end0","mcs","select","computeOverlaps","mc","mco","end1","overlaps","mid0","mid1","setId","getEndIndex","getStartIndex","getContext","getId","MonotoneChainBuilder","safeStart","chainQuad","getChains","mcList","chainStart","chainEnd","findChainEnd","Noder","computeNodes","SinglePassNoder","_segInt","segInt","setSegmentIntersector","MCIndexNoder","_monoChains","_index","_idCounter","_nodedSegStrings","_nOverlaps","si","getMonotoneChains","getIndex","segStr","inputSegStrings","intersectChains","overlapAction","SegmentOverlapAction","queryChain","testChain","_si","ss1","ss2","processIntersections","BufferInputLineSimplifier","_inputLine","_distanceTol","_isDeleted","_angleOrientation","inputLine","distanceTol","simplify","isDeletable","i0","isConcave","isShallow","isShallowSampled","deleteShallowConcavities","midIndex","findNextNonDeletedIndex","lastIndex","isMiddleVertexDeleted","DELETE","isShallowConcavity","NUM_PTS_TO_CHECK","collapseLine","INIT","KEEP","OffsetSegmentString","_ptList","_minimimVertexDistance","COORDINATE_ARRAY_TYPE","addPt","bufPt","isRedundant","addPts","lastPt","startPt","setMinimumVertexDistance","minimimVertexDistance","Angle","radians","PI_TIMES_2","dx0","dy0","anglePrev","angleNext","tip1","tail","tip2","a1","a2","diff","ang1","ang2","delAngle","angleDegrees","crossproduct","sin","angDel","PI_OVER_2","PI_OVER_4","OffsetSegmentGenerator","_maxCurveSegmentError","_filletAngleQuantum","_closingSegLengthFactor","_segList","_bufParams","_li","_s0","_s1","_s2","_seg0","_seg1","_offset0","_offset1","_side","_hasNarrowConcaveAngle","bufParams","MAX_CLOSING_SEG_LEN_FACTOR","addNextSegment","addStartPoint","computeOffsetSegment","outsideTurn","addCollinear","addOutsideTurn","addInsideTurn","addLineEndCap","offsetL","offsetR","addDirectedFillet","squareCapSideOffset","squareCapLOffset","squareCapROffset","addMitreJoin","offset0","offset1","addLimitedMitreJoin","OFFSET_SEGMENT_SEPARATION_FACTOR","addBevelJoin","addCornerFillet","createSquare","addSegments","addFirstSegment","direction","radius","startAngle","endAngle","addLastSegment","initSideSegments","s1","s2","basePt","ang0","angDiffHalf","angleBetweenOriented","midAng","mitreMidAng","mitreDist","bevelHalfLen","bevelMidX","bevelMidY","bevelMidPt","mitreMidLine","bevelEndLeft","bevelEndRight","totalAngle","nSegs","angleInc","offset","sideSign","INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR","createCircle","CURVE_VERTEX_SNAP_DISTANCE_FACTOR","hasNarrowConcaveAngle","OffsetCurveBuilder","getOffsetCurve","inputPts","isRightSide","posDistance","segGen","getSegGen","computePointCurve","computeOffsetCurve","curvePts","computeSingleSidedBufferCurve","distTol","simplifyTolerance","simp2","simp1","computeRingBufferCurve","simp","computeLineBufferCurve","getLineCurve","isLineOffsetEmpty","getBufferParameters","bufDistance","getRingCurve","copyCoordinates","SubgraphDepthLocater","_subgraphs","_seg","subgraphs","findStabbedSegments","stabbingRayLeftPt","stabbedSegments","bsg","dirEdge","ds","DepthSegment","_leftDepth","_upwardSeg","orientIndex","compareX","seg0","seg1","compare0","NotRepresentableException","HCoordinate","_x","_y","_w","Triangle","m00","m01","m10","m11","v0","lenAB","lenBC","lenCA","maxLen","ay","bx","by","asqr","bsqr","numx","numy","ccx","ccy","isAcute","cx","cy","l1","l2","len0","frac","uz","vx","vy","vz","crossx","crossy","crossz","absSq","len1","circum","inCentreX","inCentreY","signedArea","interpolateZ","longestSideLength","circumcentre","area3D","centroid","inCentre","OffsetCurveSetBuilder","_curveBuilder","_curveList","curveBuilder","addRingSide","cwLeftLoc","cwRightLoc","curve","addCurve","addRingBothSides","addPoint","addPolygon","offsetSide","shellCoord","removeRepeatedPoints","isErodedCompletely","holeCoord","isTriangleErodedCompletely","triangleCoord","bufferDistance","tri","addLineString","getCurves","addCollection","ringCoord","envMinDimension","PointOnGeometryLocator","locate","GeometryCollectionIterator","_parent","_atStart","_max","_subcollectionIterator","isAtomic","SimplePointInAreaLocator","_geom","shellLoc","holeLoc","locatePointInPolygon","geomi","g2","locateInGeometry","EdgeEndStar","_edgeMap","_edgeList","_ptInAreaLocation","getNextCW","iNextCW","propagateSideLabels","startLoc","currLoc","isAreaLabelsConsistent","geomGraph","computeEdgeEndLabels","getBoundaryNodeRule","checkAreaLabelsConsistent","lastEdgeIndex","findIndex","eSearch","getGeometry","computeLabelling","hasDimensionalCollapseEdge","getDegree","insertEdgeEnd","DirectedEdgeStar","_resultAreaEdgeList","_SCANNING_FOR_INCOMING","_LINKING_TO_OUTGOING","getResultAreaEdges","firstOut","incoming","nextOut","nextIn","de0","deLast","quad0","isNorthern","updateLabelling","nodeLabel","prevOut","firstIn","edgeIndex","startDepth","targetLastDepth","nextDepth","endIndex","currDepth","nextDe","mergeSymLabels","findCoveredLineEdges","eLabel","eLoc","OverlayNodeFactory","OrientedCoordinateArray","_orientation","orientation1","orientation2","limit1","limit2","compPt","done1","done2","oca","compareOriented","EdgeList","_ocaMap","edgeColl","findEdgeIndex","findEqualEdge","SegmentIntersector","e0","segIndex0","e1","segIndex1","IntersectionAdder","_hasIntersection","_hasProper","_hasProperInterior","_hasInterior","_properIntersectionPoint","_isSelfIntersection","numIntersections","numInteriorIntersections","numProperIntersections","numTests","isTrivialIntersection","isAdjacentSegments","getProperIntersectionPoint","hasProperInteriorIntersection","getLineIntersector","hasProperIntersection","p00","p01","p10","p11","hasInteriorIntersection","EdgeIntersection","getSegmentIndex","EdgeIntersectionList","Edge","IntersectionMatrix","_matrix","setAll","elements","actualDimensionValue","requiredDimensionSymbol","requiredDimensionSymbols","isIntersects","isDisjoint","isCovers","isCoveredBy","dimensionSymbols","row","col","toDimensionValue","column","isContains","setAtLeast","minimumDimensionSymbols","minimumDimensionValue","setAtLeastIfValid","isWithin","isTouches","dimensionOfGeometryA","dimensionOfGeometryB","isOverlaps","isEquals","builder","ai","bi","toDimensionSymbol","transpose","isCrosses","IntArrayList","initialCapacity","capacity","copyOf","MonotoneChainIndexer","list","getChainStartIndices","startIndexList","OLDgetChainStartIndices","toIntArray","MonotoneChainEdge","mcb","chainIndex","computeIntersectsForChain","chainIndex0","mce","chainIndex1","getStartIndexes","computeIntersects","Depth","NULL_VALUE","depthValue","minDepth","newValue","getDelta","depthAtLocation","_mce","_isIsolated","_depthDelta","getCollapsedEdge","newPts","toLineLabel","setIsolated","setName","isEqualForward","isEqualReverse","iRev","isCollapsed","getMaximumSegmentIndex","getMonotoneChainEdge","isPointwiseEqual","setDepthDelta","getEdgeIntersectionList","BufferBuilder","_workingPrecisionModel","_workingNoder","_geomFact","_graph","lLoc","rLoc","lines","ss","setWorkingPrecisionModel","insertUniqueEdge","existingEdge","existingLabel","labelToMerge","mergeDelta","newDelta","buildSubgraphs","subgraphList","polyBuilder","processedGraphs","subgraph","createSubgraphs","createEmptyResultGeometry","getNoder","noder","bufferSegStrList","computeNodedEdges","oldLabel","setNoder","ScaledNoder","_noder","_scaleFactor","_offsetX","_offsetY","_isScaled","scaleFactor","isIntegerPrecision","rescale","nodedSegmentStrings","roundPts","splitSS","intSegStrings","NodingValidator","_segStrings","checkEndPtVertexIntersections","checkInteriorIntersections","ss0","pts0","checkValid","checkCollapses","checkCollapse","HotPixel","_pt","_originalPt","_ptScaled","_p0Scaled","_p1Scaled","_corner","_safeEnv","initCorners","intersectsScaled","segMinx","segMaxx","segMiny","segMaxy","isOutsidePixelEnv","intersectsToleranceSquare","copyScaled","pScaled","getSafeEnvelope","safeTolerance","SAFE_ENV_EXPANSION_FACTOR","intersectsPixelClosure","intersectsLeft","intersectsBottom","addSnappedNode","segIndex","MonotoneChainSelectAction","selectedSegment","MCIndexPointSnapper","snap","hotPixel","parentEdge","hotPixelVertexIndex","pixelEnv","hotPixelSnapAction","HotPixelSnapAction","isNodeAdded","_hotPixel","_parentEdge","_hotPixelVertexIndex","_isNodeAdded","InteriorIntersectionFinderAdder","_interiorIntersections","getInteriorIntersections","MCIndexSnapRounder","_pm","_pointSnapper","checkCorrectness","inputSegmentStrings","resultSegStrings","nv","printStackTrace","snapRound","intersections","findInteriorIntersections","computeIntersectionSnaps","computeVertexSnaps","intFinderAdder","edge0","snapPts","snapPt","BufferOp","_argGeom","_resultGeometry","_saveException","getResultGeometry","bufOp","maxPrecisionDigits","bufEnvMax","minUnitLog10","bufferFixedPrecision","fixedPM","bufBuilder","bufferReducedPrecision","precDigits","MAX_PRECISION_DIGITS","precisionDigits","sizeBasedScaleFactor","precisionScaleFactor","computeGeometry","bufferOriginalPrecision","argPM","CAP_BUTT","BoundaryNodeRule","isInBoundary","boundaryCount","Mod2BoundaryNodeRule","EndPointBoundaryNodeRule","MultiValentEndPointBoundaryNodeRule","MonoValentEndPointBoundaryNodeRule","MOD2_BOUNDARY_RULE","ENDPOINT_BOUNDARY_RULE","MULTIVALENT_ENDPOINT_BOUNDARY_RULE","MONOVALENT_ENDPOINT_BOUNDARY_RULE","OGC_SFS_BOUNDARY_RULE","PointLocator","_boundaryRule","_isIn","_numBoundaries","boundaryRule","locateInPolygonRing","updateLocationInfo","computeLocation","locateOnPoint","locateOnLineString","locateInPolygon","ml","mpoly","isOnLine","BasicSegmentString","NodingIntersectionFinder","_findAllIntersections","_isCheckEndSegmentsOnly","_keepIntersections","_isInteriorIntersectionsOnly","_interiorIntersection","_intSegments","_intersections","_intersectionCount","finder","setFindAllIntersections","isEnd1","isEnd00","isEnd01","isEnd10","isEnd11","isInteriorVertexIntersection","setInteriorIntersectionsOnly","setKeepIntersections","setCheckEndSegmentsOnly","isCheckEndSegmentsOnly","getIntersectionSegments","getIntersections","findAllIntersections","keepIntersections","isSameSegString","isEndSegment","isInteriorInt","isInteriorVertexInt","isInteriorIntersectionsOnly","FastNodingValidator","_isValid","execute","getErrorMessage","intSegs","EdgeNodingValidator","_nv","toSegmentStrings","GeometryCollectionMapper","_mapOp","mapOp","op","mapped","LineBuilder","_op","_ptLocator","_lineEdgesList","_resultLineList","ptLocator","collectLines","opCode","getGraph","collectLineEdge","collectBoundaryTouchEdge","labelIsolatedLine","targetIndex","getArgGeometry","buildLines","OverlayOp","isResultOfOp","isCoveredByA","labelIsolatedLines","edgesList","INTERSECTION","PointBuilder","_resultPointList","filterCoveredNodeToPoint","isCoveredByLA","extractNonCoveredResultNodes","LineStringSnapper","_snapTolerance","_srcPts","_allowSnappingToSourceVertices","_isClosed","srcLine","snapTolerance","srcPts","snapVertices","srcCoords","srcPt","snapVert","findSnapForVertex","snapTo","snapSegments","distinctPtCount","findSegmentIndexToSnap","snapIndex","setAllowSnappingToSourceVertices","allowSnappingToSourceVertices","GeometrySnapper","_srcGeom","srcGeom","g0","g1","snapGeom","snapper0","snapper1","computeSizeBasedSnapTolerance","fixedSnapTol","computeOverlaySnapTolerance","SNAP_PRECISION_FACTOR","cleanResult","snapToSelf","extractTargetCoordinates","SnapTransformer","snappedGeom","computeSnapTolerance","ringPts","computeMinimumSegmentLength","ptSet","minSegLen","segLen","_snapPts","_isSelfSnap","isSelfSnap","snapLine","snapper","CommonBits","_isFirst","_commonMantissaBitsCount","_commonBits","_commonSignExp","getCommon","numBits","signExpBits","numCommonMostSigMantissaBits","zeroLowerBits","padStr","toBinaryString","bitStr","nBits","prop","num1","num2","getBit","CommonBitsRemover","_commonCoord","_ccFilter","CommonCoordinateFilter","addCommonBits","trans","Translater","removeCommonBits","invCoord","getCommonCoordinate","_commonBitsX","_commonBitsY","xp","yp","SnapOverlayOp","_cbr","overlayOp","UNION","SYMDIFFERENCE","DIFFERENCE","selfSnap","remGeom","prepareResult","prepGeom","SnapIfNeededOverlayOp","isSuccess","savedException","computeIntersections","SweepLineEvent","_xValue","_eventType","_insertEvent","_deleteEventIndex","_obj","insertEvent","INSERT","isDelete","setDeleteEventIndex","deleteEventIndex","getObject","pe","getInsertEvent","isInsert","isSameLabel","ev","getDeleteEventIndex","_includeProper","_recordIsolated","_numIntersections","_bdyNodes","_isDone","_isDoneWhenProperInt","includeProper","recordIsolated","setIsDoneIfProperInt","isDoneWhenProperInt","isBoundaryPointInternal","isBoundaryPoint","setBoundaryNodes","bdyNodes0","bdyNodes1","SimpleMCSweepLineIntersector","events","nOverlaps","prepareEvents","processOverlaps","edges0","edges1","addEdge","edgeSet","ev0","mc0","ev1","mc1","IntervalRTreeNode","_min","getMin","queryMin","queryMax","getMax","NodeComparator","mid2","IntervalRTreeLeafNode","IntervalRTreeBranchNode","_node1","_node2","buildExtent","SortedPackedIntervalRTree","_leaves","buildTree","buildLevel","buildRoot","printNode","LinearComponentExtracter","_lines","_isForcedToLineString","isForcedToLineString","getLines","forceToLineString","setForceToLineString","ArrayListVisitor","IndexedPointInAreaLocator","IntervalIndexedGeometry","rcc","SegmentVisitor","_counter","_isEmpty","addLine","GeometryGraph","_parentGeom","_lineEdgeMap","_boundaryNodeRule","_useBoundaryDeterminationRule","_argIndex","_boundaryNodes","_hasTooFewPoints","_invalidPoint","_areaPtLocator","parentGeom","insertBoundaryPoint","determineBoundary","computeSelfNodes","computeRingSelfNodes","isDoneIfProperInt","esi","createEdgeSetIntersector","isRings","computeAllSegments","addSelfIntersectionNodes","computeSplitEdges","edgelist","computeEdgeIntersections","hasTooFewPoints","insertPoint","addPolygonRing","getInvalidPoint","getBoundaryPoints","coll","addSelfIntersectionNode","lr","cwLeft","cwRight","eiIt","GeometryGraphOperation","_resultPrecisionModel","_arg","setComputationPrecision","_resultGeom","_resultPolyList","geom1","createEmptyResult","MapOp","dim0","dim1","resultDimension","overlayOpCode","geomFact","resultDim","loc0","loc1","cancelDuplicateResultEdges","resultPointList","resultLineList","opcode","replaceCollapsedEdges","newEdges","updateNodeLabelling","computeOverlay","insertUniqueEdges","copyPoints","baseSplitEdges","computeLabelsFromDepths","labelIncompleteNodes","findResultAreaEdges","lineBuilder","pointBuilder","labelIncompleteNode","graphNode","ni","EdgeEndBuilder","createEdgeEndForNext","eiCurr","eiNext","createEdgeEndForPrev","computeEdgeEnds","EdgeEndBundle","_edgeEnds","computeLabelOn","foundInterior","computeLabelSide","computeLabelSides","EdgeEndBundleStar","eb","RelateNode","updateIMFromEdges","RelateNodeFactory","RelateComputer","_im","_isolatedEdges","arg","insertEdgeEnds","computeProperIntersectionIM","intersector","dimA","dimB","hasProper","hasProperInterior","labelIsolatedEdges","thisIndex","labelIsolatedEdge","target","computeDisjointIM","computeIntersectionNodes","copyNodesAndLabels","labelIsolatedNodes","eeBuilder","ee0","ee1","labelNodeEdges","labelIntersectionNodes","labelIsolatedNode","ga","gb","RectangleContains","_rectEnv","rectangle","isContainedInBoundary","isPointContainedInBoundary","isLineStringContainedInBoundary","isLineSegmentContainedInBoundary","RectangleLineIntersector","_diagUp0","_diagUp1","_diagDown0","_diagDown1","rectEnv","segEnv","isSegUpwards","ShortCircuitedGeometryVisitor","applyTo","visit","RectangleIntersects","_rectangle","EnvelopeIntersectsVisitor","ecpVisitor","GeometryContainsPointVisitor","riVisitor","RectangleIntersectsSegmentVisitor","_intersects","elementEnv","_rectSeq","_containsPoint","rectPt","containsPointInPolygon","_rectIntersector","checkIntersectionWithLineStrings","testLine","checkIntersectionWithSegments","seq1","RelateOp","_relate","getIntersectionMatrix","relate","UnionOp","ConnectedInteriorTester","_geomGraph","_disconnectedRingcoord","visitInteriorRing","pt1","findDifferentPoint","intDe","visitLinkedDirectedEdges","visitShellInteriors","mp","setInteriorEdgesInResult","startDe","buildEdgeRings","hasUnvisitedShellEdge","isInteriorsConnected","RelateNodeGraph","nodeIt","eeList","edgeIt","ConsistentAreaTester","_nodeGraph","isNodeEdgeAreaLabelsConsistent","hasDuplicateRings","eeb","isNodeConsistentArea","IndexedNestedRingTester","_rings","_totalEnv","_nestedPt","buildIndex","getNestedPoint","isNonNested","innerRing","innerRingPts","results","searchRing","searchRingPts","innerRingPt","IsValidOp","findPtNotNode","TopologyValidationError","_errorType","errorType","getErrorType","getMessage","errMsg","locStr","ERROR","REPEATED_POINT","HOLE_OUTSIDE_SHELL","NESTED_HOLES","DISCONNECTED_INTERIOR","SELF_INTERSECTION","RING_SELF_INTERSECTION","NESTED_SHELLS","DUPLICATE_RINGS","TOO_FEW_POINTS","INVALID_COORDINATE","RING_NOT_CLOSED","_parentGeometry","_isSelfTouchingRingFormingHoleValid","_validErr","parentGeometry","testCoords","checkInvalidCoordinates","checkHolesNotNested","nestedTester","innerHole","checkConsistentArea","cat","checkShellInsideHole","shellPts","holePts","shellPt","holePt","checkNoSelfIntersectingRings","checkNoSelfIntersectingRing","checkConnectedInteriors","cit","nodeSet","isFirst","checkHolesInShell","isShellEmpty","pir","checkTooFewPoints","getValidationError","checkClosedRing","checkClosedRings","checkShellsNotNested","setSelfTouchingRingFormingHoleValid","checkShellNotNested","polyShell","polyPts","badNestedPt","NodeBase","_subnode","centrex","centrey","subnodeIndex","hasChildren","isPrunable","hasItems","addAllItems","resultItems","getNodeCount","subSize","addAllItemsFromOverlapping","isSearchMatch","visitItems","maxSubDepth","sqd","DoubleBits","exponent","NumW","Qty","Sign","Expo","Mant","Bin","Inf","ExW","CVTFWD","powerOf2","Key","computeKey","dMax","computeQuadLevel","quadSize","getCentre","getPoint","_centrex","_centrey","addEnv","expandEnv","largerNode","insertNode","getSubnodeIndex","getSubnode","createSubnode","sqEnv","childNode","IntervalSize","scaledInterval","MIN_BINARY_EXPONENT","Root","origin","createExpanded","insertContained","isZeroX","isZeroWidth","isZeroY","Quadtree","_minExtent","collectStats","insertEnv","ensureExtent","queryAll","foundItems","posEnv","delX","delY","TaggedLineSegment","getParent","TaggedLineString","_parentLine","_segs","_resultSegs","_minimumSize","parentLine","minimumSize","segs","addToResult","asLineString","extractCoordinates","getResultSize","resultSegsSize","getSegment","getParentCoordinates","getMinimumSize","asLinearRing","getSegments","getResultCoordinates","LineSegmentIndex","querySeg","LineSegmentVisitor","_querySeg","TaggedLineStringSimplifier","_inputIndex","_outputIndex","_line","_linePts","_distanceTolerance","inputIndex","outputIndex","sectionIndex","flatten","newSeg","hasBadIntersection","candidateSeg","hasBadOutputIntersection","hasBadInputIntersection","setDistanceTolerance","distanceTolerance","simplifySection","isValidToSimplify","furthestPtIndex","findFurthestPoint","maxDist","maxIndex","midPt","isInLineSection","TaggedLinesSimplifier","taggedLines","tlss","TopologyPreservingSimplifier","_lineSimplifier","_linestringMap","tss","LineStringMapBuilderFilter","LineStringTransformer","linestringMap","taggedLine","tps","minSize","NoninvertibleTransformationException","AffineTransformation","_m00","_m01","_m02","_m10","_m11","_m12","setToIdentity","matrix","setTransformation","m02","m12","setToTranslation","xShear","yShear","setToShear","setToReflection","theta","rotationInstance","sinTheta","cosTheta","setToRotation","xScale","yScale","setToScale","setToReflectionBasic","c2s2","getInverse","getDeterminant","im00","im10","im01","im11","im02","im12","compose","mp00","mp01","mp02","mp10","mp11","mp12","isIdentity","scaleInstance","getMatrixEntries","rotate","composeBefore","translationInstance","shear","shearInstance","reflectionInstance","GeometricShapeFactory","_precModel","_dim","Dimensions","_nPts","_rotationAngle","createSupercircle","power","recipPow","getMinSize","r4","xyInt","nSegsInOct","xInc","x4","coordTrans","setNumPoints","setBase","base","setRotation","setWidth","createEllipse","xRadius","yRadius","iPt","ang","createSquircle","setEnvelope","setCentre","createArc","startAng","angExtent","angSize","angInc","createArcPolygon","createRectangle","nSide","XsegLen","YsegLen","setHeight","setSize","getBase","union","expandGeometry","bufferOp","geometryToWkt","rectToPolygon","rect","reader","polyString","rectToWKTPolygonString","twoPointsToLineString","pointsToPolygon","ellipse","gsf","distanceBetweenPoints","comparePoints","lesserPoint","greaterPoint","rectangleForSegment","thickness","slope","rectDelta","atan","smooth","smoothed","smoothPoly","oldCoords","newCoords","c0","maybeSplitWall","doors","wallPoly","door","doorPoly","w1","w2","d1","wallDataEqual","flags","dungeonDrawWallDocuments","walls","getEmbeddedCollection","ddWalls","wall","getFlag","makeWallsFromMulti","multi","makeWallsFromPoly","allWalls","splits","geo.maybeSplitWall","split","wallData","numHoles","makeInteriorWalls","makeInvisibleWalls","invisibleWallData","makeDoors","allDoors","doorData","makeSecretDoors","secretDoorData","joinWall","wallDepth","wallSidesTexture","wallSidesTint","wallTint","light","sight","DungeonState","themeAreas","secretDoors","interiorWalls","invisibleWalls","geo.geometryToWkt","startState","journalEntry","serialized","simplified","geo.simplify","wallBreaks","wallDocs","wallDocsStillNeeded","wallsToCreate","foundDoc","wallDoc","idsStillNeeded","idsToDelete","includes","createEmbeddedDocuments","deleteEmbeddedDocuments","makeWalls","setFlag","maybeMigrateJournalEntry","fromString","pages","page","dungeonState","saveToJournalEntry","delete","__filters","setPrototypeOf","__proto__","prototype","hasOwnProperty","assign","gamma","saturation","contrast","brightness","red","green","blue","uniforms","applyFilter","Filter","threshold","defineProperty","enumerable","configurable","_kernels","_blur","_quality","uOffset","Float32Array","_pixelSize","pixelSize","_clamp","isArray","kernels","quality","_frame","getFilterTexture","returnFilterTexture","_updatePadding","padding","reduce","_generateKernels","bloomScale","_resolution","FILTER_RESOLUTION","defaults","blur","resolution","_extractFilter","_blurFilter","bloomTexture","v","_thickness","_angle","lightColor","shadowColor","rotation","lightAlpha","shadowAlpha","_updateTransform","transformX","transformY","DEG_TO_RAD","rgb2hex","hex2rgb","blurXFilter","BlurFilterPass","blurYFilter","blendMode","BLEND_MODES","SCREEN","defaultFilter","AlphaFilter","filterFrame","strength","center","mix","_sliceSize","_slicePixelSize","_sliceInnerSize","_nearest","_scaleMode","_colorMap","nearest","colorMap","_mix","Texture","baseTexture","scaleMode","mipmap","MIPMAP_MODES","OFF","SCALE_MODES","NEAREST","LINEAR","_glTextures","_updateID","emit","updateColorMap","destroy","_","_color","_alpha","_originalColor","_newColor","originalColor","newColor","epsilon","texelSize","F","time","seed","curvature","lineWidth","lineContrast","verticalLine","noise","noiseSize","vignetting","vignettingAlpha","vignettingBlur","O","_tintFilter","shadowOnly","_updateShift","fillMode","TRANSPARENT","average","sampleSize","_slices","_offsets","_sizes","_direction","_canvas","document","createElement","texture","aspect","_randomizeSizes","random","shuffle","_randomizeOffsets","redraw","clearRect","fillStyle","fillRect","displacementMap","slicesWidth","slicesOffset","sinDir","cosDir","ORIGINAL","LOOP","CLAMP","MIRROR","outerStrength","innerStrength","knockout","replace","toFixed","glowColor","parallel","_angleLight","gain","lacunarity","kernelSize","uVelocity","_velocity","ObservablePoint","velocityChanged","setVelocity","velocity","uKernelSize","copyFrom","_replacements","_maxColors","originalColors","targetColors","replacements","R","sepia","scratch","scratchDensity","scratchWidth","getAngleStep","outlineColor","MAX_SAMPLES","MIN_SAMPLES","I","uRadian","uCenter","uRadius","amplitude","waveLength","mirror","boundary","N","wavelength","speed","ambientColor","uLightmap","G","gradientBlur","window","innerHeight","delta","texSize","innerWidth","updateDelta","K","W","tiltShiftXFilter","tiltShiftYFilter","maxKernelSize","getOwnPropertySymbols","propertyIsEnumerable","uStrength","uInnerRadius","innerRadius","AdjustmentFilter","AdvancedBloomFilter","AsciiFilter","BevelFilter","BloomFilter","BulgePinchFilter","CRTFilter","ColorMapFilter","ColorOverlayFilter","ColorReplaceFilter","ConvolutionFilter","CrossHatchFilter","DotFilter","DropShadowFilter","EmbossFilter","GlitchFilter","GlowFilter","GodrayFilter","KawaseBlurFilter","MotionBlurFilter","MultiColorReplaceFilter","OldFilmFilter","OutlineFilter","PixelateFilter","RGBSplitFilter","RadialBlurFilter","ReflectionFilter","ShockwaveFilter","SimpleLightmapFilter","TiltShiftAxisFilter","TiltShiftFilter","TiltShiftXFilter","TiltShiftYFilter","TwistFilter","ZoomBlurFilter","PIXI","filters","maybeStartTextureVideo","source","resource","tagName","loop","muted","video","play","renderPass","container","floorGfx","Graphics","interiorShadowGfx","wallGfx","doorGfx","addExteriorShadow","clipMask","drawMultiPolygonMask","addChild","alphaFilter","blurFilter","BlurFilter","drawMultiPolygonRoom","wallMask","maskConfig","drawInteriorWallShadow","drawInteriorWall","drawInvisibleWallShadow","drawInvisibleWall","drawDoorShadow","drawDoor","secretDoor","drawSecretDoor","drawMultiPolygonWallMask","expandedGeometry","geo.expandGeometry","getTexture","valid","wallTextureRotation","Matrix","IDENTITY","beginTextureFill","flatCoords","flat","drawPolygon","endFill","tint","string2hex","drawThemeAreas","areaState","areaContainer","Container","areaMask","beginFill","geo.pointsToPolygon","path","loadTexture","exteriorShadowGfx","lineStyle","alignment","addExteriorShadowForPoly","exterior","drawPolygonMask","gfx","beginHole","endHole","drawPolygonWallMask","drawPolygonRoom","cap","moveTo","lineTo","doorConfig","totalLength","geo.distanceBetweenPoints","jambFraction","rectEndFraction","jamb1End","rectEnd","doorRect","geo.rectangleForSegment","middle","midRect","midRect2","bezierCurveTo","Dungeon","PlaceableObject","note","history","historyIndex","lastState","resetState","tempContainer","xOffset","grid","yOffset","maskCoords","sizeForcer","Sprite","filename","base64","app","renderer","extract","fetch","blob","file","File","FilePicker","upload","img","draw","savedState","loadFromJournalEntry","pushState","newState","_addDoor","doorProperty","geo.twoPointsToLineString","wallsToDelete","wallsToAdd","geo.contains","geo.lesserPoint","geo.greaterPoint","rectPoly","geo.rectToPolygon","wallsToKeep","geo.intersects","oldState","doorsToKeep","secretDoorsToKeep","geo.union","touches","geo.intersection","_addPoly","_removePoly","difference","geo.isValid","geo.ellipse","getTheme","newArea","areasToKeep","areaPoly","serializer","replacer","cycleReplacer","stack","thisPos","module","spaces","Mash","charCodeAt","uheprng","mash","rawprng","range","string","fromCharCode","hash","args","cleanString","inStr","hashString","initState","addEntropy","Date","getTime","floatBetween","intBetween","exports","_createClass","defineProperties","props","descriptor","writable","Constructor","protoProps","staticProps","_randomSeed2","_randomSeed","__esModule","Random","TypeError","_classCallCheck","rng","int","idx","probability","float","_slicedToArray","arr","_arr","_n","_d","_e","_s","_i","err","sliceIterator","Array2d","default_value","rows","_ref","_ref2","_ref3","_ref4","_ref5","delta_x","_ref6","start_x","start_y","mod","_ref7","delta_y","_ref8","_ref9","_ref10","_ref12","_ref11","size_x","size_y","retv","_ref13","_ref14","_ref16","_ref15","line_h","line_v","Rectangle","_y2","_x2","setValues","extend","pad","bottom","_FACING_TO_STRING","_FACING_TO_MOD","_FACING_INVERSE","_FACING_MOD_RIGHT","_FACING_MOD_LEFT","_defineProperty","TOP","BOTTOM","facing","_const","FACING_TO_MOD","cb","fx","fy","pos_1","size_1","pos_2","size_2","test","_array2d2","_interopRequireDefault","_array2d","_rectangle2","next_piece_id","Piece","max_exits","tag","perimeter","exits","exit_x","exit_y","iter","is_wall","_ref6$","_this","haswall","exit_adjacent","is_exit","_utils","iter_adjacent","parent_pos","global_pos","p_from","p_to","_this2","iter_range","piece","array_test","paste_in","_this3","iter_2d","exit","room","start_pos","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_random2","_random","_piece2","_piece","Generator","_Piece","self","ReferenceError","_possibleConstructorReturn","subClass","superClass","_inherits","get_square","piece1","piece1_exit","piece2","piece2_exit","add_exit","ic","remove_perimeter","local_pos","choose","get_perimeter_by_facing","FACING_INVERSE","piece2_exit_pos","piece2_pos","fits","join_exits","add_piece","pieces","Room","room_size","symmetric","set_square","_this$get_center_pos","get_center_pos","_this$get_center_pos2","add_perimeter","Corridor","_Room","_room","_generator2","_generator","_corridor2","_corridor","_room2","_Generator","max_iterations","rooms","min_size","max_size","any","max_corridor_length","min_corridor_length","corridor_density","symmetric_rooms","interconnects","max_interconnect_length","room_count","room_tags","corridors","add_to_room","choices","old_room","get_open_pieces","perim","FACING","perims","corridor","room2","shift_left","shift_right","opts","vec","initial_room","no_rooms","new_room","no_corridors","iterations","new_corridor","added","add_room","add_interconnect","trim","require$$0","MAX_INT","NUMBERS","CHARS_LOWER","CHARS_UPPER","HEX_POOL","UnsupportedError","Chance","seedling","mt","mersenne_twister","bimd5","blueimp_md5","initOptions","testRange","errorMessage","RangeError","VERSION","CopyToken","EscapeToken","ReplaceToken","diceFn","natural","btoa","Buffer","input","bool","likelihood","falsy","pool","integer","animal","toLowerCase","pick","character","letters","symbols","casing","numeric","floating","fixed","precision","num_fixed","numerals","exclude","exclusionIndex","sortedExclusions","sortedExclusionIndex","prime","lastPrime","primes","is_prime","targetPrimes","hex","letter","substitute","replacers","chance","tokens","mode","parseTemplate","capitalize","word","mixin","func_name","unique","fn","MAX_DUPLICATES","params","clonedParams","number","pickone","pickset","selected_source_index","new_array","source_indexes","last_source_index","weighted","weights","weightIndex","chosenIdx","selected","total","lastGoodIdx","chosen","paragraph","sentences","sentence_array","sentence","separator","linebreak","words","punctuation","syllable","chr","consonants","vowels","syllables","age","ageRange","birthday","currentYear","getFullYear","setFullYear","year","date","cpf","formatted","cnpj","first","gender","nationality","profession","rank","company","extraGenders","allLastNames","lastNames","israelId","thisDigit","mrz","checkDigit","multipliers","runningTotal","that","passportNumber","dob","getMonth","getDate","expiry","issuer","middle_initial","prefix","suffix","name_prefixes","prefixes","abbreviation","name_prefix","full","HIDN","idn","ssn","ssn_pool","dash","ssnFour","dashes","aadhar","aadhar_pool","whiteSpace","onlyLastFour","separatedByWhiteSpace","name_suffixes","name_suffix","nationalities","android_id","apple_token","wp8_anid2","wp7_anid","guid","bb_pin","avatar","protocol","email","fileExtension","fallback","rating","http","https","pg","mm","identicon","monsterid","wavatar","retro","blank","bmp","gif","jpg","png","md5","gray","delimiter","rgb","hasAlpha","rgbValue","alphaChannel","min_alpha","max_alpha","min_rgb","max_rgb","min_green","max_green","min_blue","max_blue","withHash","symbol","hexstring","isGrayscale","format","min_red","max_red","colorValue","grayscale","domain","tld","fbid","google_analytics","hashtag","ip","ipv6","klout","mac","semver","include_prerelease","prerelease","rpg","tlds","twitter","url","extension","domain_prefix","extensions","port","locale","region","locales","loremPicsum","greyscale","blurred","address","street","altitude","areacode","parens","exampleNumber","city","latitude","longitude","countries","country","raw","geohash","geojson","DDM","DMS","phone","numPick","ukNum","parts","section","sections","mobile","exchange","subscriber","areaCode","mcdu","postal","postcode","code","counties","county","provinces","province","states","us_states_and_dc","territories","armed_forces","short_suffix","street_suffix","street_suffixes","zip","plusfour","ampm","date_string","american","month","daysInMonth","days","day","hour","twentyfour","minute","second","millisecond","hammertime","months","timestamp","weekday","weekdays","weekday_only","cc","to_generate","cc_type","luhn_calculate","cc_types","types","short_name","currency_types","currency","timezones","timezone","currency_pair","returnAsString","currencies","acc","dollar","cents","euro","toLocaleString","exp_year","exp_month","future","month_int","curMonth","curYear","vat","it_vat","iban","cf","name_generator","isLast","return_value","date_generator","range1","range2","evens","checkdigit_generator","pl_pesel","controlNumber","pl_nip","pl_regon","notes","scales","naturals","flats","sharps","all","flatKey","sharpKey","midi_note","chord_quality","chord_qualities","jazz","chord","tempo","coin","d4","d6","d8","d10","d12","d20","d30","d100","thrown","rolls","version","guid_pool","luhn_check","fileName","fileOptions","poolCollectionKey","typeRange","extensionObjectCollection","fileType","firstNames","male","en","nl","fr","female","uk","jp","es","postcodeAreas","ca","locale_languages","locale_regions","country_regions","mx","us","colorNames","raster","vector","abbr","isdst","utc","animals","ocean","desert","grassland","forest","farm","pet","zoo","emotions","o_hasOwnProperty","o_keys","copyObject","_target","_copyArray","_copyObject","mac_address","networkVersion","mac_pool","normal","mean","dev","normal_pool","performanceCounter","radio","fl","tv","emotion","MersenneTwister","BlueImpMD5","MATRIX_A","UPPER_MASK","LOWER_MASK","mti","init_genrand","init_by_array","init_key","key_length","genrand_int32","mag01","kk","genrand_int31","genrand_real1","genrand_real3","genrand_res53","safe_add","lsw","bit_roll","cnt","md5_cmn","md5_ff","md5_gg","md5_hh","md5_ii","binl_md5","olda","oldb","oldc","oldd","binl2rstr","output","rstr2binl","rstr_md5","rstr_hmac_md5","bkey","ipad","opad","rstr2hex","hex_tab","str2rstr_utf8","unescape","encodeURIComponent","raw_md5","hex_md5","raw_hmac_md5","hex_hmac_md5","importScripts","Victor","fromArray","fromObject","addX","addY","addScalar","scalar","addScalarX","addScalarY","subtractX","subtractY","subtractScalar","subtractScalarX","subtractScalarY","divideX","divideY","divideScalar","divideScalarX","divideScalarY","invertX","invertY","invert","multiplyX","multiplyY","multiplyScalar","multiplyScalarX","multiplyScalarY","limit","randomize","topLeft","bottomRight","randomizeX","randomizeY","randomizeAny","unfloat","mixX","amount","mixY","copyX","copyY","zero","dot","vec2","cross","projectOnto","coeff","horizontalAngle","horizontalAngleDeg","radian2degrees","verticalAngle","verticalAngleDeg","angleDeg","nx","ny","rotateDeg","degrees2radian","rotateTo","rotateToDeg","rotateBy","rotateByDeg","distanceX","absDistanceX","distanceY","absDistanceY","distanceSq","lengthSq","isEqualTo","toObject","degrees","rad","deg","root","global","ArrayProto","ObjProto","SymbolProto","supportsArrayBuffer","supportsDataView","DataView","nativeIsArray","nativeKeys","nativeCreate","nativeIsView","isView","_isNaN","_isFinite","hasEnumBug","nonEnumerableProps","MAX_ARRAY_INDEX","restArguments","func","rest","isObject","isUndefined","isBoolean","tagTester","isFunction","nodelist","childNodes","Int8Array","hasStringTagBug","hasObjectTag","isIE11","isDataView","getInt8","isArrayBuffer","isArguments","isNumber","constant","createSizePropertyCheck","getSizeProperty","collection","sizeProperty","shallowProperty","getByteLength","typedArrayPattern","isBufferLike","collectNonEnumProps","emulatedSet","nonEnumIdx","proto","attrs","_keys","_wrapped","toBufferView","bufferSource","Uint8Array","byteOffset","toJSON","eq","aStack","bStack","deepEq","areArrays","isTypedArray","aCtor","bCtor","allKeys","ie11fingerprint","methods","weakMapMethods","forEachName","commonInit","mapTail","mapMethods","setMethods","functions","names","createAssigner","keysFunc","baseCreate","Ctor","toPath","deepGet","defaultValue","identity","matcher","extendOwn","optimizeCb","argCount","accumulator","baseIteratee","iteratee","noop","now","createEscaper","escaper","testRegexp","RegExp","replaceRegexp","escapeMap","templateSettings","evaluate","interpolate","escape","noMatch","escapes","escapeRegExp","escapeChar","bareIdentifier","idCounter","executeBound","sourceFunc","boundFunc","callingContext","partial","boundArgs","placeholder","bound","callArgs","strict","isArrayLike","wait","setTimeout","delay","predicate","before","times","memo","findKey","createPredicateIndexFinder","dir","sortedIndex","createIndexFinder","predicateFind","findLastIndex","each","currentKey","createReduce","reducer","every","some","fromIndex","guard","contextPath","method","pluck","computed","lastComputed","reStrSymbol","isString","sample","rand","group","behavior","partition","pass","keyInObj","otherArrays","uniq","isSorted","seen","arrays","unzip","chainResult","_chain","chain","nodeType","isSymbol","pairs","interceptor","_has","accum","oldSettings","argument","variable","hasher","memoize","cache","timeout","previous","later","leading","throttled","_now","remaining","clearTimeout","trailing","cancel","immediate","passed","debounced","_args","wrapper","criteria","_flatten","argsLength","stop","step","allExports","getBoundingBox","containsTile","boundingBox","r1","r2","toJS","Tile","neighbours","setNeighbours","getTileNESW","tile","tiles","nameChance","stage","_rooms","_currentRegion","cardinalDirections","bindStage","givenStage","_seed","_tiles","randBetween","getTile","ne","se","sw","nw","_toJS","_growMaze","startX","startY","lastDir","cells","_startRegion","_carve","cell","unmadeCells","_canCarve","stringifiedCells","carveLoc1","carveLoc2","_addRooms","rectangularity","_oneIn","carveArea","_connectRegions","regionConnections","tileRegions","connections","conn","_removeDeadEnds","cycle","setTile","FRAC","RNG","_c","getSeed","setSeed","getUniform","getUniformInt","lowerBound","upperBound","getNormal","stddev","getPercentage","getWeightedValue","part","getState","setState","Rect","getContainer","setOptions","_options","_ctx","schedule","requestAnimationFrame","font","fontStyle","fontSize","fontFamily","_updateSize","textAlign","textBaseline","bg","eventToPosition","getBoundingClientRect","_normalizedEventToPosition","_spacingX","_spacingY","_canvasCache","clearBefore","_drawWithCache","_drawNoCache","fg","border","ctx","chars","fillText","drawImage","computeSize","availWidth","availHeight","computeFontSize","boxWidth","boxHeight","oldFont","measureText","widthFraction","spacing","charWidth","forceSquareRatio","DIRS","_width","_height","_fillMap","_corridors","getRooms","getCorridors","Feature","doorX","doorY","_x1","_y1","_doors","addDoor","roomWidth","roomHeight","getDoors","clearDoors","addDoors","isWallCallback","debug","canBeDugCallback","digCallback","getCenter","getLeft","getRight","getTop","getBottom","endX","endY","_startX","_startY","_endX","_endY","_endsWithAWall","corridorLength","sx","sy","ok","firstCornerBad","secondCornerBad","createPriorityWalls","priorityWallCallback","FEATURES","addToList","removeFromList","Arena","Uniform","roomDugPercentage","timeLimit","_map","_dug","_roomAttempts","_corridorAttempts","_connected","_unconnected","_digCallback","_canBeDugCallback","_isWallCallback","t1","_generateRooms","_generateCorridors","_generateRoom","createRandom","connected","room1","_closestRoom","_connectRooms","dirIndex1","dirIndex2","center1","center2","diffX","diffY","_placeInWall","_digLine","index2","dirIndex","avail","lastBadIndex","Cellular","born","survive","topology","_dirs","newMap","widthStep","widthStart","cur","ncount","_getNeighbors","_serviceCallback","connect","connectionCallback","allFreeSpace","notConnected","widthStarts","_freeSpace","_pointKey","_findConnected","_getFromTo","local","_tunnelToConnected6","_tunnelToConnected","pp","connectedKeys","notConnectedKeys","_getClosest","space","minPoint","keepNotConnected","tests","xx","pkey","yy","stepWidth","Digger","dugPercentage","_features","_featureAttempts","_walls","_priorityWallCallback","_firstRoom","priorityWalls","_findWall","_getDiggingDirection","featureAttempts","_tryFeature","_removeSurroundingWalls","_addDoors","createRandomCenter","prio1","prio2","featureName","feature","createRandomAt","deltas","EllerMaze","DividedMaze","_stack","_process","_partitionRoom","availX","availY","solid","IceyMaze","regularity","_regularity","blocked","dirs","_randomize","_isFree","Rogue","connectedCells","cellWidth","cellHeight","_calculateRoomSize","_initRooms","_connectUnconnectedRooms","_createRandomRoomConnections","_createRooms","_createCorridors","cellx","celly","ncgx","ncgy","otherRoom","dirToCheck","cgx","cgy","validRoom","cw","directions","dirIdx","newI","newJ","roomw","roomh","cwp","chp","sxOffset","syOffset","jj","_getWallPosition","aRoom","aDirection","rx","ry","_drawCorridor","startPosition","endPosition","tempDist","xDir","yDir","move","xpos","ypos","moves","yAbs","percent","firstHalf","secondHalf","connection","otherWall","generateRotJsCellular","ROT.Map","connectCaves","gridSize","xOff","yOff","smoothing","geo.smooth","generate2DDungeon","TwoDDungeon","minRoomSize","maxRoomSize","centerExits","circularPaths","roomCount","generate","generate2DDungeonDoors","generateDungeoneer","dungeoneer.build","oneSquare","generateDungeoneerDoors","shiftPressed","KeyboardManager","MODIFIER_KEYS","SHIFT","keyboard","isModifierActive","isDown","createDungeonEntry","folder","folders","Folder","JournalEntry","dungeonVersion","createDungeonNote","entryId","iconSize","textAnchor","textColor","iconTint","createDataOffsetPoints","createData","offsetPoints","shape","DungeonLayer","PlaceablesLayer","layerOptions","LAYER_NAME","canDragCreate","zIndex","quadtree","_getNewDrawingData","fillColor","strokeColor","strokeWidth","author","activeDungeonDrawMode","activeDungeonDrawTool","CONST","DRAWING_TYPES","RECTANGLE","bezierFactor","ELLIPSE","undoHistory","confirm","yes","deleteAll","createNewDungeon","algorithm","regenerate","journal","findDungeonEntryAndNote","addChildAt","createDungeonEntryAndNote","loadDungeon","_onClickLeft","createState","originalEvent","isPolygon","destination","shiftKey","getSnappedPosition","gridPrecision","_addPoint","_onClickLeft2","_onDragLeftDrop","isShift","_onDragLeftStart","DrawingDocument","drawing","Drawing","_onDragLeftMove","_destroyed","temporary","_drawTime","FREEHAND_SAMPLE_RATE","onFreeHandMouseDraw","_onMouseDraw","_maybeSnappedRect","snapPos","_maybeSnapLastPoint","_autoClosePolygon","hypot","completePolygon","addSecretDoor","addInteriorWall","addInvisibleWall","placeableClass","normalizeShape","addEllipse","addRectangle","addThemeArea","removeDoors","removeEllipse","removePolygon","removeSecretDoors","removeInteriorWalls","removeInvisibleWalls","removeRectangle","removeThemeAreas","_onDragLeftCancel","GeneratorSheet","changeAlgorithm","algClass","show","not","hide","Keybindings","keybindings","uneditable","modifiers","CONTROL","onDown","onRedo","onUndo","ready","layer","activeLayer","redo","undo","Toolbar","Application","popOut","addRemoveClick","themeSelectChange","controlToolClick","toggleAddClass","toggleRemoveClass","row1","class","isActive","row2","row3","force","updateActiveCss","_element","removeClass","addClass","activeTool","toolbar","DungeonDraw","isTrusted","controls","CONFIG","Canvas","layers","layerClass","visible","controlsVisible","tools","onClick","button","saveToSceneBackground","userId","maybeRefresh","activeControl","Hooks","getSceneControlButtons","canvasReady","updateJournalEntry","renderSceneControls"],"mappings":"AACO,MAAMA,EAAc,eCCpB,MAAMC,EACXC,kBACEC,KAAKC,SAASC,SACZC,EDIsC,qBCFtC,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,iCACzBC,MAAO,QACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDNkC,kBCQlC,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,6BACzBC,MAAO,QACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDd8B,aCgB9B,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,wBACzBC,MAAO,SACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,EACRC,SAAWC,IAETC,OAAOC,QAAQC,QAAQC,WAAaJ,KAI1Cb,KAAKC,SAASC,SACZC,ED9BuC,sBCgCvC,CACEC,KAAM,wCACNG,MAAO,SACPC,QAAS,GACTC,KAAMS,OACNP,QAAQ,IAGZX,KAAKC,SAASC,SACZC,ED1C+B,eC4C/B,CACEC,KAAM,sBACNG,MAAO,SACPC,QAAS,KACTC,KAAMS,OACNP,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDlDqC,oBCoDrC,CACEC,KAAM,2BACNG,MAAO,SACPC,QAAS,gBACTC,KAAMS,OACNP,QAAQ,IAKdZ,6BACE,OAAOC,KAAKC,SAASkB,IACnBhB,EDpEkC,mBCyEtCJ,oBACE,OAAOC,KAAKC,SAASkB,IACnBhB,EDxE8B,eEX7B,MAuDMiB,EAAkB,KAC7B,IACE,MAAMC,EAAqBrB,KAAKC,SAASkB,IACvChB,EACA,gBAEImB,EAAWC,KAAKC,MAAMH,GAQ5B,OANAI,OAAOC,KAAKJ,GAAUK,SAASC,IAC7BN,EAASM,GAA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KAAM,gCACP,CAACA,KAAM,iBACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,yBACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,oBACP,CAACA,KAAM,mBACP,CAACA,KAAM,WACP,CAACA,KAAM,mBACP,CAACA,KAAM,kBACP,CAACA,KAAM,mBACP,CAACA,KAAM,wBACP,CAACA,KAAM,cACP,CAACA,KAAM,iBACP,CAACA,KAAM,6BACP,CAACA,KAAM,oBACP,CAACA,KAAM,SACP,CAACA,KAAM,YACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,eACP,CAACA,KAAM,iBACP,CAACA,KAAM,oBACP,CAACA,KAAM,sBACP,CAACA,KAAM,iBACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,gBACP,CAACA,KAAM,SACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,yBACP,CAACA,KAAM,UACP,CAACA,KAAM,gBACP,CAACA,KAAM,4BACP,CAACA,KAAM,eACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,QACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,kBACP,CAACA,KAAM,sBACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,aACP,CAACA,KAAM,QACP,CAACA,KAAM,iBACP,CAACA,KAAM,mBACP,CAACA,KAAM,QACP,CAACA,KAAM,cACP,CAACA,KAAM,aACP,CAACA,KAAM,kBACP,CAACA,KAAM,gBACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,2BACP,CAACA,KAAM,sBACP,CAACA,KAAM,kBACP,CAACA,KAAM,mBACP,CAACA,KAAM,oBACP,CAACA,KAAM,kBACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,eACP,CAACA,KAAM,iBACP,CAACA,KAAM,qBACP,CAACA,KAAM,gBACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,wBACP,CAACA,KAAM,WACP,CAACA,KAAM,oBACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,mBACP,CAACA,KAAM,yBACP,CAACA,KAAM,mBACP,CAACA,KAAM,eACP,CAACA,KAAM,mBACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,oBACP,CAACA,KAAM,kBACP,CAACA,KAAM,eACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,sBACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,iBACP,CAACA,KAAM,cACP,CAACA,KAAM,gBACP,CAACA,KAAM,kBACP,CAACA,KAAM,kBACP,CAACA,KAAM,gBACP,CAACA,KAAM,iBACP,CAACA,KAAM,eACP,CAACA,KAAM,kBACP,CAACA,KAAM,iBACP,CAACA,KAAM,aACP,CAACA,KAAM,0BACP,CAACA,KAAM,aACP,CAACA,KAAM,kBACP,CAACA,KAAM,WACP,CAACA,KAAM,UAEfgmI,UAAW,CACPkH,GAAM,CACF,CAACltI,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,mBAAoBm+H,aAAc,MACzC,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,gBAAiBm+H,aAAc,MACtC,CAACn+H,KAAM,4BAA6Bm+H,aAAc,MAClD,C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AAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,eACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,gBACP,CAACA,KAAM,mBACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,iBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,sBACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,iBACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,aACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,UACP,CAACA,KAAM,wBACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,mBACP,CAACA,KAAM,cACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,iBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,gBACP,CAACA,KAAM,kBACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,qBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,kBACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,aACP,CAACA,KAAM,oBACP,CAACA,KAAM,UACP,CAACA,KAAM,iBACP,CAACA,KAAM,gBACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,QACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,6BACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,QACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,aAGVmtI,iBAAkB,CAChB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAIFC,eAAgB,CACd,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,WACA,cACA,WACA,cACA,SACA,SACA,SACA,SACA,WACA,cACA,WACA,cACA,WACA,cACA,SACA,SACA,SACA,SACA,SACA,QACA,QACA,QACA,QACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,iBACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,cACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,UACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,aACA,aACA,aACA,UACA,aACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,UACA,aACA,QACA,SACA,QACA,QACA,UACA,aACA,aACA,aACA,aACA,UACA,aACA,aACA,aACA,SAGFjH,iBAAkB,CACd,CAACnmI,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,SAAUm+H,aAAc,MAC/B,CAACn+H,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,aAAcm+H,aAAc,MACnC,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,cAAem+H,aAAc,MACpC,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,uBAAwBm+H,aAAc,MAC7C,CAACn+H,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,SAAUm+H,aAAc,MAC/B,CAACn+H,KAAM,QAASm+H,aAAc,MAC9B,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,UAAWm+H,aAAc,MAChC,CAACn+H,KAAM,OAAQm+H,aAAc,MAC7B,CAACn+H,KAAM,SAAUm+H,aAAc,MAC/B,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,YAAam+H,aAAc,MAClC,CAACn+H,KAAM,QAASm+H,aAAc,MAC9B,CAACn+H,KAAM,WAAYm+H,aAAc,MACjC,CAACn+H,KAAM,gBAAiBm+H,aA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AS,aACxM,YAAa,aAAc,SAAU,eAAgB,QAAS,uBAAwB,UAAW,MAAO,UAAW,UAAW,WAAY,YAAa,SAAU,UAAW,QAAS,aAAc,cAAe,SAClN,YAAa,OAAQ,OAAQ,YAAa,cAAe,WAAY,SAAU,YAAa,iBAAkB,aAAc,gBAAiB,WAAY,WAAY,eAAgB,cAAe,OAAQ,SAAU,eAI1N3Q,QAAS,CAAE,YACX,aACA,oBACA,sBACA,0BACA,8BACA,2BACA,yBACA,gBACA,iCACA,+BACA,sCACA,oBACA,6BACA,uBACA,2BACA,+BACA,mBACA,mCACA,sBACA,aACA,qCACA,qBACA,mBACA,6BACA,aACA,8CACA,mCACA,iBACA,eACA,+BACA,yBACA,yBACA,oBACA,aACA,wBACA,yBACA,sCACA,iBACA,eACA,6BACA,gCACA,kCACA,2BACA,qBACA,yBACA,mBACA,yBACA,wCACA,2BACA,SACA,qBACA,oCACA,+CACA,kCACA,wCACA,2BACA,iCACA,iCACA,qCACA,mCACA,qCACA,gCACA,+BACA,aACA,yBACA,kBACA,mBACA,eACA,iCACA,uBACA,iCACA,6BACA,iBACA,eACA,uBACA,kBACA,qBACA,uBACA,sBACA,wCACA,0BACA,eACA,sBACA,kBACA,iCACA,4BACA,2BACA,0BACA,qBACA,eACA,gCACA,aACA,oBACA,2BACA,uBACA,gBACA,kCACA,mBACA,iBACA,aACA,6BACA,qBACA,cACA,sBACA,4BACA,mBACA,8BACA,qCACA,uBACA,wBACA,oBACA,uBACA,6BACA,4BACA,mBACA,kCACA,yBACA,wBACA,gCACA,yBACA,aACA,0BACA,wBACA,aACA,sBACA,8BACA,0BACA,qBACA,8BACA,4BACA,iBACA,sBACA,4BACA,iCACA,0BACA,qBACA,qBACA,4BACA,sBACA,kBACA,gCACA,uBACA,gCACA,oBACA,8BACA,+BACA,kBACA,2BACA,2BACA,wBACA,qBACA,gDACA,8BACA,2CACA,4BACA,gCACA,2BACA,aACA,+BACA,gBACA,oBACA,8BACA,uBACA,mBACA,qBACA,6BACA,8BACA,mBACA,kBACA,YACA,4BACA,iBACA,eACA,oCACA,eACA,kBACA,iBACA,sBACA,4BACA,uBACA,wBACA,8BACA,6BACA,sBACA,qCACA,aACA,cACA,aACA,6BACA,gBACA,eACA,2BACA,qBACA,iBACA,8BACA,uBACA,oCACA,iBACA,YACA,mBACA,WACA,gBACA,6BACA,wBACA,yBACA,gBACA,gBACA,gBACA,2BACA,wBACA,gCACA,yBACA,yCACA,0BACA,kBACA,2BACA,qBACA,mBACA,gBACA,aACA,eACA,iCACA,2BACA,4BACA,kCACA,4BACA,kBACA,uBACA,yBACA,2BACA,mCACA,eACA,yBACA,qCACA,4BACA,0BACA,YACA,iBACA,6BACA,iBACA,YACA,eACA,YACA,wBACA,iCACA,mBACA,mBACA,sBACA,0BACA,cACA,qBACA,kBACA,qBACA,4BACA,eACA,uBACA,qBACA,2BACA,yBACA,mBACA,uBACA,iBACA,qBACA,0BACA,6BACA,2BACA,2BACA,qBACA,0BACA,uBACA,4BACA,WACA,WACA,iCACA,oBACA,iBACA,sCACA,mBACA,wBACA,+BACA,UACA,cACA,sBACA,uBACA,kBACA,2BACA,wBACA,oBACA,sCACA,cACA,uBACA,WACA,sBACA,uBACA,gCACA,wBACA,kBACA,mBACA,uBACA,iCACA,0BACA,0BACA,wBACA,cACA,sBACA,oCACA,sBACA,eACA,2BACA,iCACA,sCACA,8BACA,qBACA,qBACA,8CACA,uBACA,yBACA,6CACA,4BACA,2BACA,sBACA,mCACA,wBACA,4BACA,cACA,mCACA,sBACA,iCACA,mBACA,kCACA,iCACA,oBACA,cACA,uCACA,4BACA,6BACA,yBACA,qBACA,gBACA,aACA,WACA,2BACA,kBACA,gBACA,gBACA,2BACA,sBACA,sBACA,iBACA,0BACA,sCACA,oBACA,sCACA,oBACA,WACA,eACA,mBACA,sCACA,eACA,4BACA,+BACA,2BACA,oBACA,6BACA,+BACA,cACA,+BACA,wBACA,eACA,sBACA,2BACA,8BACA,mBACA,iBACA,4BACA,oCACA,2BACA,uBACA,qCACA,oCACA,gCACA,mCACA,2BACA,6BACA,0BACA,yBACA,0BACA,sBACA,iBACA,sBACA,qBACA,kBACA,uBACA,uCACA,8BACA,eACA,eACA,yCACA,cACA,oCACA,WACA,oCACA,kBACA,mBACA,oBACA,gBACA,qBACA,sBACA,0BACA,iBACA,8BACA,sBACA,gCACA,kBACA,sBACA,+BACA,qBACA,sBACA,gCACA,6BACA,iBACA,eACA,qBACA,cACA,6BACA,eACA,kBACA,6BACA,2BACA,kBACA,yBACA,kBACA,oBACA,oBACA,2BACA,sCACA,oBACA,0BACA,sCACA,kCACA,wCACA,0CACA,uCACA,cACA,gBACA,sBACA,aACA,oCACA,iBACA,0BACA,qBACA,uBACA,gCACA,qBACA,sBACA,uCACA,oBACA,wBACA,2BACA,UACA,kBACA,mBACA,sBACA,cACA,kBACA,yBACA,UACA,gBACA,6BACA,6BACA,0BACA,yBACA,eACA,qBACA,eACA,uBACA,aACA,mCACA,6CACA,2BACA,mCACA,kBACA,uBACA,gBACA,mBACA,kBACA,uBACA,gCACA,qBACA,4BACA,8BACA,qBACA,6BACA,eACA,+BACA,wBACA,qBACA,qBACA,8BACA,oBACA,gCACA,gCACA,wBACA,wBACA,sBACA,2BACA,2BACA,4BACA,yBACA,gCACA,iBACA,wBACA,kBACA,gBACA,2BACA,2BACA,qBACA,8BACA,kCACA,0BACA,gCACA,iCACA,oBACA,wBACA,cACA,cACA,iCACA,qBACA,cACA,oCACA,qBACA,mBACA,mCACA,yBACA,iCACA,uBACA,yBACA,uBACA,2BACA,2BACA,iBACA,+BACA,2BACA,oBACA,8BACA,2BACA,wBACA,kBACA,eACA,uBACA,8BACA,aACA,uBACA,yBACA,wBACA,gBACA,4BACA,qBACA,yBACA,qBACA,sBACA,mCACA,gBACA,iBACA,yBACA,wBACA,uBACA,qBACA,sBACA,0CACA,4BACA,uBACA,2DACA,qCACA,kCACA,qCACA,kBACA,+BACA,mCACA,yBACA,wBACA,6BACA,4BACA,YACA,WACA,eACA,mBACA,gBACA,+BACA,aACA,gCACA,6BACA,6BACA,+BACA,2BACA,uBACA,QACA,mBACA,aACA,cACA,UACA,0BACA,4BACA,mBACA,oBACA,gBACA,kBACA,yBACA,sBACA,mCACA,aACA,eACA,eACA,gBACA,wBACA,YACA,cACA,qBACA,0BACA,qBACA,gBACA,qBACA,0BACA,aACA,gCACA,6BACA,cACA,YACA,aACA,gCACA,wBACA,uBACA,cACA,yBACA,mBACA,gCACA,cACA,uBACA,iBACA,6BACA,6BACA,4BACA,qBACA,eACA,6BACA,cACA,kBACA,qBACA,6BACA,2BACA,eACA,aACA,+BACA,iBACA,gBACA,qBACA,+BACA,wBACA,4BACA,wBACA,sBACA,8BACA,6BACA,oCACA,oBACA,wBACA,kCACA,oCACA,oBACA,0BACA,yBACA,eACA,cACA,gBACA,qBACA,WACA,cACA,2BACA,eACA,0BACA,eACA,iCACA,uBACA,2BACA,sBACA,0BACA,uBACA,4BACA,4BACA,4BACA,wBACA,uCACA,4BACA,oBACA,kBACA,eACA,uBACA,eACA,yBACA,eACA,0BACA,gCACA,gCACA,gCACA,0BACA,+BACA,mBACA,mCACA,4BACA,0BACA,oBACA,gCACA,sBACA,oBACA,wBACA,aACA,uBACA,gBACA,yBACA,cACA,iCACA,eACA,0BACA,uBACA,kBACA,kBACA,WACA,eACA,mBACA,mBACA,oBACA,sBACA,cACA,6BACA,cACA,WACA,kBACA,gBACA,yBACA,cACA,uBACA,kBACA,mBACA,kCACA,yBACA,iBACA,gBACA,kBACA,qBACA,gBACA,aACA,8BACA,mBACA,iBACA,2BACA,oBACA,qBACA,6BACA,2BACA,uBACA,uBACA,2BACA,kBACA,0BACA,uBACA,+BACA,cACA,iBACA,cACA,wBACA,sBACA,mBACA,yBACA,mBACA,wBACA,qBACA,yBACA,qBACA,gBACA,uBACA,eACA,WACA,uBACA,gBACA,qBACA,+BACA,yBACA,gBACA,cACA,iBACA,0CACA,qBACA,6BACA,gBACA,iBACA,mCACA,oCACA,yBACA,iCACA,eACA,4BACA,wBACA,4BACA,cACA,qBACA,gBACA,iCACA,0BACA,0BACA,aACA,gBACA,eACA,wBACA,kBACA,4BACA,gBACA,wBACA,+BACA,eACA,oBACA,+BACA,0BACA,eACA,aACA,yBACA,wBACA,iCACA,cACA,8BACA,6BACA,eACA,iBACA,oBACA,oBACA,oBACA,wBACA,eACA,wBACA,kBACA,kCACA,qBACA,iBACA,gCACA,sBACA,kBACA,yBACA,yBACA,qCACA,sBACA,UACA,WACA,kBACA,eACA,uBACA,kBACA,kBACA,8BACA,4BACA,sBACA,wBACA,qBACA,wBACA,iCACA,4BACA,qBACA,wBACA,kCACA,kCACA,cACA,wBACA,gCACA,gCACA,qBACA,YACA,4BACA,kBACA,uBACA,kBACA,kBACA,2BACA,kBACA,UACA,4BACA,sBACA,mCACA,0BACA,sBACA,+BACA,6BACA,iBACA,aACA,YACA,uBACA,6BACA,sBACA,gCACA,2BACA,2BACA,kBACA,oBACA,uBACA,uBACA,cACA,gCACA,sBACA,iBACA,wBACA,wBACA,sBACA,uBACA,aACA,gCACA,oBACA,gCACA,wBACA,4BACA,yBACA,0BACA,sBACA,4BACA,wBACA,sBACA,mBACA,wBACA,yBACA,6BACA,yBACA,sBACA,wBACA,+BACA,wBACA,kCACA,eACA,6BACA,4BACA,QACA,4BACA,kBACA,aACA,aACA,wBACA,qBACA,0BACA,kBACA,mBACA,wBAGAiD,cAAgB,CACZ2N,OAAc,CAAC,MAAO,MAAO,MAAO,MAAO,OAAQ,MAAO,MAAO,MAAO,MAAO,QAC/EC,OAAc,CAAC,MAAO,MAAO,MAAO,KAAM,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAM,MAAO,MAAO,OAC/G,KAAc,CAAC,OAAQ,MAAO,MAAO,MAAO,MAAO,MAAO,QAAS,QAAS,MAAO,MAAO,MAAO,MAAO,MAAO,KAAM,MAAO,MAAO,IAAK,OACxIt3B,SAAc,CAAC,MAAO,OAAQ,MAAO,OAAQ,MAAO,MAAO,MAAO,MA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A,oBACA,UACA,qBACA,wBACA,eACA,kBACA,uBACA,eACA,iBACA,iBACA,8BACA,sBACA,qBACA,cACA,mBACA,oBACA,kCACA,0BACA,0BACA,uBACA,sBACA,wBACA,oBACA,oBACA,+BACA,wBACA,uBACA,aACA,6BACA,yBACA,qBACA,aACA,oBACA,sBACA,gBACA,iBACA,kBACA,4BACA,2BACA,2BACA,eACA,SACA,wBACA,mBACA,sBACA,UACA,WACA,kBACA,oBACA,YACA,sBACA,mBACA,YACA,kBACA,WACA,uBACA,oBACA,YACA,yBACA,SACA,sBACA,sBACA,2BACA,uBACA,qBACA,mBACA,sBACA,eACA,wBACA,yBACA,yBACA,2BACA,iBACA,YACA,sBACA,qBACA,sBACA,qBACA,mBACA,yBACA,uBACA,oBACA,gBACA,4BACA,oBACA,oBACA,YACA,cACA,sBACA,qBACA,mBACA,kBACA,kBACA,2BACA,uBACA,sBACA,uBACA,kBACA,qBACA,mBACA,cACA,kBACA,YACA,kBACA,uBACA,gBACA,uBACA,oBACA,eACA,mBACA,iBACA,0BACA,sBACA,mBACA,+BACA,kBACA,iBACA,iBACA,yBACA,gBACA,0BACA,WACA,sBACA,sBACA,uBACA,eACA,qBACA,qBACA,6BACA,sBACA,wBACA,uBACA,cACA,eACA,oBACA,qBACA,eACA,qBACA,qBACA,UACA,wBACA,aACA,mBACA,kBACA,0BACA,wBACA,iBACA,iBACA,sBACA,0BACA,SACA,yBACA,8BACA,kBACA,kBACA,kBACA,sBACA,eACA,WACA,oBACA,sBACA,wBACA,wBACA,mBACA,yBACA,mBACA,mBACA,sBACA,qBACA,oBACA,gBACA,sBACA,WACA,sBACA,cACA,mBACA,oBACA,qBACA,0BACA,eACA,4BACA,gBACA,iBACA,cACA,0BACA,sBACA,WACA,wBACA,qBACA,mBACA,sBACA,WACA,mBACA,qBACA,eACA,wBACA,yBACA,gBACA,iBACA,qBACA,+BACA,qBACA,cACA,qCACA,0BACA,YACA,cACA,kBACA,qBACA,uBACA,qBACA,aACA,eACA,qBACA,YACA,sBACA,YACA,oBACA,aACA,oBACA,sBACA,aACA,oBACA,uBACA,oBACA,YACA,iBACA,uBACA,oBACA,mBACA,WACA,kBACA,mBACA,sBACA,qBACA,uBACA,qBACA,YACA,mBACA,kBACA,kBACA,mBACA,uBACA,yBACA,gBACA,YACA,mBACA,sBACA,+BACA,2BACA,4BACA,oBACA,oBACA,qBACA,wBACA,YACA,2BACA,6BACA,mBACA,2BACA,qBACA,WACA,sBACA,qBACA,uBACA,eACA,kBACA,iBACA,gBACA,0BACA,uBACA,gBACA,kBACA,sBACA,wBACA,oBACA,qBACA,sBACA,oBACA,oBACA,iBACA,SACA,kBACA,yBACA,kBACA,mBACA,gBACA,cACA,qBACA,oBACA,yBACA,iBACA,yBACA,4BACA,4BACA,qBACA,gBACA,uBACA,eACA,gBACA,8BACA,8BACA,8BACA,cACA,WACA,sBACA,iBACA,wBACA,kBACA,kBACA,qBACA,uBACA,iBACA,UACA,+BACA,wBACA,mBACA,sBACA,kBACA,eACA,sBACA,iBACA,cACA,sBACA,kBACA,qBACA,yBACA,eACA,YACA,gBACA,cACA,uBACA,2BACA,kBACA,gBACA,eACA,4BACA,gBACA,qBAEJmR,QAAU,CAERC,MAAU,CAAC,aAAa,UAAU,iBAAiB,WAAW,WAAW,kBAAkB,UAAU,gBAAgB,cAAc,wBAAwB,eAAe,2BAA2B,uBAAuB,oBAAoB,eAAe,uBAAuB,sBAAsB,mBAAmB,WAAW,iBAAiB,YAAY,gBAAgB,OAAO,eAAe,kBAAkB,kBAAkB,WAAW,4BAA4B,cAAc,aAAa,qBAAqB,YAAY,aAAa,uBAAuB,aAAa,qBAAqB,sBAAsB,wBAAwB,iBAAiB,sBAAsB,OAAO,oBAAoB,oBAAoB,MAAM,aAAa,sBAAsB,mBAAmB,QAAQ,qBAAqB,UAAU,QAAQ,YAAY,cAAc,OAAO,2BAA2B,eAAe,aAAa,wBAAwB,UAAU,cAAc,OAAO,aAAa,SAAS,gBAAgB,iBAAiB,wBAAwB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ources":["../src/constants.js","../src/settings.js","../src/themes.js","../src/themesheet.js","../src/configsheet.js","../node_modules/jsts/java/lang/Exception.js","../node_modules/jsts/java/lang/IllegalArgumentException.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryComponentFilter.js","../node_modules/jsts/java/lang/Comparable.js","../node_modules/jsts/java/lang/Cloneable.js","../node_modules/jsts/java/io/Serializable.js","../node_modules/jsts/org/locationtech/jts/util/NumberUtil.js","../node_modules/jsts/java/lang/Long.js","../node_modules/jsts/java/lang/Double.js","../node_modules/jsts/java/util/Comparator.js","../node_modules/jsts/java/lang/RuntimeException.js","../node_modules/jsts/org/locationtech/jts/util/AssertionFailedException.js","../node_modules/jsts/org/locationtech/jts/util/Assert.js","../node_modules/jsts/org/locationtech/jts/geom/Coordinate.js","../node_modules/jsts/org/locationtech/jts/geom/Envelope.js","../node_modules/jsts/org/locationtech/jts/geom/Geometry.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateFilter.js","../node_modules/jsts/hasInterface.js","../node_modules/jsts/org/locationtech/jts/geom/Lineal.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequence.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequences.js","../node_modules/jsts/java/lang/UnsupportedOperationException.js","../node_modules/jsts/java/lang/Character.js","../node_modules/jsts/org/locationtech/jts/geom/Dimension.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryFilter.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFilter.js","../node_modules/jsts/org/locationtech/jts/geom/LineString.js","../node_modules/jsts/org/locationtech/jts/algorithm/Length.js","../node_modules/jsts/java/util/Collection.js","../node_modules/jsts/java/lang/IndexOutOfBoundsException.js","../node_modules/jsts/java/util/List.js","../node_modules/jsts/java/util/NoSuchElementException.js","../node_modules/jsts/java/util/ArrayList.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateList.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFactory.js","../node_modules/jsts/org/locationtech/jts/geom/Puntal.js","../node_modules/jsts/org/locationtech/jts/geom/Point.js","../node_modules/jsts/org/locationtech/jts/algorithm/Area.js","../node_modules/jsts/java/util/Arrays.js","../node_modules/jsts/java/lang/StringBuffer.js","../node_modules/jsts/java/lang/Integer.js","../node_modules/jsts/org/locationtech/jts/math/DD.js","../node_modules/jsts/org/locationtech/jts/algorithm/CGAlgorithmsDD.js","../node_modules/jsts/org/locationtech/jts/algorithm/Orientation.js","../node_modules/jsts/org/locationtech/jts/geom/Polygonal.js","../node_modules/jsts/org/locationtech/jts/geom/Polygon.js","../node_modules/jsts/java/util/Set.js","../node_modules/jsts/java/util/SortedSet.js","../node_modules/jsts/java/util/TreeSet.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryCollection.js","../node_modules/jsts/org/locationtech/jts/geom/MultiPoint.js","../node_modules/jsts/org/locationtech/jts/geom/LinearRing.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXY.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXYM.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateXYZM.js","../node_modules/jsts/org/locationtech/jts/geom/Coordinates.js","../node_modules/jsts/org/locationtech/jts/math/MathUtil.js","../node_modules/jsts/java/lang/System.js","../node_modules/jsts/org/locationtech/jts/geom/CoordinateArrays.js","../node_modules/jsts/java/lang/StringBuilder.js","../node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequence.js","../node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequenceFactory.js","../node_modules/jsts/org/locationtech/jts/geom/MultiPolygon.js","../node_modules/jsts/java/util/Map.js","../node_modules/jsts/java/util/HashSet.js","../node_modules/jsts/java/util/HashMap.js","../node_modules/jsts/org/locationtech/jts/geom/PrecisionModel.js","../node_modules/jsts/org/locationtech/jts/geom/MultiLineString.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryFactory.js","../node_modules/jsts/org/locationtech/jts/geom/util/GeometryTransformer.js","../node_modules/jsts/org/locationtech/jts/algorithm/Intersection.js","../node_modules/jsts/org/locationtech/jts/algorithm/Distance.js","../node_modules/jsts/org/locationtech/jts/io/WKTParser.js","../node_modules/jsts/org/locationtech/jts/io/WKTWriter.js","../node_modules/jsts/org/locationtech/jts/algorithm/LineIntersector.js","../node_modules/jsts/org/locationtech/jts/algorithm/RobustLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geom/LineSegment.js","../node_modules/jsts/org/locationtech/jts/io/WKTReader.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferParameters.js","../node_modules/jsts/org/locationtech/jts/geom/Location.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Position.js","../node_modules/jsts/java/util/EmptyStackException.js","../node_modules/jsts/java/util/Stack.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/RightmostEdgeFinder.js","../node_modules/jsts/org/locationtech/jts/geom/TopologyException.js","../node_modules/jsts/java/util/LinkedList.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferSubgraph.js","../node_modules/jsts/org/locationtech/jts/algorithm/RayCrossingCounter.js","../node_modules/jsts/org/locationtech/jts/algorithm/PointLocation.js","../node_modules/jsts/org/locationtech/jts/geomgraph/TopologyLocation.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Label.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeRing.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/MinimalEdgeRing.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/MaximalEdgeRing.js","../node_modules/jsts/org/locationtech/jts/geomgraph/GraphComponent.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Node.js","../node_modules/jsts/java/util/SortedMap.js","../node_modules/jsts/java/util/TreeMap.js","../node_modules/jsts/org/locationtech/jts/geomgraph/NodeMap.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Quadrant.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEnd.js","../node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdge.js","../node_modules/jsts/org/locationtech/jts/geomgraph/NodeFactory.js","../node_modules/jsts/org/locationtech/jts/geomgraph/PlanarGraph.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/PolygonBuilder.js","../node_modules/jsts/org/locationtech/jts/index/strtree/Boundable.js","../node_modules/jsts/org/locationtech/jts/index/strtree/ItemBoundable.js","../node_modules/jsts/org/locationtech/jts/util/PriorityQueue.js","../node_modules/jsts/org/locationtech/jts/index/SpatialIndex.js","../node_modules/jsts/org/locationtech/jts/index/strtree/AbstractNode.js","../node_modules/jsts/java/util/Collections.js","../node_modules/jsts/org/locationtech/jts/index/strtree/EnvelopeDistance.js","../node_modules/jsts/org/locationtech/jts/index/strtree/BoundablePair.js","../node_modules/jsts/org/locationtech/jts/index/ItemVisitor.js","../node_modules/jsts/org/locationtech/jts/index/strtree/AbstractSTRtree.js","../node_modules/jsts/org/locationtech/jts/index/strtree/ItemDistance.js","../node_modules/jsts/org/locationtech/jts/index/strtree/STRtree.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentPointComparator.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentNode.js","../node_modules/jsts/java/util/Iterator.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentNodeList.js","../node_modules/jsts/org/locationtech/jts/noding/Octant.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodableSegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodedSegmentString.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainOverlapAction.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChain.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainBuilder.js","../node_modules/jsts/org/locationtech/jts/noding/Noder.js","../node_modules/jsts/org/locationtech/jts/noding/SinglePassNoder.js","../node_modules/jsts/org/locationtech/jts/noding/MCIndexNoder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferInputLineSimplifier.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentString.js","../node_modules/jsts/org/locationtech/jts/algorithm/Angle.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentGenerator.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.js","../node_modules/jsts/org/locationtech/jts/algorithm/NotRepresentableException.js","../node_modules/jsts/org/locationtech/jts/algorithm/HCoordinate.js","../node_modules/jsts/org/locationtech/jts/geom/Triangle.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveSetBuilder.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/PointOnGeometryLocator.js","../node_modules/jsts/org/locationtech/jts/geom/GeometryCollectionIterator.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/SimplePointInAreaLocator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEndStar.js","../node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdgeStar.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/OverlayNodeFactory.js","../node_modules/jsts/org/locationtech/jts/noding/OrientedCoordinateArray.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeList.js","../node_modules/jsts/org/locationtech/jts/noding/SegmentIntersector.js","../node_modules/jsts/org/locationtech/jts/noding/IntersectionAdder.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersection.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersectionList.js","../node_modules/jsts/org/locationtech/jts/geom/IntersectionMatrix.js","../node_modules/jsts/org/locationtech/jts/util/IntArrayList.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainIndexer.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainEdge.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Depth.js","../node_modules/jsts/org/locationtech/jts/geomgraph/Edge.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferBuilder.js","../node_modules/jsts/org/locationtech/jts/noding/ScaledNoder.js","../node_modules/jsts/org/locationtech/jts/noding/NodingValidator.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/HotPixel.js","../node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainSelectAction.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexPointSnapper.js","../node_modules/jsts/org/locationtech/jts/noding/InteriorIntersectionFinderAdder.js","../node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexSnapRounder.js","../node_modules/jsts/org/locationtech/jts/operation/buffer/BufferOp.js","../node_modules/jsts/org/locationtech/jts/algorithm/BoundaryNodeRule.js","../node_modules/jsts/org/locationtech/jts/algorithm/PointLocator.js","../node_modules/jsts/org/locationtech/jts/noding/BasicSegmentString.js","../node_modules/jsts/org/locationtech/jts/noding/NodingIntersectionFinder.js","../node_modules/jsts/org/locationtech/jts/noding/FastNodingValidator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/EdgeNodingValidator.js","../node_modules/jsts/org/locationtech/jts/geom/util/GeometryCollectionMapper.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/LineBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/PointBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/LineStringSnapper.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/GeometrySnapper.js","../node_modules/jsts/org/locationtech/jts/precision/CommonBits.js","../node_modules/jsts/org/locationtech/jts/precision/CommonBitsRemover.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/SnapOverlayOp.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/snap/SnapIfNeededOverlayOp.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChain.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SweepLineEvent.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SegmentIntersector.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/SimpleMCSweepLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geomgraph/index/EdgeSetIntersector.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeLeafNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeBranchNode.js","../node_modules/jsts/org/locationtech/jts/index/intervalrtree/SortedPackedIntervalRTree.js","../node_modules/jsts/org/locationtech/jts/geom/util/LinearComponentExtracter.js","../node_modules/jsts/org/locationtech/jts/index/ArrayListVisitor.js","../node_modules/jsts/org/locationtech/jts/algorithm/locate/IndexedPointInAreaLocator.js","../node_modules/jsts/org/locationtech/jts/geomgraph/GeometryGraph.js","../node_modules/jsts/org/locationtech/jts/operation/GeometryGraphOperation.js","../node_modules/jsts/org/locationtech/jts/operation/overlay/OverlayOp.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBuilder.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBundle.js","../node_modules/jsts/org/locationtech/jts/operation/relate/EdgeEndBundleStar.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNode.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNodeFactory.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateComputer.js","../node_modules/jsts/org/locationtech/jts/operation/predicate/RectangleContains.js","../node_modules/jsts/org/locationtech/jts/algorithm/RectangleLineIntersector.js","../node_modules/jsts/org/locationtech/jts/geom/util/ShortCircuitedGeometryVisitor.js","../node_modules/jsts/org/locationtech/jts/operation/predicate/RectangleIntersects.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateOp.js","../node_modules/jsts/org/locationtech/jts/operation/union/UnionOp.js","../node_modules/jsts/org/locationtech/jts/operation/valid/ConnectedInteriorTester.js","../node_modules/jsts/org/locationtech/jts/operation/relate/RelateNodeGraph.js","../node_modules/jsts/org/locationtech/jts/operation/valid/ConsistentAreaTester.js","../node_modules/jsts/org/locationtech/jts/operation/valid/IndexedNestedRingTester.js","../node_modules/jsts/org/locationtech/jts/operation/valid/TopologyValidationError.js","../node_modules/jsts/org/locationtech/jts/operation/valid/IsValidOp.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/NodeBase.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/DoubleBits.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Key.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Node.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/IntervalSize.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Root.js","../node_modules/jsts/org/locationtech/jts/index/quadtree/Quadtree.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineSegment.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineString.js","../node_modules/jsts/org/locationtech/jts/simplify/LineSegmentIndex.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLineStringSimplifier.js","../node_modules/jsts/org/locationtech/jts/simplify/TaggedLinesSimplifier.js","../node_modules/jsts/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js","../node_modules/jsts/org/locationtech/jts/geom/util/NoninvertibleTransformationException.js","../node_modules/jsts/org/locationtech/jts/geom/util/AffineTransformation.js","../node_modules/jsts/org/locationtech/jts/util/GeometricShapeFactory.js","../src/geo-utils.js","../src/wallmaker.js","../src/dungeonstate.js","../src/lib/pixi-filters.min.js","../src/renderer.js","../src/dungeon.js","../node_modules/json-stringify-safe/stringify.js","../node_modules/random-seed/index.js","../node_modules/2d-dungeon/lib/utils/random.js","../node_modules/2d-dungeon/lib/utils/array2d.js","../node_modules/2d-dungeon/lib/utils/rectangle.js","../node_modules/2d-dungeon/lib/const.js","../node_modules/2d-dungeon/lib/utils/index.js","../node_modules/2d-dungeon/lib/pieces/piece.js","../node_modules/2d-dungeon/lib/generators/generator.js","../node_modules/2d-dungeon/lib/pieces/room.js","../node_modules/2d-dungeon/lib/pieces/corridor.js","../node_modules/2d-dungeon/lib/generators/dungeon.js","../node_modules/2d-dungeon/index.js","../node_modules/chance/chance.js","../node_modules/victor/index.js","../node_modules/underscore/modules/_setup.js","../node_modules/underscore/modules/restArguments.js","../node_modules/underscore/modules/isObject.js","../node_modules/underscore/modules/isUndefined.js","../node_modules/underscore/modules/isBoolean.js","../node_modules/underscore/modules/_tagTester.js","../node_modules/underscore/modules/isString.js","../node_modules/underscore/modules/isNumber.js","../node_modules/underscore/modules/isDate.js","../node_modules/underscore/modules/isRegExp.js","../node_modules/underscore/modules/isError.js","../node_modules/underscore/modules/isSymbol.js","../node_modules/underscore/modules/isArrayBuffer.js","../node_modules/underscore/modules/isFunction.js","../node_modules/underscore/modules/_hasObjectTag.js","../node_modules/underscore/modules/_stringTagBug.js","../node_modules/underscore/modules/isDataView.js","../node_modules/underscore/modules/isArray.js","../node_modules/underscore/modules/_has.js","../node_modules/underscore/modules/isArguments.js","../node_modules/underscore/modules/isNaN.js","../node_modules/underscore/modules/constant.js","../node_modules/underscore/modules/_createSizePropertyCheck.js","../node_modules/underscore/modules/_shallowProperty.js","../node_modules/underscore/modules/_getByteLength.js","../node_modules/underscore/modules/_isBufferLike.js","../node_modules/underscore/modules/isTypedArray.js","../node_modules/underscore/modules/_getLength.js","../node_modules/underscore/modules/_collectNonEnumProps.js","../node_modules/underscore/modules/keys.js","../node_modules/underscore/modules/isMatch.js","../node_modules/underscore/modules/underscore.js","../node_modules/underscore/modules/_toBufferView.js","../node_modules/underscore/modules/isEqual.js","../node_modules/underscore/modules/allKeys.js","../node_modules/underscore/modules/_methodFingerprint.js","../node_modules/underscore/modules/isMap.js","../node_modules/underscore/modules/isWeakMap.js","../node_modules/underscore/modules/isSet.js","../node_modules/underscore/modules/isWeakSet.js","../node_modules/underscore/modules/values.js","../node_modules/underscore/modules/invert.js","../node_modules/underscore/modules/functions.js","../node_modules/underscore/modules/_createAssigner.js","../node_modules/underscore/modules/extend.js","../node_modules/underscore/modules/extendOwn.js","../node_modules/underscore/modules/defaults.js","../node_modules/underscore/modules/_baseCreate.js","../node_modules/underscore/modules/toPath.js","../node_modules/underscore/modules/_toPath.js","../node_modules/underscore/modules/_deepGet.js","../node_modules/underscore/modules/get.js","../node_modules/underscore/modules/identity.js","../node_modules/underscore/modules/matcher.js","../node_modules/underscore/modules/property.js","../node_modules/underscore/modules/_optimizeCb.js","../node_modules/underscore/modules/_baseIteratee.js","../node_modules/underscore/modules/iteratee.js","../node_modules/underscore/modules/_cb.js","../node_modules/underscore/modules/noop.js","../node_modules/underscore/modules/random.js","../node_modules/underscore/modules/now.js","../node_modules/underscore/modules/_createEscaper.js","../node_modules/underscore/modules/_escapeMap.js","../node_modules/underscore/modules/escape.js","../node_modules/underscore/modules/unescape.js","../node_modules/underscore/modules/_unescapeMap.js","../node_modules/underscore/modules/templateSettings.js","../node_modules/underscore/modules/template.js","../node_modules/underscore/modules/uniqueId.js","../node_modules/underscore/modules/_executeBound.js","../node_modules/underscore/modules/partial.js","../node_modules/underscore/modules/bind.js","../node_modules/underscore/modules/_isArrayLike.js","../node_modules/underscore/modules/_flatten.js","../node_modules/underscore/modules/bindAll.js","../node_modules/underscore/modules/delay.js","../node_modules/underscore/modules/defer.js","../node_modules/underscore/modules/negate.js","../node_modules/underscore/modules/before.js","../node_modules/underscore/modules/once.js","../node_modules/underscore/modules/findKey.js","../node_modules/underscore/modules/_createPredicateIndexFinder.js","../node_modules/underscore/modules/findIndex.js","../node_modules/underscore/modules/findLastIndex.js","../node_modules/underscore/modules/sortedIndex.js","../node_modules/underscore/modules/_createIndexFinder.js","../node_modules/underscore/modules/indexOf.js","../node_modules/underscore/modules/lastIndexOf.js","../node_modules/underscore/modules/find.js","../node_modules/underscore/modules/each.js","../node_modules/underscore/modules/map.js","../node_modules/underscore/modules/_createReduce.js","../node_modules/underscore/modules/reduce.js","../node_modules/underscore/modules/reduceRight.js","../node_modules/underscore/modules/filter.js","../node_modules/underscore/modules/every.js","../node_modules/underscore/modules/some.js","../node_modules/underscore/modules/contains.js","../node_modules/underscore/modules/invoke.js","../node_modules/underscore/modules/pluck.js","../node_modules/underscore/modules/max.js","../node_modules/underscore/modules/toArray.js","../node_modules/underscore/modules/sample.js","../node_modules/underscore/modules/_group.js","../node_modules/underscore/modules/groupBy.js","../node_modules/underscore/modules/indexBy.js","../node_modules/underscore/modules/countBy.js","../node_modules/underscore/modules/partition.js","../node_modules/underscore/modules/_keyInObj.js","../node_modules/underscore/modules/pick.js","../node_modules/underscore/modules/omit.js","../node_modules/underscore/modules/initial.js","../node_modules/underscore/modules/first.js","../node_modules/underscore/modules/rest.js","../node_modules/underscore/modules/difference.js","../node_modules/underscore/modules/without.js","../node_modules/underscore/modules/uniq.js","../node_modules/underscore/modules/union.js","../node_modules/underscore/modules/unzip.js","../node_modules/underscore/modules/zip.js","../node_modules/underscore/modules/_chainResult.js","../node_modules/underscore/modules/mixin.js","../node_modules/underscore/modules/underscore-array-methods.js","../node_modules/underscore/modules/isNull.js","../node_modules/underscore/modules/isElement.js","../node_modules/underscore/modules/isFinite.js","../node_modules/underscore/modules/isEmpty.js","../node_modules/underscore/modules/pairs.js","../node_modules/underscore/modules/create.js","../node_modules/underscore/modules/clone.js","../node_modules/underscore/modules/tap.js","../node_modules/underscore/modules/has.js","../node_modules/underscore/modules/mapObject.js","../node_modules/underscore/modules/propertyOf.js","../node_modules/underscore/modules/times.js","../node_modules/underscore/modules/result.js","../node_modules/underscore/modules/chain.js","../node_modules/underscore/modules/memoize.js","../node_modules/underscore/modules/throttle.js","../node_modules/underscore/modules/debounce.js","../node_modules/underscore/modules/wrap.js","../node_modules/underscore/modules/compose.js","../node_modules/underscore/modules/after.js","../node_modules/underscore/modules/findWhere.js","../node_modules/underscore/modules/reject.js","../node_modules/underscore/modules/where.js","../node_modules/underscore/modules/min.js","../node_modules/underscore/modules/shuffle.js","../node_modules/underscore/modules/sortBy.js","../node_modules/underscore/modules/size.js","../node_modules/underscore/modules/last.js","../node_modules/underscore/modules/compact.js","../node_modules/underscore/modules/flatten.js","../node_modules/underscore/modules/intersection.js","../node_modules/underscore/modules/object.js","../node_modules/underscore/modules/range.js","../node_modules/underscore/modules/chunk.js","../node_modules/underscore/modules/index-default.js","../node_modules/dungeoneer/lib/room.js","../node_modules/dungeoneer/lib/tile.js","../node_modules/dungeoneer/lib/index.js","../node_modules/rot-js/lib/rng.js","../node_modules/rot-js/lib/display/rect.js","../node_modules/rot-js/lib/display/canvas.js","../node_modules/rot-js/lib/display/backend.js","../node_modules/rot-js/lib/constants.js","../node_modules/rot-js/lib/map/map.js","../node_modules/rot-js/lib/map/dungeon.js","../node_modules/rot-js/lib/map/features.js","../node_modules/rot-js/lib/map/digger.js","../node_modules/rot-js/lib/map/ellermaze.js","../node_modules/rot-js/lib/map/index.js","../node_modules/rot-js/lib/map/arena.js","../node_modules/rot-js/lib/map/uniform.js","../node_modules/rot-js/lib/map/cellular.js","../node_modules/rot-js/lib/map/dividedmaze.js","../node_modules/rot-js/lib/map/iceymaze.js","../node_modules/rot-js/lib/map/rogue.js","../src/generator.js","../src/dungeonlayer.js","../src/generatorsheet.js","../src/keybindings.js","../src/toolbar.js","../src/dungeondraw.js"],"sourcesContent":["// module name from module.json\nexport const MODULE_NAME = \"dungeon-draw\";\n\n// set as wall flag\nexport const DUNGEON_VERSION = \"1.0\";\n\nexport const FLAG_DUNGEON_VERSION = \"dungeonVersion\";\nexport const FLAG_DUNGEON_STATE = \"dungeonState\";\n\nexport const SETTING_ALLOW_TRUSTED_PLAYER = \"allowTrustedPlayer\";\nexport const SETTING_3DCANVAS_ENABLED = \"3DCanvasEnabled\";\nexport const SETTING_CUSTOM_THEMES = \"customThemes\";\nexport const SETTING_RELEASE_NOTES_VERSION = \"releaseNotesVersion\";\nexport const SETTING_SNAP_TO_GRID = \"snapToGrid\";\nexport const SETTING_THEME_PAINTER_THEME = \"themePainterTheme\";\n","import * as constants from \"./constants.js\";\n\nexport class Settings {\n static register() {\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_ALLOW_TRUSTED_PLAYER,\n {\n name: game.i18n.localize(\"DD.SettingAllowTrustedPlayers\"),\n scope: \"world\",\n default: true,\n type: Boolean,\n config: true,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_3DCANVAS_ENABLED,\n {\n name: game.i18n.localize(\"DD.SettingSupport3DCanvas\"),\n scope: \"world\",\n default: true,\n type: Boolean,\n config: true,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_SNAP_TO_GRID,\n {\n name: game.i18n.localize(\"DD.SettingSnapToGrid\"),\n scope: \"client\",\n default: true,\n type: Boolean,\n config: true,\n onChange: (value) => {\n // make sure DungeonLayer instance has latest value\n canvas.dungeon.options.snapToGrid = value;\n },\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_RELEASE_NOTES_VERSION,\n {\n name: \"Last version we showed release notes.\",\n scope: \"client\",\n default: \"\",\n type: String,\n config: false,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_CUSTOM_THEMES,\n {\n name: \"Custom themes data.\",\n scope: \"client\",\n default: \"{}\",\n type: String,\n config: false,\n }\n );\n game.settings.register(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME,\n {\n name: \"Theme painter theme key.\",\n scope: \"client\",\n default: \"module.cavern\",\n type: String,\n config: false,\n }\n );\n }\n\n static threeDCanvasEnabled() {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_3DCANVAS_ENABLED\n );\n }\n\n static snapToGrid() {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_SNAP_TO_GRID\n );\n }\n}\n","import * as constants from \"./constants.js\";\n\nexport const defaultConfig = () => {\n return {\n doorColor: \"#000000\",\n doorFillColor: \"#ffffff\",\n doorFillOpacity: 1.0,\n doorLineThickness: 8,\n doorThickness: 25,\n exteriorShadowColor: \"#000000\",\n exteriorShadowThickness: 20,\n exteriorShadowOpacity: 0.5,\n floorColor: \"#F2EDDF\",\n floorOpacity: 1.0,\n floorTexture: \"\",\n floorTextureRotation: 0,\n floorTextureTint: \"\",\n interiorShadowColor: \"#000000\",\n interiorShadowThickness: 8,\n interiorShadowOpacity: 0.5,\n invisibleWallColor: \"#000000\",\n invisibleWallFillColor: \"#ffffff\",\n invisibleWallLineThickness: 2,\n invisibleWallFillOpacity: 1.0,\n invisibleWallThickness: 6,\n matchBaseWalls: true,\n sceneBackgroundColor: \"#999999\",\n sceneGridColor: \"#000000\",\n sceneGridOpacity: 0.2,\n secretDoorSColor: \"#ffffff\",\n secretDoorStyleGM: \"secret\",\n secretDoorStylePlayer: \"wall\",\n threeDDoorTexture:\n \"modules/dungeon-draw/assets/textures/3d_arena-gate-texture.webp\",\n threeDDoorTextureTint: \"\",\n threeDWallTexture: \"\",\n threeDWallTextureTint: \"\",\n threeDWallSidesTexture: \"\",\n threeDWallSidesTextureTint: \"\",\n wallColor: \"#000000\",\n wallTexture: \"\",\n wallTextureTint: \"\",\n wallThickness: 8,\n };\n};\n\nexport const getTheme = (themeKey) => {\n const splits = themeKey.split(\".\");\n const type = splits[0];\n const key = splits[1];\n if (type === \"custom\") {\n const customThemes = getCustomThemes();\n return customThemes[key];\n }\n return themes[key];\n};\n\nexport const getCustomThemes = () => {\n try {\n const customThemesString = game.settings.get(\n constants.MODULE_NAME,\n \"customThemes\"\n );\n const themeObj = JSON.parse(customThemesString);\n // ensure saved custom themes get any new defaults\n Object.keys(themeObj).forEach((key) => {\n themeObj[key].config = foundry.utils.mergeObject(\n defaultConfig(),\n themeObj[key].config\n );\n });\n return themeObj;\n } catch (e) {\n console.log(e);\n return {};\n }\n};\n\nexport const setCustomThemes = (customThemes) => {\n const themesString = JSON.stringify(customThemes);\n game.settings.set(constants.MODULE_NAME, \"customThemes\", themesString);\n};\n\nexport const getThemePainterThemeKey = () => {\n return game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME\n );\n};\n\nexport const setThemePainterThemeKey = (themeKey) => {\n return game.settings.set(\n constants.MODULE_NAME,\n constants.SETTING_THEME_PAINTER_THEME,\n themeKey\n );\n};\n\nexport const themes = {\n default: {\n name: \"Default\",\n config: defaultConfig(),\n },\n arcPavement: {\n name: \"Arc Pavement\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#111111\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Arc_Pavement_001_basecolor.jpg\",\n invisibleWallThickness: 10,\n wallColor: \"#111111\",\n wallThickness: 12,\n }),\n },\n basicBlack: {\n name: \"Basic Black\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#0D0D0D\",\n doorFillOpacity: 0.0,\n exteriorShadowOpacity: 0,\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#0D0D0D\",\n floorColor: \"#FFFFFF\",\n sceneBackgroundColor: \"#0D0D0D\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#0D0D0D\",\n wallColor: \"#0D0D0D\",\n }),\n },\n cavern: {\n name: \"Cavern\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#2B2D2F\",\n invisibleWallThickness: 10,\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Stylized_Stone_Floor_002_bw.jpg\",\n wallColor: \"#2B2D2F\",\n wallThickness: 12,\n }),\n },\n checkerboard: {\n name: \"Checkerboard\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorFillColor: \"#C2BFB0\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/sci_fi_texture_150_by_llexandro_d939vk9.png\",\n invisibleWallFillColor: \"#C2BFB0\",\n invisibleWallThickness: 8,\n secretDoorSColor: \"#C2BFB0\",\n wallThickness: 10,\n }),\n },\n cobblestone: {\n name: \"Cobblestone\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#222222\",\n doorFillColor: \"#FFFFFF\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Cobblestone_001_COLOR.jpg\",\n invisibleWallColor: \"#222222\",\n invisibleWallFillColor: \"#FFFFFF\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#FFFFFF\",\n wallColor: \"#222222\",\n wallThickness: 12,\n }),\n },\n dirt: {\n name: \"Dirt\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#1a1714\",\n doorFillColor: \"#8d7862\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Ground_Dirt_007_basecolor.jpg\",\n invisibleWallColor: \"#1a1714\",\n invisibleWallFillColor: \"#8d7862\",\n invisibleWallThickness: 8,\n secretDoorSColor: \"#8d7862\",\n wallColor: \"#1a1714\",\n wallThickness: 10,\n }),\n },\n dungeonSquares: {\n name: \"Dungeon Squares\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#111111\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/outdoor+stone+tiles+pavement.jpg\",\n invisibleWallColor: \"#111111\",\n invisibleWallThickness: 10,\n wallColor: \"#111111\",\n wallThickness: 12,\n }),\n },\n grass: {\n name: \"Grass\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#72471d\",\n doorFillColor: \"#eee8c1\",\n floorTexture: \"modules/dungeon-draw/assets/textures/Grass_001_COLOR.jpg\",\n invisibleWallColor: \"#72471d\",\n invisibleWallFillColor: \"#eee8c1\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#eee8c1\",\n wallColor: \"#72471d\",\n wallThickness: 10,\n }),\n },\n groovyCarpet: {\n name: \"Groovy Carpet\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#2B2D2F\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Fabric_Rug_006_basecolor.jpg\",\n invisibleWallColor: \"#2B2D2F\",\n invisibleWallThickness: 10,\n wallColor: \"#2B2D2F\",\n wallThickness: 12,\n }),\n },\n hexagon: {\n name: \"Hexagons\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#282828\",\n doorFillColor: \"#D1BD8A\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Rocks_Hexagons_002_basecolor.jpg\",\n invisibleWallColor: \"#282828\",\n invisibleWallFillColor: \"#D1BD8A\",\n invisibleWallThickness: 10,\n secretDoorSColor: \"#D1BD8A\",\n wallColor: \"#282828\",\n wallThickness: 12,\n }),\n },\n marble: {\n name: \"Marble\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#686882\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Marble_Tiles_001_basecolor.jpg\",\n invisibleWallColor: \"#686882\",\n wallColor: \"#686882\",\n }),\n },\n metalGrid: {\n name: \"Metal Grid\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#27251A\",\n doorFillColor: \"#AAAAAA\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Sci-fi_Floor_002_basecolor.jpg\",\n invisibleWallColor: \"#27251A\",\n invisibleWallFillColor: \"#AAAAAA\",\n secretDoorSColor: \"#AAAAAA\",\n wallColor: \"#27251A\",\n }),\n },\n metalSquares: {\n name: \"Metal Squares\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorFillColor: \"#C0C0C0\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/sci_fi_texture_212_by_llexandro_dcuxgum.png\",\n invisibleWallFillColor: \"#C0C0C0\",\n secretDoorSColor: \"#C0C0C0\",\n }),\n },\n moldvayBlue: {\n name: \"Moldvay Blue\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#3A9FF2\",\n doorFillOpacity: 0.0,\n doorThickness: 35,\n exteriorShadowOpacity: 0,\n floorColor: \"#FFFFFF\",\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#3A9FF2\",\n invisibleWallFillOpacity: 0.0,\n sceneBackgroundColor: \"#3A9FF2\",\n sceneGridColor: \"#3A9FF2\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#3A9FF2\",\n wallColor: \"#3A9FF2\",\n }),\n },\n neonBlueprint: {\n name: \"Neon Blueprint\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#3A9FF2\",\n doorFillOpacity: 0.0,\n doorThickness: 35,\n exteriorShadowColor: \"#18495E\",\n floorColor: \"#142A3B\",\n interiorShadowColor: \"#1B7FAB\",\n invisibleWallColor: \"#3A9FF2\",\n invisibleWallFillOpacity: 0.0,\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 6,\n sceneBackgroundColor: \"#171008\",\n sceneGridColor: \"#4C89A1\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#3A9FF2\",\n wallColor: \"#63C9E6\",\n wallThickness: 4,\n }),\n },\n ruddyPaper: {\n name: \"Ruddy Paper\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#913B55\",\n doorFillColor: \"#FADEE6\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Paper_Recycled_001_COLOR.jpg\",\n floorTextureTint: \"#F9FAE6\",\n exteriorShadowOpacity: 0,\n interiorShadowOpacity: 0,\n invisibleWallColor: \"#913B55\",\n invisibleWallFillColor: \"#FADEE6\",\n sceneBackgroundColor: \"#EBD3BC\",\n sceneGridColor: \"#594026\",\n sceneGridOpacity: 1.0,\n secretDoorSColor: \"#913B55\",\n wallColor: \"#9A6D54\",\n }),\n },\n water: {\n name: \"Water\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#203246\",\n floorTexture: \"modules/dungeon-draw/assets/textures/Water_001_COLOR.jpg\",\n invisibleWallColor: \"#203246\",\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 4,\n wallColor: \"#203246\",\n wallThickness: 5,\n }),\n },\n woodPlanks: {\n name: \"Wood Planks\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#332211\",\n floorTexture:\n \"modules/dungeon-draw/assets/textures/Old_Wooden_Plank_Seamless_Texture_765.jpg\",\n invisibleWallColor: \"#332211\",\n invisibleWallThickness: 13,\n wallColor: \"#332211\",\n wallTexture: \"modules/dungeon-draw/assets/textures/Bark_002_bw.jpg\",\n wallTextureTint: \"#7e5935\",\n wallThickness: 15,\n }),\n },\n xenomorph: {\n name: \"Xenomorph\",\n config: foundry.utils.mergeObject(defaultConfig(), {\n doorColor: \"#8AF0F0\",\n doorFillColor: \"#255151\",\n doorLineThickness: 5,\n doorThickness: 20,\n exteriorShadowColor: \"#00838C\",\n floorColor: \"#255151\",\n interiorShadowColor: \"#00838C\",\n invisibleWallColor: \"#8AF0F0\",\n invisibleWallFillColor: \"#255151\",\n invisibleWallLineThickness: 1,\n invisibleWallThickness: 6,\n sceneBackgroundColor: \"#002222\",\n sceneGridColor: \"#ffffff\",\n sceneGridOpacity: 1,\n secretDoorSColor: \"#8AF0F0\",\n wallColor: \"#8AF0F0\",\n wallThickness: 4,\n }),\n },\n};\n","// TODO: fix this circular dependency\n// import { ConfigSheet } from \"./configsheet.js\";\nimport { Settings } from \"./settings.js\";\nimport { getCustomThemes, setCustomThemes } from \"./themes.js\";\n\n/**\n * Sheet for Theme editing.\n *\n * @extends {FormApplication}\n */\nexport class ThemeSheet extends FormApplication {\n constructor(themeKey) {\n super();\n this.themeKey = themeKey;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-theme-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/theme-sheet.html\",\n width: 480,\n height: Settings.threeDCanvasEnabled() ? 1160 : 1040,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.ThemeSheetTitle\");\n }\n\n /** @override */\n getData() {\n const customThemes = getCustomThemes();\n const theme = customThemes[this.themeKey];\n const threeDCanvasEnabled = Settings.threeDCanvasEnabled();\n return {\n config: theme.config,\n themeName: theme.name,\n threeDCanvasEnabled,\n };\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async _updateObject(event, formData) {\n const customThemes = getCustomThemes();\n const themeName = formData.themeName;\n delete formData.themeName;\n // overwrite the theme at our key\n customThemes[this.themeKey] = {\n name: themeName,\n config: formData,\n };\n setCustomThemes(customThemes);\n // re-draw the dungeon\n // draw() and refresh() on the layer makes the dungeon disappear\n //canvas.dungeon.draw();\n //canvas.dungeon.refresh();\n // refresh on the dungeon does nothing\n await canvas.dungeon.dungeon?.refresh();\n\n // force already-open config sheet to re-render\n // TODO: fix this circular dependency\n // new ConfigSheet(\"themes\").render(true);\n }\n}\n","import { Settings } from \"./settings.js\";\nimport {\n defaultConfig,\n getCustomThemes,\n getThemePainterThemeKey,\n setCustomThemes,\n setThemePainterThemeKey,\n themes,\n} from \"./themes.js\";\nimport { ThemeSheet } from \"./themesheet.js\";\n\n/**\n * Sheet for dungeon config/settings.\n *\n * @extends {FormApplication}\n */\nexport class ConfigSheet extends FormApplication {\n constructor(activeTab = \"settings\") {\n super();\n this._tabs[0].active = activeTab;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-config-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/config-sheet.html\",\n width: 480,\n height: Settings.threeDCanvasEnabled() ? 1220 : 1100,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.ConfigSheetTitle\");\n }\n\n /** @override */\n getData() {\n let config = canvas.dungeon.dungeon?.state().config;\n if (!config) {\n config = defaultConfig();\n }\n const customThemes = getCustomThemes();\n const customThemeKeys = Object.keys(customThemes).sort();\n const themeKeys = Object.keys(themes).sort();\n const themePainterThemeKey = getThemePainterThemeKey();\n const threeDCanvasEnabled = Settings.threeDCanvasEnabled();\n return {\n config,\n customThemes,\n customThemeKeys,\n themes,\n themeKeys,\n themePainterThemeKey,\n threeDCanvasEnabled,\n };\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async _updateObject(event, formData) {\n // TODO: handle customThemeName vs. config better\n delete formData.customThemeName;\n delete formData.themePainterTheme;\n canvas.dungeon.dungeon?.setConfig(formData);\n if (game.user.isGM) {\n // need GM privs to update scene\n await canvas.scene.update({\n backgroundColor: formData.sceneBackgroundColor,\n gridAlpha: formData.sceneGridAlpha,\n gridColor: formData.sceneGridColor,\n });\n }\n }\n\n /* -------------------------------------------- */\n\n /** @override */\n async close(options) {\n await super.close(options);\n if (this.preview) {\n this.preview.removeChildren();\n this.preview = null;\n }\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html\n .find('button[name=\"resetDefault\"]')\n .click(this._onResetDefaults.bind(this));\n html.find(\".dd-theme-name\").click(this._onThemeNameClick.bind(this));\n html\n .find(\".dd-save-as-theme-button\")\n .click(this._onSaveAsThemeClick.bind(this));\n html.find(\".dd-theme-edit\").click(this._onEditThemeClick.bind(this));\n html.find(\".dd-theme-copy\").click(this._onCopyThemeClick.bind(this));\n html.find(\".dd-theme-delete\").click(this._onDeleteThemeClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this._onThemePainterThemeSelect.bind(this));\n html\n .find(\".dd-export-themes-button\")\n .click(this._onExportThemesClick.bind(this));\n html\n .find(\".dd-import-themes-button\")\n .click(this._onImportThemesClick.bind(this));\n }\n\n /* -------------------------------------------- */\n\n /**\n * Reset the user Drawing configuration settings to their default values\n * @param {PointerEvent} event The originating mouse-click event\n * @protected\n */\n _onResetDefaults(event) {\n event.preventDefault();\n canvas.dungeon.dungeon?.setConfig(defaultConfig());\n canvas.dungeon.dungeon.refresh();\n this.render();\n }\n\n async _onThemeNameClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).parent(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const isCustom = themeRow.data(\"themetype\") === \"custom\";\n let theme;\n if (isCustom) {\n const customThemes = getCustomThemes();\n theme = customThemes[themeKey];\n } else {\n theme = themes[themeKey];\n }\n const newConfig = { ...theme.config };\n await canvas.dungeon.dungeon?.setConfig(newConfig);\n if (game.user.isGM) {\n // need GM privs to update scene\n await canvas.scene.update({\n backgroundColor: newConfig.sceneBackgroundColor,\n gridAlpha: newConfig.sceneGridAlpha,\n gridColor: newConfig.sceneGridColor,\n });\n }\n this.render();\n }\n\n async _onSaveAsThemeClick(event) {\n event.preventDefault();\n const input = $(event.currentTarget)\n .closest(\".form-fields\")\n .children(\".saveAsThemeName\");\n const saveAsThemeName = input.val();\n const formData = this._getSubmitData();\n // TODO: handle saveAsThemeName better\n delete formData.saveAsThemeName;\n delete formData.themePainterThemeKey;\n const customThemes = getCustomThemes();\n customThemes[saveAsThemeName] = {\n name: saveAsThemeName,\n config: formData,\n };\n setCustomThemes(customThemes);\n this._tabs[0].active = \"themes\";\n this.render();\n }\n\n async _onEditThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n new ThemeSheet(themeKey).render(true);\n }\n\n _onCopyThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const customThemes = getCustomThemes();\n const oldTheme = customThemes[themeKey];\n const newTheme = JSON.parse(JSON.stringify(oldTheme));\n // deal with possible name collisions\n let num = 1;\n let newName;\n let done = false;\n while (!done) {\n newName = `${oldTheme.name} (${num})`;\n if (newName in customThemes) {\n num++;\n } else {\n done = true;\n }\n }\n newTheme.name = newName;\n customThemes[newName] = newTheme;\n setCustomThemes(customThemes);\n this.render();\n }\n\n _onDeleteThemeClick(event) {\n event.preventDefault();\n const themeRow = $(event.currentTarget).closest(\".dd-theme-row\");\n const themeKey = themeRow.data(\"theme\");\n const customThemes = getCustomThemes();\n delete customThemes[themeKey];\n setCustomThemes(customThemes);\n this.render();\n }\n\n _onExportThemesClick(event) {\n event.preventDefault();\n const customThemesString = JSON.stringify(getCustomThemes(), null, 2);\n saveDataToFile(\n customThemesString,\n \"application/json\",\n \"dd-custom-themes.json\"\n );\n }\n\n async _onImportThemesClick(event) {\n event.preventDefault();\n // this Dialog based on Foundry's importFromJSONDialog()\n new Dialog(\n {\n title: game.i18n.localize(\"DD.ImportCustomThemes\"),\n content: await renderTemplate(\n \"modules/dungeon-draw/templates/import-data.html\",\n {\n hint: game.i18n.localize(\"DD.ImportCustomThemesHint\"),\n }\n ),\n buttons: {\n import: {\n icon: '',\n label: game.i18n.localize(\"DD.Import\"),\n callback: (html) => {\n const form = html.find(\"form\")[0];\n if (!form.data.files.length) {\n return ui.notifications.error(\n \"You did not upload a data file!\"\n );\n }\n readTextFromFile(form.data.files[0]).then((text) => {\n const newJson = JSON.parse(text);\n if (form.wipe.checked) {\n // replace existing JSON\n setCustomThemes(newJson);\n } else {\n // merge\n const oldJson = getCustomThemes();\n const mergedJson = foundry.utils.mergeObject(\n oldJson,\n newJson\n );\n setCustomThemes(mergedJson);\n }\n this.render();\n });\n },\n },\n no: {\n icon: '',\n label: game.i18n.localize(\"DD.Cancel\"),\n },\n },\n default: \"import\",\n },\n {\n width: 400,\n }\n ).render(true);\n }\n\n _onThemePainterThemeSelect(event) {\n const themeKey = $(event.currentTarget).val();\n setThemePainterThemeKey(themeKey);\n }\n}\n","export default class Exception extends Error {\n constructor(message) {\n super(message)\n this.name = Object.keys({ Exception })[0]\n }\n toString() {\n return this.message\n }\n}\n","import Exception from './Exception.js'\n\nexport default class IllegalArgumentException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ IllegalArgumentException })[0]\n }\n}\n","export default class GeometryComponentFilter {\n filter(geom) {}\n}\n","export default function Comparable() {}\n","export default function Clonable() {}\n","export default function Serializable() {}\n","export default class NumberUtil {\n static equalsWithTolerance(x1, x2, tolerance) {\n return Math.abs(x1 - x2) <= tolerance\n }\n}\n","export default class Long {\n constructor(high, low) {\n this.low = low || 0\n this.high = high || 0\n }\n\n static toBinaryString(i) {\n let mask\n let result = ''\n for (mask = 0x80000000; mask > 0; mask >>>= 1)\n result += (i.high & mask) === mask ? '1' : '0'\n for (mask = 0x80000000; mask > 0; mask >>>= 1)\n result += (i.low & mask) === mask ? '1' : '0'\n return result\n }\n}\n","import Long from './Long.js'\n\nexport default function Double() { }\n\nDouble.NaN = NaN\nDouble.isNaN = n => Number.isNaN(n)\nDouble.isInfinite = n => !Number.isFinite(n)\nDouble.MAX_VALUE = Number.MAX_VALUE\nDouble.POSITIVE_INFINITY = Number.POSITIVE_INFINITY\nDouble.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY\n\nif (typeof Float64Array === 'function' &&\n typeof Int32Array === 'function')\n// Simple and fast conversion between double and long bits\n// using TypedArrays and ArrayViewBuffers.\n\n (function() {\n const EXP_BIT_MASK = 0x7ff00000\n const SIGNIF_BIT_MASK = 0xFFFFF\n const f64buf = new Float64Array(1)\n const i32buf = new Int32Array(f64buf.buffer)\n Double.doubleToLongBits = function(value) {\n f64buf[0] = value\n let low = i32buf[0] | 0\n let high = i32buf[1] | 0\n // Check for NaN based on values of bit fields, maximum\n // exponent and nonzero significand.\n if (((high & EXP_BIT_MASK) === EXP_BIT_MASK) &&\n ((high & SIGNIF_BIT_MASK) !== 0) &&\n (low !== 0)) {\n low = 0 | 0\n high = 0x7ff80000 | 0\n }\n return new Long(high, low)\n }\n Double.longBitsToDouble = function(bits) {\n i32buf[0] = bits.low\n i32buf[1] = bits.high\n return f64buf[0]\n }\n })()\nelse\n// More complex and slower fallback implementation using\n// math and the divide-by-two and multiply-by-two algorithms.\n\n (function() {\n const BIAS = 1023\n const log2 = Math.log2\n const floor = Math.floor\n const pow = Math.pow\n const MAX_REL_BITS_INTEGER = (function() {\n for (let i = 53; i > 0; i--) {\n const bits = pow(2, i) - 1\n if (floor(log2(bits)) + 1 === i) return bits\n }\n return 0\n })()\n Double.doubleToLongBits = function(value) {\n let x, y, f, bits, skip\n let sign, exp, high, low\n\n // Get the sign bit and absolute value.\n if (value < 0 || 1 / value === Number.NEGATIVE_INFINITY) {\n sign = (1 << 31)\n value = (-value)\n } else {\n sign = 0\n }\n\n // Handle some special values.\n if (value === 0) {\n // Handle zeros (+/-0).\n low = 0 | 0\n high = sign // exponent: 00..00, significand: 00..00\n return new Long(high, low)\n }\n\n if (value === Infinity) {\n // Handle infinity (only positive values for value possible).\n low = 0 | 0\n high = sign | 0x7ff00000 // exponent: 11..11, significand: 00..00\n return new Long(high, low)\n }\n\n if (value !== value) { // eslint-disable-line\n // Handle NaNs (boiled down to only one distinct NaN).\n low = 0 | 0\n high = 0x7ff80000 // exponent: 11..11, significand: 10..00\n return new Long(high, low)\n }\n\n // Preinitialize variables, that are not neccessarily set by\n // the algorithm.\n bits = 0\n low = 0 | 0\n\n // Get the (always positive) integer part of value.\n x = floor(value)\n\n // Process the integer part if it's greater than 1. Zero requires\n // no bits at all, 1 represents the implicit (hidden) leading bit,\n // which must not be written as well.\n if (x > 1)\n // If we can reliably determine the number of bits required for\n // the integer part,\n\n if (x <= MAX_REL_BITS_INTEGER) {\n // get the number of bits required to represent it minus 1\n bits = floor(log2(x)) /* + 1 - 1 */\n // and simply copy/shift the integer bits into low and high.\n // That's much faster than the divide-by-two algorithm (saves\n // up to ~60%).\n // We always need to mask out the most significant bit, which\n // is the implicit (aka hidden) bit.\n if (bits <= 20) {\n // The simple case in which the integer fits into the\n // lower 20 bits of the high word is worth to be handled\n // separately (saves ~25%).\n low = 0 | 0\n high = (x << (20 - bits)) & 0xfffff\n } else {\n // Here, the integer part is split into low and high.\n // Since its value may require more than 32 bits, we\n // cannot use bitwise operators (which implicitly cast\n // to Int32), but use arithmetic operators % and / to\n // get low and high parts. The uppper 20 bits go to high,\n // the remaining bits (in f) to low.\n f = bits - 20\n // Like (1 << f) but safe with even more than 32 bits.\n y = pow(2, f)\n low = (x % y) << (32 - f)\n high = (x / y) & 0xfffff\n }\n } else {\n // For greater values, we must use the much slower divide-by-two\n // algorithm. Bits are generated from right to left, that is from\n // least to most significant bit. For each bit, we left-shift both\n // low and high by one and carry bit #0 from high to #31 in low.\n // The next bit is then copied into bit #19 in high, the leftmost\n // bit of the double's significand.\n\n // Preserve x for later user, so work with f.\n f = x\n low = 0 | 0\n for (;;) {\n y = f / 2\n f = floor(y)\n if (f === 0)\n // We just found the most signigicant (1-)bit, which\n // is the implicit bit and so, not stored in the double\n // value. So, it's time to leave the loop.\n break\n\n // Count this bit, shift low and carry bit #0 from high.\n bits++\n low >>>= 1\n low |= (high & 0x1) << 31\n // Shift high.\n high >>>= 1\n if (y !== f)\n // Copy the new bit into bit #19 in high (only required if 1).\n high |= 0x80000\n }\n }\n\n // Bias the exponent.\n exp = bits + BIAS\n\n // If the integer part is zero, we've not yet seen the implicit\n // leading bit. Variable skip is later used while processing the\n // fractional part (if any).\n skip = (x === 0)\n\n // Get fraction only into x.\n x = value - x\n\n // If some significand bits are still left to be filled and\n // the fractional part is not zero, convert the fraction using\n // the multiply-by-2 algorithm.\n if (bits < 52 && x !== 0) {\n // Initialize 'buffer' f, into which newly created bits get\n // shifted from right to left.\n f = 0\n\n for (;;) {\n y = x * 2\n if (y >= 1) {\n // This is a new 1-bit. Add and count this bit, if not\n // prohibited by skip.\n x = y - 1\n if (!skip) {\n f <<= 1\n f |= 1\n bits++\n } else {\n // Otherwise, decrement the exponent and unset\n // skip, so that all following bits get written.\n exp--\n skip = false\n }\n } else {\n // This is a new 0-bit. Add and count this bit, if not\n // prohibited by skip.\n x = y\n if (!skip) {\n f <<= 1\n bits++\n } else if (--exp === 0) {\n // Otherwise we've just decremented the exponent. If the\n // biased exponent is zero now (-1023), we process a\n // subnormal number, which has no impled leading 1-bit.\n // So, count this 0-bit and unset skip to write out\n // all the following bits.\n bits++\n skip = false\n }\n }\n if (bits === 20) {\n // When 20 bits have been created in total, we're done with\n // the high word. Copy the bits from 'buffer' f into high\n // and reset 'buffer' f. Following bits will end up in the\n // low word.\n high |= f\n f = 0\n } else if (bits === 52) {\n // When 52 bits have been created in total, we're done with\n // low word as well. Copy the bits from 'buffer' f into low\n // and exit the loop.\n low |= f\n break\n }\n if (y === 1) {\n // When y is exactly 1, there is no remainder and the process\n // is complete (the number is finite). Copy the bits from\n // 'buffer' f into either low or high and exit the loop.\n if (bits < 20)\n high |= (f << (20 - bits))\n else if (bits < 52) low |= (f << (52 - bits))\n\n break\n }\n }\n }\n\n // Copy/shift the exponent and sign bits into the high word.\n high |= (exp << 20)\n high |= sign\n\n return new Long(high, low)\n }\n Double.longBitsToDouble = function(bits) {\n let i\n let x, exp, fract\n const high = bits.high\n const low = bits.low\n\n // Extract the sign.\n const sign = (high & (1 << 31)) ? -1 : 1\n\n // Extract the unbiased exponent.\n exp = ((high & 0x7ff00000) >> 20) - BIAS\n\n // Calculate the fraction from left to right. Start\n // off with the 20 lower bits from the high word.\n fract = 0\n x = (1 << 19)\n for (i = 1; i <= 20; i++) {\n if (high & x) fract += pow(2, -i)\n\n x >>>= 1\n }\n // Continue with all 32 bits from the low word.\n x = (1 << 31)\n for (i = 21; i <= 52; i++) {\n if (low & x) fract += pow(2, -i)\n\n x >>>= 1\n }\n\n // Handle special values.\n // Check for zero and subnormal values.\n if (exp === -BIAS) {\n if (fract === 0)\n // +/-1.0 * 0.0 => +/-0.0\n return sign * 0\n\n exp = -1022\n } else if (exp === BIAS + 1) { // Check for +/-Infinity or NaN.\n if (fract === 0)\n // +/-1.0 / 0.0 => +/-Infinity\n return sign / 0\n\n return NaN\n } else { // Nothing special? Seems to be a normal number.\n // Add the implicit leading bit (1*2^0).\n fract += 1\n }\n\n return sign * fract * pow(2, exp)\n }\n })()\n","export default function Comparator() {}\n","import Exception from './Exception.js'\n\nexport default class RuntimeException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ RuntimeException })[0]\n }\n}\n","import RuntimeException from '../../../../java/lang/RuntimeException.js'\nexport default class AssertionFailedException extends RuntimeException {\n constructor() {\n super()\n AssertionFailedException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n RuntimeException.constructor_.call(this)\n } else if (arguments.length === 1) {\n const message = arguments[0]\n RuntimeException.constructor_.call(this, message)\n }\n }\n}\n","import AssertionFailedException from './AssertionFailedException.js'\nexport default class Assert {\n static shouldNeverReachHere() {\n if (arguments.length === 0) {\n Assert.shouldNeverReachHere(null)\n } else if (arguments.length === 1) {\n const message = arguments[0]\n throw new AssertionFailedException('Should never reach here' + (message !== null ? ': ' + message : ''))\n }\n }\n static isTrue() {\n if (arguments.length === 1) {\n const assertion = arguments[0]\n Assert.isTrue(assertion, null)\n } else if (arguments.length === 2) {\n const assertion = arguments[0], message = arguments[1]\n if (!assertion) \n if (message === null) \n throw new AssertionFailedException()\n else \n throw new AssertionFailedException(message)\n \n \n }\n }\n static equals() {\n if (arguments.length === 2) {\n const expectedValue = arguments[0], actualValue = arguments[1]\n Assert.equals(expectedValue, actualValue, null)\n } else if (arguments.length === 3) {\n const expectedValue = arguments[0], actualValue = arguments[1], message = arguments[2]\n if (!actualValue.equals(expectedValue)) \n throw new AssertionFailedException('Expected ' + expectedValue + ' but encountered ' + actualValue + (message !== null ? ': ' + message : ''))\n \n }\n }\n}\n","import NumberUtil from '../util/NumberUtil.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Comparator from '../../../../java/util/Comparator.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Assert from '../util/Assert.js'\n\nconst kBuf = new ArrayBuffer(8)\nconst kBufAsF64 = new Float64Array(kBuf)\nconst kBufAsI32 = new Int32Array(kBuf)\n\nexport default class Coordinate {\n constructor() {\n Coordinate.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.x = null\n this.y = null\n this.z = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this, 0.0, 0.0)\n } else if (arguments.length === 1) {\n const c = arguments[0]\n Coordinate.constructor_.call(this, c.x, c.y, c.getZ())\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n } else if (arguments.length === 3) {\n const x = arguments[0], y = arguments[1], z = arguments[2]\n this.x = x\n this.y = y\n this.z = z\n }\n }\n static hashCode(n) {\n kBufAsF64[0] = n\n return kBufAsI32[0] ^ kBufAsI32[1]\n }\n getM() {\n return Double.NaN\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case Coordinate.X:\n this.x = value\n break\n case Coordinate.Y:\n this.y = value\n break\n case Coordinate.Z:\n this.setZ(value)\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n equals2D() {\n if (arguments.length === 1) {\n const other = arguments[0]\n if (this.x !== other.x) \n return false\n \n if (this.y !== other.y) \n return false\n \n return true\n } else if (arguments.length === 2) {\n const c = arguments[0], tolerance = arguments[1]\n if (!NumberUtil.equalsWithTolerance(this.x, c.x, tolerance)) \n return false\n \n if (!NumberUtil.equalsWithTolerance(this.y, c.y, tolerance)) \n return false\n \n return true\n }\n }\n setM(m) {\n throw new IllegalArgumentException('Invalid ordinate index: ' + Coordinate.M)\n }\n getZ() {\n return this.z\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case Coordinate.X:\n return this.x\n case Coordinate.Y:\n return this.y\n case Coordinate.Z:\n return this.getZ()\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n equals3D(other) {\n return this.x === other.x && this.y === other.y && (this.getZ() === other.getZ() || Double.isNaN(this.getZ()) && Double.isNaN(other.getZ()))\n }\n equals(other) {\n if (!(other instanceof Coordinate)) \n return false\n \n return this.equals2D(other)\n }\n equalInZ(c, tolerance) {\n return NumberUtil.equalsWithTolerance(this.getZ(), c.getZ(), tolerance)\n }\n setX(x) {\n this.x = x\n }\n compareTo(o) {\n const other = o\n if (this.x < other.x) return -1\n if (this.x > other.x) return 1\n if (this.y < other.y) return -1\n if (this.y > other.y) return 1\n return 0\n }\n getX() {\n return this.x\n }\n setZ(z) {\n this.z = z\n }\n clone() {\n try {\n const coord = null\n return coord\n } catch (e) {\n if (e instanceof CloneNotSupportedException) {\n Assert.shouldNeverReachHere('this shouldn\\'t happen because this class is Cloneable')\n return null\n } else {\n throw e\n }\n } finally {}\n }\n copy() {\n return new Coordinate(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ')'\n }\n distance3D(c) {\n const dx = this.x - c.x\n const dy = this.y - c.y\n const dz = this.getZ() - c.getZ()\n return Math.sqrt(dx * dx + dy * dy + dz * dz)\n }\n getY() {\n return this.y\n }\n setY(y) {\n this.y = y\n }\n distance(c) {\n const dx = this.x - c.x\n const dy = this.y - c.y\n return Math.sqrt(dx * dx + dy * dy)\n }\n hashCode() {\n let result = 17\n result = 37 * result + Coordinate.hashCode(this.x)\n result = 37 * result + Coordinate.hashCode(this.y)\n return result\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n }\n get interfaces_() {\n return [Comparable, Cloneable, Serializable]\n }\n}\nclass DimensionalComparator {\n constructor() {\n DimensionalComparator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._dimensionsToTest = 2\n if (arguments.length === 0) {\n DimensionalComparator.constructor_.call(this, 2)\n } else if (arguments.length === 1) {\n const dimensionsToTest = arguments[0]\n if (dimensionsToTest !== 2 && dimensionsToTest !== 3) throw new IllegalArgumentException('only 2 or 3 dimensions may be specified')\n this._dimensionsToTest = dimensionsToTest\n }\n }\n static compare(a, b) {\n if (a < b) return -1\n if (a > b) return 1\n if (Double.isNaN(a)) {\n if (Double.isNaN(b)) return 0\n return -1\n }\n if (Double.isNaN(b)) return 1\n return 0\n }\n compare(c1, c2) {\n const compX = DimensionalComparator.compare(c1.x, c2.x)\n if (compX !== 0) return compX\n const compY = DimensionalComparator.compare(c1.y, c2.y)\n if (compY !== 0) return compY\n if (this._dimensionsToTest <= 2) return 0\n const compZ = DimensionalComparator.compare(c1.getZ(), c2.getZ())\n return compZ\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nCoordinate.DimensionalComparator = DimensionalComparator\nCoordinate.NULL_ORDINATE = Double.NaN\nCoordinate.X = 0\nCoordinate.Y = 1\nCoordinate.Z = 2\nCoordinate.M = 3\n","import Coordinate from './Coordinate.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class Envelope {\n constructor() {\n Envelope.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._minx = null\n this._maxx = null\n this._miny = null\n this._maxy = null\n if (arguments.length === 0) {\n this.init()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.init(p.x, p.x, p.y, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const env = arguments[0]\n this.init(env)\n }\n } else if (arguments.length === 2) {\n const p1 = arguments[0], p2 = arguments[1]\n this.init(p1.x, p2.x, p1.y, p2.y)\n } else if (arguments.length === 4) {\n const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n this.init(x1, x2, y1, y2)\n }\n }\n static intersects() {\n if (arguments.length === 3) {\n const p1 = arguments[0], p2 = arguments[1], q = arguments[2]\n if (q.x >= (p1.x < p2.x ? p1.x : p2.x) && q.x <= (p1.x > p2.x ? p1.x : p2.x) && (q.y >= (p1.y < p2.y ? p1.y : p2.y) && q.y <= (p1.y > p2.y ? p1.y : p2.y))) \n return true\n \n return false\n } else if (arguments.length === 4) {\n const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n let minq = Math.min(q1.x, q2.x)\n let maxq = Math.max(q1.x, q2.x)\n let minp = Math.min(p1.x, p2.x)\n let maxp = Math.max(p1.x, p2.x)\n if (minp > maxq) return false\n if (maxp < minq) return false\n minq = Math.min(q1.y, q2.y)\n maxq = Math.max(q1.y, q2.y)\n minp = Math.min(p1.y, p2.y)\n maxp = Math.max(p1.y, p2.y)\n if (minp > maxq) return false\n if (maxp < minq) return false\n return true\n }\n }\n getArea() {\n return this.getWidth() * this.getHeight()\n }\n equals(other) {\n if (!(other instanceof Envelope)) \n return false\n \n const otherEnvelope = other\n if (this.isNull()) \n return otherEnvelope.isNull()\n \n return this._maxx === otherEnvelope.getMaxX() && this._maxy === otherEnvelope.getMaxY() && this._minx === otherEnvelope.getMinX() && this._miny === otherEnvelope.getMinY()\n }\n intersection(env) {\n if (this.isNull() || env.isNull() || !this.intersects(env)) return new Envelope()\n const intMinX = this._minx > env._minx ? this._minx : env._minx\n const intMinY = this._miny > env._miny ? this._miny : env._miny\n const intMaxX = this._maxx < env._maxx ? this._maxx : env._maxx\n const intMaxY = this._maxy < env._maxy ? this._maxy : env._maxy\n return new Envelope(intMinX, intMaxX, intMinY, intMaxY)\n }\n isNull() {\n return this._maxx < this._minx\n }\n getMaxX() {\n return this._maxx\n }\n covers() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.covers(p.x, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (this.isNull() || other.isNull()) \n return false\n \n return other.getMinX() >= this._minx && other.getMaxX() <= this._maxx && other.getMinY() >= this._miny && other.getMaxY() <= this._maxy\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) return false\n return x >= this._minx && x <= this._maxx && y >= this._miny && y <= this._maxy\n }\n }\n intersects() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (this.isNull() || other.isNull()) \n return false\n \n return !(other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.intersects(p.x, p.y)\n }\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const a = arguments[0], b = arguments[1]\n if (this.isNull()) \n return false\n \n const envminx = a.x < b.x ? a.x : b.x\n if (envminx > this._maxx) return false\n const envmaxx = a.x > b.x ? a.x : b.x\n if (envmaxx < this._minx) return false\n const envminy = a.y < b.y ? a.y : b.y\n if (envminy > this._maxy) return false\n const envmaxy = a.y > b.y ? a.y : b.y\n if (envmaxy < this._miny) return false\n return true\n } else if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) return false\n return !(x > this._maxx || x < this._minx || y > this._maxy || y < this._miny)\n }\n }\n }\n getMinY() {\n return this._miny\n }\n getDiameter() {\n if (this.isNull()) \n return 0\n \n const w = this.getWidth()\n const h = this.getHeight()\n return Math.sqrt(w * w + h * h)\n }\n getMinX() {\n return this._minx\n }\n expandToInclude() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.expandToInclude(p.x, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n if (other.isNull()) \n return null\n \n if (this.isNull()) {\n this._minx = other.getMinX()\n this._maxx = other.getMaxX()\n this._miny = other.getMinY()\n this._maxy = other.getMaxY()\n } else {\n if (other._minx < this._minx) \n this._minx = other._minx\n \n if (other._maxx > this._maxx) \n this._maxx = other._maxx\n \n if (other._miny < this._miny) \n this._miny = other._miny\n \n if (other._maxy > this._maxy) \n this._maxy = other._maxy\n \n }\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (this.isNull()) {\n this._minx = x\n this._maxx = x\n this._miny = y\n this._maxy = y\n } else {\n if (x < this._minx) \n this._minx = x\n \n if (x > this._maxx) \n this._maxx = x\n \n if (y < this._miny) \n this._miny = y\n \n if (y > this._maxy) \n this._maxy = y\n \n }\n }\n }\n minExtent() {\n if (this.isNull()) return 0.0\n const w = this.getWidth()\n const h = this.getHeight()\n if (w < h) return w\n return h\n }\n getWidth() {\n if (this.isNull()) \n return 0\n \n return this._maxx - this._minx\n }\n compareTo(o) {\n const env = o\n if (this.isNull()) {\n if (env.isNull()) return 0\n return -1\n } else {\n if (env.isNull()) return 1\n }\n if (this._minx < env._minx) return -1\n if (this._minx > env._minx) return 1\n if (this._miny < env._miny) return -1\n if (this._miny > env._miny) return 1\n if (this._maxx < env._maxx) return -1\n if (this._maxx > env._maxx) return 1\n if (this._maxy < env._maxy) return -1\n if (this._maxy > env._maxy) return 1\n return 0\n }\n translate(transX, transY) {\n if (this.isNull()) \n return null\n \n this.init(this.getMinX() + transX, this.getMaxX() + transX, this.getMinY() + transY, this.getMaxY() + transY)\n }\n copy() {\n return new Envelope(this)\n }\n toString() {\n return 'Env[' + this._minx + ' : ' + this._maxx + ', ' + this._miny + ' : ' + this._maxy + ']'\n }\n setToNull() {\n this._minx = 0\n this._maxx = -1\n this._miny = 0\n this._maxy = -1\n }\n disjoint(other) {\n if (this.isNull() || other.isNull()) \n return true\n \n return other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny\n }\n getHeight() {\n if (this.isNull()) \n return 0\n \n return this._maxy - this._miny\n }\n maxExtent() {\n if (this.isNull()) return 0.0\n const w = this.getWidth()\n const h = this.getHeight()\n if (w > h) return w\n return h\n }\n expandBy() {\n if (arguments.length === 1) {\n const distance = arguments[0]\n this.expandBy(distance, distance)\n } else if (arguments.length === 2) {\n const deltaX = arguments[0], deltaY = arguments[1]\n if (this.isNull()) return null\n this._minx -= deltaX\n this._maxx += deltaX\n this._miny -= deltaY\n this._maxy += deltaY\n if (this._minx > this._maxx || this._miny > this._maxy) this.setToNull()\n }\n }\n contains() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Envelope) {\n const other = arguments[0]\n return this.covers(other)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return this.covers(p)\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n return this.covers(x, y)\n }\n }\n centre() {\n if (this.isNull()) return null\n return new Coordinate((this.getMinX() + this.getMaxX()) / 2.0, (this.getMinY() + this.getMaxY()) / 2.0)\n }\n init() {\n if (arguments.length === 0) {\n this.setToNull()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n this.init(p.x, p.x, p.y, p.y)\n } else if (arguments[0] instanceof Envelope) {\n const env = arguments[0]\n this._minx = env._minx\n this._maxx = env._maxx\n this._miny = env._miny\n this._maxy = env._maxy\n }\n } else if (arguments.length === 2) {\n const p1 = arguments[0], p2 = arguments[1]\n this.init(p1.x, p2.x, p1.y, p2.y)\n } else if (arguments.length === 4) {\n const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n if (x1 < x2) {\n this._minx = x1\n this._maxx = x2\n } else {\n this._minx = x2\n this._maxx = x1\n }\n if (y1 < y2) {\n this._miny = y1\n this._maxy = y2\n } else {\n this._miny = y2\n this._maxy = y1\n }\n }\n }\n getMaxY() {\n return this._maxy\n }\n distance(env) {\n if (this.intersects(env)) return 0\n let dx = 0.0\n if (this._maxx < env._minx) dx = env._minx - this._maxx; else if (this._minx > env._maxx) dx = this._minx - env._maxx\n let dy = 0.0\n if (this._maxy < env._miny) dy = env._miny - this._maxy; else if (this._miny > env._maxy) dy = this._miny - env._maxy\n if (dx === 0.0) return dy\n if (dy === 0.0) return dx\n return Math.sqrt(dx * dx + dy * dy)\n }\n hashCode() {\n let result = 17\n result = 37 * result + Coordinate.hashCode(this._minx)\n result = 37 * result + Coordinate.hashCode(this._maxx)\n result = 37 * result + Coordinate.hashCode(this._miny)\n result = 37 * result + Coordinate.hashCode(this._maxy)\n return result\n }\n get interfaces_() {\n return [Comparable, Serializable]\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Envelope from './Envelope.js'\nexport default class Geometry {\n constructor() {\n Geometry.constructor_.apply(this, arguments)\n }\n\n isGeometryCollection() {\n return this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION\n }\n\n getFactory() {\n return this._factory\n }\n\n getGeometryN(n) {\n return this\n }\n\n getArea() {\n return 0.0\n }\n\n isRectangle() {\n return false\n }\n\n equalsExact(other) {\n return this === other || this.equalsExact(other, 0)\n }\n\n geometryChanged() {\n this.apply(Geometry.geometryChangedFilter)\n }\n\n geometryChangedAction() {\n this._envelope = null\n }\n\n equalsNorm(g) {\n if (g === null) return false\n return this.norm().equalsExact(g.norm())\n }\n\n getLength() {\n return 0.0\n }\n\n getNumGeometries() {\n return 1\n }\n\n compareTo() {\n let other\n if (arguments.length === 1) {\n const o = arguments[0]\n other = o\n if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n if (this.isEmpty() && other.isEmpty()) return 0\n\n if (this.isEmpty()) return -1\n\n if (other.isEmpty()) return 1\n\n return this.compareToSameClass(o)\n } else if (arguments.length === 2) {\n const o = arguments[0]; const comp = arguments[1]\n other = o\n if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n if (this.isEmpty() && other.isEmpty()) return 0\n\n if (this.isEmpty()) return -1\n\n if (other.isEmpty()) return 1\n\n return this.compareToSameClass(o, comp)\n }\n }\n\n getUserData() {\n return this._userData\n }\n\n getSRID() {\n return this._SRID\n }\n\n getEnvelope() {\n return this.getFactory().toGeometry(this.getEnvelopeInternal())\n }\n\n checkNotGeometryCollection(g) {\n if (g.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n }\n\n equal(a, b, tolerance) {\n if (tolerance === 0) return a.equals(b)\n\n return a.distance(b) <= tolerance\n }\n\n norm() {\n const copy = this.copy()\n copy.normalize()\n return copy\n }\n\n reverse() {\n const res = this.reverseInternal()\n if (this.envelope != null) res.envelope = this.envelope.copy()\n\n res.setSRID(this.getSRID())\n return res\n }\n\n copy() {\n const copy = this.copyInternal()\n copy.envelope = this._envelope == null ? null : this._envelope.copy()\n copy._SRID = this._SRID\n copy._userData = this._userData\n return copy\n }\n\n getPrecisionModel() {\n return this._factory.getPrecisionModel()\n }\n\n getEnvelopeInternal() {\n if (this._envelope === null) this._envelope = this.computeEnvelopeInternal()\n\n return new Envelope(this._envelope)\n }\n\n setSRID(SRID) {\n this._SRID = SRID\n }\n\n setUserData(userData) {\n this._userData = userData\n }\n\n compare(a, b) {\n const i = a.iterator()\n const j = b.iterator()\n while (i.hasNext() && j.hasNext()) {\n const aElement = i.next()\n const bElement = j.next()\n const comparison = aElement.compareTo(bElement)\n if (comparison !== 0) return comparison\n }\n if (i.hasNext()) return 1\n\n if (j.hasNext()) return -1\n\n return 0\n }\n\n hashCode() {\n return this.getEnvelopeInternal().hashCode()\n }\n\n isEquivalentClass(other) {\n return this.getClass() === other.getClass()\n }\n\n isGeometryCollectionOrDerived() {\n if (this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION || this.getTypeCode() === Geometry.TYPECODE_MULTIPOINT || this.getTypeCode() === Geometry.TYPECODE_MULTILINESTRING || this.getTypeCode() === Geometry.TYPECODE_MULTIPOLYGON) return true\n\n return false\n }\n\n get interfaces_() {\n return [Cloneable, Comparable, Serializable]\n }\n\n getClass() {\n return Geometry\n }\n\n static hasNonEmptyElements(geometries) {\n for (let i = 0; i < geometries.length; i++)\n if (!geometries[i].isEmpty()) return true\n\n return false\n }\n\n static hasNullElements(array) {\n for (let i = 0; i < array.length; i++)\n if (array[i] === null) return true\n\n return false\n }\n}\nGeometry.constructor_ = function(factory) {\n if (!factory) return\n this._envelope = null\n this._userData = null\n this._factory = factory\n this._SRID = factory.getSRID()\n}\nGeometry.TYPECODE_POINT = 0\nGeometry.TYPECODE_MULTIPOINT = 1\nGeometry.TYPECODE_LINESTRING = 2\nGeometry.TYPECODE_LINEARRING = 3\nGeometry.TYPECODE_MULTILINESTRING = 4\nGeometry.TYPECODE_POLYGON = 5\nGeometry.TYPECODE_MULTIPOLYGON = 6\nGeometry.TYPECODE_GEOMETRYCOLLECTION = 7\nGeometry.TYPENAME_POINT = 'Point'\nGeometry.TYPENAME_MULTIPOINT = 'MultiPoint'\nGeometry.TYPENAME_LINESTRING = 'LineString'\nGeometry.TYPENAME_LINEARRING = 'LinearRing'\nGeometry.TYPENAME_MULTILINESTRING = 'MultiLineString'\nGeometry.TYPENAME_POLYGON = 'Polygon'\nGeometry.TYPENAME_MULTIPOLYGON = 'MultiPolygon'\nGeometry.TYPENAME_GEOMETRYCOLLECTION = 'GeometryCollection'\nGeometry.geometryChangedFilter = {\n get interfaces_() {\n return [GeometryComponentFilter]\n },\n filter(geom) {\n geom.geometryChangedAction()\n }\n}\n","export default class CoordinateFilter {\n filter(coord) {}\n}\n","export default function(o, i) {\n return o.interfaces_ && o.interfaces_.indexOf(i) > -1\n}\n","export default class Lineal {}\n","import Double from '../../../../java/lang/Double.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nexport default class CoordinateSequence {\n getM(index) {\n if (this.hasM()) {\n const mIndex = this.getDimension() - this.getMeasures()\n return this.getOrdinate(index, mIndex)\n } else {\n return Double.NaN\n }\n }\n setOrdinate(index, ordinateIndex, value) {}\n getZ(index) {\n if (this.hasZ()) \n return this.getOrdinate(index, 2)\n else \n return Double.NaN\n \n }\n size() {}\n getOrdinate(index, ordinateIndex) {}\n getCoordinate() {\n if (arguments.length === 1) {\n const i = arguments[0]\n } else if (arguments.length === 2) {\n const index = arguments[0], coord = arguments[1]\n }\n }\n getCoordinateCopy(i) {}\n createCoordinate() {}\n getDimension() {}\n hasM() {\n return this.getMeasures() > 0\n }\n getX(index) {}\n hasZ() {\n return this.getDimension() - this.getMeasures() > 2\n }\n getMeasures() {\n return 0\n }\n expandEnvelope(env) {}\n copy() {}\n getY(index) {}\n toCoordinateArray() {}\n get interfaces_() {\n return [Cloneable]\n }\n}\nCoordinateSequence.X = 0\nCoordinateSequence.Y = 1\nCoordinateSequence.Z = 2\nCoordinateSequence.M = 3\n","import hasInterface from '../../../../hasInterface.js'\nimport Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nexport default class CoordinateSequences {\n static copyCoord(src, srcPos, dest, destPos) {\n const minDim = Math.min(src.getDimension(), dest.getDimension())\n for (let dim = 0; dim < minDim; dim++) \n dest.setOrdinate(destPos, dim, src.getOrdinate(srcPos, dim))\n \n }\n static isRing(seq) {\n const n = seq.size()\n if (n === 0) return true\n if (n <= 3) return false\n return seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n }\n static scroll() {\n if (arguments.length === 2) {\n if (hasInterface(arguments[0], CoordinateSequence) && Number.isInteger(arguments[1])) {\n const seq = arguments[0], indexOfFirstCoordinate = arguments[1]\n CoordinateSequences.scroll(seq, indexOfFirstCoordinate, CoordinateSequences.isRing(seq))\n } else if (hasInterface(arguments[0], CoordinateSequence) && arguments[1] instanceof Coordinate) {\n const seq = arguments[0], firstCoordinate = arguments[1]\n const i = CoordinateSequences.indexOf(firstCoordinate, seq)\n if (i <= 0) return null\n CoordinateSequences.scroll(seq, i)\n }\n } else if (arguments.length === 3) {\n const seq = arguments[0], indexOfFirstCoordinate = arguments[1], ensureRing = arguments[2]\n const i = indexOfFirstCoordinate\n if (i <= 0) return null\n const copy = seq.copy()\n const last = ensureRing ? seq.size() - 1 : seq.size()\n for (let j = 0; j < last; j++) \n for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(j, k, copy.getOrdinate((indexOfFirstCoordinate + j) % last, k))\n \n if (ensureRing) \n for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(last, k, seq.getOrdinate(0, k))\n \n }\n }\n static isEqual(cs1, cs2) {\n const cs1Size = cs1.size()\n const cs2Size = cs2.size()\n if (cs1Size !== cs2Size) return false\n const dim = Math.min(cs1.getDimension(), cs2.getDimension())\n for (let i = 0; i < cs1Size; i++) \n for (let d = 0; d < dim; d++) {\n const v1 = cs1.getOrdinate(i, d)\n const v2 = cs2.getOrdinate(i, d)\n if (cs1.getOrdinate(i, d) === cs2.getOrdinate(i, d)) continue\n if (Double.isNaN(v1) && Double.isNaN(v2)) continue\n return false\n }\n \n return true\n }\n static minCoordinateIndex() {\n if (arguments.length === 1) {\n const seq = arguments[0]\n return CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 1)\n } else if (arguments.length === 3) {\n const seq = arguments[0], from = arguments[1], to = arguments[2]\n let minCoordIndex = -1\n let minCoord = null\n for (let i = from; i <= to; i++) {\n const testCoord = seq.getCoordinate(i)\n if (minCoord === null || minCoord.compareTo(testCoord) > 0) {\n minCoord = testCoord\n minCoordIndex = i\n }\n }\n return minCoordIndex\n }\n }\n static extend(fact, seq, size) {\n const newseq = fact.create(size, seq.getDimension())\n const n = seq.size()\n CoordinateSequences.copy(seq, 0, newseq, 0, n)\n if (n > 0) \n for (let i = n; i < size; i++) CoordinateSequences.copy(seq, n - 1, newseq, i, 1)\n \n return newseq\n }\n static reverse(seq) {\n const last = seq.size() - 1\n const mid = Math.trunc(last / 2)\n for (let i = 0; i <= mid; i++) \n CoordinateSequences.swap(seq, i, last - i)\n \n }\n static swap(seq, i, j) {\n if (i === j) return null\n for (let dim = 0; dim < seq.getDimension(); dim++) {\n const tmp = seq.getOrdinate(i, dim)\n seq.setOrdinate(i, dim, seq.getOrdinate(j, dim))\n seq.setOrdinate(j, dim, tmp)\n }\n }\n static copy(src, srcPos, dest, destPos, length) {\n for (let i = 0; i < length; i++) \n CoordinateSequences.copyCoord(src, srcPos + i, dest, destPos + i)\n \n }\n static ensureValidRing(fact, seq) {\n const n = seq.size()\n if (n === 0) return seq\n if (n <= 3) return CoordinateSequences.createClosedRing(fact, seq, 4)\n const isClosed = seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n if (isClosed) return seq\n return CoordinateSequences.createClosedRing(fact, seq, n + 1)\n }\n static indexOf(coordinate, seq) {\n for (let i = 0; i < seq.size(); i++) \n if (coordinate.x === seq.getOrdinate(i, CoordinateSequence.X) && coordinate.y === seq.getOrdinate(i, CoordinateSequence.Y)) \n return i\n \n \n return -1\n }\n static createClosedRing(fact, seq, size) {\n const newseq = fact.create(size, seq.getDimension())\n const n = seq.size()\n CoordinateSequences.copy(seq, 0, newseq, 0, n)\n for (let i = n; i < size; i++) CoordinateSequences.copy(seq, 0, newseq, i, 1)\n return newseq\n }\n static minCoordinate(seq) {\n let minCoord = null\n for (let i = 0; i < seq.size(); i++) {\n const testCoord = seq.getCoordinate(i)\n if (minCoord === null || minCoord.compareTo(testCoord) > 0) \n minCoord = testCoord\n \n }\n return minCoord\n }\n}\n","import Exception from './Exception.js'\n\nexport default class UnsupportedOperationException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ UnsupportedOperationException })[0]\n }\n}\n","export default class Character {\n static isWhitespace(c) {\n return ((c <= 32 && c >= 0) || c === 127)\n }\n\n static toUpperCase(c) {\n return c.toUpperCase()\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Character from '../../../../java/lang/Character.js'\nexport default class Dimension {\n static toDimensionSymbol(dimensionValue) {\n switch (dimensionValue) {\n case Dimension.FALSE:\n return Dimension.SYM_FALSE\n case Dimension.TRUE:\n return Dimension.SYM_TRUE\n case Dimension.DONTCARE:\n return Dimension.SYM_DONTCARE\n case Dimension.P:\n return Dimension.SYM_P\n case Dimension.L:\n return Dimension.SYM_L\n case Dimension.A:\n return Dimension.SYM_A\n }\n throw new IllegalArgumentException('Unknown dimension value: ' + dimensionValue)\n }\n static toDimensionValue(dimensionSymbol) {\n switch (Character.toUpperCase(dimensionSymbol)) {\n case Dimension.SYM_FALSE:\n return Dimension.FALSE\n case Dimension.SYM_TRUE:\n return Dimension.TRUE\n case Dimension.SYM_DONTCARE:\n return Dimension.DONTCARE\n case Dimension.SYM_P:\n return Dimension.P\n case Dimension.SYM_L:\n return Dimension.L\n case Dimension.SYM_A:\n return Dimension.A\n }\n throw new IllegalArgumentException('Unknown dimension symbol: ' + dimensionSymbol)\n }\n}\nDimension.P = 0\nDimension.L = 1\nDimension.A = 2\nDimension.FALSE = -1\nDimension.TRUE = -2\nDimension.DONTCARE = -3\nDimension.SYM_FALSE = 'F'\nDimension.SYM_TRUE = 'T'\nDimension.SYM_DONTCARE = '*'\nDimension.SYM_P = '0'\nDimension.SYM_L = '1'\nDimension.SYM_A = '2'\n","export default class GeometryFilter {\n filter(geom) {}\n}\n","export default class CoordinateSequenceFilter {\n filter(seq, i) {}\n isDone() {}\n isGeometryChanged() {}\n}\n","import Geometry from './Geometry.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Length from '../algorithm/Length.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Lineal from './Lineal.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport Dimension from './Dimension.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Envelope from './Envelope.js'\nexport default class LineString extends Geometry {\n constructor() {\n super()\n LineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._points = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n const points = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n this.init(points)\n }\n }\n computeEnvelopeInternal() {\n if (this.isEmpty()) \n return new Envelope()\n \n return this._points.expandEnvelope(new Envelope())\n }\n isRing() {\n return this.isClosed() && this.isSimple()\n }\n getCoordinates() {\n return this._points.toCoordinateArray()\n }\n copyInternal() {\n return new LineString(this._points.copy(), this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherLineString = other\n if (this._points.size() !== otherLineString._points.size()) \n return false\n \n for (let i = 0; i < this._points.size(); i++) \n if (!this.equal(this._points.getCoordinate(i), otherLineString._points.getCoordinate(i), tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n for (let i = 0; i < Math.trunc(this._points.size() / 2); i++) {\n const j = this._points.size() - 1 - i\n if (!this._points.getCoordinate(i).equals(this._points.getCoordinate(j))) {\n if (this._points.getCoordinate(i).compareTo(this._points.getCoordinate(j)) > 0) {\n const copy = this._points.copy()\n CoordinateSequences.reverse(copy)\n this._points = copy\n }\n return null\n }\n }\n }\n getCoordinate() {\n if (this.isEmpty()) return null\n return this._points.getCoordinate(0)\n }\n getBoundaryDimension() {\n if (this.isClosed()) \n return Dimension.FALSE\n \n return 0\n }\n isClosed() {\n if (this.isEmpty()) \n return false\n \n return this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints() - 1))\n }\n reverseInternal() {\n const seq = this._points.copy()\n CoordinateSequences.reverse(seq)\n return this.getFactory().createLineString(seq)\n }\n getEndPoint() {\n if (this.isEmpty()) \n return null\n \n return this.getPointN(this.getNumPoints() - 1)\n }\n getTypeCode() {\n return Geometry.TYPECODE_LINESTRING\n }\n getDimension() {\n return 1\n }\n getLength() {\n return Length.ofLine(this._points)\n }\n getNumPoints() {\n return this._points.size()\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const line = o\n let i = 0\n let j = 0\n while (i < this._points.size() && j < line._points.size()) {\n const comparison = this._points.getCoordinate(i).compareTo(line._points.getCoordinate(j))\n if (comparison !== 0) \n return comparison\n \n i++\n j++\n }\n if (i < this._points.size()) \n return 1\n \n if (j < line._points.size()) \n return -1\n \n return 0\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const line = o\n return comp.compare(this._points, line._points)\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n for (let i = 0; i < this._points.size(); i++) \n filter.filter(this._points.getCoordinate(i))\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this._points.size() === 0) return null\n for (let i = 0; i < this._points.size(); i++) {\n filter.filter(this._points, i)\n if (filter.isDone()) break\n }\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n }\n }\n getBoundary() {\n throw new UnsupportedOperationException()\n }\n isEquivalentClass(other) {\n return other instanceof LineString\n }\n getCoordinateN(n) {\n return this._points.getCoordinate(n)\n }\n getGeometryType() {\n return Geometry.TYPENAME_LINESTRING\n }\n getCoordinateSequence() {\n return this._points\n }\n isEmpty() {\n return this._points.size() === 0\n }\n init(points) {\n if (points === null) \n points = this.getFactory().getCoordinateSequenceFactory().create([])\n \n if (points.size() === 1) \n throw new IllegalArgumentException('Invalid number of points in LineString (found ' + points.size() + ' - must be 0 or >= 2)')\n \n this._points = points\n }\n isCoordinate(pt) {\n for (let i = 0; i < this._points.size(); i++) \n if (this._points.getCoordinate(i).equals(pt)) \n return true\n \n \n return false\n }\n getStartPoint() {\n if (this.isEmpty()) \n return null\n \n return this.getPointN(0)\n }\n getPointN(n) {\n return this.getFactory().createPoint(this._points.getCoordinate(n))\n }\n get interfaces_() {\n return [Lineal]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nexport default class Length {\n static ofLine(pts) {\n const n = pts.size()\n if (n <= 1) return 0.0\n let len = 0.0\n const p = new Coordinate()\n pts.getCoordinate(0, p)\n let x0 = p.x\n let y0 = p.y\n for (let i = 1; i < n; i++) {\n pts.getCoordinate(i, p)\n const x1 = p.x\n const y1 = p.y\n const dx = x1 - x0\n const dy = y1 - y0\n len += Math.sqrt(dx * dx + dy * dy)\n x0 = x1\n y0 = y1\n }\n return len\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Collection.html\n */\nexport default class Collection {\n /**\n * Ensures that this collection contains the specified element (optional\n * operation).\n * @param {Object} e\n * @return {boolean}\n */\n add() { }\n /**\n * Appends all of the elements in the specified collection to the end of this\n * list, in the order that they are returned by the specified collection's\n * iterator (optional operation).\n * @param {javascript.util.Collection} c\n * @return {boolean}\n */\n addAll() { }\n /**\n * Returns true if this collection contains no elements.\n * @return {boolean}\n */\n isEmpty() { }\n /**\n * Returns an iterator over the elements in this collection.\n * @return {javascript.util.Iterator}\n */\n iterator() { }\n /**\n * Returns an iterator over the elements in this collection.\n * @return {number}\n */\n size() { }\n /**\n * Returns an array containing all of the elements in this collection.\n * @return {Array}\n */\n toArray() { }\n /**\n * Removes a single instance of the specified element from this collection if it\n * is present. (optional)\n * @param {Object} e\n * @return {boolean}\n */\n remove() { }\n}\n","import Exception from './Exception.js'\n\nexport default class IndexOutOfBoundsException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ IndexOutOfBoundsException })[0]\n } \n}","import Collection from './Collection.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/List.html\n */\nexport default class List extends Collection {\n /**\n * Returns the element at the specified position in this list.\n * @param {number} index\n * @return {Object}\n */\n get() { }\n /**\n * Replaces the element at the specified position in this list with the\n * specified element (optional operation).\n * @param {number} index\n * @param {Object} e\n * @return {Object}\n */\n set() { }\n /**\n * Returns true if this collection contains no elements.\n * @return {boolean}\n */\n isEmpty() { }\n}\n","import Exception from '../lang/Exception.js'\n\nexport default class NoSuchElementException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ NoSuchElementException })[0]\n }\n}","import Collection from './Collection.js'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException.js'\nimport List from './List.js'\nimport NoSuchElementException from './NoSuchElementException.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html\n */\nexport default class ArrayList extends List {\n\n constructor(o) {\n super()\n this.array = []\n if (o instanceof Collection) this.addAll(o)\n }\n\n get interfaces_() {\n return [List, Collection]\n }\n\n ensureCapacity() { }\n\n add(e) {\n if (arguments.length === 1)\n this.array.push(e)\n else\n this.array.splice(arguments[0], 0, arguments[1])\n return true\n }\n\n clear() {\n this.array = []\n }\n\n addAll(c) {\n for (const e of c)\n this.array.push(e)\n }\n\n set(index, element) {\n const oldElement = this.array[index]\n this.array[index] = element\n return oldElement\n }\n\n iterator() {\n return new Iterator(this)\n }\n\n get(index) {\n if (index < 0 || index >= this.size())\n throw new IndexOutOfBoundsException()\n return this.array[index]\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n\n sort(comparator) {\n if (comparator)\n this.array.sort((a, b) => comparator.compare(a, b))\n else this.array.sort()\n }\n\n size() {\n return this.array.length\n }\n\n toArray() {\n return this.array.slice()\n }\n\n remove(o) {\n for (let i = 0, len = this.array.length; i < len; i++)\n if (this.array[i] === o)\n return !!this.array.splice(i, 1)\n return false\n }\n\n [Symbol.iterator]() {\n return this.array.values()\n }\n}\n\nclass Iterator {\n constructor(arrayList) {\n this.arrayList = arrayList\n this.position = 0\n }\n\n next() {\n if (this.position === this.arrayList.size())\n throw new NoSuchElementException()\n return this.arrayList.get(this.position++)\n }\n\n hasNext() {\n return this.position < this.arrayList.size()\n }\n\n set(element) {\n return this.arrayList.set(this.position - 1, element)\n }\n\n remove() {\n this.arrayList.remove(this.arrayList.get(this.position))\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Collection from '../../../../java/util/Collection.js'\nimport Coordinate from './Coordinate.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class CoordinateList extends ArrayList {\n constructor() {\n super()\n CoordinateList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const coord = arguments[0]\n this.ensureCapacity(coord.length)\n this.add(coord, true)\n } else if (arguments.length === 2) {\n const coord = arguments[0], allowRepeated = arguments[1]\n this.ensureCapacity(coord.length)\n this.add(coord, allowRepeated)\n }\n }\n getCoordinate(i) {\n return this.get(i)\n }\n addAll() {\n if (arguments.length === 2 && (typeof arguments[1] === 'boolean' && hasInterface(arguments[0], Collection))) {\n const coll = arguments[0], allowRepeated = arguments[1]\n let isChanged = false\n for (let i = coll.iterator(); i.hasNext(); ) {\n this.add(i.next(), allowRepeated)\n isChanged = true\n }\n return isChanged\n } else {\n return super.addAll.apply(this, arguments)\n }\n }\n clone() {\n const clone = super.clone.call(this)\n for (let i = 0; i < this.size(); i++) \n clone.add(i, this.get(i).clone())\n \n return clone\n }\n toCoordinateArray() {\n if (arguments.length === 0) {\n return this.toArray(CoordinateList.coordArrayType)\n } else if (arguments.length === 1) {\n const isForward = arguments[0]\n if (isForward) \n return this.toArray(CoordinateList.coordArrayType)\n \n const size = this.size()\n const pts = new Array(size).fill(null)\n for (let i = 0; i < size; i++) \n pts[i] = this.get(size - i - 1)\n \n return pts\n }\n }\n add() {\n if (arguments.length === 1) {\n const coord = arguments[0]\n return super.add.call(this, coord)\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Array && typeof arguments[1] === 'boolean') {\n const coord = arguments[0], allowRepeated = arguments[1]\n this.add(coord, allowRepeated, true)\n return true\n } else if (arguments[0] instanceof Coordinate && typeof arguments[1] === 'boolean') {\n const coord = arguments[0], allowRepeated = arguments[1]\n if (!allowRepeated) \n if (this.size() >= 1) {\n const last = this.get(this.size() - 1)\n if (last.equals2D(coord)) return null\n }\n \n super.add.call(this, coord)\n } else if (arguments[0] instanceof Object && typeof arguments[1] === 'boolean') {\n const obj = arguments[0], allowRepeated = arguments[1]\n this.add(obj, allowRepeated)\n return true\n }\n } else if (arguments.length === 3) {\n if (typeof arguments[2] === 'boolean' && (arguments[0] instanceof Array && typeof arguments[1] === 'boolean')) {\n const coord = arguments[0], allowRepeated = arguments[1], direction = arguments[2]\n if (direction) \n for (let i = 0; i < coord.length; i++) \n this.add(coord[i], allowRepeated)\n \n else \n for (let i = coord.length - 1; i >= 0; i--) \n this.add(coord[i], allowRepeated)\n \n \n return true\n } else if (typeof arguments[2] === 'boolean' && (Number.isInteger(arguments[0]) && arguments[1] instanceof Coordinate)) {\n const i = arguments[0], coord = arguments[1], allowRepeated = arguments[2]\n if (!allowRepeated) {\n const size = this.size()\n if (size > 0) {\n if (i > 0) {\n const prev = this.get(i - 1)\n if (prev.equals2D(coord)) return null\n }\n if (i < size) {\n const next = this.get(i)\n if (next.equals2D(coord)) return null\n }\n }\n }\n super.add.call(this, i, coord)\n }\n } else if (arguments.length === 4) {\n const coord = arguments[0], allowRepeated = arguments[1], start = arguments[2], end = arguments[3]\n let inc = 1\n if (start > end) inc = -1\n for (let i = start; i !== end; i += inc) \n this.add(coord[i], allowRepeated)\n \n return true\n }\n }\n closeRing() {\n if (this.size() > 0) {\n const duplicate = this.get(0).copy()\n this.add(duplicate, false)\n }\n }\n}\nCoordinateList.coordArrayType = new Array(0).fill(null)\n","import hasInterface from '../../../../hasInterface.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nexport default class CoordinateSequenceFactory {\n create() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n }\n } else if (arguments.length === 2) {\n const size = arguments[0], dimension = arguments[1]\n } else if (arguments.length === 3) {\n const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n return this.create(size, dimension)\n }\n }\n}\n","export default class Puntal {}\n","import Geometry from './Geometry.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Dimension from './Dimension.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Puntal from './Puntal.js'\nimport Envelope from './Envelope.js'\nimport Assert from '../util/Assert.js'\nexport default class Point extends Geometry {\n constructor() {\n super()\n Point.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._coordinates = null\n const coordinates = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n this.init(coordinates)\n }\n computeEnvelopeInternal() {\n if (this.isEmpty()) \n return new Envelope()\n \n const env = new Envelope()\n env.expandToInclude(this._coordinates.getX(0), this._coordinates.getY(0))\n return env\n }\n getCoordinates() {\n return this.isEmpty() ? [] : [this.getCoordinate()]\n }\n copyInternal() {\n return new Point(this._coordinates.copy(), this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n if (this.isEmpty() && other.isEmpty()) \n return true\n \n if (this.isEmpty() !== other.isEmpty()) \n return false\n \n return this.equal(other.getCoordinate(), this.getCoordinate(), tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {}\n getCoordinate() {\n return this._coordinates.size() !== 0 ? this._coordinates.getCoordinate(0) : null\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n reverseInternal() {\n return this.getFactory().createPoint(this._coordinates.copy())\n }\n getTypeCode() {\n return Geometry.TYPECODE_POINT\n }\n getDimension() {\n return 0\n }\n getNumPoints() {\n return this.isEmpty() ? 0 : 1\n }\n getX() {\n if (this.getCoordinate() === null) \n throw new IllegalStateException('getX called on empty Point')\n \n return this.getCoordinate().x\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const other = arguments[0]\n const point = other\n return this.getCoordinate().compareTo(point.getCoordinate())\n } else if (arguments.length === 2) {\n const other = arguments[0], comp = arguments[1]\n const point = other\n return comp.compare(this._coordinates, point._coordinates)\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n if (this.isEmpty()) \n return null\n \n filter.filter(this.getCoordinate())\n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this.isEmpty()) return null\n filter.filter(this._coordinates, 0)\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n }\n }\n getBoundary() {\n return this.getFactory().createGeometryCollection()\n }\n getGeometryType() {\n return Geometry.TYPENAME_POINT\n }\n getCoordinateSequence() {\n return this._coordinates\n }\n getY() {\n if (this.getCoordinate() === null) \n throw new IllegalStateException('getY called on empty Point')\n \n return this.getCoordinate().y\n }\n isEmpty() {\n return this._coordinates.size() === 0\n }\n init(coordinates) {\n if (coordinates === null) \n coordinates = this.getFactory().getCoordinateSequenceFactory().create([])\n \n Assert.isTrue(coordinates.size() <= 1)\n this._coordinates = coordinates\n }\n isSimple() {\n return true\n }\n get interfaces_() {\n return [Puntal]\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class Area {\n static ofRing() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n return Math.abs(Area.ofRingSigned(ring))\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n return Math.abs(Area.ofRingSigned(ring))\n }\n }\n static ofRingSigned() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n if (ring.length < 3) return 0.0\n let sum = 0.0\n const x0 = ring[0].x\n for (let i = 1; i < ring.length - 1; i++) {\n const x = ring[i].x - x0\n const y1 = ring[i + 1].y\n const y2 = ring[i - 1].y\n sum += x * (y2 - y1)\n }\n return sum / 2.0\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n const n = ring.size()\n if (n < 3) return 0.0\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n const p2 = new Coordinate()\n ring.getCoordinate(0, p1)\n ring.getCoordinate(1, p2)\n const x0 = p1.x\n p2.x -= x0\n let sum = 0.0\n for (let i = 1; i < n - 1; i++) {\n p0.y = p1.y\n p1.x = p2.x\n p1.y = p2.y\n ring.getCoordinate(i + 1, p2)\n p2.x -= x0\n sum += p1.x * (p0.y - p2.y)\n }\n return sum / 2.0\n }\n }\n}\n","import ArrayList from './ArrayList.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html\n */\nexport default class Arrays {\n static sort() {\n const a = arguments[0]\n if (arguments.length === 1) {\n a.sort((a, b) => a.compareTo(b))\n } else if (arguments.length === 2) {\n a.sort((a, b) => arguments[1].compare(a, b))\n } else if (arguments.length === 3) {\n const t = a.slice(arguments[1], arguments[2])\n t.sort()\n const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n a.splice(0, a.length)\n for (const e of r)\n a.push(e)\n } else if (arguments.length === 4) {\n const t = a.slice(arguments[1], arguments[2])\n t.sort((a, b) => arguments[3].compare(a, b))\n const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n a.splice(0, a.length)\n for (const e of r)\n a.push(e)\n }\n }\n\n /**\n * @param {Array} array\n * @return {ArrayList}\n */\n static asList(array) {\n const arrayList = new ArrayList()\n for (const e of array)\n arrayList.add(e)\n return arrayList\n }\n\n static copyOf(original, newLength) {\n return original.slice(0, newLength)\n }\n}\n","export default class StringBuffer {\n constructor(str) {\n this.str = str\n }\n append(e) {\n this.str += e\n }\n setCharAt(i, c) {\n this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n }\n toString() {\n return this.str\n }\n}","export default class Integer {\n constructor(value) {\n this.value = value\n }\n\n intValue() {\n return this.value\n }\n\n compareTo(o) {\n if (this.value < o)\n return -1\n if (this.value > o)\n return 1\n return 0\n }\n\n static compare(x, y) {\n if (x < y)\n return -1\n if (x > y)\n return 1\n return 0\n }\n\n static isNan(n) {\n return Number.isNaN(n)\n }\n\n static valueOf(value) {\n return new Integer(value)\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport Character from '../../../../java/lang/Character.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class DD {\n constructor() {\n DD.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hi = 0.0\n this._lo = 0.0\n if (arguments.length === 0) {\n this.init(0.0)\n } else if (arguments.length === 1) {\n if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n this.init(x)\n } else if (arguments[0] instanceof DD) {\n const dd = arguments[0]\n this.init(dd)\n } else if (typeof arguments[0] === 'string') {\n const str = arguments[0]\n DD.constructor_.call(this, DD.parse(str))\n }\n } else if (arguments.length === 2) {\n const hi = arguments[0], lo = arguments[1]\n this.init(hi, lo)\n }\n }\n static determinant() {\n if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n return DD.determinant(DD.valueOf(x1), DD.valueOf(y1), DD.valueOf(x2), DD.valueOf(y2))\n } else if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det\n }\n }\n static sqr(x) {\n return DD.valueOf(x).selfMultiply(x)\n }\n static valueOf() {\n if (typeof arguments[0] === 'string') {\n const str = arguments[0]\n return DD.parse(str)\n } else if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n return new DD(x)\n }\n }\n static sqrt(x) {\n return DD.valueOf(x).sqrt()\n }\n static parse(str) {\n let i = 0\n const strlen = str.length\n while (Character.isWhitespace(str.charAt(i))) i++\n let isNegative = false\n if (i < strlen) {\n const signCh = str.charAt(i)\n if (signCh === '-' || signCh === '+') {\n i++\n if (signCh === '-') isNegative = true\n }\n }\n const val = new DD()\n let numDigits = 0\n let numBeforeDec = 0\n let exp = 0\n let hasDecimalChar = false\n while (true) {\n if (i >= strlen) break\n const ch = str.charAt(i)\n i++\n if (Character.isDigit(ch)) {\n const d = ch - '0'\n val.selfMultiply(DD.TEN)\n val.selfAdd(d)\n numDigits++\n continue\n }\n if (ch === '.') {\n numBeforeDec = numDigits\n hasDecimalChar = true\n continue\n }\n if (ch === 'e' || ch === 'E') {\n const expStr = str.substring(i)\n try {\n exp = Integer.parseInt(expStr)\n } catch (ex) {\n if (ex instanceof NumberFormatException) \n throw new NumberFormatException('Invalid exponent ' + expStr + ' in string ' + str)\n else throw ex\n } finally {}\n break\n }\n throw new NumberFormatException('Unexpected character \\'' + ch + '\\' at position ' + i + ' in string ' + str)\n }\n let val2 = val\n if (!hasDecimalChar) numBeforeDec = numDigits\n const numDecPlaces = numDigits - numBeforeDec - exp\n if (numDecPlaces === 0) {\n val2 = val\n } else if (numDecPlaces > 0) {\n const scale = DD.TEN.pow(numDecPlaces)\n val2 = val.divide(scale)\n } else if (numDecPlaces < 0) {\n const scale = DD.TEN.pow(-numDecPlaces)\n val2 = val.multiply(scale)\n }\n if (isNegative) \n return val2.negate()\n \n return val2\n }\n static createNaN() {\n return new DD(Double.NaN, Double.NaN)\n }\n static copy(dd) {\n return new DD(dd)\n }\n static magnitude(x) {\n const xAbs = Math.abs(x)\n const xLog10 = Math.log(xAbs) / Math.log(10)\n let xMag = Math.trunc(Math.floor(xLog10))\n const xApprox = Math.pow(10, xMag)\n if (xApprox * 10 <= xAbs) xMag += 1\n return xMag\n }\n static stringOfChar(ch, len) {\n const buf = new StringBuffer()\n for (let i = 0; i < len; i++) \n buf.append(ch)\n \n return buf.toString()\n }\n le(y) {\n return this._hi < y._hi || this._hi === y._hi && this._lo <= y._lo\n }\n extractSignificantDigits(insertDecimalPoint, magnitude) {\n let y = this.abs()\n let mag = DD.magnitude(y._hi)\n const scale = DD.TEN.pow(mag)\n y = y.divide(scale)\n if (y.gt(DD.TEN)) {\n y = y.divide(DD.TEN)\n mag += 1\n } else if (y.lt(DD.ONE)) {\n y = y.multiply(DD.TEN)\n mag -= 1\n }\n const decimalPointPos = mag + 1\n const buf = new StringBuffer()\n const numDigits = DD.MAX_PRINT_DIGITS - 1\n for (let i = 0; i <= numDigits; i++) {\n if (insertDecimalPoint && i === decimalPointPos) \n buf.append('.')\n \n const digit = Math.trunc(y._hi)\n if (digit < 0 || digit > 9) {}\n if (digit < 0) \n break\n \n let rebiasBy10 = false\n let digitChar = 0\n if (digit > 9) {\n rebiasBy10 = true\n digitChar = '9'\n } else {\n digitChar = '0' + digit\n }\n buf.append(digitChar)\n y = y.subtract(DD.valueOf(digit)).multiply(DD.TEN)\n if (rebiasBy10) y.selfAdd(DD.TEN)\n let continueExtractingDigits = true\n const remMag = DD.magnitude(y._hi)\n if (remMag < 0 && Math.abs(remMag) >= numDigits - i) continueExtractingDigits = false\n if (!continueExtractingDigits) break\n }\n magnitude[0] = mag\n return buf.toString()\n }\n sqr() {\n return this.multiply(this)\n }\n doubleValue() {\n return this._hi + this._lo\n }\n subtract() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.add(y.negate())\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.add(-y)\n }\n }\n equals() {\n if (arguments.length === 1 && arguments[0] instanceof DD) {\n const y = arguments[0]\n return this._hi === y._hi && this._lo === y._lo\n }\n }\n isZero() {\n return this._hi === 0.0 && this._lo === 0.0\n }\n selfSubtract() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n if (this.isNaN()) return this\n return this.selfAdd(-y._hi, -y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (this.isNaN()) return this\n return this.selfAdd(-y, 0.0)\n }\n }\n getSpecialNumberString() {\n if (this.isZero()) return '0.0'\n if (this.isNaN()) return 'NaN '\n return null\n }\n min(x) {\n if (this.le(x)) \n return this\n else \n return x\n \n }\n selfDivide() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfDivide(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.selfDivide(y, 0.0)\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = this._hi / yhi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * yhi\n hc = c - hc\n tc = C - hc\n hy = u - yhi\n U = C * yhi\n hy = u - hy\n ty = yhi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (this._hi - U - u + this._lo - C * ylo) / yhi\n u = C + c\n this._hi = u\n this._lo = C - u + c\n return this\n }\n }\n dump() {\n return 'DD<' + this._hi + ', ' + this._lo + '>'\n }\n divide() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = this._hi / y._hi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * y._hi\n hc = c - hc\n tc = C - hc\n hy = u - y._hi\n U = C * y._hi\n hy = u - hy\n ty = y._hi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (this._hi - U - u + this._lo - C * y._lo) / y._hi\n u = C + c\n const zhi = u\n const zlo = C - u + c\n return new DD(zhi, zlo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (Double.isNaN(y)) return DD.createNaN()\n return DD.copy(this).selfDivide(y, 0.0)\n }\n }\n ge(y) {\n return this._hi > y._hi || this._hi === y._hi && this._lo >= y._lo\n }\n pow(exp) {\n if (exp === 0.0) return DD.valueOf(1.0)\n let r = new DD(this)\n let s = DD.valueOf(1.0)\n let n = Math.abs(exp)\n if (n > 1) \n while (n > 0) {\n if (n % 2 === 1) \n s.selfMultiply(r)\n \n n /= 2\n if (n > 0) r = r.sqr()\n }\n else \n s = r\n \n if (exp < 0) return s.reciprocal()\n return s\n }\n ceil() {\n if (this.isNaN()) return DD.NaN\n const fhi = Math.ceil(this._hi)\n let flo = 0.0\n if (fhi === this._hi) \n flo = Math.ceil(this._lo)\n \n return new DD(fhi, flo)\n }\n compareTo(o) {\n const other = o\n if (this._hi < other._hi) return -1\n if (this._hi > other._hi) return 1\n if (this._lo < other._lo) return -1\n if (this._lo > other._lo) return 1\n return 0\n }\n rint() {\n if (this.isNaN()) return this\n const plus5 = this.add(0.5)\n return plus5.floor()\n }\n setValue() {\n if (arguments[0] instanceof DD) {\n const value = arguments[0]\n this.init(value)\n return this\n } else if (typeof arguments[0] === 'number') {\n const value = arguments[0]\n this.init(value)\n return this\n }\n }\n max(x) {\n if (this.ge(x)) \n return this\n else \n return x\n \n }\n sqrt() {\n if (this.isZero()) return DD.valueOf(0.0)\n if (this.isNegative()) \n return DD.NaN\n \n const x = 1.0 / Math.sqrt(this._hi)\n const ax = this._hi * x\n const axdd = DD.valueOf(ax)\n const diffSq = this.subtract(axdd.sqr())\n const d2 = diffSq._hi * (x * 0.5)\n return axdd.add(d2)\n }\n selfAdd() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfAdd(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n let H = null, h = null, S = null, s = null, e = null, f = null\n S = this._hi + y\n e = S - this._hi\n s = S - e\n s = y - e + (this._hi - s)\n f = s + this._lo\n H = S + f\n h = f + (S - H)\n this._hi = H + h\n this._lo = h + (H - this._hi)\n return this\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let H = null, h = null, T = null, t = null, S = null, s = null, e = null, f = null\n S = this._hi + yhi\n T = this._lo + ylo\n e = S - this._hi\n f = T - this._lo\n s = S - e\n t = T - f\n s = yhi - e + (this._hi - s)\n t = ylo - f + (this._lo - t)\n e = s + T\n H = S + e\n h = e + (S - H)\n e = t + h\n const zhi = H + e\n const zlo = e + (H - zhi)\n this._hi = zhi\n this._lo = zlo\n return this\n }\n }\n selfMultiply() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return this.selfMultiply(y._hi, y._lo)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return this.selfMultiply(y, 0.0)\n }\n } else if (arguments.length === 2) {\n const yhi = arguments[0], ylo = arguments[1]\n let hx = null, tx = null, hy = null, ty = null, C = null, c = null\n C = DD.SPLIT * this._hi\n hx = C - this._hi\n c = DD.SPLIT * yhi\n hx = C - hx\n tx = this._hi - hx\n hy = c - yhi\n C = this._hi * yhi\n hy = c - hy\n ty = yhi - hy\n c = hx * hy - C + hx * ty + tx * hy + tx * ty + (this._hi * ylo + this._lo * yhi)\n const zhi = C + c\n hx = C - zhi\n const zlo = c + hx\n this._hi = zhi\n this._lo = zlo\n return this\n }\n }\n selfSqr() {\n return this.selfMultiply(this)\n }\n floor() {\n if (this.isNaN()) return DD.NaN\n const fhi = Math.floor(this._hi)\n let flo = 0.0\n if (fhi === this._hi) \n flo = Math.floor(this._lo)\n \n return new DD(fhi, flo)\n }\n negate() {\n if (this.isNaN()) return this\n return new DD(-this._hi, -this._lo)\n }\n clone() {\n try {\n return null\n } catch (ex) {\n if (ex instanceof CloneNotSupportedException) \n return null\n else throw ex\n } finally {}\n }\n multiply() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n if (y.isNaN()) return DD.createNaN()\n return DD.copy(this).selfMultiply(y)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n if (Double.isNaN(y)) return DD.createNaN()\n return DD.copy(this).selfMultiply(y, 0.0)\n }\n }\n isNaN() {\n return Double.isNaN(this._hi)\n }\n intValue() {\n return Math.trunc(this._hi)\n }\n toString() {\n const mag = DD.magnitude(this._hi)\n if (mag >= -3 && mag <= 20) return this.toStandardNotation()\n return this.toSciNotation()\n }\n toStandardNotation() {\n const specialStr = this.getSpecialNumberString()\n if (specialStr !== null) return specialStr\n const magnitude = new Array(1).fill(null)\n const sigDigits = this.extractSignificantDigits(true, magnitude)\n const decimalPointPos = magnitude[0] + 1\n let num = sigDigits\n if (sigDigits.charAt(0) === '.') {\n num = '0' + sigDigits\n } else if (decimalPointPos < 0) {\n num = '0.' + DD.stringOfChar('0', -decimalPointPos) + sigDigits\n } else if (sigDigits.indexOf('.') === -1) {\n const numZeroes = decimalPointPos - sigDigits.length\n const zeroes = DD.stringOfChar('0', numZeroes)\n num = sigDigits + zeroes + '.0'\n }\n if (this.isNegative()) return '-' + num\n return num\n }\n reciprocal() {\n let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n C = 1.0 / this._hi\n c = DD.SPLIT * C\n hc = c - C\n u = DD.SPLIT * this._hi\n hc = c - hc\n tc = C - hc\n hy = u - this._hi\n U = C * this._hi\n hy = u - hy\n ty = this._hi - hy\n u = hc * hy - U + hc * ty + tc * hy + tc * ty\n c = (1.0 - U - u - C * this._lo) / this._hi\n const zhi = C + c\n const zlo = C - zhi + c\n return new DD(zhi, zlo)\n }\n toSciNotation() {\n if (this.isZero()) return DD.SCI_NOT_ZERO\n const specialStr = this.getSpecialNumberString()\n if (specialStr !== null) return specialStr\n const magnitude = new Array(1).fill(null)\n const digits = this.extractSignificantDigits(false, magnitude)\n const expStr = DD.SCI_NOT_EXPONENT_CHAR + magnitude[0]\n if (digits.charAt(0) === '0') \n throw new IllegalStateException('Found leading zero: ' + digits)\n \n let trailingDigits = ''\n if (digits.length > 1) trailingDigits = digits.substring(1)\n const digitsWithDecimal = digits.charAt(0) + '.' + trailingDigits\n if (this.isNegative()) return '-' + digitsWithDecimal + expStr\n return digitsWithDecimal + expStr\n }\n abs() {\n if (this.isNaN()) return DD.NaN\n if (this.isNegative()) return this.negate()\n return new DD(this)\n }\n isPositive() {\n return this._hi > 0.0 || this._hi === 0.0 && this._lo > 0.0\n }\n lt(y) {\n return this._hi < y._hi || this._hi === y._hi && this._lo < y._lo\n }\n add() {\n if (arguments[0] instanceof DD) {\n const y = arguments[0]\n return DD.copy(this).selfAdd(y)\n } else if (typeof arguments[0] === 'number') {\n const y = arguments[0]\n return DD.copy(this).selfAdd(y)\n }\n }\n init() {\n if (arguments.length === 1) {\n if (typeof arguments[0] === 'number') {\n const x = arguments[0]\n this._hi = x\n this._lo = 0.0\n } else if (arguments[0] instanceof DD) {\n const dd = arguments[0]\n this._hi = dd._hi\n this._lo = dd._lo\n }\n } else if (arguments.length === 2) {\n const hi = arguments[0], lo = arguments[1]\n this._hi = hi\n this._lo = lo\n }\n }\n gt(y) {\n return this._hi > y._hi || this._hi === y._hi && this._lo > y._lo\n }\n isNegative() {\n return this._hi < 0.0 || this._hi === 0.0 && this._lo < 0.0\n }\n trunc() {\n if (this.isNaN()) return DD.NaN\n if (this.isPositive()) return this.floor(); else return this.ceil()\n }\n signum() {\n if (this._hi > 0) return 1\n if (this._hi < 0) return -1\n if (this._lo > 0) return 1\n if (this._lo < 0) return -1\n return 0\n }\n get interfaces_() {\n return [Serializable, Comparable, Cloneable]\n }\n}\nDD.PI = new DD(3.141592653589793116e+00, 1.224646799147353207e-16)\nDD.TWO_PI = new DD(6.283185307179586232e+00, 2.449293598294706414e-16)\nDD.PI_2 = new DD(1.570796326794896558e+00, 6.123233995736766036e-17)\nDD.E = new DD(2.718281828459045091e+00, 1.445646891729250158e-16)\nDD.NaN = new DD(Double.NaN, Double.NaN)\nDD.EPS = 1.23259516440783e-32\nDD.SPLIT = 134217729.0\nDD.MAX_PRINT_DIGITS = 32\nDD.TEN = DD.valueOf(10.0)\nDD.ONE = DD.valueOf(1.0)\nDD.SCI_NOT_EXPONENT_CHAR = 'E'\nDD.SCI_NOT_ZERO = '0.0E0'\n","import Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport DD from '../math/DD.js'\nexport default class CGAlgorithmsDD {\n static orientationIndex(p1, p2, q) {\n const index = CGAlgorithmsDD.orientationIndexFilter(p1, p2, q)\n if (index <= 1) return index\n const dx1 = DD.valueOf(p2.x).selfAdd(-p1.x)\n const dy1 = DD.valueOf(p2.y).selfAdd(-p1.y)\n const dx2 = DD.valueOf(q.x).selfAdd(-p2.x)\n const dy2 = DD.valueOf(q.y).selfAdd(-p2.y)\n return dx1.selfMultiply(dy2).selfSubtract(dy1.selfMultiply(dx2)).signum()\n }\n static signOfDet2x2() {\n if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det.signum()\n } else if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n const dx1 = arguments[0], dy1 = arguments[1], dx2 = arguments[2], dy2 = arguments[3]\n const x1 = DD.valueOf(dx1)\n const y1 = DD.valueOf(dy1)\n const x2 = DD.valueOf(dx2)\n const y2 = DD.valueOf(dy2)\n const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n return det.signum()\n }\n }\n static intersection(p1, p2, q1, q2) {\n const px = new DD(p1.y).selfSubtract(p2.y)\n const py = new DD(p2.x).selfSubtract(p1.x)\n const pw = new DD(p1.x).selfMultiply(p2.y).selfSubtract(new DD(p2.x).selfMultiply(p1.y))\n const qx = new DD(q1.y).selfSubtract(q2.y)\n const qy = new DD(q2.x).selfSubtract(q1.x)\n const qw = new DD(q1.x).selfMultiply(q2.y).selfSubtract(new DD(q2.x).selfMultiply(q1.y))\n const x = py.multiply(qw).selfSubtract(qy.multiply(pw))\n const y = qx.multiply(pw).selfSubtract(px.multiply(qw))\n const w = px.multiply(qy).selfSubtract(qx.multiply(py))\n const xInt = x.selfDivide(w).doubleValue()\n const yInt = y.selfDivide(w).doubleValue()\n if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n return null\n \n return new Coordinate(xInt, yInt)\n }\n static orientationIndexFilter(pa, pb, pc) {\n let detsum = null\n const detleft = (pa.x - pc.x) * (pb.y - pc.y)\n const detright = (pa.y - pc.y) * (pb.x - pc.x)\n const det = detleft - detright\n if (detleft > 0.0) \n if (detright <= 0.0) \n return CGAlgorithmsDD.signum(det)\n else \n detsum = detleft + detright\n \n else if (detleft < 0.0) \n if (detright >= 0.0) \n return CGAlgorithmsDD.signum(det)\n else \n detsum = -detleft - detright\n \n else \n return CGAlgorithmsDD.signum(det)\n \n const errbound = CGAlgorithmsDD.DP_SAFE_EPSILON * detsum\n if (det >= errbound || -det >= errbound) \n return CGAlgorithmsDD.signum(det)\n \n return 2\n }\n static signum(x) {\n if (x > 0) return 1\n if (x < 0) return -1\n return 0\n }\n}\nCGAlgorithmsDD.DP_SAFE_EPSILON = 1e-15\n","import hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport CGAlgorithmsDD from './CGAlgorithmsDD.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class Orientation {\n static index(p1, p2, q) {\n return CGAlgorithmsDD.orientationIndex(p1, p2, q)\n }\n static isCCW() {\n if (arguments[0] instanceof Array) {\n const ring = arguments[0]\n const nPts = ring.length - 1\n if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n let hiPt = ring[0]\n let hiIndex = 0\n for (let i = 1; i <= nPts; i++) {\n const p = ring[i]\n if (p.y > hiPt.y) {\n hiPt = p\n hiIndex = i\n }\n }\n let iPrev = hiIndex\n do {\n iPrev = iPrev - 1\n if (iPrev < 0) iPrev = nPts\n } while (ring[iPrev].equals2D(hiPt) && iPrev !== hiIndex)\n let iNext = hiIndex\n do \n iNext = (iNext + 1) % nPts\n while (ring[iNext].equals2D(hiPt) && iNext !== hiIndex)\n const prev = ring[iPrev]\n const next = ring[iNext]\n if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n const disc = Orientation.index(prev, hiPt, next)\n let isCCW = null\n if (disc === 0) \n isCCW = prev.x > next.x\n else \n isCCW = disc > 0\n \n return isCCW\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const ring = arguments[0]\n const nPts = ring.size() - 1\n if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n let hiPt = ring.getCoordinate(0)\n let hiIndex = 0\n for (let i = 1; i <= nPts; i++) {\n const p = ring.getCoordinate(i)\n if (p.y > hiPt.y) {\n hiPt = p\n hiIndex = i\n }\n }\n let prev = null\n let iPrev = hiIndex\n do {\n iPrev = iPrev - 1\n if (iPrev < 0) iPrev = nPts\n prev = ring.getCoordinate(iPrev)\n } while (prev.equals2D(hiPt) && iPrev !== hiIndex)\n let next = null\n let iNext = hiIndex\n do {\n iNext = (iNext + 1) % nPts\n next = ring.getCoordinate(iNext)\n } while (next.equals2D(hiPt) && iNext !== hiIndex)\n if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n const disc = Orientation.index(prev, hiPt, next)\n let isCCW = null\n if (disc === 0) \n isCCW = prev.x > next.x\n else \n isCCW = disc > 0\n \n return isCCW\n }\n }\n}\nOrientation.CLOCKWISE = -1\nOrientation.RIGHT = Orientation.CLOCKWISE\nOrientation.COUNTERCLOCKWISE = 1\nOrientation.LEFT = Orientation.COUNTERCLOCKWISE\nOrientation.COLLINEAR = 0\nOrientation.STRAIGHT = Orientation.COLLINEAR\n","export default class Polygonal {}\n","import Area from '../algorithm/Area.js'\nimport Geometry from './Geometry.js'\nimport Arrays from '../../../../java/util/Arrays.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Polygonal from './Polygonal.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nexport default class Polygon extends Geometry {\n constructor() {\n super()\n Polygon.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._shell = null\n this._holes = null\n let shell = arguments[0], holes = arguments[1], factory = arguments[2]\n Geometry.constructor_.call(this, factory)\n if (shell === null) \n shell = this.getFactory().createLinearRing()\n \n if (holes === null) \n holes = []\n \n if (Geometry.hasNullElements(holes)) \n throw new IllegalArgumentException('holes must not contain null elements')\n \n if (shell.isEmpty() && Geometry.hasNonEmptyElements(holes)) \n throw new IllegalArgumentException('shell is empty but holes are not')\n \n this._shell = shell\n this._holes = holes\n }\n computeEnvelopeInternal() {\n return this._shell.getEnvelopeInternal()\n }\n getCoordinates() {\n if (this.isEmpty()) \n return []\n \n const coordinates = new Array(this.getNumPoints()).fill(null)\n let k = -1\n const shellCoordinates = this._shell.getCoordinates()\n for (let x = 0; x < shellCoordinates.length; x++) {\n k++\n coordinates[k] = shellCoordinates[x]\n }\n for (let i = 0; i < this._holes.length; i++) {\n const childCoordinates = this._holes[i].getCoordinates()\n for (let j = 0; j < childCoordinates.length; j++) {\n k++\n coordinates[k] = childCoordinates[j]\n }\n }\n return coordinates\n }\n getArea() {\n let area = 0.0\n area += Area.ofRing(this._shell.getCoordinateSequence())\n for (let i = 0; i < this._holes.length; i++) \n area -= Area.ofRing(this._holes[i].getCoordinateSequence())\n \n return area\n }\n copyInternal() {\n const shellCopy = this._shell.copy()\n const holeCopies = new Array(this._holes.length).fill(null)\n for (let i = 0; i < this._holes.length; i++) \n holeCopies[i] = this._holes[i].copy()\n \n return new Polygon(shellCopy, holeCopies, this._factory)\n }\n isRectangle() {\n if (this.getNumInteriorRing() !== 0) return false\n if (this._shell === null) return false\n if (this._shell.getNumPoints() !== 5) return false\n const seq = this._shell.getCoordinateSequence()\n const env = this.getEnvelopeInternal()\n for (let i = 0; i < 5; i++) {\n const x = seq.getX(i)\n if (!(x === env.getMinX() || x === env.getMaxX())) return false\n const y = seq.getY(i)\n if (!(y === env.getMinY() || y === env.getMaxY())) return false\n }\n let prevX = seq.getX(0)\n let prevY = seq.getY(0)\n for (let i = 1; i <= 4; i++) {\n const x = seq.getX(i)\n const y = seq.getY(i)\n const xChanged = x !== prevX\n const yChanged = y !== prevY\n if (xChanged === yChanged) return false\n prevX = x\n prevY = y\n }\n return true\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherPolygon = other\n const thisShell = this._shell\n const otherPolygonShell = otherPolygon._shell\n if (!thisShell.equalsExact(otherPolygonShell, tolerance)) \n return false\n \n if (this._holes.length !== otherPolygon._holes.length) \n return false\n \n for (let i = 0; i < this._holes.length; i++) \n if (!this._holes[i].equalsExact(otherPolygon._holes[i], tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n if (arguments.length === 0) {\n this._shell = this.normalized(this._shell, true)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i] = this.normalized(this._holes[i], false)\n \n Arrays.sort(this._holes)\n } else if (arguments.length === 2) {\n const ring = arguments[0], clockwise = arguments[1]\n if (ring.isEmpty()) \n return null\n \n const seq = ring.getCoordinateSequence()\n const minCoordinateIndex = CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 2)\n CoordinateSequences.scroll(seq, minCoordinateIndex, true)\n if (Orientation.isCCW(seq) === clockwise) CoordinateSequences.reverse(seq)\n }\n }\n getCoordinate() {\n return this._shell.getCoordinate()\n }\n getNumInteriorRing() {\n return this._holes.length\n }\n getBoundaryDimension() {\n return 1\n }\n reverseInternal() {\n const shell = this.getExteriorRing().reverse()\n const holes = new Array(this.getNumInteriorRing()).fill(null)\n for (let i = 0; i < holes.length; i++) \n holes[i] = this.getInteriorRingN(i).reverse()\n \n return this.getFactory().createPolygon(shell, holes)\n }\n getTypeCode() {\n return Geometry.TYPECODE_POLYGON\n }\n getDimension() {\n return 2\n }\n getLength() {\n let len = 0.0\n len += this._shell.getLength()\n for (let i = 0; i < this._holes.length; i++) \n len += this._holes[i].getLength()\n \n return len\n }\n getNumPoints() {\n let numPoints = this._shell.getNumPoints()\n for (let i = 0; i < this._holes.length; i++) \n numPoints += this._holes[i].getNumPoints()\n \n return numPoints\n }\n convexHull() {\n return this.getExteriorRing().convexHull()\n }\n normalized(ring, clockwise) {\n const res = ring.copy()\n this.normalize(res, clockwise)\n return res\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const thisShell = this._shell\n const otherShell = o._shell\n return thisShell.compareToSameClass(otherShell)\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const poly = o\n const thisShell = this._shell\n const otherShell = poly._shell\n const shellComp = thisShell.compareToSameClass(otherShell, comp)\n if (shellComp !== 0) return shellComp\n const nHole1 = this.getNumInteriorRing()\n const nHole2 = poly.getNumInteriorRing()\n let i = 0\n while (i < nHole1 && i < nHole2) {\n const thisHole = this.getInteriorRingN(i)\n const otherHole = poly.getInteriorRingN(i)\n const holeComp = thisHole.compareToSameClass(otherHole, comp)\n if (holeComp !== 0) return holeComp\n i++\n }\n if (i < nHole1) return 1\n if (i < nHole2) return -1\n return 0\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n this._shell.apply(filter)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i].apply(filter)\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n this._shell.apply(filter)\n if (!filter.isDone()) \n for (let i = 0; i < this._holes.length; i++) {\n this._holes[i].apply(filter)\n if (filter.isDone()) break\n }\n \n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n this._shell.apply(filter)\n for (let i = 0; i < this._holes.length; i++) \n this._holes[i].apply(filter)\n \n }\n }\n getBoundary() {\n if (this.isEmpty()) \n return this.getFactory().createMultiLineString()\n \n const rings = new Array(this._holes.length + 1).fill(null)\n rings[0] = this._shell\n for (let i = 0; i < this._holes.length; i++) \n rings[i + 1] = this._holes[i]\n \n if (rings.length <= 1) return this.getFactory().createLinearRing(rings[0].getCoordinateSequence())\n return this.getFactory().createMultiLineString(rings)\n }\n getGeometryType() {\n return Geometry.TYPENAME_POLYGON\n }\n getExteriorRing() {\n return this._shell\n }\n isEmpty() {\n return this._shell.isEmpty()\n }\n getInteriorRingN(n) {\n return this._holes[n]\n }\n get interfaces_() {\n return [Polygonal]\n }\n}\n","import Collection from './Collection.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Set.html\n *\n * @extends {Collection}\n * @constructor\n * @private\n */\nexport default class Set extends Collection {\n /**\n * Returns true if this set contains the specified element. More formally,\n * returns true if and only if this set contains an element e such that (o==null ?\n * e==null : o.equals(e)).\n * @param {Object} e\n * @return {boolean}\n */\n contains() { }\n}\n","import Set from './Set.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedSet.html\n */\nexport default class SortedSet extends Set {}\n","import Collection from './Collection.js'\nimport NoSuchElementException from './NoSuchElementException.js'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException.js'\nimport SortedSet from './SortedSet.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html\n */\nexport default class TreeSet extends SortedSet {\n constructor(o) {\n super()\n this.array = []\n if (o instanceof Collection)\n this.addAll(o)\n }\n\n contains(o) {\n for (const e of this.array)\n if (e.compareTo(o) === 0)\n return true\n return false\n }\n\n add(o) {\n if (this.contains(o))\n return false\n for (let i = 0, len = this.array.length; i < len; i++) {\n const e = this.array[i]\n if (e.compareTo(o) === 1)\n return !!this.array.splice(i, 0, o)\n }\n this.array.push(o)\n return true\n }\n\n addAll(c) {\n for (const e of c)\n this.add(e)\n return true\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n\n size() {\n return this.array.length\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n\n toArray() {\n return this.array.slice()\n }\n\n iterator() {\n return new Iterator(this.array)\n }\n}\n\nclass Iterator {\n constructor(array) {\n this.array = array\n this.position = 0\n }\n\n next() {\n if (this.position === this.array.length)\n throw new NoSuchElementException()\n return this.array[this.position++]\n }\n\n hasNext() {\n return this.position < this.array.length\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n}\n","import TreeSet from '../../../../java/util/TreeSet.js'\nimport Geometry from './Geometry.js'\nimport Arrays from '../../../../java/util/Arrays.js'\nimport CoordinateFilter from './CoordinateFilter.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from './GeometryComponentFilter.js'\nimport Dimension from './Dimension.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport GeometryFilter from './GeometryFilter.js'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter.js'\nimport Envelope from './Envelope.js'\nimport Assert from '../util/Assert.js'\nexport default class GeometryCollection extends Geometry {\n constructor() {\n super()\n GeometryCollection.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometries = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n let geometries = arguments[0], factory = arguments[1]\n Geometry.constructor_.call(this, factory)\n if (geometries === null) \n geometries = []\n \n if (Geometry.hasNullElements(geometries)) \n throw new IllegalArgumentException('geometries must not contain null elements')\n \n this._geometries = geometries\n }\n }\n computeEnvelopeInternal() {\n const envelope = new Envelope()\n for (let i = 0; i < this._geometries.length; i++) \n envelope.expandToInclude(this._geometries[i].getEnvelopeInternal())\n \n return envelope\n }\n getGeometryN(n) {\n return this._geometries[n]\n }\n getCoordinates() {\n const coordinates = new Array(this.getNumPoints()).fill(null)\n let k = -1\n for (let i = 0; i < this._geometries.length; i++) {\n const childCoordinates = this._geometries[i].getCoordinates()\n for (let j = 0; j < childCoordinates.length; j++) {\n k++\n coordinates[k] = childCoordinates[j]\n }\n }\n return coordinates\n }\n getArea() {\n let area = 0.0\n for (let i = 0; i < this._geometries.length; i++) \n area += this._geometries[i].getArea()\n \n return area\n }\n copyInternal() {\n const geometries = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < geometries.length; i++) \n geometries[i] = this._geometries[i].copy()\n \n return new GeometryCollection(geometries, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n const otherCollection = other\n if (this._geometries.length !== otherCollection._geometries.length) \n return false\n \n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].equalsExact(otherCollection._geometries[i], tolerance)) \n return false\n \n \n return true\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n normalize() {\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].normalize()\n \n Arrays.sort(this._geometries)\n }\n getCoordinate() {\n if (this.isEmpty()) return null\n return this._geometries[0].getCoordinate()\n }\n getBoundaryDimension() {\n let dimension = Dimension.FALSE\n for (let i = 0; i < this._geometries.length; i++) \n dimension = Math.max(dimension, this._geometries[i].getBoundaryDimension())\n \n return dimension\n }\n reverseInternal() {\n const numGeometries = this._geometries.length\n const reversed = new ArrayList(numGeometries)\n for (let i = 0; i < numGeometries; i++) \n reversed.add(this._geometries[i].reverse())\n \n return this.getFactory().buildGeometry(reversed)\n }\n getTypeCode() {\n return Geometry.TYPECODE_GEOMETRYCOLLECTION\n }\n getDimension() {\n let dimension = Dimension.FALSE\n for (let i = 0; i < this._geometries.length; i++) \n dimension = Math.max(dimension, this._geometries[i].getDimension())\n \n return dimension\n }\n getLength() {\n let sum = 0.0\n for (let i = 0; i < this._geometries.length; i++) \n sum += this._geometries[i].getLength()\n \n return sum\n }\n getNumPoints() {\n let numPoints = 0\n for (let i = 0; i < this._geometries.length; i++) \n numPoints += this._geometries[i].getNumPoints()\n \n return numPoints\n }\n getNumGeometries() {\n return this._geometries.length\n }\n compareToSameClass() {\n if (arguments.length === 1) {\n const o = arguments[0]\n const theseElements = new TreeSet(Arrays.asList(this._geometries))\n const otherElements = new TreeSet(Arrays.asList(o._geometries))\n return this.compare(theseElements, otherElements)\n } else if (arguments.length === 2) {\n const o = arguments[0], comp = arguments[1]\n const gc = o\n const n1 = this.getNumGeometries()\n const n2 = gc.getNumGeometries()\n let i = 0\n while (i < n1 && i < n2) {\n const thisGeom = this.getGeometryN(i)\n const otherGeom = gc.getGeometryN(i)\n const holeComp = thisGeom.compareToSameClass(otherGeom, comp)\n if (holeComp !== 0) return holeComp\n i++\n }\n if (i < n1) return 1\n if (i < n2) return -1\n return 0\n }\n }\n apply() {\n if (hasInterface(arguments[0], CoordinateFilter)) {\n const filter = arguments[0]\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n const filter = arguments[0]\n if (this._geometries.length === 0) return null\n for (let i = 0; i < this._geometries.length; i++) {\n this._geometries[i].apply(filter)\n if (filter.isDone()) \n break\n \n }\n if (filter.isGeometryChanged()) this.geometryChanged()\n } else if (hasInterface(arguments[0], GeometryFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n const filter = arguments[0]\n filter.filter(this)\n for (let i = 0; i < this._geometries.length; i++) \n this._geometries[i].apply(filter)\n \n }\n }\n getBoundary() {\n Geometry.checkNotGeometryCollection(this)\n Assert.shouldNeverReachHere()\n return null\n }\n getGeometryType() {\n return Geometry.TYPENAME_GEOMETRYCOLLECTION\n }\n isEmpty() {\n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].isEmpty()) \n return false\n \n \n return true\n }\n}\n","import Geometry from './Geometry.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport Dimension from './Dimension.js'\nimport Puntal from './Puntal.js'\nexport default class MultiPoint extends GeometryCollection {\n constructor() {\n super()\n MultiPoint.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const points = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, points, factory)\n }\n copyInternal() {\n const points = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < points.length; i++) \n points[i] = this._geometries[i].copy()\n \n return new MultiPoint(points, this._factory)\n }\n isValid() {\n return true\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getCoordinate() {\n if (arguments.length === 1 && Number.isInteger(arguments[0])) {\n const n = arguments[0]\n return this._geometries[n].getCoordinate()\n } else {\n return super.getCoordinate.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTIPOINT\n }\n getDimension() {\n return 0\n }\n getBoundary() {\n return this.getFactory().createGeometryCollection()\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTIPOINT\n }\n get interfaces_() {\n return [Puntal]\n }\n}\n","import LineString from './LineString.js'\nimport Geometry from './Geometry.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport Dimension from './Dimension.js'\nexport default class LinearRing extends LineString {\n constructor() {\n super()\n LinearRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const points = arguments[0], factory = arguments[1]\n LineString.constructor_.call(this, points, factory)\n this.validateConstruction()\n }\n copyInternal() {\n return new LinearRing(this._points.copy(), this._factory)\n }\n getBoundaryDimension() {\n return Dimension.FALSE\n }\n isClosed() {\n if (this.isEmpty()) \n return true\n \n return super.isClosed.call(this)\n }\n reverseInternal() {\n const seq = this._points.copy()\n CoordinateSequences.reverse(seq)\n return this.getFactory().createLinearRing(seq)\n }\n getTypeCode() {\n return Geometry.TYPECODE_LINEARRING\n }\n validateConstruction() {\n if (!this.isEmpty() && !super.isClosed.call(this)) \n throw new IllegalArgumentException('Points of LinearRing do not form a closed linestring')\n \n if (this.getCoordinateSequence().size() >= 1 && this.getCoordinateSequence().size() < LinearRing.MINIMUM_VALID_SIZE) \n throw new IllegalArgumentException('Invalid number of points in LinearRing (found ' + this.getCoordinateSequence().size() + ' - must be 0 or >= 4)')\n \n }\n getGeometryType() {\n return Geometry.TYPENAME_LINEARRING\n }\n}\nLinearRing.MINIMUM_VALID_SIZE = 4\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXY extends Coordinate {\n constructor() {\n super()\n CoordinateXY.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXY) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n }\n } else if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n }\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateXY.X:\n this.x = value\n break\n case CoordinateXY.Y:\n this.y = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n getZ() {\n return Coordinate.NULL_ORDINATE\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateXY.X:\n return this.x\n case CoordinateXY.Y:\n return this.y\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n setZ(z) {\n throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n }\n copy() {\n return new CoordinateXY(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n }\n}\nCoordinateXY.X = 0\nCoordinateXY.Y = 1\nCoordinateXY.Z = -1\nCoordinateXY.M = -1\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXYM extends Coordinate {\n constructor() {\n super()\n CoordinateXYM.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n this._m = 0.0\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXYM) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n this._m = coord._m\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord.x, coord.y)\n this._m = this.getM()\n }\n } else if (arguments.length === 3) {\n const x = arguments[0], y = arguments[1], m = arguments[2]\n Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n this._m = m\n }\n }\n getM() {\n return this._m\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateXYM.X:\n this.x = value\n break\n case CoordinateXYM.Y:\n this.y = value\n break\n case CoordinateXYM.M:\n this._m = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n setM(m) {\n this._m = m\n }\n getZ() {\n return Coordinate.NULL_ORDINATE\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateXYM.X:\n return this.x\n case CoordinateXYM.Y:\n return this.y\n case CoordinateXYM.M:\n return this._m\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n setZ(z) {\n throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n }\n copy() {\n return new CoordinateXYM(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ' m=' + this.getM() + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n this._m = other.getM()\n }\n}\nCoordinateXYM.X = 0\nCoordinateXYM.Y = 1\nCoordinateXYM.Z = -1\nCoordinateXYM.M = 2\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class CoordinateXYZM extends Coordinate {\n constructor() {\n super()\n CoordinateXYZM.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m = null\n if (arguments.length === 0) {\n Coordinate.constructor_.call(this)\n this._m = 0.0\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof CoordinateXYZM) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord)\n this._m = coord._m\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n Coordinate.constructor_.call(this, coord)\n this._m = this.getM()\n }\n } else if (arguments.length === 4) {\n const x = arguments[0], y = arguments[1], z = arguments[2], m = arguments[3]\n Coordinate.constructor_.call(this, x, y, z)\n this._m = m\n }\n }\n getM() {\n return this._m\n }\n setOrdinate(ordinateIndex, value) {\n switch (ordinateIndex) {\n case Coordinate.X:\n this.x = value\n break\n case Coordinate.Y:\n this.y = value\n break\n case Coordinate.Z:\n this.z = value\n break\n case Coordinate.M:\n this._m = value\n break\n default:\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n }\n setM(m) {\n this._m = m\n }\n getOrdinate(ordinateIndex) {\n switch (ordinateIndex) {\n case Coordinate.X:\n return this.x\n case Coordinate.Y:\n return this.y\n case Coordinate.Z:\n return this.getZ()\n case Coordinate.M:\n return this.getM()\n }\n throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n }\n copy() {\n return new CoordinateXYZM(this)\n }\n toString() {\n return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ' m=' + this.getM() + ')'\n }\n setCoordinate(other) {\n this.x = other.x\n this.y = other.y\n this.z = other.getZ()\n this._m = other.getM()\n }\n}\n","import CoordinateXY from './CoordinateXY.js'\nimport Coordinate from './Coordinate.js'\nimport CoordinateXYM from './CoordinateXYM.js'\nimport CoordinateXYZM from './CoordinateXYZM.js'\nexport default class Coordinates {\n static measures(coordinate) {\n if (coordinate instanceof CoordinateXY) \n return 0\n else if (coordinate instanceof CoordinateXYM) \n return 1\n else if (coordinate instanceof CoordinateXYZM) \n return 1\n else if (coordinate instanceof Coordinate) \n return 0\n \n return 0\n }\n static dimension(coordinate) {\n if (coordinate instanceof CoordinateXY) \n return 2\n else if (coordinate instanceof CoordinateXYM) \n return 3\n else if (coordinate instanceof CoordinateXYZM) \n return 4\n else if (coordinate instanceof Coordinate) \n return 3\n \n return 3\n }\n static create() {\n if (arguments.length === 1) {\n const dimension = arguments[0]\n return Coordinates.create(dimension, 0)\n } else if (arguments.length === 2) {\n const dimension = arguments[0], measures = arguments[1]\n if (dimension === 2) \n return new CoordinateXY()\n else if (dimension === 3 && measures === 0) \n return new Coordinate()\n else if (dimension === 3 && measures === 1) \n return new CoordinateXYM()\n else if (dimension === 4 && measures === 1) \n return new CoordinateXYZM()\n \n return new Coordinate()\n }\n }\n}\n","import Double from '../../../../java/lang/Double.js'\nexport default class MathUtil {\n static log10(x) {\n const ln = Math.log(x)\n if (Double.isInfinite(ln)) return ln\n if (Double.isNaN(ln)) return ln\n return ln / MathUtil.LOG_10\n }\n static min(v1, v2, v3, v4) {\n let min = v1\n if (v2 < min) min = v2\n if (v3 < min) min = v3\n if (v4 < min) min = v4\n return min\n }\n static clamp() {\n if (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number')) {\n const x = arguments[0], min = arguments[1], max = arguments[2]\n if (x < min) return min\n if (x > max) return max\n return x\n } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n const x = arguments[0], min = arguments[1], max = arguments[2]\n if (x < min) return min\n if (x > max) return max\n return x\n }\n }\n static wrap(index, max) {\n if (index < 0) \n return max - -index % max\n \n return index % max\n }\n static max() {\n if (arguments.length === 3) {\n const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2]\n let max = v1\n if (v2 > max) max = v2\n if (v3 > max) max = v3\n return max\n } else if (arguments.length === 4) {\n const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2], v4 = arguments[3]\n let max = v1\n if (v2 > max) max = v2\n if (v3 > max) max = v3\n if (v4 > max) max = v4\n return max\n }\n }\n static average(x1, x2) {\n return (x1 + x2) / 2.0\n }\n}\nMathUtil.LOG_10 = Math.log(10)\n","export default class System {\n static arraycopy(src, srcPos, dest, destPos, len) {\n let c = 0\n for (let i = srcPos; i < srcPos + len; i++) {\n dest[destPos + c] = src[i]\n c++\n }\n }\n\n static getProperty(name) {\n return {\n 'line.separator': '\\n'\n }[name]\n }\n}\n","import CoordinateList from './CoordinateList.js'\nimport Coordinates from './Coordinates.js'\nimport MathUtil from '../math/MathUtil.js'\nimport System from '../../../../java/lang/System.js'\nimport Comparator from '../../../../java/util/Comparator.js'\nimport Envelope from './Envelope.js'\nexport default class CoordinateArrays {\n static isRing(pts) {\n if (pts.length < 4) return false\n if (!pts[0].equals2D(pts[pts.length - 1])) return false\n return true\n }\n static ptNotInList(testPts, pts) {\n for (let i = 0; i < testPts.length; i++) {\n const testPt = testPts[i]\n if (CoordinateArrays.indexOf(testPt, pts) < 0) return testPt\n }\n return null\n }\n static scroll(coordinates, firstCoordinate) {\n const i = CoordinateArrays.indexOf(firstCoordinate, coordinates)\n if (i < 0) return null\n const newCoordinates = new Array(coordinates.length).fill(null)\n System.arraycopy(coordinates, i, newCoordinates, 0, coordinates.length - i)\n System.arraycopy(coordinates, 0, newCoordinates, coordinates.length - i, i)\n System.arraycopy(newCoordinates, 0, coordinates, 0, coordinates.length)\n }\n static equals() {\n if (arguments.length === 2) {\n const coord1 = arguments[0], coord2 = arguments[1]\n if (coord1 === coord2) return true\n if (coord1 === null || coord2 === null) return false\n if (coord1.length !== coord2.length) return false\n for (let i = 0; i < coord1.length; i++) \n if (!coord1[i].equals(coord2[i])) return false\n \n return true\n } else if (arguments.length === 3) {\n const coord1 = arguments[0], coord2 = arguments[1], coordinateComparator = arguments[2]\n if (coord1 === coord2) return true\n if (coord1 === null || coord2 === null) return false\n if (coord1.length !== coord2.length) return false\n for (let i = 0; i < coord1.length; i++) \n if (coordinateComparator.compare(coord1[i], coord2[i]) !== 0) return false\n \n return true\n }\n }\n static intersection(coordinates, env) {\n const coordList = new CoordinateList()\n for (let i = 0; i < coordinates.length; i++) \n if (env.intersects(coordinates[i])) coordList.add(coordinates[i], true)\n \n return coordList.toCoordinateArray()\n }\n static measures(pts) {\n if (pts === null || pts.length === 0) \n return 0\n \n let measures = 0\n for (const coordinate of pts) \n measures = Math.max(measures, Coordinates.measures(coordinate))\n \n return measures\n }\n static hasRepeatedPoints(coord) {\n for (let i = 1; i < coord.length; i++) \n if (coord[i - 1].equals(coord[i])) \n return true\n \n \n return false\n }\n static removeRepeatedPoints(coord) {\n if (!CoordinateArrays.hasRepeatedPoints(coord)) return coord\n const coordList = new CoordinateList(coord, false)\n return coordList.toCoordinateArray()\n }\n static reverse(coord) {\n const last = coord.length - 1\n const mid = Math.trunc(last / 2)\n for (let i = 0; i <= mid; i++) {\n const tmp = coord[i]\n coord[i] = coord[last - i]\n coord[last - i] = tmp\n }\n }\n static removeNull(coord) {\n let nonNull = 0\n for (let i = 0; i < coord.length; i++) \n if (coord[i] !== null) nonNull++\n \n const newCoord = new Array(nonNull).fill(null)\n if (nonNull === 0) return newCoord\n let j = 0\n for (let i = 0; i < coord.length; i++) \n if (coord[i] !== null) newCoord[j++] = coord[i]\n \n return newCoord\n }\n static copyDeep() {\n if (arguments.length === 1) {\n const coordinates = arguments[0]\n const copy = new Array(coordinates.length).fill(null)\n for (let i = 0; i < coordinates.length; i++) \n copy[i] = coordinates[i].copy()\n \n return copy\n } else if (arguments.length === 5) {\n const src = arguments[0], srcStart = arguments[1], dest = arguments[2], destStart = arguments[3], length = arguments[4]\n for (let i = 0; i < length; i++) \n dest[destStart + i] = src[srcStart + i].copy()\n \n }\n }\n static isEqualReversed(pts1, pts2) {\n for (let i = 0; i < pts1.length; i++) {\n const p1 = pts1[i]\n const p2 = pts2[pts1.length - i - 1]\n if (p1.compareTo(p2) !== 0) return false\n }\n return true\n }\n static envelope(coordinates) {\n const env = new Envelope()\n for (let i = 0; i < coordinates.length; i++) \n env.expandToInclude(coordinates[i])\n \n return env\n }\n static toCoordinateArray(coordList) {\n return coordList.toArray(CoordinateArrays.coordArrayType)\n }\n static dimension(pts) {\n if (pts === null || pts.length === 0) \n return 3\n \n let dimension = 0\n for (const coordinate of pts) \n dimension = Math.max(dimension, Coordinates.dimension(coordinate))\n \n return dimension\n }\n static atLeastNCoordinatesOrNothing(n, c) {\n return c.length >= n ? c : []\n }\n static indexOf(coordinate, coordinates) {\n for (let i = 0; i < coordinates.length; i++) \n if (coordinate.equals(coordinates[i])) \n return i\n \n \n return -1\n }\n static increasingDirection(pts) {\n for (let i = 0; i < Math.trunc(pts.length / 2); i++) {\n const j = pts.length - 1 - i\n const comp = pts[i].compareTo(pts[j])\n if (comp !== 0) return comp\n }\n return 1\n }\n static compare(pts1, pts2) {\n let i = 0\n while (i < pts1.length && i < pts2.length) {\n const compare = pts1[i].compareTo(pts2[i])\n if (compare !== 0) return compare\n i++\n }\n if (i < pts2.length) return -1\n if (i < pts1.length) return 1\n return 0\n }\n static minCoordinate(coordinates) {\n let minCoord = null\n for (let i = 0; i < coordinates.length; i++) \n if (minCoord === null || minCoord.compareTo(coordinates[i]) > 0) \n minCoord = coordinates[i]\n \n \n return minCoord\n }\n static extract(pts, start, end) {\n start = MathUtil.clamp(start, 0, pts.length)\n end = MathUtil.clamp(end, -1, pts.length)\n let npts = end - start + 1\n if (end < 0) npts = 0\n if (start >= pts.length) npts = 0\n if (end < start) npts = 0\n const extractPts = new Array(npts).fill(null)\n if (npts === 0) return extractPts\n let iPts = 0\n for (let i = start; i <= end; i++) \n extractPts[iPts++] = pts[i]\n \n return extractPts\n }\n}\nclass ForwardComparator {\n compare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n return CoordinateArrays.compare(pts1, pts2)\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nclass BidirectionalComparator {\n compare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n if (pts1.length < pts2.length) return -1\n if (pts1.length > pts2.length) return 1\n if (pts1.length === 0) return 0\n const forwardComp = CoordinateArrays.compare(pts1, pts2)\n const isEqualRev = CoordinateArrays.isEqualReversed(pts1, pts2)\n if (isEqualRev) return 0\n return forwardComp\n }\n OLDcompare(o1, o2) {\n const pts1 = o1\n const pts2 = o2\n if (pts1.length < pts2.length) return -1\n if (pts1.length > pts2.length) return 1\n if (pts1.length === 0) return 0\n const dir1 = CoordinateArrays.increasingDirection(pts1)\n const dir2 = CoordinateArrays.increasingDirection(pts2)\n let i1 = dir1 > 0 ? 0 : pts1.length - 1\n let i2 = dir2 > 0 ? 0 : pts1.length - 1\n for (let i = 0; i < pts1.length; i++) {\n const comparePt = pts1[i1].compareTo(pts2[i2])\n if (comparePt !== 0) return comparePt\n i1 += dir1\n i2 += dir2\n }\n return 0\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nCoordinateArrays.ForwardComparator = ForwardComparator\nCoordinateArrays.BidirectionalComparator = BidirectionalComparator\nCoordinateArrays.coordArrayType = new Array(0).fill(null)\n","export default class StringBuilder {\n constructor(str) {\n this.str = str\n }\n append(e) {\n this.str += e\n }\n setCharAt(i, c) {\n this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n }\n toString() {\n return this.str\n }\n}","import hasInterface from '../../../../../hasInterface.js'\nimport Coordinate from '../Coordinate.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Coordinates from '../Coordinates.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport CoordinateArrays from '../CoordinateArrays.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport StringBuilder from '../../../../../java/lang/StringBuilder.js'\nexport default class CoordinateArraySequence {\n constructor() {\n CoordinateArraySequence.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._dimension = 3\n this._measures = 0\n this._coordinates = null\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n CoordinateArraySequence.constructor_.call(this, coordinates, CoordinateArrays.dimension(coordinates), CoordinateArrays.measures(coordinates))\n } else if (Number.isInteger(arguments[0])) {\n const size = arguments[0]\n this._coordinates = new Array(size).fill(null)\n for (let i = 0; i < size; i++) \n this._coordinates[i] = new Coordinate()\n \n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n if (coordSeq === null) {\n this._coordinates = new Array(0).fill(null)\n return null\n }\n this._dimension = coordSeq.getDimension()\n this._measures = coordSeq.getMeasures()\n this._coordinates = new Array(coordSeq.size()).fill(null)\n for (let i = 0; i < this._coordinates.length; i++) \n this._coordinates[i] = coordSeq.getCoordinateCopy(i)\n \n }\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Array && Number.isInteger(arguments[1])) {\n const coordinates = arguments[0], dimension = arguments[1]\n CoordinateArraySequence.constructor_.call(this, coordinates, dimension, CoordinateArrays.measures(coordinates))\n } else if (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1])) {\n const size = arguments[0], dimension = arguments[1]\n this._coordinates = new Array(size).fill(null)\n this._dimension = dimension\n for (let i = 0; i < size; i++) \n this._coordinates[i] = Coordinates.create(dimension)\n \n }\n } else if (arguments.length === 3) {\n if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Array && Number.isInteger(arguments[1]))) {\n const coordinates = arguments[0], dimension = arguments[1], measures = arguments[2]\n this._dimension = dimension\n this._measures = measures\n if (coordinates === null) \n this._coordinates = new Array(0).fill(null)\n else \n this._coordinates = coordinates\n \n } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n this._coordinates = new Array(size).fill(null)\n this._dimension = dimension\n this._measures = measures\n for (let i = 0; i < size; i++) \n this._coordinates[i] = this.createCoordinate()\n \n }\n }\n }\n getM(index) {\n if (this.hasM()) \n return this._coordinates[index].getM()\n else \n return Double.NaN\n \n }\n setOrdinate(index, ordinateIndex, value) {\n switch (ordinateIndex) {\n case CoordinateSequence.X:\n this._coordinates[index].x = value\n break\n case CoordinateSequence.Y:\n this._coordinates[index].y = value\n break\n default:\n this._coordinates[index].setOrdinate(ordinateIndex, value)\n }\n }\n getZ(index) {\n if (this.hasZ()) \n return this._coordinates[index].getZ()\n else \n return Double.NaN\n \n }\n size() {\n return this._coordinates.length\n }\n getOrdinate(index, ordinateIndex) {\n switch (ordinateIndex) {\n case CoordinateSequence.X:\n return this._coordinates[index].x\n case CoordinateSequence.Y:\n return this._coordinates[index].y\n default:\n return this._coordinates[index].getOrdinate(ordinateIndex)\n }\n }\n getCoordinate() {\n if (arguments.length === 1) {\n const i = arguments[0]\n return this._coordinates[i]\n } else if (arguments.length === 2) {\n const index = arguments[0], coord = arguments[1]\n coord.setCoordinate(this._coordinates[index])\n }\n }\n getCoordinateCopy(i) {\n const copy = this.createCoordinate()\n copy.setCoordinate(this._coordinates[i])\n return copy\n }\n createCoordinate() {\n return Coordinates.create(this.getDimension(), this.getMeasures())\n }\n getDimension() {\n return this._dimension\n }\n getX(index) {\n return this._coordinates[index].x\n }\n getMeasures() {\n return this._measures\n }\n expandEnvelope(env) {\n for (let i = 0; i < this._coordinates.length; i++) \n env.expandToInclude(this._coordinates[i])\n \n return env\n }\n copy() {\n const cloneCoordinates = new Array(this.size()).fill(null)\n for (let i = 0; i < this._coordinates.length; i++) {\n const duplicate = this.createCoordinate()\n duplicate.setCoordinate(this._coordinates[i])\n cloneCoordinates[i] = duplicate\n }\n return new CoordinateArraySequence(cloneCoordinates, this._dimension, this._measures)\n }\n toString() {\n if (this._coordinates.length > 0) {\n const strBuilder = new StringBuilder(17 * this._coordinates.length)\n strBuilder.append('(')\n strBuilder.append(this._coordinates[0])\n for (let i = 1; i < this._coordinates.length; i++) {\n strBuilder.append(', ')\n strBuilder.append(this._coordinates[i])\n }\n strBuilder.append(')')\n return strBuilder.toString()\n } else {\n return '()'\n }\n }\n getY(index) {\n return this._coordinates[index].y\n }\n toCoordinateArray() {\n return this._coordinates\n }\n get interfaces_() {\n return [CoordinateSequence, Serializable]\n }\n}\n","import CoordinateSequenceFactory from '../CoordinateSequenceFactory.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport CoordinateArraySequence from './CoordinateArraySequence.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class CoordinateArraySequenceFactory {\n static instance() {\n return CoordinateArraySequenceFactory.instanceObject\n }\n readResolve() {\n return CoordinateArraySequenceFactory.instance()\n }\n create() {\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return new CoordinateArraySequence(coordinates)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordSeq = arguments[0]\n return new CoordinateArraySequence(coordSeq)\n }\n } else if (arguments.length === 2) {\n let size = arguments[0], dimension = arguments[1]\n if (dimension > 3) dimension = 3\n if (dimension < 2) dimension = 2\n return new CoordinateArraySequence(size, dimension)\n } else if (arguments.length === 3) {\n let size = arguments[0], dimension = arguments[1], measures = arguments[2]\n let spatial = dimension - measures\n if (measures > 1) \n measures = 1\n \n if (spatial > 3) \n spatial = 3\n \n if (spatial < 2) spatial = 2\n return new CoordinateArraySequence(size, spatial + measures, measures)\n }\n }\n get interfaces_() {\n return [CoordinateSequenceFactory, Serializable]\n }\n}\nCoordinateArraySequenceFactory.instanceObject = new CoordinateArraySequenceFactory()\n","import Geometry from './Geometry.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport Polygonal from './Polygonal.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class MultiPolygon extends GeometryCollection {\n constructor() {\n super()\n MultiPolygon.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const polygons = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, polygons, factory)\n }\n copyInternal() {\n const polygons = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < polygons.length; i++) \n polygons[i] = this._geometries[i].copy()\n \n return new MultiPolygon(polygons, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n return 1\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTIPOLYGON\n }\n getDimension() {\n return 2\n }\n getBoundary() {\n if (this.isEmpty()) \n return this.getFactory().createMultiLineString()\n \n const allRings = new ArrayList()\n for (let i = 0; i < this._geometries.length; i++) {\n const polygon = this._geometries[i]\n const rings = polygon.getBoundary()\n for (let j = 0; j < rings.getNumGeometries(); j++) \n allRings.add(rings.getGeometryN(j))\n \n }\n const allRingsArray = new Array(allRings.size()).fill(null)\n return this.getFactory().createMultiLineString(allRings.toArray(allRingsArray))\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTIPOLYGON\n }\n get interfaces_() {\n return [Polygonal]\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Map.html\n */\nexport default class Map {\n /**\n * Returns the value to which the specified key is mapped, or null if this map\n * contains no mapping for the key.\n * @param {Object} key\n * @return {Object}\n */\n get() { }\n\n /**\n * Associates the specified value with the specified key in this map (optional\n * operation).\n * @param {Object} key\n * @param {Object} value\n * @return {Object}\n */\n put() { }\n\n /**\n * Returns the number of key-value mappings in this map.\n * @return {number}\n */\n size() { }\n\n /**\n * Returns a Collection view of the values contained in this map.\n * @return {javascript.util.Collection}\n */\n values() { }\n\n /**\n * Returns a {@link Set} view of the mappings contained in this map.\n * The set is backed by the map, so changes to the map are\n * reflected in the set, and vice-versa. If the map is modified\n * while an iteration over the set is in progress (except through\n * the iterator's own remove operation, or through the\n * setValue operation on a map entry returned by the\n * iterator) the results of the iteration are undefined. The set\n * supports element removal, which removes the corresponding\n * mapping from the map, via the Iterator.remove,\n * Set.remove, removeAll, retainAll and\n * clear operations. It does not support the\n * add or addAll operations.\n *\n * @return {Set} a set view of the mappings contained in this map\n */\n entrySet() { }\n}\n","import Collection from './Collection.js'\nimport NoSuchElementException from './NoSuchElementException.js'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException.js'\nimport Set from './Set.js'\n\n/**\n * @see http://docs.oracle.com/javase/6/docs/api/java/util/HashSet.html\n */\nexport default class HashSet extends Set {\n constructor(o) {\n super()\n this.map = new Map()\n if (o instanceof Collection)\n this.addAll(o)\n }\n\n contains(o) {\n const hashCode = o.hashCode ? o.hashCode() : o\n if (this.map.has(hashCode))\n return true\n return false\n }\n\n add(o) {\n const hashCode = o.hashCode ? o.hashCode() : o\n if (this.map.has(hashCode))\n return false\n return !!this.map.set(hashCode, o)\n }\n\n addAll(c) {\n for (const e of c)\n this.add(e)\n return true\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n\n size() {\n return this.map.size\n }\n\n isEmpty() {\n return this.map.size === 0\n }\n\n toArray() {\n return Array.from(this.map.values())\n }\n\n iterator() {\n return new Iterator(this.map)\n }\n\n [Symbol.iterator]() {\n return this.map\n }\n}\n\nclass Iterator {\n constructor(map) {\n this.iterator = map.values()\n const { done, value } = this.iterator.next()\n this.done = done\n this.value = value\n }\n\n next() {\n if (this.done)\n throw new NoSuchElementException()\n const current = this.value\n const { done, value } = this.iterator.next()\n this.done = done\n this.value = value\n return current\n }\n\n hasNext() {\n return !this.done\n }\n\n remove() {\n throw new UnsupportedOperationException()\n }\n}\n","import ArrayList from './ArrayList.js'\nimport MapInterface from './Map.js'\nimport HashSet from './HashSet.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html\n */\nexport default class HashMap extends MapInterface {\n constructor() {\n super()\n this.map = new Map()\n }\n\n get(key) {\n return this.map.get(key) || null\n }\n\n put(key, value) {\n this.map.set(key, value)\n return value\n }\n\n values() {\n const arrayList = new ArrayList()\n const it = this.map.values()\n let o = it.next()\n while (!o.done) {\n arrayList.add(o.value)\n o = it.next()\n }\n return arrayList\n }\n\n entrySet() {\n const hashSet = new HashSet()\n this.map.entries().forEach(entry => hashSet.add(entry))\n return hashSet\n }\n\n size() {\n return this.map.size()\n }\n}\n","import HashMap from '../../../../java/util/HashMap.js'\nimport Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nexport default class PrecisionModel {\n constructor() {\n PrecisionModel.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._modelType = null\n this._scale = null\n if (arguments.length === 0) \n this._modelType = PrecisionModel.FLOATING\n else if (arguments.length === 1) \n if (arguments[0] instanceof Type) {\n const modelType = arguments[0]\n this._modelType = modelType\n if (modelType === PrecisionModel.FIXED) \n this.setScale(1.0)\n \n } else if (typeof arguments[0] === 'number') {\n const scale = arguments[0]\n this._modelType = PrecisionModel.FIXED\n this.setScale(scale)\n } else if (arguments[0] instanceof PrecisionModel) {\n const pm = arguments[0]\n this._modelType = pm._modelType\n this._scale = pm._scale\n }\n \n }\n static mostPrecise(pm1, pm2) {\n if (pm1.compareTo(pm2) >= 0) return pm1\n return pm2\n }\n equals(other) {\n if (!(other instanceof PrecisionModel)) \n return false\n \n const otherPrecisionModel = other\n return this._modelType === otherPrecisionModel._modelType && this._scale === otherPrecisionModel._scale\n }\n compareTo(o) {\n const other = o\n const sigDigits = this.getMaximumSignificantDigits()\n const otherSigDigits = other.getMaximumSignificantDigits()\n return Integer.compare(sigDigits, otherSigDigits)\n }\n getScale() {\n return this._scale\n }\n isFloating() {\n return this._modelType === PrecisionModel.FLOATING || this._modelType === PrecisionModel.FLOATING_SINGLE\n }\n getType() {\n return this._modelType\n }\n toString() {\n let description = 'UNKNOWN'\n if (this._modelType === PrecisionModel.FLOATING) \n description = 'Floating'\n else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n description = 'Floating-Single'\n else if (this._modelType === PrecisionModel.FIXED) \n description = 'Fixed (Scale=' + this.getScale() + ')'\n \n return description\n }\n makePrecise() {\n if (typeof arguments[0] === 'number') {\n const val = arguments[0]\n if (Double.isNaN(val)) return val\n if (this._modelType === PrecisionModel.FLOATING_SINGLE) {\n const floatSingleVal = val\n return floatSingleVal\n }\n if (this._modelType === PrecisionModel.FIXED) \n return Math.round(val * this._scale) / this._scale\n \n return val\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n if (this._modelType === PrecisionModel.FLOATING) return null\n coord.x = this.makePrecise(coord.x)\n coord.y = this.makePrecise(coord.y)\n }\n }\n getMaximumSignificantDigits() {\n let maxSigDigits = 16\n if (this._modelType === PrecisionModel.FLOATING) \n maxSigDigits = 16\n else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n maxSigDigits = 6\n else if (this._modelType === PrecisionModel.FIXED) \n maxSigDigits = 1 + Math.trunc(Math.ceil(Math.log(this.getScale()) / Math.log(10)))\n \n return maxSigDigits\n }\n setScale(scale) {\n this._scale = Math.abs(scale)\n }\n get interfaces_() {\n return [Serializable, Comparable]\n }\n}\nclass Type {\n constructor() {\n Type.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._name = null\n const name = arguments[0]\n this._name = name\n Type.nameToTypeMap.put(name, this)\n }\n readResolve() {\n return Type.nameToTypeMap.get(this._name)\n }\n toString() {\n return this._name\n }\n get interfaces_() {\n return [Serializable]\n }\n}\nType.nameToTypeMap = new HashMap()\nPrecisionModel.Type = Type\nPrecisionModel.FIXED = new Type('FIXED')\nPrecisionModel.FLOATING = new Type('FLOATING')\nPrecisionModel.FLOATING_SINGLE = new Type('FLOATING SINGLE')\nPrecisionModel.maximumPreciseValue = 9007199254740992.0\n","import Geometry from './Geometry.js'\nimport Lineal from './Lineal.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport Dimension from './Dimension.js'\nexport default class MultiLineString extends GeometryCollection {\n constructor() {\n super()\n MultiLineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const lineStrings = arguments[0], factory = arguments[1]\n GeometryCollection.constructor_.call(this, lineStrings, factory)\n }\n copyInternal() {\n const lineStrings = new Array(this._geometries.length).fill(null)\n for (let i = 0; i < lineStrings.length; i++) \n lineStrings[i] = this._geometries[i].copy()\n \n return new MultiLineString(lineStrings, this._factory)\n }\n equalsExact() {\n if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n const other = arguments[0], tolerance = arguments[1]\n if (!this.isEquivalentClass(other)) \n return false\n \n return super.equalsExact.call(this, other, tolerance)\n } else {\n return super.equalsExact.apply(this, arguments)\n }\n }\n getBoundaryDimension() {\n if (this.isClosed()) \n return Dimension.FALSE\n \n return 0\n }\n isClosed() {\n if (this.isEmpty()) \n return false\n \n for (let i = 0; i < this._geometries.length; i++) \n if (!this._geometries[i].isClosed()) \n return false\n \n \n return true\n }\n getTypeCode() {\n return Geometry.TYPECODE_MULTILINESTRING\n }\n getDimension() {\n return 1\n }\n getBoundary() {\n throw new UnsupportedOperationException()\n }\n getGeometryType() {\n return Geometry.TYPENAME_MULTILINESTRING\n }\n get interfaces_() {\n return [Lineal]\n }\n}\n","import CoordinateSequenceFactory from './CoordinateSequenceFactory.js'\nimport LineString from './LineString.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Point from './Point.js'\nimport Polygon from './Polygon.js'\nimport MultiPoint from './MultiPoint.js'\nimport LinearRing from './LinearRing.js'\nimport CoordinateArraySequenceFactory from './impl/CoordinateArraySequenceFactory.js'\nimport MultiPolygon from './MultiPolygon.js'\nimport CoordinateSequences from './CoordinateSequences.js'\nimport CoordinateSequence from './CoordinateSequence.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport PrecisionModel from './PrecisionModel.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Assert from '../util/Assert.js'\nimport MultiLineString from './MultiLineString.js'\nexport default class GeometryFactory {\n constructor() {\n GeometryFactory.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._precisionModel = null\n this._coordinateSequenceFactory = null\n this._SRID = null\n if (arguments.length === 0) {\n GeometryFactory.constructor_.call(this, new PrecisionModel(), 0)\n } else if (arguments.length === 1) {\n if (hasInterface(arguments[0], CoordinateSequenceFactory)) {\n const coordinateSequenceFactory = arguments[0]\n GeometryFactory.constructor_.call(this, new PrecisionModel(), 0, coordinateSequenceFactory)\n } else if (arguments[0] instanceof PrecisionModel) {\n const precisionModel = arguments[0]\n GeometryFactory.constructor_.call(this, precisionModel, 0, GeometryFactory.getDefaultCoordinateSequenceFactory())\n }\n } else if (arguments.length === 2) {\n const precisionModel = arguments[0], SRID = arguments[1]\n GeometryFactory.constructor_.call(this, precisionModel, SRID, GeometryFactory.getDefaultCoordinateSequenceFactory())\n } else if (arguments.length === 3) {\n const precisionModel = arguments[0], SRID = arguments[1], coordinateSequenceFactory = arguments[2]\n this._precisionModel = precisionModel\n this._coordinateSequenceFactory = coordinateSequenceFactory\n this._SRID = SRID\n }\n }\n static toMultiPolygonArray(multiPolygons) {\n const multiPolygonArray = new Array(multiPolygons.size()).fill(null)\n return multiPolygons.toArray(multiPolygonArray)\n }\n static toGeometryArray(geometries) {\n if (geometries === null) return null\n const geometryArray = new Array(geometries.size()).fill(null)\n return geometries.toArray(geometryArray)\n }\n static getDefaultCoordinateSequenceFactory() {\n return CoordinateArraySequenceFactory.instance()\n }\n static toMultiLineStringArray(multiLineStrings) {\n const multiLineStringArray = new Array(multiLineStrings.size()).fill(null)\n return multiLineStrings.toArray(multiLineStringArray)\n }\n static toLineStringArray(lineStrings) {\n const lineStringArray = new Array(lineStrings.size()).fill(null)\n return lineStrings.toArray(lineStringArray)\n }\n static toMultiPointArray(multiPoints) {\n const multiPointArray = new Array(multiPoints.size()).fill(null)\n return multiPoints.toArray(multiPointArray)\n }\n static toLinearRingArray(linearRings) {\n const linearRingArray = new Array(linearRings.size()).fill(null)\n return linearRings.toArray(linearRingArray)\n }\n static toPointArray(points) {\n const pointArray = new Array(points.size()).fill(null)\n return points.toArray(pointArray)\n }\n static toPolygonArray(polygons) {\n const polygonArray = new Array(polygons.size()).fill(null)\n return polygons.toArray(polygonArray)\n }\n static createPointFromInternalCoord(coord, exemplar) {\n exemplar.getPrecisionModel().makePrecise(coord)\n return exemplar.getFactory().createPoint(coord)\n }\n createEmpty(dimension) {\n switch (dimension) {\n case -1:\n return this.createGeometryCollection()\n case 0:\n return this.createPoint()\n case 1:\n return this.createLineString()\n case 2:\n return this.createPolygon()\n default:\n throw new IllegalArgumentException('Invalid dimension: ' + dimension)\n }\n }\n toGeometry(envelope) {\n if (envelope.isNull()) \n return this.createPoint()\n \n if (envelope.getMinX() === envelope.getMaxX() && envelope.getMinY() === envelope.getMaxY()) \n return this.createPoint(new Coordinate(envelope.getMinX(), envelope.getMinY()))\n \n if (envelope.getMinX() === envelope.getMaxX() || envelope.getMinY() === envelope.getMaxY()) \n return this.createLineString([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY())])\n \n return this.createPolygon(this.createLinearRing([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMinY())]), null)\n }\n createLineString() {\n if (arguments.length === 0) \n return this.createLineString(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return this.createLineString(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new LineString(coordinates, this)\n }\n \n }\n createMultiLineString() {\n if (arguments.length === 0) {\n return new MultiLineString(null, this)\n } else if (arguments.length === 1) {\n const lineStrings = arguments[0]\n return new MultiLineString(lineStrings, this)\n }\n }\n buildGeometry(geomList) {\n let geomType = null\n let isHeterogeneous = false\n let hasGeometryCollection = false\n for (let i = geomList.iterator(); i.hasNext(); ) {\n const geom = i.next()\n const partType = geom.getTypeCode()\n if (geomType === null) \n geomType = partType\n \n if (partType !== geomType) \n isHeterogeneous = true\n \n if (geom instanceof GeometryCollection) hasGeometryCollection = true\n }\n if (geomType === null) \n return this.createGeometryCollection()\n \n if (isHeterogeneous || hasGeometryCollection) \n return this.createGeometryCollection(GeometryFactory.toGeometryArray(geomList))\n \n const geom0 = geomList.iterator().next()\n const isCollection = geomList.size() > 1\n if (isCollection) {\n if (geom0 instanceof Polygon) \n return this.createMultiPolygon(GeometryFactory.toPolygonArray(geomList))\n else if (geom0 instanceof LineString) \n return this.createMultiLineString(GeometryFactory.toLineStringArray(geomList))\n else if (geom0 instanceof Point) \n return this.createMultiPoint(GeometryFactory.toPointArray(geomList))\n \n Assert.shouldNeverReachHere('Unhandled geometry type: ' + geom0.getGeometryType())\n }\n return geom0\n }\n createMultiPointFromCoords(coordinates) {\n return this.createMultiPoint(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n }\n createPoint() {\n if (arguments.length === 0) \n return this.createPoint(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Coordinate) {\n const coordinate = arguments[0]\n return this.createPoint(coordinate !== null ? this.getCoordinateSequenceFactory().create([coordinate]) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new Point(coordinates, this)\n }\n \n }\n getCoordinateSequenceFactory() {\n return this._coordinateSequenceFactory\n }\n createPolygon() {\n if (arguments.length === 0) {\n return this.createPolygon(null, null)\n } else if (arguments.length === 1) {\n if (hasInterface(arguments[0], CoordinateSequence)) {\n const shell = arguments[0]\n return this.createPolygon(this.createLinearRing(shell))\n } else if (arguments[0] instanceof Array) {\n const shell = arguments[0]\n return this.createPolygon(this.createLinearRing(shell))\n } else if (arguments[0] instanceof LinearRing) {\n const shell = arguments[0]\n return this.createPolygon(shell, null)\n }\n } else if (arguments.length === 2) {\n const shell = arguments[0], holes = arguments[1]\n return new Polygon(shell, holes, this)\n }\n }\n getSRID() {\n return this._SRID\n }\n createGeometryCollection() {\n if (arguments.length === 0) {\n return new GeometryCollection(null, this)\n } else if (arguments.length === 1) {\n const geometries = arguments[0]\n return new GeometryCollection(geometries, this)\n }\n }\n getPrecisionModel() {\n return this._precisionModel\n }\n createLinearRing() {\n if (arguments.length === 0) \n return this.createLinearRing(this.getCoordinateSequenceFactory().create([]))\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const coordinates = arguments[0]\n return this.createLinearRing(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n return new LinearRing(coordinates, this)\n }\n \n }\n createMultiPolygon() {\n if (arguments.length === 0) {\n return new MultiPolygon(null, this)\n } else if (arguments.length === 1) {\n const polygons = arguments[0]\n return new MultiPolygon(polygons, this)\n }\n }\n createMultiPoint() {\n if (arguments.length === 0) \n return new MultiPoint(null, this)\n else if (arguments.length === 1) \n if (arguments[0] instanceof Array) {\n const point = arguments[0]\n return new MultiPoint(point, this)\n } else if (hasInterface(arguments[0], CoordinateSequence)) {\n const coordinates = arguments[0]\n if (coordinates === null) \n return this.createMultiPoint(new Array(0).fill(null))\n \n const points = new Array(coordinates.size()).fill(null)\n for (let i = 0; i < coordinates.size(); i++) {\n const ptSeq = this.getCoordinateSequenceFactory().create(1, coordinates.getDimension(), coordinates.getMeasures())\n CoordinateSequences.copy(coordinates, i, ptSeq, 0, 1)\n points[i] = this.createPoint(ptSeq)\n }\n return this.createMultiPoint(points)\n }\n \n }\n get interfaces_() {\n return [Serializable]\n }\n}\n","import LineString from '../LineString.js'\nimport GeometryFactory from '../GeometryFactory.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Point from '../Point.js'\nimport Polygon from '../Polygon.js'\nimport MultiPoint from '../MultiPoint.js'\nimport LinearRing from '../LinearRing.js'\nimport MultiPolygon from '../MultiPolygon.js'\nimport GeometryCollection from '../GeometryCollection.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport MultiLineString from '../MultiLineString.js'\nexport default class GeometryTransformer {\n constructor() {\n GeometryTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._factory = null\n this._pruneEmptyGeometry = true\n this._preserveGeometryCollectionType = true\n this._preserveCollections = false\n this._preserveType = false\n }\n transformPoint(geom, parent) {\n return this._factory.createPoint(this.transformCoordinates(geom.getCoordinateSequence(), geom))\n }\n transformPolygon(geom, parent) {\n let isAllValidLinearRings = true\n const shell = this.transformLinearRing(geom.getExteriorRing(), geom)\n if (shell === null || !(shell instanceof LinearRing) || shell.isEmpty()) isAllValidLinearRings = false\n const holes = new ArrayList()\n for (let i = 0; i < geom.getNumInteriorRing(); i++) {\n const hole = this.transformLinearRing(geom.getInteriorRingN(i), geom)\n if (hole === null || hole.isEmpty()) \n continue\n \n if (!(hole instanceof LinearRing)) isAllValidLinearRings = false\n holes.add(hole)\n }\n if (isAllValidLinearRings) {\n return this._factory.createPolygon(shell, holes.toArray([]))\n } else {\n const components = new ArrayList()\n if (shell !== null) components.add(shell)\n components.addAll(holes)\n return this._factory.buildGeometry(components)\n }\n }\n createCoordinateSequence(coords) {\n return this._factory.getCoordinateSequenceFactory().create(coords)\n }\n getInputGeometry() {\n return this._inputGeom\n }\n transformMultiLineString(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformLineString(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n transformCoordinates(coords, parent) {\n return this.copy(coords)\n }\n transformLineString(geom, parent) {\n return this._factory.createLineString(this.transformCoordinates(geom.getCoordinateSequence(), geom))\n }\n transformMultiPoint(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformPoint(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n transformMultiPolygon(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transformPolygon(geom.getGeometryN(i), geom)\n if (transformGeom === null) continue\n if (transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n return this._factory.buildGeometry(transGeomList)\n }\n copy(seq) {\n return seq.copy()\n }\n transformGeometryCollection(geom, parent) {\n const transGeomList = new ArrayList()\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const transformGeom = this.transform(geom.getGeometryN(i))\n if (transformGeom === null) continue\n if (this._pruneEmptyGeometry && transformGeom.isEmpty()) continue\n transGeomList.add(transformGeom)\n }\n if (this._preserveGeometryCollectionType) return this._factory.createGeometryCollection(GeometryFactory.toGeometryArray(transGeomList))\n return this._factory.buildGeometry(transGeomList)\n }\n transform(inputGeom) {\n this._inputGeom = inputGeom\n this._factory = inputGeom.getFactory()\n if (inputGeom instanceof Point) return this.transformPoint(inputGeom, null)\n if (inputGeom instanceof MultiPoint) return this.transformMultiPoint(inputGeom, null)\n if (inputGeom instanceof LinearRing) return this.transformLinearRing(inputGeom, null)\n if (inputGeom instanceof LineString) return this.transformLineString(inputGeom, null)\n if (inputGeom instanceof MultiLineString) return this.transformMultiLineString(inputGeom, null)\n if (inputGeom instanceof Polygon) return this.transformPolygon(inputGeom, null)\n if (inputGeom instanceof MultiPolygon) return this.transformMultiPolygon(inputGeom, null)\n if (inputGeom instanceof GeometryCollection) return this.transformGeometryCollection(inputGeom, null)\n throw new IllegalArgumentException('Unknown Geometry subtype: ' + inputGeom.getGeometryType())\n }\n transformLinearRing(geom, parent) {\n const seq = this.transformCoordinates(geom.getCoordinateSequence(), geom)\n if (seq === null) return this._factory.createLinearRing(null)\n const seqSize = seq.size()\n if (seqSize > 0 && seqSize < 4 && !this._preserveType) return this._factory.createLineString(seq)\n return this._factory.createLinearRing(seq)\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nexport default class Intersection {\n static intersection(p1, p2, q1, q2) {\n const minX0 = p1.x < p2.x ? p1.x : p2.x\n const minY0 = p1.y < p2.y ? p1.y : p2.y\n const maxX0 = p1.x > p2.x ? p1.x : p2.x\n const maxY0 = p1.y > p2.y ? p1.y : p2.y\n const minX1 = q1.x < q2.x ? q1.x : q2.x\n const minY1 = q1.y < q2.y ? q1.y : q2.y\n const maxX1 = q1.x > q2.x ? q1.x : q2.x\n const maxY1 = q1.y > q2.y ? q1.y : q2.y\n const intMinX = minX0 > minX1 ? minX0 : minX1\n const intMaxX = maxX0 < maxX1 ? maxX0 : maxX1\n const intMinY = minY0 > minY1 ? minY0 : minY1\n const intMaxY = maxY0 < maxY1 ? maxY0 : maxY1\n const midx = (intMinX + intMaxX) / 2.0\n const midy = (intMinY + intMaxY) / 2.0\n const p1x = p1.x - midx\n const p1y = p1.y - midy\n const p2x = p2.x - midx\n const p2y = p2.y - midy\n const q1x = q1.x - midx\n const q1y = q1.y - midy\n const q2x = q2.x - midx\n const q2y = q2.y - midy\n const px = p1y - p2y\n const py = p2x - p1x\n const pw = p1x * p2y - p2x * p1y\n const qx = q1y - q2y\n const qy = q2x - q1x\n const qw = q1x * q2y - q2x * q1y\n const x = py * qw - qy * pw\n const y = qx * pw - px * qw\n const w = px * qy - qx * py\n const xInt = x / w\n const yInt = y / w\n if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n return null\n \n return new Coordinate(xInt + midx, yInt + midy)\n }\n}\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport MathUtil from '../math/MathUtil.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class Distance {\n static segmentToSegment(A, B, C, D) {\n if (A.equals(B)) return Distance.pointToSegment(A, C, D)\n if (C.equals(D)) return Distance.pointToSegment(D, A, B)\n let noIntersection = false\n if (!Envelope.intersects(A, B, C, D)) {\n noIntersection = true\n } else {\n const denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x)\n if (denom === 0) {\n noIntersection = true\n } else {\n const r_num = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y)\n const s_num = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y)\n const s = s_num / denom\n const r = r_num / denom\n if (r < 0 || r > 1 || s < 0 || s > 1) \n noIntersection = true\n \n }\n }\n if (noIntersection) \n return MathUtil.min(Distance.pointToSegment(A, C, D), Distance.pointToSegment(B, C, D), Distance.pointToSegment(C, A, B), Distance.pointToSegment(D, A, B))\n \n return 0.0\n }\n static pointToSegment(p, A, B) {\n if (A.x === B.x && A.y === B.y) return p.distance(A)\n const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n const r = ((p.x - A.x) * (B.x - A.x) + (p.y - A.y) * (B.y - A.y)) / len2\n if (r <= 0.0) return p.distance(A)\n if (r >= 1.0) return p.distance(B)\n const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n return Math.abs(s) * Math.sqrt(len2)\n }\n static pointToLinePerpendicular(p, A, B) {\n const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n return Math.abs(s) * Math.sqrt(len2)\n }\n static pointToSegmentString(p, line) {\n if (line.length === 0) throw new IllegalArgumentException('Line array must contain at least one vertex')\n let minDistance = p.distance(line[0])\n for (let i = 0; i < line.length - 1; i++) {\n const dist = Distance.pointToSegment(p, line[i], line[i + 1])\n if (dist < minDistance) \n minDistance = dist\n \n }\n return minDistance\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport GeometryFactory from '../geom/GeometryFactory.js'\n\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nconst GeometryLayout = {\n XY: 'XY',\n XYZ: 'XYZ',\n XYM: 'XYM',\n XYZM: 'XYZM',\n}\n\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nconst GeometryType = {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n LINEAR_RING: 'LinearRing',\n POLYGON: 'Polygon',\n MULTI_POINT: 'MultiPoint',\n MULTI_LINE_STRING: 'MultiLineString',\n MULTI_POLYGON: 'MultiPolygon',\n GEOMETRY_COLLECTION: 'GeometryCollection',\n CIRCLE: 'Circle',\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number} position\n */\n\n/**\n * @const\n * @type {string}\n */\nconst EMPTY = 'EMPTY'\n\n/**\n * @const\n * @type {string}\n */\nconst Z = 'Z'\n\n/**\n * @const\n * @type {string}\n */\nconst M = 'M'\n\n/**\n * @const\n * @type {string}\n */\nconst ZM = 'ZM'\n\n/**\n * @const\n * @enum {number}\n */\nconst TokenType = {\n TEXT: 1,\n LEFT_PAREN: 2,\n RIGHT_PAREN: 3,\n NUMBER: 4,\n COMMA: 5,\n EOF: 6,\n}\n\n/**\n * @const\n * @type {Object}\n */\nconst WKTGeometryType = {}\nfor (const type in GeometryType)\n WKTGeometryType[type] = GeometryType[type].toUpperCase()\n\n\n/**\n * Class to tokenize a WKT string.\n */\nclass Lexer {\n /**\n * @param {string} wkt WKT string.\n */\n constructor(wkt) {\n /**\n * @type {string}\n */\n this.wkt = wkt\n\n /**\n * @type {number}\n * @private\n */\n this.index_ = -1\n }\n\n /**\n * @param {string} c Character.\n * @return {boolean} Whether the character is alphabetic.\n * @private\n */\n isAlpha_(c) {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')\n }\n\n /**\n * @param {string} c Character.\n * @param {boolean=} opt_decimal Whether the string number\n * contains a dot, i.e. is a decimal number.\n * @return {boolean} Whether the character is numeric.\n * @private\n */\n isNumeric_(c, opt_decimal) {\n const decimal = opt_decimal !== undefined ? opt_decimal : false\n return (c >= '0' && c <= '9') || (c == '.' && !decimal)\n }\n\n /**\n * @param {string} c Character.\n * @return {boolean} Whether the character is whitespace.\n * @private\n */\n isWhiteSpace_(c) {\n return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n'\n }\n\n /**\n * @return {string} Next string character.\n * @private\n */\n nextChar_() {\n return this.wkt.charAt(++this.index_)\n }\n\n /**\n * Fetch and return the next token.\n * @return {!Token} Next string token.\n */\n nextToken() {\n const c = this.nextChar_()\n const position = this.index_\n /** @type {number|string} */\n let value = c\n let type\n\n if (c == '(') {\n type = TokenType.LEFT_PAREN\n } else if (c == ',') {\n type = TokenType.COMMA\n } else if (c == ')') {\n type = TokenType.RIGHT_PAREN\n } else if (this.isNumeric_(c) || c == '-') {\n type = TokenType.NUMBER\n value = this.readNumber_()\n } else if (this.isAlpha_(c)) {\n type = TokenType.TEXT\n value = this.readText_()\n } else if (this.isWhiteSpace_(c)) {\n return this.nextToken()\n } else if (c === '') {\n type = TokenType.EOF\n } else {\n throw new Error('Unexpected character: ' + c)\n }\n\n return { position: position, value: value, type: type }\n }\n\n /**\n * @return {number} Numeric token value.\n * @private\n */\n readNumber_() {\n let c\n const index = this.index_\n let decimal = false\n let scientificNotation = false\n do {\n if (c == '.')\n decimal = true\n else if (c == 'e' || c == 'E')\n scientificNotation = true\n c = this.nextChar_()\n } while (\n this.isNumeric_(c, decimal) ||\n // if we haven't detected a scientific number before, 'e' or 'E'\n // hint that we should continue to read\n (!scientificNotation && (c == 'e' || c == 'E')) ||\n // once we know that we have a scientific number, both '-' and '+'\n // are allowed\n (scientificNotation && (c == '-' || c == '+'))\n )\n return parseFloat(this.wkt.substring(index, this.index_--))\n }\n\n /**\n * @return {string} String token value.\n * @private\n */\n readText_() {\n let c\n const index = this.index_\n do\n c = this.nextChar_()\n while (this.isAlpha_(c))\n return this.wkt.substring(index, this.index_--).toUpperCase()\n }\n}\n\n/**\n * Class to parse the tokens from the WKT string.\n */\nclass Parser {\n /**\n * @param {Lexer} lexer The lexer.\n */\n constructor(lexer, factory) {\n /**\n * @type {Lexer}\n * @private\n */\n this.lexer_ = lexer\n\n /**\n * @type {Token}\n * @private\n */\n this.token_\n\n /**\n * @type {import(\"../geom/GeometryLayout.js\").default}\n * @private\n */\n this.layout_ = GeometryLayout.XY\n\n this.factory = factory\n }\n\n /**\n * Fetch the next token form the lexer and replace the active token.\n * @private\n */\n consume_() {\n this.token_ = this.lexer_.nextToken()\n }\n\n /**\n * Tests if the given type matches the type of the current token.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\n isTokenType(type) {\n const isMatch = this.token_.type == type\n return isMatch\n }\n\n /**\n * If the given type matches the current token, consume it.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\n match(type) {\n const isMatch = this.isTokenType(type)\n if (isMatch) \n this.consume_()\n return isMatch\n }\n\n /**\n * Try to parse the tokens provided by the lexer.\n * @return {import(\"../geom/Geometry.js\").default} The geometry.\n */\n parse() {\n this.consume_()\n const geometry = this.parseGeometry_()\n return geometry\n }\n\n /**\n * Try to parse the dimensional info.\n * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n * @private\n */\n parseGeometryLayout_() {\n let layout = GeometryLayout.XY\n const dimToken = this.token_\n if (this.isTokenType(TokenType.TEXT)) {\n const dimInfo = dimToken.value\n if (dimInfo === Z)\n layout = GeometryLayout.XYZ\n else if (dimInfo === M)\n layout = GeometryLayout.XYM\n else if (dimInfo === ZM)\n layout = GeometryLayout.XYZM\n if (layout !== GeometryLayout.XY)\n this.consume_()\n }\n return layout\n }\n\n /**\n * @return {!Array} A collection of geometries.\n * @private\n */\n parseGeometryCollectionText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const geometries = []\n do\n geometries.push(this.parseGeometry_())\n while (this.match(TokenType.COMMA))\n if (this.match(TokenType.RIGHT_PAREN)) \n return geometries\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {Array} All values in a point.\n * @private\n */\n parsePointText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePoint_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return null\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} All points in a linestring.\n * @private\n */\n parseLineStringText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePointList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>} All points in a polygon.\n * @private\n */\n parsePolygonText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parseLineStringTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} All points in a multipoint.\n * @private\n */\n parseMultiPointText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n let coordinates\n if (this.token_.type == TokenType.LEFT_PAREN) \n coordinates = this.parsePointTextList_()\n else\n coordinates = this.parsePointList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>} All linestring points\n * in a multilinestring.\n * @private\n */\n parseMultiLineStringText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parseLineStringTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>>>} All polygon points in a multipolygon.\n * @private\n */\n parseMultiPolygonText_() {\n if (this.match(TokenType.LEFT_PAREN)) {\n const coordinates = this.parsePolygonTextList_()\n if (this.match(TokenType.RIGHT_PAREN)) \n return coordinates\n } else if (this.isEmptyGeometry_()) {\n return []\n }\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array} A point.\n * @private\n */\n parsePoint_() {\n const coordinates = []\n const dimensions = this.layout_.length\n for (let i = 0; i < dimensions; ++i) {\n const token = this.token_\n if (this.match(TokenType.NUMBER)) \n coordinates.push(/** @type {number} */(token.value))\n else\n break\n }\n if (coordinates.length == dimensions) \n return coordinates\n throw new Error(this.formatErrorMessage_())\n }\n\n /**\n * @return {!Array>} An array of points.\n * @private\n */\n parsePointList_() {\n const coordinates = [this.parsePoint_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePoint_())\n return coordinates\n }\n\n /**\n * @return {!Array>} An array of points.\n * @private\n */\n parsePointTextList_() {\n const coordinates = [this.parsePointText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePointText_())\n return coordinates\n }\n\n /**\n * @return {!Array>>} An array of points.\n * @private\n */\n parseLineStringTextList_() {\n const coordinates = [this.parseLineStringText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parseLineStringText_())\n return coordinates\n }\n\n /**\n * @return {!Array>>>} An array of points.\n * @private\n */\n parsePolygonTextList_() {\n const coordinates = [this.parsePolygonText_()]\n while (this.match(TokenType.COMMA))\n coordinates.push(this.parsePolygonText_())\n return coordinates\n }\n\n /**\n * @return {boolean} Whether the token implies an empty geometry.\n * @private\n */\n isEmptyGeometry_() {\n const isEmpty =\n this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY\n if (isEmpty)\n this.consume_()\n return isEmpty\n }\n\n /**\n * Create an error message for an unexpected token error.\n * @return {string} Error message.\n * @private\n */\n formatErrorMessage_() {\n return (\n 'Unexpected `' +\n this.token_.value +\n '` at position ' +\n this.token_.position +\n ' in `' +\n this.lexer_.wkt +\n '`'\n )\n }\n\n /**\n * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n * @private\n */\n parseGeometry_() {\n const factory = this.factory\n\n const o2c = ordinates => new Coordinate(...ordinates)\n const ca2p = coordinates => {\n const rings = coordinates.map(a => factory.createLinearRing(a.map(o2c)))\n if (rings.length > 1)\n return factory.createPolygon(rings[0], rings.slice(1))\n else\n return factory.createPolygon(rings[0])\n }\n\n const token = this.token_\n if (this.match(TokenType.TEXT)) {\n const geomType = token.value\n this.layout_ = this.parseGeometryLayout_()\n if (geomType == 'GEOMETRYCOLLECTION') {\n const geometries = this.parseGeometryCollectionText_()\n return factory.createGeometryCollection(geometries)\n } else {\n switch (geomType) {\n case 'POINT': {\n const ordinates = this.parsePointText_()\n if (!ordinates)\n return factory.createPoint()\n return factory.createPoint(new Coordinate(...ordinates))\n }\n case 'LINESTRING': {\n const coordinates = this.parseLineStringText_()\n const components = coordinates.map(o2c)\n return factory.createLineString(components)\n }\n case 'LINEARRING': {\n const coordinates = this.parseLineStringText_()\n const components = coordinates.map(o2c)\n return factory.createLinearRing(components)\n }\n case 'POLYGON': {\n const coordinates = this.parsePolygonText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createPolygon()\n return ca2p(coordinates)\n }\n case 'MULTIPOINT': {\n const coordinates = this.parseMultiPointText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createMultiPoint()\n const components = coordinates.map(o2c).map(c => factory.createPoint(c))\n return factory.createMultiPoint(components)\n }\n case 'MULTILINESTRING': {\n const coordinates = this.parseMultiLineStringText_()\n const components = coordinates.map(a => factory.createLineString(a.map(o2c)))\n return factory.createMultiLineString(components)\n }\n case 'MULTIPOLYGON': {\n const coordinates = this.parseMultiPolygonText_()\n if (!coordinates || coordinates.length === 0)\n return factory.createMultiPolygon()\n const polygons = coordinates.map(ca2p)\n return factory.createMultiPolygon(polygons)\n }\n default: {\n throw new Error('Invalid geometry type: ' + geomType)\n }\n }\n }\n }\n throw new Error(this.formatErrorMessage_())\n }\n}\n\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n if (geom.isEmpty())\n return ''\n const c = geom.getCoordinate()\n const cs = [c.x, c.y]\n if (c.z !== undefined && !Number.isNaN(c.z))\n cs.push(c.z)\n if (c.m !== undefined && !Number.isNaN(c.m))\n cs.push(c.m)\n return cs.join(' ')\n}\n\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodePointGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push(encode(geom.getGeometryN(i)))\n return array.join(', ')\n}\n\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n const coordinates = geom.getCoordinates()\n .map(c => {\n const a = [c.x, c.y]\n if (c.z !== undefined && !Number.isNaN(c.z))\n a.push(c.z)\n if (c.m !== undefined && !Number.isNaN(c.m))\n a.push(c.m)\n return a\n })\n const array = []\n for (let i = 0, ii = coordinates.length; i < ii; ++i) \n array.push(coordinates[i].join(' '))\n return array.join(', ')\n}\n\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodeLineStringGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n const array = []\n array.push('(' + encodeLineStringGeometry(geom.getExteriorRing()) + ')')\n for (let i = 0, ii = geom.getNumInteriorRing(); i < ii; ++i) \n array.push('(' + encodeLineStringGeometry(geom.getInteriorRingN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n const array = []\n for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n array.push('(' + encodePolygonGeometry(geom.getGeometryN(i)) + ')')\n return array.join(', ')\n}\n\n/**\n * @param {Geometry} geom Geometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n let dimInfo = ''\n if (geom.isEmpty())\n return dimInfo\n const c = geom.getCoordinate()\n if (c.z !== undefined && !Number.isNaN(c.z))\n dimInfo += Z\n if (c.m !== undefined && !Number.isNaN(c.m))\n dimInfo += M\n return dimInfo\n}\n\n/**\n * @const\n * @type {Object}\n */\nconst GeometryEncoder = {\n 'Point': encodePointGeometry,\n 'LineString': encodeLineStringGeometry,\n 'LinearRing': encodeLineStringGeometry,\n 'Polygon': encodePolygonGeometry,\n 'MultiPoint': encodeMultiPointGeometry,\n 'MultiLineString': encodeMultiLineStringGeometry,\n 'MultiPolygon': encodeMultiPolygonGeometry,\n 'GeometryCollection': encodeGeometryCollectionGeometry,\n}\n\n/**\n * Encode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n let type = geom.getGeometryType()\n const geometryEncoder = GeometryEncoder[type]\n type = type.toUpperCase()\n const dimInfo = encodeGeometryLayout(geom)\n if (dimInfo.length > 0) \n type += ' ' + dimInfo\n if (geom.isEmpty()) \n return type + ' ' + EMPTY\n const enc = geometryEncoder(geom)\n return type + ' (' + enc + ')'\n}\n\n/**\n * Class for reading and writing Well-Known Text.\n *\n * NOTE: Adapted from OpenLayers.\n */\n\nexport default class WKTParser {\n /** Create a new parser for WKT\n *\n * @param {GeometryFactory} geometryFactory\n * @return An instance of WKTParser.\n * @private\n */\n constructor(geometryFactory) {\n this.geometryFactory = geometryFactory || new GeometryFactory()\n this.precisionModel = this.geometryFactory.getPrecisionModel()\n }\n\n /**\n * Deserialize a WKT string and return a geometry. Supports WKT for POINT,\n * MULTIPOINT, LINESTRING, LINEARRING, MULTILINESTRING, POLYGON, MULTIPOLYGON,\n * and GEOMETRYCOLLECTION.\n *\n * @param {String} wkt A WKT string.\n * @return {Geometry} A geometry instance.\n * @private\n */\n read(wkt) {\n const lexer = new Lexer(wkt)\n const parser = new Parser(lexer, this.geometryFactory)\n const geometry = parser.parse()\n return geometry\n }\n\n /**\n * Serialize a geometry into a WKT string.\n *\n * @param {Geometry} geometry A feature or array of features.\n * @return {String} The WKT string representation of the input geometries.\n * @private\n */\n write(geometry) {\n return encode(geometry)\n }\n}\n","/**\n * @module org/locationtech/jts/io/WKTWriter\n */\n\nimport WKTParser from './WKTParser.js'\n\n/**\n * Writes the Well-Known Text representation of a {@link Geometry}. The\n * Well-Known Text format is defined in the OGC Simple Features\n * Specification for SQL.\n *

\n * The WKTWriter outputs coordinates rounded to the precision\n * model. Only the maximum number of decimal places necessary to represent the\n * ordinates to the required precision will be output.\n *

\n * The SFS WKT spec does not define a special tag for {@link LinearRing}s.\n * Under the spec, rings are output as LINESTRINGs.\n */\nexport default class WKTWriter {\n /**\n * @param {GeometryFactory} geometryFactory\n */\n constructor(geometryFactory) {\n this.parser = new WKTParser(geometryFactory)\n }\n\n /**\n * Converts a Geometry to its Well-known Text representation.\n *\n * @param {Geometry} geometry a Geometry to process.\n * @return {string} a string (see the OpenGIS Simple\n * Features Specification).\n * @memberof module:org/locationtech/jts/io/WKTWriter#\n */\n write(geometry) {\n return this.parser.write(geometry)\n }\n\n /**\n * Generates the WKT for a LINESTRING specified by two\n * {@link Coordinate}s.\n *\n * @param p0 the first coordinate.\n * @param p1 the second coordinate.\n *\n * @return the WKT.\n * @private\n */\n static toLineString(p0, p1) {\n if (arguments.length !== 2) throw new Error('Not implemented')\n\n return 'LINESTRING ( ' + p0.x + ' ' + p0.y + ', ' + p1.x + ' ' + p1.y + ' )'\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Assert from '../util/Assert.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nexport default class LineIntersector {\n constructor() {\n LineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._result = null\n this._inputLines = Array(2).fill().map(() => Array(2))\n this._intPt = new Array(2).fill(null)\n this._intLineIndex = null\n this._isProper = null\n this._pa = null\n this._pb = null\n this._precisionModel = null\n this._intPt[0] = new Coordinate()\n this._intPt[1] = new Coordinate()\n this._pa = this._intPt[0]\n this._pb = this._intPt[1]\n this._result = 0\n }\n static computeEdgeDistance(p, p0, p1) {\n const dx = Math.abs(p1.x - p0.x)\n const dy = Math.abs(p1.y - p0.y)\n let dist = -1.0\n if (p.equals(p0)) {\n dist = 0.0\n } else if (p.equals(p1)) {\n if (dx > dy) dist = dx; else dist = dy\n } else {\n const pdx = Math.abs(p.x - p0.x)\n const pdy = Math.abs(p.y - p0.y)\n if (dx > dy) dist = pdx; else dist = pdy\n if (dist === 0.0 && !p.equals(p0)) \n dist = Math.max(pdx, pdy)\n \n }\n Assert.isTrue(!(dist === 0.0 && !p.equals(p0)), 'Bad distance calculation')\n return dist\n }\n static nonRobustComputeEdgeDistance(p, p1, p2) {\n const dx = p.x - p1.x\n const dy = p.y - p1.y\n const dist = Math.sqrt(dx * dx + dy * dy)\n Assert.isTrue(!(dist === 0.0 && !p.equals(p1)), 'Invalid distance calculation')\n return dist\n }\n getIndexAlongSegment(segmentIndex, intIndex) {\n this.computeIntLineIndex()\n return this._intLineIndex[segmentIndex][intIndex]\n }\n getTopologySummary() {\n const catBuilder = new StringBuilder()\n if (this.isEndPoint()) catBuilder.append(' endpoint')\n if (this._isProper) catBuilder.append(' proper')\n if (this.isCollinear()) catBuilder.append(' collinear')\n return catBuilder.toString()\n }\n computeIntersection(p1, p2, p3, p4) {\n this._inputLines[0][0] = p1\n this._inputLines[0][1] = p2\n this._inputLines[1][0] = p3\n this._inputLines[1][1] = p4\n this._result = this.computeIntersect(p1, p2, p3, p4)\n }\n getIntersectionNum() {\n return this._result\n }\n computeIntLineIndex() {\n if (arguments.length === 0) {\n if (this._intLineIndex === null) {\n this._intLineIndex = Array(2).fill().map(() => Array(2))\n this.computeIntLineIndex(0)\n this.computeIntLineIndex(1)\n }\n } else if (arguments.length === 1) {\n const segmentIndex = arguments[0]\n const dist0 = this.getEdgeDistance(segmentIndex, 0)\n const dist1 = this.getEdgeDistance(segmentIndex, 1)\n if (dist0 > dist1) {\n this._intLineIndex[segmentIndex][0] = 0\n this._intLineIndex[segmentIndex][1] = 1\n } else {\n this._intLineIndex[segmentIndex][0] = 1\n this._intLineIndex[segmentIndex][1] = 0\n }\n }\n }\n isProper() {\n return this.hasIntersection() && this._isProper\n }\n setPrecisionModel(precisionModel) {\n this._precisionModel = precisionModel\n }\n isInteriorIntersection() {\n if (arguments.length === 0) {\n if (this.isInteriorIntersection(0)) return true\n if (this.isInteriorIntersection(1)) return true\n return false\n } else if (arguments.length === 1) {\n const inputLineIndex = arguments[0]\n for (let i = 0; i < this._result; i++) \n if (!(this._intPt[i].equals2D(this._inputLines[inputLineIndex][0]) || this._intPt[i].equals2D(this._inputLines[inputLineIndex][1]))) \n return true\n \n \n return false\n }\n }\n getIntersection(intIndex) {\n return this._intPt[intIndex]\n }\n isEndPoint() {\n return this.hasIntersection() && !this._isProper\n }\n hasIntersection() {\n return this._result !== LineIntersector.NO_INTERSECTION\n }\n getEdgeDistance(segmentIndex, intIndex) {\n const dist = LineIntersector.computeEdgeDistance(this._intPt[intIndex], this._inputLines[segmentIndex][0], this._inputLines[segmentIndex][1])\n return dist\n }\n isCollinear() {\n return this._result === LineIntersector.COLLINEAR_INTERSECTION\n }\n toString() {\n return WKTWriter.toLineString(this._inputLines[0][0], this._inputLines[0][1]) + ' - ' + WKTWriter.toLineString(this._inputLines[1][0], this._inputLines[1][1]) + this.getTopologySummary()\n }\n getEndpoint(segmentIndex, ptIndex) {\n return this._inputLines[segmentIndex][ptIndex]\n }\n isIntersection(pt) {\n for (let i = 0; i < this._result; i++) \n if (this._intPt[i].equals2D(pt)) \n return true\n \n \n return false\n }\n getIntersectionAlongSegment(segmentIndex, intIndex) {\n this.computeIntLineIndex()\n return this._intPt[this._intLineIndex[segmentIndex][intIndex]]\n }\n}\nLineIntersector.DONT_INTERSECT = 0\nLineIntersector.DO_INTERSECT = 1\nLineIntersector.COLLINEAR = 2\nLineIntersector.NO_INTERSECTION = 0\nLineIntersector.POINT_INTERSECTION = 1\nLineIntersector.COLLINEAR_INTERSECTION = 2\n","import Coordinate from '../geom/Coordinate.js'\nimport Orientation from './Orientation.js'\nimport Intersection from './Intersection.js'\nimport CGAlgorithmsDD from './CGAlgorithmsDD.js'\nimport System from '../../../../java/lang/System.js'\nimport Envelope from '../geom/Envelope.js'\nimport Distance from './Distance.js'\nimport LineIntersector from './LineIntersector.js'\nexport default class RobustLineIntersector extends LineIntersector {\n constructor() {\n super()\n }\n static nearestEndpoint(p1, p2, q1, q2) {\n let nearestPt = p1\n let minDist = Distance.pointToSegment(p1, q1, q2)\n let dist = Distance.pointToSegment(p2, q1, q2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = p2\n }\n dist = Distance.pointToSegment(q1, p1, p2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = q1\n }\n dist = Distance.pointToSegment(q2, p1, p2)\n if (dist < minDist) {\n minDist = dist\n nearestPt = q2\n }\n return nearestPt\n }\n isInSegmentEnvelopes(intPt) {\n const env0 = new Envelope(this._inputLines[0][0], this._inputLines[0][1])\n const env1 = new Envelope(this._inputLines[1][0], this._inputLines[1][1])\n return env0.contains(intPt) && env1.contains(intPt)\n }\n computeIntersection() {\n if (arguments.length === 3) {\n const p = arguments[0], p1 = arguments[1], p2 = arguments[2]\n this._isProper = false\n if (Envelope.intersects(p1, p2, p)) \n if (Orientation.index(p1, p2, p) === 0 && Orientation.index(p2, p1, p) === 0) {\n this._isProper = true\n if (p.equals(p1) || p.equals(p2)) \n this._isProper = false\n \n this._result = LineIntersector.POINT_INTERSECTION\n return null\n }\n \n this._result = LineIntersector.NO_INTERSECTION\n } else {\n return super.computeIntersection.apply(this, arguments)\n }\n }\n intersection(p1, p2, q1, q2) {\n let intPt = this.intersectionSafe(p1, p2, q1, q2)\n if (!this.isInSegmentEnvelopes(intPt)) \n intPt = new Coordinate(RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2))\n \n if (this._precisionModel !== null) \n this._precisionModel.makePrecise(intPt)\n \n return intPt\n }\n checkDD(p1, p2, q1, q2, intPt) {\n const intPtDD = CGAlgorithmsDD.intersection(p1, p2, q1, q2)\n const isIn = this.isInSegmentEnvelopes(intPtDD)\n System.out.println('DD in env = ' + isIn + ' --------------------- ' + intPtDD)\n if (intPt.distance(intPtDD) > 0.0001) \n System.out.println('Distance = ' + intPt.distance(intPtDD))\n \n }\n intersectionSafe(p1, p2, q1, q2) {\n let intPt = Intersection.intersection(p1, p2, q1, q2)\n if (intPt === null) intPt = RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2)\n return intPt\n }\n computeCollinearIntersection(p1, p2, q1, q2) {\n const p1q1p2 = Envelope.intersects(p1, p2, q1)\n const p1q2p2 = Envelope.intersects(p1, p2, q2)\n const q1p1q2 = Envelope.intersects(q1, q2, p1)\n const q1p2q2 = Envelope.intersects(q1, q2, p2)\n if (p1q1p2 && p1q2p2) {\n this._intPt[0] = q1\n this._intPt[1] = q2\n return LineIntersector.COLLINEAR_INTERSECTION\n }\n if (q1p1q2 && q1p2q2) {\n this._intPt[0] = p1\n this._intPt[1] = p2\n return LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q1p2 && q1p1q2) {\n this._intPt[0] = q1\n this._intPt[1] = p1\n return q1.equals(p1) && !p1q2p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q1p2 && q1p2q2) {\n this._intPt[0] = q1\n this._intPt[1] = p2\n return q1.equals(p2) && !p1q2p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q2p2 && q1p1q2) {\n this._intPt[0] = q2\n this._intPt[1] = p1\n return q2.equals(p1) && !p1q1p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n if (p1q2p2 && q1p2q2) {\n this._intPt[0] = q2\n this._intPt[1] = p2\n return q2.equals(p2) && !p1q1p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n }\n return LineIntersector.NO_INTERSECTION\n }\n computeIntersect(p1, p2, q1, q2) {\n this._isProper = false\n if (!Envelope.intersects(p1, p2, q1, q2)) return LineIntersector.NO_INTERSECTION\n const Pq1 = Orientation.index(p1, p2, q1)\n const Pq2 = Orientation.index(p1, p2, q2)\n if (Pq1 > 0 && Pq2 > 0 || Pq1 < 0 && Pq2 < 0) \n return LineIntersector.NO_INTERSECTION\n \n const Qp1 = Orientation.index(q1, q2, p1)\n const Qp2 = Orientation.index(q1, q2, p2)\n if (Qp1 > 0 && Qp2 > 0 || Qp1 < 0 && Qp2 < 0) \n return LineIntersector.NO_INTERSECTION\n \n const collinear = Pq1 === 0 && Pq2 === 0 && Qp1 === 0 && Qp2 === 0\n if (collinear) \n return this.computeCollinearIntersection(p1, p2, q1, q2)\n \n if (Pq1 === 0 || Pq2 === 0 || Qp1 === 0 || Qp2 === 0) {\n this._isProper = false\n if (p1.equals2D(q1) || p1.equals2D(q2)) \n this._intPt[0] = p1\n else if (p2.equals2D(q1) || p2.equals2D(q2)) \n this._intPt[0] = p2\n else if (Pq1 === 0) \n this._intPt[0] = new Coordinate(q1)\n else if (Pq2 === 0) \n this._intPt[0] = new Coordinate(q2)\n else if (Qp1 === 0) \n this._intPt[0] = new Coordinate(p1)\n else if (Qp2 === 0) \n this._intPt[0] = new Coordinate(p2)\n \n } else {\n this._isProper = true\n this._intPt[0] = this.intersection(p1, p2, q1, q2)\n }\n return LineIntersector.POINT_INTERSECTION\n }\n}\n","import Coordinate from './Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport Intersection from '../algorithm/Intersection.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport Serializable from '../../../../java/io/Serializable.js'\nimport Distance from '../algorithm/Distance.js'\nexport default class LineSegment {\n constructor() {\n LineSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.p0 = null\n this.p1 = null\n if (arguments.length === 0) {\n LineSegment.constructor_.call(this, new Coordinate(), new Coordinate())\n } else if (arguments.length === 1) {\n const ls = arguments[0]\n LineSegment.constructor_.call(this, ls.p0, ls.p1)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n this.p0 = p0\n this.p1 = p1\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n LineSegment.constructor_.call(this, new Coordinate(x0, y0), new Coordinate(x1, y1))\n }\n }\n static midPoint(p0, p1) {\n return new Coordinate((p0.x + p1.x) / 2, (p0.y + p1.y) / 2)\n }\n minX() {\n return Math.min(this.p0.x, this.p1.x)\n }\n orientationIndex() {\n if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n const orient0 = Orientation.index(this.p0, this.p1, seg.p0)\n const orient1 = Orientation.index(this.p0, this.p1, seg.p1)\n if (orient0 >= 0 && orient1 >= 0) return Math.max(orient0, orient1)\n if (orient0 <= 0 && orient1 <= 0) return Math.max(orient0, orient1)\n return 0\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return Orientation.index(this.p0, this.p1, p)\n }\n }\n toGeometry(geomFactory) {\n return geomFactory.createLineString([this.p0, this.p1])\n }\n isVertical() {\n return this.p0.x === this.p1.x\n }\n equals(o) {\n if (!(o instanceof LineSegment)) \n return false\n \n const other = o\n return this.p0.equals(other.p0) && this.p1.equals(other.p1)\n }\n intersection(line) {\n const li = new RobustLineIntersector()\n li.computeIntersection(this.p0, this.p1, line.p0, line.p1)\n if (li.hasIntersection()) return li.getIntersection(0)\n return null\n }\n project() {\n if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n if (p.equals(this.p0) || p.equals(this.p1)) return new Coordinate(p)\n const r = this.projectionFactor(p)\n const coord = new Coordinate()\n coord.x = this.p0.x + r * (this.p1.x - this.p0.x)\n coord.y = this.p0.y + r * (this.p1.y - this.p0.y)\n return coord\n } else if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n const pf0 = this.projectionFactor(seg.p0)\n const pf1 = this.projectionFactor(seg.p1)\n if (pf0 >= 1.0 && pf1 >= 1.0) return null\n if (pf0 <= 0.0 && pf1 <= 0.0) return null\n let newp0 = this.project(seg.p0)\n if (pf0 < 0.0) newp0 = this.p0\n if (pf0 > 1.0) newp0 = this.p1\n let newp1 = this.project(seg.p1)\n if (pf1 < 0.0) newp1 = this.p0\n if (pf1 > 1.0) newp1 = this.p1\n return new LineSegment(newp0, newp1)\n }\n }\n normalize() {\n if (this.p1.compareTo(this.p0) < 0) this.reverse()\n }\n angle() {\n return Math.atan2(this.p1.y - this.p0.y, this.p1.x - this.p0.x)\n }\n getCoordinate(i) {\n if (i === 0) return this.p0\n return this.p1\n }\n distancePerpendicular(p) {\n return Distance.pointToLinePerpendicular(p, this.p0, this.p1)\n }\n minY() {\n return Math.min(this.p0.y, this.p1.y)\n }\n midPoint() {\n return LineSegment.midPoint(this.p0, this.p1)\n }\n projectionFactor(p) {\n if (p.equals(this.p0)) return 0.0\n if (p.equals(this.p1)) return 1.0\n const dx = this.p1.x - this.p0.x\n const dy = this.p1.y - this.p0.y\n const len = dx * dx + dy * dy\n if (len <= 0.0) return Double.NaN\n const r = ((p.x - this.p0.x) * dx + (p.y - this.p0.y) * dy) / len\n return r\n }\n closestPoints(line) {\n const intPt = this.intersection(line)\n if (intPt !== null) \n return [intPt, intPt]\n \n const closestPt = new Array(2).fill(null)\n let minDistance = Double.MAX_VALUE\n let dist = null\n const close00 = this.closestPoint(line.p0)\n minDistance = close00.distance(line.p0)\n closestPt[0] = close00\n closestPt[1] = line.p0\n const close01 = this.closestPoint(line.p1)\n dist = close01.distance(line.p1)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = close01\n closestPt[1] = line.p1\n }\n const close10 = line.closestPoint(this.p0)\n dist = close10.distance(this.p0)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = this.p0\n closestPt[1] = close10\n }\n const close11 = line.closestPoint(this.p1)\n dist = close11.distance(this.p1)\n if (dist < minDistance) {\n minDistance = dist\n closestPt[0] = this.p1\n closestPt[1] = close11\n }\n return closestPt\n }\n closestPoint(p) {\n const factor = this.projectionFactor(p)\n if (factor > 0 && factor < 1) \n return this.project(p)\n \n const dist0 = this.p0.distance(p)\n const dist1 = this.p1.distance(p)\n if (dist0 < dist1) return this.p0\n return this.p1\n }\n maxX() {\n return Math.max(this.p0.x, this.p1.x)\n }\n getLength() {\n return this.p0.distance(this.p1)\n }\n compareTo(o) {\n const other = o\n const comp0 = this.p0.compareTo(other.p0)\n if (comp0 !== 0) return comp0\n return this.p1.compareTo(other.p1)\n }\n reverse() {\n const temp = this.p0\n this.p0 = this.p1\n this.p1 = temp\n }\n equalsTopo(other) {\n return this.p0.equals(other.p0) && this.p1.equals(other.p1) || this.p0.equals(other.p1) && this.p1.equals(other.p0)\n }\n lineIntersection(line) {\n const intPt = Intersection.intersection(this.p0, this.p1, line.p0, line.p1)\n return intPt\n }\n maxY() {\n return Math.max(this.p0.y, this.p1.y)\n }\n pointAlongOffset(segmentLengthFraction, offsetDistance) {\n const segx = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n const segy = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n const dx = this.p1.x - this.p0.x\n const dy = this.p1.y - this.p0.y\n const len = Math.sqrt(dx * dx + dy * dy)\n let ux = 0.0\n let uy = 0.0\n if (offsetDistance !== 0.0) {\n if (len <= 0.0) throw new IllegalStateException('Cannot compute offset from zero-length line segment')\n ux = offsetDistance * dx / len\n uy = offsetDistance * dy / len\n }\n const offsetx = segx - uy\n const offsety = segy + ux\n const coord = new Coordinate(offsetx, offsety)\n return coord\n }\n setCoordinates() {\n if (arguments.length === 1) {\n const ls = arguments[0]\n this.setCoordinates(ls.p0, ls.p1)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n this.p0.x = p0.x\n this.p0.y = p0.y\n this.p1.x = p1.x\n this.p1.y = p1.y\n }\n }\n segmentFraction(inputPt) {\n let segFrac = this.projectionFactor(inputPt)\n if (segFrac < 0.0) segFrac = 0.0; else if (segFrac > 1.0 || Double.isNaN(segFrac)) segFrac = 1.0\n return segFrac\n }\n toString() {\n return 'LINESTRING( ' + this.p0.x + ' ' + this.p0.y + ', ' + this.p1.x + ' ' + this.p1.y + ')'\n }\n isHorizontal() {\n return this.p0.y === this.p1.y\n }\n reflect(p) {\n const A = this.p1.getY() - this.p0.getY()\n const B = this.p0.getX() - this.p1.getX()\n const C = this.p0.getY() * (this.p1.getX() - this.p0.getX()) - this.p0.getX() * (this.p1.getY() - this.p0.getY())\n const A2plusB2 = A * A + B * B\n const A2subB2 = A * A - B * B\n const x = p.getX()\n const y = p.getY()\n const rx = (-A2subB2 * x - 2 * A * B * y - 2 * A * C) / A2plusB2\n const ry = (A2subB2 * y - 2 * A * B * x - 2 * B * C) / A2plusB2\n return new Coordinate(rx, ry)\n }\n distance() {\n if (arguments[0] instanceof LineSegment) {\n const ls = arguments[0]\n return Distance.segmentToSegment(this.p0, this.p1, ls.p0, ls.p1)\n } else if (arguments[0] instanceof Coordinate) {\n const p = arguments[0]\n return Distance.pointToSegment(p, this.p0, this.p1)\n }\n }\n pointAlong(segmentLengthFraction) {\n const coord = new Coordinate()\n coord.x = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n coord.y = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n return coord\n }\n hashCode() {\n let bits0 = Double.doubleToLongBits(this.p0.x)\n bits0 ^= Double.doubleToLongBits(this.p0.y) * 31\n const hash0 = Math.trunc(bits0) ^ Math.trunc(bits0 >> 32)\n let bits1 = Double.doubleToLongBits(this.p1.x)\n bits1 ^= Double.doubleToLongBits(this.p1.y) * 31\n const hash1 = Math.trunc(bits1) ^ Math.trunc(bits1 >> 32)\n return hash0 ^ hash1\n }\n get interfaces_() {\n return [Comparable, Serializable]\n }\n}\n","/**\n * @module org/locationtech/jts/io/WKTReader\n */\n\nimport GeometryFactory from '../geom/GeometryFactory.js'\nimport WKTParser from './WKTParser.js'\n\n/**\n * Converts a geometry in Well-Known Text format to a {@link Geometry}.\n *

\n * WKTReader supports extracting Geometry objects\n * from either {@link Reader}s or {@link String}s. This allows it to function\n * as a parser to read Geometry objects from text blocks embedded\n * in other data formats (e.g. XML).\n */\n\nexport default class WKTReader {\n /**\n * A WKTReader is parameterized by a GeometryFactory,\n * to allow it to create Geometry objects of the appropriate\n * implementation. In particular, the GeometryFactory determines\n * the PrecisionModel and SRID that is used.\n * @param {GeometryFactory} geometryFactory\n */\n constructor(geometryFactory) {\n this.parser = new WKTParser(geometryFactory || new GeometryFactory())\n }\n\n /**\n * Reads a Well-Known Text representation of a {@link Geometry}\n *\n * @param {string}\n * wkt a string (see the OpenGIS Simple Features\n * Specification).\n * @return {Geometry} a Geometry read from\n * string.\n * @memberof module:org/locationtech/jts/io/WKTReader#\n */\n read(wkt) {\n return this.parser.read(wkt)\n }\n}\n","export default class BufferParameters {\n constructor() {\n BufferParameters.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n this._endCapStyle = BufferParameters.CAP_ROUND\n this._joinStyle = BufferParameters.JOIN_ROUND\n this._mitreLimit = BufferParameters.DEFAULT_MITRE_LIMIT\n this._isSingleSided = false\n this._simplifyFactor = BufferParameters.DEFAULT_SIMPLIFY_FACTOR\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const quadrantSegments = arguments[0]\n this.setQuadrantSegments(quadrantSegments)\n } else if (arguments.length === 2) {\n const quadrantSegments = arguments[0], endCapStyle = arguments[1]\n this.setQuadrantSegments(quadrantSegments)\n this.setEndCapStyle(endCapStyle)\n } else if (arguments.length === 4) {\n const quadrantSegments = arguments[0], endCapStyle = arguments[1], joinStyle = arguments[2], mitreLimit = arguments[3]\n this.setQuadrantSegments(quadrantSegments)\n this.setEndCapStyle(endCapStyle)\n this.setJoinStyle(joinStyle)\n this.setMitreLimit(mitreLimit)\n }\n }\n static bufferDistanceError(quadSegs) {\n const alpha = Math.PI / 2.0 / quadSegs\n return 1 - Math.cos(alpha / 2.0)\n }\n getEndCapStyle() {\n return this._endCapStyle\n }\n isSingleSided() {\n return this._isSingleSided\n }\n setQuadrantSegments(quadSegs) {\n this._quadrantSegments = quadSegs\n if (this._quadrantSegments === 0) this._joinStyle = BufferParameters.JOIN_BEVEL\n if (this._quadrantSegments < 0) {\n this._joinStyle = BufferParameters.JOIN_MITRE\n this._mitreLimit = Math.abs(this._quadrantSegments)\n }\n if (quadSegs <= 0) \n this._quadrantSegments = 1\n \n if (this._joinStyle !== BufferParameters.JOIN_ROUND) \n this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n \n }\n getJoinStyle() {\n return this._joinStyle\n }\n setJoinStyle(joinStyle) {\n this._joinStyle = joinStyle\n }\n setSimplifyFactor(simplifyFactor) {\n this._simplifyFactor = simplifyFactor < 0 ? 0 : simplifyFactor\n }\n getSimplifyFactor() {\n return this._simplifyFactor\n }\n getQuadrantSegments() {\n return this._quadrantSegments\n }\n setEndCapStyle(endCapStyle) {\n this._endCapStyle = endCapStyle\n }\n getMitreLimit() {\n return this._mitreLimit\n }\n setMitreLimit(mitreLimit) {\n this._mitreLimit = mitreLimit\n }\n setSingleSided(isSingleSided) {\n this._isSingleSided = isSingleSided\n }\n}\nBufferParameters.CAP_ROUND = 1\nBufferParameters.CAP_FLAT = 2\nBufferParameters.CAP_SQUARE = 3\nBufferParameters.JOIN_ROUND = 1\nBufferParameters.JOIN_MITRE = 2\nBufferParameters.JOIN_BEVEL = 3\nBufferParameters.DEFAULT_QUADRANT_SEGMENTS = 8\nBufferParameters.DEFAULT_MITRE_LIMIT = 5.0\nBufferParameters.DEFAULT_SIMPLIFY_FACTOR = 0.01\n","import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Location {\n static toLocationSymbol(locationValue) {\n switch (locationValue) {\n case Location.EXTERIOR:\n return 'e'\n case Location.BOUNDARY:\n return 'b'\n case Location.INTERIOR:\n return 'i'\n case Location.NONE:\n return '-'\n }\n throw new IllegalArgumentException('Unknown location value: ' + locationValue)\n }\n}\nLocation.INTERIOR = 0\nLocation.BOUNDARY = 1\nLocation.EXTERIOR = 2\nLocation.NONE = -1\n","export default class Position {\n static opposite(position) {\n if (position === Position.LEFT) return Position.RIGHT\n if (position === Position.RIGHT) return Position.LEFT\n return position\n }\n}\nPosition.ON = 0\nPosition.LEFT = 1\nPosition.RIGHT = 2\n","import Exception from '../lang/Exception.js'\n\nexport default class EmptyStackException extends Exception {\n constructor(message) {\n super(message)\n this.name = Object.keys({ EmptyStackException })[0]\n }\n}\n","import EmptyStackException from './EmptyStackException.js'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException.js'\nimport List from './List.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Stack.html\n */\nexport default class Stack extends List {\n constructor() {\n super()\n this.array = []\n }\n\n add(e) {\n this.array.push(e)\n return true\n }\n\n get(index) {\n if (index < 0 || index >= this.size())\n throw new IndexOutOfBoundsException()\n return this.array[index]\n }\n\n /**\n * Pushes an item onto the top of this stack.\n * @param {Object} e\n * @return {Object}\n */\n push(e) {\n this.array.push(e)\n return e\n }\n\n /**\n * Removes the object at the top of this stack and returns that object as the value of this function.\n * @return {Object}\n */\n pop() {\n if (this.array.length === 0)\n throw new EmptyStackException()\n return this.array.pop()\n }\n\n /**\n * Looks at the object at the top of this stack without removing it from the\n * stack.\n * @return {Object}\n */\n peek() {\n if (this.array.length === 0)\n throw new EmptyStackException()\n return this.array[this.array.length - 1]\n }\n\n /**\n * Tests if this stack is empty.\n * @return {boolean} true if and only if this stack contains no items; false\n * otherwise.\n */\n empty() {\n return this.array.length === 0\n }\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.empty()\n }\n\n /**\n * Returns the 1-based position where an object is on this stack. If the object\n * o occurs as an item in this stack, this method returns the distance from the\n * top of the stack of the occurrence nearest the top of the stack; the topmost\n * item on the stack is considered to be at distance 1. The equals method is\n * used to compare o to the items in this stack.\n *\n * NOTE: does not currently actually use equals. (=== is used)\n *\n * @param {Object} o\n * @return {number} the 1-based position from the top of the stack where the\n * object is located; the return value -1 indicates that the object is\n * not on the stack.\n */\n search(o) {\n return this.array.indexOf(o)\n }\n\n /**\n * @return {number}\n */\n size() {\n return this.array.length\n }\n\n /**\n * @return {Array}\n */\n toArray() {\n return this.array.slice()\n }\n}\n","import Position from '../../geomgraph/Position.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Assert from '../../util/Assert.js'\nexport default class RightmostEdgeFinder {\n constructor() {\n RightmostEdgeFinder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._minIndex = -1\n this._minCoord = null\n this._minDe = null\n this._orientedDe = null\n }\n getCoordinate() {\n return this._minCoord\n }\n getRightmostSide(de, index) {\n let side = this.getRightmostSideOfSegment(de, index)\n if (side < 0) side = this.getRightmostSideOfSegment(de, index - 1)\n if (side < 0) {\n this._minCoord = null\n this.checkForRightmostCoordinate(de)\n }\n return side\n }\n findRightmostEdgeAtVertex() {\n const pts = this._minDe.getEdge().getCoordinates()\n Assert.isTrue(this._minIndex > 0 && this._minIndex < pts.length, 'rightmost point expected to be interior vertex of edge')\n const pPrev = pts[this._minIndex - 1]\n const pNext = pts[this._minIndex + 1]\n const orientation = Orientation.index(this._minCoord, pNext, pPrev)\n let usePrev = false\n if (pPrev.y < this._minCoord.y && pNext.y < this._minCoord.y && orientation === Orientation.COUNTERCLOCKWISE) \n usePrev = true\n else if (pPrev.y > this._minCoord.y && pNext.y > this._minCoord.y && orientation === Orientation.CLOCKWISE) \n usePrev = true\n \n if (usePrev) \n this._minIndex = this._minIndex - 1\n \n }\n getRightmostSideOfSegment(de, i) {\n const e = de.getEdge()\n const coord = e.getCoordinates()\n if (i < 0 || i + 1 >= coord.length) return -1\n if (coord[i].y === coord[i + 1].y) return -1\n let pos = Position.LEFT\n if (coord[i].y < coord[i + 1].y) pos = Position.RIGHT\n return pos\n }\n getEdge() {\n return this._orientedDe\n }\n checkForRightmostCoordinate(de) {\n const coord = de.getEdge().getCoordinates()\n for (let i = 0; i < coord.length - 1; i++) \n if (this._minCoord === null || coord[i].x > this._minCoord.x) {\n this._minDe = de\n this._minIndex = i\n this._minCoord = coord[i]\n }\n \n }\n findRightmostEdgeAtNode() {\n const node = this._minDe.getNode()\n const star = node.getEdges()\n this._minDe = star.getRightmostEdge()\n if (!this._minDe.isForward()) {\n this._minDe = this._minDe.getSym()\n this._minIndex = this._minDe.getEdge().getCoordinates().length - 1\n }\n }\n findEdge(dirEdgeList) {\n for (let i = dirEdgeList.iterator(); i.hasNext(); ) {\n const de = i.next()\n if (!de.isForward()) continue\n this.checkForRightmostCoordinate(de)\n }\n Assert.isTrue(this._minIndex !== 0 || this._minCoord.equals(this._minDe.getCoordinate()), 'inconsistency in rightmost processing')\n if (this._minIndex === 0) \n this.findRightmostEdgeAtNode()\n else \n this.findRightmostEdgeAtVertex()\n \n this._orientedDe = this._minDe\n const rightmostSide = this.getRightmostSide(this._minDe, this._minIndex)\n if (rightmostSide === Position.LEFT) \n this._orientedDe = this._minDe.getSym()\n \n }\n}\n","import Coordinate from './Coordinate.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\n\nexport default class TopologyException extends RuntimeException {\n constructor(msg, pt) {\n super(pt ? msg + ' [ ' + pt + ' ]' : msg)\n this.pt = pt ? new Coordinate(pt) : undefined\n this.name = Object.keys({ TopologyException })[0]\n }\n getCoordinate() {\n return this.pt\n }\n}\n","export default class LinkedList {\n constructor() {\n this.array = []\n }\n\n addLast(e) {\n this.array.push(e)\n }\n\n removeFirst() {\n return this.array.shift()\n }\n\n isEmpty() {\n return this.array.length === 0\n }\n}\n","import HashSet from '../../../../../java/util/HashSet.js'\nimport Position from '../../geomgraph/Position.js'\nimport Stack from '../../../../../java/util/Stack.js'\nimport RightmostEdgeFinder from './RightmostEdgeFinder.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport LinkedList from '../../../../../java/util/LinkedList.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class BufferSubgraph {\n constructor() {\n BufferSubgraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._finder = null\n this._dirEdgeList = new ArrayList()\n this._nodes = new ArrayList()\n this._rightMostCoord = null\n this._env = null\n this._finder = new RightmostEdgeFinder()\n }\n clearVisitedEdges() {\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const de = it.next()\n de.setVisited(false)\n }\n }\n getRightmostCoordinate() {\n return this._rightMostCoord\n }\n computeNodeDepth(n) {\n let startEdge = null\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n if (de.isVisited() || de.getSym().isVisited()) {\n startEdge = de\n break\n }\n }\n if (startEdge === null) throw new TopologyException('unable to find edge to compute depths at ' + n.getCoordinate())\n n.getEdges().computeDepths(startEdge)\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n de.setVisited(true)\n this.copySymDepths(de)\n }\n }\n computeDepth(outsideDepth) {\n this.clearVisitedEdges()\n const de = this._finder.getEdge()\n const n = de.getNode()\n const label = de.getLabel()\n de.setEdgeDepths(Position.RIGHT, outsideDepth)\n this.copySymDepths(de)\n this.computeDepths(de)\n }\n create(node) {\n this.addReachable(node)\n this._finder.findEdge(this._dirEdgeList)\n this._rightMostCoord = this._finder.getCoordinate()\n }\n findResultEdges() {\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getDepth(Position.RIGHT) >= 1 && de.getDepth(Position.LEFT) <= 0 && !de.isInteriorAreaEdge()) \n de.setInResult(true)\n \n }\n }\n computeDepths(startEdge) {\n const nodesVisited = new HashSet()\n const nodeQueue = new LinkedList()\n const startNode = startEdge.getNode()\n nodeQueue.addLast(startNode)\n nodesVisited.add(startNode)\n startEdge.setVisited(true)\n while (!nodeQueue.isEmpty()) {\n const n = nodeQueue.removeFirst()\n nodesVisited.add(n)\n this.computeNodeDepth(n)\n for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n const sym = de.getSym()\n if (sym.isVisited()) continue\n const adjNode = sym.getNode()\n if (!nodesVisited.contains(adjNode)) {\n nodeQueue.addLast(adjNode)\n nodesVisited.add(adjNode)\n }\n }\n }\n }\n compareTo(o) {\n const graph = o\n if (this._rightMostCoord.x < graph._rightMostCoord.x) \n return -1\n \n if (this._rightMostCoord.x > graph._rightMostCoord.x) \n return 1\n \n return 0\n }\n getEnvelope() {\n if (this._env === null) {\n const edgeEnv = new Envelope()\n for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n const dirEdge = it.next()\n const pts = dirEdge.getEdge().getCoordinates()\n for (let i = 0; i < pts.length - 1; i++) \n edgeEnv.expandToInclude(pts[i])\n \n }\n this._env = edgeEnv\n }\n return this._env\n }\n addReachable(startNode) {\n const nodeStack = new Stack()\n nodeStack.add(startNode)\n while (!nodeStack.empty()) {\n const node = nodeStack.pop()\n this.add(node, nodeStack)\n }\n }\n copySymDepths(de) {\n const sym = de.getSym()\n sym.setDepth(Position.LEFT, de.getDepth(Position.RIGHT))\n sym.setDepth(Position.RIGHT, de.getDepth(Position.LEFT))\n }\n add(node, nodeStack) {\n node.setVisited(true)\n this._nodes.add(node)\n for (let i = node.getEdges().iterator(); i.hasNext(); ) {\n const de = i.next()\n this._dirEdgeList.add(de)\n const sym = de.getSym()\n const symNode = sym.getNode()\n if (!symNode.isVisited()) nodeStack.push(symNode)\n }\n }\n getNodes() {\n return this._nodes\n }\n getDirectedEdges() {\n return this._dirEdgeList\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import Location from '../geom/Location.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Orientation from './Orientation.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nexport default class RayCrossingCounter {\n constructor() {\n RayCrossingCounter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._p = null\n this._crossingCount = 0\n this._isPointOnSegment = false\n const p = arguments[0]\n this._p = p\n }\n static locatePointInRing() {\n if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n const p = arguments[0], ring = arguments[1]\n const counter = new RayCrossingCounter(p)\n const p1 = new Coordinate()\n const p2 = new Coordinate()\n for (let i = 1; i < ring.size(); i++) {\n ring.getCoordinate(i, p1)\n ring.getCoordinate(i - 1, p2)\n counter.countSegment(p1, p2)\n if (counter.isOnSegment()) return counter.getLocation()\n }\n return counter.getLocation()\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n const p = arguments[0], ring = arguments[1]\n const counter = new RayCrossingCounter(p)\n for (let i = 1; i < ring.length; i++) {\n const p1 = ring[i]\n const p2 = ring[i - 1]\n counter.countSegment(p1, p2)\n if (counter.isOnSegment()) return counter.getLocation()\n }\n return counter.getLocation()\n }\n }\n countSegment(p1, p2) {\n if (p1.x < this._p.x && p2.x < this._p.x) return null\n if (this._p.x === p2.x && this._p.y === p2.y) {\n this._isPointOnSegment = true\n return null\n }\n if (p1.y === this._p.y && p2.y === this._p.y) {\n let minx = p1.x\n let maxx = p2.x\n if (minx > maxx) {\n minx = p2.x\n maxx = p1.x\n }\n if (this._p.x >= minx && this._p.x <= maxx) \n this._isPointOnSegment = true\n \n return null\n }\n if (p1.y > this._p.y && p2.y <= this._p.y || p2.y > this._p.y && p1.y <= this._p.y) {\n let orient = Orientation.index(p1, p2, this._p)\n if (orient === Orientation.COLLINEAR) {\n this._isPointOnSegment = true\n return null\n }\n if (p2.y < p1.y) \n orient = -orient\n \n if (orient === Orientation.LEFT) \n this._crossingCount++\n \n }\n }\n isPointInPolygon() {\n return this.getLocation() !== Location.EXTERIOR\n }\n getLocation() {\n if (this._isPointOnSegment) return Location.BOUNDARY\n if (this._crossingCount % 2 === 1) \n return Location.INTERIOR\n \n return Location.EXTERIOR\n }\n isOnSegment() {\n return this._isPointOnSegment\n }\n}\n","import Location from '../geom/Location.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequence from '../geom/CoordinateSequence.js'\nimport RobustLineIntersector from './RobustLineIntersector.js'\nimport RayCrossingCounter from './RayCrossingCounter.js'\nexport default class PointLocation {\n static isOnLine() {\n if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n const p = arguments[0], line = arguments[1]\n const lineIntersector = new RobustLineIntersector()\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n const n = line.size()\n for (let i = 1; i < n; i++) {\n line.getCoordinate(i - 1, p0)\n line.getCoordinate(i, p1)\n lineIntersector.computeIntersection(p, p0, p1)\n if (lineIntersector.hasIntersection()) \n return true\n \n }\n return false\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n const p = arguments[0], line = arguments[1]\n const lineIntersector = new RobustLineIntersector()\n for (let i = 1; i < line.length; i++) {\n const p0 = line[i - 1]\n const p1 = line[i]\n lineIntersector.computeIntersection(p, p0, p1)\n if (lineIntersector.hasIntersection()) \n return true\n \n }\n return false\n }\n }\n static locateInRing(p, ring) {\n return RayCrossingCounter.locatePointInRing(p, ring)\n }\n static isInRing(p, ring) {\n return PointLocation.locateInRing(p, ring) !== Location.EXTERIOR\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nexport default class TopologyLocation {\n constructor() {\n TopologyLocation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.location = null\n if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const location = arguments[0]\n this.init(location.length)\n } else if (Number.isInteger(arguments[0])) {\n const on = arguments[0]\n this.init(1)\n this.location[Position.ON] = on\n } else if (arguments[0] instanceof TopologyLocation) {\n const gl = arguments[0]\n this.init(gl.location.length)\n if (gl !== null) \n for (let i = 0; i < this.location.length; i++) \n this.location[i] = gl.location[i]\n \n \n }\n } else if (arguments.length === 3) {\n const on = arguments[0], left = arguments[1], right = arguments[2]\n this.init(3)\n this.location[Position.ON] = on\n this.location[Position.LEFT] = left\n this.location[Position.RIGHT] = right\n }\n }\n setAllLocations(locValue) {\n for (let i = 0; i < this.location.length; i++) \n this.location[i] = locValue\n \n }\n isNull() {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] !== Location.NONE) return false\n \n return true\n }\n setAllLocationsIfNull(locValue) {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE) this.location[i] = locValue\n \n }\n isLine() {\n return this.location.length === 1\n }\n merge(gl) {\n if (gl.location.length > this.location.length) {\n const newLoc = new Array(3).fill(null)\n newLoc[Position.ON] = this.location[Position.ON]\n newLoc[Position.LEFT] = Location.NONE\n newLoc[Position.RIGHT] = Location.NONE\n this.location = newLoc\n }\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE && i < gl.location.length) this.location[i] = gl.location[i]\n \n }\n getLocations() {\n return this.location\n }\n flip() {\n if (this.location.length <= 1) return null\n const temp = this.location[Position.LEFT]\n this.location[Position.LEFT] = this.location[Position.RIGHT]\n this.location[Position.RIGHT] = temp\n }\n toString() {\n const buf = new StringBuffer()\n if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.LEFT]))\n buf.append(Location.toLocationSymbol(this.location[Position.ON]))\n if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.RIGHT]))\n return buf.toString()\n }\n setLocations(on, left, right) {\n this.location[Position.ON] = on\n this.location[Position.LEFT] = left\n this.location[Position.RIGHT] = right\n }\n get(posIndex) {\n if (posIndex < this.location.length) return this.location[posIndex]\n return Location.NONE\n }\n isArea() {\n return this.location.length > 1\n }\n isAnyNull() {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] === Location.NONE) return true\n \n return false\n }\n setLocation() {\n if (arguments.length === 1) {\n const locValue = arguments[0]\n this.setLocation(Position.ON, locValue)\n } else if (arguments.length === 2) {\n const locIndex = arguments[0], locValue = arguments[1]\n this.location[locIndex] = locValue\n }\n }\n init(size) {\n this.location = new Array(size).fill(null)\n this.setAllLocations(Location.NONE)\n }\n isEqualOnSide(le, locIndex) {\n return this.location[locIndex] === le.location[locIndex]\n }\n allPositionsEqual(loc) {\n for (let i = 0; i < this.location.length; i++) \n if (this.location[i] !== loc) return false\n \n return true\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyLocation from './TopologyLocation.js'\nexport default class Label {\n constructor() {\n Label.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.elt = new Array(2).fill(null)\n if (arguments.length === 1) {\n if (Number.isInteger(arguments[0])) {\n const onLoc = arguments[0]\n this.elt[0] = new TopologyLocation(onLoc)\n this.elt[1] = new TopologyLocation(onLoc)\n } else if (arguments[0] instanceof Label) {\n const lbl = arguments[0]\n this.elt[0] = new TopologyLocation(lbl.elt[0])\n this.elt[1] = new TopologyLocation(lbl.elt[1])\n }\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], onLoc = arguments[1]\n this.elt[0] = new TopologyLocation(Location.NONE)\n this.elt[1] = new TopologyLocation(Location.NONE)\n this.elt[geomIndex].setLocation(onLoc)\n } else if (arguments.length === 3) {\n const onLoc = arguments[0], leftLoc = arguments[1], rightLoc = arguments[2]\n this.elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n this.elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n } else if (arguments.length === 4) {\n const geomIndex = arguments[0], onLoc = arguments[1], leftLoc = arguments[2], rightLoc = arguments[3]\n this.elt[0] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n this.elt[1] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n this.elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc)\n }\n }\n static toLineLabel(label) {\n const lineLabel = new Label(Location.NONE)\n for (let i = 0; i < 2; i++) \n lineLabel.setLocation(i, label.getLocation(i))\n \n return lineLabel\n }\n getGeometryCount() {\n let count = 0\n if (!this.elt[0].isNull()) count++\n if (!this.elt[1].isNull()) count++\n return count\n }\n setAllLocations(geomIndex, location) {\n this.elt[geomIndex].setAllLocations(location)\n }\n isNull(geomIndex) {\n return this.elt[geomIndex].isNull()\n }\n setAllLocationsIfNull() {\n if (arguments.length === 1) {\n const location = arguments[0]\n this.setAllLocationsIfNull(0, location)\n this.setAllLocationsIfNull(1, location)\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], location = arguments[1]\n this.elt[geomIndex].setAllLocationsIfNull(location)\n }\n }\n isLine(geomIndex) {\n return this.elt[geomIndex].isLine()\n }\n merge(lbl) {\n for (let i = 0; i < 2; i++) \n if (this.elt[i] === null && lbl.elt[i] !== null) \n this.elt[i] = new TopologyLocation(lbl.elt[i])\n else \n this.elt[i].merge(lbl.elt[i])\n \n \n }\n flip() {\n this.elt[0].flip()\n this.elt[1].flip()\n }\n getLocation() {\n if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this.elt[geomIndex].get(Position.ON)\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], posIndex = arguments[1]\n return this.elt[geomIndex].get(posIndex)\n }\n }\n toString() {\n const buf = new StringBuffer()\n if (this.elt[0] !== null) {\n buf.append('A:')\n buf.append(this.elt[0].toString())\n }\n if (this.elt[1] !== null) {\n buf.append(' B:')\n buf.append(this.elt[1].toString())\n }\n return buf.toString()\n }\n isArea() {\n if (arguments.length === 0) {\n return this.elt[0].isArea() || this.elt[1].isArea()\n } else if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this.elt[geomIndex].isArea()\n }\n }\n isAnyNull(geomIndex) {\n return this.elt[geomIndex].isAnyNull()\n }\n setLocation() {\n if (arguments.length === 2) {\n const geomIndex = arguments[0], location = arguments[1]\n this.elt[geomIndex].setLocation(Position.ON, location)\n } else if (arguments.length === 3) {\n const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n this.elt[geomIndex].setLocation(posIndex, location)\n }\n }\n isEqualOnSide(lbl, side) {\n return this.elt[0].isEqualOnSide(lbl.elt[0], side) && this.elt[1].isEqualOnSide(lbl.elt[1], side)\n }\n allPositionsEqual(geomIndex, loc) {\n return this.elt[geomIndex].allPositionsEqual(loc)\n }\n toLine(geomIndex) {\n if (this.elt[geomIndex].isArea()) this.elt[geomIndex] = new TopologyLocation(this.elt[geomIndex].location[0])\n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport PointLocation from '../algorithm/PointLocation.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport Label from './Label.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Assert from '../util/Assert.js'\nexport default class EdgeRing {\n constructor() {\n EdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._startDe = null\n this._maxNodeDegree = -1\n this._edges = new ArrayList()\n this._pts = new ArrayList()\n this._label = new Label(Location.NONE)\n this._ring = null\n this._isHole = null\n this._shell = null\n this._holes = new ArrayList()\n this._geometryFactory = null\n if (arguments.length === 0) {} else if (arguments.length === 2) {\n const start = arguments[0], geometryFactory = arguments[1]\n this._geometryFactory = geometryFactory\n this.computePoints(start)\n this.computeRing()\n }\n }\n computeRing() {\n if (this._ring !== null) return null\n const coord = new Array(this._pts.size()).fill(null)\n for (let i = 0; i < this._pts.size(); i++) \n coord[i] = this._pts.get(i)\n \n this._ring = this._geometryFactory.createLinearRing(coord)\n this._isHole = Orientation.isCCW(this._ring.getCoordinates())\n }\n isIsolated() {\n return this._label.getGeometryCount() === 1\n }\n computePoints(start) {\n this._startDe = start\n let de = start\n let isFirstEdge = true\n do {\n if (de === null) throw new TopologyException('Found null DirectedEdge')\n if (de.getEdgeRing() === this) throw new TopologyException('Directed Edge visited twice during ring-building at ' + de.getCoordinate())\n this._edges.add(de)\n const label = de.getLabel()\n Assert.isTrue(label.isArea())\n this.mergeLabel(label)\n this.addPoints(de.getEdge(), de.isForward(), isFirstEdge)\n isFirstEdge = false\n this.setEdgeRing(de, this)\n de = this.getNext(de)\n } while (de !== this._startDe)\n }\n getLinearRing() {\n return this._ring\n }\n getCoordinate(i) {\n return this._pts.get(i)\n }\n computeMaxNodeDegree() {\n this._maxNodeDegree = 0\n let de = this._startDe\n do {\n const node = de.getNode()\n const degree = node.getEdges().getOutgoingDegree(this)\n if (degree > this._maxNodeDegree) this._maxNodeDegree = degree\n de = this.getNext(de)\n } while (de !== this._startDe)\n this._maxNodeDegree *= 2\n }\n addPoints(edge, isForward, isFirstEdge) {\n const edgePts = edge.getCoordinates()\n if (isForward) {\n let startIndex = 1\n if (isFirstEdge) startIndex = 0\n for (let i = startIndex; i < edgePts.length; i++) \n this._pts.add(edgePts[i])\n \n } else {\n let startIndex = edgePts.length - 2\n if (isFirstEdge) startIndex = edgePts.length - 1\n for (let i = startIndex; i >= 0; i--) \n this._pts.add(edgePts[i])\n \n }\n }\n isHole() {\n return this._isHole\n }\n setInResult() {\n let de = this._startDe\n do {\n de.getEdge().setInResult(true)\n de = de.getNext()\n } while (de !== this._startDe)\n }\n containsPoint(p) {\n const shell = this.getLinearRing()\n const env = shell.getEnvelopeInternal()\n if (!env.contains(p)) return false\n if (!PointLocation.isInRing(p, shell.getCoordinates())) return false\n for (let i = this._holes.iterator(); i.hasNext(); ) {\n const hole = i.next()\n if (hole.containsPoint(p)) return false\n }\n return true\n }\n addHole(ring) {\n this._holes.add(ring)\n }\n isShell() {\n return this._shell === null\n }\n getLabel() {\n return this._label\n }\n getEdges() {\n return this._edges\n }\n getMaxNodeDegree() {\n if (this._maxNodeDegree < 0) this.computeMaxNodeDegree()\n return this._maxNodeDegree\n }\n getShell() {\n return this._shell\n }\n mergeLabel() {\n if (arguments.length === 1) {\n const deLabel = arguments[0]\n this.mergeLabel(deLabel, 0)\n this.mergeLabel(deLabel, 1)\n } else if (arguments.length === 2) {\n const deLabel = arguments[0], geomIndex = arguments[1]\n const loc = deLabel.getLocation(geomIndex, Position.RIGHT)\n if (loc === Location.NONE) return null\n if (this._label.getLocation(geomIndex) === Location.NONE) {\n this._label.setLocation(geomIndex, loc)\n return null\n }\n }\n }\n setShell(shell) {\n this._shell = shell\n if (shell !== null) shell.addHole(this)\n }\n toPolygon(geometryFactory) {\n const holeLR = new Array(this._holes.size()).fill(null)\n for (let i = 0; i < this._holes.size(); i++) \n holeLR[i] = this._holes.get(i).getLinearRing()\n \n const poly = geometryFactory.createPolygon(this.getLinearRing(), holeLR)\n return poly\n }\n}\n","import EdgeRing from '../../geomgraph/EdgeRing.js'\nexport default class MinimalEdgeRing extends EdgeRing {\n constructor() {\n super()\n MinimalEdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const start = arguments[0], geometryFactory = arguments[1]\n EdgeRing.constructor_.call(this, start, geometryFactory)\n }\n setEdgeRing(de, er) {\n de.setMinEdgeRing(er)\n }\n getNext(de) {\n return de.getNextMin()\n }\n}\n","import MinimalEdgeRing from './MinimalEdgeRing.js'\nimport EdgeRing from '../../geomgraph/EdgeRing.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class MaximalEdgeRing extends EdgeRing {\n constructor() {\n super()\n MaximalEdgeRing.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const start = arguments[0], geometryFactory = arguments[1]\n EdgeRing.constructor_.call(this, start, geometryFactory)\n }\n buildMinimalRings() {\n const minEdgeRings = new ArrayList()\n let de = this._startDe\n do {\n if (de.getMinEdgeRing() === null) {\n const minEr = new MinimalEdgeRing(de, this._geometryFactory)\n minEdgeRings.add(minEr)\n }\n de = de.getNext()\n } while (de !== this._startDe)\n return minEdgeRings\n }\n setEdgeRing(de, er) {\n de.setEdgeRing(er)\n }\n linkDirectedEdgesForMinimalEdgeRings() {\n let de = this._startDe\n do {\n const node = de.getNode()\n node.getEdges().linkMinimalDirectedEdges(this)\n de = de.getNext()\n } while (de !== this._startDe)\n }\n getNext(de) {\n return de.getNext()\n }\n}\n","import Assert from '../util/Assert.js'\nexport default class GraphComponent {\n constructor() {\n GraphComponent.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._label = null\n this._isInResult = false\n this._isCovered = false\n this._isCoveredSet = false\n this._isVisited = false\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const label = arguments[0]\n this._label = label\n }\n }\n setVisited(isVisited) {\n this._isVisited = isVisited\n }\n setInResult(isInResult) {\n this._isInResult = isInResult\n }\n isCovered() {\n return this._isCovered\n }\n isCoveredSet() {\n return this._isCoveredSet\n }\n setLabel(label) {\n this._label = label\n }\n getLabel() {\n return this._label\n }\n setCovered(isCovered) {\n this._isCovered = isCovered\n this._isCoveredSet = true\n }\n updateIM(im) {\n Assert.isTrue(this._label.getGeometryCount() >= 2, 'found partial label')\n this.computeIM(im)\n }\n isInResult() {\n return this._isInResult\n }\n isVisited() {\n return this._isVisited\n }\n}\n","import Location from '../geom/Location.js'\nimport Label from './Label.js'\nimport GraphComponent from './GraphComponent.js'\nexport default class Node extends GraphComponent {\n constructor() {\n super()\n Node.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._coord = null\n this._edges = null\n const coord = arguments[0], edges = arguments[1]\n this._coord = coord\n this._edges = edges\n this._label = new Label(0, Location.NONE)\n }\n isIncidentEdgeInResult() {\n for (let it = this.getEdges().getEdges().iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getEdge().isInResult()) return true\n }\n return false\n }\n isIsolated() {\n return this._label.getGeometryCount() === 1\n }\n getCoordinate() {\n return this._coord\n }\n print(out) {\n out.println('node ' + this._coord + ' lbl: ' + this._label)\n }\n computeIM(im) {}\n computeMergedLocation(label2, eltIndex) {\n let loc = Location.NONE\n loc = this._label.getLocation(eltIndex)\n if (!label2.isNull(eltIndex)) {\n const nLoc = label2.getLocation(eltIndex)\n if (loc !== Location.BOUNDARY) loc = nLoc\n }\n return loc\n }\n setLabel() {\n if (arguments.length === 2 && (Number.isInteger(arguments[1]) && Number.isInteger(arguments[0]))) {\n const argIndex = arguments[0], onLocation = arguments[1]\n if (this._label === null) \n this._label = new Label(argIndex, onLocation)\n else this._label.setLocation(argIndex, onLocation)\n } else {\n return super.setLabel.apply(this, arguments)\n }\n }\n getEdges() {\n return this._edges\n }\n mergeLabel() {\n if (arguments[0] instanceof Node) {\n const n = arguments[0]\n this.mergeLabel(n._label)\n } else if (arguments[0] instanceof Label) {\n const label2 = arguments[0]\n for (let i = 0; i < 2; i++) {\n const loc = this.computeMergedLocation(label2, i)\n const thisLoc = this._label.getLocation(i)\n if (thisLoc === Location.NONE) this._label.setLocation(i, loc)\n }\n }\n }\n add(e) {\n this._edges.insert(e)\n e.setNode(this)\n }\n setLabelBoundary(argIndex) {\n if (this._label === null) return null\n let loc = Location.NONE\n if (this._label !== null) loc = this._label.getLocation(argIndex)\n let newLoc = null\n switch (loc) {\n case Location.BOUNDARY:\n newLoc = Location.INTERIOR\n break\n case Location.INTERIOR:\n newLoc = Location.BOUNDARY\n break\n default:\n newLoc = Location.BOUNDARY\n break\n }\n this._label.setLocation(argIndex, newLoc)\n }\n}\n","import Map from './Map.js'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedMap.html\n */\nexport default class SortedMap extends Map {}\n","import ArrayList from './ArrayList.js'\nimport SortedMap from './SortedMap.js'\nimport HashSet from './HashSet.js'\n\nconst BLACK = 0\nconst RED = 1\n\nfunction colorOf(p) {\n return (p == null ? BLACK : p.color)\n}\nfunction parentOf(p) {\n return (p == null ? null : p.parent)\n}\nfunction setColor(p, c) {\n if (p !== null) p.color = c\n}\nfunction leftOf(p) {\n return (p == null ? null : p.left)\n}\nfunction rightOf(p) {\n return (p == null ? null : p.right)\n}\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeMap.html\n */\nexport default class TreeMap extends SortedMap {\n constructor() {\n super()\n this.root_ = null\n this.size_ = 0\n }\n\n get(key) {\n let p = this.root_\n while (p !== null) {\n const cmp = key.compareTo(p.key)\n if (cmp < 0)\n p = p.left\n else if (cmp > 0)\n p = p.right\n else return p.value\n }\n return null\n }\n\n put(key, value) {\n if (this.root_ === null) {\n this.root_ = {\n key: key,\n value: value,\n left: null,\n right: null,\n parent: null,\n color: BLACK,\n getValue() {\n return this.value\n },\n getKey() {\n return this.key\n }\n }\n this.size_ = 1\n return null\n }\n let t = this.root_; let parent; let cmp\n do {\n parent = t\n cmp = key.compareTo(t.key)\n if (cmp < 0) {\n t = t.left\n } else if (cmp > 0) {\n t = t.right\n } else {\n const oldValue = t.value\n t.value = value\n return oldValue\n }\n } while (t !== null)\n const e = {\n key: key,\n left: null,\n right: null,\n value: value,\n parent: parent,\n color: BLACK,\n getValue() {\n return this.value\n },\n getKey() {\n return this.key\n }\n }\n if (cmp < 0)\n parent.left = e\n else parent.right = e\n\n this.fixAfterInsertion(e)\n this.size_++\n return null\n }\n\n /**\n * @param {Object} x\n */\n fixAfterInsertion(x) {\n let y\n x.color = RED\n while (x != null && x !== this.root_ && x.parent.color === RED)\n if (parentOf(x) === leftOf(parentOf(parentOf(x)))) {\n y = rightOf(parentOf(parentOf(x)))\n if (colorOf(y) === RED) {\n setColor(parentOf(x), BLACK)\n setColor(y, BLACK)\n setColor(parentOf(parentOf(x)), RED)\n x = parentOf(parentOf(x))\n } else {\n if (x === rightOf(parentOf(x))) {\n x = parentOf(x)\n this.rotateLeft(x)\n }\n setColor(parentOf(x), BLACK)\n setColor(parentOf(parentOf(x)), RED)\n this.rotateRight(parentOf(parentOf(x)))\n }\n } else {\n y = leftOf(parentOf(parentOf(x)))\n if (colorOf(y) === RED) {\n setColor(parentOf(x), BLACK)\n setColor(y, BLACK)\n setColor(parentOf(parentOf(x)), RED)\n x = parentOf(parentOf(x))\n } else {\n if (x === leftOf(parentOf(x))) {\n x = parentOf(x)\n this.rotateRight(x)\n }\n setColor(parentOf(x), BLACK)\n setColor(parentOf(parentOf(x)), RED)\n this.rotateLeft(parentOf(parentOf(x)))\n }\n }\n\n this.root_.color = BLACK\n }\n\n values() {\n const arrayList = new ArrayList()\n let p = this.getFirstEntry()\n if (p !== null) {\n arrayList.add(p.value)\n while ((p = TreeMap.successor(p)) !== null)\n arrayList.add(p.value)\n }\n return arrayList\n }\n\n entrySet() {\n const hashSet = new HashSet()\n let p = this.getFirstEntry()\n if (p !== null) {\n hashSet.add(p)\n while ((p = TreeMap.successor(p)) !== null)\n hashSet.add(p)\n }\n return hashSet\n }\n\n /**\n * @param {Object} p\n */\n rotateLeft(p) {\n if (p != null) {\n const r = p.right\n p.right = r.left\n if (r.left != null)\n r.left.parent = p\n r.parent = p.parent\n if (p.parent == null)\n this.root_ = r\n else if (p.parent.left === p)\n p.parent.left = r\n else\n p.parent.right = r\n r.left = p\n p.parent = r\n }\n }\n\n /**\n * @param {Object} p\n */\n rotateRight(p) {\n if (p != null) {\n const l = p.left\n p.left = l.right\n if (l.right != null)\n l.right.parent = p\n l.parent = p.parent\n if (p.parent == null)\n this.root_ = l\n else if (p.parent.right === p)\n p.parent.right = l\n else\n p.parent.left = l\n l.right = p\n p.parent = l\n }\n }\n\n /**\n * @return {Object}\n */\n getFirstEntry() {\n let p = this.root_\n if (p != null)\n while (p.left != null) p = p.left\n return p\n }\n\n /**\n * @param {Object} t\n * @return {Object}\n * @private\n */\n static successor(t) {\n let p\n if (t === null) {\n return null\n } else if (t.right !== null) {\n p = t.right\n while (p.left !== null)\n p = p.left\n return p\n } else {\n p = t.parent\n let ch = t\n while (p !== null && ch === p.right) {\n ch = p\n p = p.parent\n }\n return p\n }\n }\n\n size() {\n return this.size_\n }\n\n containsKey(key) {\n let p = this.root_\n while (p !== null) {\n const cmp = key.compareTo(p.key)\n if (cmp < 0)\n p = p.left\n else if (cmp > 0)\n p = p.right\n else return true\n }\n return false\n }\n}\n","import Location from '../geom/Location.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Node from './Node.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class NodeMap {\n constructor() {\n NodeMap.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.nodeMap = new TreeMap()\n this.nodeFact = null\n const nodeFact = arguments[0]\n this.nodeFact = nodeFact\n }\n find(coord) {\n return this.nodeMap.get(coord)\n }\n addNode() {\n if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n let node = this.nodeMap.get(coord)\n if (node === null) {\n node = this.nodeFact.createNode(coord)\n this.nodeMap.put(coord, node)\n }\n return node\n } else if (arguments[0] instanceof Node) {\n const n = arguments[0]\n const node = this.nodeMap.get(n.getCoordinate())\n if (node === null) {\n this.nodeMap.put(n.getCoordinate(), n)\n return n\n }\n node.mergeLabel(n)\n return node\n }\n }\n print(out) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const n = it.next()\n n.print(out)\n }\n }\n iterator() {\n return this.nodeMap.values().iterator()\n }\n values() {\n return this.nodeMap.values()\n }\n getBoundaryNodes(geomIndex) {\n const bdyNodes = new ArrayList()\n for (let i = this.iterator(); i.hasNext(); ) {\n const node = i.next()\n if (node.getLabel().getLocation(geomIndex) === Location.BOUNDARY) bdyNodes.add(node)\n }\n return bdyNodes\n }\n add(e) {\n const p = e.getCoordinate()\n const n = this.addNode(p)\n n.add(e)\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Quadrant {\n static isNorthern(quad) {\n return quad === Quadrant.NE || quad === Quadrant.NW\n }\n static isOpposite(quad1, quad2) {\n if (quad1 === quad2) return false\n const diff = (quad1 - quad2 + 4) % 4\n if (diff === 2) return true\n return false\n }\n static commonHalfPlane(quad1, quad2) {\n if (quad1 === quad2) return quad1\n const diff = (quad1 - quad2 + 4) % 4\n if (diff === 2) return -1\n const min = quad1 < quad2 ? quad1 : quad2\n const max = quad1 > quad2 ? quad1 : quad2\n if (min === 0 && max === 3) return 3\n return min\n }\n static isInHalfPlane(quad, halfPlane) {\n if (halfPlane === Quadrant.SE) \n return quad === Quadrant.SE || quad === Quadrant.SW\n \n return quad === halfPlane || quad === halfPlane + 1\n }\n static quadrant() {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const dx = arguments[0], dy = arguments[1]\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the quadrant for point ( ' + dx + ', ' + dy + ' )')\n if (dx >= 0.0) \n if (dy >= 0.0) return Quadrant.NE; else return Quadrant.SE\n else \n if (dy >= 0.0) return Quadrant.NW; else return Quadrant.SW\n \n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p0 = arguments[0], p1 = arguments[1]\n if (p1.x === p0.x && p1.y === p0.y) throw new IllegalArgumentException('Cannot compute the quadrant for two identical points ' + p0)\n if (p1.x >= p0.x) \n if (p1.y >= p0.y) return Quadrant.NE; else return Quadrant.SE\n else \n if (p1.y >= p0.y) return Quadrant.NW; else return Quadrant.SW\n \n }\n }\n}\nQuadrant.NE = 0\nQuadrant.NW = 1\nQuadrant.SW = 2\nQuadrant.SE = 3\n","import Orientation from '../algorithm/Orientation.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nimport Quadrant from './Quadrant.js'\nimport Assert from '../util/Assert.js'\nexport default class EdgeEnd {\n constructor() {\n EdgeEnd.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edge = null\n this._label = null\n this._node = null\n this._p0 = null\n this._p1 = null\n this._dx = null\n this._dy = null\n this._quadrant = null\n if (arguments.length === 1) {\n const edge = arguments[0]\n this._edge = edge\n } else if (arguments.length === 3) {\n const edge = arguments[0], p0 = arguments[1], p1 = arguments[2]\n EdgeEnd.constructor_.call(this, edge, p0, p1, null)\n } else if (arguments.length === 4) {\n const edge = arguments[0], p0 = arguments[1], p1 = arguments[2], label = arguments[3]\n EdgeEnd.constructor_.call(this, edge)\n this.init(p0, p1)\n this._label = label\n }\n }\n compareDirection(e) {\n if (this._dx === e._dx && this._dy === e._dy) return 0\n if (this._quadrant > e._quadrant) return 1\n if (this._quadrant < e._quadrant) return -1\n return Orientation.index(e._p0, e._p1, this._p1)\n }\n getDy() {\n return this._dy\n }\n getCoordinate() {\n return this._p0\n }\n setNode(node) {\n this._node = node\n }\n print(out) {\n const angle = Math.atan2(this._dy, this._dx)\n const className = this.getClass().getName()\n const lastDotPos = className.lastIndexOf('.')\n const name = className.substring(lastDotPos + 1)\n out.print(' ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + ' ' + this._label)\n }\n compareTo(obj) {\n const e = obj\n return this.compareDirection(e)\n }\n getDirectedCoordinate() {\n return this._p1\n }\n getDx() {\n return this._dx\n }\n getLabel() {\n return this._label\n }\n getEdge() {\n return this._edge\n }\n getQuadrant() {\n return this._quadrant\n }\n getNode() {\n return this._node\n }\n toString() {\n const angle = Math.atan2(this._dy, this._dx)\n const className = this.getClass().getName()\n const lastDotPos = className.lastIndexOf('.')\n const name = className.substring(lastDotPos + 1)\n return ' ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + ' ' + this._label\n }\n computeLabel(boundaryNodeRule) {}\n init(p0, p1) {\n this._p0 = p0\n this._p1 = p1\n this._dx = p1.x - p0.x\n this._dy = p1.y - p0.y\n this._quadrant = Quadrant.quadrant(this._dx, this._dy)\n Assert.isTrue(!(this._dx === 0 && this._dy === 0), 'EdgeEnd with identical endpoints found')\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import Location from '../geom/Location.js'\nimport EdgeEnd from './EdgeEnd.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport Label from './Label.js'\nexport default class DirectedEdge extends EdgeEnd {\n constructor() {\n super()\n DirectedEdge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isForward = null\n this._isInResult = false\n this._isVisited = false\n this._sym = null\n this._next = null\n this._nextMin = null\n this._edgeRing = null\n this._minEdgeRing = null\n this._depth = [0, -999, -999]\n const edge = arguments[0], isForward = arguments[1]\n EdgeEnd.constructor_.call(this, edge)\n this._isForward = isForward\n if (isForward) {\n this.init(edge.getCoordinate(0), edge.getCoordinate(1))\n } else {\n const n = edge.getNumPoints() - 1\n this.init(edge.getCoordinate(n), edge.getCoordinate(n - 1))\n }\n this.computeDirectedLabel()\n }\n static depthFactor(currLocation, nextLocation) {\n if (currLocation === Location.EXTERIOR && nextLocation === Location.INTERIOR) return 1; else if (currLocation === Location.INTERIOR && nextLocation === Location.EXTERIOR) return -1\n return 0\n }\n getNextMin() {\n return this._nextMin\n }\n getDepth(position) {\n return this._depth[position]\n }\n setVisited(isVisited) {\n this._isVisited = isVisited\n }\n computeDirectedLabel() {\n this._label = new Label(this._edge.getLabel())\n if (!this._isForward) this._label.flip()\n }\n getNext() {\n return this._next\n }\n setDepth(position, depthVal) {\n if (this._depth[position] !== -999) \n if (this._depth[position] !== depthVal) throw new TopologyException('assigned depths do not match', this.getCoordinate())\n \n this._depth[position] = depthVal\n }\n isInteriorAreaEdge() {\n let isInteriorAreaEdge = true\n for (let i = 0; i < 2; i++) \n if (!(this._label.isArea(i) && this._label.getLocation(i, Position.LEFT) === Location.INTERIOR && this._label.getLocation(i, Position.RIGHT) === Location.INTERIOR)) \n isInteriorAreaEdge = false\n \n \n return isInteriorAreaEdge\n }\n setNextMin(nextMin) {\n this._nextMin = nextMin\n }\n print(out) {\n super.print.call(this, out)\n out.print(' ' + this._depth[Position.LEFT] + '/' + this._depth[Position.RIGHT])\n out.print(' (' + this.getDepthDelta() + ')')\n if (this._isInResult) out.print(' inResult')\n }\n setMinEdgeRing(minEdgeRing) {\n this._minEdgeRing = minEdgeRing\n }\n isLineEdge() {\n const isLine = this._label.isLine(0) || this._label.isLine(1)\n const isExteriorIfArea0 = !this._label.isArea(0) || this._label.allPositionsEqual(0, Location.EXTERIOR)\n const isExteriorIfArea1 = !this._label.isArea(1) || this._label.allPositionsEqual(1, Location.EXTERIOR)\n return isLine && isExteriorIfArea0 && isExteriorIfArea1\n }\n setEdgeRing(edgeRing) {\n this._edgeRing = edgeRing\n }\n getMinEdgeRing() {\n return this._minEdgeRing\n }\n getDepthDelta() {\n let depthDelta = this._edge.getDepthDelta()\n if (!this._isForward) depthDelta = -depthDelta\n return depthDelta\n }\n setInResult(isInResult) {\n this._isInResult = isInResult\n }\n getSym() {\n return this._sym\n }\n isForward() {\n return this._isForward\n }\n getEdge() {\n return this._edge\n }\n printEdge(out) {\n this.print(out)\n out.print(' ')\n if (this._isForward) this._edge.print(out); else this._edge.printReverse(out)\n }\n setSym(de) {\n this._sym = de\n }\n setVisitedEdge(isVisited) {\n this.setVisited(isVisited)\n this._sym.setVisited(isVisited)\n }\n setEdgeDepths(position, depth) {\n let depthDelta = this.getEdge().getDepthDelta()\n if (!this._isForward) depthDelta = -depthDelta\n let directionFactor = 1\n if (position === Position.LEFT) directionFactor = -1\n const oppositePos = Position.opposite(position)\n const delta = depthDelta * directionFactor\n const oppositeDepth = depth + delta\n this.setDepth(position, depth)\n this.setDepth(oppositePos, oppositeDepth)\n }\n getEdgeRing() {\n return this._edgeRing\n }\n isInResult() {\n return this._isInResult\n }\n setNext(next) {\n this._next = next\n }\n isVisited() {\n return this._isVisited\n }\n}\n","import Node from './Node.js'\nexport default class NodeFactory {\n createNode(coord) {\n return new Node(coord, null)\n }\n}\n","import Location from '../geom/Location.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Node from './Node.js'\nimport NodeMap from './NodeMap.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport DirectedEdge from './DirectedEdge.js'\nimport System from '../../../../java/lang/System.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Quadrant from './Quadrant.js'\nimport NodeFactory from './NodeFactory.js'\nexport default class PlanarGraph {\n constructor() {\n PlanarGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edges = new ArrayList()\n this._nodes = null\n this._edgeEndList = new ArrayList()\n if (arguments.length === 0) {\n this._nodes = new NodeMap(new NodeFactory())\n } else if (arguments.length === 1) {\n const nodeFact = arguments[0]\n this._nodes = new NodeMap(nodeFact)\n }\n }\n static linkResultDirectedEdges(nodes) {\n for (let nodeit = nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkResultDirectedEdges()\n }\n }\n printEdges(out) {\n out.println('Edges:')\n for (let i = 0; i < this._edges.size(); i++) {\n out.println('edge ' + i + ':')\n const e = this._edges.get(i)\n e.print(out)\n e.eiList.print(out)\n }\n }\n find(coord) {\n return this._nodes.find(coord)\n }\n addNode() {\n if (arguments[0] instanceof Node) {\n const node = arguments[0]\n return this._nodes.addNode(node)\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n return this._nodes.addNode(coord)\n }\n }\n getNodeIterator() {\n return this._nodes.iterator()\n }\n linkResultDirectedEdges() {\n for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkResultDirectedEdges()\n }\n }\n debugPrintln(o) {\n System.out.println(o)\n }\n isBoundaryNode(geomIndex, coord) {\n const node = this._nodes.find(coord)\n if (node === null) return false\n const label = node.getLabel()\n if (label !== null && label.getLocation(geomIndex) === Location.BOUNDARY) return true\n return false\n }\n linkAllDirectedEdges() {\n for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().linkAllDirectedEdges()\n }\n }\n matchInSameDirection(p0, p1, ep0, ep1) {\n if (!p0.equals(ep0)) return false\n if (Orientation.index(p0, p1, ep1) === Orientation.COLLINEAR && Quadrant.quadrant(p0, p1) === Quadrant.quadrant(ep0, ep1)) return true\n return false\n }\n getEdgeEnds() {\n return this._edgeEndList\n }\n debugPrint(o) {\n System.out.print(o)\n }\n getEdgeIterator() {\n return this._edges.iterator()\n }\n findEdgeInSameDirection(p0, p1) {\n for (let i = 0; i < this._edges.size(); i++) {\n const e = this._edges.get(i)\n const eCoord = e.getCoordinates()\n if (this.matchInSameDirection(p0, p1, eCoord[0], eCoord[1])) return e\n if (this.matchInSameDirection(p0, p1, eCoord[eCoord.length - 1], eCoord[eCoord.length - 2])) return e\n }\n return null\n }\n insertEdge(e) {\n this._edges.add(e)\n }\n findEdgeEnd(e) {\n for (let i = this.getEdgeEnds().iterator(); i.hasNext(); ) {\n const ee = i.next()\n if (ee.getEdge() === e) return ee\n }\n return null\n }\n addEdges(edgesToAdd) {\n for (let it = edgesToAdd.iterator(); it.hasNext(); ) {\n const e = it.next()\n this._edges.add(e)\n const de1 = new DirectedEdge(e, true)\n const de2 = new DirectedEdge(e, false)\n de1.setSym(de2)\n de2.setSym(de1)\n this.add(de1)\n this.add(de2)\n }\n }\n add(e) {\n this._nodes.add(e)\n this._edgeEndList.add(e)\n }\n getNodes() {\n return this._nodes.values()\n }\n findEdge(p0, p1) {\n for (let i = 0; i < this._edges.size(); i++) {\n const e = this._edges.get(i)\n const eCoord = e.getCoordinates()\n if (p0.equals(eCoord[0]) && p1.equals(eCoord[1])) return e\n }\n return null\n }\n}\n","import PointLocation from '../../algorithm/PointLocation.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport MaximalEdgeRing from './MaximalEdgeRing.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class PolygonBuilder {\n constructor() {\n PolygonBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometryFactory = null\n this._shellList = new ArrayList()\n const geometryFactory = arguments[0]\n this._geometryFactory = geometryFactory\n }\n static findEdgeRingContaining(testEr, shellList) {\n const testRing = testEr.getLinearRing()\n const testEnv = testRing.getEnvelopeInternal()\n let testPt = testRing.getCoordinateN(0)\n let minShell = null\n let minShellEnv = null\n for (let it = shellList.iterator(); it.hasNext(); ) {\n const tryShell = it.next()\n const tryShellRing = tryShell.getLinearRing()\n const tryShellEnv = tryShellRing.getEnvelopeInternal()\n if (tryShellEnv.equals(testEnv)) continue\n if (!tryShellEnv.contains(testEnv)) continue\n testPt = CoordinateArrays.ptNotInList(testRing.getCoordinates(), tryShellRing.getCoordinates())\n let isContained = false\n if (PointLocation.isInRing(testPt, tryShellRing.getCoordinates())) isContained = true\n if (isContained) \n if (minShell === null || minShellEnv.contains(tryShellEnv)) {\n minShell = tryShell\n minShellEnv = minShell.getLinearRing().getEnvelopeInternal()\n }\n \n }\n return minShell\n }\n sortShellsAndHoles(edgeRings, shellList, freeHoleList) {\n for (let it = edgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.isHole()) \n freeHoleList.add(er)\n else \n shellList.add(er)\n \n }\n }\n computePolygons(shellList) {\n const resultPolyList = new ArrayList()\n for (let it = shellList.iterator(); it.hasNext(); ) {\n const er = it.next()\n const poly = er.toPolygon(this._geometryFactory)\n resultPolyList.add(poly)\n }\n return resultPolyList\n }\n placeFreeHoles(shellList, freeHoleList) {\n for (let it = freeHoleList.iterator(); it.hasNext(); ) {\n const hole = it.next()\n if (hole.getShell() === null) {\n const shell = PolygonBuilder.findEdgeRingContaining(hole, shellList)\n if (shell === null) throw new TopologyException('unable to assign hole to a shell', hole.getCoordinate(0))\n hole.setShell(shell)\n }\n }\n }\n buildMinimalEdgeRings(maxEdgeRings, shellList, freeHoleList) {\n const edgeRings = new ArrayList()\n for (let it = maxEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.getMaxNodeDegree() > 2) {\n er.linkDirectedEdgesForMinimalEdgeRings()\n const minEdgeRings = er.buildMinimalRings()\n const shell = this.findShell(minEdgeRings)\n if (shell !== null) {\n this.placePolygonHoles(shell, minEdgeRings)\n shellList.add(shell)\n } else {\n freeHoleList.addAll(minEdgeRings)\n }\n } else {\n edgeRings.add(er)\n }\n }\n return edgeRings\n }\n buildMaximalEdgeRings(dirEdges) {\n const maxEdgeRings = new ArrayList()\n for (let it = dirEdges.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() && de.getLabel().isArea()) \n if (de.getEdgeRing() === null) {\n const er = new MaximalEdgeRing(de, this._geometryFactory)\n maxEdgeRings.add(er)\n er.setInResult()\n }\n \n }\n return maxEdgeRings\n }\n placePolygonHoles(shell, minEdgeRings) {\n for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (er.isHole()) \n er.setShell(shell)\n \n }\n }\n getPolygons() {\n const resultPolyList = this.computePolygons(this._shellList)\n return resultPolyList\n }\n findShell(minEdgeRings) {\n let shellCount = 0\n let shell = null\n for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n const er = it.next()\n if (!er.isHole()) {\n shell = er\n shellCount++\n }\n }\n Assert.isTrue(shellCount <= 1, 'found two shells in MinimalEdgeRing list')\n return shell\n }\n add() {\n if (arguments.length === 1) {\n const graph = arguments[0]\n this.add(graph.getEdgeEnds(), graph.getNodes())\n } else if (arguments.length === 2) {\n const dirEdges = arguments[0], nodes = arguments[1]\n PlanarGraph.linkResultDirectedEdges(nodes)\n const maxEdgeRings = this.buildMaximalEdgeRings(dirEdges)\n const freeHoleList = new ArrayList()\n const edgeRings = this.buildMinimalEdgeRings(maxEdgeRings, this._shellList, freeHoleList)\n this.sortShellsAndHoles(edgeRings, this._shellList, freeHoleList)\n this.placeFreeHoles(this._shellList, freeHoleList)\n }\n }\n}\n","export default class Boundable {\n getBounds() {}\n}\n","import Boundable from './Boundable.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class ItemBoundable {\n constructor() {\n ItemBoundable.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._bounds = null\n this._item = null\n const bounds = arguments[0], item = arguments[1]\n this._bounds = bounds\n this._item = item\n }\n getItem() {\n return this._item\n }\n getBounds() {\n return this._bounds\n }\n get interfaces_() {\n return [Boundable, Serializable]\n }\n}\n","import ArrayList from '../../../../java/util/ArrayList.js'\nexport default class PriorityQueue {\n constructor() {\n PriorityQueue.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._size = null\n this._items = null\n this._size = 0\n this._items = new ArrayList()\n this._items.add(null)\n }\n poll() {\n if (this.isEmpty()) return null\n const minItem = this._items.get(1)\n this._items.set(1, this._items.get(this._size))\n this._size -= 1\n this.reorder(1)\n return minItem\n }\n size() {\n return this._size\n }\n reorder(hole) {\n let child = null\n const tmp = this._items.get(hole)\n for (; hole * 2 <= this._size; hole = child) {\n child = hole * 2\n if (child !== this._size && this._items.get(child + 1).compareTo(this._items.get(child)) < 0) child++\n if (this._items.get(child).compareTo(tmp) < 0) this._items.set(hole, this._items.get(child)); else break\n }\n this._items.set(hole, tmp)\n }\n clear() {\n this._size = 0\n this._items.clear()\n }\n peek() {\n if (this.isEmpty()) return null\n const minItem = this._items.get(1)\n return minItem\n }\n isEmpty() {\n return this._size === 0\n }\n add(x) {\n this._items.add(null)\n this._size += 1\n let hole = this._size\n this._items.set(0, x)\n for (; x.compareTo(this._items.get(Math.trunc(hole / 2))) < 0; hole /= 2) \n this._items.set(hole, this._items.get(Math.trunc(hole / 2)))\n \n this._items.set(hole, x)\n }\n}\n","export default class SpatialIndex {\n insert(itemEnv, item) {}\n remove(itemEnv, item) {}\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n }\n }\n}\n","import Boundable from './Boundable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Assert from '../../util/Assert.js'\nexport default class AbstractNode {\n constructor() {\n AbstractNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._childBoundables = new ArrayList()\n this._bounds = null\n this._level = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const level = arguments[0]\n this._level = level\n }\n }\n getLevel() {\n return this._level\n }\n size() {\n return this._childBoundables.size()\n }\n getChildBoundables() {\n return this._childBoundables\n }\n addChildBoundable(childBoundable) {\n Assert.isTrue(this._bounds === null)\n this._childBoundables.add(childBoundable)\n }\n isEmpty() {\n return this._childBoundables.isEmpty()\n }\n getBounds() {\n if (this._bounds === null) \n this._bounds = this.computeBounds()\n \n return this._bounds\n }\n get interfaces_() {\n return [Boundable, Serializable]\n }\n}\n","import Arrays from './Arrays.js'\nimport ArrayList from './ArrayList.js'\n\nconst Collections = {\n reverseOrder: function() {\n return {\n compare(a, b) {\n return b.compareTo(a)\n }\n }\n },\n min: function(l) {\n Collections.sort(l)\n return l.get(0)\n },\n sort: function(l, c) {\n const a = l.toArray()\n if (c)\n Arrays.sort(a, c)\n else\n Arrays.sort(a)\n const i = l.iterator()\n for (let pos = 0, alen = a.length; pos < alen; pos++) {\n i.next()\n i.set(a[pos])\n }\n },\n singletonList: function(o) {\n const arrayList = new ArrayList()\n arrayList.add(o)\n return arrayList\n }\n}\n\nexport default Collections\n","export default class EnvelopeDistance {\n static maxDistance(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n let dist = EnvelopeDistance.distance(ax1, ay1, bx1, by1)\n dist = Math.max(dist, EnvelopeDistance.distance(ax1, ay1, bx2, by2))\n dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx1, by1))\n dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx2, by2))\n return dist\n }\n static distance(x1, y1, x2, y2) {\n const dx = x2 - x1\n const dy = y2 - y1\n return Math.sqrt(dx * dx + dy * dy)\n }\n static maximumDistance(env1, env2) {\n const minx = Math.min(env1.getMinX(), env2.getMinX())\n const miny = Math.min(env1.getMinY(), env2.getMinY())\n const maxx = Math.max(env1.getMaxX(), env2.getMaxX())\n const maxy = Math.max(env1.getMaxY(), env2.getMaxY())\n return EnvelopeDistance.distance(minx, miny, maxx, maxy)\n }\n static minMaxDistance(a, b) {\n const aminx = a.getMinX()\n const aminy = a.getMinY()\n const amaxx = a.getMaxX()\n const amaxy = a.getMaxY()\n const bminx = b.getMinX()\n const bminy = b.getMinY()\n const bmaxx = b.getMaxX()\n const bmaxy = b.getMaxY()\n let dist = EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bminx, bmaxy)\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n return dist\n }\n}\n","import IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport AbstractNode from './AbstractNode.js'\nimport EnvelopeDistance from './EnvelopeDistance.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nexport default class BoundablePair {\n constructor() {\n BoundablePair.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._boundable1 = null\n this._boundable2 = null\n this._distance = null\n this._itemDistance = null\n const boundable1 = arguments[0], boundable2 = arguments[1], itemDistance = arguments[2]\n this._boundable1 = boundable1\n this._boundable2 = boundable2\n this._itemDistance = itemDistance\n this._distance = this.distance()\n }\n static area(b) {\n return b.getBounds().getArea()\n }\n static isComposite(item) {\n return item instanceof AbstractNode\n }\n maximumDistance() {\n return EnvelopeDistance.maximumDistance(this._boundable1.getBounds(), this._boundable2.getBounds())\n }\n expandToQueue(priQ, minDistance) {\n const isComp1 = BoundablePair.isComposite(this._boundable1)\n const isComp2 = BoundablePair.isComposite(this._boundable2)\n if (isComp1 && isComp2) {\n if (BoundablePair.area(this._boundable1) > BoundablePair.area(this._boundable2)) {\n this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n return null\n } else {\n this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n return null\n }\n } else if (isComp1) {\n this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n return null\n } else if (isComp2) {\n this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n return null\n }\n throw new IllegalArgumentException('neither boundable is composite')\n }\n isLeaves() {\n return !(BoundablePair.isComposite(this._boundable1) || BoundablePair.isComposite(this._boundable2))\n }\n compareTo(o) {\n const nd = o\n if (this._distance < nd._distance) return -1\n if (this._distance > nd._distance) return 1\n return 0\n }\n expand(bndComposite, bndOther, isFlipped, priQ, minDistance) {\n const children = bndComposite.getChildBoundables()\n for (let i = children.iterator(); i.hasNext(); ) {\n const child = i.next()\n let bp = null\n if (isFlipped) \n bp = new BoundablePair(bndOther, child, this._itemDistance)\n else \n bp = new BoundablePair(child, bndOther, this._itemDistance)\n \n if (bp.getDistance() < minDistance) \n priQ.add(bp)\n \n }\n }\n getBoundable(i) {\n if (i === 0) return this._boundable1\n return this._boundable2\n }\n getDistance() {\n return this._distance\n }\n distance() {\n if (this.isLeaves()) \n return this._itemDistance.distance(this._boundable1, this._boundable2)\n \n return this._boundable1.getBounds().distance(this._boundable2.getBounds())\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","export default class ItemVisitor {\n visitItem(item) {}\n}\n","import ItemBoundable from './ItemBoundable.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport ItemVisitor from '../ItemVisitor.js'\nimport AbstractNode from './AbstractNode.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Assert from '../../util/Assert.js'\nimport List from '../../../../../java/util/List.js'\nexport default class AbstractSTRtree {\n constructor() {\n AbstractSTRtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._root = null\n this._built = false\n this._itemBoundables = new ArrayList()\n this._nodeCapacity = null\n if (arguments.length === 0) {\n AbstractSTRtree.constructor_.call(this, AbstractSTRtree.DEFAULT_NODE_CAPACITY)\n } else if (arguments.length === 1) {\n const nodeCapacity = arguments[0]\n Assert.isTrue(nodeCapacity > 1, 'Node capacity must be greater than 1')\n this._nodeCapacity = nodeCapacity\n }\n }\n static compareDoubles(a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n }\n queryInternal() {\n if (hasInterface(arguments[2], ItemVisitor) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n const searchBounds = arguments[0], node = arguments[1], visitor = arguments[2]\n const childBoundables = node.getChildBoundables()\n for (let i = 0; i < childBoundables.size(); i++) {\n const childBoundable = childBoundables.get(i)\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) \n this.queryInternal(searchBounds, childBoundable, visitor)\n else if (childBoundable instanceof ItemBoundable) \n visitor.visitItem(childBoundable.getItem())\n else \n Assert.shouldNeverReachHere()\n \n }\n } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n const searchBounds = arguments[0], node = arguments[1], matches = arguments[2]\n const childBoundables = node.getChildBoundables()\n for (let i = 0; i < childBoundables.size(); i++) {\n const childBoundable = childBoundables.get(i)\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) \n this.queryInternal(searchBounds, childBoundable, matches)\n else if (childBoundable instanceof ItemBoundable) \n matches.add(childBoundable.getItem())\n else \n Assert.shouldNeverReachHere()\n \n }\n }\n }\n getNodeCapacity() {\n return this._nodeCapacity\n }\n lastNode(nodes) {\n return nodes.get(nodes.size() - 1)\n }\n size() {\n if (arguments.length === 0) {\n if (this.isEmpty()) \n return 0\n \n this.build()\n return this.size(this._root)\n } else if (arguments.length === 1) {\n const node = arguments[0]\n let size = 0\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) \n size += this.size(childBoundable)\n else if (childBoundable instanceof ItemBoundable) \n size += 1\n \n }\n return size\n }\n }\n removeItem(node, item) {\n let childToRemove = null\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof ItemBoundable) \n if (childBoundable.getItem() === item) childToRemove = childBoundable\n \n }\n if (childToRemove !== null) {\n node.getChildBoundables().remove(childToRemove)\n return true\n }\n return false\n }\n itemsTree() {\n if (arguments.length === 0) {\n this.build()\n const valuesTree = this.itemsTree(this._root)\n if (valuesTree === null) return new ArrayList()\n return valuesTree\n } else if (arguments.length === 1) {\n const node = arguments[0]\n const valuesTreeForNode = new ArrayList()\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) {\n const valuesTreeForChild = this.itemsTree(childBoundable)\n if (valuesTreeForChild !== null) valuesTreeForNode.add(valuesTreeForChild)\n } else if (childBoundable instanceof ItemBoundable) {\n valuesTreeForNode.add(childBoundable.getItem())\n } else {\n Assert.shouldNeverReachHere()\n }\n }\n if (valuesTreeForNode.size() <= 0) return null\n return valuesTreeForNode\n }\n }\n insert(bounds, item) {\n Assert.isTrue(!this._built, 'Cannot insert items into an STR packed R-tree after it has been built.')\n this._itemBoundables.add(new ItemBoundable(bounds, item))\n }\n boundablesAtLevel() {\n if (arguments.length === 1) {\n const level = arguments[0]\n const boundables = new ArrayList()\n this.boundablesAtLevel(level, this._root, boundables)\n return boundables\n } else if (arguments.length === 3) {\n const level = arguments[0], top = arguments[1], boundables = arguments[2]\n Assert.isTrue(level > -2)\n if (top.getLevel() === level) {\n boundables.add(top)\n return null\n }\n for (let i = top.getChildBoundables().iterator(); i.hasNext(); ) {\n const boundable = i.next()\n if (boundable instanceof AbstractNode) {\n this.boundablesAtLevel(level, boundable, boundables)\n } else {\n Assert.isTrue(boundable instanceof ItemBoundable)\n if (level === -1) \n boundables.add(boundable)\n \n }\n }\n return null\n }\n }\n query() {\n if (arguments.length === 1) {\n const searchBounds = arguments[0]\n this.build()\n const matches = new ArrayList()\n if (this.isEmpty()) \n return matches\n \n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n this.queryInternal(searchBounds, this._root, matches)\n \n return matches\n } else if (arguments.length === 2) {\n const searchBounds = arguments[0], visitor = arguments[1]\n this.build()\n if (this.isEmpty()) \n return null\n \n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n this.queryInternal(searchBounds, this._root, visitor)\n \n }\n }\n build() {\n if (this._built) return null\n this._root = this._itemBoundables.isEmpty() ? this.createNode(0) : this.createHigherLevels(this._itemBoundables, -1)\n this._itemBoundables = null\n this._built = true\n }\n getRoot() {\n this.build()\n return this._root\n }\n remove() {\n if (arguments.length === 2) {\n const searchBounds = arguments[0], item = arguments[1]\n this.build()\n if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n return this.remove(searchBounds, this._root, item)\n \n return false\n } else if (arguments.length === 3) {\n const searchBounds = arguments[0], node = arguments[1], item = arguments[2]\n let found = this.removeItem(node, item)\n if (found) return true\n let childToPrune = null\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n continue\n \n if (childBoundable instanceof AbstractNode) {\n found = this.remove(searchBounds, childBoundable, item)\n if (found) {\n childToPrune = childBoundable\n break\n }\n }\n }\n if (childToPrune !== null) \n if (childToPrune.getChildBoundables().isEmpty()) \n node.getChildBoundables().remove(childToPrune)\n \n \n return found\n }\n }\n createHigherLevels(boundablesOfALevel, level) {\n Assert.isTrue(!boundablesOfALevel.isEmpty())\n const parentBoundables = this.createParentBoundables(boundablesOfALevel, level + 1)\n if (parentBoundables.size() === 1) \n return parentBoundables.get(0)\n \n return this.createHigherLevels(parentBoundables, level + 1)\n }\n depth() {\n if (arguments.length === 0) {\n if (this.isEmpty()) \n return 0\n \n this.build()\n return this.depth(this._root)\n } else if (arguments.length === 1) {\n const node = arguments[0]\n let maxChildDepth = 0\n for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (childBoundable instanceof AbstractNode) {\n const childDepth = this.depth(childBoundable)\n if (childDepth > maxChildDepth) maxChildDepth = childDepth\n }\n }\n return maxChildDepth + 1\n }\n }\n createParentBoundables(childBoundables, newLevel) {\n Assert.isTrue(!childBoundables.isEmpty())\n const parentBoundables = new ArrayList()\n parentBoundables.add(this.createNode(newLevel))\n const sortedChildBoundables = new ArrayList(childBoundables)\n Collections.sort(sortedChildBoundables, this.getComparator())\n for (let i = sortedChildBoundables.iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (this.lastNode(parentBoundables).getChildBoundables().size() === this.getNodeCapacity()) \n parentBoundables.add(this.createNode(newLevel))\n \n this.lastNode(parentBoundables).addChildBoundable(childBoundable)\n }\n return parentBoundables\n }\n isEmpty() {\n if (!this._built) return this._itemBoundables.isEmpty()\n return this._root.isEmpty()\n }\n get interfaces_() {\n return [Serializable]\n }\n}\nfunction IntersectsOp() {}\nAbstractSTRtree.IntersectsOp = IntersectsOp\nAbstractSTRtree.DEFAULT_NODE_CAPACITY = 10\n","export default class ItemDistance {\n distance(item1, item2) {}\n}\n","import ItemBoundable from './ItemBoundable.js'\nimport PriorityQueue from '../../util/PriorityQueue.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport SpatialIndex from '../SpatialIndex.js'\nimport AbstractNode from './AbstractNode.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport BoundablePair from './BoundablePair.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Comparator from '../../../../../java/util/Comparator.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nimport AbstractSTRtree from './AbstractSTRtree.js'\nimport ItemDistance from './ItemDistance.js'\nexport default class STRtree extends AbstractSTRtree {\n constructor() {\n super()\n STRtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n STRtree.constructor_.call(this, STRtree.DEFAULT_NODE_CAPACITY)\n } else if (arguments.length === 1) {\n const nodeCapacity = arguments[0]\n AbstractSTRtree.constructor_.call(this, nodeCapacity)\n }\n }\n static centreX(e) {\n return STRtree.avg(e.getMinX(), e.getMaxX())\n }\n static avg(a, b) {\n return (a + b) / 2\n }\n static getItems(kNearestNeighbors) {\n const items = new Array(kNearestNeighbors.size()).fill(null)\n let count = 0\n while (!kNearestNeighbors.isEmpty()) {\n const bp = kNearestNeighbors.poll()\n items[count] = bp.getBoundable(0).getItem()\n count++\n }\n return items\n }\n static centreY(e) {\n return STRtree.avg(e.getMinY(), e.getMaxY())\n }\n createParentBoundablesFromVerticalSlices(verticalSlices, newLevel) {\n Assert.isTrue(verticalSlices.length > 0)\n const parentBoundables = new ArrayList()\n for (let i = 0; i < verticalSlices.length; i++) \n parentBoundables.addAll(this.createParentBoundablesFromVerticalSlice(verticalSlices[i], newLevel))\n \n return parentBoundables\n }\n nearestNeighbourK() {\n if (arguments.length === 2) {\n const initBndPair = arguments[0], k = arguments[1]\n return this.nearestNeighbourK(initBndPair, Double.POSITIVE_INFINITY, k)\n } else if (arguments.length === 3) {\n const initBndPair = arguments[0], maxDistance = arguments[1], k = arguments[2]\n let distanceLowerBound = maxDistance\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n const kNearestNeighbors = new PriorityQueue()\n while (!priQ.isEmpty() && distanceLowerBound >= 0.0) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance >= distanceLowerBound) \n break\n \n if (bndPair.isLeaves()) \n if (kNearestNeighbors.size() < k) {\n kNearestNeighbors.add(bndPair)\n } else {\n const bp1 = kNearestNeighbors.peek()\n if (bp1.getDistance() > pairDistance) {\n kNearestNeighbors.poll()\n kNearestNeighbors.add(bndPair)\n }\n const bp2 = kNearestNeighbors.peek()\n distanceLowerBound = bp2.getDistance()\n }\n else \n bndPair.expandToQueue(priQ, distanceLowerBound)\n \n }\n return STRtree.getItems(kNearestNeighbors)\n }\n }\n createNode(level) {\n return new STRtreeNode(level)\n }\n size() {\n if (arguments.length === 0) \n return super.size.call(this)\n else return super.size.apply(this, arguments)\n }\n insert() {\n if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n const itemEnv = arguments[0], item = arguments[1]\n if (itemEnv.isNull()) \n return null\n \n super.insert.call(this, itemEnv, item)\n } else {\n return super.insert.apply(this, arguments)\n }\n }\n getIntersectsOp() {\n return STRtree.intersectsOp\n }\n verticalSlices(childBoundables, sliceCount) {\n const sliceCapacity = Math.trunc(Math.ceil(childBoundables.size() / sliceCount))\n const slices = new Array(sliceCount).fill(null)\n const i = childBoundables.iterator()\n for (let j = 0; j < sliceCount; j++) {\n slices[j] = new ArrayList()\n let boundablesAddedToSlice = 0\n while (i.hasNext() && boundablesAddedToSlice < sliceCapacity) {\n const childBoundable = i.next()\n slices[j].add(childBoundable)\n boundablesAddedToSlice++\n }\n }\n return slices\n }\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n return super.query.call(this, searchEnv)\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n super.query.call(this, searchEnv, visitor)\n }\n }\n getComparator() {\n return STRtree.yComparator\n }\n createParentBoundablesFromVerticalSlice(childBoundables, newLevel) {\n return super.createParentBoundables.call(this, childBoundables, newLevel)\n }\n remove() {\n if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n const itemEnv = arguments[0], item = arguments[1]\n return super.remove.call(this, itemEnv, item)\n } else {\n return super.remove.apply(this, arguments)\n }\n }\n depth() {\n if (arguments.length === 0) \n return super.depth.call(this)\n else return super.depth.apply(this, arguments)\n }\n createParentBoundables(childBoundables, newLevel) {\n Assert.isTrue(!childBoundables.isEmpty())\n const minLeafCount = Math.trunc(Math.ceil(childBoundables.size() / this.getNodeCapacity()))\n const sortedChildBoundables = new ArrayList(childBoundables)\n Collections.sort(sortedChildBoundables, STRtree.xComparator)\n const verticalSlices = this.verticalSlices(sortedChildBoundables, Math.trunc(Math.ceil(Math.sqrt(minLeafCount))))\n return this.createParentBoundablesFromVerticalSlices(verticalSlices, newLevel)\n }\n nearestNeighbour() {\n if (arguments.length === 1) {\n if (hasInterface(arguments[0], ItemDistance)) {\n const itemDist = arguments[0]\n if (this.isEmpty()) return null\n const bp = new BoundablePair(this.getRoot(), this.getRoot(), itemDist)\n return this.nearestNeighbour(bp)\n } else if (arguments[0] instanceof BoundablePair) {\n const initBndPair = arguments[0]\n let distanceLowerBound = Double.POSITIVE_INFINITY\n let minPair = null\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n while (!priQ.isEmpty() && distanceLowerBound > 0.0) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance >= distanceLowerBound) break\n if (bndPair.isLeaves()) {\n distanceLowerBound = pairDistance\n minPair = bndPair\n } else {\n bndPair.expandToQueue(priQ, distanceLowerBound)\n }\n }\n if (minPair === null) return null\n return [minPair.getBoundable(0).getItem(), minPair.getBoundable(1).getItem()]\n }\n } else if (arguments.length === 2) {\n const tree = arguments[0], itemDist = arguments[1]\n if (this.isEmpty() || tree.isEmpty()) return null\n const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n return this.nearestNeighbour(bp)\n } else if (arguments.length === 3) {\n const env = arguments[0], item = arguments[1], itemDist = arguments[2]\n const bnd = new ItemBoundable(env, item)\n const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n return this.nearestNeighbour(bp)[0]\n } else if (arguments.length === 4) {\n const env = arguments[0], item = arguments[1], itemDist = arguments[2], k = arguments[3]\n const bnd = new ItemBoundable(env, item)\n const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n return this.nearestNeighbourK(bp, k)\n }\n }\n isWithinDistance() {\n if (arguments.length === 2) {\n const initBndPair = arguments[0], maxDistance = arguments[1]\n let distanceUpperBound = Double.POSITIVE_INFINITY\n const priQ = new PriorityQueue()\n priQ.add(initBndPair)\n while (!priQ.isEmpty()) {\n const bndPair = priQ.poll()\n const pairDistance = bndPair.getDistance()\n if (pairDistance > maxDistance) return false\n if (bndPair.maximumDistance() <= maxDistance) return true\n if (bndPair.isLeaves()) {\n distanceUpperBound = pairDistance\n if (distanceUpperBound <= maxDistance) return true\n } else {\n bndPair.expandToQueue(priQ, distanceUpperBound)\n }\n }\n return false\n } else if (arguments.length === 3) {\n const tree = arguments[0], itemDist = arguments[1], maxDistance = arguments[2]\n const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n return this.isWithinDistance(bp, maxDistance)\n }\n }\n get interfaces_() {\n return [SpatialIndex, Serializable]\n }\n}\nclass STRtreeNode extends AbstractNode {\n constructor() {\n super()\n STRtreeNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const level = arguments[0]\n AbstractNode.constructor_.call(this, level)\n }\n computeBounds() {\n let bounds = null\n for (let i = this.getChildBoundables().iterator(); i.hasNext(); ) {\n const childBoundable = i.next()\n if (bounds === null) \n bounds = new Envelope(childBoundable.getBounds())\n else \n bounds.expandToInclude(childBoundable.getBounds())\n \n }\n return bounds\n }\n}\nSTRtree.STRtreeNode = STRtreeNode\nSTRtree.xComparator = new (class {\n get interfaces_() {\n return [Comparator]\n }\n compare(o1, o2) {\n return AbstractSTRtree.compareDoubles(STRtree.centreX(o1.getBounds()), STRtree.centreX(o2.getBounds()))\n }\n})()\nSTRtree.yComparator = new (class {\n get interfaces_() {\n return [Comparator]\n }\n compare(o1, o2) {\n return AbstractSTRtree.compareDoubles(STRtree.centreY(o1.getBounds()), STRtree.centreY(o2.getBounds()))\n }\n})()\nSTRtree.intersectsOp = new (class {\n get interfaces_() {\n return [IntersectsOp]\n }\n intersects(aBounds, bBounds) {\n return aBounds.intersects(bBounds)\n }\n})()\nSTRtree.DEFAULT_NODE_CAPACITY = 10\n","import Assert from '../util/Assert.js'\nexport default class SegmentPointComparator {\n static relativeSign(x0, x1) {\n if (x0 < x1) return -1\n if (x0 > x1) return 1\n return 0\n }\n static compare(octant, p0, p1) {\n if (p0.equals2D(p1)) return 0\n const xSign = SegmentPointComparator.relativeSign(p0.x, p1.x)\n const ySign = SegmentPointComparator.relativeSign(p0.y, p1.y)\n switch (octant) {\n case 0:\n return SegmentPointComparator.compareValue(xSign, ySign)\n case 1:\n return SegmentPointComparator.compareValue(ySign, xSign)\n case 2:\n return SegmentPointComparator.compareValue(ySign, -xSign)\n case 3:\n return SegmentPointComparator.compareValue(-xSign, ySign)\n case 4:\n return SegmentPointComparator.compareValue(-xSign, -ySign)\n case 5:\n return SegmentPointComparator.compareValue(-ySign, -xSign)\n case 6:\n return SegmentPointComparator.compareValue(-ySign, xSign)\n case 7:\n return SegmentPointComparator.compareValue(xSign, -ySign)\n }\n Assert.shouldNeverReachHere('invalid octant value')\n return 0\n }\n static compareValue(compareSign0, compareSign1) {\n if (compareSign0 < 0) return -1\n if (compareSign0 > 0) return 1\n if (compareSign1 < 0) return -1\n if (compareSign1 > 0) return 1\n return 0\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport SegmentPointComparator from './SegmentPointComparator.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nexport default class SegmentNode {\n constructor() {\n SegmentNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._segString = null\n this.coord = null\n this.segmentIndex = null\n this._segmentOctant = null\n this._isInterior = null\n const segString = arguments[0], coord = arguments[1], segmentIndex = arguments[2], segmentOctant = arguments[3]\n this._segString = segString\n this.coord = new Coordinate(coord)\n this.segmentIndex = segmentIndex\n this._segmentOctant = segmentOctant\n this._isInterior = !coord.equals2D(segString.getCoordinate(segmentIndex))\n }\n getCoordinate() {\n return this.coord\n }\n print(out) {\n out.print(this.coord)\n out.print(' seg # = ' + this.segmentIndex)\n }\n compareTo(obj) {\n const other = obj\n if (this.segmentIndex < other.segmentIndex) return -1\n if (this.segmentIndex > other.segmentIndex) return 1\n if (this.coord.equals2D(other.coord)) return 0\n if (!this._isInterior) return -1\n if (!other._isInterior) return 1\n return SegmentPointComparator.compare(this._segmentOctant, this.coord, other.coord)\n }\n isEndPoint(maxSegmentIndex) {\n if (this.segmentIndex === 0 && !this._isInterior) return true\n if (this.segmentIndex === maxSegmentIndex) return true\n return false\n }\n toString() {\n return this.segmentIndex + ':' + this.coord.toString()\n }\n isInterior() {\n return this._isInterior\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html\n * @constructor\n * @private\n */\nexport default class Iterator {\n /**\n * Returns true if the iteration has more elements.\n * @return {boolean}\n */\n hasNext() {}\n\n /**\n * Returns the next element in the iteration.\n * @return {Object}\n */\n next() {}\n\n /**\n * Removes from the underlying collection the last element returned by the\n * iterator (optional operation).\n */\n remove() {}\n}\n","import CoordinateList from '../geom/CoordinateList.js'\nimport SegmentNode from './SegmentNode.js'\nimport Iterator from '../../../../java/util/Iterator.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport Integer from '../../../../java/lang/Integer.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\nimport Assert from '../util/Assert.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class SegmentNodeList {\n constructor() {\n SegmentNodeList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeMap = new TreeMap()\n this._edge = null\n const edge = arguments[0]\n this._edge = edge\n }\n getSplitCoordinates() {\n const coordList = new CoordinateList()\n this.addEndpoints()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n this.addEdgeCoordinates(eiPrev, ei, coordList)\n eiPrev = ei\n }\n return coordList.toCoordinateArray()\n }\n addCollapsedNodes() {\n const collapsedVertexIndexes = new ArrayList()\n this.findCollapsesFromInsertedNodes(collapsedVertexIndexes)\n this.findCollapsesFromExistingVertices(collapsedVertexIndexes)\n for (let it = collapsedVertexIndexes.iterator(); it.hasNext(); ) {\n const vertexIndex = it.next().intValue()\n this.add(this._edge.getCoordinate(vertexIndex), vertexIndex)\n }\n }\n createSplitEdgePts(ei0, ei1) {\n let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n if (npts === 2) return [new Coordinate(ei0.coord), new Coordinate(ei1.coord)]\n const lastSegStartPt = this._edge.getCoordinate(ei1.segmentIndex)\n const useIntPt1 = ei1.isInterior() || !ei1.coord.equals2D(lastSegStartPt)\n if (!useIntPt1) \n npts--\n \n const pts = new Array(npts).fill(null)\n let ipt = 0\n pts[ipt++] = new Coordinate(ei0.coord)\n for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n pts[ipt++] = this._edge.getCoordinate(i)\n \n if (useIntPt1) pts[ipt] = new Coordinate(ei1.coord)\n return pts\n }\n print(out) {\n out.println('Intersections:')\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n ei.print(out)\n }\n }\n findCollapsesFromExistingVertices(collapsedVertexIndexes) {\n for (let i = 0; i < this._edge.size() - 2; i++) {\n const p0 = this._edge.getCoordinate(i)\n const p1 = this._edge.getCoordinate(i + 1)\n const p2 = this._edge.getCoordinate(i + 2)\n if (p0.equals2D(p2)) \n collapsedVertexIndexes.add(Integer.valueOf(i + 1))\n \n }\n }\n addEdgeCoordinates(ei0, ei1, coordList) {\n const pts = this.createSplitEdgePts(ei0, ei1)\n coordList.add(pts, false)\n }\n iterator() {\n return this._nodeMap.values().iterator()\n }\n addSplitEdges(edgeList) {\n this.addEndpoints()\n this.addCollapsedNodes()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const newEdge = this.createSplitEdge(eiPrev, ei)\n edgeList.add(newEdge)\n eiPrev = ei\n }\n }\n findCollapseIndex(ei0, ei1, collapsedVertexIndex) {\n if (!ei0.coord.equals2D(ei1.coord)) return false\n let numVerticesBetween = ei1.segmentIndex - ei0.segmentIndex\n if (!ei1.isInterior()) \n numVerticesBetween--\n \n if (numVerticesBetween === 1) {\n collapsedVertexIndex[0] = ei0.segmentIndex + 1\n return true\n }\n return false\n }\n findCollapsesFromInsertedNodes(collapsedVertexIndexes) {\n const collapsedVertexIndex = new Array(1).fill(null)\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const isCollapsed = this.findCollapseIndex(eiPrev, ei, collapsedVertexIndex)\n if (isCollapsed) collapsedVertexIndexes.add(Integer.valueOf(collapsedVertexIndex[0]))\n eiPrev = ei\n }\n }\n getEdge() {\n return this._edge\n }\n addEndpoints() {\n const maxSegIndex = this._edge.size() - 1\n this.add(this._edge.getCoordinate(0), 0)\n this.add(this._edge.getCoordinate(maxSegIndex), maxSegIndex)\n }\n createSplitEdge(ei0, ei1) {\n const pts = this.createSplitEdgePts(ei0, ei1)\n return new NodedSegmentString(pts, this._edge.getData())\n }\n add(intPt, segmentIndex) {\n const eiNew = new SegmentNode(this._edge, intPt, segmentIndex, this._edge.getSegmentOctant(segmentIndex))\n const ei = this._nodeMap.get(eiNew)\n if (ei !== null) {\n Assert.isTrue(ei.coord.equals2D(intPt), 'Found equal nodes with different coordinates')\n return ei\n }\n this._nodeMap.put(eiNew, eiNew)\n return eiNew\n }\n checkSplitEdgesCorrectness(splitEdges) {\n const edgePts = this._edge.getCoordinates()\n const split0 = splitEdges.get(0)\n const pt0 = split0.getCoordinate(0)\n if (!pt0.equals2D(edgePts[0])) throw new RuntimeException('bad split edge start point at ' + pt0)\n const splitn = splitEdges.get(splitEdges.size() - 1)\n const splitnPts = splitn.getCoordinates()\n const ptn = splitnPts[splitnPts.length - 1]\n if (!ptn.equals2D(edgePts[edgePts.length - 1])) throw new RuntimeException('bad split edge end point at ' + ptn)\n }\n}\nclass NodeVertexIterator {\n constructor() {\n NodeVertexIterator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeList = null\n this._edge = null\n this._nodeIt = null\n this._currNode = null\n this._nextNode = null\n this._currSegIndex = 0\n const nodeList = arguments[0]\n this._nodeList = nodeList\n this._edge = nodeList.getEdge()\n this._nodeIt = nodeList.iterator()\n this.readNextNode()\n }\n next() {\n if (this._currNode === null) {\n this._currNode = this._nextNode\n this._currSegIndex = this._currNode.segmentIndex\n this.readNextNode()\n return this._currNode\n }\n if (this._nextNode === null) return null\n if (this._nextNode.segmentIndex === this._currNode.segmentIndex) {\n this._currNode = this._nextNode\n this._currSegIndex = this._currNode.segmentIndex\n this.readNextNode()\n return this._currNode\n }\n if (this._nextNode.segmentIndex > this._currNode.segmentIndex) {}\n return null\n }\n remove() {\n throw new UnsupportedOperationException(this.getClass().getName())\n }\n hasNext() {\n if (this._nextNode === null) return false\n return true\n }\n readNextNode() {\n if (this._nodeIt.hasNext()) this._nextNode = this._nodeIt.next(); else this._nextNode = null\n }\n get interfaces_() {\n return [Iterator]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nexport default class Octant {\n static octant() {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const dx = arguments[0], dy = arguments[1]\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for point ( ' + dx + ', ' + dy + ' )')\n const adx = Math.abs(dx)\n const ady = Math.abs(dy)\n if (dx >= 0) \n if (dy >= 0) \n if (adx >= ady) return 0; else return 1\n else \n if (adx >= ady) return 7; else return 6\n \n else \n if (dy >= 0) \n if (adx >= ady) return 3; else return 2\n else \n if (adx >= ady) return 4; else return 5\n \n \n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p0 = arguments[0], p1 = arguments[1]\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for two identical points ' + p0)\n return Octant.octant(dx, dy)\n }\n }\n}\n","export default class SegmentString {\n getCoordinates() {}\n size() {}\n getCoordinate(i) {}\n isClosed() {}\n setData(data) {}\n getData() {}\n}\n","import SegmentString from './SegmentString.js'\nexport default class NodableSegmentString {\n addIntersection(intPt, segmentIndex) {}\n get interfaces_() {\n return [SegmentString]\n }\n}\n","import SegmentNodeList from './SegmentNodeList.js'\nimport WKTWriter from '../io/WKTWriter.js'\nimport CoordinateArraySequence from '../geom/impl/CoordinateArraySequence.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Octant from './Octant.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport NodableSegmentString from './NodableSegmentString.js'\nexport default class NodedSegmentString {\n constructor() {\n NodedSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeList = new SegmentNodeList(this)\n this._pts = null\n this._data = null\n const pts = arguments[0], data = arguments[1]\n this._pts = pts\n this._data = data\n }\n static getNodedSubstrings() {\n if (arguments.length === 1) {\n const segStrings = arguments[0]\n const resultEdgelist = new ArrayList()\n NodedSegmentString.getNodedSubstrings(segStrings, resultEdgelist)\n return resultEdgelist\n } else if (arguments.length === 2) {\n const segStrings = arguments[0], resultEdgelist = arguments[1]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n ss.getNodeList().addSplitEdges(resultEdgelist)\n }\n }\n }\n getCoordinates() {\n return this._pts\n }\n size() {\n return this._pts.length\n }\n getCoordinate(i) {\n return this._pts[i]\n }\n isClosed() {\n return this._pts[0].equals(this._pts[this._pts.length - 1])\n }\n getSegmentOctant(index) {\n if (index === this._pts.length - 1) return -1\n return this.safeOctant(this.getCoordinate(index), this.getCoordinate(index + 1))\n }\n setData(data) {\n this._data = data\n }\n safeOctant(p0, p1) {\n if (p0.equals2D(p1)) return 0\n return Octant.octant(p0, p1)\n }\n getData() {\n return this._data\n }\n addIntersection() {\n if (arguments.length === 2) {\n const intPt = arguments[0], segmentIndex = arguments[1]\n this.addIntersectionNode(intPt, segmentIndex)\n } else if (arguments.length === 4) {\n const li = arguments[0], segmentIndex = arguments[1], geomIndex = arguments[2], intIndex = arguments[3]\n const intPt = new Coordinate(li.getIntersection(intIndex))\n this.addIntersection(intPt, segmentIndex)\n }\n }\n toString() {\n return WKTWriter.toLineString(new CoordinateArraySequence(this._pts))\n }\n getNodeList() {\n return this._nodeList\n }\n addIntersectionNode(intPt, segmentIndex) {\n let normalizedSegmentIndex = segmentIndex\n const nextSegIndex = normalizedSegmentIndex + 1\n if (nextSegIndex < this._pts.length) {\n const nextPt = this._pts[nextSegIndex]\n if (intPt.equals2D(nextPt)) \n normalizedSegmentIndex = nextSegIndex\n \n }\n const ei = this._nodeList.add(intPt, normalizedSegmentIndex)\n return ei\n }\n addIntersections(li, segmentIndex, geomIndex) {\n for (let i = 0; i < li.getIntersectionNum(); i++) \n this.addIntersection(li, segmentIndex, geomIndex, i)\n \n }\n get interfaces_() {\n return [NodableSegmentString]\n }\n}\n","import LineSegment from '../../geom/LineSegment.js'\nexport default class MonotoneChainOverlapAction {\n constructor() {\n MonotoneChainOverlapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._overlapSeg1 = new LineSegment()\n this._overlapSeg2 = new LineSegment()\n }\n overlap() {\n if (arguments.length === 2) {\n const seg1 = arguments[0], seg2 = arguments[1]\n } else if (arguments.length === 4) {\n const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n mc1.getLineSegment(start1, this._overlapSeg1)\n mc2.getLineSegment(start2, this._overlapSeg2)\n this.overlap(this._overlapSeg1, this._overlapSeg2)\n }\n }\n}\n","import Envelope from '../../geom/Envelope.js'\nexport default class MonotoneChain {\n constructor() {\n MonotoneChain.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._start = null\n this._end = null\n this._env = null\n this._context = null\n this._id = null\n const pts = arguments[0], start = arguments[1], end = arguments[2], context = arguments[3]\n this._pts = pts\n this._start = start\n this._end = end\n this._context = context\n }\n getLineSegment(index, ls) {\n ls.p0 = this._pts[index]\n ls.p1 = this._pts[index + 1]\n }\n computeSelect(searchEnv, start0, end0, mcs) {\n const p0 = this._pts[start0]\n const p1 = this._pts[end0]\n if (end0 - start0 === 1) {\n mcs.select(this, start0)\n return null\n }\n if (!searchEnv.intersects(p0, p1)) return null\n const mid = Math.trunc((start0 + end0) / 2)\n if (start0 < mid) \n this.computeSelect(searchEnv, start0, mid, mcs)\n \n if (mid < end0) \n this.computeSelect(searchEnv, mid, end0, mcs)\n \n }\n getCoordinates() {\n const coord = new Array(this._end - this._start + 1).fill(null)\n let index = 0\n for (let i = this._start; i <= this._end; i++) \n coord[index++] = this._pts[i]\n \n return coord\n }\n computeOverlaps() {\n if (arguments.length === 2) {\n const mc = arguments[0], mco = arguments[1]\n this.computeOverlaps(this._start, this._end, mc, mc._start, mc._end, mco)\n } else if (arguments.length === 6) {\n const start0 = arguments[0], end0 = arguments[1], mc = arguments[2], start1 = arguments[3], end1 = arguments[4], mco = arguments[5]\n if (end0 - start0 === 1 && end1 - start1 === 1) {\n mco.overlap(this, start0, mc, start1)\n return null\n }\n if (!this.overlaps(start0, end0, mc, start1, end1)) return null\n const mid0 = Math.trunc((start0 + end0) / 2)\n const mid1 = Math.trunc((start1 + end1) / 2)\n if (start0 < mid0) {\n if (start1 < mid1) this.computeOverlaps(start0, mid0, mc, start1, mid1, mco)\n if (mid1 < end1) this.computeOverlaps(start0, mid0, mc, mid1, end1, mco)\n }\n if (mid0 < end0) {\n if (start1 < mid1) this.computeOverlaps(mid0, end0, mc, start1, mid1, mco)\n if (mid1 < end1) this.computeOverlaps(mid0, end0, mc, mid1, end1, mco)\n }\n }\n }\n setId(id) {\n this._id = id\n }\n select(searchEnv, mcs) {\n this.computeSelect(searchEnv, this._start, this._end, mcs)\n }\n getEnvelope() {\n if (this._env === null) {\n const p0 = this._pts[this._start]\n const p1 = this._pts[this._end]\n this._env = new Envelope(p0, p1)\n }\n return this._env\n }\n overlaps(start0, end0, mc, start1, end1) {\n return Envelope.intersects(this._pts[start0], this._pts[end0], mc._pts[start1], mc._pts[end1])\n }\n getEndIndex() {\n return this._end\n }\n getStartIndex() {\n return this._start\n }\n getContext() {\n return this._context\n }\n getId() {\n return this._id\n }\n}\n","import MonotoneChain from './MonotoneChain.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Quadrant from '../../geomgraph/Quadrant.js'\nexport default class MonotoneChainBuilder {\n static findChainEnd(pts, start) {\n let safeStart = start\n while (safeStart < pts.length - 1 && pts[safeStart].equals2D(pts[safeStart + 1])) \n safeStart++\n \n if (safeStart >= pts.length - 1) \n return pts.length - 1\n \n const chainQuad = Quadrant.quadrant(pts[safeStart], pts[safeStart + 1])\n let last = start + 1\n while (last < pts.length) {\n if (!pts[last - 1].equals2D(pts[last])) {\n const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n if (quad !== chainQuad) break\n }\n last++\n }\n return last - 1\n }\n static getChains() {\n if (arguments.length === 1) {\n const pts = arguments[0]\n return MonotoneChainBuilder.getChains(pts, null)\n } else if (arguments.length === 2) {\n const pts = arguments[0], context = arguments[1]\n const mcList = new ArrayList()\n let chainStart = 0\n do {\n const chainEnd = MonotoneChainBuilder.findChainEnd(pts, chainStart)\n const mc = new MonotoneChain(pts, chainStart, chainEnd, context)\n mcList.add(mc)\n chainStart = chainEnd\n } while (chainStart < pts.length - 1)\n return mcList\n }\n }\n}\n","export default class Noder {\n computeNodes(segStrings) {}\n getNodedSubstrings() {}\n}\n","import Noder from './Noder.js'\nexport default class SinglePassNoder {\n constructor() {\n SinglePassNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._segInt = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const segInt = arguments[0]\n this.setSegmentIntersector(segInt)\n }\n }\n setSegmentIntersector(segInt) {\n this._segInt = segInt\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import STRtree from '../index/strtree/STRtree.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport MonotoneChainOverlapAction from '../index/chain/MonotoneChainOverlapAction.js'\nimport MonotoneChainBuilder from '../index/chain/MonotoneChainBuilder.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport SinglePassNoder from './SinglePassNoder.js'\nexport default class MCIndexNoder extends SinglePassNoder {\n constructor() {\n super()\n MCIndexNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._monoChains = new ArrayList()\n this._index = new STRtree()\n this._idCounter = 0\n this._nodedSegStrings = null\n this._nOverlaps = 0\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const si = arguments[0]\n SinglePassNoder.constructor_.call(this, si)\n }\n }\n getMonotoneChains() {\n return this._monoChains\n }\n getNodedSubstrings() {\n return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n }\n getIndex() {\n return this._index\n }\n add(segStr) {\n const segChains = MonotoneChainBuilder.getChains(segStr.getCoordinates(), segStr)\n for (let i = segChains.iterator(); i.hasNext(); ) {\n const mc = i.next()\n mc.setId(this._idCounter++)\n this._index.insert(mc.getEnvelope(), mc)\n this._monoChains.add(mc)\n }\n }\n computeNodes(inputSegStrings) {\n this._nodedSegStrings = inputSegStrings\n for (let i = inputSegStrings.iterator(); i.hasNext(); ) \n this.add(i.next())\n \n this.intersectChains()\n }\n intersectChains() {\n const overlapAction = new SegmentOverlapAction(this._segInt)\n for (let i = this._monoChains.iterator(); i.hasNext(); ) {\n const queryChain = i.next()\n const overlapChains = this._index.query(queryChain.getEnvelope())\n for (let j = overlapChains.iterator(); j.hasNext(); ) {\n const testChain = j.next()\n if (testChain.getId() > queryChain.getId()) {\n queryChain.computeOverlaps(testChain, overlapAction)\n this._nOverlaps++\n }\n if (this._segInt.isDone()) return null\n }\n }\n }\n}\nclass SegmentOverlapAction extends MonotoneChainOverlapAction {\n constructor() {\n super()\n SegmentOverlapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._si = null\n const si = arguments[0]\n this._si = si\n }\n overlap() {\n if (arguments.length === 4) {\n const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n const ss1 = mc1.getContext()\n const ss2 = mc2.getContext()\n this._si.processIntersections(ss1, start1, ss2, start2)\n } else {\n return super.overlap.apply(this, arguments)\n }\n }\n}\nMCIndexNoder.SegmentOverlapAction = SegmentOverlapAction\n","import CoordinateList from '../../geom/CoordinateList.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Distance from '../../algorithm/Distance.js'\nexport default class BufferInputLineSimplifier {\n constructor() {\n BufferInputLineSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputLine = null\n this._distanceTol = null\n this._isDeleted = null\n this._angleOrientation = Orientation.COUNTERCLOCKWISE\n const inputLine = arguments[0]\n this._inputLine = inputLine\n }\n static simplify(inputLine, distanceTol) {\n const simp = new BufferInputLineSimplifier(inputLine)\n return simp.simplify(distanceTol)\n }\n isDeletable(i0, i1, i2, distanceTol) {\n const p0 = this._inputLine[i0]\n const p1 = this._inputLine[i1]\n const p2 = this._inputLine[i2]\n if (!this.isConcave(p0, p1, p2)) return false\n if (!this.isShallow(p0, p1, p2, distanceTol)) return false\n return this.isShallowSampled(p0, p1, i0, i2, distanceTol)\n }\n deleteShallowConcavities() {\n let index = 1\n let midIndex = this.findNextNonDeletedIndex(index)\n let lastIndex = this.findNextNonDeletedIndex(midIndex)\n let isChanged = false\n while (lastIndex < this._inputLine.length) {\n let isMiddleVertexDeleted = false\n if (this.isDeletable(index, midIndex, lastIndex, this._distanceTol)) {\n this._isDeleted[midIndex] = BufferInputLineSimplifier.DELETE\n isMiddleVertexDeleted = true\n isChanged = true\n }\n if (isMiddleVertexDeleted) index = lastIndex; else index = midIndex\n midIndex = this.findNextNonDeletedIndex(index)\n lastIndex = this.findNextNonDeletedIndex(midIndex)\n }\n return isChanged\n }\n isShallowConcavity(p0, p1, p2, distanceTol) {\n const orientation = Orientation.index(p0, p1, p2)\n const isAngleToSimplify = orientation === this._angleOrientation\n if (!isAngleToSimplify) return false\n const dist = Distance.pointToSegment(p1, p0, p2)\n return dist < distanceTol\n }\n isShallowSampled(p0, p2, i0, i2, distanceTol) {\n let inc = Math.trunc((i2 - i0) / BufferInputLineSimplifier.NUM_PTS_TO_CHECK)\n if (inc <= 0) inc = 1\n for (let i = i0; i < i2; i += inc) \n if (!this.isShallow(p0, p2, this._inputLine[i], distanceTol)) return false\n \n return true\n }\n isConcave(p0, p1, p2) {\n const orientation = Orientation.index(p0, p1, p2)\n const isConcave = orientation === this._angleOrientation\n return isConcave\n }\n simplify(distanceTol) {\n this._distanceTol = Math.abs(distanceTol)\n if (distanceTol < 0) this._angleOrientation = Orientation.CLOCKWISE\n this._isDeleted = new Array(this._inputLine.length).fill(null)\n let isChanged = false\n do \n isChanged = this.deleteShallowConcavities()\n while (isChanged)\n return this.collapseLine()\n }\n findNextNonDeletedIndex(index) {\n let next = index + 1\n while (next < this._inputLine.length && this._isDeleted[next] === BufferInputLineSimplifier.DELETE) next++\n return next\n }\n isShallow(p0, p1, p2, distanceTol) {\n const dist = Distance.pointToSegment(p1, p0, p2)\n return dist < distanceTol\n }\n collapseLine() {\n const coordList = new CoordinateList()\n for (let i = 0; i < this._inputLine.length; i++) \n if (this._isDeleted[i] !== BufferInputLineSimplifier.DELETE) coordList.add(this._inputLine[i])\n \n return coordList.toCoordinateArray()\n }\n}\nBufferInputLineSimplifier.INIT = 0\nBufferInputLineSimplifier.DELETE = 1\nBufferInputLineSimplifier.KEEP = 1\nBufferInputLineSimplifier.NUM_PTS_TO_CHECK = 10\n","import GeometryFactory from '../../geom/GeometryFactory.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class OffsetSegmentString {\n constructor() {\n OffsetSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._ptList = null\n this._precisionModel = null\n this._minimimVertexDistance = 0.0\n this._ptList = new ArrayList()\n }\n getCoordinates() {\n const coord = this._ptList.toArray(OffsetSegmentString.COORDINATE_ARRAY_TYPE)\n return coord\n }\n setPrecisionModel(precisionModel) {\n this._precisionModel = precisionModel\n }\n addPt(pt) {\n const bufPt = new Coordinate(pt)\n this._precisionModel.makePrecise(bufPt)\n if (this.isRedundant(bufPt)) return null\n this._ptList.add(bufPt)\n }\n reverse() {}\n addPts(pt, isForward) {\n if (isForward) \n for (let i = 0; i < pt.length; i++) \n this.addPt(pt[i])\n \n else \n for (let i = pt.length - 1; i >= 0; i--) \n this.addPt(pt[i])\n \n \n }\n isRedundant(pt) {\n if (this._ptList.size() < 1) return false\n const lastPt = this._ptList.get(this._ptList.size() - 1)\n const ptDist = pt.distance(lastPt)\n if (ptDist < this._minimimVertexDistance) return true\n return false\n }\n toString() {\n const fact = new GeometryFactory()\n const line = fact.createLineString(this.getCoordinates())\n return line.toString()\n }\n closeRing() {\n if (this._ptList.size() < 1) return null\n const startPt = new Coordinate(this._ptList.get(0))\n const lastPt = this._ptList.get(this._ptList.size() - 1)\n if (startPt.equals(lastPt)) return null\n this._ptList.add(startPt)\n }\n setMinimumVertexDistance(minimimVertexDistance) {\n this._minimimVertexDistance = minimimVertexDistance\n }\n}\nOffsetSegmentString.COORDINATE_ARRAY_TYPE = new Array(0).fill(null)\n","import Orientation from './Orientation.js'\nexport default class Angle {\n static toDegrees(radians) {\n return radians * 180 / Math.PI\n }\n static normalize(angle) {\n while (angle > Math.PI) angle -= Angle.PI_TIMES_2\n while (angle <= -Math.PI) angle += Angle.PI_TIMES_2\n return angle\n }\n static angle() {\n if (arguments.length === 1) {\n const p = arguments[0]\n return Math.atan2(p.y, p.x)\n } else if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n return Math.atan2(dy, dx)\n }\n }\n static isAcute(p0, p1, p2) {\n const dx0 = p0.x - p1.x\n const dy0 = p0.y - p1.y\n const dx1 = p2.x - p1.x\n const dy1 = p2.y - p1.y\n const dotprod = dx0 * dx1 + dy0 * dy1\n return dotprod > 0\n }\n static isObtuse(p0, p1, p2) {\n const dx0 = p0.x - p1.x\n const dy0 = p0.y - p1.y\n const dx1 = p2.x - p1.x\n const dy1 = p2.y - p1.y\n const dotprod = dx0 * dx1 + dy0 * dy1\n return dotprod < 0\n }\n static interiorAngle(p0, p1, p2) {\n const anglePrev = Angle.angle(p1, p0)\n const angleNext = Angle.angle(p1, p2)\n return Math.abs(angleNext - anglePrev)\n }\n static normalizePositive(angle) {\n if (angle < 0.0) {\n while (angle < 0.0) angle += Angle.PI_TIMES_2\n if (angle >= Angle.PI_TIMES_2) angle = 0.0\n } else {\n while (angle >= Angle.PI_TIMES_2) angle -= Angle.PI_TIMES_2\n if (angle < 0.0) angle = 0.0\n }\n return angle\n }\n static angleBetween(tip1, tail, tip2) {\n const a1 = Angle.angle(tail, tip1)\n const a2 = Angle.angle(tail, tip2)\n return Angle.diff(a1, a2)\n }\n static diff(ang1, ang2) {\n let delAngle = null\n if (ang1 < ang2) \n delAngle = ang2 - ang1\n else \n delAngle = ang1 - ang2\n \n if (delAngle > Math.PI) \n delAngle = 2 * Math.PI - delAngle\n \n return delAngle\n }\n static toRadians(angleDegrees) {\n return angleDegrees * Math.PI / 180.0\n }\n static getTurn(ang1, ang2) {\n const crossproduct = Math.sin(ang2 - ang1)\n if (crossproduct > 0) \n return Angle.COUNTERCLOCKWISE\n \n if (crossproduct < 0) \n return Angle.CLOCKWISE\n \n return Angle.NONE\n }\n static angleBetweenOriented(tip1, tail, tip2) {\n const a1 = Angle.angle(tail, tip1)\n const a2 = Angle.angle(tail, tip2)\n const angDel = a2 - a1\n if (angDel <= -Math.PI) return angDel + Angle.PI_TIMES_2\n if (angDel > Math.PI) return angDel - Angle.PI_TIMES_2\n return angDel\n }\n}\nAngle.PI_TIMES_2 = 2.0 * Math.PI\nAngle.PI_OVER_2 = Math.PI / 2.0\nAngle.PI_OVER_4 = Math.PI / 4.0\nAngle.COUNTERCLOCKWISE = Orientation.COUNTERCLOCKWISE\nAngle.CLOCKWISE = Orientation.CLOCKWISE\nAngle.NONE = Orientation.COLLINEAR\n","import BufferParameters from './BufferParameters.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Intersection from '../../algorithm/Intersection.js'\nimport OffsetSegmentString from './OffsetSegmentString.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Angle from '../../algorithm/Angle.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nexport default class OffsetSegmentGenerator {\n constructor() {\n OffsetSegmentGenerator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._maxCurveSegmentError = 0.0\n this._filletAngleQuantum = null\n this._closingSegLengthFactor = 1\n this._segList = null\n this._distance = 0.0\n this._precisionModel = null\n this._bufParams = null\n this._li = null\n this._s0 = null\n this._s1 = null\n this._s2 = null\n this._seg0 = new LineSegment()\n this._seg1 = new LineSegment()\n this._offset0 = new LineSegment()\n this._offset1 = new LineSegment()\n this._side = 0\n this._hasNarrowConcaveAngle = false\n const precisionModel = arguments[0], bufParams = arguments[1], distance = arguments[2]\n this._precisionModel = precisionModel\n this._bufParams = bufParams\n this._li = new RobustLineIntersector()\n this._filletAngleQuantum = Math.PI / 2.0 / bufParams.getQuadrantSegments()\n if (bufParams.getQuadrantSegments() >= 8 && bufParams.getJoinStyle() === BufferParameters.JOIN_ROUND) this._closingSegLengthFactor = OffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR\n this.init(distance)\n }\n addNextSegment(p, addStartPoint) {\n this._s0 = this._s1\n this._s1 = this._s2\n this._s2 = p\n this._seg0.setCoordinates(this._s0, this._s1)\n this.computeOffsetSegment(this._seg0, this._side, this._distance, this._offset0)\n this._seg1.setCoordinates(this._s1, this._s2)\n this.computeOffsetSegment(this._seg1, this._side, this._distance, this._offset1)\n if (this._s1.equals(this._s2)) return null\n const orientation = Orientation.index(this._s0, this._s1, this._s2)\n const outsideTurn = orientation === Orientation.CLOCKWISE && this._side === Position.LEFT || orientation === Orientation.COUNTERCLOCKWISE && this._side === Position.RIGHT\n if (orientation === 0) \n this.addCollinear(addStartPoint)\n else if (outsideTurn) \n this.addOutsideTurn(orientation, addStartPoint)\n else \n this.addInsideTurn(orientation, addStartPoint)\n \n }\n addLineEndCap(p0, p1) {\n const seg = new LineSegment(p0, p1)\n const offsetL = new LineSegment()\n this.computeOffsetSegment(seg, Position.LEFT, this._distance, offsetL)\n const offsetR = new LineSegment()\n this.computeOffsetSegment(seg, Position.RIGHT, this._distance, offsetR)\n const dx = p1.x - p0.x\n const dy = p1.y - p0.y\n const angle = Math.atan2(dy, dx)\n switch (this._bufParams.getEndCapStyle()) {\n case BufferParameters.CAP_ROUND:\n this._segList.addPt(offsetL.p1)\n this.addDirectedFillet(p1, angle + Math.PI / 2, angle - Math.PI / 2, Orientation.CLOCKWISE, this._distance)\n this._segList.addPt(offsetR.p1)\n break\n case BufferParameters.CAP_FLAT:\n this._segList.addPt(offsetL.p1)\n this._segList.addPt(offsetR.p1)\n break\n case BufferParameters.CAP_SQUARE:\n const squareCapSideOffset = new Coordinate()\n squareCapSideOffset.x = Math.abs(this._distance) * Math.cos(angle)\n squareCapSideOffset.y = Math.abs(this._distance) * Math.sin(angle)\n const squareCapLOffset = new Coordinate(offsetL.p1.x + squareCapSideOffset.x, offsetL.p1.y + squareCapSideOffset.y)\n const squareCapROffset = new Coordinate(offsetR.p1.x + squareCapSideOffset.x, offsetR.p1.y + squareCapSideOffset.y)\n this._segList.addPt(squareCapLOffset)\n this._segList.addPt(squareCapROffset)\n break\n }\n }\n getCoordinates() {\n const pts = this._segList.getCoordinates()\n return pts\n }\n addMitreJoin(p, offset0, offset1, distance) {\n const intPt = Intersection.intersection(offset0.p0, offset0.p1, offset1.p0, offset1.p1)\n if (intPt !== null) {\n const mitreRatio = distance <= 0.0 ? 1.0 : intPt.distance(p) / Math.abs(distance)\n if (mitreRatio <= this._bufParams.getMitreLimit()) {\n this._segList.addPt(intPt)\n return null\n }\n }\n this.addLimitedMitreJoin(offset0, offset1, distance, this._bufParams.getMitreLimit())\n }\n addOutsideTurn(orientation, addStartPoint) {\n if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR) {\n this._segList.addPt(this._offset0.p1)\n return null\n }\n if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n this.addMitreJoin(this._s1, this._offset0, this._offset1, this._distance)\n } else if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL) {\n this.addBevelJoin(this._offset0, this._offset1)\n } else {\n if (addStartPoint) this._segList.addPt(this._offset0.p1)\n this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, orientation, this._distance)\n this._segList.addPt(this._offset1.p0)\n }\n }\n createSquare(p) {\n this._segList.addPt(new Coordinate(p.x + this._distance, p.y + this._distance))\n this._segList.addPt(new Coordinate(p.x + this._distance, p.y - this._distance))\n this._segList.addPt(new Coordinate(p.x - this._distance, p.y - this._distance))\n this._segList.addPt(new Coordinate(p.x - this._distance, p.y + this._distance))\n this._segList.closeRing()\n }\n addSegments(pt, isForward) {\n this._segList.addPts(pt, isForward)\n }\n addFirstSegment() {\n this._segList.addPt(this._offset1.p0)\n }\n addCornerFillet(p, p0, p1, direction, radius) {\n const dx0 = p0.x - p.x\n const dy0 = p0.y - p.y\n let startAngle = Math.atan2(dy0, dx0)\n const dx1 = p1.x - p.x\n const dy1 = p1.y - p.y\n const endAngle = Math.atan2(dy1, dx1)\n if (direction === Orientation.CLOCKWISE) {\n if (startAngle <= endAngle) startAngle += 2.0 * Math.PI\n } else {\n if (startAngle >= endAngle) startAngle -= 2.0 * Math.PI\n }\n this._segList.addPt(p0)\n this.addDirectedFillet(p, startAngle, endAngle, direction, radius)\n this._segList.addPt(p1)\n }\n addLastSegment() {\n this._segList.addPt(this._offset1.p1)\n }\n initSideSegments(s1, s2, side) {\n this._s1 = s1\n this._s2 = s2\n this._side = side\n this._seg1.setCoordinates(s1, s2)\n this.computeOffsetSegment(this._seg1, side, this._distance, this._offset1)\n }\n addLimitedMitreJoin(offset0, offset1, distance, mitreLimit) {\n const basePt = this._seg0.p1\n const ang0 = Angle.angle(basePt, this._seg0.p0)\n const angDiff = Angle.angleBetweenOriented(this._seg0.p0, basePt, this._seg1.p1)\n const angDiffHalf = angDiff / 2\n const midAng = Angle.normalize(ang0 + angDiffHalf)\n const mitreMidAng = Angle.normalize(midAng + Math.PI)\n const mitreDist = mitreLimit * distance\n const bevelDelta = mitreDist * Math.abs(Math.sin(angDiffHalf))\n const bevelHalfLen = distance - bevelDelta\n const bevelMidX = basePt.x + mitreDist * Math.cos(mitreMidAng)\n const bevelMidY = basePt.y + mitreDist * Math.sin(mitreMidAng)\n const bevelMidPt = new Coordinate(bevelMidX, bevelMidY)\n const mitreMidLine = new LineSegment(basePt, bevelMidPt)\n const bevelEndLeft = mitreMidLine.pointAlongOffset(1.0, bevelHalfLen)\n const bevelEndRight = mitreMidLine.pointAlongOffset(1.0, -bevelHalfLen)\n if (this._side === Position.LEFT) {\n this._segList.addPt(bevelEndLeft)\n this._segList.addPt(bevelEndRight)\n } else {\n this._segList.addPt(bevelEndRight)\n this._segList.addPt(bevelEndLeft)\n }\n }\n addDirectedFillet(p, startAngle, endAngle, direction, radius) {\n const directionFactor = direction === Orientation.CLOCKWISE ? -1 : 1\n const totalAngle = Math.abs(startAngle - endAngle)\n const nSegs = Math.trunc(totalAngle / this._filletAngleQuantum + 0.5)\n if (nSegs < 1) return null\n const angleInc = totalAngle / nSegs\n const pt = new Coordinate()\n for (let i = 0; i < nSegs; i++) {\n const angle = startAngle + directionFactor * i * angleInc\n pt.x = p.x + radius * Math.cos(angle)\n pt.y = p.y + radius * Math.sin(angle)\n this._segList.addPt(pt)\n }\n }\n computeOffsetSegment(seg, side, distance, offset) {\n const sideSign = side === Position.LEFT ? 1 : -1\n const dx = seg.p1.x - seg.p0.x\n const dy = seg.p1.y - seg.p0.y\n const len = Math.sqrt(dx * dx + dy * dy)\n const ux = sideSign * distance * dx / len\n const uy = sideSign * distance * dy / len\n offset.p0.x = seg.p0.x - uy\n offset.p0.y = seg.p0.y + ux\n offset.p1.x = seg.p1.x - uy\n offset.p1.y = seg.p1.y + ux\n }\n addInsideTurn(orientation, addStartPoint) {\n this._li.computeIntersection(this._offset0.p0, this._offset0.p1, this._offset1.p0, this._offset1.p1)\n if (this._li.hasIntersection()) {\n this._segList.addPt(this._li.getIntersection(0))\n } else {\n this._hasNarrowConcaveAngle = true\n if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR) {\n this._segList.addPt(this._offset0.p1)\n } else {\n this._segList.addPt(this._offset0.p1)\n if (this._closingSegLengthFactor > 0) {\n const mid0 = new Coordinate((this._closingSegLengthFactor * this._offset0.p1.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset0.p1.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n this._segList.addPt(mid0)\n const mid1 = new Coordinate((this._closingSegLengthFactor * this._offset1.p0.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset1.p0.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n this._segList.addPt(mid1)\n } else {\n this._segList.addPt(this._s1)\n }\n this._segList.addPt(this._offset1.p0)\n }\n }\n }\n createCircle(p) {\n const pt = new Coordinate(p.x + this._distance, p.y)\n this._segList.addPt(pt)\n this.addDirectedFillet(p, 0.0, 2.0 * Math.PI, -1, this._distance)\n this._segList.closeRing()\n }\n addBevelJoin(offset0, offset1) {\n this._segList.addPt(offset0.p1)\n this._segList.addPt(offset1.p0)\n }\n init(distance) {\n this._distance = distance\n this._maxCurveSegmentError = distance * (1 - Math.cos(this._filletAngleQuantum / 2.0))\n this._segList = new OffsetSegmentString()\n this._segList.setPrecisionModel(this._precisionModel)\n this._segList.setMinimumVertexDistance(distance * OffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)\n }\n addCollinear(addStartPoint) {\n this._li.computeIntersection(this._s0, this._s1, this._s1, this._s2)\n const numInt = this._li.getIntersectionNum()\n if (numInt >= 2) \n if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL || this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n if (addStartPoint) this._segList.addPt(this._offset0.p1)\n this._segList.addPt(this._offset1.p0)\n } else {\n this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, Orientation.CLOCKWISE, this._distance)\n }\n \n }\n closeRing() {\n this._segList.closeRing()\n }\n hasNarrowConcaveAngle() {\n return this._hasNarrowConcaveAngle\n }\n}\nOffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR = 1.0E-3\nOffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-3\nOffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-6\nOffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR = 80\n","import BufferParameters from './BufferParameters.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport BufferInputLineSimplifier from './BufferInputLineSimplifier.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport OffsetSegmentGenerator from './OffsetSegmentGenerator.js'\nexport default class OffsetCurveBuilder {\n constructor() {\n OffsetCurveBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._distance = 0.0\n this._precisionModel = null\n this._bufParams = null\n const precisionModel = arguments[0], bufParams = arguments[1]\n this._precisionModel = precisionModel\n this._bufParams = bufParams\n }\n static copyCoordinates(pts) {\n const copy = new Array(pts.length).fill(null)\n for (let i = 0; i < copy.length; i++) \n copy[i] = new Coordinate(pts[i])\n \n return copy\n }\n getOffsetCurve(inputPts, distance) {\n this._distance = distance\n if (distance === 0.0) return null\n const isRightSide = distance < 0.0\n const posDistance = Math.abs(distance)\n const segGen = this.getSegGen(posDistance)\n if (inputPts.length <= 1) \n this.computePointCurve(inputPts[0], segGen)\n else \n this.computeOffsetCurve(inputPts, isRightSide, segGen)\n \n const curvePts = segGen.getCoordinates()\n if (isRightSide) CoordinateArrays.reverse(curvePts)\n return curvePts\n }\n computeSingleSidedBufferCurve(inputPts, isRightSide, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n if (isRightSide) {\n segGen.addSegments(inputPts, true)\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n } else {\n segGen.addSegments(inputPts, false)\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n }\n segGen.addLastSegment()\n segGen.closeRing()\n }\n computeRingBufferCurve(inputPts, side, segGen) {\n let distTol = this.simplifyTolerance(this._distance)\n if (side === Position.RIGHT) distTol = -distTol\n const simp = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n = simp.length - 1\n segGen.initSideSegments(simp[n - 1], simp[0], side)\n for (let i = 1; i <= n; i++) {\n const addStartPoint = i !== 1\n segGen.addNextSegment(simp[i], addStartPoint)\n }\n segGen.closeRing()\n }\n computeLineBufferCurve(inputPts, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n segGen.addLastSegment()\n segGen.addLineEndCap(simp1[n1 - 1], simp1[n1])\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n segGen.addLastSegment()\n segGen.addLineEndCap(simp2[1], simp2[0])\n segGen.closeRing()\n }\n computePointCurve(pt, segGen) {\n switch (this._bufParams.getEndCapStyle()) {\n case BufferParameters.CAP_ROUND:\n segGen.createCircle(pt)\n break\n case BufferParameters.CAP_SQUARE:\n segGen.createSquare(pt)\n break\n }\n }\n getLineCurve(inputPts, distance) {\n this._distance = distance\n if (this.isLineOffsetEmpty(distance)) return null\n const posDistance = Math.abs(distance)\n const segGen = this.getSegGen(posDistance)\n if (inputPts.length <= 1) {\n this.computePointCurve(inputPts[0], segGen)\n } else \n if (this._bufParams.isSingleSided()) {\n const isRightSide = distance < 0.0\n this.computeSingleSidedBufferCurve(inputPts, isRightSide, segGen)\n } else {\n this.computeLineBufferCurve(inputPts, segGen)\n }\n \n const lineCoord = segGen.getCoordinates()\n return lineCoord\n }\n getBufferParameters() {\n return this._bufParams\n }\n simplifyTolerance(bufDistance) {\n return bufDistance * this._bufParams.getSimplifyFactor()\n }\n getRingCurve(inputPts, side, distance) {\n this._distance = distance\n if (inputPts.length <= 2) return this.getLineCurve(inputPts, distance)\n if (distance === 0.0) \n return OffsetCurveBuilder.copyCoordinates(inputPts)\n \n const segGen = this.getSegGen(distance)\n this.computeRingBufferCurve(inputPts, side, segGen)\n return segGen.getCoordinates()\n }\n computeOffsetCurve(inputPts, isRightSide, segGen) {\n const distTol = this.simplifyTolerance(this._distance)\n if (isRightSide) {\n const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n const n2 = simp2.length - 1\n segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = n2 - 2; i >= 0; i--) \n segGen.addNextSegment(simp2[i], true)\n \n } else {\n const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n const n1 = simp1.length - 1\n segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n segGen.addFirstSegment()\n for (let i = 2; i <= n1; i++) \n segGen.addNextSegment(simp1[i], true)\n \n }\n segGen.addLastSegment()\n }\n isLineOffsetEmpty(distance) {\n if (distance === 0.0) return true\n if (distance < 0.0 && !this._bufParams.isSingleSided()) return true\n return false\n }\n getSegGen(distance) {\n return new OffsetSegmentGenerator(this._precisionModel, this._bufParams, distance)\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport Position from '../../geomgraph/Position.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport DirectedEdge from '../../geomgraph/DirectedEdge.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Comparable from '../../../../../java/lang/Comparable.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport List from '../../../../../java/util/List.js'\nexport default class SubgraphDepthLocater {\n constructor() {\n SubgraphDepthLocater.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._subgraphs = null\n this._seg = new LineSegment()\n const subgraphs = arguments[0]\n this._subgraphs = subgraphs\n }\n findStabbedSegments() {\n if (arguments.length === 1) {\n const stabbingRayLeftPt = arguments[0]\n const stabbedSegments = new ArrayList()\n for (let i = this._subgraphs.iterator(); i.hasNext(); ) {\n const bsg = i.next()\n const env = bsg.getEnvelope()\n if (stabbingRayLeftPt.y < env.getMinY() || stabbingRayLeftPt.y > env.getMaxY()) continue\n this.findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments)\n }\n return stabbedSegments\n } else if (arguments.length === 3) {\n if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && arguments[1] instanceof DirectedEdge)) {\n const stabbingRayLeftPt = arguments[0], dirEdge = arguments[1], stabbedSegments = arguments[2]\n const pts = dirEdge.getEdge().getCoordinates()\n for (let i = 0; i < pts.length - 1; i++) {\n this._seg.p0 = pts[i]\n this._seg.p1 = pts[i + 1]\n if (this._seg.p0.y > this._seg.p1.y) this._seg.reverse()\n const maxx = Math.max(this._seg.p0.x, this._seg.p1.x)\n if (maxx < stabbingRayLeftPt.x) continue\n if (this._seg.isHorizontal()) continue\n if (stabbingRayLeftPt.y < this._seg.p0.y || stabbingRayLeftPt.y > this._seg.p1.y) continue\n if (Orientation.index(this._seg.p0, this._seg.p1, stabbingRayLeftPt) === Orientation.RIGHT) continue\n let depth = dirEdge.getDepth(Position.LEFT)\n if (!this._seg.p0.equals(pts[i])) depth = dirEdge.getDepth(Position.RIGHT)\n const ds = new DepthSegment(this._seg, depth)\n stabbedSegments.add(ds)\n }\n } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && hasInterface(arguments[1], List))) {\n const stabbingRayLeftPt = arguments[0], dirEdges = arguments[1], stabbedSegments = arguments[2]\n for (let i = dirEdges.iterator(); i.hasNext(); ) {\n const de = i.next()\n if (!de.isForward()) continue\n this.findStabbedSegments(stabbingRayLeftPt, de, stabbedSegments)\n }\n }\n }\n }\n getDepth(p) {\n const stabbedSegments = this.findStabbedSegments(p)\n if (stabbedSegments.size() === 0) return 0\n const ds = Collections.min(stabbedSegments)\n return ds._leftDepth\n }\n}\nclass DepthSegment {\n constructor() {\n DepthSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._upwardSeg = null\n this._leftDepth = null\n const seg = arguments[0], depth = arguments[1]\n this._upwardSeg = new LineSegment(seg)\n this._leftDepth = depth\n }\n compareTo(obj) {\n const other = obj\n if (this._upwardSeg.minX() >= other._upwardSeg.maxX()) return 1\n if (this._upwardSeg.maxX() <= other._upwardSeg.minX()) return -1\n let orientIndex = this._upwardSeg.orientationIndex(other._upwardSeg)\n if (orientIndex !== 0) return orientIndex\n orientIndex = -1 * other._upwardSeg.orientationIndex(this._upwardSeg)\n if (orientIndex !== 0) return orientIndex\n return this._upwardSeg.compareTo(other._upwardSeg)\n }\n compareX(seg0, seg1) {\n const compare0 = seg0.p0.compareTo(seg1.p0)\n if (compare0 !== 0) return compare0\n return seg0.p1.compareTo(seg1.p1)\n }\n toString() {\n return this._upwardSeg.toString()\n }\n get interfaces_() {\n return [Comparable]\n }\n}\nSubgraphDepthLocater.DepthSegment = DepthSegment\n","import Exception from '../../../../java/lang/Exception.js'\nexport default class NotRepresentableException extends Exception {\n constructor() {\n super()\n NotRepresentableException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n Exception.constructor_.call(this, 'Projective point not representable on the Cartesian plane.')\n }\n}\n","import NotRepresentableException from './NotRepresentableException.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Double from '../../../../java/lang/Double.js'\nexport default class HCoordinate {\n constructor() {\n HCoordinate.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.x = null\n this.y = null\n this.w = null\n if (arguments.length === 0) {\n this.x = 0.0\n this.y = 0.0\n this.w = 1.0\n } else if (arguments.length === 1) {\n const p = arguments[0]\n this.x = p.x\n this.y = p.y\n this.w = 1.0\n } else if (arguments.length === 2) {\n if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n const _x = arguments[0], _y = arguments[1]\n this.x = _x\n this.y = _y\n this.w = 1.0\n } else if (arguments[0] instanceof HCoordinate && arguments[1] instanceof HCoordinate) {\n const p1 = arguments[0], p2 = arguments[1]\n this.x = p1.y * p2.w - p2.y * p1.w\n this.y = p2.x * p1.w - p1.x * p2.w\n this.w = p1.x * p2.y - p2.x * p1.y\n } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const p1 = arguments[0], p2 = arguments[1]\n this.x = p1.y - p2.y\n this.y = p2.x - p1.x\n this.w = p1.x * p2.y - p2.x * p1.y\n }\n } else if (arguments.length === 3) {\n const _x = arguments[0], _y = arguments[1], _w = arguments[2]\n this.x = _x\n this.y = _y\n this.w = _w\n } else if (arguments.length === 4) {\n const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n const px = p1.y - p2.y\n const py = p2.x - p1.x\n const pw = p1.x * p2.y - p2.x * p1.y\n const qx = q1.y - q2.y\n const qy = q2.x - q1.x\n const qw = q1.x * q2.y - q2.x * q1.y\n this.x = py * qw - qy * pw\n this.y = qx * pw - px * qw\n this.w = px * qy - qx * py\n }\n }\n getY() {\n const a = this.y / this.w\n if (Double.isNaN(a) || Double.isInfinite(a)) \n throw new NotRepresentableException()\n \n return a\n }\n getX() {\n const a = this.x / this.w\n if (Double.isNaN(a) || Double.isInfinite(a)) \n throw new NotRepresentableException()\n \n return a\n }\n getCoordinate() {\n const p = new Coordinate()\n p.x = this.getX()\n p.y = this.getY()\n return p\n }\n}\n","import Coordinate from './Coordinate.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport DD from '../math/DD.js'\nimport Angle from '../algorithm/Angle.js'\nimport HCoordinate from '../algorithm/HCoordinate.js'\nexport default class Triangle {\n constructor() {\n Triangle.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.p0 = null\n this.p1 = null\n this.p2 = null\n const p0 = arguments[0], p1 = arguments[1], p2 = arguments[2]\n this.p0 = p0\n this.p1 = p1\n this.p2 = p2\n }\n static area(a, b, c) {\n return Math.abs(((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2)\n }\n static signedArea(a, b, c) {\n return ((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2\n }\n static det(m00, m01, m10, m11) {\n return m00 * m11 - m01 * m10\n }\n static interpolateZ(p, v0, v1, v2) {\n const x0 = v0.x\n const y0 = v0.y\n const a = v1.x - x0\n const b = v2.x - x0\n const c = v1.y - y0\n const d = v2.y - y0\n const det = a * d - b * c\n const dx = p.x - x0\n const dy = p.y - y0\n const t = (d * dx - b * dy) / det\n const u = (-c * dx + a * dy) / det\n const z = v0.getZ() + t * (v1.getZ() - v0.getZ()) + u * (v2.getZ() - v0.getZ())\n return z\n }\n static longestSideLength(a, b, c) {\n const lenAB = a.distance(b)\n const lenBC = b.distance(c)\n const lenCA = c.distance(a)\n let maxLen = lenAB\n if (lenBC > maxLen) maxLen = lenBC\n if (lenCA > maxLen) maxLen = lenCA\n return maxLen\n }\n static circumcentreDD(a, b, c) {\n const ax = DD.valueOf(a.x).subtract(c.x)\n const ay = DD.valueOf(a.y).subtract(c.y)\n const bx = DD.valueOf(b.x).subtract(c.x)\n const by = DD.valueOf(b.y).subtract(c.y)\n const denom = DD.determinant(ax, ay, bx, by).multiply(2)\n const asqr = ax.sqr().add(ay.sqr())\n const bsqr = bx.sqr().add(by.sqr())\n const numx = DD.determinant(ay, asqr, by, bsqr)\n const numy = DD.determinant(ax, asqr, bx, bsqr)\n const ccx = DD.valueOf(c.x).subtract(numx.divide(denom)).doubleValue()\n const ccy = DD.valueOf(c.y).add(numy.divide(denom)).doubleValue()\n return new Coordinate(ccx, ccy)\n }\n static isAcute(a, b, c) {\n if (!Angle.isAcute(a, b, c)) return false\n if (!Angle.isAcute(b, c, a)) return false\n if (!Angle.isAcute(c, a, b)) return false\n return true\n }\n static circumcentre(a, b, c) {\n const cx = c.x\n const cy = c.y\n const ax = a.x - cx\n const ay = a.y - cy\n const bx = b.x - cx\n const by = b.y - cy\n const denom = 2 * Triangle.det(ax, ay, bx, by)\n const numx = Triangle.det(ay, ax * ax + ay * ay, by, bx * bx + by * by)\n const numy = Triangle.det(ax, ax * ax + ay * ay, bx, bx * bx + by * by)\n const ccx = cx - numx / denom\n const ccy = cy + numy / denom\n return new Coordinate(ccx, ccy)\n }\n static perpendicularBisector(a, b) {\n const dx = b.x - a.x\n const dy = b.y - a.y\n const l1 = new HCoordinate(a.x + dx / 2.0, a.y + dy / 2.0, 1.0)\n const l2 = new HCoordinate(a.x - dy + dx / 2.0, a.y + dx + dy / 2.0, 1.0)\n return new HCoordinate(l1, l2)\n }\n static angleBisector(a, b, c) {\n const len0 = b.distance(a)\n const len2 = b.distance(c)\n const frac = len0 / (len0 + len2)\n const dx = c.x - a.x\n const dy = c.y - a.y\n const splitPt = new Coordinate(a.x + frac * dx, a.y + frac * dy)\n return splitPt\n }\n static area3D(a, b, c) {\n const ux = b.x - a.x\n const uy = b.y - a.y\n const uz = b.getZ() - a.getZ()\n const vx = c.x - a.x\n const vy = c.y - a.y\n const vz = c.getZ() - a.getZ()\n const crossx = uy * vz - uz * vy\n const crossy = uz * vx - ux * vz\n const crossz = ux * vy - uy * vx\n const absSq = crossx * crossx + crossy * crossy + crossz * crossz\n const area3D = Math.sqrt(absSq) / 2\n return area3D\n }\n static centroid(a, b, c) {\n const x = (a.x + b.x + c.x) / 3\n const y = (a.y + b.y + c.y) / 3\n return new Coordinate(x, y)\n }\n static inCentre(a, b, c) {\n const len0 = b.distance(c)\n const len1 = a.distance(c)\n const len2 = a.distance(b)\n const circum = len0 + len1 + len2\n const inCentreX = (len0 * a.x + len1 * b.x + len2 * c.x) / circum\n const inCentreY = (len0 * a.y + len1 * b.y + len2 * c.y) / circum\n return new Coordinate(inCentreX, inCentreY)\n }\n area() {\n return Triangle.area(this.p0, this.p1, this.p2)\n }\n signedArea() {\n return Triangle.signedArea(this.p0, this.p1, this.p2)\n }\n interpolateZ(p) {\n if (p === null) throw new IllegalArgumentException('Supplied point is null.')\n return Triangle.interpolateZ(p, this.p0, this.p1, this.p2)\n }\n longestSideLength() {\n return Triangle.longestSideLength(this.p0, this.p1, this.p2)\n }\n isAcute() {\n return Triangle.isAcute(this.p0, this.p1, this.p2)\n }\n circumcentre() {\n return Triangle.circumcentre(this.p0, this.p1, this.p2)\n }\n area3D() {\n return Triangle.area3D(this.p0, this.p1, this.p2)\n }\n centroid() {\n return Triangle.centroid(this.p0, this.p1, this.p2)\n }\n inCentre() {\n return Triangle.inCentre(this.p0, this.p1, this.p2)\n }\n}\n","import Location from '../../geom/Location.js'\nimport LineString from '../../geom/LineString.js'\nimport Position from '../../geomgraph/Position.js'\nimport Point from '../../geom/Point.js'\nimport NodedSegmentString from '../../noding/NodedSegmentString.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPoint from '../../geom/MultiPoint.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport Orientation from '../../algorithm/Orientation.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport Label from '../../geomgraph/Label.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../../java/lang/UnsupportedOperationException.js'\nimport CoordinateArrays from '../../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Distance from '../../algorithm/Distance.js'\nimport MultiLineString from '../../geom/MultiLineString.js'\nimport Triangle from '../../geom/Triangle.js'\nexport default class OffsetCurveSetBuilder {\n constructor() {\n OffsetCurveSetBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._distance = null\n this._curveBuilder = null\n this._curveList = new ArrayList()\n const inputGeom = arguments[0], distance = arguments[1], curveBuilder = arguments[2]\n this._inputGeom = inputGeom\n this._distance = distance\n this._curveBuilder = curveBuilder\n }\n addRingSide(coord, offsetDistance, side, cwLeftLoc, cwRightLoc) {\n if (offsetDistance === 0.0 && coord.length < LinearRing.MINIMUM_VALID_SIZE) return null\n let leftLoc = cwLeftLoc\n let rightLoc = cwRightLoc\n if (coord.length >= LinearRing.MINIMUM_VALID_SIZE && Orientation.isCCW(coord)) {\n leftLoc = cwRightLoc\n rightLoc = cwLeftLoc\n side = Position.opposite(side)\n }\n const curve = this._curveBuilder.getRingCurve(coord, side, offsetDistance)\n this.addCurve(curve, leftLoc, rightLoc)\n }\n addRingBothSides(coord, distance) {\n this.addRingSide(coord, distance, Position.LEFT, Location.EXTERIOR, Location.INTERIOR)\n this.addRingSide(coord, distance, Position.RIGHT, Location.INTERIOR, Location.EXTERIOR)\n }\n addPoint(p) {\n if (this._distance <= 0.0) return null\n const coord = p.getCoordinates()\n const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n }\n addPolygon(p) {\n let offsetDistance = this._distance\n let offsetSide = Position.LEFT\n if (this._distance < 0.0) {\n offsetDistance = -this._distance\n offsetSide = Position.RIGHT\n }\n const shell = p.getExteriorRing()\n const shellCoord = CoordinateArrays.removeRepeatedPoints(shell.getCoordinates())\n if (this._distance < 0.0 && this.isErodedCompletely(shell, this._distance)) return null\n if (this._distance <= 0.0 && shellCoord.length < 3) return null\n this.addRingSide(shellCoord, offsetDistance, offsetSide, Location.EXTERIOR, Location.INTERIOR)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n const holeCoord = CoordinateArrays.removeRepeatedPoints(hole.getCoordinates())\n if (this._distance > 0.0 && this.isErodedCompletely(hole, -this._distance)) continue\n this.addRingSide(holeCoord, offsetDistance, Position.opposite(offsetSide), Location.INTERIOR, Location.EXTERIOR)\n }\n }\n isTriangleErodedCompletely(triangleCoord, bufferDistance) {\n const tri = new Triangle(triangleCoord[0], triangleCoord[1], triangleCoord[2])\n const inCentre = tri.inCentre()\n const distToCentre = Distance.pointToSegment(inCentre, tri.p0, tri.p1)\n return distToCentre < Math.abs(bufferDistance)\n }\n addLineString(line) {\n if (this._curveBuilder.isLineOffsetEmpty(this._distance)) return null\n const coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates())\n if (CoordinateArrays.isRing(coord) && !this._curveBuilder.getBufferParameters().isSingleSided()) {\n this.addRingBothSides(coord, this._distance)\n } else {\n const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n }\n }\n addCurve(coord, leftLoc, rightLoc) {\n if (coord === null || coord.length < 2) return null\n const e = new NodedSegmentString(coord, new Label(0, Location.BOUNDARY, leftLoc, rightLoc))\n this._curveList.add(e)\n }\n getCurves() {\n this.add(this._inputGeom)\n return this._curveList\n }\n add(g) {\n if (g.isEmpty()) return null\n if (g instanceof Polygon) this.addPolygon(g); else if (g instanceof LineString) this.addLineString(g); else if (g instanceof Point) this.addPoint(g); else if (g instanceof MultiPoint) this.addCollection(g); else if (g instanceof MultiLineString) this.addCollection(g); else if (g instanceof MultiPolygon) this.addCollection(g); else if (g instanceof GeometryCollection) this.addCollection(g); else throw new UnsupportedOperationException(g.getGeometryType())\n }\n isErodedCompletely(ring, bufferDistance) {\n const ringCoord = ring.getCoordinates()\n if (ringCoord.length < 4) return bufferDistance < 0\n if (ringCoord.length === 4) return this.isTriangleErodedCompletely(ringCoord, bufferDistance)\n const env = ring.getEnvelopeInternal()\n const envMinDimension = Math.min(env.getHeight(), env.getWidth())\n if (bufferDistance < 0.0 && 2 * Math.abs(bufferDistance) > envMinDimension) return true\n return false\n }\n addCollection(gc) {\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.add(g)\n }\n }\n}\n","export default class PointOnGeometryLocator {\n locate(p) {}\n}\n","import Iterator from '../../../../java/util/Iterator.js'\nimport NoSuchElementException from '../../../../java/util/NoSuchElementException.js'\nimport GeometryCollection from './GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nexport default class GeometryCollectionIterator {\n constructor() {\n GeometryCollectionIterator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parent = null\n this._atStart = null\n this._max = null\n this._index = null\n this._subcollectionIterator = null\n const parent = arguments[0]\n this._parent = parent\n this._atStart = true\n this._index = 0\n this._max = parent.getNumGeometries()\n }\n static isAtomic(geom) {\n return !(geom instanceof GeometryCollection)\n }\n next() {\n if (this._atStart) {\n this._atStart = false\n if (GeometryCollectionIterator.isAtomic(this._parent)) this._index++\n return this._parent\n }\n if (this._subcollectionIterator !== null) \n if (this._subcollectionIterator.hasNext()) \n return this._subcollectionIterator.next()\n else \n this._subcollectionIterator = null\n \n \n if (this._index >= this._max) \n throw new NoSuchElementException()\n \n const obj = this._parent.getGeometryN(this._index++)\n if (obj instanceof GeometryCollection) {\n this._subcollectionIterator = new GeometryCollectionIterator(obj)\n return this._subcollectionIterator.next()\n }\n return obj\n }\n remove() {\n throw new UnsupportedOperationException(this.getClass().getName())\n }\n hasNext() {\n if (this._atStart) \n return true\n \n if (this._subcollectionIterator !== null) {\n if (this._subcollectionIterator.hasNext()) \n return true\n \n this._subcollectionIterator = null\n }\n if (this._index >= this._max) \n return false\n \n return true\n }\n get interfaces_() {\n return [Iterator]\n }\n}\n","import Location from '../../geom/Location.js'\nimport Polygon from '../../geom/Polygon.js'\nimport PointLocation from '../PointLocation.js'\nimport PointOnGeometryLocator from './PointOnGeometryLocator.js'\nimport GeometryCollectionIterator from '../../geom/GeometryCollectionIterator.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nexport default class SimplePointInAreaLocator {\n constructor() {\n SimplePointInAreaLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = null\n const geom = arguments[0]\n this._geom = geom\n }\n static locatePointInPolygon(p, poly) {\n if (poly.isEmpty()) return Location.EXTERIOR\n const shell = poly.getExteriorRing()\n const shellLoc = SimplePointInAreaLocator.locatePointInRing(p, shell)\n if (shellLoc !== Location.INTERIOR) return shellLoc\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n const hole = poly.getInteriorRingN(i)\n const holeLoc = SimplePointInAreaLocator.locatePointInRing(p, hole)\n if (holeLoc === Location.BOUNDARY) return Location.BOUNDARY\n if (holeLoc === Location.INTERIOR) return Location.EXTERIOR\n }\n return Location.INTERIOR\n }\n static locatePointInRing(p, ring) {\n if (!ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return PointLocation.locateInRing(p, ring.getCoordinates())\n }\n static containsPointInPolygon(p, poly) {\n return Location.EXTERIOR !== SimplePointInAreaLocator.locatePointInPolygon(p, poly)\n }\n static locateInGeometry(p, geom) {\n if (geom instanceof Polygon) \n return SimplePointInAreaLocator.locatePointInPolygon(p, geom)\n \n if (geom instanceof GeometryCollection) {\n const geomi = new GeometryCollectionIterator(geom)\n while (geomi.hasNext()) {\n const g2 = geomi.next()\n if (g2 !== geom) {\n const loc = SimplePointInAreaLocator.locateInGeometry(p, g2)\n if (loc !== Location.EXTERIOR) return loc\n }\n }\n }\n return Location.EXTERIOR\n }\n static isContained(p, geom) {\n return Location.EXTERIOR !== SimplePointInAreaLocator.locate(p, geom)\n }\n static locate(p, geom) {\n if (geom.isEmpty()) return Location.EXTERIOR\n if (!geom.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return SimplePointInAreaLocator.locateInGeometry(p, geom)\n }\n locate(p) {\n return SimplePointInAreaLocator.locate(p, this._geom)\n }\n get interfaces_() {\n return [PointOnGeometryLocator]\n }\n}\n","import StringBuffer from '../../../../java/lang/StringBuffer.js'\nimport Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport System from '../../../../java/lang/System.js'\nimport SimplePointInAreaLocator from '../algorithm/locate/SimplePointInAreaLocator.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Assert from '../util/Assert.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeEndStar {\n constructor() {\n EdgeEndStar.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edgeMap = new TreeMap()\n this._edgeList = null\n this._ptInAreaLocation = [Location.NONE, Location.NONE]\n }\n getNextCW(ee) {\n this.getEdges()\n const i = this._edgeList.indexOf(ee)\n let iNextCW = i - 1\n if (i === 0) iNextCW = this._edgeList.size() - 1\n return this._edgeList.get(iNextCW)\n }\n propagateSideLabels(geomIndex) {\n let startLoc = Location.NONE\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (label.isArea(geomIndex) && label.getLocation(geomIndex, Position.LEFT) !== Location.NONE) startLoc = label.getLocation(geomIndex, Position.LEFT)\n }\n if (startLoc === Location.NONE) return null\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (label.getLocation(geomIndex, Position.ON) === Location.NONE) label.setLocation(geomIndex, Position.ON, currLoc)\n if (label.isArea(geomIndex)) {\n const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n if (rightLoc !== Location.NONE) {\n if (rightLoc !== currLoc) throw new TopologyException('side location conflict', e.getCoordinate())\n if (leftLoc === Location.NONE) \n Assert.shouldNeverReachHere('found single null side (at ' + e.getCoordinate() + ')')\n \n currLoc = leftLoc\n } else {\n Assert.isTrue(label.getLocation(geomIndex, Position.LEFT) === Location.NONE, 'found single null side')\n label.setLocation(geomIndex, Position.RIGHT, currLoc)\n label.setLocation(geomIndex, Position.LEFT, currLoc)\n }\n }\n }\n }\n getCoordinate() {\n const it = this.iterator()\n if (!it.hasNext()) return null\n const e = it.next()\n return e.getCoordinate()\n }\n print(out) {\n System.out.println('EdgeEndStar: ' + this.getCoordinate())\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n e.print(out)\n }\n }\n isAreaLabelsConsistent(geomGraph) {\n this.computeEdgeEndLabels(geomGraph.getBoundaryNodeRule())\n return this.checkAreaLabelsConsistent(0)\n }\n checkAreaLabelsConsistent(geomIndex) {\n const edges = this.getEdges()\n if (edges.size() <= 0) return true\n const lastEdgeIndex = edges.size() - 1\n const startLabel = edges.get(lastEdgeIndex).getLabel()\n const startLoc = startLabel.getLocation(geomIndex, Position.LEFT)\n Assert.isTrue(startLoc !== Location.NONE, 'Found unlabelled area edge')\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n Assert.isTrue(label.isArea(geomIndex), 'Found non-area edge')\n const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n if (leftLoc === rightLoc) \n return false\n \n if (rightLoc !== currLoc) \n return false\n \n currLoc = leftLoc\n }\n return true\n }\n findIndex(eSearch) {\n this.iterator()\n for (let i = 0; i < this._edgeList.size(); i++) {\n const e = this._edgeList.get(i)\n if (e === eSearch) return i\n }\n return -1\n }\n iterator() {\n return this.getEdges().iterator()\n }\n getEdges() {\n if (this._edgeList === null) \n this._edgeList = new ArrayList(this._edgeMap.values())\n \n return this._edgeList\n }\n getLocation(geomIndex, p, geom) {\n if (this._ptInAreaLocation[geomIndex] === Location.NONE) \n this._ptInAreaLocation[geomIndex] = SimplePointInAreaLocator.locate(p, geom[geomIndex].getGeometry())\n \n return this._ptInAreaLocation[geomIndex]\n }\n toString() {\n const buf = new StringBuffer()\n buf.append('EdgeEndStar: ' + this.getCoordinate())\n buf.append('\\n')\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n buf.append(e)\n buf.append('\\n')\n }\n return buf.toString()\n }\n computeEdgeEndLabels(boundaryNodeRule) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n ee.computeLabel(boundaryNodeRule)\n }\n }\n computeLabelling(geomGraph) {\n this.computeEdgeEndLabels(geomGraph[0].getBoundaryNodeRule())\n this.propagateSideLabels(0)\n this.propagateSideLabels(1)\n const hasDimensionalCollapseEdge = [false, false]\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n for (let geomi = 0; geomi < 2; geomi++) \n if (label.isLine(geomi) && label.getLocation(geomi) === Location.BOUNDARY) hasDimensionalCollapseEdge[geomi] = true\n \n }\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n for (let geomi = 0; geomi < 2; geomi++) \n if (label.isAnyNull(geomi)) {\n let loc = Location.NONE\n if (hasDimensionalCollapseEdge[geomi]) {\n loc = Location.EXTERIOR\n } else {\n const p = e.getCoordinate()\n loc = this.getLocation(geomi, p, geomGraph)\n }\n label.setAllLocationsIfNull(geomi, loc)\n }\n \n }\n }\n getDegree() {\n return this._edgeMap.size()\n }\n insertEdgeEnd(e, obj) {\n this._edgeMap.put(e, obj)\n this._edgeList = null\n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport EdgeEndStar from './EdgeEndStar.js'\nimport System from '../../../../java/lang/System.js'\nimport Label from './Label.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Quadrant from './Quadrant.js'\nimport Assert from '../util/Assert.js'\nexport default class DirectedEdgeStar extends EdgeEndStar {\n constructor() {\n super()\n DirectedEdgeStar.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._resultAreaEdgeList = null\n this._label = null\n this._SCANNING_FOR_INCOMING = 1\n this._LINKING_TO_OUTGOING = 2\n }\n linkResultDirectedEdges() {\n this.getResultAreaEdges()\n let firstOut = null\n let incoming = null\n let state = this._SCANNING_FOR_INCOMING\n for (let i = 0; i < this._resultAreaEdgeList.size(); i++) {\n const nextOut = this._resultAreaEdgeList.get(i)\n const nextIn = nextOut.getSym()\n if (!nextOut.getLabel().isArea()) continue\n if (firstOut === null && nextOut.isInResult()) firstOut = nextOut\n switch (state) {\n case this._SCANNING_FOR_INCOMING:\n if (!nextIn.isInResult()) continue\n incoming = nextIn\n state = this._LINKING_TO_OUTGOING\n break\n case this._LINKING_TO_OUTGOING:\n if (!nextOut.isInResult()) continue\n incoming.setNext(nextOut)\n state = this._SCANNING_FOR_INCOMING\n break\n }\n }\n if (state === this._LINKING_TO_OUTGOING) {\n if (firstOut === null) throw new TopologyException('no outgoing dirEdge found', this.getCoordinate())\n Assert.isTrue(firstOut.isInResult(), 'unable to link last incoming dirEdge')\n incoming.setNext(firstOut)\n }\n }\n insert(ee) {\n const de = ee\n this.insertEdgeEnd(de, de)\n }\n getRightmostEdge() {\n const edges = this.getEdges()\n const size = edges.size()\n if (size < 1) return null\n const de0 = edges.get(0)\n if (size === 1) return de0\n const deLast = edges.get(size - 1)\n const quad0 = de0.getQuadrant()\n const quad1 = deLast.getQuadrant()\n if (Quadrant.isNorthern(quad0) && Quadrant.isNorthern(quad1)) {\n return de0\n } else if (!Quadrant.isNorthern(quad0) && !Quadrant.isNorthern(quad1)) {\n return deLast\n } else {\n const nonHorizontalEdge = null\n if (de0.getDy() !== 0) return de0; else if (deLast.getDy() !== 0) return deLast\n }\n Assert.shouldNeverReachHere('found two horizontal edges incident on node')\n return null\n }\n print(out) {\n System.out.println('DirectedEdgeStar: ' + this.getCoordinate())\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n out.print('out ')\n de.print(out)\n out.println()\n out.print('in ')\n de.getSym().print(out)\n out.println()\n }\n }\n getResultAreaEdges() {\n if (this._resultAreaEdgeList !== null) return this._resultAreaEdgeList\n this._resultAreaEdgeList = new ArrayList()\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() || de.getSym().isInResult()) this._resultAreaEdgeList.add(de)\n }\n return this._resultAreaEdgeList\n }\n updateLabelling(nodeLabel) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n label.setAllLocationsIfNull(0, nodeLabel.getLocation(0))\n label.setAllLocationsIfNull(1, nodeLabel.getLocation(1))\n }\n }\n linkAllDirectedEdges() {\n this.getEdges()\n let prevOut = null\n let firstIn = null\n for (let i = this._edgeList.size() - 1; i >= 0; i--) {\n const nextOut = this._edgeList.get(i)\n const nextIn = nextOut.getSym()\n if (firstIn === null) firstIn = nextIn\n if (prevOut !== null) nextIn.setNext(prevOut)\n prevOut = nextOut\n }\n firstIn.setNext(prevOut)\n }\n computeDepths() {\n if (arguments.length === 1) {\n const de = arguments[0]\n const edgeIndex = this.findIndex(de)\n const startDepth = de.getDepth(Position.LEFT)\n const targetLastDepth = de.getDepth(Position.RIGHT)\n const nextDepth = this.computeDepths(edgeIndex + 1, this._edgeList.size(), startDepth)\n const lastDepth = this.computeDepths(0, edgeIndex, nextDepth)\n if (lastDepth !== targetLastDepth) throw new TopologyException('depth mismatch at ' + de.getCoordinate())\n } else if (arguments.length === 3) {\n const startIndex = arguments[0], endIndex = arguments[1], startDepth = arguments[2]\n let currDepth = startDepth\n for (let i = startIndex; i < endIndex; i++) {\n const nextDe = this._edgeList.get(i)\n nextDe.setEdgeDepths(Position.RIGHT, currDepth)\n currDepth = nextDe.getDepth(Position.LEFT)\n }\n return currDepth\n }\n }\n mergeSymLabels() {\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n label.merge(de.getSym().getLabel())\n }\n }\n linkMinimalDirectedEdges(er) {\n let firstOut = null\n let incoming = null\n let state = this._SCANNING_FOR_INCOMING\n for (let i = this._resultAreaEdgeList.size() - 1; i >= 0; i--) {\n const nextOut = this._resultAreaEdgeList.get(i)\n const nextIn = nextOut.getSym()\n if (firstOut === null && nextOut.getEdgeRing() === er) firstOut = nextOut\n switch (state) {\n case this._SCANNING_FOR_INCOMING:\n if (nextIn.getEdgeRing() !== er) continue\n incoming = nextIn\n state = this._LINKING_TO_OUTGOING\n break\n case this._LINKING_TO_OUTGOING:\n if (nextOut.getEdgeRing() !== er) continue\n incoming.setNextMin(nextOut)\n state = this._SCANNING_FOR_INCOMING\n break\n }\n }\n if (state === this._LINKING_TO_OUTGOING) {\n Assert.isTrue(firstOut !== null, 'found null for first outgoing dirEdge')\n Assert.isTrue(firstOut.getEdgeRing() === er, 'unable to link last incoming dirEdge')\n incoming.setNextMin(firstOut)\n }\n }\n getOutgoingDegree() {\n if (arguments.length === 0) {\n let degree = 0\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult()) degree++\n }\n return degree\n } else if (arguments.length === 1) {\n const er = arguments[0]\n let degree = 0\n for (let it = this.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getEdgeRing() === er) degree++\n }\n return degree\n }\n }\n getLabel() {\n return this._label\n }\n findCoveredLineEdges() {\n let startLoc = Location.NONE\n for (let it = this.iterator(); it.hasNext(); ) {\n const nextOut = it.next()\n const nextIn = nextOut.getSym()\n if (!nextOut.isLineEdge()) {\n if (nextOut.isInResult()) {\n startLoc = Location.INTERIOR\n break\n }\n if (nextIn.isInResult()) {\n startLoc = Location.EXTERIOR\n break\n }\n }\n }\n if (startLoc === Location.NONE) return null\n let currLoc = startLoc\n for (let it = this.iterator(); it.hasNext(); ) {\n const nextOut = it.next()\n const nextIn = nextOut.getSym()\n if (nextOut.isLineEdge()) {\n nextOut.getEdge().setCovered(currLoc === Location.INTERIOR)\n } else {\n if (nextOut.isInResult()) currLoc = Location.EXTERIOR\n if (nextIn.isInResult()) currLoc = Location.INTERIOR\n }\n }\n }\n computeLabelling(geom) {\n super.computeLabelling.call(this, geom)\n this._label = new Label(Location.NONE)\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n const e = ee.getEdge()\n const eLabel = e.getLabel()\n for (let i = 0; i < 2; i++) {\n const eLoc = eLabel.getLocation(i)\n if (eLoc === Location.INTERIOR || eLoc === Location.BOUNDARY) this._label.setLocation(i, Location.INTERIOR)\n }\n }\n }\n}\n","import DirectedEdgeStar from '../../geomgraph/DirectedEdgeStar.js'\nimport Node from '../../geomgraph/Node.js'\nimport NodeFactory from '../../geomgraph/NodeFactory.js'\nexport default class OverlayNodeFactory extends NodeFactory {\n constructor() {\n super()\n }\n createNode(coord) {\n return new Node(coord, new DirectedEdgeStar())\n }\n}\n","import Comparable from '../../../../java/lang/Comparable.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nexport default class OrientedCoordinateArray {\n constructor() {\n OrientedCoordinateArray.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._orientation = null\n const pts = arguments[0]\n this._pts = pts\n this._orientation = OrientedCoordinateArray.orientation(pts)\n }\n static orientation(pts) {\n return CoordinateArrays.increasingDirection(pts) === 1\n }\n static compareOriented(pts1, orientation1, pts2, orientation2) {\n const dir1 = orientation1 ? 1 : -1\n const dir2 = orientation2 ? 1 : -1\n const limit1 = orientation1 ? pts1.length : -1\n const limit2 = orientation2 ? pts2.length : -1\n let i1 = orientation1 ? 0 : pts1.length - 1\n let i2 = orientation2 ? 0 : pts2.length - 1\n while (true) {\n const compPt = pts1[i1].compareTo(pts2[i2])\n if (compPt !== 0) return compPt\n i1 += dir1\n i2 += dir2\n const done1 = i1 === limit1\n const done2 = i2 === limit2\n if (done1 && !done2) return -1\n if (!done1 && done2) return 1\n if (done1 && done2) return 0\n }\n }\n compareTo(o1) {\n const oca = o1\n const comp = OrientedCoordinateArray.compareOriented(this._pts, this._orientation, oca._pts, oca._orientation)\n return comp\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import OrientedCoordinateArray from '../noding/OrientedCoordinateArray.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeList {\n constructor() {\n EdgeList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edges = new ArrayList()\n this._ocaMap = new TreeMap()\n }\n print(out) {\n out.print('MULTILINESTRING ( ')\n for (let j = 0; j < this._edges.size(); j++) {\n const e = this._edges.get(j)\n if (j > 0) out.print(',')\n out.print('(')\n const pts = e.getCoordinates()\n for (let i = 0; i < pts.length; i++) {\n if (i > 0) out.print(',')\n out.print(pts[i].x + ' ' + pts[i].y)\n }\n out.println(')')\n }\n out.print(') ')\n }\n addAll(edgeColl) {\n for (let i = edgeColl.iterator(); i.hasNext(); ) \n this.add(i.next())\n \n }\n findEdgeIndex(e) {\n for (let i = 0; i < this._edges.size(); i++) \n if (this._edges.get(i).equals(e)) return i\n \n return -1\n }\n iterator() {\n return this._edges.iterator()\n }\n getEdges() {\n return this._edges\n }\n get(i) {\n return this._edges.get(i)\n }\n findEqualEdge(e) {\n const oca = new OrientedCoordinateArray(e.getCoordinates())\n const matchEdge = this._ocaMap.get(oca)\n return matchEdge\n }\n add(e) {\n this._edges.add(e)\n const oca = new OrientedCoordinateArray(e.getCoordinates())\n this._ocaMap.put(oca, e)\n }\n}\n","export default class SegmentIntersector {\n processIntersections(e0, segIndex0, e1, segIndex1) {}\n isDone() {}\n}\n","import SegmentIntersector from './SegmentIntersector.js'\nexport default class IntersectionAdder {\n constructor() {\n IntersectionAdder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hasIntersection = false\n this._hasProper = false\n this._hasProperInterior = false\n this._hasInterior = false\n this._properIntersectionPoint = null\n this._li = null\n this._isSelfIntersection = null\n this.numIntersections = 0\n this.numInteriorIntersections = 0\n this.numProperIntersections = 0\n this.numTests = 0\n const li = arguments[0]\n this._li = li\n }\n static isAdjacentSegments(i1, i2) {\n return Math.abs(i1 - i2) === 1\n }\n isTrivialIntersection(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1) \n if (this._li.getIntersectionNum() === 1) {\n if (IntersectionAdder.isAdjacentSegments(segIndex0, segIndex1)) return true\n if (e0.isClosed()) {\n const maxSegIndex = e0.size() - 1\n if (segIndex0 === 0 && segIndex1 === maxSegIndex || segIndex1 === 0 && segIndex0 === maxSegIndex) \n return true\n \n }\n }\n \n return false\n }\n getProperIntersectionPoint() {\n return this._properIntersectionPoint\n }\n hasProperInteriorIntersection() {\n return this._hasProperInterior\n }\n getLineIntersector() {\n return this._li\n }\n hasProperIntersection() {\n return this._hasProper\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n this.numTests++\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) {\n this.numIntersections++\n if (this._li.isInteriorIntersection()) {\n this.numInteriorIntersections++\n this._hasInterior = true\n }\n if (!this.isTrivialIntersection(e0, segIndex0, e1, segIndex1)) {\n this._hasIntersection = true\n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n if (this._li.isProper()) {\n this.numProperIntersections++\n this._hasProper = true\n this._hasProperInterior = true\n }\n }\n }\n }\n hasIntersection() {\n return this._hasIntersection\n }\n isDone() {\n return false\n }\n hasInteriorIntersection() {\n return this._hasInterior\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport Comparable from '../../../../java/lang/Comparable.js'\nexport default class EdgeIntersection {\n constructor() {\n EdgeIntersection.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.coord = null\n this.segmentIndex = null\n this.dist = null\n const coord = arguments[0], segmentIndex = arguments[1], dist = arguments[2]\n this.coord = new Coordinate(coord)\n this.segmentIndex = segmentIndex\n this.dist = dist\n }\n getSegmentIndex() {\n return this.segmentIndex\n }\n getCoordinate() {\n return this.coord\n }\n print(out) {\n out.print(this.coord)\n out.print(' seg # = ' + this.segmentIndex)\n out.println(' dist = ' + this.dist)\n }\n compareTo(obj) {\n const other = obj\n return this.compare(other.segmentIndex, other.dist)\n }\n isEndPoint(maxSegmentIndex) {\n if (this.segmentIndex === 0 && this.dist === 0.0) return true\n if (this.segmentIndex === maxSegmentIndex) return true\n return false\n }\n toString() {\n return this.coord + ' seg # = ' + this.segmentIndex + ' dist = ' + this.dist\n }\n getDistance() {\n return this.dist\n }\n compare(segmentIndex, dist) {\n if (this.segmentIndex < segmentIndex) return -1\n if (this.segmentIndex > segmentIndex) return 1\n if (this.dist < dist) return -1\n if (this.dist > dist) return 1\n return 0\n }\n get interfaces_() {\n return [Comparable]\n }\n}\n","import EdgeIntersection from './EdgeIntersection.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Label from './Label.js'\nimport Edge from './Edge.js'\nimport TreeMap from '../../../../java/util/TreeMap.js'\nexport default class EdgeIntersectionList {\n constructor() {\n EdgeIntersectionList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodeMap = new TreeMap()\n this.edge = null\n const edge = arguments[0]\n this.edge = edge\n }\n print(out) {\n out.println('Intersections:')\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n ei.print(out)\n }\n }\n iterator() {\n return this._nodeMap.values().iterator()\n }\n addSplitEdges(edgeList) {\n this.addEndpoints()\n const it = this.iterator()\n let eiPrev = it.next()\n while (it.hasNext()) {\n const ei = it.next()\n const newEdge = this.createSplitEdge(eiPrev, ei)\n edgeList.add(newEdge)\n eiPrev = ei\n }\n }\n addEndpoints() {\n const maxSegIndex = this.edge.pts.length - 1\n this.add(this.edge.pts[0], 0, 0.0)\n this.add(this.edge.pts[maxSegIndex], maxSegIndex, 0.0)\n }\n createSplitEdge(ei0, ei1) {\n let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n const lastSegStartPt = this.edge.pts[ei1.segmentIndex]\n const useIntPt1 = ei1.dist > 0.0 || !ei1.coord.equals2D(lastSegStartPt)\n if (!useIntPt1) \n npts--\n \n const pts = new Array(npts).fill(null)\n let ipt = 0\n pts[ipt++] = new Coordinate(ei0.coord)\n for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n pts[ipt++] = this.edge.pts[i]\n \n if (useIntPt1) pts[ipt] = ei1.coord\n return new Edge(pts, new Label(this.edge._label))\n }\n add(intPt, segmentIndex, dist) {\n const eiNew = new EdgeIntersection(intPt, segmentIndex, dist)\n const ei = this._nodeMap.get(eiNew)\n if (ei !== null) \n return ei\n \n this._nodeMap.put(eiNew, eiNew)\n return eiNew\n }\n isIntersection(pt) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const ei = it.next()\n if (ei.coord.equals(pt)) return true\n }\n return false\n }\n}\n","import Location from './Location.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Dimension from './Dimension.js'\nimport Cloneable from '../../../../java/lang/Cloneable.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nexport default class IntersectionMatrix {\n constructor() {\n IntersectionMatrix.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._matrix = null\n if (arguments.length === 0) {\n this._matrix = Array(3).fill().map(() => Array(3))\n this.setAll(Dimension.FALSE)\n } else if (arguments.length === 1) {\n if (typeof arguments[0] === 'string') {\n const elements = arguments[0]\n IntersectionMatrix.constructor_.call(this)\n this.set(elements)\n } else if (arguments[0] instanceof IntersectionMatrix) {\n const other = arguments[0]\n IntersectionMatrix.constructor_.call(this)\n this._matrix[Location.INTERIOR][Location.INTERIOR] = other._matrix[Location.INTERIOR][Location.INTERIOR]\n this._matrix[Location.INTERIOR][Location.BOUNDARY] = other._matrix[Location.INTERIOR][Location.BOUNDARY]\n this._matrix[Location.INTERIOR][Location.EXTERIOR] = other._matrix[Location.INTERIOR][Location.EXTERIOR]\n this._matrix[Location.BOUNDARY][Location.INTERIOR] = other._matrix[Location.BOUNDARY][Location.INTERIOR]\n this._matrix[Location.BOUNDARY][Location.BOUNDARY] = other._matrix[Location.BOUNDARY][Location.BOUNDARY]\n this._matrix[Location.BOUNDARY][Location.EXTERIOR] = other._matrix[Location.BOUNDARY][Location.EXTERIOR]\n this._matrix[Location.EXTERIOR][Location.INTERIOR] = other._matrix[Location.EXTERIOR][Location.INTERIOR]\n this._matrix[Location.EXTERIOR][Location.BOUNDARY] = other._matrix[Location.EXTERIOR][Location.BOUNDARY]\n this._matrix[Location.EXTERIOR][Location.EXTERIOR] = other._matrix[Location.EXTERIOR][Location.EXTERIOR]\n }\n }\n }\n static matches() {\n if (Number.isInteger(arguments[0]) && typeof arguments[1] === 'string') {\n const actualDimensionValue = arguments[0], requiredDimensionSymbol = arguments[1]\n if (requiredDimensionSymbol === Dimension.SYM_DONTCARE) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_TRUE && (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE)) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_FALSE && actualDimensionValue === Dimension.FALSE) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_P && actualDimensionValue === Dimension.P) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_L && actualDimensionValue === Dimension.L) \n return true\n \n if (requiredDimensionSymbol === Dimension.SYM_A && actualDimensionValue === Dimension.A) \n return true\n \n return false\n } else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'string') {\n const actualDimensionSymbols = arguments[0], requiredDimensionSymbols = arguments[1]\n const m = new IntersectionMatrix(actualDimensionSymbols)\n return m.matches(requiredDimensionSymbols)\n }\n }\n static isTrue(actualDimensionValue) {\n if (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE) \n return true\n \n return false\n }\n isIntersects() {\n return !this.isDisjoint()\n }\n isCovers() {\n const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n return hasPointInCommon && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n isCoveredBy() {\n const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n return hasPointInCommon && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n }\n set() {\n if (arguments.length === 1) {\n const dimensionSymbols = arguments[0]\n for (let i = 0; i < dimensionSymbols.length; i++) {\n const row = Math.trunc(i / 3)\n const col = i % 3\n this._matrix[row][col] = Dimension.toDimensionValue(dimensionSymbols.charAt(i))\n }\n } else if (arguments.length === 3) {\n const row = arguments[0], column = arguments[1], dimensionValue = arguments[2]\n this._matrix[row][column] = dimensionValue\n }\n }\n isContains() {\n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n setAtLeast() {\n if (arguments.length === 1) {\n const minimumDimensionSymbols = arguments[0]\n for (let i = 0; i < minimumDimensionSymbols.length; i++) {\n const row = Math.trunc(i / 3)\n const col = i % 3\n this.setAtLeast(row, col, Dimension.toDimensionValue(minimumDimensionSymbols.charAt(i)))\n }\n } else if (arguments.length === 3) {\n const row = arguments[0], column = arguments[1], minimumDimensionValue = arguments[2]\n if (this._matrix[row][column] < minimumDimensionValue) \n this._matrix[row][column] = minimumDimensionValue\n \n }\n }\n setAtLeastIfValid(row, column, minimumDimensionValue) {\n if (row >= 0 && column >= 0) \n this.setAtLeast(row, column, minimumDimensionValue)\n \n }\n isWithin() {\n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n }\n isTouches(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA > dimensionOfGeometryB) \n return this.isTouches(dimensionOfGeometryB, dimensionOfGeometryA)\n \n if (dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && (IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY]))\n \n return false\n }\n isOverlaps(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === 1 && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n return false\n }\n isEquals(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA !== dimensionOfGeometryB) \n return false\n \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n }\n toString() {\n const builder = new StringBuilder('123456789')\n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n builder.setCharAt(3 * ai + bi, Dimension.toDimensionSymbol(this._matrix[ai][bi]))\n \n \n return builder.toString()\n }\n setAll(dimensionValue) {\n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n this._matrix[ai][bi] = dimensionValue\n \n \n }\n get(row, column) {\n return this._matrix[row][column]\n }\n transpose() {\n let temp = this._matrix[1][0]\n this._matrix[1][0] = this._matrix[0][1]\n this._matrix[0][1] = temp\n temp = this._matrix[2][0]\n this._matrix[2][0] = this._matrix[0][2]\n this._matrix[0][2] = temp\n temp = this._matrix[2][1]\n this._matrix[2][1] = this._matrix[1][2]\n this._matrix[1][2] = temp\n return this\n }\n matches(requiredDimensionSymbols) {\n if (requiredDimensionSymbols.length !== 9) \n throw new IllegalArgumentException('Should be length 9: ' + requiredDimensionSymbols)\n \n for (let ai = 0; ai < 3; ai++) \n for (let bi = 0; bi < 3; bi++) \n if (!IntersectionMatrix.matches(this._matrix[ai][bi], requiredDimensionSymbols.charAt(3 * ai + bi))) \n return false\n \n \n \n return true\n }\n add(im) {\n for (let i = 0; i < 3; i++) \n for (let j = 0; j < 3; j++) \n this.setAtLeast(i, j, im.get(i, j))\n \n \n }\n isDisjoint() {\n return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.INTERIOR][Location.BOUNDARY] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.BOUNDARY] === Dimension.FALSE\n }\n isCrosses(dimensionOfGeometryA, dimensionOfGeometryB) {\n if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.L) \n return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n \n if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n return this._matrix[Location.INTERIOR][Location.INTERIOR] === 0\n \n return false\n }\n get interfaces_() {\n return [Cloneable]\n }\n}\n","import Arrays from '../../../../java/util/Arrays.js'\nimport System from '../../../../java/lang/System.js'\nexport default class IntArrayList {\n constructor() {\n IntArrayList.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._data = null\n this._size = 0\n if (arguments.length === 0) {\n IntArrayList.constructor_.call(this, 10)\n } else if (arguments.length === 1) {\n const initialCapacity = arguments[0]\n this._data = new Array(initialCapacity).fill(null)\n }\n }\n size() {\n return this._size\n }\n addAll(values) {\n if (values === null) return null\n if (values.length === 0) return null\n this.ensureCapacity(this._size + values.length)\n System.arraycopy(values, 0, this._data, this._size, values.length)\n this._size += values.length\n }\n ensureCapacity(capacity) {\n if (capacity <= this._data.length) return null\n const newLength = Math.max(capacity, this._data.length * 2)\n this._data = Arrays.copyOf(this._data, newLength)\n }\n toArray() {\n const array = new Array(this._size).fill(null)\n System.arraycopy(this._data, 0, array, 0, this._size)\n return array\n }\n add(value) {\n this.ensureCapacity(this._size + 1)\n this._data[this._size] = value\n ++ this._size\n }\n}\n","import IntArrayList from '../../util/IntArrayList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Quadrant from '../Quadrant.js'\nexport default class MonotoneChainIndexer {\n static toIntArray(list) {\n const array = new Array(list.size()).fill(null)\n for (let i = 0; i < array.length; i++) \n array[i] = list.get(i).intValue()\n \n return array\n }\n getChainStartIndices(pts) {\n let start = 0\n const startIndexList = new IntArrayList(Math.trunc(pts.length / 2))\n startIndexList.add(start)\n do {\n const last = this.findChainEnd(pts, start)\n startIndexList.add(last)\n start = last\n } while (start < pts.length - 1)\n return startIndexList.toArray()\n }\n findChainEnd(pts, start) {\n const chainQuad = Quadrant.quadrant(pts[start], pts[start + 1])\n let last = start + 1\n while (last < pts.length) {\n const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n if (quad !== chainQuad) break\n last++\n }\n return last - 1\n }\n OLDgetChainStartIndices(pts) {\n let start = 0\n const startIndexList = new ArrayList()\n startIndexList.add(start)\n do {\n const last = this.findChainEnd(pts, start)\n startIndexList.add(last)\n start = last\n } while (start < pts.length - 1)\n const startIndex = MonotoneChainIndexer.toIntArray(startIndexList)\n return startIndex\n }\n}\n","import MonotoneChainIndexer from './MonotoneChainIndexer.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class MonotoneChainEdge {\n constructor() {\n MonotoneChainEdge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.e = null\n this.pts = null\n this.startIndex = null\n const e = arguments[0]\n this.e = e\n this.pts = e.getCoordinates()\n const mcb = new MonotoneChainIndexer()\n this.startIndex = mcb.getChainStartIndices(this.pts)\n }\n getCoordinates() {\n return this.pts\n }\n getMaxX(chainIndex) {\n const x1 = this.pts[this.startIndex[chainIndex]].x\n const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n return x1 > x2 ? x1 : x2\n }\n getMinX(chainIndex) {\n const x1 = this.pts[this.startIndex[chainIndex]].x\n const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n return x1 < x2 ? x1 : x2\n }\n computeIntersectsForChain() {\n if (arguments.length === 4) {\n const chainIndex0 = arguments[0], mce = arguments[1], chainIndex1 = arguments[2], si = arguments[3]\n this.computeIntersectsForChain(this.startIndex[chainIndex0], this.startIndex[chainIndex0 + 1], mce, mce.startIndex[chainIndex1], mce.startIndex[chainIndex1 + 1], si)\n } else if (arguments.length === 6) {\n const start0 = arguments[0], end0 = arguments[1], mce = arguments[2], start1 = arguments[3], end1 = arguments[4], ei = arguments[5]\n if (end0 - start0 === 1 && end1 - start1 === 1) {\n ei.addIntersections(this.e, start0, mce.e, start1)\n return null\n }\n if (!this.overlaps(start0, end0, mce, start1, end1)) return null\n const mid0 = Math.trunc((start0 + end0) / 2)\n const mid1 = Math.trunc((start1 + end1) / 2)\n if (start0 < mid0) {\n if (start1 < mid1) this.computeIntersectsForChain(start0, mid0, mce, start1, mid1, ei)\n if (mid1 < end1) this.computeIntersectsForChain(start0, mid0, mce, mid1, end1, ei)\n }\n if (mid0 < end0) {\n if (start1 < mid1) this.computeIntersectsForChain(mid0, end0, mce, start1, mid1, ei)\n if (mid1 < end1) this.computeIntersectsForChain(mid0, end0, mce, mid1, end1, ei)\n }\n }\n }\n overlaps(start0, end0, mce, start1, end1) {\n return Envelope.intersects(this.pts[start0], this.pts[end0], mce.pts[start1], mce.pts[end1])\n }\n getStartIndexes() {\n return this.startIndex\n }\n computeIntersects(mce, si) {\n for (let i = 0; i < this.startIndex.length - 1; i++) \n for (let j = 0; j < mce.startIndex.length - 1; j++) \n this.computeIntersectsForChain(i, mce, j, si)\n \n \n }\n}\n","import Location from '../geom/Location.js'\nimport Position from './Position.js'\nexport default class Depth {\n constructor() {\n Depth.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._depth = Array(2).fill().map(() => Array(3))\n for (let i = 0; i < 2; i++) \n for (let j = 0; j < 3; j++) \n this._depth[i][j] = Depth.NULL_VALUE\n \n \n }\n static depthAtLocation(location) {\n if (location === Location.EXTERIOR) return 0\n if (location === Location.INTERIOR) return 1\n return Depth.NULL_VALUE\n }\n getDepth(geomIndex, posIndex) {\n return this._depth[geomIndex][posIndex]\n }\n setDepth(geomIndex, posIndex, depthValue) {\n this._depth[geomIndex][posIndex] = depthValue\n }\n isNull() {\n if (arguments.length === 0) {\n for (let i = 0; i < 2; i++) \n for (let j = 0; j < 3; j++) \n if (this._depth[i][j] !== Depth.NULL_VALUE) return false\n \n \n return true\n } else if (arguments.length === 1) {\n const geomIndex = arguments[0]\n return this._depth[geomIndex][1] === Depth.NULL_VALUE\n } else if (arguments.length === 2) {\n const geomIndex = arguments[0], posIndex = arguments[1]\n return this._depth[geomIndex][posIndex] === Depth.NULL_VALUE\n }\n }\n normalize() {\n for (let i = 0; i < 2; i++) \n if (!this.isNull(i)) {\n let minDepth = this._depth[i][1]\n if (this._depth[i][2] < minDepth) minDepth = this._depth[i][2]\n if (minDepth < 0) minDepth = 0\n for (let j = 1; j < 3; j++) {\n let newValue = 0\n if (this._depth[i][j] > minDepth) newValue = 1\n this._depth[i][j] = newValue\n }\n }\n \n }\n getDelta(geomIndex) {\n return this._depth[geomIndex][Position.RIGHT] - this._depth[geomIndex][Position.LEFT]\n }\n getLocation(geomIndex, posIndex) {\n if (this._depth[geomIndex][posIndex] <= 0) return Location.EXTERIOR\n return Location.INTERIOR\n }\n toString() {\n return 'A: ' + this._depth[0][1] + ',' + this._depth[0][2] + ' B: ' + this._depth[1][1] + ',' + this._depth[1][2]\n }\n add() {\n if (arguments.length === 1) {\n const lbl = arguments[0]\n for (let i = 0; i < 2; i++) \n for (let j = 1; j < 3; j++) {\n const loc = lbl.getLocation(i, j)\n if (loc === Location.EXTERIOR || loc === Location.INTERIOR) \n if (this.isNull(i, j)) \n this._depth[i][j] = Depth.depthAtLocation(loc)\n else this._depth[i][j] += Depth.depthAtLocation(loc)\n \n }\n \n } else if (arguments.length === 3) {\n const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n if (location === Location.INTERIOR) this._depth[geomIndex][posIndex]++\n }\n }\n}\nDepth.NULL_VALUE = -1\n","import EdgeIntersectionList from './EdgeIntersectionList.js'\nimport IntersectionMatrix from '../geom/IntersectionMatrix.js'\nimport MonotoneChainEdge from './index/MonotoneChainEdge.js'\nimport Position from './Position.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Label from './Label.js'\nimport Envelope from '../geom/Envelope.js'\nimport StringBuilder from '../../../../java/lang/StringBuilder.js'\nimport Depth from './Depth.js'\nimport GraphComponent from './GraphComponent.js'\nexport default class Edge extends GraphComponent {\n constructor() {\n super()\n Edge.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.pts = null\n this._env = null\n this.eiList = new EdgeIntersectionList(this)\n this._name = null\n this._mce = null\n this._isIsolated = true\n this._depth = new Depth()\n this._depthDelta = 0\n if (arguments.length === 1) {\n const pts = arguments[0]\n Edge.constructor_.call(this, pts, null)\n } else if (arguments.length === 2) {\n const pts = arguments[0], label = arguments[1]\n this.pts = pts\n this._label = label\n }\n }\n static updateIM() {\n if (arguments.length === 2 && (arguments[1] instanceof IntersectionMatrix && arguments[0] instanceof Label)) {\n const label = arguments[0], im = arguments[1]\n im.setAtLeastIfValid(label.getLocation(0, Position.ON), label.getLocation(1, Position.ON), 1)\n if (label.isArea()) {\n im.setAtLeastIfValid(label.getLocation(0, Position.LEFT), label.getLocation(1, Position.LEFT), 2)\n im.setAtLeastIfValid(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), 2)\n }\n } else {\n return super.updateIM.apply(this, arguments)\n }\n }\n getDepth() {\n return this._depth\n }\n getCollapsedEdge() {\n const newPts = new Array(2).fill(null)\n newPts[0] = this.pts[0]\n newPts[1] = this.pts[1]\n const newe = new Edge(newPts, Label.toLineLabel(this._label))\n return newe\n }\n isIsolated() {\n return this._isIsolated\n }\n getCoordinates() {\n return this.pts\n }\n setIsolated(isIsolated) {\n this._isIsolated = isIsolated\n }\n setName(name) {\n this._name = name\n }\n equals(o) {\n if (!(o instanceof Edge)) return false\n const e = o\n if (this.pts.length !== e.pts.length) return false\n let isEqualForward = true\n let isEqualReverse = true\n let iRev = this.pts.length\n for (let i = 0; i < this.pts.length; i++) {\n if (!this.pts[i].equals2D(e.pts[i])) \n isEqualForward = false\n \n if (!this.pts[i].equals2D(e.pts[-- iRev])) \n isEqualReverse = false\n \n if (!isEqualForward && !isEqualReverse) return false\n }\n return true\n }\n getCoordinate() {\n if (arguments.length === 0) {\n if (this.pts.length > 0) return this.pts[0]\n return null\n } else if (arguments.length === 1) {\n const i = arguments[0]\n return this.pts[i]\n }\n }\n print(out) {\n out.print('edge ' + this._name + ': ')\n out.print('LINESTRING (')\n for (let i = 0; i < this.pts.length; i++) {\n if (i > 0) out.print(',')\n out.print(this.pts[i].x + ' ' + this.pts[i].y)\n }\n out.print(') ' + this._label + ' ' + this._depthDelta)\n }\n computeIM(im) {\n Edge.updateIM(this._label, im)\n }\n isCollapsed() {\n if (!this._label.isArea()) return false\n if (this.pts.length !== 3) return false\n if (this.pts[0].equals(this.pts[2])) return true\n return false\n }\n isClosed() {\n return this.pts[0].equals(this.pts[this.pts.length - 1])\n }\n getMaximumSegmentIndex() {\n return this.pts.length - 1\n }\n getDepthDelta() {\n return this._depthDelta\n }\n getNumPoints() {\n return this.pts.length\n }\n printReverse(out) {\n out.print('edge ' + this._name + ': ')\n for (let i = this.pts.length - 1; i >= 0; i--) \n out.print(this.pts[i] + ' ')\n \n out.println('')\n }\n getMonotoneChainEdge() {\n if (this._mce === null) this._mce = new MonotoneChainEdge(this)\n return this._mce\n }\n getEnvelope() {\n if (this._env === null) {\n this._env = new Envelope()\n for (let i = 0; i < this.pts.length; i++) \n this._env.expandToInclude(this.pts[i])\n \n }\n return this._env\n }\n addIntersection(li, segmentIndex, geomIndex, intIndex) {\n const intPt = new Coordinate(li.getIntersection(intIndex))\n let normalizedSegmentIndex = segmentIndex\n let dist = li.getEdgeDistance(geomIndex, intIndex)\n const nextSegIndex = normalizedSegmentIndex + 1\n if (nextSegIndex < this.pts.length) {\n const nextPt = this.pts[nextSegIndex]\n if (intPt.equals2D(nextPt)) {\n normalizedSegmentIndex = nextSegIndex\n dist = 0.0\n }\n }\n const ei = this.eiList.add(intPt, normalizedSegmentIndex, dist)\n }\n toString() {\n const builder = new StringBuilder()\n builder.append('edge ' + this._name + ': ')\n builder.append('LINESTRING (')\n for (let i = 0; i < this.pts.length; i++) {\n if (i > 0) builder.append(',')\n builder.append(this.pts[i].x + ' ' + this.pts[i].y)\n }\n builder.append(') ' + this._label + ' ' + this._depthDelta)\n return builder.toString()\n }\n isPointwiseEqual(e) {\n if (this.pts.length !== e.pts.length) return false\n for (let i = 0; i < this.pts.length; i++) \n if (!this.pts[i].equals2D(e.pts[i])) \n return false\n \n \n return true\n }\n setDepthDelta(depthDelta) {\n this._depthDelta = depthDelta\n }\n getEdgeIntersectionList() {\n return this.eiList\n }\n addIntersections(li, segmentIndex, geomIndex) {\n for (let i = 0; i < li.getIntersectionNum(); i++) \n this.addIntersection(li, segmentIndex, geomIndex, i)\n \n }\n}\n","import Location from '../../geom/Location.js'\nimport BufferSubgraph from './BufferSubgraph.js'\nimport PolygonBuilder from '../overlay/PolygonBuilder.js'\nimport GeometryFactory from '../../geom/GeometryFactory.js'\nimport Position from '../../geomgraph/Position.js'\nimport MCIndexNoder from '../../noding/MCIndexNoder.js'\nimport OffsetCurveBuilder from './OffsetCurveBuilder.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport SubgraphDepthLocater from './SubgraphDepthLocater.js'\nimport OffsetCurveSetBuilder from './OffsetCurveSetBuilder.js'\nimport Label from '../../geomgraph/Label.js'\nimport OverlayNodeFactory from '../overlay/OverlayNodeFactory.js'\nimport EdgeList from '../../geomgraph/EdgeList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport IntersectionAdder from '../../noding/IntersectionAdder.js'\nimport Edge from '../../geomgraph/Edge.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class BufferBuilder {\n constructor() {\n BufferBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._bufParams = null\n this._workingPrecisionModel = null\n this._workingNoder = null\n this._geomFact = null\n this._graph = null\n this._edgeList = new EdgeList()\n const bufParams = arguments[0]\n this._bufParams = bufParams\n }\n static depthDelta(label) {\n const lLoc = label.getLocation(0, Position.LEFT)\n const rLoc = label.getLocation(0, Position.RIGHT)\n if (lLoc === Location.INTERIOR && rLoc === Location.EXTERIOR) return 1; else if (lLoc === Location.EXTERIOR && rLoc === Location.INTERIOR) return -1\n return 0\n }\n static convertSegStrings(it) {\n const fact = new GeometryFactory()\n const lines = new ArrayList()\n while (it.hasNext()) {\n const ss = it.next()\n const line = fact.createLineString(ss.getCoordinates())\n lines.add(line)\n }\n return fact.buildGeometry(lines)\n }\n setWorkingPrecisionModel(pm) {\n this._workingPrecisionModel = pm\n }\n insertUniqueEdge(e) {\n const existingEdge = this._edgeList.findEqualEdge(e)\n if (existingEdge !== null) {\n const existingLabel = existingEdge.getLabel()\n let labelToMerge = e.getLabel()\n if (!existingEdge.isPointwiseEqual(e)) {\n labelToMerge = new Label(e.getLabel())\n labelToMerge.flip()\n }\n existingLabel.merge(labelToMerge)\n const mergeDelta = BufferBuilder.depthDelta(labelToMerge)\n const existingDelta = existingEdge.getDepthDelta()\n const newDelta = existingDelta + mergeDelta\n existingEdge.setDepthDelta(newDelta)\n } else {\n this._edgeList.add(e)\n e.setDepthDelta(BufferBuilder.depthDelta(e.getLabel()))\n }\n }\n buildSubgraphs(subgraphList, polyBuilder) {\n const processedGraphs = new ArrayList()\n for (let i = subgraphList.iterator(); i.hasNext(); ) {\n const subgraph = i.next()\n const p = subgraph.getRightmostCoordinate()\n const locater = new SubgraphDepthLocater(processedGraphs)\n const outsideDepth = locater.getDepth(p)\n subgraph.computeDepth(outsideDepth)\n subgraph.findResultEdges()\n processedGraphs.add(subgraph)\n polyBuilder.add(subgraph.getDirectedEdges(), subgraph.getNodes())\n }\n }\n createSubgraphs(graph) {\n const subgraphList = new ArrayList()\n for (let i = graph.getNodes().iterator(); i.hasNext(); ) {\n const node = i.next()\n if (!node.isVisited()) {\n const subgraph = new BufferSubgraph()\n subgraph.create(node)\n subgraphList.add(subgraph)\n }\n }\n Collections.sort(subgraphList, Collections.reverseOrder())\n return subgraphList\n }\n createEmptyResultGeometry() {\n const emptyGeom = this._geomFact.createPolygon()\n return emptyGeom\n }\n getNoder(precisionModel) {\n if (this._workingNoder !== null) return this._workingNoder\n const noder = new MCIndexNoder()\n const li = new RobustLineIntersector()\n li.setPrecisionModel(precisionModel)\n noder.setSegmentIntersector(new IntersectionAdder(li))\n return noder\n }\n buffer(g, distance) {\n let precisionModel = this._workingPrecisionModel\n if (precisionModel === null) precisionModel = g.getPrecisionModel()\n this._geomFact = g.getFactory()\n const curveBuilder = new OffsetCurveBuilder(precisionModel, this._bufParams)\n const curveSetBuilder = new OffsetCurveSetBuilder(g, distance, curveBuilder)\n const bufferSegStrList = curveSetBuilder.getCurves()\n if (bufferSegStrList.size() <= 0) \n return this.createEmptyResultGeometry()\n \n this.computeNodedEdges(bufferSegStrList, precisionModel)\n this._graph = new PlanarGraph(new OverlayNodeFactory())\n this._graph.addEdges(this._edgeList.getEdges())\n const subgraphList = this.createSubgraphs(this._graph)\n const polyBuilder = new PolygonBuilder(this._geomFact)\n this.buildSubgraphs(subgraphList, polyBuilder)\n const resultPolyList = polyBuilder.getPolygons()\n if (resultPolyList.size() <= 0) \n return this.createEmptyResultGeometry()\n \n const resultGeom = this._geomFact.buildGeometry(resultPolyList)\n return resultGeom\n }\n computeNodedEdges(bufferSegStrList, precisionModel) {\n const noder = this.getNoder(precisionModel)\n noder.computeNodes(bufferSegStrList)\n const nodedSegStrings = noder.getNodedSubstrings()\n for (let i = nodedSegStrings.iterator(); i.hasNext(); ) {\n const segStr = i.next()\n const pts = segStr.getCoordinates()\n if (pts.length === 2 && pts[0].equals2D(pts[1])) continue\n const oldLabel = segStr.getData()\n const edge = new Edge(segStr.getCoordinates(), new Label(oldLabel))\n this.insertUniqueEdge(edge)\n }\n }\n setNoder(noder) {\n this._workingNoder = noder\n }\n}\n","import hasInterface from '../../../../hasInterface.js'\nimport Collection from '../../../../java/util/Collection.js'\nimport Noder from './Noder.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport NodedSegmentString from './NodedSegmentString.js'\nimport System from '../../../../java/lang/System.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class ScaledNoder {\n constructor() {\n ScaledNoder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._noder = null\n this._scaleFactor = null\n this._offsetX = null\n this._offsetY = null\n this._isScaled = false\n if (arguments.length === 2) {\n const noder = arguments[0], scaleFactor = arguments[1]\n ScaledNoder.constructor_.call(this, noder, scaleFactor, 0, 0)\n } else if (arguments.length === 4) {\n const noder = arguments[0], scaleFactor = arguments[1], offsetX = arguments[2], offsetY = arguments[3]\n this._noder = noder\n this._scaleFactor = scaleFactor\n this._isScaled = !this.isIntegerPrecision()\n }\n }\n rescale() {\n if (hasInterface(arguments[0], Collection)) {\n const segStrings = arguments[0]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n this.rescale(ss.getCoordinates())\n }\n } else if (arguments[0] instanceof Array) {\n const pts = arguments[0]\n for (let i = 0; i < pts.length; i++) {\n pts[i].x = pts[i].x / this._scaleFactor + this._offsetX\n pts[i].y = pts[i].y / this._scaleFactor + this._offsetY\n }\n if (pts.length === 2 && pts[0].equals2D(pts[1])) \n System.out.println(pts)\n \n }\n }\n scale() {\n if (hasInterface(arguments[0], Collection)) {\n const segStrings = arguments[0]\n const nodedSegmentStrings = new ArrayList(segStrings.size())\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n nodedSegmentStrings.add(new NodedSegmentString(this.scale(ss.getCoordinates()), ss.getData()))\n }\n return nodedSegmentStrings\n } else if (arguments[0] instanceof Array) {\n const pts = arguments[0]\n const roundPts = new Array(pts.length).fill(null)\n for (let i = 0; i < pts.length; i++) \n roundPts[i] = new Coordinate(Math.round((pts[i].x - this._offsetX) * this._scaleFactor), Math.round((pts[i].y - this._offsetY) * this._scaleFactor), pts[i].getZ())\n \n const roundPtsNoDup = CoordinateArrays.removeRepeatedPoints(roundPts)\n return roundPtsNoDup\n }\n }\n isIntegerPrecision() {\n return this._scaleFactor === 1.0\n }\n getNodedSubstrings() {\n const splitSS = this._noder.getNodedSubstrings()\n if (this._isScaled) this.rescale(splitSS)\n return splitSS\n }\n computeNodes(inputSegStrings) {\n let intSegStrings = inputSegStrings\n if (this._isScaled) intSegStrings = this.scale(inputSegStrings)\n this._noder.computeNodes(intSegStrings)\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import GeometryFactory from '../geom/GeometryFactory.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport RuntimeException from '../../../../java/lang/RuntimeException.js'\nexport default class NodingValidator {\n constructor() {\n NodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._segStrings = null\n const segStrings = arguments[0]\n this._segStrings = segStrings\n }\n checkEndPtVertexIntersections() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n const pts = ss.getCoordinates()\n this.checkEndPtVertexIntersections(pts[0], this._segStrings)\n this.checkEndPtVertexIntersections(pts[pts.length - 1], this._segStrings)\n }\n } else if (arguments.length === 2) {\n const testPt = arguments[0], segStrings = arguments[1]\n for (let i = segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n const pts = ss.getCoordinates()\n for (let j = 1; j < pts.length - 1; j++) \n if (pts[j].equals(testPt)) throw new RuntimeException('found endpt/interior pt intersection at index ' + j + ' :pt ' + testPt)\n \n }\n }\n }\n checkInteriorIntersections() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss0 = i.next()\n for (let j = this._segStrings.iterator(); j.hasNext(); ) {\n const ss1 = j.next()\n this.checkInteriorIntersections(ss0, ss1)\n }\n }\n } else if (arguments.length === 2) {\n const ss0 = arguments[0], ss1 = arguments[1]\n const pts0 = ss0.getCoordinates()\n const pts1 = ss1.getCoordinates()\n for (let i0 = 0; i0 < pts0.length - 1; i0++) \n for (let i1 = 0; i1 < pts1.length - 1; i1++) \n this.checkInteriorIntersections(ss0, i0, ss1, i1)\n \n \n } else if (arguments.length === 4) {\n const e0 = arguments[0], segIndex0 = arguments[1], e1 = arguments[2], segIndex1 = arguments[3]\n if (e0 === e1 && segIndex0 === segIndex1) return null\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) \n if (this._li.isProper() || this.hasInteriorIntersection(this._li, p00, p01) || this.hasInteriorIntersection(this._li, p10, p11)) \n throw new RuntimeException('found non-noded intersection at ' + p00 + '-' + p01 + ' and ' + p10 + '-' + p11)\n \n \n }\n }\n checkValid() {\n this.checkEndPtVertexIntersections()\n this.checkInteriorIntersections()\n this.checkCollapses()\n }\n checkCollapses() {\n if (arguments.length === 0) {\n for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n const ss = i.next()\n this.checkCollapses(ss)\n }\n } else if (arguments.length === 1) {\n const ss = arguments[0]\n const pts = ss.getCoordinates()\n for (let i = 0; i < pts.length - 2; i++) \n this.checkCollapse(pts[i], pts[i + 1], pts[i + 2])\n \n }\n }\n hasInteriorIntersection(li, p0, p1) {\n for (let i = 0; i < li.getIntersectionNum(); i++) {\n const intPt = li.getIntersection(i)\n if (!(intPt.equals(p0) || intPt.equals(p1))) return true\n }\n return false\n }\n checkCollapse(p0, p1, p2) {\n if (p0.equals(p2)) throw new RuntimeException('found non-noded collapse at ' + NodingValidator.fact.createLineString([p0, p1, p2]))\n }\n}\nNodingValidator.fact = new GeometryFactory()\n","import Coordinate from '../../geom/Coordinate.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nexport default class HotPixel {\n constructor() {\n HotPixel.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = null\n this._pt = null\n this._originalPt = null\n this._ptScaled = null\n this._p0Scaled = null\n this._p1Scaled = null\n this._scaleFactor = null\n this._minx = null\n this._maxx = null\n this._miny = null\n this._maxy = null\n this._corner = new Array(4).fill(null)\n this._safeEnv = null\n const pt = arguments[0], scaleFactor = arguments[1], li = arguments[2]\n this._originalPt = pt\n this._pt = pt\n this._scaleFactor = scaleFactor\n this._li = li\n if (scaleFactor <= 0) throw new IllegalArgumentException('Scale factor must be non-zero')\n if (scaleFactor !== 1.0) {\n this._pt = new Coordinate(this.scale(pt.x), this.scale(pt.y))\n this._p0Scaled = new Coordinate()\n this._p1Scaled = new Coordinate()\n }\n this.initCorners(this._pt)\n }\n intersectsScaled(p0, p1) {\n const segMinx = Math.min(p0.x, p1.x)\n const segMaxx = Math.max(p0.x, p1.x)\n const segMiny = Math.min(p0.y, p1.y)\n const segMaxy = Math.max(p0.y, p1.y)\n const isOutsidePixelEnv = this._maxx < segMinx || this._minx > segMaxx || this._maxy < segMiny || this._miny > segMaxy\n if (isOutsidePixelEnv) return false\n const intersects = this.intersectsToleranceSquare(p0, p1)\n Assert.isTrue(!(isOutsidePixelEnv && intersects), 'Found bad envelope test')\n return intersects\n }\n initCorners(pt) {\n const tolerance = 0.5\n this._minx = pt.x - tolerance\n this._maxx = pt.x + tolerance\n this._miny = pt.y - tolerance\n this._maxy = pt.y + tolerance\n this._corner[0] = new Coordinate(this._maxx, this._maxy)\n this._corner[1] = new Coordinate(this._minx, this._maxy)\n this._corner[2] = new Coordinate(this._minx, this._miny)\n this._corner[3] = new Coordinate(this._maxx, this._miny)\n }\n intersects(p0, p1) {\n if (this._scaleFactor === 1.0) return this.intersectsScaled(p0, p1)\n this.copyScaled(p0, this._p0Scaled)\n this.copyScaled(p1, this._p1Scaled)\n return this.intersectsScaled(this._p0Scaled, this._p1Scaled)\n }\n scale(val) {\n return Math.round(val * this._scaleFactor)\n }\n getCoordinate() {\n return this._originalPt\n }\n copyScaled(p, pScaled) {\n pScaled.x = this.scale(p.x)\n pScaled.y = this.scale(p.y)\n }\n getSafeEnvelope() {\n if (this._safeEnv === null) {\n const safeTolerance = HotPixel.SAFE_ENV_EXPANSION_FACTOR / this._scaleFactor\n this._safeEnv = new Envelope(this._originalPt.x - safeTolerance, this._originalPt.x + safeTolerance, this._originalPt.y - safeTolerance, this._originalPt.y + safeTolerance)\n }\n return this._safeEnv\n }\n intersectsPixelClosure(p0, p1) {\n this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n if (this._li.hasIntersection()) return true\n this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n if (this._li.hasIntersection()) return true\n return false\n }\n intersectsToleranceSquare(p0, p1) {\n let intersectsLeft = false\n let intersectsBottom = false\n this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n if (this._li.isProper()) return true\n this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n if (this._li.isProper()) return true\n if (this._li.hasIntersection()) intersectsLeft = true\n this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n if (this._li.isProper()) return true\n if (this._li.hasIntersection()) intersectsBottom = true\n this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n if (this._li.isProper()) return true\n if (intersectsLeft && intersectsBottom) return true\n if (p0.equals(this._pt)) return true\n if (p1.equals(this._pt)) return true\n return false\n }\n addSnappedNode(segStr, segIndex) {\n const p0 = segStr.getCoordinate(segIndex)\n const p1 = segStr.getCoordinate(segIndex + 1)\n if (this.intersects(p0, p1)) {\n segStr.addIntersection(this.getCoordinate(), segIndex)\n return true\n }\n return false\n }\n}\nHotPixel.SAFE_ENV_EXPANSION_FACTOR = 0.75\n","import LineSegment from '../../geom/LineSegment.js'\nexport default class MonotoneChainSelectAction {\n constructor() {\n MonotoneChainSelectAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.selectedSegment = new LineSegment()\n }\n select() {\n if (arguments.length === 1) {\n const seg = arguments[0]\n } else if (arguments.length === 2) {\n const mc = arguments[0], startIndex = arguments[1]\n mc.getLineSegment(startIndex, this.selectedSegment)\n this.select(this.selectedSegment)\n }\n }\n}\n","import MonotoneChainSelectAction from '../../index/chain/MonotoneChainSelectAction.js'\nimport MonotoneChain from '../../index/chain/MonotoneChain.js'\nimport ItemVisitor from '../../index/ItemVisitor.js'\nexport default class MCIndexPointSnapper {\n constructor() {\n MCIndexPointSnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._index = null\n const index = arguments[0]\n this._index = index\n }\n snap() {\n if (arguments.length === 1) {\n const hotPixel = arguments[0]\n return this.snap(hotPixel, null, -1)\n } else if (arguments.length === 3) {\n const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n const pixelEnv = hotPixel.getSafeEnvelope()\n const hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex)\n this._index.query(pixelEnv, new (class {\n get interfaces_() {\n return [ItemVisitor]\n }\n visitItem(item) {\n const testChain = item\n testChain.select(pixelEnv, hotPixelSnapAction)\n }\n })())\n return hotPixelSnapAction.isNodeAdded()\n }\n }\n}\nclass HotPixelSnapAction extends MonotoneChainSelectAction {\n constructor() {\n super()\n HotPixelSnapAction.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hotPixel = null\n this._parentEdge = null\n this._hotPixelVertexIndex = null\n this._isNodeAdded = false\n const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n this._hotPixel = hotPixel\n this._parentEdge = parentEdge\n this._hotPixelVertexIndex = hotPixelVertexIndex\n }\n isNodeAdded() {\n return this._isNodeAdded\n }\n select() {\n if (arguments.length === 2 && (Number.isInteger(arguments[1]) && arguments[0] instanceof MonotoneChain)) {\n const mc = arguments[0], startIndex = arguments[1]\n const ss = mc.getContext()\n if (this._parentEdge === ss) \n if (startIndex === this._hotPixelVertexIndex || startIndex + 1 === this._hotPixelVertexIndex) return null\n \n this._isNodeAdded |= this._hotPixel.addSnappedNode(ss, startIndex)\n } else {\n return super.select.apply(this, arguments)\n }\n }\n}\nMCIndexPointSnapper.HotPixelSnapAction = HotPixelSnapAction\n","import SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class InteriorIntersectionFinderAdder {\n constructor() {\n InteriorIntersectionFinderAdder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = null\n this._interiorIntersections = null\n const li = arguments[0]\n this._li = li\n this._interiorIntersections = new ArrayList()\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) \n if (this._li.isInteriorIntersection()) {\n for (let intIndex = 0; intIndex < this._li.getIntersectionNum(); intIndex++) \n this._interiorIntersections.add(this._li.getIntersection(intIndex))\n \n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n }\n \n }\n isDone() {\n return false\n }\n getInteriorIntersections() {\n return this._interiorIntersections\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import NodingValidator from '../NodingValidator.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Collection from '../../../../../java/util/Collection.js'\nimport Noder from '../Noder.js'\nimport MCIndexNoder from '../MCIndexNoder.js'\nimport NodedSegmentString from '../NodedSegmentString.js'\nimport HotPixel from './HotPixel.js'\nimport Exception from '../../../../../java/lang/Exception.js'\nimport MCIndexPointSnapper from './MCIndexPointSnapper.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport InteriorIntersectionFinderAdder from '../InteriorIntersectionFinderAdder.js'\nexport default class MCIndexSnapRounder {\n constructor() {\n MCIndexSnapRounder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pm = null\n this._li = null\n this._scaleFactor = null\n this._noder = null\n this._pointSnapper = null\n this._nodedSegStrings = null\n const pm = arguments[0]\n this._pm = pm\n this._li = new RobustLineIntersector()\n this._li.setPrecisionModel(pm)\n this._scaleFactor = pm.getScale()\n }\n checkCorrectness(inputSegmentStrings) {\n const resultSegStrings = NodedSegmentString.getNodedSubstrings(inputSegmentStrings)\n const nv = new NodingValidator(resultSegStrings)\n try {\n nv.checkValid()\n } catch (ex) {\n if (ex instanceof Exception) \n ex.printStackTrace()\n else throw ex\n } finally {}\n }\n getNodedSubstrings() {\n return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n }\n snapRound(segStrings, li) {\n const intersections = this.findInteriorIntersections(segStrings, li)\n this.computeIntersectionSnaps(intersections)\n this.computeVertexSnaps(segStrings)\n }\n findInteriorIntersections(segStrings, li) {\n const intFinderAdder = new InteriorIntersectionFinderAdder(li)\n this._noder.setSegmentIntersector(intFinderAdder)\n this._noder.computeNodes(segStrings)\n return intFinderAdder.getInteriorIntersections()\n }\n computeVertexSnaps() {\n if (hasInterface(arguments[0], Collection)) {\n const edges = arguments[0]\n for (let i0 = edges.iterator(); i0.hasNext(); ) {\n const edge0 = i0.next()\n this.computeVertexSnaps(edge0)\n }\n } else if (arguments[0] instanceof NodedSegmentString) {\n const e = arguments[0]\n const pts0 = e.getCoordinates()\n for (let i = 0; i < pts0.length; i++) {\n const hotPixel = new HotPixel(pts0[i], this._scaleFactor, this._li)\n const isNodeAdded = this._pointSnapper.snap(hotPixel, e, i)\n if (isNodeAdded) \n e.addIntersection(pts0[i], i)\n \n }\n }\n }\n computeNodes(inputSegmentStrings) {\n this._nodedSegStrings = inputSegmentStrings\n this._noder = new MCIndexNoder()\n this._pointSnapper = new MCIndexPointSnapper(this._noder.getIndex())\n this.snapRound(inputSegmentStrings, this._li)\n }\n computeIntersectionSnaps(snapPts) {\n for (let it = snapPts.iterator(); it.hasNext(); ) {\n const snapPt = it.next()\n const hotPixel = new HotPixel(snapPt, this._scaleFactor, this._li)\n this._pointSnapper.snap(hotPixel)\n }\n }\n get interfaces_() {\n return [Noder]\n }\n}\n","import BufferParameters from './BufferParameters.js'\nimport Geometry from '../../geom/Geometry.js'\nimport BufferBuilder from './BufferBuilder.js'\nimport ScaledNoder from '../../noding/ScaledNoder.js'\nimport TopologyException from '../../geom/TopologyException.js'\nimport MathUtil from '../../math/MathUtil.js'\nimport PrecisionModel from '../../geom/PrecisionModel.js'\nimport RuntimeException from '../../../../../java/lang/RuntimeException.js'\nimport MCIndexSnapRounder from '../../noding/snapround/MCIndexSnapRounder.js'\nexport default class BufferOp {\n constructor() {\n BufferOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._argGeom = null\n this._distance = null\n this._bufParams = new BufferParameters()\n this._resultGeometry = null\n this._saveException = null\n if (arguments.length === 1) {\n const g = arguments[0]\n this._argGeom = g\n } else if (arguments.length === 2) {\n const g = arguments[0], bufParams = arguments[1]\n this._argGeom = g\n this._bufParams = bufParams\n }\n }\n static bufferOp() {\n if (arguments.length === 2) {\n const g = arguments[0], distance = arguments[1]\n const gBuf = new BufferOp(g)\n const geomBuf = gBuf.getResultGeometry(distance)\n return geomBuf\n } else if (arguments.length === 3) {\n if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2]\n const bufOp = new BufferOp(g)\n bufOp.setQuadrantSegments(quadrantSegments)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n } else if (arguments[2] instanceof BufferParameters && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n const g = arguments[0], distance = arguments[1], params = arguments[2]\n const bufOp = new BufferOp(g, params)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n }\n } else if (arguments.length === 4) {\n const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2], endCapStyle = arguments[3]\n const bufOp = new BufferOp(g)\n bufOp.setQuadrantSegments(quadrantSegments)\n bufOp.setEndCapStyle(endCapStyle)\n const geomBuf = bufOp.getResultGeometry(distance)\n return geomBuf\n }\n }\n static precisionScaleFactor(g, distance, maxPrecisionDigits) {\n const env = g.getEnvelopeInternal()\n const envMax = MathUtil.max(Math.abs(env.getMaxX()), Math.abs(env.getMaxY()), Math.abs(env.getMinX()), Math.abs(env.getMinY()))\n const expandByDistance = distance > 0.0 ? distance : 0.0\n const bufEnvMax = envMax + 2 * expandByDistance\n const bufEnvPrecisionDigits = Math.trunc(Math.log(bufEnvMax) / Math.log(10) + 1.0)\n const minUnitLog10 = maxPrecisionDigits - bufEnvPrecisionDigits\n const scaleFactor = Math.pow(10.0, minUnitLog10)\n return scaleFactor\n }\n bufferFixedPrecision(fixedPM) {\n const noder = new ScaledNoder(new MCIndexSnapRounder(new PrecisionModel(1.0)), fixedPM.getScale())\n const bufBuilder = new BufferBuilder(this._bufParams)\n bufBuilder.setWorkingPrecisionModel(fixedPM)\n bufBuilder.setNoder(noder)\n this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n }\n bufferReducedPrecision() {\n if (arguments.length === 0) {\n for (let precDigits = BufferOp.MAX_PRECISION_DIGITS; precDigits >= 0; precDigits--) {\n try {\n this.bufferReducedPrecision(precDigits)\n } catch (ex) {\n if (ex instanceof TopologyException) \n this._saveException = ex\n else throw ex\n } finally {}\n if (this._resultGeometry !== null) return null\n }\n throw this._saveException\n } else if (arguments.length === 1) {\n const precisionDigits = arguments[0]\n const sizeBasedScaleFactor = BufferOp.precisionScaleFactor(this._argGeom, this._distance, precisionDigits)\n const fixedPM = new PrecisionModel(sizeBasedScaleFactor)\n this.bufferFixedPrecision(fixedPM)\n }\n }\n computeGeometry() {\n this.bufferOriginalPrecision()\n if (this._resultGeometry !== null) return null\n const argPM = this._argGeom.getFactory().getPrecisionModel()\n if (argPM.getType() === PrecisionModel.FIXED) this.bufferFixedPrecision(argPM); else this.bufferReducedPrecision()\n }\n setQuadrantSegments(quadrantSegments) {\n this._bufParams.setQuadrantSegments(quadrantSegments)\n }\n bufferOriginalPrecision() {\n try {\n const bufBuilder = new BufferBuilder(this._bufParams)\n this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n } catch (ex) {\n if (ex instanceof RuntimeException) \n this._saveException = ex\n else throw ex\n } finally {}\n }\n getResultGeometry(distance) {\n this._distance = distance\n this.computeGeometry()\n return this._resultGeometry\n }\n setEndCapStyle(endCapStyle) {\n this._bufParams.setEndCapStyle(endCapStyle)\n }\n}\nBufferOp.CAP_ROUND = BufferParameters.CAP_ROUND\nBufferOp.CAP_BUTT = BufferParameters.CAP_FLAT\nBufferOp.CAP_FLAT = BufferParameters.CAP_FLAT\nBufferOp.CAP_SQUARE = BufferParameters.CAP_SQUARE\nBufferOp.MAX_PRECISION_DIGITS = 12\n","export default class BoundaryNodeRule {\n isInBoundary(boundaryCount) {}\n}\nclass Mod2BoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount % 2 === 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass EndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount > 0\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass MultiValentEndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount > 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nclass MonoValentEndPointBoundaryNodeRule {\n isInBoundary(boundaryCount) {\n return boundaryCount === 1\n }\n get interfaces_() {\n return [BoundaryNodeRule]\n }\n}\nBoundaryNodeRule.Mod2BoundaryNodeRule = Mod2BoundaryNodeRule\nBoundaryNodeRule.EndPointBoundaryNodeRule = EndPointBoundaryNodeRule\nBoundaryNodeRule.MultiValentEndPointBoundaryNodeRule = MultiValentEndPointBoundaryNodeRule\nBoundaryNodeRule.MonoValentEndPointBoundaryNodeRule = MonoValentEndPointBoundaryNodeRule\nBoundaryNodeRule.MOD2_BOUNDARY_RULE = new Mod2BoundaryNodeRule()\nBoundaryNodeRule.ENDPOINT_BOUNDARY_RULE = new EndPointBoundaryNodeRule()\nBoundaryNodeRule.MULTIVALENT_ENDPOINT_BOUNDARY_RULE = new MultiValentEndPointBoundaryNodeRule()\nBoundaryNodeRule.MONOVALENT_ENDPOINT_BOUNDARY_RULE = new MonoValentEndPointBoundaryNodeRule()\nBoundaryNodeRule.OGC_SFS_BOUNDARY_RULE = BoundaryNodeRule.MOD2_BOUNDARY_RULE\n","import Location from '../geom/Location.js'\nimport LineString from '../geom/LineString.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport Point from '../geom/Point.js'\nimport Polygon from '../geom/Polygon.js'\nimport PointLocation from './PointLocation.js'\nimport BoundaryNodeRule from './BoundaryNodeRule.js'\nimport MultiPolygon from '../geom/MultiPolygon.js'\nimport GeometryCollectionIterator from '../geom/GeometryCollectionIterator.js'\nimport GeometryCollection from '../geom/GeometryCollection.js'\nimport MultiLineString from '../geom/MultiLineString.js'\nexport default class PointLocator {\n constructor() {\n PointLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._boundaryRule = BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE\n this._isIn = null\n this._numBoundaries = null\n if (arguments.length === 0) {} else if (arguments.length === 1) {\n const boundaryRule = arguments[0]\n if (boundaryRule === null) throw new IllegalArgumentException('Rule must be non-null')\n this._boundaryRule = boundaryRule\n }\n }\n locateInPolygonRing(p, ring) {\n if (!ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n return PointLocation.locateInRing(p, ring.getCoordinates())\n }\n intersects(p, geom) {\n return this.locate(p, geom) !== Location.EXTERIOR\n }\n updateLocationInfo(loc) {\n if (loc === Location.INTERIOR) this._isIn = true\n if (loc === Location.BOUNDARY) this._numBoundaries++\n }\n computeLocation(p, geom) {\n if (geom instanceof Point) \n this.updateLocationInfo(this.locateOnPoint(p, geom))\n \n if (geom instanceof LineString) {\n this.updateLocationInfo(this.locateOnLineString(p, geom))\n } else if (geom instanceof Polygon) {\n this.updateLocationInfo(this.locateInPolygon(p, geom))\n } else if (geom instanceof MultiLineString) {\n const ml = geom\n for (let i = 0; i < ml.getNumGeometries(); i++) {\n const l = ml.getGeometryN(i)\n this.updateLocationInfo(this.locateOnLineString(p, l))\n }\n } else if (geom instanceof MultiPolygon) {\n const mpoly = geom\n for (let i = 0; i < mpoly.getNumGeometries(); i++) {\n const poly = mpoly.getGeometryN(i)\n this.updateLocationInfo(this.locateInPolygon(p, poly))\n }\n } else if (geom instanceof GeometryCollection) {\n const geomi = new GeometryCollectionIterator(geom)\n while (geomi.hasNext()) {\n const g2 = geomi.next()\n if (g2 !== geom) this.computeLocation(p, g2)\n }\n }\n }\n locateOnPoint(p, pt) {\n const ptCoord = pt.getCoordinate()\n if (ptCoord.equals2D(p)) return Location.INTERIOR\n return Location.EXTERIOR\n }\n locateOnLineString(p, l) {\n if (!l.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n const seq = l.getCoordinateSequence()\n if (!l.isClosed()) \n if (p.equals(seq.getCoordinate(0)) || p.equals(seq.getCoordinate(seq.size() - 1))) \n return Location.BOUNDARY\n \n \n if (PointLocation.isOnLine(p, seq)) \n return Location.INTERIOR\n \n return Location.EXTERIOR\n }\n locateInPolygon(p, poly) {\n if (poly.isEmpty()) return Location.EXTERIOR\n const shell = poly.getExteriorRing()\n const shellLoc = this.locateInPolygonRing(p, shell)\n if (shellLoc === Location.EXTERIOR) return Location.EXTERIOR\n if (shellLoc === Location.BOUNDARY) return Location.BOUNDARY\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n const hole = poly.getInteriorRingN(i)\n const holeLoc = this.locateInPolygonRing(p, hole)\n if (holeLoc === Location.INTERIOR) return Location.EXTERIOR\n if (holeLoc === Location.BOUNDARY) return Location.BOUNDARY\n }\n return Location.INTERIOR\n }\n locate(p, geom) {\n if (geom.isEmpty()) return Location.EXTERIOR\n if (geom instanceof LineString) \n return this.locateOnLineString(p, geom)\n else if (geom instanceof Polygon) \n return this.locateInPolygon(p, geom)\n \n this._isIn = false\n this._numBoundaries = 0\n this.computeLocation(p, geom)\n if (this._boundaryRule.isInBoundary(this._numBoundaries)) return Location.BOUNDARY\n if (this._numBoundaries > 0 || this._isIn) return Location.INTERIOR\n return Location.EXTERIOR\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport CoordinateArraySequence from '../geom/impl/CoordinateArraySequence.js'\nimport Octant from './Octant.js'\nimport SegmentString from './SegmentString.js'\nexport default class BasicSegmentString {\n constructor() {\n BasicSegmentString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pts = null\n this._data = null\n const pts = arguments[0], data = arguments[1]\n this._pts = pts\n this._data = data\n }\n getCoordinates() {\n return this._pts\n }\n size() {\n return this._pts.length\n }\n getCoordinate(i) {\n return this._pts[i]\n }\n isClosed() {\n return this._pts[0].equals(this._pts[this._pts.length - 1])\n }\n getSegmentOctant(index) {\n if (index === this._pts.length - 1) return -1\n return Octant.octant(this.getCoordinate(index), this.getCoordinate(index + 1))\n }\n setData(data) {\n this._data = data\n }\n getData() {\n return this._data\n }\n toString() {\n return WKTWriter.toLineString(new CoordinateArraySequence(this._pts))\n }\n get interfaces_() {\n return [SegmentString]\n }\n}\n","import SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class NodingIntersectionFinder {\n constructor() {\n NodingIntersectionFinder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._findAllIntersections = false\n this._isCheckEndSegmentsOnly = false\n this._keepIntersections = true\n this._isInteriorIntersectionsOnly = false\n this._li = null\n this._interiorIntersection = null\n this._intSegments = null\n this._intersections = new ArrayList()\n this._intersectionCount = 0\n const li = arguments[0]\n this._li = li\n this._interiorIntersection = null\n }\n static createAllIntersectionsFinder(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n return finder\n }\n static isInteriorVertexIntersection() {\n if (arguments.length === 4) {\n const p0 = arguments[0], p1 = arguments[1], isEnd0 = arguments[2], isEnd1 = arguments[3]\n if (isEnd0 && isEnd1) return false\n if (p0.equals2D(p1)) \n return true\n \n return false\n } else if (arguments.length === 8) {\n const p00 = arguments[0], p01 = arguments[1], p10 = arguments[2], p11 = arguments[3], isEnd00 = arguments[4], isEnd01 = arguments[5], isEnd10 = arguments[6], isEnd11 = arguments[7]\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p00, p10, isEnd00, isEnd10)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p00, p11, isEnd00, isEnd11)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p01, p10, isEnd01, isEnd10)) return true\n if (NodingIntersectionFinder.isInteriorVertexIntersection(p01, p11, isEnd01, isEnd11)) return true\n return false\n }\n }\n static createInteriorIntersectionCounter(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setInteriorIntersectionsOnly(true)\n finder.setFindAllIntersections(true)\n finder.setKeepIntersections(false)\n return finder\n }\n static createIntersectionCounter(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n finder.setKeepIntersections(false)\n return finder\n }\n static isEndSegment(segStr, index) {\n if (index === 0) return true\n if (index >= segStr.size() - 2) return true\n return false\n }\n static createAnyIntersectionFinder(li) {\n return new NodingIntersectionFinder(li)\n }\n static createInteriorIntersectionsFinder(li) {\n const finder = new NodingIntersectionFinder(li)\n finder.setFindAllIntersections(true)\n finder.setInteriorIntersectionsOnly(true)\n return finder\n }\n setCheckEndSegmentsOnly(isCheckEndSegmentsOnly) {\n this._isCheckEndSegmentsOnly = isCheckEndSegmentsOnly\n }\n getIntersectionSegments() {\n return this._intSegments\n }\n count() {\n return this._intersectionCount\n }\n getIntersections() {\n return this._intersections\n }\n setFindAllIntersections(findAllIntersections) {\n this._findAllIntersections = findAllIntersections\n }\n setKeepIntersections(keepIntersections) {\n this._keepIntersections = keepIntersections\n }\n getIntersection() {\n return this._interiorIntersection\n }\n processIntersections(e0, segIndex0, e1, segIndex1) {\n if (!this._findAllIntersections && this.hasIntersection()) return null\n const isSameSegString = e0 === e1\n const isSameSegment = isSameSegString && segIndex0 === segIndex1\n if (isSameSegment) return null\n if (this._isCheckEndSegmentsOnly) {\n const isEndSegPresent = NodingIntersectionFinder.isEndSegment(e0, segIndex0) || NodingIntersectionFinder.isEndSegment(e1, segIndex1)\n if (!isEndSegPresent) return null\n }\n const p00 = e0.getCoordinate(segIndex0)\n const p01 = e0.getCoordinate(segIndex0 + 1)\n const p10 = e1.getCoordinate(segIndex1)\n const p11 = e1.getCoordinate(segIndex1 + 1)\n const isEnd00 = segIndex0 === 0\n const isEnd01 = segIndex0 + 2 === e0.size()\n const isEnd10 = segIndex1 === 0\n const isEnd11 = segIndex1 + 2 === e1.size()\n this._li.computeIntersection(p00, p01, p10, p11)\n const isInteriorInt = this._li.hasIntersection() && this._li.isInteriorIntersection()\n let isInteriorVertexInt = false\n if (!this._isInteriorIntersectionsOnly) {\n const isAdjacentSegment = isSameSegString && Math.abs(segIndex1 - segIndex0) <= 1\n isInteriorVertexInt = !isAdjacentSegment && NodingIntersectionFinder.isInteriorVertexIntersection(p00, p01, p10, p11, isEnd00, isEnd01, isEnd10, isEnd11)\n }\n if (isInteriorInt || isInteriorVertexInt) {\n this._intSegments = new Array(4).fill(null)\n this._intSegments[0] = p00\n this._intSegments[1] = p01\n this._intSegments[2] = p10\n this._intSegments[3] = p11\n this._interiorIntersection = this._li.getIntersection(0)\n if (this._keepIntersections) this._intersections.add(this._interiorIntersection)\n this._intersectionCount++\n }\n }\n hasIntersection() {\n return this._interiorIntersection !== null\n }\n isDone() {\n if (this._findAllIntersections) return false\n return this._interiorIntersection !== null\n }\n setInteriorIntersectionsOnly(isInteriorIntersectionsOnly) {\n this._isInteriorIntersectionsOnly = isInteriorIntersectionsOnly\n }\n get interfaces_() {\n return [SegmentIntersector]\n }\n}\n","import WKTWriter from '../io/WKTWriter.js'\nimport MCIndexNoder from './MCIndexNoder.js'\nimport TopologyException from '../geom/TopologyException.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nimport NodingIntersectionFinder from './NodingIntersectionFinder.js'\nexport default class FastNodingValidator {\n constructor() {\n FastNodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._segStrings = null\n this._findAllIntersections = false\n this._segInt = null\n this._isValid = true\n const segStrings = arguments[0]\n this._segStrings = segStrings\n }\n static computeIntersections(segStrings) {\n const nv = new FastNodingValidator(segStrings)\n nv.setFindAllIntersections(true)\n nv.isValid()\n return nv.getIntersections()\n }\n execute() {\n if (this._segInt !== null) return null\n this.checkInteriorIntersections()\n }\n getIntersections() {\n return this._segInt.getIntersections()\n }\n isValid() {\n this.execute()\n return this._isValid\n }\n setFindAllIntersections(findAllIntersections) {\n this._findAllIntersections = findAllIntersections\n }\n checkInteriorIntersections() {\n this._isValid = true\n this._segInt = new NodingIntersectionFinder(this._li)\n this._segInt.setFindAllIntersections(this._findAllIntersections)\n const noder = new MCIndexNoder()\n noder.setSegmentIntersector(this._segInt)\n noder.computeNodes(this._segStrings)\n if (this._segInt.hasIntersection()) {\n this._isValid = false\n return null\n }\n }\n checkValid() {\n this.execute()\n if (!this._isValid) throw new TopologyException(this.getErrorMessage(), this._segInt.getIntersection())\n }\n getErrorMessage() {\n if (this._isValid) return 'no intersections found'\n const intSegs = this._segInt.getIntersectionSegments()\n return 'found non-noded intersection between ' + WKTWriter.toLineString(intSegs[0], intSegs[1]) + ' and ' + WKTWriter.toLineString(intSegs[2], intSegs[3])\n }\n}\n","import BasicSegmentString from '../noding/BasicSegmentString.js'\nimport FastNodingValidator from '../noding/FastNodingValidator.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class EdgeNodingValidator {\n constructor() {\n EdgeNodingValidator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nv = null\n const edges = arguments[0]\n this._nv = new FastNodingValidator(EdgeNodingValidator.toSegmentStrings(edges))\n }\n static toSegmentStrings(edges) {\n const segStrings = new ArrayList()\n for (let i = edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n segStrings.add(new BasicSegmentString(e.getCoordinates(), e))\n }\n return segStrings\n }\n static checkValid(edges) {\n const validator = new EdgeNodingValidator(edges)\n validator.checkValid()\n }\n checkValid() {\n this._nv.checkValid()\n }\n}\n","import GeometryFactory from '../GeometryFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class GeometryCollectionMapper {\n constructor() {\n GeometryCollectionMapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._mapOp = null\n const mapOp = arguments[0]\n this._mapOp = mapOp\n }\n static map(gc, op) {\n const mapper = new GeometryCollectionMapper(op)\n return mapper.map(gc)\n }\n map(gc) {\n const mapped = new ArrayList()\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = this._mapOp.map(gc.getGeometryN(i))\n if (!g.isEmpty()) mapped.add(g)\n }\n return gc.getFactory().createGeometryCollection(GeometryFactory.toGeometryArray(mapped))\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport OverlayOp from './OverlayOp.js'\nexport default class LineBuilder {\n constructor() {\n LineBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._op = null\n this._geometryFactory = null\n this._ptLocator = null\n this._lineEdgesList = new ArrayList()\n this._resultLineList = new ArrayList()\n const op = arguments[0], geometryFactory = arguments[1], ptLocator = arguments[2]\n this._op = op\n this._geometryFactory = geometryFactory\n this._ptLocator = ptLocator\n }\n collectLines(opCode) {\n for (let it = this._op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n this.collectLineEdge(de, opCode, this._lineEdgesList)\n this.collectBoundaryTouchEdge(de, opCode, this._lineEdgesList)\n }\n }\n labelIsolatedLine(e, targetIndex) {\n const loc = this._ptLocator.locate(e.getCoordinate(), this._op.getArgGeometry(targetIndex))\n e.getLabel().setLocation(targetIndex, loc)\n }\n build(opCode) {\n this.findCoveredLineEdges()\n this.collectLines(opCode)\n this.buildLines(opCode)\n return this._resultLineList\n }\n collectLineEdge(de, opCode, edges) {\n const label = de.getLabel()\n const e = de.getEdge()\n if (de.isLineEdge()) \n if (!de.isVisited() && OverlayOp.isResultOfOp(label, opCode) && !e.isCovered()) {\n edges.add(e)\n de.setVisitedEdge(true)\n }\n \n }\n findCoveredLineEdges() {\n for (let nodeit = this._op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().findCoveredLineEdges()\n }\n for (let it = this._op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const e = de.getEdge()\n if (de.isLineEdge() && !e.isCoveredSet()) {\n const isCovered = this._op.isCoveredByA(de.getCoordinate())\n e.setCovered(isCovered)\n }\n }\n }\n labelIsolatedLines(edgesList) {\n for (let it = edgesList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const label = e.getLabel()\n if (e.isIsolated()) \n if (label.isNull(0)) this.labelIsolatedLine(e, 0); else this.labelIsolatedLine(e, 1)\n \n }\n }\n buildLines(opCode) {\n for (let it = this._lineEdgesList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const line = this._geometryFactory.createLineString(e.getCoordinates())\n this._resultLineList.add(line)\n e.setInResult(true)\n }\n }\n collectBoundaryTouchEdge(de, opCode, edges) {\n const label = de.getLabel()\n if (de.isLineEdge()) return null\n if (de.isVisited()) return null\n if (de.isInteriorAreaEdge()) return null\n if (de.getEdge().isInResult()) return null\n Assert.isTrue(!(de.isInResult() || de.getSym().isInResult()) || !de.getEdge().isInResult())\n if (OverlayOp.isResultOfOp(label, opCode) && opCode === OverlayOp.INTERSECTION) {\n edges.add(de.getEdge())\n de.setVisitedEdge(true)\n }\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport OverlayOp from './OverlayOp.js'\nexport default class PointBuilder {\n constructor() {\n PointBuilder.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._op = null\n this._geometryFactory = null\n this._resultPointList = new ArrayList()\n const op = arguments[0], geometryFactory = arguments[1], ptLocator = arguments[2]\n this._op = op\n this._geometryFactory = geometryFactory\n }\n filterCoveredNodeToPoint(n) {\n const coord = n.getCoordinate()\n if (!this._op.isCoveredByLA(coord)) {\n const pt = this._geometryFactory.createPoint(coord)\n this._resultPointList.add(pt)\n }\n }\n extractNonCoveredResultNodes(opCode) {\n for (let nodeit = this._op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {\n const n = nodeit.next()\n if (n.isInResult()) continue\n if (n.isIncidentEdgeInResult()) continue\n if (n.getEdges().getDegree() === 0 || opCode === OverlayOp.INTERSECTION) {\n const label = n.getLabel()\n if (OverlayOp.isResultOfOp(label, opCode)) \n this.filterCoveredNodeToPoint(n)\n \n }\n }\n }\n build(opCode) {\n this.extractNonCoveredResultNodes(opCode)\n return this._resultPointList\n }\n}\n","import LineString from '../../../geom/LineString.js'\nimport CoordinateList from '../../../geom/CoordinateList.js'\nimport Coordinate from '../../../geom/Coordinate.js'\nimport Double from '../../../../../../java/lang/Double.js'\nimport LineSegment from '../../../geom/LineSegment.js'\nexport default class LineStringSnapper {\n constructor() {\n LineStringSnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._snapTolerance = 0.0\n this._srcPts = null\n this._seg = new LineSegment()\n this._allowSnappingToSourceVertices = false\n this._isClosed = false\n if (arguments[0] instanceof LineString && typeof arguments[1] === 'number') {\n const srcLine = arguments[0], snapTolerance = arguments[1]\n LineStringSnapper.constructor_.call(this, srcLine.getCoordinates(), snapTolerance)\n } else if (arguments[0] instanceof Array && typeof arguments[1] === 'number') {\n const srcPts = arguments[0], snapTolerance = arguments[1]\n this._srcPts = srcPts\n this._isClosed = LineStringSnapper.isClosed(srcPts)\n this._snapTolerance = snapTolerance\n }\n }\n static isClosed(pts) {\n if (pts.length <= 1) return false\n return pts[0].equals2D(pts[pts.length - 1])\n }\n snapVertices(srcCoords, snapPts) {\n const end = this._isClosed ? srcCoords.size() - 1 : srcCoords.size()\n for (let i = 0; i < end; i++) {\n const srcPt = srcCoords.get(i)\n const snapVert = this.findSnapForVertex(srcPt, snapPts)\n if (snapVert !== null) {\n srcCoords.set(i, new Coordinate(snapVert))\n if (i === 0 && this._isClosed) srcCoords.set(srcCoords.size() - 1, new Coordinate(snapVert))\n }\n }\n }\n findSnapForVertex(pt, snapPts) {\n for (let i = 0; i < snapPts.length; i++) {\n if (pt.equals2D(snapPts[i])) return null\n if (pt.distance(snapPts[i]) < this._snapTolerance) return snapPts[i]\n }\n return null\n }\n snapTo(snapPts) {\n const coordList = new CoordinateList(this._srcPts)\n this.snapVertices(coordList, snapPts)\n this.snapSegments(coordList, snapPts)\n const newPts = coordList.toCoordinateArray()\n return newPts\n }\n snapSegments(srcCoords, snapPts) {\n if (snapPts.length === 0) return null\n let distinctPtCount = snapPts.length\n if (snapPts[0].equals2D(snapPts[snapPts.length - 1])) distinctPtCount = snapPts.length - 1\n for (let i = 0; i < distinctPtCount; i++) {\n const snapPt = snapPts[i]\n const index = this.findSegmentIndexToSnap(snapPt, srcCoords)\n if (index >= 0) \n srcCoords.add(index + 1, new Coordinate(snapPt), false)\n \n }\n }\n findSegmentIndexToSnap(snapPt, srcCoords) {\n let minDist = Double.MAX_VALUE\n let snapIndex = -1\n for (let i = 0; i < srcCoords.size() - 1; i++) {\n this._seg.p0 = srcCoords.get(i)\n this._seg.p1 = srcCoords.get(i + 1)\n if (this._seg.p0.equals2D(snapPt) || this._seg.p1.equals2D(snapPt)) \n if (this._allowSnappingToSourceVertices) continue; else return -1\n \n const dist = this._seg.distance(snapPt)\n if (dist < this._snapTolerance && dist < minDist) {\n minDist = dist\n snapIndex = i\n }\n }\n return snapIndex\n }\n setAllowSnappingToSourceVertices(allowSnappingToSourceVertices) {\n this._allowSnappingToSourceVertices = allowSnappingToSourceVertices\n }\n}\n","import TreeSet from '../../../../../../java/util/TreeSet.js'\nimport GeometryTransformer from '../../../geom/util/GeometryTransformer.js'\nimport hasInterface from '../../../../../../hasInterface.js'\nimport Double from '../../../../../../java/lang/Double.js'\nimport LineStringSnapper from './LineStringSnapper.js'\nimport PrecisionModel from '../../../geom/PrecisionModel.js'\nimport Polygonal from '../../../geom/Polygonal.js'\nexport default class GeometrySnapper {\n constructor() {\n GeometrySnapper.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._srcGeom = null\n const srcGeom = arguments[0]\n this._srcGeom = srcGeom\n }\n static snap(g0, g1, snapTolerance) {\n const snapGeom = new Array(2).fill(null)\n const snapper0 = new GeometrySnapper(g0)\n snapGeom[0] = snapper0.snapTo(g1, snapTolerance)\n const snapper1 = new GeometrySnapper(g1)\n snapGeom[1] = snapper1.snapTo(snapGeom[0], snapTolerance)\n return snapGeom\n }\n static computeOverlaySnapTolerance() {\n if (arguments.length === 1) {\n const g = arguments[0]\n let snapTolerance = GeometrySnapper.computeSizeBasedSnapTolerance(g)\n const pm = g.getPrecisionModel()\n if (pm.getType() === PrecisionModel.FIXED) {\n const fixedSnapTol = 1 / pm.getScale() * 2 / 1.415\n if (fixedSnapTol > snapTolerance) snapTolerance = fixedSnapTol\n }\n return snapTolerance\n } else if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n return Math.min(GeometrySnapper.computeOverlaySnapTolerance(g0), GeometrySnapper.computeOverlaySnapTolerance(g1))\n }\n }\n static computeSizeBasedSnapTolerance(g) {\n const env = g.getEnvelopeInternal()\n const minDimension = Math.min(env.getHeight(), env.getWidth())\n const snapTol = minDimension * GeometrySnapper.SNAP_PRECISION_FACTOR\n return snapTol\n }\n static snapToSelf(geom, snapTolerance, cleanResult) {\n const snapper0 = new GeometrySnapper(geom)\n return snapper0.snapToSelf(snapTolerance, cleanResult)\n }\n snapTo(snapGeom, snapTolerance) {\n const snapPts = this.extractTargetCoordinates(snapGeom)\n const snapTrans = new SnapTransformer(snapTolerance, snapPts)\n return snapTrans.transform(this._srcGeom)\n }\n snapToSelf(snapTolerance, cleanResult) {\n const snapPts = this.extractTargetCoordinates(this._srcGeom)\n const snapTrans = new SnapTransformer(snapTolerance, snapPts, true)\n const snappedGeom = snapTrans.transform(this._srcGeom)\n let result = snappedGeom\n if (cleanResult && hasInterface(result, Polygonal)) \n result = snappedGeom.buffer(0)\n \n return result\n }\n computeSnapTolerance(ringPts) {\n const minSegLen = this.computeMinimumSegmentLength(ringPts)\n const snapTol = minSegLen / 10\n return snapTol\n }\n extractTargetCoordinates(g) {\n const ptSet = new TreeSet()\n const pts = g.getCoordinates()\n for (let i = 0; i < pts.length; i++) \n ptSet.add(pts[i])\n \n return ptSet.toArray(new Array(0).fill(null))\n }\n computeMinimumSegmentLength(pts) {\n let minSegLen = Double.MAX_VALUE\n for (let i = 0; i < pts.length - 1; i++) {\n const segLen = pts[i].distance(pts[i + 1])\n if (segLen < minSegLen) minSegLen = segLen\n }\n return minSegLen\n }\n}\nGeometrySnapper.SNAP_PRECISION_FACTOR = 1e-9\nclass SnapTransformer extends GeometryTransformer {\n constructor() {\n super()\n SnapTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._snapTolerance = null\n this._snapPts = null\n this._isSelfSnap = false\n if (arguments.length === 2) {\n const snapTolerance = arguments[0], snapPts = arguments[1]\n this._snapTolerance = snapTolerance\n this._snapPts = snapPts\n } else if (arguments.length === 3) {\n const snapTolerance = arguments[0], snapPts = arguments[1], isSelfSnap = arguments[2]\n this._snapTolerance = snapTolerance\n this._snapPts = snapPts\n this._isSelfSnap = isSelfSnap\n }\n }\n snapLine(srcPts, snapPts) {\n const snapper = new LineStringSnapper(srcPts, this._snapTolerance)\n snapper.setAllowSnappingToSourceVertices(this._isSelfSnap)\n return snapper.snapTo(snapPts)\n }\n transformCoordinates(coords, parent) {\n const srcPts = coords.toCoordinateArray()\n const newPts = this.snapLine(srcPts, this._snapPts)\n return this._factory.getCoordinateSequenceFactory().create(newPts)\n }\n}\n","import Double from '../../../../java/lang/Double.js'\nimport Long from '../../../../java/lang/Long.js'\nexport default class CommonBits {\n constructor() {\n this._isFirst = true\n this._commonMantissaBitsCount = 53\n this._commonBits = new Long()\n this._commonSignExp = null\n }\n\n getCommon() {\n return Double.longBitsToDouble(this._commonBits)\n }\n\n add(num) {\n const numBits = Double.doubleToLongBits(num)\n if (this._isFirst) {\n this._commonBits = numBits\n this._commonSignExp = CommonBits.signExpBits(this._commonBits)\n this._isFirst = false\n return null\n }\n const numSignExp = CommonBits.signExpBits(numBits)\n if (numSignExp !== this._commonSignExp) {\n this._commonBits.high = 0 | 0\n this._commonBits.low = 0 | 0\n return null\n }\n this._commonMantissaBitsCount = CommonBits.numCommonMostSigMantissaBits(this._commonBits, numBits)\n this._commonBits = CommonBits.zeroLowerBits(this._commonBits, 64 - (12 + this._commonMantissaBitsCount))\n }\n\n toString() {\n if (arguments.length === 1) {\n const bits = arguments[0]\n const x = Double.longBitsToDouble(bits)\n const numStr = Long.toBinaryString(bits)\n const padStr = '0000000000000000000000000000000000000000000000000000000000000000' + numStr\n const bitStr = padStr.substring(padStr.length - 64)\n const str = bitStr.substring(0, 1) + ' ' + bitStr.substring(1, 12) + '(exp) ' + bitStr.substring(12) + ' [ ' + x + ' ]'\n return str\n }\n }\n\n getClass() {\n return CommonBits\n }\n\n get interfaces_() {\n return []\n }\n\n static getBit(bits, i) {\n const mask = (1 << (i % 32))\n if (i < 32) return (bits.low & mask) !== 0 ? 1 : 0\n\n return (bits.high & mask) !== 0 ? 1 : 0\n }\n\n static signExpBits(num) {\n return num.high >>> 20\n }\n\n static zeroLowerBits(bits, nBits) {\n let prop = 'low'\n if (nBits > 32) {\n bits.low = 0 | 0\n nBits %= 32\n prop = 'high'\n }\n if (nBits > 0) {\n const mask = (nBits < 32) ? (~((1 << nBits) - 1)) : 0\n bits[prop] &= mask\n }\n return bits\n }\n\n static numCommonMostSigMantissaBits(num1, num2) {\n let count = 0\n for (let i = 52; i >= 0; i--) {\n if (CommonBits.getBit(num1, i) !== CommonBits.getBit(num2, i)) return count\n count++\n }\n return 52\n }\n}\n","import CommonBits from './CommonBits.js'\nimport CoordinateFilter from '../geom/CoordinateFilter.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport CoordinateSequenceFilter from '../geom/CoordinateSequenceFilter.js'\nexport default class CommonBitsRemover {\n constructor() {\n CommonBitsRemover.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._commonCoord = null\n this._ccFilter = new CommonCoordinateFilter()\n }\n addCommonBits(geom) {\n const trans = new Translater(this._commonCoord)\n geom.apply(trans)\n geom.geometryChanged()\n }\n removeCommonBits(geom) {\n if (this._commonCoord.x === 0.0 && this._commonCoord.y === 0.0) return geom\n const invCoord = new Coordinate(this._commonCoord)\n invCoord.x = -invCoord.x\n invCoord.y = -invCoord.y\n const trans = new Translater(invCoord)\n geom.apply(trans)\n geom.geometryChanged()\n return geom\n }\n getCommonCoordinate() {\n return this._commonCoord\n }\n add(geom) {\n geom.apply(this._ccFilter)\n this._commonCoord = this._ccFilter.getCommonCoordinate()\n }\n}\nclass CommonCoordinateFilter {\n constructor() {\n CommonCoordinateFilter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._commonBitsX = new CommonBits()\n this._commonBitsY = new CommonBits()\n }\n filter(coord) {\n this._commonBitsX.add(coord.x)\n this._commonBitsY.add(coord.y)\n }\n getCommonCoordinate() {\n return new Coordinate(this._commonBitsX.getCommon(), this._commonBitsY.getCommon())\n }\n get interfaces_() {\n return [CoordinateFilter]\n }\n}\nclass Translater {\n constructor() {\n Translater.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.trans = null\n const trans = arguments[0]\n this.trans = trans\n }\n filter(seq, i) {\n const xp = seq.getOrdinate(i, 0) + this.trans.x\n const yp = seq.getOrdinate(i, 1) + this.trans.y\n seq.setOrdinate(i, 0, xp)\n seq.setOrdinate(i, 1, yp)\n }\n isDone() {\n return false\n }\n isGeometryChanged() {\n return true\n }\n get interfaces_() {\n return [CoordinateSequenceFilter]\n }\n}\nCommonBitsRemover.CommonCoordinateFilter = CommonCoordinateFilter\nCommonBitsRemover.Translater = Translater\n","import GeometrySnapper from './GeometrySnapper.js'\nimport System from '../../../../../../java/lang/System.js'\nimport CommonBitsRemover from '../../../precision/CommonBitsRemover.js'\nimport OverlayOp from '../OverlayOp.js'\nexport default class SnapOverlayOp {\n constructor() {\n SnapOverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = new Array(2).fill(null)\n this._snapTolerance = null\n this._cbr = null\n const g1 = arguments[0], g2 = arguments[1]\n this._geom[0] = g1\n this._geom[1] = g2\n this.computeSnapTolerance()\n }\n static overlayOp(g0, g1, opCode) {\n const op = new SnapOverlayOp(g0, g1)\n return op.getResultGeometry(opCode)\n }\n static union(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.UNION)\n }\n static intersection(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.INTERSECTION)\n }\n static symDifference(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.SYMDIFFERENCE)\n }\n static difference(g0, g1) {\n return SnapOverlayOp.overlayOp(g0, g1, OverlayOp.DIFFERENCE)\n }\n selfSnap(geom) {\n const snapper0 = new GeometrySnapper(geom)\n const snapGeom = snapper0.snapTo(geom, this._snapTolerance)\n return snapGeom\n }\n removeCommonBits(geom) {\n this._cbr = new CommonBitsRemover()\n this._cbr.add(geom[0])\n this._cbr.add(geom[1])\n const remGeom = new Array(2).fill(null)\n remGeom[0] = this._cbr.removeCommonBits(geom[0].copy())\n remGeom[1] = this._cbr.removeCommonBits(geom[1].copy())\n return remGeom\n }\n prepareResult(geom) {\n this._cbr.addCommonBits(geom)\n return geom\n }\n getResultGeometry(opCode) {\n const prepGeom = this.snap(this._geom)\n const result = OverlayOp.overlayOp(prepGeom[0], prepGeom[1], opCode)\n return this.prepareResult(result)\n }\n checkValid(g) {\n if (!g.isValid()) \n System.out.println('Snapped geometry is invalid')\n \n }\n computeSnapTolerance() {\n this._snapTolerance = GeometrySnapper.computeOverlaySnapTolerance(this._geom[0], this._geom[1])\n }\n snap(geom) {\n const remGeom = this.removeCommonBits(geom)\n const snapGeom = GeometrySnapper.snap(remGeom[0], remGeom[1], this._snapTolerance)\n return snapGeom\n }\n}\n","import SnapOverlayOp from './SnapOverlayOp.js'\nimport RuntimeException from '../../../../../../java/lang/RuntimeException.js'\nimport OverlayOp from '../OverlayOp.js'\nexport default class SnapIfNeededOverlayOp {\n constructor() {\n SnapIfNeededOverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = new Array(2).fill(null)\n const g1 = arguments[0], g2 = arguments[1]\n this._geom[0] = g1\n this._geom[1] = g2\n }\n static overlayOp(g0, g1, opCode) {\n const op = new SnapIfNeededOverlayOp(g0, g1)\n return op.getResultGeometry(opCode)\n }\n static union(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.UNION)\n }\n static intersection(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.INTERSECTION)\n }\n static symDifference(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.SYMDIFFERENCE)\n }\n static difference(g0, g1) {\n return SnapIfNeededOverlayOp.overlayOp(g0, g1, OverlayOp.DIFFERENCE)\n }\n getResultGeometry(opCode) {\n let result = null\n let isSuccess = false\n let savedException = null\n try {\n result = OverlayOp.overlayOp(this._geom[0], this._geom[1], opCode)\n const isValid = true\n if (isValid) isSuccess = true\n } catch (ex) {\n if (ex instanceof RuntimeException) \n savedException = ex\n else throw ex\n } finally {}\n if (!isSuccess) \n try {\n result = SnapOverlayOp.overlayOp(this._geom[0], this._geom[1], opCode)\n } catch (ex) {\n if (ex instanceof RuntimeException) \n throw savedException\n else throw ex\n } finally {}\n \n return result\n }\n}\n","export default class MonotoneChain {\n constructor() {\n MonotoneChain.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.mce = null\n this.chainIndex = null\n const mce = arguments[0], chainIndex = arguments[1]\n this.mce = mce\n this.chainIndex = chainIndex\n }\n computeIntersections(mc, si) {\n this.mce.computeIntersectsForChain(this.chainIndex, mc.mce, mc.chainIndex, si)\n }\n}\n","import Comparable from '../../../../../java/lang/Comparable.js'\nexport default class SweepLineEvent {\n constructor() {\n SweepLineEvent.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._label = null\n this._xValue = null\n this._eventType = null\n this._insertEvent = null\n this._deleteEventIndex = null\n this._obj = null\n if (arguments.length === 2) {\n const x = arguments[0], insertEvent = arguments[1]\n this._eventType = SweepLineEvent.DELETE\n this._xValue = x\n this._insertEvent = insertEvent\n } else if (arguments.length === 3) {\n const label = arguments[0], x = arguments[1], obj = arguments[2]\n this._eventType = SweepLineEvent.INSERT\n this._label = label\n this._xValue = x\n this._obj = obj\n }\n }\n isDelete() {\n return this._eventType === SweepLineEvent.DELETE\n }\n setDeleteEventIndex(deleteEventIndex) {\n this._deleteEventIndex = deleteEventIndex\n }\n getObject() {\n return this._obj\n }\n compareTo(o) {\n const pe = o\n if (this._xValue < pe._xValue) return -1\n if (this._xValue > pe._xValue) return 1\n if (this._eventType < pe._eventType) return -1\n if (this._eventType > pe._eventType) return 1\n return 0\n }\n getInsertEvent() {\n return this._insertEvent\n }\n isInsert() {\n return this._eventType === SweepLineEvent.INSERT\n }\n isSameLabel(ev) {\n if (this._label === null) return false\n return this._label === ev._label\n }\n getDeleteEventIndex() {\n return this._deleteEventIndex\n }\n get interfaces_() {\n return [Comparable]\n }\n}\nSweepLineEvent.INSERT = 1\nSweepLineEvent.DELETE = 2\n","export default class SegmentIntersector {\n constructor() {\n SegmentIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._hasIntersection = false\n this._hasProper = false\n this._hasProperInterior = false\n this._properIntersectionPoint = null\n this._li = null\n this._includeProper = null\n this._recordIsolated = null\n this._isSelfIntersection = null\n this._numIntersections = 0\n this.numTests = 0\n this._bdyNodes = null\n this._isDone = false\n this._isDoneWhenProperInt = false\n const li = arguments[0], includeProper = arguments[1], recordIsolated = arguments[2]\n this._li = li\n this._includeProper = includeProper\n this._recordIsolated = recordIsolated\n }\n static isAdjacentSegments(i1, i2) {\n return Math.abs(i1 - i2) === 1\n }\n isTrivialIntersection(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1) \n if (this._li.getIntersectionNum() === 1) {\n if (SegmentIntersector.isAdjacentSegments(segIndex0, segIndex1)) return true\n if (e0.isClosed()) {\n const maxSegIndex = e0.getNumPoints() - 1\n if (segIndex0 === 0 && segIndex1 === maxSegIndex || segIndex1 === 0 && segIndex0 === maxSegIndex) \n return true\n \n }\n }\n \n return false\n }\n getProperIntersectionPoint() {\n return this._properIntersectionPoint\n }\n setIsDoneIfProperInt(isDoneWhenProperInt) {\n this._isDoneWhenProperInt = isDoneWhenProperInt\n }\n hasProperInteriorIntersection() {\n return this._hasProperInterior\n }\n isBoundaryPointInternal(li, bdyNodes) {\n for (let i = bdyNodes.iterator(); i.hasNext(); ) {\n const node = i.next()\n const pt = node.getCoordinate()\n if (li.isIntersection(pt)) return true\n }\n return false\n }\n hasProperIntersection() {\n return this._hasProper\n }\n hasIntersection() {\n return this._hasIntersection\n }\n isDone() {\n return this._isDone\n }\n isBoundaryPoint(li, bdyNodes) {\n if (bdyNodes === null) return false\n if (this.isBoundaryPointInternal(li, bdyNodes[0])) return true\n if (this.isBoundaryPointInternal(li, bdyNodes[1])) return true\n return false\n }\n setBoundaryNodes(bdyNodes0, bdyNodes1) {\n this._bdyNodes = new Array(2).fill(null)\n this._bdyNodes[0] = bdyNodes0\n this._bdyNodes[1] = bdyNodes1\n }\n addIntersections(e0, segIndex0, e1, segIndex1) {\n if (e0 === e1 && segIndex0 === segIndex1) return null\n this.numTests++\n const p00 = e0.getCoordinates()[segIndex0]\n const p01 = e0.getCoordinates()[segIndex0 + 1]\n const p10 = e1.getCoordinates()[segIndex1]\n const p11 = e1.getCoordinates()[segIndex1 + 1]\n this._li.computeIntersection(p00, p01, p10, p11)\n if (this._li.hasIntersection()) {\n if (this._recordIsolated) {\n e0.setIsolated(false)\n e1.setIsolated(false)\n }\n this._numIntersections++\n if (!this.isTrivialIntersection(e0, segIndex0, e1, segIndex1)) {\n this._hasIntersection = true\n if (this._includeProper || !this._li.isProper()) {\n e0.addIntersections(this._li, segIndex0, 0)\n e1.addIntersections(this._li, segIndex1, 1)\n }\n if (this._li.isProper()) {\n this._properIntersectionPoint = this._li.getIntersection(0).copy()\n this._hasProper = true\n if (this._isDoneWhenProperInt) \n this._isDone = true\n \n if (!this.isBoundaryPoint(this._li, this._bdyNodes)) this._hasProperInterior = true\n }\n }\n }\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport MonotoneChain from './MonotoneChain.js'\nimport SweepLineEvent from './SweepLineEvent.js'\nimport EdgeSetIntersector from './EdgeSetIntersector.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport SegmentIntersector from './SegmentIntersector.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport List from '../../../../../java/util/List.js'\nexport default class SimpleMCSweepLineIntersector extends EdgeSetIntersector {\n constructor() {\n super()\n SimpleMCSweepLineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.events = new ArrayList()\n this.nOverlaps = null\n }\n prepareEvents() {\n Collections.sort(this.events)\n for (let i = 0; i < this.events.size(); i++) {\n const ev = this.events.get(i)\n if (ev.isDelete()) \n ev.getInsertEvent().setDeleteEventIndex(i)\n \n }\n }\n computeIntersections() {\n if (arguments.length === 1) {\n const si = arguments[0]\n this.nOverlaps = 0\n this.prepareEvents()\n for (let i = 0; i < this.events.size(); i++) {\n const ev = this.events.get(i)\n if (ev.isInsert()) \n this.processOverlaps(i, ev.getDeleteEventIndex(), ev, si)\n \n if (si.isDone()) \n break\n \n }\n } else if (arguments.length === 3) {\n if (arguments[2] instanceof SegmentIntersector && (hasInterface(arguments[0], List) && hasInterface(arguments[1], List))) {\n const edges0 = arguments[0], edges1 = arguments[1], si = arguments[2]\n this.addEdges(edges0, edges0)\n this.addEdges(edges1, edges1)\n this.computeIntersections(si)\n } else if (typeof arguments[2] === 'boolean' && (hasInterface(arguments[0], List) && arguments[1] instanceof SegmentIntersector)) {\n const edges = arguments[0], si = arguments[1], testAllSegments = arguments[2]\n if (testAllSegments) this.addEdges(edges, null); else this.addEdges(edges)\n this.computeIntersections(si)\n }\n }\n }\n addEdge(edge, edgeSet) {\n const mce = edge.getMonotoneChainEdge()\n const startIndex = mce.getStartIndexes()\n for (let i = 0; i < startIndex.length - 1; i++) {\n const mc = new MonotoneChain(mce, i)\n const insertEvent = new SweepLineEvent(edgeSet, mce.getMinX(i), mc)\n this.events.add(insertEvent)\n this.events.add(new SweepLineEvent(mce.getMaxX(i), insertEvent))\n }\n }\n processOverlaps(start, end, ev0, si) {\n const mc0 = ev0.getObject()\n for (let i = start; i < end; i++) {\n const ev1 = this.events.get(i)\n if (ev1.isInsert()) {\n const mc1 = ev1.getObject()\n if (!ev0.isSameLabel(ev1)) {\n mc0.computeIntersections(mc1, si)\n this.nOverlaps++\n }\n }\n }\n }\n addEdges() {\n if (arguments.length === 1) {\n const edges = arguments[0]\n for (let i = edges.iterator(); i.hasNext(); ) {\n const edge = i.next()\n this.addEdge(edge, edge)\n }\n } else if (arguments.length === 2) {\n const edges = arguments[0], edgeSet = arguments[1]\n for (let i = edges.iterator(); i.hasNext(); ) {\n const edge = i.next()\n this.addEdge(edge, edgeSet)\n }\n }\n }\n}\n","export default class EdgeSetIntersector {}\n","import WKTWriter from '../../io/WKTWriter.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport Comparator from '../../../../../java/util/Comparator.js'\nexport default class IntervalRTreeNode {\n constructor() {\n IntervalRTreeNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._min = Double.POSITIVE_INFINITY\n this._max = Double.NEGATIVE_INFINITY\n }\n getMin() {\n return this._min\n }\n intersects(queryMin, queryMax) {\n if (this._min > queryMax || this._max < queryMin) return false\n return true\n }\n getMax() {\n return this._max\n }\n toString() {\n return WKTWriter.toLineString(new Coordinate(this._min, 0), new Coordinate(this._max, 0))\n }\n}\nclass NodeComparator {\n compare(o1, o2) {\n const n1 = o1\n const n2 = o2\n const mid1 = (n1._min + n1._max) / 2\n const mid2 = (n2._min + n2._max) / 2\n if (mid1 < mid2) return -1\n if (mid1 > mid2) return 1\n return 0\n }\n get interfaces_() {\n return [Comparator]\n }\n}\nIntervalRTreeNode.NodeComparator = NodeComparator\n","import IntervalRTreeNode from './IntervalRTreeNode.js'\nexport default class IntervalRTreeLeafNode extends IntervalRTreeNode {\n constructor() {\n super()\n IntervalRTreeLeafNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._item = null\n const min = arguments[0], max = arguments[1], item = arguments[2]\n this._min = min\n this._max = max\n this._item = item\n }\n query(queryMin, queryMax, visitor) {\n if (!this.intersects(queryMin, queryMax)) return null\n visitor.visitItem(this._item)\n }\n}\n","import IntervalRTreeNode from './IntervalRTreeNode.js'\nexport default class IntervalRTreeBranchNode extends IntervalRTreeNode {\n constructor() {\n super()\n IntervalRTreeBranchNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._node1 = null\n this._node2 = null\n const n1 = arguments[0], n2 = arguments[1]\n this._node1 = n1\n this._node2 = n2\n this.buildExtent(this._node1, this._node2)\n }\n buildExtent(n1, n2) {\n this._min = Math.min(n1._min, n2._min)\n this._max = Math.max(n1._max, n2._max)\n }\n query(queryMin, queryMax, visitor) {\n if (!this.intersects(queryMin, queryMax)) \n return null\n \n if (this._node1 !== null) this._node1.query(queryMin, queryMax, visitor)\n if (this._node2 !== null) this._node2.query(queryMin, queryMax, visitor)\n }\n}\n","import WKTWriter from '../../io/WKTWriter.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport IntervalRTreeLeafNode from './IntervalRTreeLeafNode.js'\nimport IntervalRTreeNode from './IntervalRTreeNode.js'\nimport Collections from '../../../../../java/util/Collections.js'\nimport System from '../../../../../java/lang/System.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport IntervalRTreeBranchNode from './IntervalRTreeBranchNode.js'\nexport default class SortedPackedIntervalRTree {\n constructor() {\n SortedPackedIntervalRTree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._leaves = new ArrayList()\n this._root = null\n this._level = 0\n }\n buildTree() {\n Collections.sort(this._leaves, new IntervalRTreeNode.NodeComparator())\n let src = this._leaves\n let temp = null\n let dest = new ArrayList()\n while (true) {\n this.buildLevel(src, dest)\n if (dest.size() === 1) return dest.get(0)\n temp = src\n src = dest\n dest = temp\n }\n }\n insert(min, max, item) {\n if (this._root !== null) throw new IllegalStateException('Index cannot be added to once it has been queried')\n this._leaves.add(new IntervalRTreeLeafNode(min, max, item))\n }\n query(min, max, visitor) {\n this.init()\n if (this._root === null) return null\n this._root.query(min, max, visitor)\n }\n buildRoot() {\n if (this._root !== null) return null\n this._root = this.buildTree()\n }\n printNode(node) {\n System.out.println(WKTWriter.toLineString(new Coordinate(node._min, this._level), new Coordinate(node._max, this._level)))\n }\n init() {\n if (this._root !== null) return null\n if (this._leaves.size() === 0) return null\n this.buildRoot()\n }\n buildLevel(src, dest) {\n this._level++\n dest.clear()\n for (let i = 0; i < src.size(); i += 2) {\n const n1 = src.get(i)\n const n2 = i + 1 < src.size() ? src.get(i) : null\n if (n2 === null) {\n dest.add(n1)\n } else {\n const node = new IntervalRTreeBranchNode(src.get(i), src.get(i + 1))\n dest.add(node)\n }\n }\n }\n}\n","import LineString from '../LineString.js'\nimport Geometry from '../Geometry.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Collection from '../../../../../java/util/Collection.js'\nimport LinearRing from '../LinearRing.js'\nimport GeometryComponentFilter from '../GeometryComponentFilter.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class LinearComponentExtracter {\n constructor() {\n LinearComponentExtracter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._lines = null\n this._isForcedToLineString = false\n if (arguments.length === 1) {\n const lines = arguments[0]\n this._lines = lines\n } else if (arguments.length === 2) {\n const lines = arguments[0], isForcedToLineString = arguments[1]\n this._lines = lines\n this._isForcedToLineString = isForcedToLineString\n }\n }\n static getGeometry() {\n if (arguments.length === 1) {\n const geom = arguments[0]\n return geom.getFactory().buildGeometry(LinearComponentExtracter.getLines(geom))\n } else if (arguments.length === 2) {\n const geom = arguments[0], forceToLineString = arguments[1]\n return geom.getFactory().buildGeometry(LinearComponentExtracter.getLines(geom, forceToLineString))\n }\n }\n static getLines() {\n if (arguments.length === 1) {\n const geom = arguments[0]\n return LinearComponentExtracter.getLines(geom, false)\n } else if (arguments.length === 2) {\n if (hasInterface(arguments[0], Collection) && hasInterface(arguments[1], Collection)) {\n const geoms = arguments[0], lines = arguments[1]\n for (let i = geoms.iterator(); i.hasNext(); ) {\n const g = i.next()\n LinearComponentExtracter.getLines(g, lines)\n }\n return lines\n } else if (arguments[0] instanceof Geometry && typeof arguments[1] === 'boolean') {\n const geom = arguments[0], forceToLineString = arguments[1]\n const lines = new ArrayList()\n geom.apply(new LinearComponentExtracter(lines, forceToLineString))\n return lines\n } else if (arguments[0] instanceof Geometry && hasInterface(arguments[1], Collection)) {\n const geom = arguments[0], lines = arguments[1]\n if (geom instanceof LineString) \n lines.add(geom)\n else \n geom.apply(new LinearComponentExtracter(lines))\n \n return lines\n }\n } else if (arguments.length === 3) {\n if (typeof arguments[2] === 'boolean' && (hasInterface(arguments[0], Collection) && hasInterface(arguments[1], Collection))) {\n const geoms = arguments[0], lines = arguments[1], forceToLineString = arguments[2]\n for (let i = geoms.iterator(); i.hasNext(); ) {\n const g = i.next()\n LinearComponentExtracter.getLines(g, lines, forceToLineString)\n }\n return lines\n } else if (typeof arguments[2] === 'boolean' && (arguments[0] instanceof Geometry && hasInterface(arguments[1], Collection))) {\n const geom = arguments[0], lines = arguments[1], forceToLineString = arguments[2]\n geom.apply(new LinearComponentExtracter(lines, forceToLineString))\n return lines\n }\n }\n }\n filter(geom) {\n if (this._isForcedToLineString && geom instanceof LinearRing) {\n const line = geom.getFactory().createLineString(geom.getCoordinateSequence())\n this._lines.add(line)\n return null\n }\n if (geom instanceof LineString) this._lines.add(geom)\n }\n setForceToLineString(isForcedToLineString) {\n this._isForcedToLineString = isForcedToLineString\n }\n get interfaces_() {\n return [GeometryComponentFilter]\n }\n}\n","import ItemVisitor from './ItemVisitor.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class ArrayListVisitor {\n constructor() {\n ArrayListVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._items = new ArrayList()\n }\n visitItem(item) {\n this._items.add(item)\n }\n getItems() {\n return this._items\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\n","import hasInterface from '../../../../../hasInterface.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport ItemVisitor from '../../index/ItemVisitor.js'\nimport PointOnGeometryLocator from './PointOnGeometryLocator.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport SortedPackedIntervalRTree from '../../index/intervalrtree/SortedPackedIntervalRTree.js'\nimport LineSegment from '../../geom/LineSegment.js'\nimport Polygonal from '../../geom/Polygonal.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport LinearComponentExtracter from '../../geom/util/LinearComponentExtracter.js'\nimport ArrayListVisitor from '../../index/ArrayListVisitor.js'\nimport RayCrossingCounter from '../RayCrossingCounter.js'\nexport default class IndexedPointInAreaLocator {\n constructor() {\n IndexedPointInAreaLocator.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geom = null\n this._index = null\n const g = arguments[0]\n if (!(hasInterface(g, Polygonal) || g instanceof LinearRing)) throw new IllegalArgumentException('Argument must be Polygonal or LinearRing')\n this._geom = g\n }\n locate(p) {\n if (this._index === null) {\n this._index = new IntervalIndexedGeometry(this._geom)\n this._geom = null\n }\n const rcc = new RayCrossingCounter(p)\n const visitor = new SegmentVisitor(rcc)\n this._index.query(p.y, p.y, visitor)\n return rcc.getLocation()\n }\n get interfaces_() {\n return [PointOnGeometryLocator]\n }\n}\nclass SegmentVisitor {\n constructor() {\n SegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._counter = null\n const counter = arguments[0]\n this._counter = counter\n }\n visitItem(item) {\n const seg = item\n this._counter.countSegment(seg.getCoordinate(0), seg.getCoordinate(1))\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\nclass IntervalIndexedGeometry {\n constructor() {\n IntervalIndexedGeometry.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isEmpty = false\n this._index = new SortedPackedIntervalRTree()\n const geom = arguments[0]\n if (geom.isEmpty()) this._isEmpty = true; else this.init(geom)\n }\n init(geom) {\n const lines = LinearComponentExtracter.getLines(geom)\n for (let i = lines.iterator(); i.hasNext(); ) {\n const line = i.next()\n const pts = line.getCoordinates()\n this.addLine(pts)\n }\n }\n addLine(pts) {\n for (let i = 1; i < pts.length; i++) {\n const seg = new LineSegment(pts[i - 1], pts[i])\n const min = Math.min(seg.p0.y, seg.p1.y)\n const max = Math.max(seg.p0.y, seg.p1.y)\n this._index.insert(min, max, seg)\n }\n }\n query() {\n if (arguments.length === 2) {\n const min = arguments[0], max = arguments[1]\n if (this._isEmpty) return new ArrayList()\n const visitor = new ArrayListVisitor()\n this._index.query(min, max, visitor)\n return visitor.getItems()\n } else if (arguments.length === 3) {\n const min = arguments[0], max = arguments[1], visitor = arguments[2]\n if (this._isEmpty) return null\n this._index.query(min, max, visitor)\n }\n }\n}\nIndexedPointInAreaLocator.SegmentVisitor = SegmentVisitor\nIndexedPointInAreaLocator.IntervalIndexedGeometry = IntervalIndexedGeometry\n","import PointLocator from '../algorithm/PointLocator.js'\nimport Location from '../geom/Location.js'\nimport LineString from '../geom/LineString.js'\nimport HashMap from '../../../../java/util/HashMap.js'\nimport Geometry from '../geom/Geometry.js'\nimport hasInterface from '../../../../hasInterface.js'\nimport Position from './Position.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport Point from '../geom/Point.js'\nimport Polygon from '../geom/Polygon.js'\nimport MultiPoint from '../geom/MultiPoint.js'\nimport SimpleMCSweepLineIntersector from './index/SimpleMCSweepLineIntersector.js'\nimport LinearRing from '../geom/LinearRing.js'\nimport BoundaryNodeRule from '../algorithm/BoundaryNodeRule.js'\nimport Orientation from '../algorithm/Orientation.js'\nimport SegmentIntersector from './index/SegmentIntersector.js'\nimport MultiPolygon from '../geom/MultiPolygon.js'\nimport Label from './Label.js'\nimport GeometryCollection from '../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException.js'\nimport CoordinateArrays from '../geom/CoordinateArrays.js'\nimport Polygonal from '../geom/Polygonal.js'\nimport IndexedPointInAreaLocator from '../algorithm/locate/IndexedPointInAreaLocator.js'\nimport Assert from '../util/Assert.js'\nimport Edge from './Edge.js'\nimport MultiLineString from '../geom/MultiLineString.js'\nimport PlanarGraph from './PlanarGraph.js'\nexport default class GeometryGraph extends PlanarGraph {\n constructor() {\n super()\n GeometryGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentGeom = null\n this._lineEdgeMap = new HashMap()\n this._boundaryNodeRule = null\n this._useBoundaryDeterminationRule = true\n this._argIndex = null\n this._boundaryNodes = null\n this._hasTooFewPoints = false\n this._invalidPoint = null\n this._areaPtLocator = null\n this._ptLocator = new PointLocator()\n if (arguments.length === 2) {\n const argIndex = arguments[0], parentGeom = arguments[1]\n GeometryGraph.constructor_.call(this, argIndex, parentGeom, BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE)\n } else if (arguments.length === 3) {\n const argIndex = arguments[0], parentGeom = arguments[1], boundaryNodeRule = arguments[2]\n this._argIndex = argIndex\n this._parentGeom = parentGeom\n this._boundaryNodeRule = boundaryNodeRule\n if (parentGeom !== null) \n this.add(parentGeom)\n \n }\n }\n static determineBoundary(boundaryNodeRule, boundaryCount) {\n return boundaryNodeRule.isInBoundary(boundaryCount) ? Location.BOUNDARY : Location.INTERIOR\n }\n insertBoundaryPoint(argIndex, coord) {\n const n = this._nodes.addNode(coord)\n const lbl = n.getLabel()\n let boundaryCount = 1\n let loc = Location.NONE\n loc = lbl.getLocation(argIndex, Position.ON)\n if (loc === Location.BOUNDARY) boundaryCount++\n const newLoc = GeometryGraph.determineBoundary(this._boundaryNodeRule, boundaryCount)\n lbl.setLocation(argIndex, newLoc)\n }\n computeSelfNodes() {\n if (arguments.length === 2) {\n const li = arguments[0], computeRingSelfNodes = arguments[1]\n return this.computeSelfNodes(li, computeRingSelfNodes, false)\n } else if (arguments.length === 3) {\n const li = arguments[0], computeRingSelfNodes = arguments[1], isDoneIfProperInt = arguments[2]\n const si = new SegmentIntersector(li, true, false)\n si.setIsDoneIfProperInt(isDoneIfProperInt)\n const esi = this.createEdgeSetIntersector()\n const isRings = this._parentGeom instanceof LinearRing || this._parentGeom instanceof Polygon || this._parentGeom instanceof MultiPolygon\n const computeAllSegments = computeRingSelfNodes || !isRings\n esi.computeIntersections(this._edges, si, computeAllSegments)\n this.addSelfIntersectionNodes(this._argIndex)\n return si\n }\n }\n computeSplitEdges(edgelist) {\n for (let i = this._edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n e.eiList.addSplitEdges(edgelist)\n }\n }\n computeEdgeIntersections(g, li, includeProper) {\n const si = new SegmentIntersector(li, includeProper, true)\n si.setBoundaryNodes(this.getBoundaryNodes(), g.getBoundaryNodes())\n const esi = this.createEdgeSetIntersector()\n esi.computeIntersections(this._edges, g._edges, si)\n return si\n }\n getGeometry() {\n return this._parentGeom\n }\n getBoundaryNodeRule() {\n return this._boundaryNodeRule\n }\n hasTooFewPoints() {\n return this._hasTooFewPoints\n }\n addPoint() {\n if (arguments[0] instanceof Point) {\n const p = arguments[0]\n const coord = p.getCoordinate()\n this.insertPoint(this._argIndex, coord, Location.INTERIOR)\n } else if (arguments[0] instanceof Coordinate) {\n const pt = arguments[0]\n this.insertPoint(this._argIndex, pt, Location.INTERIOR)\n }\n }\n addPolygon(p) {\n this.addPolygonRing(p.getExteriorRing(), Location.EXTERIOR, Location.INTERIOR)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n this.addPolygonRing(hole, Location.INTERIOR, Location.EXTERIOR)\n }\n }\n addEdge(e) {\n this.insertEdge(e)\n const coord = e.getCoordinates()\n this.insertPoint(this._argIndex, coord[0], Location.BOUNDARY)\n this.insertPoint(this._argIndex, coord[coord.length - 1], Location.BOUNDARY)\n }\n addLineString(line) {\n const coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates())\n if (coord.length < 2) {\n this._hasTooFewPoints = true\n this._invalidPoint = coord[0]\n return null\n }\n const e = new Edge(coord, new Label(this._argIndex, Location.INTERIOR))\n this._lineEdgeMap.put(line, e)\n this.insertEdge(e)\n Assert.isTrue(coord.length >= 2, 'found LineString with single point')\n this.insertBoundaryPoint(this._argIndex, coord[0])\n this.insertBoundaryPoint(this._argIndex, coord[coord.length - 1])\n }\n getInvalidPoint() {\n return this._invalidPoint\n }\n getBoundaryPoints() {\n const coll = this.getBoundaryNodes()\n const pts = new Array(coll.size()).fill(null)\n let i = 0\n for (let it = coll.iterator(); it.hasNext(); ) {\n const node = it.next()\n pts[i++] = node.getCoordinate().copy()\n }\n return pts\n }\n getBoundaryNodes() {\n if (this._boundaryNodes === null) this._boundaryNodes = this._nodes.getBoundaryNodes(this._argIndex)\n return this._boundaryNodes\n }\n addSelfIntersectionNode(argIndex, coord, loc) {\n if (this.isBoundaryNode(argIndex, coord)) return null\n if (loc === Location.BOUNDARY && this._useBoundaryDeterminationRule) this.insertBoundaryPoint(argIndex, coord); else this.insertPoint(argIndex, coord, loc)\n }\n addPolygonRing(lr, cwLeft, cwRight) {\n if (lr.isEmpty()) return null\n const coord = CoordinateArrays.removeRepeatedPoints(lr.getCoordinates())\n if (coord.length < 4) {\n this._hasTooFewPoints = true\n this._invalidPoint = coord[0]\n return null\n }\n let left = cwLeft\n let right = cwRight\n if (Orientation.isCCW(coord)) {\n left = cwRight\n right = cwLeft\n }\n const e = new Edge(coord, new Label(this._argIndex, Location.BOUNDARY, left, right))\n this._lineEdgeMap.put(lr, e)\n this.insertEdge(e)\n this.insertPoint(this._argIndex, coord[0], Location.BOUNDARY)\n }\n insertPoint(argIndex, coord, onLocation) {\n const n = this._nodes.addNode(coord)\n const lbl = n.getLabel()\n if (lbl === null) \n n._label = new Label(argIndex, onLocation)\n else lbl.setLocation(argIndex, onLocation)\n }\n createEdgeSetIntersector() {\n return new SimpleMCSweepLineIntersector()\n }\n addSelfIntersectionNodes(argIndex) {\n for (let i = this._edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.eiList.iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n this.addSelfIntersectionNode(argIndex, ei.coord, eLoc)\n }\n }\n }\n add() {\n if (arguments.length === 1 && arguments[0] instanceof Geometry) {\n const g = arguments[0]\n if (g.isEmpty()) return null\n if (g instanceof MultiPolygon) this._useBoundaryDeterminationRule = false\n if (g instanceof Polygon) this.addPolygon(g); else if (g instanceof LineString) this.addLineString(g); else if (g instanceof Point) this.addPoint(g); else if (g instanceof MultiPoint) this.addCollection(g); else if (g instanceof MultiLineString) this.addCollection(g); else if (g instanceof MultiPolygon) this.addCollection(g); else if (g instanceof GeometryCollection) this.addCollection(g); else throw new UnsupportedOperationException(g.getGeometryType())\n } else {\n return super.add.apply(this, arguments)\n }\n }\n addCollection(gc) {\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.add(g)\n }\n }\n locate(pt) {\n if (hasInterface(this._parentGeom, Polygonal) && this._parentGeom.getNumGeometries() > 50) {\n if (this._areaPtLocator === null) \n this._areaPtLocator = new IndexedPointInAreaLocator(this._parentGeom)\n \n return this._areaPtLocator.locate(pt)\n }\n return this._ptLocator.locate(pt, this._parentGeom)\n }\n findEdge() {\n if (arguments.length === 1 && arguments[0] instanceof LineString) {\n const line = arguments[0]\n return this._lineEdgeMap.get(line)\n } else {\n return super.findEdge.apply(this, arguments)\n }\n }\n}\n","import BoundaryNodeRule from '../algorithm/BoundaryNodeRule.js'\nimport GeometryGraph from '../geomgraph/GeometryGraph.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nexport default class GeometryGraphOperation {\n constructor() {\n GeometryGraphOperation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._resultPrecisionModel = null\n this._arg = null\n if (arguments.length === 1) {\n const g0 = arguments[0]\n this.setComputationPrecision(g0.getPrecisionModel())\n this._arg = new Array(1).fill(null)\n this._arg[0] = new GeometryGraph(0, g0)\n \n } else if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1, BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE)\n } else if (arguments.length === 3) {\n const g0 = arguments[0], g1 = arguments[1], boundaryNodeRule = arguments[2]\n if (g0.getPrecisionModel().compareTo(g1.getPrecisionModel()) >= 0) this.setComputationPrecision(g0.getPrecisionModel()); else this.setComputationPrecision(g1.getPrecisionModel())\n this._arg = new Array(2).fill(null)\n this._arg[0] = new GeometryGraph(0, g0, boundaryNodeRule)\n this._arg[1] = new GeometryGraph(1, g1, boundaryNodeRule)\n }\n }\n getArgGeometry(i) {\n return this._arg[i].getGeometry()\n }\n setComputationPrecision(pm) {\n this._resultPrecisionModel = pm\n this._li.setPrecisionModel(this._resultPrecisionModel)\n }\n}\n","import PointLocator from '../../algorithm/PointLocator.js'\nimport Location from '../../geom/Location.js'\nimport EdgeNodingValidator from '../../geomgraph/EdgeNodingValidator.js'\nimport GeometryCollectionMapper from '../../geom/util/GeometryCollectionMapper.js'\nimport PolygonBuilder from './PolygonBuilder.js'\nimport Position from '../../geomgraph/Position.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport LineBuilder from './LineBuilder.js'\nimport PointBuilder from './PointBuilder.js'\nimport SnapIfNeededOverlayOp from './snap/SnapIfNeededOverlayOp.js'\nimport Label from '../../geomgraph/Label.js'\nimport OverlayNodeFactory from './OverlayNodeFactory.js'\nimport GeometryGraphOperation from '../GeometryGraphOperation.js'\nimport EdgeList from '../../geomgraph/EdgeList.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class OverlayOp extends GeometryGraphOperation {\n constructor() {\n super()\n OverlayOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._ptLocator = new PointLocator()\n this._geomFact = null\n this._resultGeom = null\n this._graph = null\n this._edgeList = new EdgeList()\n this._resultPolyList = new ArrayList()\n this._resultLineList = new ArrayList()\n this._resultPointList = new ArrayList()\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1)\n this._graph = new PlanarGraph(new OverlayNodeFactory())\n this._geomFact = g0.getFactory()\n }\n static overlayOp(geom0, geom1, opCode) {\n const gov = new OverlayOp(geom0, geom1)\n const geomOv = gov.getResultGeometry(opCode)\n return geomOv\n }\n static union(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) {\n if (geom.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.UNION, geom, other, geom.getFactory())\n if (geom.isEmpty()) return other.copy()\n if (other.isEmpty()) return geom.copy()\n }\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.UNION)\n }\n static intersection(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.INTERSECTION, geom, other, geom.getFactory())\n if (geom.isGeometryCollection()) {\n const g2 = other\n return GeometryCollectionMapper.map(geom, new (class {\n get interfaces_() {\n return [MapOp]\n }\n map(g) {\n return OverlayOp.intersection(g, g2)\n }\n })())\n }\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.INTERSECTION)\n }\n static symDifference(geom, other) {\n if (geom.isEmpty() || other.isEmpty()) {\n if (geom.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.SYMDIFFERENCE, geom, other, geom.getFactory())\n if (geom.isEmpty()) return other.copy()\n if (other.isEmpty()) return geom.copy()\n }\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.SYMDIFFERENCE)\n }\n static resultDimension(opCode, g0, g1) {\n const dim0 = g0.getDimension()\n const dim1 = g1.getDimension()\n let resultDimension = -1\n switch (opCode) {\n case OverlayOp.INTERSECTION:\n resultDimension = Math.min(dim0, dim1)\n break\n case OverlayOp.UNION:\n resultDimension = Math.max(dim0, dim1)\n break\n case OverlayOp.DIFFERENCE:\n resultDimension = dim0\n break\n case OverlayOp.SYMDIFFERENCE:\n resultDimension = Math.max(dim0, dim1)\n break\n }\n return resultDimension\n }\n static createEmptyResult(overlayOpCode, a, b, geomFact) {\n let result = null\n const resultDim = OverlayOp.resultDimension(overlayOpCode, a, b)\n return result = geomFact.createEmpty(resultDim)\n }\n static difference(geom, other) {\n if (geom.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.DIFFERENCE, geom, other, geom.getFactory())\n if (other.isEmpty()) return geom.copy()\n if (geom.isGeometryCollection() || other.isGeometryCollection()) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n return SnapIfNeededOverlayOp.overlayOp(geom, other, OverlayOp.DIFFERENCE)\n }\n static isResultOfOp() {\n if (arguments.length === 2) {\n const label = arguments[0], opCode = arguments[1]\n const loc0 = label.getLocation(0)\n const loc1 = label.getLocation(1)\n return OverlayOp.isResultOfOp(loc0, loc1, opCode)\n } else if (arguments.length === 3) {\n let loc0 = arguments[0], loc1 = arguments[1], overlayOpCode = arguments[2]\n if (loc0 === Location.BOUNDARY) loc0 = Location.INTERIOR\n if (loc1 === Location.BOUNDARY) loc1 = Location.INTERIOR\n switch (overlayOpCode) {\n case OverlayOp.INTERSECTION:\n return loc0 === Location.INTERIOR && loc1 === Location.INTERIOR\n case OverlayOp.UNION:\n return loc0 === Location.INTERIOR || loc1 === Location.INTERIOR\n case OverlayOp.DIFFERENCE:\n return loc0 === Location.INTERIOR && loc1 !== Location.INTERIOR\n case OverlayOp.SYMDIFFERENCE:\n return loc0 === Location.INTERIOR && loc1 !== Location.INTERIOR || loc0 !== Location.INTERIOR && loc1 === Location.INTERIOR\n }\n return false\n }\n }\n insertUniqueEdge(e) {\n const existingEdge = this._edgeList.findEqualEdge(e)\n if (existingEdge !== null) {\n const existingLabel = existingEdge.getLabel()\n let labelToMerge = e.getLabel()\n if (!existingEdge.isPointwiseEqual(e)) {\n labelToMerge = new Label(e.getLabel())\n labelToMerge.flip()\n }\n const depth = existingEdge.getDepth()\n if (depth.isNull()) \n depth.add(existingLabel)\n \n depth.add(labelToMerge)\n existingLabel.merge(labelToMerge)\n } else {\n this._edgeList.add(e)\n }\n }\n getGraph() {\n return this._graph\n }\n cancelDuplicateResultEdges() {\n for (let it = this._graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const sym = de.getSym()\n if (de.isInResult() && sym.isInResult()) {\n de.setInResult(false)\n sym.setInResult(false)\n }\n }\n }\n isCoveredByLA(coord) {\n if (this.isCovered(coord, this._resultLineList)) return true\n if (this.isCovered(coord, this._resultPolyList)) return true\n return false\n }\n computeGeometry(resultPointList, resultLineList, resultPolyList, opcode) {\n const geomList = new ArrayList()\n geomList.addAll(resultPointList)\n geomList.addAll(resultLineList)\n geomList.addAll(resultPolyList)\n if (geomList.isEmpty()) return OverlayOp.createEmptyResult(opcode, this._arg[0].getGeometry(), this._arg[1].getGeometry(), this._geomFact)\n return this._geomFact.buildGeometry(geomList)\n }\n mergeSymLabels() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().mergeSymLabels()\n }\n }\n isCovered(coord, geomList) {\n for (let it = geomList.iterator(); it.hasNext(); ) {\n const geom = it.next()\n const loc = this._ptLocator.locate(coord, geom)\n if (loc !== Location.EXTERIOR) return true\n }\n return false\n }\n replaceCollapsedEdges() {\n const newEdges = new ArrayList()\n for (let it = this._edgeList.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.isCollapsed()) {\n it.remove()\n newEdges.add(e.getCollapsedEdge())\n }\n }\n this._edgeList.addAll(newEdges)\n }\n updateNodeLabelling() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n const lbl = node.getEdges().getLabel()\n node.getLabel().merge(lbl)\n }\n }\n getResultGeometry(overlayOpCode) {\n this.computeOverlay(overlayOpCode)\n return this._resultGeom\n }\n insertUniqueEdges(edges) {\n for (let i = edges.iterator(); i.hasNext(); ) {\n const e = i.next()\n this.insertUniqueEdge(e)\n }\n }\n computeOverlay(opCode) {\n this.copyPoints(0)\n this.copyPoints(1)\n this._arg[0].computeSelfNodes(this._li, false)\n this._arg[1].computeSelfNodes(this._li, false)\n this._arg[0].computeEdgeIntersections(this._arg[1], this._li, true)\n const baseSplitEdges = new ArrayList()\n this._arg[0].computeSplitEdges(baseSplitEdges)\n this._arg[1].computeSplitEdges(baseSplitEdges)\n const splitEdges = baseSplitEdges\n this.insertUniqueEdges(baseSplitEdges)\n this.computeLabelsFromDepths()\n this.replaceCollapsedEdges()\n EdgeNodingValidator.checkValid(this._edgeList.getEdges())\n this._graph.addEdges(this._edgeList.getEdges())\n this.computeLabelling()\n this.labelIncompleteNodes()\n this.findResultAreaEdges(opCode)\n this.cancelDuplicateResultEdges()\n const polyBuilder = new PolygonBuilder(this._geomFact)\n polyBuilder.add(this._graph)\n this._resultPolyList = polyBuilder.getPolygons()\n const lineBuilder = new LineBuilder(this, this._geomFact, this._ptLocator)\n this._resultLineList = lineBuilder.build(opCode)\n const pointBuilder = new PointBuilder(this, this._geomFact, this._ptLocator)\n this._resultPointList = pointBuilder.build(opCode)\n this._resultGeom = this.computeGeometry(this._resultPointList, this._resultLineList, this._resultPolyList, opCode)\n }\n labelIncompleteNode(n, targetIndex) {\n const loc = this._ptLocator.locate(n.getCoordinate(), this._arg[targetIndex].getGeometry())\n n.getLabel().setLocation(targetIndex, loc)\n }\n copyPoints(argIndex) {\n for (let i = this._arg[argIndex].getNodeIterator(); i.hasNext(); ) {\n const graphNode = i.next()\n const newNode = this._graph.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n findResultAreaEdges(opCode) {\n for (let it = this._graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n const label = de.getLabel()\n if (label.isArea() && !de.isInteriorAreaEdge() && OverlayOp.isResultOfOp(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), opCode)) \n de.setInResult(true)\n \n }\n }\n computeLabelsFromDepths() {\n for (let it = this._edgeList.iterator(); it.hasNext(); ) {\n const e = it.next()\n const lbl = e.getLabel()\n const depth = e.getDepth()\n if (!depth.isNull()) {\n depth.normalize()\n for (let i = 0; i < 2; i++) \n if (!lbl.isNull(i) && lbl.isArea() && !depth.isNull(i)) \n if (depth.getDelta(i) === 0) {\n lbl.toLine(i)\n } else {\n Assert.isTrue(!depth.isNull(i, Position.LEFT), 'depth of LEFT side has not been initialized')\n lbl.setLocation(i, Position.LEFT, depth.getLocation(i, Position.LEFT))\n Assert.isTrue(!depth.isNull(i, Position.RIGHT), 'depth of RIGHT side has not been initialized')\n lbl.setLocation(i, Position.RIGHT, depth.getLocation(i, Position.RIGHT))\n }\n \n \n }\n }\n }\n computeLabelling() {\n for (let nodeit = this._graph.getNodes().iterator(); nodeit.hasNext(); ) {\n const node = nodeit.next()\n node.getEdges().computeLabelling(this._arg)\n }\n this.mergeSymLabels()\n this.updateNodeLabelling()\n }\n labelIncompleteNodes() {\n for (let ni = this._graph.getNodes().iterator(); ni.hasNext(); ) {\n const n = ni.next()\n const label = n.getLabel()\n if (n.isIsolated()) \n if (label.isNull(0)) this.labelIncompleteNode(n, 0); else this.labelIncompleteNode(n, 1)\n \n n.getEdges().updateLabelling(label)\n }\n }\n isCoveredByA(coord) {\n if (this.isCovered(coord, this._resultPolyList)) return true\n return false\n }\n}\nOverlayOp.INTERSECTION = 1\nOverlayOp.UNION = 2\nOverlayOp.DIFFERENCE = 3\nOverlayOp.SYMDIFFERENCE = 4\n","import EdgeEnd from '../../geomgraph/EdgeEnd.js'\nimport Label from '../../geomgraph/Label.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nexport default class EdgeEndBuilder {\n createEdgeEndForNext(edge, l, eiCurr, eiNext) {\n const iNext = eiCurr.segmentIndex + 1\n if (iNext >= edge.getNumPoints() && eiNext === null) return null\n let pNext = edge.getCoordinate(iNext)\n if (eiNext !== null && eiNext.segmentIndex === eiCurr.segmentIndex) pNext = eiNext.coord\n const e = new EdgeEnd(edge, eiCurr.coord, pNext, new Label(edge.getLabel()))\n l.add(e)\n }\n createEdgeEndForPrev(edge, l, eiCurr, eiPrev) {\n let iPrev = eiCurr.segmentIndex\n if (eiCurr.dist === 0.0) {\n if (iPrev === 0) return null\n iPrev--\n }\n let pPrev = edge.getCoordinate(iPrev)\n if (eiPrev !== null && eiPrev.segmentIndex >= iPrev) pPrev = eiPrev.coord\n const label = new Label(edge.getLabel())\n label.flip()\n const e = new EdgeEnd(edge, eiCurr.coord, pPrev, label)\n l.add(e)\n }\n computeEdgeEnds() {\n if (arguments.length === 1) {\n const edges = arguments[0]\n const l = new ArrayList()\n for (let i = edges; i.hasNext(); ) {\n const e = i.next()\n this.computeEdgeEnds(e, l)\n }\n return l\n } else if (arguments.length === 2) {\n const edge = arguments[0], l = arguments[1]\n const eiList = edge.getEdgeIntersectionList()\n eiList.addEndpoints()\n const it = eiList.iterator()\n let eiPrev = null\n let eiCurr = null\n if (!it.hasNext()) return null\n let eiNext = it.next()\n do {\n eiPrev = eiCurr\n eiCurr = eiNext\n eiNext = null\n if (it.hasNext()) eiNext = it.next()\n if (eiCurr !== null) {\n this.createEdgeEndForPrev(edge, l, eiCurr, eiPrev)\n this.createEdgeEndForNext(edge, l, eiCurr, eiNext)\n }\n } while (eiCurr !== null)\n }\n }\n}\n","import Location from '../../geom/Location.js'\nimport EdgeEnd from '../../geomgraph/EdgeEnd.js'\nimport Position from '../../geomgraph/Position.js'\nimport GeometryGraph from '../../geomgraph/GeometryGraph.js'\nimport Label from '../../geomgraph/Label.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Edge from '../../geomgraph/Edge.js'\nexport default class EdgeEndBundle extends EdgeEnd {\n constructor() {\n super()\n EdgeEndBundle.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._edgeEnds = new ArrayList()\n if (arguments.length === 1) {\n const e = arguments[0]\n EdgeEndBundle.constructor_.call(this, null, e)\n } else if (arguments.length === 2) {\n const boundaryNodeRule = arguments[0], e = arguments[1]\n EdgeEnd.constructor_.call(this, e.getEdge(), e.getCoordinate(), e.getDirectedCoordinate(), new Label(e.getLabel()))\n this.insert(e)\n }\n }\n insert(e) {\n this._edgeEnds.add(e)\n }\n print(out) {\n out.println('EdgeEndBundle--> Label: ' + this._label)\n for (let it = this.iterator(); it.hasNext(); ) {\n const ee = it.next()\n ee.print(out)\n out.println()\n }\n }\n iterator() {\n return this._edgeEnds.iterator()\n }\n getEdgeEnds() {\n return this._edgeEnds\n }\n computeLabelOn(geomIndex, boundaryNodeRule) {\n let boundaryCount = 0\n let foundInterior = false\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n const loc = e.getLabel().getLocation(geomIndex)\n if (loc === Location.BOUNDARY) boundaryCount++\n if (loc === Location.INTERIOR) foundInterior = true\n }\n let loc = Location.NONE\n if (foundInterior) loc = Location.INTERIOR\n if (boundaryCount > 0) \n loc = GeometryGraph.determineBoundary(boundaryNodeRule, boundaryCount)\n \n this._label.setLocation(geomIndex, loc)\n }\n computeLabelSide(geomIndex, side) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.getLabel().isArea()) {\n const loc = e.getLabel().getLocation(geomIndex, side)\n if (loc === Location.INTERIOR) {\n this._label.setLocation(geomIndex, side, Location.INTERIOR)\n return null\n } else if (loc === Location.EXTERIOR) {\n this._label.setLocation(geomIndex, side, Location.EXTERIOR)\n }\n }\n }\n }\n getLabel() {\n return this._label\n }\n computeLabelSides(geomIndex) {\n this.computeLabelSide(geomIndex, Position.LEFT)\n this.computeLabelSide(geomIndex, Position.RIGHT)\n }\n updateIM(im) {\n Edge.updateIM(this._label, im)\n }\n computeLabel(boundaryNodeRule) {\n let isArea = false\n for (let it = this.iterator(); it.hasNext(); ) {\n const e = it.next()\n if (e.getLabel().isArea()) isArea = true\n }\n if (isArea) this._label = new Label(Location.NONE, Location.NONE, Location.NONE); else this._label = new Label(Location.NONE)\n for (let i = 0; i < 2; i++) {\n this.computeLabelOn(i, boundaryNodeRule)\n if (isArea) this.computeLabelSides(i)\n }\n }\n}\n","import EdgeEndStar from '../../geomgraph/EdgeEndStar.js'\nimport EdgeEndBundle from './EdgeEndBundle.js'\nexport default class EdgeEndBundleStar extends EdgeEndStar {\n constructor() {\n super()\n }\n updateIM(im) {\n for (let it = this.iterator(); it.hasNext(); ) {\n const esb = it.next()\n esb.updateIM(im)\n }\n }\n insert(e) {\n let eb = this._edgeMap.get(e)\n if (eb === null) {\n eb = new EdgeEndBundle(e)\n this.insertEdgeEnd(e, eb)\n } else {\n eb.insert(e)\n }\n }\n}\n","import Node from '../../geomgraph/Node.js'\nexport default class RelateNode extends Node {\n constructor() {\n super()\n RelateNode.constructor_.apply(this, arguments)\n }\n static constructor_() {\n const coord = arguments[0], edges = arguments[1]\n Node.constructor_.call(this, coord, edges)\n }\n updateIMFromEdges(im) {\n this._edges.updateIM(im)\n }\n computeIM(im) {\n im.setAtLeastIfValid(this._label.getLocation(0), this._label.getLocation(1), 0)\n }\n}\n","import EdgeEndBundleStar from './EdgeEndBundleStar.js'\nimport RelateNode from './RelateNode.js'\nimport NodeFactory from '../../geomgraph/NodeFactory.js'\nexport default class RelateNodeFactory extends NodeFactory {\n constructor() {\n super()\n }\n createNode(coord) {\n return new RelateNode(coord, new EdgeEndBundleStar())\n }\n}\n","import PointLocator from '../../algorithm/PointLocator.js'\nimport Location from '../../geom/Location.js'\nimport IntersectionMatrix from '../../geom/IntersectionMatrix.js'\nimport EdgeEndBuilder from './EdgeEndBuilder.js'\nimport NodeMap from '../../geomgraph/NodeMap.js'\nimport RelateNodeFactory from './RelateNodeFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport Assert from '../../util/Assert.js'\nexport default class RelateComputer {\n constructor() {\n RelateComputer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._ptLocator = new PointLocator()\n this._arg = null\n this._nodes = new NodeMap(new RelateNodeFactory())\n this._im = null\n this._isolatedEdges = new ArrayList()\n this._invalidPoint = null\n const arg = arguments[0]\n this._arg = arg\n }\n insertEdgeEnds(ee) {\n for (let i = ee.iterator(); i.hasNext(); ) {\n const e = i.next()\n this._nodes.add(e)\n }\n }\n computeProperIntersectionIM(intersector, im) {\n const dimA = this._arg[0].getGeometry().getDimension()\n const dimB = this._arg[1].getGeometry().getDimension()\n const hasProper = intersector.hasProperIntersection()\n const hasProperInterior = intersector.hasProperInteriorIntersection()\n if (dimA === 2 && dimB === 2) {\n if (hasProper) im.setAtLeast('212101212')\n } else if (dimA === 2 && dimB === 1) {\n if (hasProper) im.setAtLeast('FFF0FFFF2')\n if (hasProperInterior) im.setAtLeast('1FFFFF1FF')\n } else if (dimA === 1 && dimB === 2) {\n if (hasProper) im.setAtLeast('F0FFFFFF2')\n if (hasProperInterior) im.setAtLeast('1F1FFFFFF')\n } else if (dimA === 1 && dimB === 1) {\n if (hasProperInterior) im.setAtLeast('0FFFFFFFF')\n }\n }\n labelIsolatedEdges(thisIndex, targetIndex) {\n for (let ei = this._arg[thisIndex].getEdgeIterator(); ei.hasNext(); ) {\n const e = ei.next()\n if (e.isIsolated()) {\n this.labelIsolatedEdge(e, targetIndex, this._arg[targetIndex].getGeometry())\n this._isolatedEdges.add(e)\n }\n }\n }\n labelIsolatedEdge(e, targetIndex, target) {\n if (target.getDimension() > 0) {\n const loc = this._ptLocator.locate(e.getCoordinate(), target)\n e.getLabel().setAllLocations(targetIndex, loc)\n } else {\n e.getLabel().setAllLocations(targetIndex, Location.EXTERIOR)\n }\n }\n computeIM() {\n const im = new IntersectionMatrix()\n im.set(Location.EXTERIOR, Location.EXTERIOR, 2)\n if (!this._arg[0].getGeometry().getEnvelopeInternal().intersects(this._arg[1].getGeometry().getEnvelopeInternal())) {\n this.computeDisjointIM(im)\n return im\n }\n this._arg[0].computeSelfNodes(this._li, false)\n this._arg[1].computeSelfNodes(this._li, false)\n const intersector = this._arg[0].computeEdgeIntersections(this._arg[1], this._li, false)\n this.computeIntersectionNodes(0)\n this.computeIntersectionNodes(1)\n this.copyNodesAndLabels(0)\n this.copyNodesAndLabels(1)\n this.labelIsolatedNodes()\n this.computeProperIntersectionIM(intersector, im)\n const eeBuilder = new EdgeEndBuilder()\n const ee0 = eeBuilder.computeEdgeEnds(this._arg[0].getEdgeIterator())\n this.insertEdgeEnds(ee0)\n const ee1 = eeBuilder.computeEdgeEnds(this._arg[1].getEdgeIterator())\n this.insertEdgeEnds(ee1)\n this.labelNodeEdges()\n this.labelIsolatedEdges(0, 1)\n this.labelIsolatedEdges(1, 0)\n this.updateIM(im)\n return im\n }\n labelNodeEdges() {\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const node = ni.next()\n node.getEdges().computeLabelling(this._arg)\n }\n }\n copyNodesAndLabels(argIndex) {\n for (let i = this._arg[argIndex].getNodeIterator(); i.hasNext(); ) {\n const graphNode = i.next()\n const newNode = this._nodes.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n labelIntersectionNodes(argIndex) {\n for (let i = this._arg[argIndex].getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.find(ei.coord)\n if (n.getLabel().isNull(argIndex)) \n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n labelIsolatedNode(n, targetIndex) {\n const loc = this._ptLocator.locate(n.getCoordinate(), this._arg[targetIndex].getGeometry())\n n.getLabel().setAllLocations(targetIndex, loc)\n }\n computeIntersectionNodes(argIndex) {\n for (let i = this._arg[argIndex].getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.addNode(ei.coord)\n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else \n if (n.getLabel().isNull(argIndex)) n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n labelIsolatedNodes() {\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const n = ni.next()\n const label = n.getLabel()\n Assert.isTrue(label.getGeometryCount() > 0, 'node with empty label found')\n if (n.isIsolated()) \n if (label.isNull(0)) this.labelIsolatedNode(n, 0); else this.labelIsolatedNode(n, 1)\n \n }\n }\n updateIM(im) {\n for (let ei = this._isolatedEdges.iterator(); ei.hasNext(); ) {\n const e = ei.next()\n e.updateIM(im)\n }\n for (let ni = this._nodes.iterator(); ni.hasNext(); ) {\n const node = ni.next()\n node.updateIM(im)\n node.updateIMFromEdges(im)\n }\n }\n computeDisjointIM(im) {\n const ga = this._arg[0].getGeometry()\n if (!ga.isEmpty()) {\n im.set(Location.INTERIOR, Location.EXTERIOR, ga.getDimension())\n im.set(Location.BOUNDARY, Location.EXTERIOR, ga.getBoundaryDimension())\n }\n const gb = this._arg[1].getGeometry()\n if (!gb.isEmpty()) {\n im.set(Location.EXTERIOR, Location.INTERIOR, gb.getDimension())\n im.set(Location.EXTERIOR, Location.BOUNDARY, gb.getBoundaryDimension())\n }\n }\n}\n","import LineString from '../../geom/LineString.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Point from '../../geom/Point.js'\nimport Polygon from '../../geom/Polygon.js'\nexport default class RectangleContains {\n constructor() {\n RectangleContains.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n const rectangle = arguments[0]\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n static contains(rectangle, b) {\n const rc = new RectangleContains(rectangle)\n return rc.contains(b)\n }\n isContainedInBoundary(geom) {\n if (geom instanceof Polygon) return false\n if (geom instanceof Point) return this.isPointContainedInBoundary(geom)\n if (geom instanceof LineString) return this.isLineStringContainedInBoundary(geom)\n for (let i = 0; i < geom.getNumGeometries(); i++) {\n const comp = geom.getGeometryN(i)\n if (!this.isContainedInBoundary(comp)) return false\n }\n return true\n }\n isLineSegmentContainedInBoundary(p0, p1) {\n if (p0.equals(p1)) return this.isPointContainedInBoundary(p0)\n if (p0.x === p1.x) {\n if (p0.x === this._rectEnv.getMinX() || p0.x === this._rectEnv.getMaxX()) return true\n } else if (p0.y === p1.y) {\n if (p0.y === this._rectEnv.getMinY() || p0.y === this._rectEnv.getMaxY()) return true\n }\n return false\n }\n isLineStringContainedInBoundary(line) {\n const seq = line.getCoordinateSequence()\n const p0 = new Coordinate()\n const p1 = new Coordinate()\n for (let i = 0; i < seq.size() - 1; i++) {\n seq.getCoordinate(i, p0)\n seq.getCoordinate(i + 1, p1)\n if (!this.isLineSegmentContainedInBoundary(p0, p1)) return false\n }\n return true\n }\n isPointContainedInBoundary() {\n if (arguments[0] instanceof Point) {\n const point = arguments[0]\n return this.isPointContainedInBoundary(point.getCoordinate())\n } else if (arguments[0] instanceof Coordinate) {\n const pt = arguments[0]\n return pt.x === this._rectEnv.getMinX() || pt.x === this._rectEnv.getMaxX() || pt.y === this._rectEnv.getMinY() || pt.y === this._rectEnv.getMaxY()\n }\n }\n contains(geom) {\n if (!this._rectEnv.contains(geom.getEnvelopeInternal())) return false\n if (this.isContainedInBoundary(geom)) return false\n return true\n }\n}\n","import Coordinate from '../geom/Coordinate.js'\nimport RobustLineIntersector from './RobustLineIntersector.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class RectangleLineIntersector {\n constructor() {\n RectangleLineIntersector.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._rectEnv = null\n this._diagUp0 = null\n this._diagUp1 = null\n this._diagDown0 = null\n this._diagDown1 = null\n const rectEnv = arguments[0]\n this._rectEnv = rectEnv\n this._diagUp0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMinY())\n this._diagUp1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMaxY())\n this._diagDown0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMaxY())\n this._diagDown1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMinY())\n }\n intersects(p0, p1) {\n const segEnv = new Envelope(p0, p1)\n if (!this._rectEnv.intersects(segEnv)) return false\n if (this._rectEnv.intersects(p0)) return true\n if (this._rectEnv.intersects(p1)) return true\n if (p0.compareTo(p1) > 0) {\n const tmp = p0\n p0 = p1\n p1 = tmp\n }\n let isSegUpwards = false\n if (p1.y > p0.y) isSegUpwards = true\n if (isSegUpwards) \n this._li.computeIntersection(p0, p1, this._diagDown0, this._diagDown1)\n else \n this._li.computeIntersection(p0, p1, this._diagUp0, this._diagUp1)\n \n if (this._li.hasIntersection()) return true\n return false\n }\n}\n","import GeometryCollection from '../GeometryCollection.js'\nexport default class ShortCircuitedGeometryVisitor {\n constructor() {\n ShortCircuitedGeometryVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._isDone = false\n }\n applyTo(geom) {\n for (let i = 0; i < geom.getNumGeometries() && !this._isDone; i++) {\n const element = geom.getGeometryN(i)\n if (!(element instanceof GeometryCollection)) {\n this.visit(element)\n if (this.isDone()) {\n this._isDone = true\n return null\n }\n } else {\n this.applyTo(element)\n }\n }\n }\n}\n","import Coordinate from '../../geom/Coordinate.js'\nimport Polygon from '../../geom/Polygon.js'\nimport RectangleLineIntersector from '../../algorithm/RectangleLineIntersector.js'\nimport ShortCircuitedGeometryVisitor from '../../geom/util/ShortCircuitedGeometryVisitor.js'\nimport SimplePointInAreaLocator from '../../algorithm/locate/SimplePointInAreaLocator.js'\nimport LinearComponentExtracter from '../../geom/util/LinearComponentExtracter.js'\nexport default class RectangleIntersects {\n constructor() {\n RectangleIntersects.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectangle = null\n this._rectEnv = null\n const rectangle = arguments[0]\n this._rectangle = rectangle\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n static intersects(rectangle, b) {\n const rp = new RectangleIntersects(rectangle)\n return rp.intersects(b)\n }\n intersects(geom) {\n if (!this._rectEnv.intersects(geom.getEnvelopeInternal())) return false\n const visitor = new EnvelopeIntersectsVisitor(this._rectEnv)\n visitor.applyTo(geom)\n if (visitor.intersects()) return true\n const ecpVisitor = new GeometryContainsPointVisitor(this._rectangle)\n ecpVisitor.applyTo(geom)\n if (ecpVisitor.containsPoint()) return true\n const riVisitor = new RectangleIntersectsSegmentVisitor(this._rectangle)\n riVisitor.applyTo(geom)\n if (riVisitor.intersects()) return true\n return false\n }\n}\nclass EnvelopeIntersectsVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n EnvelopeIntersectsVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n this._intersects = false\n const rectEnv = arguments[0]\n this._rectEnv = rectEnv\n }\n isDone() {\n return this._intersects === true\n }\n visit(element) {\n const elementEnv = element.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) \n return null\n \n if (this._rectEnv.contains(elementEnv)) {\n this._intersects = true\n return null\n }\n if (elementEnv.getMinX() >= this._rectEnv.getMinX() && elementEnv.getMaxX() <= this._rectEnv.getMaxX()) {\n this._intersects = true\n return null\n }\n if (elementEnv.getMinY() >= this._rectEnv.getMinY() && elementEnv.getMaxY() <= this._rectEnv.getMaxY()) {\n this._intersects = true\n return null\n }\n }\n intersects() {\n return this._intersects\n }\n}\nclass GeometryContainsPointVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n GeometryContainsPointVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectSeq = null\n this._rectEnv = null\n this._containsPoint = false\n const rectangle = arguments[0]\n this._rectSeq = rectangle.getExteriorRing().getCoordinateSequence()\n this._rectEnv = rectangle.getEnvelopeInternal()\n }\n isDone() {\n return this._containsPoint === true\n }\n visit(geom) {\n if (!(geom instanceof Polygon)) return null\n const elementEnv = geom.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) return null\n const rectPt = new Coordinate()\n for (let i = 0; i < 4; i++) {\n this._rectSeq.getCoordinate(i, rectPt)\n if (!elementEnv.contains(rectPt)) continue\n if (SimplePointInAreaLocator.containsPointInPolygon(rectPt, geom)) {\n this._containsPoint = true\n return null\n }\n }\n }\n containsPoint() {\n return this._containsPoint\n }\n}\nclass RectangleIntersectsSegmentVisitor extends ShortCircuitedGeometryVisitor {\n constructor() {\n super()\n RectangleIntersectsSegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._rectEnv = null\n this._rectIntersector = null\n this._hasIntersection = false\n this._p0 = new Coordinate()\n this._p1 = new Coordinate()\n const rectangle = arguments[0]\n this._rectEnv = rectangle.getEnvelopeInternal()\n this._rectIntersector = new RectangleLineIntersector(this._rectEnv)\n }\n intersects() {\n return this._hasIntersection\n }\n isDone() {\n return this._hasIntersection === true\n }\n visit(geom) {\n const elementEnv = geom.getEnvelopeInternal()\n if (!this._rectEnv.intersects(elementEnv)) return null\n const lines = LinearComponentExtracter.getLines(geom)\n this.checkIntersectionWithLineStrings(lines)\n }\n checkIntersectionWithLineStrings(lines) {\n for (let i = lines.iterator(); i.hasNext(); ) {\n const testLine = i.next()\n this.checkIntersectionWithSegments(testLine)\n if (this._hasIntersection) return null\n }\n }\n checkIntersectionWithSegments(testLine) {\n const seq1 = testLine.getCoordinateSequence()\n for (let j = 1; j < seq1.size(); j++) {\n seq1.getCoordinate(j - 1, this._p0)\n seq1.getCoordinate(j, this._p1)\n if (this._rectIntersector.intersects(this._p0, this._p1)) {\n this._hasIntersection = true\n return null\n }\n }\n }\n}\n","import RelateComputer from './RelateComputer.js'\nimport GeometryGraphOperation from '../GeometryGraphOperation.js'\nimport RectangleContains from '../predicate/RectangleContains.js'\nimport RectangleIntersects from '../predicate/RectangleIntersects.js'\nexport default class RelateOp extends GeometryGraphOperation {\n constructor() {\n super()\n RelateOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._relate = null\n if (arguments.length === 2) {\n const g0 = arguments[0], g1 = arguments[1]\n GeometryGraphOperation.constructor_.call(this, g0, g1)\n this._relate = new RelateComputer(this._arg)\n } else if (arguments.length === 3) {\n const g0 = arguments[0], g1 = arguments[1], boundaryNodeRule = arguments[2]\n GeometryGraphOperation.constructor_.call(this, g0, g1, boundaryNodeRule)\n this._relate = new RelateComputer(this._arg)\n }\n }\n static covers(g1, g2) {\n if (g2.getDimension() === 2 && g1.getDimension() < 2) \n return false\n \n if (g2.getDimension() === 1 && g1.getDimension() < 1 && g2.getLength() > 0.0) \n return false\n \n if (!g1.getEnvelopeInternal().covers(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return true\n \n return new RelateOp(g1, g2).getIntersectionMatrix().isCovers()\n }\n static intersects(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return RectangleIntersects.intersects(g1, g2)\n \n if (g2.isRectangle()) \n return RectangleIntersects.intersects(g2, g1)\n \n if (g1.isGeometryCollection() || g2.isGeometryCollection()) {\n const r = false\n for (let i = 0; i < g1.getNumGeometries(); i++) \n for (let j = 0; j < g2.getNumGeometries(); j++) \n if (g1.getGeometryN(i).intersects(g2.getGeometryN(j))) \n return true\n \n \n \n return false\n }\n return new RelateOp(g1, g2).getIntersectionMatrix().isIntersects()\n }\n static touches(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isTouches(g1.getDimension(), g2.getDimension())\n }\n static equalsTopo(g1, g2) {\n if (!g1.getEnvelopeInternal().equals(g2.getEnvelopeInternal())) return false\n return RelateOp.relate(g1, g2).isEquals(g1.getDimension(), g2.getDimension())\n }\n static relate() {\n if (arguments.length === 2) {\n const a = arguments[0], b = arguments[1]\n const relOp = new RelateOp(a, b)\n const im = relOp.getIntersectionMatrix()\n return im\n } else if (arguments.length === 3) {\n const a = arguments[0], b = arguments[1], boundaryNodeRule = arguments[2]\n const relOp = new RelateOp(a, b, boundaryNodeRule)\n const im = relOp.getIntersectionMatrix()\n return im\n }\n }\n static overlaps(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isOverlaps(g1.getDimension(), g2.getDimension())\n }\n static crosses(g1, g2) {\n if (!g1.getEnvelopeInternal().intersects(g2.getEnvelopeInternal())) return false\n return new RelateOp(g1, g2).getIntersectionMatrix().isCrosses(g1.getDimension(), g2.getDimension())\n }\n static contains(g1, g2) {\n if (g2.getDimension() === 2 && g1.getDimension() < 2) \n return false\n \n if (g2.getDimension() === 1 && g1.getDimension() < 1 && g2.getLength() > 0.0) \n return false\n \n if (!g1.getEnvelopeInternal().contains(g2.getEnvelopeInternal())) return false\n if (g1.isRectangle()) \n return RectangleContains.contains(g1, g2)\n \n return new RelateOp(g1, g2).getIntersectionMatrix().isContains()\n }\n getIntersectionMatrix() {\n return this._relate.computeIM()\n }\n}\n","import SnapIfNeededOverlayOp from '../overlay/snap/SnapIfNeededOverlayOp.js'\nimport OverlayOp from '../overlay/OverlayOp.js'\nexport default class UnionOp {\n get interfaces_() {\n return []\n }\n\n getClass() {\n return UnionOp\n }\n\n static union(g, other) {\n if (g.isEmpty() || other.isEmpty()) {\n if (g.isEmpty() && other.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.UNION, g, other, g.getFactory())\n if (g.isEmpty()) return other.copy()\n if (other.isEmpty()) return g.copy()\n }\n g.checkNotGeometryCollection(g)\n g.checkNotGeometryCollection(other)\n return SnapIfNeededOverlayOp.overlayOp(g, other, OverlayOp.UNION)\n }\n}\n","import Location from '../../geom/Location.js'\nimport GeometryFactory from '../../geom/GeometryFactory.js'\nimport Position from '../../geomgraph/Position.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport MaximalEdgeRing from '../overlay/MaximalEdgeRing.js'\nimport OverlayNodeFactory from '../overlay/OverlayNodeFactory.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Assert from '../../util/Assert.js'\nimport PlanarGraph from '../../geomgraph/PlanarGraph.js'\nexport default class ConnectedInteriorTester {\n constructor() {\n ConnectedInteriorTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geometryFactory = new GeometryFactory()\n this._geomGraph = null\n this._disconnectedRingcoord = null\n const geomGraph = arguments[0]\n this._geomGraph = geomGraph\n }\n static findDifferentPoint(coord, pt) {\n for (let i = 0; i < coord.length; i++) \n if (!coord[i].equals(pt)) return coord[i]\n \n return null\n }\n visitInteriorRing(ring, graph) {\n if (ring.isEmpty()) return null\n const pts = ring.getCoordinates()\n const pt0 = pts[0]\n const pt1 = ConnectedInteriorTester.findDifferentPoint(pts, pt0)\n const e = graph.findEdgeInSameDirection(pt0, pt1)\n const de = graph.findEdgeEnd(e)\n let intDe = null\n if (de.getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n intDe = de\n else if (de.getSym().getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n intDe = de.getSym()\n \n Assert.isTrue(intDe !== null, 'unable to find dirEdge with Interior on RHS')\n this.visitLinkedDirectedEdges(intDe)\n }\n visitShellInteriors(g, graph) {\n if (g instanceof Polygon) {\n const p = g\n this.visitInteriorRing(p.getExteriorRing(), graph)\n }\n if (g instanceof MultiPolygon) {\n const mp = g\n for (let i = 0; i < mp.getNumGeometries(); i++) {\n const p = mp.getGeometryN(i)\n this.visitInteriorRing(p.getExteriorRing(), graph)\n }\n }\n }\n getCoordinate() {\n return this._disconnectedRingcoord\n }\n setInteriorEdgesInResult(graph) {\n for (let it = graph.getEdgeEnds().iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.getLabel().getLocation(0, Position.RIGHT) === Location.INTERIOR) \n de.setInResult(true)\n \n }\n }\n visitLinkedDirectedEdges(start) {\n const startDe = start\n let de = start\n do {\n Assert.isTrue(de !== null, 'found null Directed Edge')\n de.setVisited(true)\n de = de.getNext()\n } while (de !== startDe)\n }\n buildEdgeRings(dirEdges) {\n const edgeRings = new ArrayList()\n for (let it = dirEdges.iterator(); it.hasNext(); ) {\n const de = it.next()\n if (de.isInResult() && de.getEdgeRing() === null) {\n const er = new MaximalEdgeRing(de, this._geometryFactory)\n er.linkDirectedEdgesForMinimalEdgeRings()\n const minEdgeRings = er.buildMinimalRings()\n edgeRings.addAll(minEdgeRings)\n }\n }\n return edgeRings\n }\n hasUnvisitedShellEdge(edgeRings) {\n for (let i = 0; i < edgeRings.size(); i++) {\n const er = edgeRings.get(i)\n if (er.isHole()) continue\n const edges = er.getEdges()\n let de = edges.get(0)\n if (de.getLabel().getLocation(0, Position.RIGHT) !== Location.INTERIOR) continue\n for (let j = 0; j < edges.size(); j++) {\n de = edges.get(j)\n if (!de.isVisited()) {\n this._disconnectedRingcoord = de.getCoordinate()\n return true\n }\n }\n }\n return false\n }\n isInteriorsConnected() {\n const splitEdges = new ArrayList()\n this._geomGraph.computeSplitEdges(splitEdges)\n const graph = new PlanarGraph(new OverlayNodeFactory())\n graph.addEdges(splitEdges)\n this.setInteriorEdgesInResult(graph)\n graph.linkResultDirectedEdges()\n const edgeRings = this.buildEdgeRings(graph.getEdgeEnds())\n this.visitShellInteriors(this._geomGraph.getGeometry(), graph)\n return !this.hasUnvisitedShellEdge(edgeRings)\n }\n}\n","import Location from '../../geom/Location.js'\nimport EdgeEndBuilder from './EdgeEndBuilder.js'\nimport NodeMap from '../../geomgraph/NodeMap.js'\nimport RelateNodeFactory from './RelateNodeFactory.js'\nexport default class RelateNodeGraph {\n constructor() {\n RelateNodeGraph.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._nodes = new NodeMap(new RelateNodeFactory())\n }\n insertEdgeEnds(ee) {\n for (let i = ee.iterator(); i.hasNext(); ) {\n const e = i.next()\n this._nodes.add(e)\n }\n }\n getNodeIterator() {\n return this._nodes.iterator()\n }\n copyNodesAndLabels(geomGraph, argIndex) {\n for (let nodeIt = geomGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const graphNode = nodeIt.next()\n const newNode = this._nodes.addNode(graphNode.getCoordinate())\n newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex))\n }\n }\n build(geomGraph) {\n this.computeIntersectionNodes(geomGraph, 0)\n this.copyNodesAndLabels(geomGraph, 0)\n const eeBuilder = new EdgeEndBuilder()\n const eeList = eeBuilder.computeEdgeEnds(geomGraph.getEdgeIterator())\n this.insertEdgeEnds(eeList)\n }\n computeIntersectionNodes(geomGraph, argIndex) {\n for (let edgeIt = geomGraph.getEdgeIterator(); edgeIt.hasNext(); ) {\n const e = edgeIt.next()\n const eLoc = e.getLabel().getLocation(argIndex)\n for (let eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {\n const ei = eiIt.next()\n const n = this._nodes.addNode(ei.coord)\n if (eLoc === Location.BOUNDARY) n.setLabelBoundary(argIndex); else \n if (n.getLabel().isNull(argIndex)) n.setLabel(argIndex, Location.INTERIOR)\n \n }\n }\n }\n}\n","import RelateNodeGraph from '../relate/RelateNodeGraph.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nexport default class ConsistentAreaTester {\n constructor() {\n ConsistentAreaTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._geomGraph = null\n this._nodeGraph = new RelateNodeGraph()\n this._invalidPoint = null\n const geomGraph = arguments[0]\n this._geomGraph = geomGraph\n }\n isNodeEdgeAreaLabelsConsistent() {\n for (let nodeIt = this._nodeGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const node = nodeIt.next()\n if (!node.getEdges().isAreaLabelsConsistent(this._geomGraph)) {\n this._invalidPoint = node.getCoordinate().copy()\n return false\n }\n }\n return true\n }\n getInvalidPoint() {\n return this._invalidPoint\n }\n hasDuplicateRings() {\n for (let nodeIt = this._nodeGraph.getNodeIterator(); nodeIt.hasNext(); ) {\n const node = nodeIt.next()\n for (let i = node.getEdges().iterator(); i.hasNext(); ) {\n const eeb = i.next()\n if (eeb.getEdgeEnds().size() > 1) {\n this._invalidPoint = eeb.getEdge().getCoordinate(0)\n return true\n }\n }\n }\n return false\n }\n isNodeConsistentArea() {\n const intersector = this._geomGraph.computeSelfNodes(this._li, true, true)\n if (intersector.hasProperIntersection()) {\n this._invalidPoint = intersector.getProperIntersectionPoint()\n return false\n }\n this._nodeGraph.build(this._geomGraph)\n return this.isNodeEdgeAreaLabelsConsistent()\n }\n}\n","import STRtree from '../../index/strtree/STRtree.js'\nimport IsValidOp from './IsValidOp.js'\nimport PointLocation from '../../algorithm/PointLocation.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class IndexedNestedRingTester {\n constructor() {\n IndexedNestedRingTester.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._graph = null\n this._rings = new ArrayList()\n this._totalEnv = new Envelope()\n this._index = null\n this._nestedPt = null\n const graph = arguments[0]\n this._graph = graph\n }\n buildIndex() {\n this._index = new STRtree()\n for (let i = 0; i < this._rings.size(); i++) {\n const ring = this._rings.get(i)\n const env = ring.getEnvelopeInternal()\n this._index.insert(env, ring)\n }\n }\n getNestedPoint() {\n return this._nestedPt\n }\n isNonNested() {\n this.buildIndex()\n for (let i = 0; i < this._rings.size(); i++) {\n const innerRing = this._rings.get(i)\n const innerRingPts = innerRing.getCoordinates()\n const results = this._index.query(innerRing.getEnvelopeInternal())\n for (let j = 0; j < results.size(); j++) {\n const searchRing = results.get(j)\n const searchRingPts = searchRing.getCoordinates()\n if (innerRing === searchRing) continue\n if (!innerRing.getEnvelopeInternal().intersects(searchRing.getEnvelopeInternal())) continue\n const innerRingPt = IsValidOp.findPtNotNode(innerRingPts, searchRing, this._graph)\n if (innerRingPt === null) continue\n const isInside = PointLocation.isInRing(innerRingPt, searchRingPts)\n if (isInside) {\n this._nestedPt = innerRingPt\n return false\n }\n }\n }\n return true\n }\n add(ring) {\n this._rings.add(ring)\n this._totalEnv.expandToInclude(ring.getEnvelopeInternal())\n }\n}\n","export default class TopologyValidationError {\n constructor() {\n TopologyValidationError.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._errorType = null\n this._pt = null\n if (arguments.length === 1) {\n const errorType = arguments[0]\n TopologyValidationError.constructor_.call(this, errorType, null)\n } else if (arguments.length === 2) {\n const errorType = arguments[0], pt = arguments[1]\n this._errorType = errorType\n if (pt !== null) this._pt = pt.copy()\n }\n }\n getErrorType() {\n return this._errorType\n }\n getMessage() {\n return TopologyValidationError.errMsg[this._errorType]\n }\n getCoordinate() {\n return this._pt\n }\n toString() {\n let locStr = ''\n if (this._pt !== null) locStr = ' at or near point ' + this._pt\n return this.getMessage() + locStr\n }\n}\nTopologyValidationError.ERROR = 0\nTopologyValidationError.REPEATED_POINT = 1\nTopologyValidationError.HOLE_OUTSIDE_SHELL = 2\nTopologyValidationError.NESTED_HOLES = 3\nTopologyValidationError.DISCONNECTED_INTERIOR = 4\nTopologyValidationError.SELF_INTERSECTION = 5\nTopologyValidationError.RING_SELF_INTERSECTION = 6\nTopologyValidationError.NESTED_SHELLS = 7\nTopologyValidationError.DUPLICATE_RINGS = 8\nTopologyValidationError.TOO_FEW_POINTS = 9\nTopologyValidationError.INVALID_COORDINATE = 10\nTopologyValidationError.RING_NOT_CLOSED = 11\nTopologyValidationError.errMsg = ['Topology Validation Error', 'Repeated Point', 'Hole lies outside shell', 'Holes are nested', 'Interior is disconnected', 'Self-intersection', 'Ring Self-intersection', 'Nested shells', 'Duplicate Rings', 'Too few distinct points in geometry component', 'Invalid Coordinate', 'Ring is not closed']\n","import Location from '../../geom/Location.js'\nimport TreeSet from '../../../../../java/util/TreeSet.js'\nimport LineString from '../../geom/LineString.js'\nimport Geometry from '../../geom/Geometry.js'\nimport ConnectedInteriorTester from './ConnectedInteriorTester.js'\nimport Coordinate from '../../geom/Coordinate.js'\nimport Point from '../../geom/Point.js'\nimport Polygon from '../../geom/Polygon.js'\nimport MultiPoint from '../../geom/MultiPoint.js'\nimport PointLocation from '../../algorithm/PointLocation.js'\nimport LinearRing from '../../geom/LinearRing.js'\nimport Double from '../../../../../java/lang/Double.js'\nimport GeometryGraph from '../../geomgraph/GeometryGraph.js'\nimport MultiPolygon from '../../geom/MultiPolygon.js'\nimport ConsistentAreaTester from './ConsistentAreaTester.js'\nimport GeometryCollection from '../../geom/GeometryCollection.js'\nimport UnsupportedOperationException from '../../../../../java/lang/UnsupportedOperationException.js'\nimport IndexedNestedRingTester from './IndexedNestedRingTester.js'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector.js'\nimport TopologyValidationError from './TopologyValidationError.js'\nimport IndexedPointInAreaLocator from '../../algorithm/locate/IndexedPointInAreaLocator.js'\nimport Assert from '../../util/Assert.js'\nexport default class IsValidOp {\n constructor() {\n IsValidOp.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentGeometry = null\n this._isSelfTouchingRingFormingHoleValid = false\n this._validErr = null\n const parentGeometry = arguments[0]\n this._parentGeometry = parentGeometry\n }\n static findPtNotNode(testCoords, searchRing, graph) {\n const searchEdge = graph.findEdge(searchRing)\n const eiList = searchEdge.getEdgeIntersectionList()\n for (let i = 0; i < testCoords.length; i++) {\n const pt = testCoords[i]\n if (!eiList.isIntersection(pt)) return pt\n }\n return null\n }\n static isValid() {\n if (arguments[0] instanceof Geometry) {\n const geom = arguments[0]\n const isValidOp = new IsValidOp(geom)\n return isValidOp.isValid()\n } else if (arguments[0] instanceof Coordinate) {\n const coord = arguments[0]\n if (Double.isNaN(coord.x)) return false\n if (Double.isInfinite(coord.x)) return false\n if (Double.isNaN(coord.y)) return false\n if (Double.isInfinite(coord.y)) return false\n return true\n }\n }\n checkInvalidCoordinates() {\n if (arguments[0] instanceof Array) {\n const coords = arguments[0]\n for (let i = 0; i < coords.length; i++) \n if (!IsValidOp.isValid(coords[i])) {\n this._validErr = new TopologyValidationError(TopologyValidationError.INVALID_COORDINATE, coords[i])\n return null\n }\n \n } else if (arguments[0] instanceof Polygon) {\n const poly = arguments[0]\n this.checkInvalidCoordinates(poly.getExteriorRing().getCoordinates())\n if (this._validErr !== null) return null\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n this.checkInvalidCoordinates(poly.getInteriorRingN(i).getCoordinates())\n if (this._validErr !== null) return null\n }\n }\n }\n checkHolesNotNested(p, graph) {\n if (p.getNumInteriorRing() <= 0) return null\n const nestedTester = new IndexedNestedRingTester(graph)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const innerHole = p.getInteriorRingN(i)\n if (innerHole.isEmpty()) continue\n nestedTester.add(innerHole)\n }\n const isNonNested = nestedTester.isNonNested()\n if (!isNonNested) \n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_HOLES, nestedTester.getNestedPoint())\n \n }\n checkConsistentArea(graph) {\n const cat = new ConsistentAreaTester(graph)\n const isValidArea = cat.isNodeConsistentArea()\n if (!isValidArea) {\n this._validErr = new TopologyValidationError(TopologyValidationError.SELF_INTERSECTION, cat.getInvalidPoint())\n return null\n }\n if (cat.hasDuplicateRings()) \n this._validErr = new TopologyValidationError(TopologyValidationError.DUPLICATE_RINGS, cat.getInvalidPoint())\n \n }\n isValid() {\n this.checkValid(this._parentGeometry)\n return this._validErr === null\n }\n checkShellInsideHole(shell, hole, graph) {\n const shellPts = shell.getCoordinates()\n const holePts = hole.getCoordinates()\n const shellPt = IsValidOp.findPtNotNode(shellPts, hole, graph)\n if (shellPt !== null) {\n const insideHole = PointLocation.isInRing(shellPt, holePts)\n if (!insideHole) \n return shellPt\n \n }\n const holePt = IsValidOp.findPtNotNode(holePts, shell, graph)\n if (holePt !== null) {\n const insideShell = PointLocation.isInRing(holePt, shellPts)\n if (insideShell) \n return holePt\n \n return null\n }\n Assert.shouldNeverReachHere('points in shell and hole appear to be equal')\n return null\n }\n checkNoSelfIntersectingRings(graph) {\n for (let i = graph.getEdgeIterator(); i.hasNext(); ) {\n const e = i.next()\n this.checkNoSelfIntersectingRing(e.getEdgeIntersectionList())\n if (this._validErr !== null) return null\n }\n }\n checkConnectedInteriors(graph) {\n const cit = new ConnectedInteriorTester(graph)\n if (!cit.isInteriorsConnected()) this._validErr = new TopologyValidationError(TopologyValidationError.DISCONNECTED_INTERIOR, cit.getCoordinate())\n }\n checkNoSelfIntersectingRing(eiList) {\n const nodeSet = new TreeSet()\n let isFirst = true\n for (let i = eiList.iterator(); i.hasNext(); ) {\n const ei = i.next()\n if (isFirst) {\n isFirst = false\n continue\n }\n if (nodeSet.contains(ei.coord)) {\n this._validErr = new TopologyValidationError(TopologyValidationError.RING_SELF_INTERSECTION, ei.coord)\n return null\n } else {\n nodeSet.add(ei.coord)\n }\n }\n }\n checkHolesInShell(p, graph) {\n if (p.getNumInteriorRing() <= 0) return null\n const shell = p.getExteriorRing()\n const isShellEmpty = shell.isEmpty()\n const pir = new IndexedPointInAreaLocator(shell)\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n let holePt = null\n if (hole.isEmpty()) continue\n holePt = IsValidOp.findPtNotNode(hole.getCoordinates(), shell, graph)\n if (holePt === null) return null\n const outside = isShellEmpty || Location.EXTERIOR === pir.locate(holePt)\n if (outside) {\n this._validErr = new TopologyValidationError(TopologyValidationError.HOLE_OUTSIDE_SHELL, holePt)\n return null\n }\n }\n }\n checkTooFewPoints(graph) {\n if (graph.hasTooFewPoints()) {\n this._validErr = new TopologyValidationError(TopologyValidationError.TOO_FEW_POINTS, graph.getInvalidPoint())\n return null\n }\n }\n getValidationError() {\n this.checkValid(this._parentGeometry)\n return this._validErr\n }\n checkValid() {\n if (arguments[0] instanceof Point) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n } else if (arguments[0] instanceof MultiPoint) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n } else if (arguments[0] instanceof LinearRing) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n if (this._validErr !== null) return null\n this.checkClosedRing(g)\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n const li = new RobustLineIntersector()\n graph.computeSelfNodes(li, true, true)\n this.checkNoSelfIntersectingRings(graph)\n } else if (arguments[0] instanceof LineString) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g.getCoordinates())\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n } else if (arguments[0] instanceof Polygon) {\n const g = arguments[0]\n this.checkInvalidCoordinates(g)\n if (this._validErr !== null) return null\n this.checkClosedRings(g)\n if (this._validErr !== null) return null\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n this.checkConsistentArea(graph)\n if (this._validErr !== null) return null\n if (!this._isSelfTouchingRingFormingHoleValid) {\n this.checkNoSelfIntersectingRings(graph)\n if (this._validErr !== null) return null\n }\n this.checkHolesInShell(g, graph)\n if (this._validErr !== null) return null\n this.checkHolesNotNested(g, graph)\n if (this._validErr !== null) return null\n this.checkConnectedInteriors(graph)\n } else if (arguments[0] instanceof MultiPolygon) {\n const g = arguments[0]\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkInvalidCoordinates(p)\n if (this._validErr !== null) return null\n this.checkClosedRings(p)\n if (this._validErr !== null) return null\n }\n const graph = new GeometryGraph(0, g)\n this.checkTooFewPoints(graph)\n if (this._validErr !== null) return null\n this.checkConsistentArea(graph)\n if (this._validErr !== null) return null\n if (!this._isSelfTouchingRingFormingHoleValid) {\n this.checkNoSelfIntersectingRings(graph)\n if (this._validErr !== null) return null\n }\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkHolesInShell(p, graph)\n if (this._validErr !== null) return null\n }\n for (let i = 0; i < g.getNumGeometries(); i++) {\n const p = g.getGeometryN(i)\n this.checkHolesNotNested(p, graph)\n if (this._validErr !== null) return null\n }\n this.checkShellsNotNested(g, graph)\n if (this._validErr !== null) return null\n this.checkConnectedInteriors(graph)\n } else if (arguments[0] instanceof GeometryCollection) {\n const gc = arguments[0]\n for (let i = 0; i < gc.getNumGeometries(); i++) {\n const g = gc.getGeometryN(i)\n this.checkValid(g)\n if (this._validErr !== null) return null\n }\n } else if (arguments[0] instanceof Geometry) {\n const g = arguments[0]\n this._validErr = null\n if (g.isEmpty()) return null\n if (g instanceof Point) this.checkValid(g); else if (g instanceof MultiPoint) this.checkValid(g); else if (g instanceof LinearRing) this.checkValid(g); else if (g instanceof LineString) this.checkValid(g); else if (g instanceof Polygon) this.checkValid(g); else if (g instanceof MultiPolygon) this.checkValid(g); else if (g instanceof GeometryCollection) this.checkValid(g); else throw new UnsupportedOperationException(g.getGeometryType())\n }\n }\n setSelfTouchingRingFormingHoleValid(isValid) {\n this._isSelfTouchingRingFormingHoleValid = isValid\n }\n checkShellNotNested(shell, p, graph) {\n const shellPts = shell.getCoordinates()\n const polyShell = p.getExteriorRing()\n if (polyShell.isEmpty()) return null\n const polyPts = polyShell.getCoordinates()\n const shellPt = IsValidOp.findPtNotNode(shellPts, polyShell, graph)\n if (shellPt === null) return null\n const insidePolyShell = PointLocation.isInRing(shellPt, polyPts)\n if (!insidePolyShell) return null\n if (p.getNumInteriorRing() <= 0) {\n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_SHELLS, shellPt)\n return null\n }\n let badNestedPt = null\n for (let i = 0; i < p.getNumInteriorRing(); i++) {\n const hole = p.getInteriorRingN(i)\n badNestedPt = this.checkShellInsideHole(shell, hole, graph)\n if (badNestedPt === null) return null\n }\n this._validErr = new TopologyValidationError(TopologyValidationError.NESTED_SHELLS, badNestedPt)\n }\n checkClosedRings(poly) {\n this.checkClosedRing(poly.getExteriorRing())\n if (this._validErr !== null) return null\n for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n this.checkClosedRing(poly.getInteriorRingN(i))\n if (this._validErr !== null) return null\n }\n }\n checkClosedRing(ring) {\n if (ring.isEmpty()) return null\n if (!ring.isClosed()) {\n let pt = null\n if (ring.getNumPoints() >= 1) pt = ring.getCoordinateN(0)\n this._validErr = new TopologyValidationError(TopologyValidationError.RING_NOT_CLOSED, pt)\n }\n }\n checkShellsNotNested(mp, graph) {\n for (let i = 0; i < mp.getNumGeometries(); i++) {\n const p = mp.getGeometryN(i)\n const shell = p.getExteriorRing()\n for (let j = 0; j < mp.getNumGeometries(); j++) {\n if (i === j) continue\n const p2 = mp.getGeometryN(j)\n this.checkShellNotNested(shell, p2, graph)\n if (this._validErr !== null) return null\n }\n }\n }\n}\n","import ArrayList from '../../../../../java/util/ArrayList.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nexport default class NodeBase {\n constructor() {\n NodeBase.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._items = new ArrayList()\n this._subnode = new Array(4).fill(null)\n }\n static getSubnodeIndex(env, centrex, centrey) {\n let subnodeIndex = -1\n if (env.getMinX() >= centrex) {\n if (env.getMinY() >= centrey) subnodeIndex = 3\n if (env.getMaxY() <= centrey) subnodeIndex = 1\n }\n if (env.getMaxX() <= centrex) {\n if (env.getMinY() >= centrey) subnodeIndex = 2\n if (env.getMaxY() <= centrey) subnodeIndex = 0\n }\n return subnodeIndex\n }\n hasChildren() {\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) return true\n \n return false\n }\n isPrunable() {\n return !(this.hasChildren() || this.hasItems())\n }\n addAllItems(resultItems) {\n resultItems.addAll(this._items)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].addAllItems(resultItems)\n \n \n return resultItems\n }\n getNodeCount() {\n let subSize = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n subSize += this._subnode[i].size()\n \n \n return subSize + 1\n }\n size() {\n let subSize = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n subSize += this._subnode[i].size()\n \n \n return subSize + this._items.size()\n }\n addAllItemsFromOverlapping(searchEnv, resultItems) {\n if (!this.isSearchMatch(searchEnv)) return null\n resultItems.addAll(this._items)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].addAllItemsFromOverlapping(searchEnv, resultItems)\n \n \n }\n visitItems(searchEnv, visitor) {\n for (let i = this._items.iterator(); i.hasNext(); ) \n visitor.visitItem(i.next())\n \n }\n hasItems() {\n return !this._items.isEmpty()\n }\n remove(itemEnv, item) {\n if (!this.isSearchMatch(itemEnv)) return false\n let found = false\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) {\n found = this._subnode[i].remove(itemEnv, item)\n if (found) {\n if (this._subnode[i].isPrunable()) this._subnode[i] = null\n break\n }\n }\n \n if (found) return found\n found = this._items.remove(item)\n return found\n }\n visit(searchEnv, visitor) {\n if (!this.isSearchMatch(searchEnv)) return null\n this.visitItems(searchEnv, visitor)\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n this._subnode[i].visit(searchEnv, visitor)\n \n \n }\n getItems() {\n return this._items\n }\n depth() {\n let maxSubDepth = 0\n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) {\n const sqd = this._subnode[i].depth()\n if (sqd > maxSubDepth) maxSubDepth = sqd\n }\n \n return maxSubDepth + 1\n }\n isEmpty() {\n let isEmpty = true\n if (!this._items.isEmpty()) isEmpty = false; else \n for (let i = 0; i < 4; i++) \n if (this._subnode[i] !== null) \n if (!this._subnode[i].isEmpty()) {\n isEmpty = false\n break\n }\n \n \n \n return isEmpty\n }\n add(item) {\n this._items.add(item)\n }\n get interfaces_() {\n return [Serializable]\n }\n}\n","export default function DoubleBits() { }\nDoubleBits.exponent = function(d) {\n return CVTFWD(64, d) - 1023\n}\nDoubleBits.powerOf2 = function(exp) {\n return Math.pow(2, exp)\n}\n\n/**\n * Calculates the exponent of the bit-pattern for a number. Uses code from:\n * http://www.merlyn.demon.co.uk/js-exact.htm\n *\n * @param {Number}\n * NumW 32 or 64 to denote the number of bits.\n * @param {Number}\n * Qty the number to calculate the bit pattern for.\n * @return {Number} The integer value of the exponent.\n * @private\n */\nfunction CVTFWD(NumW, Qty) {\n let Sign\n let Expo\n let Mant\n let Bin\n const Inf = {\n 32: {\n d: 0x7F,\n c: 0x80,\n b: 0,\n a: 0\n },\n 64: {\n d: 0x7FF0,\n c: 0,\n b: 0,\n a: 0\n }\n }\n const ExW = {\n 32: 8,\n 64: 11\n }[NumW]\n\n if (!Bin) {\n Sign = Qty < 0 || 1 / Qty < 0 // OK for +-0\n if (!isFinite(Qty)) {\n Bin = Inf[NumW]\n if (Sign) Bin.d += 1 << (NumW / 4 - 1)\n\n Expo = Math.pow(2, ExW) - 1\n Mant = 0\n }\n }\n\n if (!Bin) {\n Expo = {\n 32: 127,\n 64: 1023\n }[NumW]\n Mant = Math.abs(Qty)\n while (Mant >= 2) {\n Expo++\n Mant /= 2\n }\n while (Mant < 1 && Expo > 0) {\n Expo--\n Mant *= 2\n }\n if (Expo <= 0) Mant /= 2\n\n if (NumW === 32 && Expo > 254) {\n Bin = {\n d: Sign ? 0xFF : 0x7F,\n c: 0x80,\n b: 0,\n a: 0\n }\n Expo = Math.pow(2, ExW) - 1\n Mant = 0\n }\n }\n\n return Expo\n}\n","import Coordinate from '../../geom/Coordinate.js'\nimport DoubleBits from './DoubleBits.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class Key {\n constructor() {\n Key.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._pt = new Coordinate()\n this._level = 0\n this._env = null\n const itemEnv = arguments[0]\n this.computeKey(itemEnv)\n }\n static computeQuadLevel(env) {\n const dx = env.getWidth()\n const dy = env.getHeight()\n const dMax = dx > dy ? dx : dy\n const level = DoubleBits.exponent(dMax) + 1\n return level\n }\n getLevel() {\n return this._level\n }\n computeKey() {\n if (arguments.length === 1) {\n const itemEnv = arguments[0]\n this._level = Key.computeQuadLevel(itemEnv)\n this._env = new Envelope()\n this.computeKey(this._level, itemEnv)\n while (!this._env.contains(itemEnv)) {\n this._level += 1\n this.computeKey(this._level, itemEnv)\n }\n } else if (arguments.length === 2) {\n const level = arguments[0], itemEnv = arguments[1]\n const quadSize = DoubleBits.powerOf2(level)\n this._pt.x = Math.floor(itemEnv.getMinX() / quadSize) * quadSize\n this._pt.y = Math.floor(itemEnv.getMinY() / quadSize) * quadSize\n this._env.init(this._pt.x, this._pt.x + quadSize, this._pt.y, this._pt.y + quadSize)\n }\n }\n getEnvelope() {\n return this._env\n }\n getCentre() {\n return new Coordinate((this._env.getMinX() + this._env.getMaxX()) / 2, (this._env.getMinY() + this._env.getMaxY()) / 2)\n }\n getPoint() {\n return this._pt\n }\n}\n","import NodeBase from './NodeBase.js'\nimport Envelope from '../../geom/Envelope.js'\nimport Assert from '../../util/Assert.js'\nimport Key from './Key.js'\nexport default class Node extends NodeBase {\n constructor() {\n super()\n Node.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._env = null\n this._centrex = null\n this._centrey = null\n this._level = null\n const env = arguments[0], level = arguments[1]\n this._env = env\n this._level = level\n this._centrex = (env.getMinX() + env.getMaxX()) / 2\n this._centrey = (env.getMinY() + env.getMaxY()) / 2\n }\n static createNode(env) {\n const key = new Key(env)\n const node = new Node(key.getEnvelope(), key.getLevel())\n return node\n }\n static createExpanded(node, addEnv) {\n const expandEnv = new Envelope(addEnv)\n if (node !== null) expandEnv.expandToInclude(node._env)\n const largerNode = Node.createNode(expandEnv)\n if (node !== null) largerNode.insertNode(node)\n return largerNode\n }\n find(searchEnv) {\n const subnodeIndex = NodeBase.getSubnodeIndex(searchEnv, this._centrex, this._centrey)\n if (subnodeIndex === -1) return this\n if (this._subnode[subnodeIndex] !== null) {\n const node = this._subnode[subnodeIndex]\n return node.find(searchEnv)\n }\n return this\n }\n isSearchMatch(searchEnv) {\n if (searchEnv === null) return false\n return this._env.intersects(searchEnv)\n }\n getSubnode(index) {\n if (this._subnode[index] === null) \n this._subnode[index] = this.createSubnode(index)\n \n return this._subnode[index]\n }\n getEnvelope() {\n return this._env\n }\n getNode(searchEnv) {\n const subnodeIndex = NodeBase.getSubnodeIndex(searchEnv, this._centrex, this._centrey)\n if (subnodeIndex !== -1) {\n const node = this.getSubnode(subnodeIndex)\n return node.getNode(searchEnv)\n } else {\n return this\n }\n }\n createSubnode(index) {\n let minx = 0.0\n let maxx = 0.0\n let miny = 0.0\n let maxy = 0.0\n switch (index) {\n case 0:\n minx = this._env.getMinX()\n maxx = this._centrex\n miny = this._env.getMinY()\n maxy = this._centrey\n break\n case 1:\n minx = this._centrex\n maxx = this._env.getMaxX()\n miny = this._env.getMinY()\n maxy = this._centrey\n break\n case 2:\n minx = this._env.getMinX()\n maxx = this._centrex\n miny = this._centrey\n maxy = this._env.getMaxY()\n break\n case 3:\n minx = this._centrex\n maxx = this._env.getMaxX()\n miny = this._centrey\n maxy = this._env.getMaxY()\n break\n }\n const sqEnv = new Envelope(minx, maxx, miny, maxy)\n const node = new Node(sqEnv, this._level - 1)\n return node\n }\n insertNode(node) {\n Assert.isTrue(this._env === null || this._env.contains(node._env))\n const index = NodeBase.getSubnodeIndex(node._env, this._centrex, this._centrey)\n if (node._level === this._level - 1) {\n this._subnode[index] = node\n } else {\n const childNode = this.createSubnode(index)\n childNode.insertNode(node)\n this._subnode[index] = childNode\n }\n }\n}\n","import DoubleBits from './DoubleBits.js'\nexport default class IntervalSize {\n static isZeroWidth(min, max) {\n const width = max - min\n if (width === 0.0) return true\n const maxAbs = Math.max(Math.abs(min), Math.abs(max))\n const scaledInterval = width / maxAbs\n const level = DoubleBits.exponent(scaledInterval)\n return level <= IntervalSize.MIN_BINARY_EXPONENT\n }\n}\nIntervalSize.MIN_BINARY_EXPONENT = -50\n","import Coordinate from '../../geom/Coordinate.js'\nimport NodeBase from './NodeBase.js'\nimport Node from './Node.js'\nimport IntervalSize from './IntervalSize.js'\nimport Assert from '../../util/Assert.js'\nexport default class Root extends NodeBase {\n constructor() {\n super()\n }\n insert(itemEnv, item) {\n const index = NodeBase.getSubnodeIndex(itemEnv, Root.origin.x, Root.origin.y)\n if (index === -1) {\n this.add(item)\n return null\n }\n const node = this._subnode[index]\n if (node === null || !node.getEnvelope().contains(itemEnv)) {\n const largerNode = Node.createExpanded(node, itemEnv)\n this._subnode[index] = largerNode\n }\n this.insertContained(this._subnode[index], itemEnv, item)\n }\n isSearchMatch(searchEnv) {\n return true\n }\n insertContained(tree, itemEnv, item) {\n Assert.isTrue(tree.getEnvelope().contains(itemEnv))\n const isZeroX = IntervalSize.isZeroWidth(itemEnv.getMinX(), itemEnv.getMaxX())\n const isZeroY = IntervalSize.isZeroWidth(itemEnv.getMinY(), itemEnv.getMaxY())\n let node = null\n if (isZeroX || isZeroY) node = tree.find(itemEnv); else node = tree.getNode(itemEnv)\n node.add(item)\n }\n}\nRoot.origin = new Coordinate(0.0, 0.0)\n","import Root from './Root.js'\nimport SpatialIndex from '../SpatialIndex.js'\nimport ArrayList from '../../../../../java/util/ArrayList.js'\nimport ArrayListVisitor from '../ArrayListVisitor.js'\nimport Serializable from '../../../../../java/io/Serializable.js'\nimport Envelope from '../../geom/Envelope.js'\nexport default class Quadtree {\n constructor() {\n Quadtree.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._root = null\n this._minExtent = 1.0\n this._root = new Root()\n }\n static ensureExtent(itemEnv, minExtent) {\n let minx = itemEnv.getMinX()\n let maxx = itemEnv.getMaxX()\n let miny = itemEnv.getMinY()\n let maxy = itemEnv.getMaxY()\n if (minx !== maxx && miny !== maxy) return itemEnv\n if (minx === maxx) {\n minx = minx - minExtent / 2.0\n maxx = maxx + minExtent / 2.0\n }\n if (miny === maxy) {\n miny = miny - minExtent / 2.0\n maxy = maxy + minExtent / 2.0\n }\n return new Envelope(minx, maxx, miny, maxy)\n }\n size() {\n if (this._root !== null) return this._root.size()\n return 0\n }\n insert(itemEnv, item) {\n this.collectStats(itemEnv)\n const insertEnv = Quadtree.ensureExtent(itemEnv, this._minExtent)\n this._root.insert(insertEnv, item)\n }\n query() {\n if (arguments.length === 1) {\n const searchEnv = arguments[0]\n const visitor = new ArrayListVisitor()\n this.query(searchEnv, visitor)\n return visitor.getItems()\n } else if (arguments.length === 2) {\n const searchEnv = arguments[0], visitor = arguments[1]\n this._root.visit(searchEnv, visitor)\n }\n }\n queryAll() {\n const foundItems = new ArrayList()\n this._root.addAllItems(foundItems)\n return foundItems\n }\n remove(itemEnv, item) {\n const posEnv = Quadtree.ensureExtent(itemEnv, this._minExtent)\n return this._root.remove(posEnv, item)\n }\n collectStats(itemEnv) {\n const delX = itemEnv.getWidth()\n if (delX < this._minExtent && delX > 0.0) this._minExtent = delX\n const delY = itemEnv.getHeight()\n if (delY < this._minExtent && delY > 0.0) this._minExtent = delY\n }\n depth() {\n if (this._root !== null) return this._root.depth()\n return 0\n }\n isEmpty() {\n if (this._root === null) return true\n return this._root.isEmpty()\n }\n get interfaces_() {\n return [SpatialIndex, Serializable]\n }\n}\n","import LineSegment from '../geom/LineSegment.js'\nexport default class TaggedLineSegment extends LineSegment {\n constructor() {\n super()\n TaggedLineSegment.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parent = null\n this._index = null\n if (arguments.length === 2) {\n const p0 = arguments[0], p1 = arguments[1]\n TaggedLineSegment.constructor_.call(this, p0, p1, null, -1)\n } else if (arguments.length === 4) {\n const p0 = arguments[0], p1 = arguments[1], parent = arguments[2], index = arguments[3]\n LineSegment.constructor_.call(this, p0, p1)\n this._parent = parent\n this._index = index\n }\n }\n getIndex() {\n return this._index\n }\n getParent() {\n return this._parent\n }\n}\n","import TaggedLineSegment from './TaggedLineSegment.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nexport default class TaggedLineString {\n constructor() {\n TaggedLineString.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._parentLine = null\n this._segs = null\n this._resultSegs = new ArrayList()\n this._minimumSize = null\n if (arguments.length === 1) {\n const parentLine = arguments[0]\n TaggedLineString.constructor_.call(this, parentLine, 2)\n } else if (arguments.length === 2) {\n const parentLine = arguments[0], minimumSize = arguments[1]\n this._parentLine = parentLine\n this._minimumSize = minimumSize\n this.init()\n }\n }\n static extractCoordinates(segs) {\n const pts = new Array(segs.size() + 1).fill(null)\n let seg = null\n for (let i = 0; i < segs.size(); i++) {\n seg = segs.get(i)\n pts[i] = seg.p0\n }\n pts[pts.length - 1] = seg.p1\n return pts\n }\n addToResult(seg) {\n this._resultSegs.add(seg)\n }\n asLineString() {\n return this._parentLine.getFactory().createLineString(TaggedLineString.extractCoordinates(this._resultSegs))\n }\n getResultSize() {\n const resultSegsSize = this._resultSegs.size()\n return resultSegsSize === 0 ? 0 : resultSegsSize + 1\n }\n getParent() {\n return this._parentLine\n }\n getSegment(i) {\n return this._segs[i]\n }\n getParentCoordinates() {\n return this._parentLine.getCoordinates()\n }\n getMinimumSize() {\n return this._minimumSize\n }\n asLinearRing() {\n return this._parentLine.getFactory().createLinearRing(TaggedLineString.extractCoordinates(this._resultSegs))\n }\n getSegments() {\n return this._segs\n }\n init() {\n const pts = this._parentLine.getCoordinates()\n this._segs = new Array(pts.length - 1).fill(null)\n for (let i = 0; i < pts.length - 1; i++) {\n const seg = new TaggedLineSegment(pts[i], pts[i + 1], this._parentLine, i)\n this._segs[i] = seg\n }\n }\n getResultCoordinates() {\n return TaggedLineString.extractCoordinates(this._resultSegs)\n }\n}\n","import Quadtree from '../index/quadtree/Quadtree.js'\nimport ItemVisitor from '../index/ItemVisitor.js'\nimport LineSegment from '../geom/LineSegment.js'\nimport ArrayList from '../../../../java/util/ArrayList.js'\nimport Envelope from '../geom/Envelope.js'\nimport TaggedLineString from './TaggedLineString.js'\nexport default class LineSegmentIndex {\n constructor() {\n LineSegmentIndex.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._index = new Quadtree()\n }\n remove(seg) {\n this._index.remove(new Envelope(seg.p0, seg.p1), seg)\n }\n add() {\n if (arguments[0] instanceof TaggedLineString) {\n const line = arguments[0]\n const segs = line.getSegments()\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n this.add(seg)\n }\n } else if (arguments[0] instanceof LineSegment) {\n const seg = arguments[0]\n this._index.insert(new Envelope(seg.p0, seg.p1), seg)\n }\n }\n query(querySeg) {\n const env = new Envelope(querySeg.p0, querySeg.p1)\n const visitor = new LineSegmentVisitor(querySeg)\n this._index.query(env, visitor)\n const itemsFound = visitor.getItems()\n return itemsFound\n }\n}\nclass LineSegmentVisitor {\n constructor() {\n LineSegmentVisitor.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._querySeg = null\n this._items = new ArrayList()\n const querySeg = arguments[0]\n this._querySeg = querySeg\n }\n visitItem(item) {\n const seg = item\n if (Envelope.intersects(seg.p0, seg.p1, this._querySeg.p0, this._querySeg.p1)) this._items.add(item)\n }\n getItems() {\n return this._items\n }\n get interfaces_() {\n return [ItemVisitor]\n }\n}\n","import LineSegment from '../geom/LineSegment.js'\nimport LineSegmentIndex from './LineSegmentIndex.js'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector.js'\nexport default class TaggedLineStringSimplifier {\n constructor() {\n TaggedLineStringSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._li = new RobustLineIntersector()\n this._inputIndex = new LineSegmentIndex()\n this._outputIndex = new LineSegmentIndex()\n this._line = null\n this._linePts = null\n this._distanceTolerance = 0.0\n const inputIndex = arguments[0], outputIndex = arguments[1]\n this._inputIndex = inputIndex\n this._outputIndex = outputIndex\n }\n static isInLineSection(line, sectionIndex, seg) {\n if (seg.getParent() !== line.getParent()) return false\n const segIndex = seg.getIndex()\n if (segIndex >= sectionIndex[0] && segIndex < sectionIndex[1]) return true\n return false\n }\n flatten(start, end) {\n const p0 = this._linePts[start]\n const p1 = this._linePts[end]\n const newSeg = new LineSegment(p0, p1)\n this.remove(this._line, start, end)\n this._outputIndex.add(newSeg)\n return newSeg\n }\n hasBadIntersection(parentLine, sectionIndex, candidateSeg) {\n if (this.hasBadOutputIntersection(candidateSeg)) return true\n if (this.hasBadInputIntersection(parentLine, sectionIndex, candidateSeg)) return true\n return false\n }\n setDistanceTolerance(distanceTolerance) {\n this._distanceTolerance = distanceTolerance\n }\n simplifySection(i, j, depth) {\n depth += 1\n const sectionIndex = new Array(2).fill(null)\n if (i + 1 === j) {\n const newSeg = this._line.getSegment(i)\n this._line.addToResult(newSeg)\n return null\n }\n let isValidToSimplify = true\n if (this._line.getResultSize() < this._line.getMinimumSize()) {\n const worstCaseSize = depth + 1\n if (worstCaseSize < this._line.getMinimumSize()) isValidToSimplify = false\n }\n const distance = new Array(1).fill(null)\n const furthestPtIndex = this.findFurthestPoint(this._linePts, i, j, distance)\n if (distance[0] > this._distanceTolerance) isValidToSimplify = false\n const candidateSeg = new LineSegment()\n candidateSeg.p0 = this._linePts[i]\n candidateSeg.p1 = this._linePts[j]\n sectionIndex[0] = i\n sectionIndex[1] = j\n if (this.hasBadIntersection(this._line, sectionIndex, candidateSeg)) isValidToSimplify = false\n if (isValidToSimplify) {\n const newSeg = this.flatten(i, j)\n this._line.addToResult(newSeg)\n return null\n }\n this.simplifySection(i, furthestPtIndex, depth)\n this.simplifySection(furthestPtIndex, j, depth)\n }\n hasBadOutputIntersection(candidateSeg) {\n const querySegs = this._outputIndex.query(candidateSeg)\n for (let i = querySegs.iterator(); i.hasNext(); ) {\n const querySeg = i.next()\n if (this.hasInteriorIntersection(querySeg, candidateSeg)) \n return true\n \n }\n return false\n }\n findFurthestPoint(pts, i, j, maxDistance) {\n const seg = new LineSegment()\n seg.p0 = pts[i]\n seg.p1 = pts[j]\n let maxDist = -1.0\n let maxIndex = i\n for (let k = i + 1; k < j; k++) {\n const midPt = pts[k]\n const distance = seg.distance(midPt)\n if (distance > maxDist) {\n maxDist = distance\n maxIndex = k\n }\n }\n maxDistance[0] = maxDist\n return maxIndex\n }\n simplify(line) {\n this._line = line\n this._linePts = line.getParentCoordinates()\n this.simplifySection(0, this._linePts.length - 1, 0)\n }\n remove(line, start, end) {\n for (let i = start; i < end; i++) {\n const seg = line.getSegment(i)\n this._inputIndex.remove(seg)\n }\n }\n hasInteriorIntersection(seg0, seg1) {\n this._li.computeIntersection(seg0.p0, seg0.p1, seg1.p0, seg1.p1)\n return this._li.isInteriorIntersection()\n }\n hasBadInputIntersection(parentLine, sectionIndex, candidateSeg) {\n const querySegs = this._inputIndex.query(candidateSeg)\n for (let i = querySegs.iterator(); i.hasNext(); ) {\n const querySeg = i.next()\n if (this.hasInteriorIntersection(querySeg, candidateSeg)) {\n if (TaggedLineStringSimplifier.isInLineSection(parentLine, sectionIndex, querySeg)) continue\n return true\n }\n }\n return false\n }\n}\n","import TaggedLineStringSimplifier from './TaggedLineStringSimplifier.js'\nimport LineSegmentIndex from './LineSegmentIndex.js'\nexport default class TaggedLinesSimplifier {\n constructor() {\n TaggedLinesSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputIndex = new LineSegmentIndex()\n this._outputIndex = new LineSegmentIndex()\n this._distanceTolerance = 0.0\n }\n setDistanceTolerance(distanceTolerance) {\n this._distanceTolerance = distanceTolerance\n }\n simplify(taggedLines) {\n for (let i = taggedLines.iterator(); i.hasNext(); ) \n this._inputIndex.add(i.next())\n \n for (let i = taggedLines.iterator(); i.hasNext(); ) {\n const tlss = new TaggedLineStringSimplifier(this._inputIndex, this._outputIndex)\n tlss.setDistanceTolerance(this._distanceTolerance)\n tlss.simplify(i.next())\n }\n }\n}\n","import LineString from '../geom/LineString.js'\nimport HashMap from '../../../../java/util/HashMap.js'\nimport GeometryTransformer from '../geom/util/GeometryTransformer.js'\nimport TaggedLinesSimplifier from './TaggedLinesSimplifier.js'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException.js'\nimport GeometryComponentFilter from '../geom/GeometryComponentFilter.js'\nimport TaggedLineString from './TaggedLineString.js'\nexport default class TopologyPreservingSimplifier {\n constructor() {\n TopologyPreservingSimplifier.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._inputGeom = null\n this._lineSimplifier = new TaggedLinesSimplifier()\n this._linestringMap = null\n const inputGeom = arguments[0]\n this._inputGeom = inputGeom\n }\n static simplify(geom, distanceTolerance) {\n const tss = new TopologyPreservingSimplifier(geom)\n tss.setDistanceTolerance(distanceTolerance)\n return tss.getResultGeometry()\n }\n getResultGeometry() {\n if (this._inputGeom.isEmpty()) return this._inputGeom.copy()\n this._linestringMap = new HashMap()\n this._inputGeom.apply(new LineStringMapBuilderFilter(this))\n this._lineSimplifier.simplify(this._linestringMap.values())\n const result = new LineStringTransformer(this._linestringMap).transform(this._inputGeom)\n return result\n }\n setDistanceTolerance(distanceTolerance) {\n if (distanceTolerance < 0.0) throw new IllegalArgumentException('Tolerance must be non-negative')\n this._lineSimplifier.setDistanceTolerance(distanceTolerance)\n }\n}\nclass LineStringTransformer extends GeometryTransformer {\n constructor() {\n super()\n LineStringTransformer.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._linestringMap = null\n const linestringMap = arguments[0]\n this._linestringMap = linestringMap\n }\n transformCoordinates(coords, parent) {\n if (coords.size() === 0) return null\n if (parent instanceof LineString) {\n const taggedLine = this._linestringMap.get(parent)\n return this.createCoordinateSequence(taggedLine.getResultCoordinates())\n }\n return super.transformCoordinates.call(this, coords, parent)\n }\n}\nclass LineStringMapBuilderFilter {\n constructor() {\n LineStringMapBuilderFilter.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.tps = null\n const tps = arguments[0]\n this.tps = tps\n }\n filter(geom) {\n if (geom instanceof LineString) {\n const line = geom\n if (line.isEmpty()) return null\n const minSize = line.isClosed() ? 4 : 2\n const taggedLine = new TaggedLineString(line, minSize)\n this.tps._linestringMap.put(line, taggedLine)\n }\n }\n get interfaces_() {\n return [GeometryComponentFilter]\n }\n}\nTopologyPreservingSimplifier.LineStringTransformer = LineStringTransformer\nTopologyPreservingSimplifier.LineStringMapBuilderFilter = LineStringMapBuilderFilter\n","import Exception from '../../../../../java/lang/Exception.js'\nexport default class NoninvertibleTransformationException extends Exception {\n constructor() {\n super()\n NoninvertibleTransformationException.constructor_.apply(this, arguments)\n }\n static constructor_() {\n if (arguments.length === 0) {\n Exception.constructor_.call(this)\n } else if (arguments.length === 1) {\n const msg = arguments[0]\n Exception.constructor_.call(this, msg)\n }\n }\n}\n","import NoninvertibleTransformationException from './NoninvertibleTransformationException.js'\nimport hasInterface from '../../../../../hasInterface.js'\nimport Coordinate from '../Coordinate.js'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException.js'\nimport Exception from '../../../../../java/lang/Exception.js'\nimport CoordinateSequence from '../CoordinateSequence.js'\nimport Cloneable from '../../../../../java/lang/Cloneable.js'\nimport CoordinateSequenceFilter from '../CoordinateSequenceFilter.js'\nimport Assert from '../../util/Assert.js'\nexport default class AffineTransformation {\n constructor() {\n AffineTransformation.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._m00 = null\n this._m01 = null\n this._m02 = null\n this._m10 = null\n this._m11 = null\n this._m12 = null\n if (arguments.length === 0) {\n this.setToIdentity()\n } else if (arguments.length === 1) {\n if (arguments[0] instanceof Array) {\n const matrix = arguments[0]\n this._m00 = matrix[0]\n this._m01 = matrix[1]\n this._m02 = matrix[2]\n this._m10 = matrix[3]\n this._m11 = matrix[4]\n this._m12 = matrix[5]\n } else if (arguments[0] instanceof AffineTransformation) {\n const trans = arguments[0]\n this.setTransformation(trans)\n }\n } else if (arguments.length === 6) {\n if (typeof arguments[5] === 'number' && (typeof arguments[4] === 'number' && (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))))) {\n const m00 = arguments[0], m01 = arguments[1], m02 = arguments[2], m10 = arguments[3], m11 = arguments[4], m12 = arguments[5]\n this.setTransformation(m00, m01, m02, m10, m11, m12)\n } else if (arguments[5] instanceof Coordinate && (arguments[4] instanceof Coordinate && (arguments[3] instanceof Coordinate && (arguments[2] instanceof Coordinate && (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate))))) {\n const src0 = arguments[0], src1 = arguments[1], src2 = arguments[2], dest0 = arguments[3], dest1 = arguments[4], dest2 = arguments[5]\n }\n }\n }\n static translationInstance(x, y) {\n const trans = new AffineTransformation()\n trans.setToTranslation(x, y)\n return trans\n }\n static shearInstance(xShear, yShear) {\n const trans = new AffineTransformation()\n trans.setToShear(xShear, yShear)\n return trans\n }\n static reflectionInstance() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n const trans = new AffineTransformation()\n trans.setToReflection(x, y)\n return trans\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n const trans = new AffineTransformation()\n trans.setToReflection(x0, y0, x1, y1)\n return trans\n }\n }\n static rotationInstance() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n return AffineTransformation.rotationInstance(Math.sin(theta), Math.cos(theta))\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n const trans = new AffineTransformation()\n trans.setToRotation(sinTheta, cosTheta)\n return trans\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n return AffineTransformation.rotationInstance(Math.sin(theta), Math.cos(theta), x, y)\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n const trans = new AffineTransformation()\n trans.setToRotation(sinTheta, cosTheta, x, y)\n return trans\n }\n }\n static scaleInstance() {\n if (arguments.length === 2) {\n const xScale = arguments[0], yScale = arguments[1]\n const trans = new AffineTransformation()\n trans.setToScale(xScale, yScale)\n return trans\n } else if (arguments.length === 4) {\n const xScale = arguments[0], yScale = arguments[1], x = arguments[2], y = arguments[3]\n const trans = new AffineTransformation()\n trans.translate(-x, -y)\n trans.scale(xScale, yScale)\n trans.translate(x, y)\n return trans\n }\n }\n setToReflectionBasic(x0, y0, x1, y1) {\n if (x0 === x1 && y0 === y1) \n throw new IllegalArgumentException('Reflection line points must be distinct')\n \n const dx = x1 - x0\n const dy = y1 - y0\n const d = Math.sqrt(dx * dx + dy * dy)\n const sin = dy / d\n const cos = dx / d\n const cs2 = 2 * sin * cos\n const c2s2 = cos * cos - sin * sin\n this._m00 = c2s2\n this._m01 = cs2\n this._m02 = 0.0\n this._m10 = cs2\n this._m11 = -c2s2\n this._m12 = 0.0\n return this\n }\n getInverse() {\n const det = this.getDeterminant()\n if (det === 0) throw new NoninvertibleTransformationException('Transformation is non-invertible')\n const im00 = this._m11 / det\n const im10 = -this._m10 / det\n const im01 = -this._m01 / det\n const im11 = this._m00 / det\n const im02 = (this._m01 * this._m12 - this._m02 * this._m11) / det\n const im12 = (-this._m00 * this._m12 + this._m10 * this._m02) / det\n return new AffineTransformation(im00, im01, im02, im10, im11, im12)\n }\n compose(trans) {\n const mp00 = trans._m00 * this._m00 + trans._m01 * this._m10\n const mp01 = trans._m00 * this._m01 + trans._m01 * this._m11\n const mp02 = trans._m00 * this._m02 + trans._m01 * this._m12 + trans._m02\n const mp10 = trans._m10 * this._m00 + trans._m11 * this._m10\n const mp11 = trans._m10 * this._m01 + trans._m11 * this._m11\n const mp12 = trans._m10 * this._m02 + trans._m11 * this._m12 + trans._m12\n this._m00 = mp00\n this._m01 = mp01\n this._m02 = mp02\n this._m10 = mp10\n this._m11 = mp11\n this._m12 = mp12\n return this\n }\n equals(obj) {\n if (obj === null) return false\n if (!(obj instanceof AffineTransformation)) return false\n const trans = obj\n return this._m00 === trans._m00 && this._m01 === trans._m01 && this._m02 === trans._m02 && this._m10 === trans._m10 && this._m11 === trans._m11 && this._m12 === trans._m12\n }\n setToScale(xScale, yScale) {\n this._m00 = xScale\n this._m01 = 0.0\n this._m02 = 0.0\n this._m10 = 0.0\n this._m11 = yScale\n this._m12 = 0.0\n return this\n }\n isIdentity() {\n return this._m00 === 1 && this._m01 === 0 && this._m02 === 0 && this._m10 === 0 && this._m11 === 1 && this._m12 === 0\n }\n scale(xScale, yScale) {\n this.compose(AffineTransformation.scaleInstance(xScale, yScale))\n return this\n }\n setToIdentity() {\n this._m00 = 1.0\n this._m01 = 0.0\n this._m02 = 0.0\n this._m10 = 0.0\n this._m11 = 1.0\n this._m12 = 0.0\n return this\n }\n isGeometryChanged() {\n return true\n }\n setTransformation() {\n if (arguments.length === 1) {\n const trans = arguments[0]\n this._m00 = trans._m00\n this._m01 = trans._m01\n this._m02 = trans._m02\n this._m10 = trans._m10\n this._m11 = trans._m11\n this._m12 = trans._m12\n return this\n } else if (arguments.length === 6) {\n const m00 = arguments[0], m01 = arguments[1], m02 = arguments[2], m10 = arguments[3], m11 = arguments[4], m12 = arguments[5]\n this._m00 = m00\n this._m01 = m01\n this._m02 = m02\n this._m10 = m10\n this._m11 = m11\n this._m12 = m12\n return this\n }\n }\n setToRotation() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n this.setToRotation(Math.sin(theta), Math.cos(theta))\n return this\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n this._m00 = cosTheta\n this._m01 = -sinTheta\n this._m02 = 0.0\n this._m10 = sinTheta\n this._m11 = cosTheta\n this._m12 = 0.0\n return this\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n this.setToRotation(Math.sin(theta), Math.cos(theta), x, y)\n return this\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n this._m00 = cosTheta\n this._m01 = -sinTheta\n this._m02 = x - x * cosTheta + y * sinTheta\n this._m10 = sinTheta\n this._m11 = cosTheta\n this._m12 = y - x * sinTheta - y * cosTheta\n return this\n }\n }\n getMatrixEntries() {\n return [this._m00, this._m01, this._m02, this._m10, this._m11, this._m12]\n }\n filter(seq, i) {\n this.transform(seq, i)\n }\n rotate() {\n if (arguments.length === 1) {\n const theta = arguments[0]\n this.compose(AffineTransformation.rotationInstance(theta))\n return this\n } else if (arguments.length === 2) {\n const sinTheta = arguments[0], cosTheta = arguments[1]\n this.compose(AffineTransformation.rotationInstance(sinTheta, cosTheta))\n return this\n } else if (arguments.length === 3) {\n const theta = arguments[0], x = arguments[1], y = arguments[2]\n this.compose(AffineTransformation.rotationInstance(theta, x, y))\n return this\n } else if (arguments.length === 4) {\n const sinTheta = arguments[0], cosTheta = arguments[1], x = arguments[2], y = arguments[3]\n this.compose(AffineTransformation.rotationInstance(sinTheta, cosTheta, x, y))\n return this\n }\n }\n getDeterminant() {\n return this._m00 * this._m11 - this._m01 * this._m10\n }\n composeBefore(trans) {\n const mp00 = this._m00 * trans._m00 + this._m01 * trans._m10\n const mp01 = this._m00 * trans._m01 + this._m01 * trans._m11\n const mp02 = this._m00 * trans._m02 + this._m01 * trans._m12 + this._m02\n const mp10 = this._m10 * trans._m00 + this._m11 * trans._m10\n const mp11 = this._m10 * trans._m01 + this._m11 * trans._m11\n const mp12 = this._m10 * trans._m02 + this._m11 * trans._m12 + this._m12\n this._m00 = mp00\n this._m01 = mp01\n this._m02 = mp02\n this._m10 = mp10\n this._m11 = mp11\n this._m12 = mp12\n return this\n }\n setToShear(xShear, yShear) {\n this._m00 = 1.0\n this._m01 = xShear\n this._m02 = 0.0\n this._m10 = yShear\n this._m11 = 1.0\n this._m12 = 0.0\n return this\n }\n isDone() {\n return false\n }\n clone() {\n try {\n return null\n } catch (ex) {\n if (ex instanceof Exception) \n Assert.shouldNeverReachHere()\n else throw ex\n } finally {}\n return null\n }\n translate(x, y) {\n this.compose(AffineTransformation.translationInstance(x, y))\n return this\n }\n setToReflection() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n if (x === 0.0 && y === 0.0) \n throw new IllegalArgumentException('Reflection vector must be non-zero')\n \n if (x === y) {\n this._m00 = 0.0\n this._m01 = 1.0\n this._m02 = 0.0\n this._m10 = 1.0\n this._m11 = 0.0\n this._m12 = 0.0\n return this\n }\n const d = Math.sqrt(x * x + y * y)\n const sin = y / d\n const cos = x / d\n this.rotate(-sin, cos)\n this.scale(1, -1)\n this.rotate(sin, cos)\n return this\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n if (x0 === x1 && y0 === y1) \n throw new IllegalArgumentException('Reflection line points must be distinct')\n \n this.setToTranslation(-x0, -y0)\n const dx = x1 - x0\n const dy = y1 - y0\n const d = Math.sqrt(dx * dx + dy * dy)\n const sin = dy / d\n const cos = dx / d\n this.rotate(-sin, cos)\n this.scale(1, -1)\n this.rotate(sin, cos)\n this.translate(x0, y0)\n return this\n }\n }\n toString() {\n return 'AffineTransformation[[' + this._m00 + ', ' + this._m01 + ', ' + this._m02 + '], [' + this._m10 + ', ' + this._m11 + ', ' + this._m12 + ']]'\n }\n setToTranslation(dx, dy) {\n this._m00 = 1.0\n this._m01 = 0.0\n this._m02 = dx\n this._m10 = 0.0\n this._m11 = 1.0\n this._m12 = dy\n return this\n }\n shear(xShear, yShear) {\n this.compose(AffineTransformation.shearInstance(xShear, yShear))\n return this\n }\n transform() {\n if (arguments.length === 1) {\n const g = arguments[0]\n const g2 = g.copy()\n g2.apply(this)\n return g2\n } else if (arguments.length === 2) {\n if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n const src = arguments[0], dest = arguments[1]\n const xp = this._m00 * src.x + this._m01 * src.y + this._m02\n const yp = this._m10 * src.x + this._m11 * src.y + this._m12\n dest.x = xp\n dest.y = yp\n return dest\n } else if (hasInterface(arguments[0], CoordinateSequence) && Number.isInteger(arguments[1])) {\n const seq = arguments[0], i = arguments[1]\n const xp = this._m00 * seq.getOrdinate(i, 0) + this._m01 * seq.getOrdinate(i, 1) + this._m02\n const yp = this._m10 * seq.getOrdinate(i, 0) + this._m11 * seq.getOrdinate(i, 1) + this._m12\n seq.setOrdinate(i, 0, xp)\n seq.setOrdinate(i, 1, yp)\n }\n }\n }\n reflect() {\n if (arguments.length === 2) {\n const x = arguments[0], y = arguments[1]\n this.compose(AffineTransformation.reflectionInstance(x, y))\n return this\n } else if (arguments.length === 4) {\n const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n this.compose(AffineTransformation.reflectionInstance(x0, y0, x1, y1))\n return this\n }\n }\n get interfaces_() {\n return [Cloneable, CoordinateSequenceFilter]\n }\n}\n","import GeometryFactory from '../geom/GeometryFactory.js'\nimport Coordinate from '../geom/Coordinate.js'\nimport AffineTransformation from '../geom/util/AffineTransformation.js'\nimport Envelope from '../geom/Envelope.js'\nexport default class GeometricShapeFactory {\n constructor() {\n GeometricShapeFactory.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this._geomFact = null\n this._precModel = null\n this._dim = new Dimensions()\n this._nPts = 100\n this._rotationAngle = 0.0\n if (arguments.length === 0) {\n GeometricShapeFactory.constructor_.call(this, new GeometryFactory())\n } else if (arguments.length === 1) {\n const geomFact = arguments[0]\n this._geomFact = geomFact\n this._precModel = geomFact.getPrecisionModel()\n }\n }\n createSupercircle(power) {\n const recipPow = 1.0 / power\n const radius = this._dim.getMinSize() / 2\n const centre = this._dim.getCentre()\n const r4 = Math.pow(radius, power)\n const y0 = radius\n const xyInt = Math.pow(r4 / 2, recipPow)\n const nSegsInOct = Math.trunc(this._nPts / 8)\n const totPts = nSegsInOct * 8 + 1\n const pts = new Array(totPts).fill(null)\n const xInc = xyInt / nSegsInOct\n for (let i = 0; i <= nSegsInOct; i++) {\n let x = 0.0\n let y = y0\n if (i !== 0) {\n x = xInc * i\n const x4 = Math.pow(x, power)\n y = Math.pow(r4 - x4, recipPow)\n }\n pts[i] = this.coordTrans(x, y, centre)\n pts[2 * nSegsInOct - i] = this.coordTrans(y, x, centre)\n pts[2 * nSegsInOct + i] = this.coordTrans(y, -x, centre)\n pts[4 * nSegsInOct - i] = this.coordTrans(x, -y, centre)\n pts[4 * nSegsInOct + i] = this.coordTrans(-x, -y, centre)\n pts[6 * nSegsInOct - i] = this.coordTrans(-y, -x, centre)\n pts[6 * nSegsInOct + i] = this.coordTrans(-y, x, centre)\n pts[8 * nSegsInOct - i] = this.coordTrans(-x, y, centre)\n }\n pts[pts.length - 1] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n setNumPoints(nPts) {\n this._nPts = nPts\n }\n setBase(base) {\n this._dim.setBase(base)\n }\n setRotation(radians) {\n this._rotationAngle = radians\n }\n setWidth(width) {\n this._dim.setWidth(width)\n }\n createEllipse() {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n const pts = new Array(this._nPts + 1).fill(null)\n let iPt = 0\n for (let i = 0; i < this._nPts; i++) {\n const ang = i * (2 * Math.PI / this._nPts)\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n pts[iPt] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n coordTrans(x, y, trans) {\n return this.coord(x + trans.x, y + trans.y)\n }\n createSquircle() {\n return this.createSupercircle(4)\n }\n setEnvelope(env) {\n this._dim.setEnvelope(env)\n }\n setCentre(centre) {\n this._dim.setCentre(centre)\n }\n createArc(startAng, angExtent) {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n let angSize = angExtent\n if (angSize <= 0.0 || angSize > 2 * Math.PI) angSize = 2 * Math.PI\n const angInc = angSize / (this._nPts - 1)\n const pts = new Array(this._nPts).fill(null)\n let iPt = 0\n for (let i = 0; i < this._nPts; i++) {\n const ang = startAng + i * angInc\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n const line = this._geomFact.createLineString(pts)\n return this.rotate(line)\n }\n rotate(geom) {\n if (this._rotationAngle !== 0.0) {\n const trans = AffineTransformation.rotationInstance(this._rotationAngle, this._dim.getCentre().x, this._dim.getCentre().y)\n geom.apply(trans)\n }\n return geom\n }\n coord(x, y) {\n const pt = new Coordinate(x, y)\n this._precModel.makePrecise(pt)\n return pt\n }\n createArcPolygon(startAng, angExtent) {\n const env = this._dim.getEnvelope()\n const xRadius = env.getWidth() / 2.0\n const yRadius = env.getHeight() / 2.0\n const centreX = env.getMinX() + xRadius\n const centreY = env.getMinY() + yRadius\n let angSize = angExtent\n if (angSize <= 0.0 || angSize > 2 * Math.PI) angSize = 2 * Math.PI\n const angInc = angSize / (this._nPts - 1)\n const pts = new Array(this._nPts + 2).fill(null)\n let iPt = 0\n pts[iPt++] = this.coord(centreX, centreY)\n for (let i = 0; i < this._nPts; i++) {\n const ang = startAng + angInc * i\n const x = xRadius * Math.cos(ang) + centreX\n const y = yRadius * Math.sin(ang) + centreY\n pts[iPt++] = this.coord(x, y)\n }\n pts[iPt++] = this.coord(centreX, centreY)\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n createRectangle() {\n let i = null\n let ipt = 0\n let nSide = Math.trunc(this._nPts / 4)\n if (nSide < 1) nSide = 1\n const XsegLen = this._dim.getEnvelope().getWidth() / nSide\n const YsegLen = this._dim.getEnvelope().getHeight() / nSide\n const pts = new Array(4 * nSide + 1).fill(null)\n const env = this._dim.getEnvelope()\n for ((i = 0); i < nSide; i++) {\n const x = env.getMinX() + i * XsegLen\n const y = env.getMinY()\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMaxX()\n const y = env.getMinY() + i * YsegLen\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMaxX() - i * XsegLen\n const y = env.getMaxY()\n pts[ipt++] = this.coord(x, y)\n }\n for ((i = 0); i < nSide; i++) {\n const x = env.getMinX()\n const y = env.getMaxY() - i * YsegLen\n pts[ipt++] = this.coord(x, y)\n }\n pts[ipt++] = new Coordinate(pts[0])\n const ring = this._geomFact.createLinearRing(pts)\n const poly = this._geomFact.createPolygon(ring)\n return this.rotate(poly)\n }\n createCircle() {\n return this.createEllipse()\n }\n setHeight(height) {\n this._dim.setHeight(height)\n }\n setSize(size) {\n this._dim.setSize(size)\n }\n}\nclass Dimensions {\n constructor() {\n Dimensions.constructor_.apply(this, arguments)\n }\n static constructor_() {\n this.base = null\n this.centre = null\n this.width = null\n this.height = null\n }\n setBase(base) {\n this.base = base\n }\n setWidth(width) {\n this.width = width\n }\n getBase() {\n return this.base\n }\n getWidth() {\n return this.width\n }\n setEnvelope(env) {\n this.width = env.getWidth()\n this.height = env.getHeight()\n this.base = new Coordinate(env.getMinX(), env.getMinY())\n this.centre = new Coordinate(env.centre())\n }\n setCentre(centre) {\n this.centre = centre\n }\n getMinSize() {\n return Math.min(this.width, this.height)\n }\n getEnvelope() {\n if (this.base !== null) \n return new Envelope(this.base.x, this.base.x + this.width, this.base.y, this.base.y + this.height)\n \n if (this.centre !== null) \n return new Envelope(this.centre.x - this.width / 2, this.centre.x + this.width / 2, this.centre.y - this.height / 2, this.centre.y + this.height / 2)\n \n return new Envelope(0, this.width, 0, this.height)\n }\n getCentre() {\n if (this.centre === null) \n this.centre = new Coordinate(this.base.x + this.width / 2, this.base.y + this.height / 2)\n \n return this.centre\n }\n getHeight() {\n return this.height\n }\n setHeight(height) {\n this.height = height\n }\n setSize(size) {\n this.height = size\n this.width = size\n }\n}\nGeometricShapeFactory.Dimensions = Dimensions\n","import Densifier from \"jsts/org/locationtech/jts/densify/Densifier.js\";\nimport Coordinate from \"jsts/org/locationtech/jts/geom/Coordinate.js\";\nimport GeometryFactory from \"jsts/org/locationtech/jts/geom/GeometryFactory.js\";\n// needed by Densifier\nimport LineString from \"jsts/org/locationtech/jts/geom/LineString.js\";\n// needed by Densifier\nimport MultiPolygon from \"jsts/org/locationtech/jts/geom/MultiPolygon.js\";\nimport PrecisionModel from \"jsts/org/locationtech/jts/geom/PrecisionModel.js\";\nimport WKTReader from \"jsts/org/locationtech/jts/io/WKTReader.js\";\nimport WKTWriter from \"jsts/org/locationtech/jts/io/WKTWriter.js\";\nimport { BufferOp } from \"jsts/org/locationtech/jts/operation/buffer\";\nimport OverlayOp from \"jsts/org/locationtech/jts/operation/overlay/OverlayOp.js\";\nimport RelateOp from \"jsts/org/locationtech/jts/operation/relate/RelateOp.js\";\nimport UnionOp from \"jsts/org/locationtech/jts/operation/union/UnionOp.js\";\nimport IsValidOp from \"jsts/org/locationtech/jts/operation/valid/IsValidOp.js\";\nimport TopologyPreservingSimplifier from \"jsts/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js\";\nimport GeometricShapeFactory from \"jsts/org/locationtech/jts/util/GeometricShapeFactory.js\";\nimport GeometryTransformer from \"jsts/org/locationtech/jts/geom/util/GeometryTransformer.js\";\n\n// TODO: various geometry patched functions don't show up in node module\n// see jsts monkey.js for patching\n\nexport const isValid = (geometry) => {\n return IsValidOp.isValid(geometry);\n};\n\nexport const difference = (g1, g2) => {\n return OverlayOp.difference(g1, g2);\n};\n\nexport const intersects = (g1, g2) => {\n return RelateOp.intersects(g1, g2);\n};\n\nexport const touches = (g1, g2) => {\n return RelateOp.touches(g1, g2);\n};\n\nexport const union = (g1, g2) => {\n return UnionOp.union(g1, g2);\n};\n\nexport const intersection = (g1, g2) => {\n return OverlayOp.intersection(g1, g2);\n};\n\nexport const contains = (g1, g2) => {\n return RelateOp.contains(g1, g2);\n};\n\nexport const expandGeometry = (geometry, distance) => {\n return BufferOp.bufferOp(geometry, distance).norm();\n};\n\nexport const geometryToWkt = (geometry) => {\n if (!geometry) {\n return null;\n }\n const precisionModel = new PrecisionModel();\n const factory = new GeometryFactory(precisionModel);\n const wktWriter = new WKTWriter(factory);\n return wktWriter.write(geometry);\n};\n\nexport const wktToGeometry = (wkt) => {\n if (!wkt) {\n return null;\n }\n const wktReader = new WKTReader();\n return wktReader.read(wkt);\n};\n\n// {x, y, height, width}\nexport const rectToPolygon = (rect) => {\n const reader = new WKTReader();\n const polyString = rectToWKTPolygonString(rect);\n return reader.read(polyString);\n};\n\n// {x, y, height, width}\nexport const rectToWKTPolygonString = (rect) => {\n const p = [\n rect.x,\n rect.y,\n rect.x + rect.width,\n rect.y,\n rect.x + rect.width,\n rect.y + rect.height,\n rect.x,\n rect.y + rect.height,\n // close off poly\n rect.x,\n rect.y,\n ];\n return `POLYGON((${p[0]} ${p[1]}, ${p[2]} ${p[3]}, ${p[4]} ${p[5]}, ${p[6]} ${p[7]}, ${p[8]} ${p[9]}))`;\n};\n\nexport const twoPointsToLineString = (x1, y1, x2, y2) => {\n return new GeometryFactory().createLineString([\n new Coordinate(x1, y1),\n new Coordinate(x2, y2),\n ]);\n};\n\n// [[x,y]...]\nexport const pointsToPolygon = (points) => {\n const coords = points.map((p) => new Coordinate(p[0], p[1]));\n return new GeometryFactory().createPolygon(coords);\n};\n\nexport const ellipse = (x, y, width, height) => {\n const gsf = new GeometricShapeFactory();\n const centre = gsf.coord(x, y);\n gsf.setCentre(centre);\n gsf.setWidth(width);\n gsf.setHeight(height);\n return gsf.createEllipse();\n};\n\nexport const slope = (x1, y1, x2, y2) => {\n if (x1 === x2) {\n // vertical line has undefined slope\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n};\n\nexport const inverseSlope = (slope) => {\n if (slope === Infinity) {\n // vertical line; inverse/perpendicular is horizontal\n return 0.0;\n }\n if (slope === 0) {\n // horizontal line; inverse/pendendicular is vertical\n return Infinity;\n }\n return -1.0 / slope;\n};\n\nexport const distanceBetweenPoints = (x1, y1, x2, y2) => {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n};\n\nexport const comparePoints = (x1, y1, x2, y2) => {\n if (x1 < x2 || (x1 === x2 && y1 < y2)) {\n // less than\n return -1;\n } else if (x1 === x2 && y1 === y2) {\n // equal\n return 0;\n } else {\n // greater than\n return 1;\n }\n};\n\nexport const lesserPoint = (x1, y1, x2, y2) => {\n if (comparePoints(x1, y1, x2, y2) === -1) {\n return [x1, y1];\n }\n return [x2, y2];\n};\n\nexport const greaterPoint = (x1, y1, x2, y2) => {\n if (comparePoints(x1, y1, x2, y2) !== -1) {\n return [x1, y1];\n }\n return [x2, y2];\n};\n\nexport const rectangleForSegment = (thickness, x1, y1, x2, y2) => {\n const m = slope(x1, y1, x2, y2);\n const rectDelta = thickness / 2.0;\n\n // slope is delta y / delta x\n if (m === 0) {\n // door is horizontal\n return [\n x1,\n y1 + rectDelta,\n x2,\n y1 + rectDelta,\n x2,\n y1 - rectDelta,\n x1,\n y1 - rectDelta,\n ];\n }\n if (m === Infinity) {\n // door is vertical\n return [\n x1 - rectDelta,\n y1,\n x1 - rectDelta,\n y2,\n x2 + rectDelta,\n y2,\n x2 + rectDelta,\n y1,\n ];\n }\n\n // https://math.stackexchange.com/questions/656500/given-a-point-slope-and-a-distance-along-that-slope-easily-find-a-second-p/656512\n const theta = Math.atan(m);\n // flipped dx/dy and +/- to make things work\n const dy = rectDelta * Math.cos(theta);\n const dx = rectDelta * Math.sin(theta);\n return [\n // lower right - more x, more y\n x1 - dx,\n y1 + dy,\n // upper right - more x, less y\n x2 - dx,\n y2 + dy,\n // upper left - less x, less y\n x2 + dx,\n y2 - dy,\n // lower left - less x, more y\n x1 + dx,\n y1 - dy,\n // close the polygon\n x1 + dy,\n y1 - dx,\n ];\n};\n\nexport const simplify = (geom, distanceTolerance = 5.0) => {\n return TopologyPreservingSimplifier.simplify(geom, distanceTolerance);\n};\n\n// working around \"e.buffer doesn't exist\" monkey patching issue\nclass DensifyTransformer extends GeometryTransformer {\n constructor() {\n super();\n DensifyTransformer.constructor_.apply(this, arguments);\n }\n static constructor_() {\n this.distanceTolerance = null;\n const distanceTolerance = arguments[0];\n this.distanceTolerance = distanceTolerance;\n }\n transformMultiPolygon(geom, parent) {\n const roughGeom = super.transformMultiPolygon.call(this, geom, parent);\n return this.createValidArea(roughGeom);\n }\n transformPolygon(geom, parent) {\n const roughGeom = super.transformPolygon.call(this, geom, parent);\n if (parent instanceof MultiPolygon) return roughGeom;\n\n return this.createValidArea(roughGeom);\n }\n transformCoordinates(coords, parent) {\n const inputPts = coords.toCoordinateArray();\n let newPts = Densifier.densifyPoints(\n inputPts,\n this.distanceTolerance,\n parent.getPrecisionModel()\n );\n if (parent instanceof LineString && newPts.length === 1)\n newPts = new Array(0).fill(null);\n\n return this._factory.getCoordinateSequenceFactory().create(newPts);\n }\n createValidArea(roughAreaGeom) {\n // geometry.buffer function doesn't exist w/out monkey patching\n //return roughAreaGeom.buffer(0.0)\n return BufferOp.bufferOp(roughAreaGeom, 0.0);\n }\n}\n\nexport const densify = (geom, distanceTolerance = 50.0) => {\n //return Densifier.densify(geom, distanceTolerance);\n // return new DensifyTransformer(this._distanceTolerance).transform(this._inputGeom)\n return new DensifyTransformer(distanceTolerance).transform(geom);\n};\n\n// need to smooth each area etc in a multipolygon\nexport const smooth = (geometry) => {\n const polygons = [];\n for (let i = 0; i < geometry.getNumGeometries(); i++) {\n let smoothed = smoothPoly(geometry.getGeometryN(i));\n smoothed = expandGeometry(smoothed, 0.0);\n polygons.push(smoothed);\n }\n return new GeometryFactory().createMultiPolygon(polygons);\n};\n\nexport const smoothPoly = (poly) => {\n const oldCoords = poly.getCoordinates();\n const newCoords = [];\n newCoords.push(oldCoords[0]);\n for (let i = 0; i < oldCoords.length - 1; i++) {\n const c0 = oldCoords[i];\n const c1 = oldCoords[i + 1];\n const q = new Coordinate(\n 0.75 * c0.x + 0.25 * c1.x,\n 0.75 * c0.y + 0.25 * c1.y\n );\n const r = new Coordinate(\n 0.25 * c0.x + 0.75 * c1.x,\n 0.25 * c0.y + 0.75 * c1.y\n );\n newCoords.push(q);\n newCoords.push(r);\n }\n newCoords.push(oldCoords[oldCoords.length - 1]);\n return new GeometryFactory().createPolygon(newCoords);\n};\n\n/**\n * Split the wall if it's drawn over an existing door.\n *\n * @returns [[x1, y1, x2, y2], ...]\n */\nexport const maybeSplitWall = (x1, y1, x2, y2, doors) => {\n // TODO: this logic doesn't handle two doors side by side\n const wallPoly = twoPointsToLineString(x1, y1, x2, y2);\n for (const door of doors) {\n const doorPoly = twoPointsToLineString(door[0], door[1], door[2], door[3]);\n const overlap = contains(wallPoly, doorPoly);\n if (overlap) {\n // make sure points are consistently ordered\n const w1 = lesserPoint(x1, y1, x2, y2);\n const w2 = greaterPoint(x1, y1, x2, y2);\n const d1 = lesserPoint(door[0], door[1], door[2], door[3]);\n const d2 = greaterPoint(door[0], door[1], door[2], door[3]);\n return [\n [w1[0], w1[1], d1[0], d1[1]],\n [d2[0], d2[1], w2[0], w2[1]],\n ];\n }\n }\n // wall didn't contain any door, so return as-is\n return [[x1, y1, x2, y2]];\n};\n","import * as constants from \"./constants.js\";\nimport { Settings } from \"./settings.js\";\nimport * as geo from \"./geo-utils.js\";\n\nexport const makeWalls = async (state) => {\n if (!game.user.isGM) {\n // need GM privs to delete/create walls\n return;\n }\n\n // calculate a new set of walls\n let walls = [];\n if (state.geometry) {\n // simplify our geometry to downsample the amount of walls created\n const simplified = geo.simplify(state.geometry, 10.0);\n const wallBreaks = state.doors.concat(\n state.secretDoors,\n state.invisibleWalls\n );\n walls = makeWallsFromMulti(state.config, simplified, wallBreaks);\n }\n\n const interiorWalls = makeInteriorWalls(state.config, state.interiorWalls);\n const invisibleWalls = makeInvisibleWalls(state.config, state.invisibleWalls);\n const doors = makeDoors(state.config, state.doors);\n const secretDoors = makeSecretDoors(state.config, state.secretDoors);\n const allWalls = walls.concat(\n interiorWalls,\n invisibleWalls,\n doors,\n secretDoors\n );\n\n // figure out what walls need to be created, deleted, or left in place\n const wallDocs = dungeonDrawWallDocuments();\n const wallDocsStillNeeded = [];\n const wallsToCreate = [];\n for (const wall of allWalls) {\n let foundDoc = false;\n for (const wallDoc of wallDocs) {\n if (wallDataEqual(wall, wallDoc)) {\n wallDocsStillNeeded.push(wallDoc);\n foundDoc = true;\n break;\n }\n }\n if (!foundDoc) {\n wallsToCreate.push(wall);\n }\n }\n const idsStillNeeded = wallDocsStillNeeded.map((x) => x.id);\n const idsToDelete = wallDocs\n .filter((x) => !idsStillNeeded.includes(x.id))\n .map((x) => x.id);\n\n // create our new walls before deleting old ones,\n // to prevent any unwanted vision reveals.\n //\n // scene.update() triggers a redraw, which causes an infinite loop of redraw/refresh.\n // so we avoid using it :P\n if (wallsToCreate.length) {\n await canvas.scene.createEmbeddedDocuments(\"Wall\", wallsToCreate);\n }\n // finally, delete the previous set of walls\n if (idsToDelete.length) {\n try {\n await canvas.scene.deleteEmbeddedDocuments(\"Wall\", idsToDelete);\n } catch (error) {\n console.error(error);\n }\n }\n};\n\nconst wallDataEqual = (w1, w2) => {\n return (\n w1.c.length == w2.c.length &&\n w1.c[0] == w2.c[0] &&\n w1.c[1] == w2.c[1] &&\n w1.c[2] == w2.c[2] &&\n w1.c[3] == w2.c[3] &&\n w1.door == w2.door &&\n JSON.stringify(w1.flags) == JSON.stringify(w2.flags)\n );\n};\n\nconst dungeonDrawWallDocuments = () => {\n const walls = canvas.scene.getEmbeddedCollection(\"Wall\");\n const ddWalls = [];\n for (const wall of walls) {\n const flag = wall.getFlag(constants.MODULE_NAME, \"dungeonVersion\");\n if (flag) {\n ddWalls.push(wall);\n }\n }\n return ddWalls;\n};\n\nconst makeWallsFromMulti = (config, multi, doors) => {\n let walls = [];\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n walls = walls.concat(makeWallsFromPoly(config, poly, doors));\n }\n return walls;\n};\n\nconst makeWallsFromPoly = (config, poly, doors) => {\n const allWalls = [];\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n for (let i = 0; i < coords.length - 1; i++) {\n const x1 = coords[i].x;\n const y1 = coords[i].y;\n const x2 = coords[i + 1].x;\n const y2 = coords[i + 1].y;\n const splits = geo.maybeSplitWall(x1, y1, x2, y2, doors);\n for (const split of splits) {\n const data = wallData(config, split[0], split[1], split[2], split[3]);\n allWalls.push(data);\n }\n }\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n for (let i = 0; i < coords.length - 1; i++) {\n const data = wallData(\n config,\n coords[i].x,\n coords[i].y,\n coords[i + 1].x,\n coords[i + 1].y\n );\n allWalls.push(data);\n }\n }\n return allWalls;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeInteriorWalls = (config, walls) => {\n const allWalls = [];\n for (const wall of walls) {\n const data = wallData(config, wall[0], wall[1], wall[2], wall[3]);\n allWalls.push(data);\n }\n return allWalls;\n};\n\nconst makeInvisibleWalls = (config, walls) => {\n const allWalls = [];\n for (const wall of walls) {\n const data = invisibleWallData(config, wall[0], wall[1], wall[2], wall[3]);\n allWalls.push(data);\n }\n return allWalls;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeDoors = (config, doors) => {\n const allDoors = [];\n for (const door of doors) {\n const data = doorData(config, door[0], door[1], door[2], door[3]);\n allDoors.push(data);\n }\n return allDoors;\n};\n\n/** [[x1,y1,x2,y2],...] */\nconst makeSecretDoors = (config, doors) => {\n const allDoors = [];\n for (const door of doors) {\n const data = secretDoorData(config, door[0], door[1], door[2], door[3]);\n allDoors.push(data);\n }\n return allDoors;\n};\n\nconst wallData = (config, x1, y1, x2, y2) => {\n const data = {\n // From Foundry API docs:\n // \"The wall coordinates, a length-4 array of finite numbers [x0,y0,x1,y1]\"\n c: [x1, y1, x2, y2],\n door: 0, // wall\n flags: {},\n };\n data.flags[constants.MODULE_NAME] = {};\n data.flags[constants.MODULE_NAME][constants.FLAG_DUNGEON_VERSION] =\n constants.DUNGEON_VERSION;\n // Maybe set Canvas3D flags\n if (Settings.threeDCanvasEnabled()) {\n data.flags[\"levels-3d-preview\"] = {\n joinWall: true,\n wallDepth: config.wallThickness,\n wallSidesTexture: config.threeDWallSidesTexture,\n wallSidesTint: config.threeDWallSidesTextureTint,\n wallTexture: config.threeDWallTexture,\n wallTint: config.threeDWallTextureTint,\n };\n }\n return data;\n};\n\nconst doorData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 1; // door\n // Maybe set Canvas3D flags\n if (Settings.threeDCanvasEnabled()) {\n data.flags[\"levels-3d-preview\"][\"joinWall\"] = false;\n data.flags[\"levels-3d-preview\"][\"wallTexture\"] = config.threeDDoorTexture;\n data.flags[\"levels-3d-preview\"][\"wallTint\"] = config.threeDDoorTextureTint;\n }\n return data;\n};\n\nconst secretDoorData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 2; // secret\n return data;\n};\n\nconst invisibleWallData = (config, x1, y1, x2, y2) => {\n const data = wallData(config, x1, y1, x2, y2);\n data.door = 0; // secret\n data.light = 0;\n data.sight = 0;\n return data;\n};\n","import { FLAG_DUNGEON_STATE, MODULE_NAME } from \"./constants.js\";\nimport { makeWalls } from \"./wallmaker.js\";\nimport * as geo from \"./geo-utils.js\";\nimport { defaultConfig } from \"./themes.js\";\n\nexport class DungeonState {\n static FLAG_KEY = \"dungeonState\";\n\n constructor(\n geometry,\n themeAreas,\n doors,\n secretDoors,\n interiorWalls,\n invisibleWalls,\n config\n ) {\n this.geometry = geometry;\n this.themeAreas = themeAreas;\n this.doors = doors;\n this.secretDoors = secretDoors;\n this.interiorWalls = interiorWalls;\n this.invisibleWalls = invisibleWalls;\n this.config = config;\n }\n\n static startState() {\n return new DungeonState(null, [], [], [], [], [], defaultConfig());\n }\n\n clone() {\n return new DungeonState(\n this.geometry ? this.geometry.copy() : null,\n JSON.parse(JSON.stringify(this.themeAreas)),\n JSON.parse(JSON.stringify(this.doors)),\n this.secretDoors ? [...this.secretDoors] : [],\n this.interiorWalls ? [...this.interiorWalls] : [],\n this.invisibleWalls ? [...this.invisibleWalls] : [],\n JSON.parse(JSON.stringify(this.config))\n );\n }\n\n /* -------------------------------------------- */\n\n toString() {\n return JSON.stringify({\n // serialize the geometry object as a WKT string\n wkt: geo.geometryToWkt(this.geometry),\n themeAreas: this.themeAreas,\n doors: this.doors,\n secretDoors: this.secretDoors,\n interiorWalls: this.interiorWalls,\n invisibleWalls: this.invisibleWalls,\n config: this.config,\n });\n }\n\n // TODO: implement as fromJSON?\n static fromString(s) {\n if (!s) {\n return DungeonState.startState();\n }\n const obj = JSON.parse(s);\n const geometry = geo.wktToGeometry(obj.wkt);\n const themeAreas = obj.themeAreas ? obj.themeAreas : [];\n const doors = obj.doors ? obj.doors : [];\n const secretDoors = obj.secretDoors ? obj.secretDoors : [];\n const interiorWalls = obj.interiorWalls ? obj.interiorWalls : [];\n const invisibleWalls = obj.invisibleWalls ? obj.invisibleWalls : [];\n // fill in any new defaults\n const config = foundry.utils.mergeObject(defaultConfig(), obj.config);\n return new DungeonState(\n geometry,\n themeAreas,\n doors,\n secretDoors,\n interiorWalls,\n invisibleWalls,\n config\n );\n }\n\n /* -------------------------------------------- */\n\n async saveToJournalEntry(journalEntry) {\n const serialized = this.toString();\n // update walls before we update the journal\n await makeWalls(this);\n await journalEntry.setFlag(MODULE_NAME, FLAG_DUNGEON_STATE, serialized);\n }\n\n static async loadFromJournalEntry(journalEntry) {\n await this.maybeMigrateJournalEntry(journalEntry);\n const content = journalEntry.getFlag(MODULE_NAME, FLAG_DUNGEON_STATE);\n return DungeonState.fromString(content);\n }\n\n static async maybeMigrateJournalEntry(journalEntry) {\n if (!game.user.isGM) {\n return;\n }\n if (journalEntry.pages) {\n // v10\n const page = journalEntry.pages.find((p) => p.type === \"text\");\n if (page?.text?.content) {\n console.log(\"Migrating v10 page.text.content\");\n const dungeonState = DungeonState.fromString(page.text.content);\n await dungeonState.saveToJournalEntry(journalEntry);\n await page.delete();\n }\n } else if (journalEntry.data.content) {\n // v9\n console.log(\"Migrating v9 journalEntry.data.content\");\n const dungeonState = DungeonState.fromString(journalEntry.data.content);\n await dungeonState.saveToJournalEntry(journalEntry);\n await journalEntry.update({ content: null });\n }\n }\n}\n","/*!\n * pixi-filters - v4.1.5\n * Compiled Wed, 29 Sep 2021 14:05:57 UTC\n *\n * pixi-filters is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nvar __filters=function(e,n,t,r,o,i,l,a){\"use strict\";var s=function(e,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)};function u(e,n){function t(){this.constructor=e}s(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var f=function(){return(f=Object.assign||function(e){for(var n,t=arguments,r=1,o=arguments.length;r 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\\n rgb.r *= red;\\n rgb.g *= green;\\n rgb.b *= blue;\\n c.rgb = rgb * brightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n gl_FragColor = c * alpha;\\n}\\n\")||this;return t.gamma=1,t.saturation=1,t.contrast=1,t.brightness=1,t.red=1,t.green=1,t.blue=1,t.alpha=1,Object.assign(t,n),t}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,n,t,r)},n}(n.Filter),p=function(e){function n(n){void 0===n&&(n=.5);var t=e.call(this,c,\"\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform float threshold;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccuracy , but good enought for this feature.\\n float _max = max(max(color.r, color.g), color.b);\\n float _min = min(min(color.r, color.g), color.b);\\n float brightness = (_max + _min) * 0.5;\\n\\n if(brightness > threshold) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\\n }\\n}\\n\")||this;return t.threshold=n,t}return u(n,e),Object.defineProperty(n.prototype,\"threshold\",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),n}(n.Filter),d=function(e){function n(n,r,o){void 0===n&&(n=4),void 0===r&&(r=3),void 0===o&&(o=!1);var i=e.call(this,c,o?\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\nuniform vec4 filterClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\\n\":\"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\")||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new t.Point,i.pixelSize=1,i._clamp=o,Array.isArray(n)?i.kernels=n:(i._blur=n,i.quality=r),i}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i=this._pixelSize.x/n._frame.width,l=this._pixelSize.y/n._frame.height;if(1===this._quality||0===this._blur)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*l,e.applyFilter(this,n,t,r);else{for(var a=e.getFilterTexture(),s=n,u=a,f=void 0,c=this._quality-1,m=0;m0)for(var r=e,o=e/n,i=1;i0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"clamp\",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"pixelSize\",{get:function(){return this._pixelSize},set:function(e){\"number\"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof t.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"quality\",{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blur\",{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),n}(n.Filter),h=function(e){function n(t){var o=e.call(this,c,\"uniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D bloomTexture;\\nuniform float bloomScale;\\nuniform float brightness;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n color.rgb *= brightness;\\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\\n bloomColor.rgb *= bloomScale;\\n gl_FragColor = color + bloomColor;\\n}\\n\")||this;o.bloomScale=1,o.brightness=1,o._resolution=r.settings.FILTER_RESOLUTION,\"number\"==typeof t&&(t={threshold:t});var i=Object.assign(n.defaults,t);o.bloomScale=i.bloomScale,o.brightness=i.brightness;var l=i.kernels,a=i.blur,s=i.quality,u=i.pixelSize,f=i.resolution;return o._extractFilter=new p(i.threshold),o._extractFilter.resolution=f,o._blurFilter=l?new d(l):new d(a,s),o.pixelSize=u,o.resolution=f,o}return u(n,e),n.prototype.apply=function(e,n,t,r,o){var i=e.getFilterTexture();this._extractFilter.apply(e,n,i,1,o);var l=e.getFilterTexture();this._blurFilter.apply(e,i,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,n,t,r),e.returnFilterTexture(l),e.returnFilterTexture(i)},Object.defineProperty(n.prototype,\"resolution\",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"threshold\",{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"kernels\",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blur\",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"quality\",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"pixelSize\",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),n.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:r.settings.FILTER_RESOLUTION},n}(n.Filter),g=function(e){function n(n){void 0===n&&(n=8);var t=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform float pixelSize;\\nuniform sampler2D uSampler;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n return floor( coord / size ) * size;\\n}\\n\\nvec2 getMod(vec2 coord, vec2 size)\\n{\\n return mod( coord , size) / size;\\n}\\n\\nfloat character(float n, vec2 p)\\n{\\n p = floor(p*vec2(4.0, -4.0) + 2.5);\\n\\n if (clamp(p.x, 0.0, 4.0) == p.x)\\n {\\n if (clamp(p.y, 0.0, 4.0) == p.y)\\n {\\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\\n }\\n }\\n return 0.0;\\n}\\n\\nvoid main()\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n // get the rounded color..\\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n vec4 color = texture2D(uSampler, pixCoord);\\n\\n // determine the character to use\\n float gray = (color.r + color.g + color.b) / 3.0;\\n\\n float n = 65536.0; // .\\n if (gray > 0.2) n = 65600.0; // :\\n if (gray > 0.3) n = 332772.0; // *\\n if (gray > 0.4) n = 15255086.0; // o\\n if (gray > 0.5) n = 23385164.0; // &\\n if (gray > 0.6) n = 15252014.0; // 8\\n if (gray > 0.7) n = 13199452.0; // @\\n if (gray > 0.8) n = 11512810.0; // #\\n\\n // get the mod..\\n vec2 modd = getMod(coord, vec2(pixelSize));\\n\\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\\n\\n}\\n\")||this;return t.size=n,t}return u(n,e),Object.defineProperty(n.prototype,\"size\",{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),n}(n.Filter),v=function(e){function n(n){var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float transformX;\\nuniform float transformY;\\nuniform vec3 lightColor;\\nuniform float lightAlpha;\\nuniform vec3 shadowColor;\\nuniform float shadowAlpha;\\n\\nvoid main(void) {\\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float light = texture2D(uSampler, vTextureCoord - transform).a;\\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\\n\\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\\n gl_FragColor = vec4(color.rgb * color.a, color.a);\\n}\\n\")||this;return t._thickness=2,t._angle=0,t.uniforms.lightColor=new Float32Array(3),t.uniforms.shadowColor=new Float32Array(3),Object.assign(t,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},n),t.padding=1,t}return u(n,e),n.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(n.prototype,\"rotation\",{get:function(){return this._angle/t.DEG_TO_RAD},set:function(e){this._angle=e*t.DEG_TO_RAD,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"thickness\",{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lightColor\",{get:function(){return o.rgb2hex(this.uniforms.lightColor)},set:function(e){o.hex2rgb(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lightAlpha\",{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"shadowColor\",{get:function(){return o.rgb2hex(this.uniforms.shadowColor)},set:function(e){o.hex2rgb(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"shadowAlpha\",{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),n}(n.Filter),y=function(e){function n(n,o,s,u){void 0===n&&(n=2),void 0===o&&(o=4),void 0===s&&(s=r.settings.FILTER_RESOLUTION),void 0===u&&(u=5);var f,c,m=e.call(this)||this;return\"number\"==typeof n?(f=n,c=n):n instanceof t.Point?(f=n.x,c=n.y):Array.isArray(n)&&(f=n[0],c=n[1]),m.blurXFilter=new a.BlurFilterPass(!0,f,o,s,u),m.blurYFilter=new a.BlurFilterPass(!1,c,o,s,u),m.blurYFilter.blendMode=i.BLEND_MODES.SCREEN,m.defaultFilter=new l.AlphaFilter,m}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this.defaultFilter.apply(e,n,t,r),this.blurXFilter.apply(e,n,o,1),this.blurYFilter.apply(e,o,t,0),e.returnFilterTexture(o)},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blurX\",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blurY\",{get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e},enumerable:!1,configurable:!0}),n}(n.Filter),b=function(e){function n(t){var r=e.call(this,c,\"uniform float radius;\\nuniform float strength;\\nuniform vec2 center;\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nvoid main()\\n{\\n vec2 coord = vTextureCoord * filterArea.xy;\\n coord -= center * dimensions.xy;\\n float distance = length(coord);\\n if (distance < radius) {\\n float percent = distance / radius;\\n if (strength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\\n }\\n }\\n coord += center * dimensions.xy;\\n coord /= filterArea.xy;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n gl_FragColor = color;\\n}\\n\")||this;return r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),n.defaults={center:[.5,.5],radius:100,strength:1},n}(n.Filter),x=function(e){function t(n,t,r){void 0===t&&(t=!1),void 0===r&&(r=1);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D colorMap;\\nuniform float _mix;\\nuniform float _size;\\nuniform float _sliceSize;\\nuniform float _slicePixelSize;\\nuniform float _sliceInnerSize;\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\\n\\n vec4 adjusted;\\n if (color.a > 0.0) {\\n color.rgb /= color.a;\\n float innerWidth = _size - 1.0;\\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\\n float s0 = xOffset + (zSlice0 * _sliceSize);\\n float s1 = xOffset + (zSlice1 * _sliceSize);\\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\\n float zOffset = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n\\n color.rgb *= color.a;\\n }\\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\\n\\n}\")||this;return o.mix=1,o._size=0,o._sliceSize=0,o._slicePixelSize=0,o._sliceInnerSize=0,o._nearest=!1,o._scaleMode=null,o._colorMap=null,o._scaleMode=null,o.nearest=t,o.mix=r,o.colorMap=n,o}return u(t,e),t.prototype.apply=function(e,n,t,r){this.uniforms._mix=this.mix,e.applyFilter(this,n,t,r)},Object.defineProperty(t.prototype,\"colorSize\",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"colorMap\",{get:function(){return this._colorMap},set:function(e){var t;e&&(e instanceof n.Texture||(e=n.Texture.from(e)),(null===(t=e)||void 0===t?void 0:t.baseTexture)&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=i.MIPMAP_MODES.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nearest\",{get:function(){return this._nearest},set:function(e){this._nearest=e,this._scaleMode=e?i.SCALE_MODES.NEAREST:i.SCALE_MODES.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=i.MIPMAP_MODES.OFF,n._updateID++,n.baseTexture.emit(\"update\",n.baseTexture))},enumerable:!1,configurable:!0}),t.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit(\"update\",e.baseTexture),this.colorMap=e)},t.prototype.destroy=function(n){void 0===n&&(n=!1),this._colorMap&&this._colorMap.destroy(n),e.prototype.destroy.call(this)},t}(n.Filter),_=function(e){function n(n,t){void 0===n&&(n=0),void 0===t&&(t=1);var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 color;\\nuniform float alpha;\\n\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a);\\n}\\n\")||this;return r._color=0,r._alpha=1,r.uniforms.color=new Float32Array(3),r.color=n,r.alpha=t,r}return u(n,e),Object.defineProperty(n.prototype,\"color\",{get:function(){return this._color},set:function(e){var n=this.uniforms.color;\"number\"==typeof e?(o.hex2rgb(e,n),this._color=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._color=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this._alpha},set:function(e){this.uniforms.alpha=e,this._alpha=e},enumerable:!1,configurable:!0}),n}(n.Filter),C=function(e){function n(n,t,r){void 0===n&&(n=16711680),void 0===t&&(t=0),void 0===r&&(r=.4);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 originalColor;\\nuniform vec3 newColor;\\nuniform float epsilon;\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\\n float colorDistance = length(colorDiff);\\n float doReplace = step(colorDistance, epsilon);\\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\\n}\\n\")||this;return o._originalColor=16711680,o._newColor=0,o.uniforms.originalColor=new Float32Array(3),o.uniforms.newColor=new Float32Array(3),o.originalColor=n,o.newColor=t,o.epsilon=r,o}return u(n,e),Object.defineProperty(n.prototype,\"originalColor\",{get:function(){return this._originalColor},set:function(e){var n=this.uniforms.originalColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._originalColor=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._originalColor=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"newColor\",{get:function(){return this._newColor},set:function(e){var n=this.uniforms.newColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._newColor=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],this._newColor=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"epsilon\",{get:function(){return this.uniforms.epsilon},set:function(e){this.uniforms.epsilon=e},enumerable:!1,configurable:!0}),n}(n.Filter),S=function(e){function n(n,t,r){void 0===t&&(t=200),void 0===r&&(r=200);var o=e.call(this,c,\"precision mediump float;\\n\\nvarying mediump vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec2 texelSize;\\nuniform float matrix[9];\\n\\nvoid main(void)\\n{\\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\\n\\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\\n\\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\\n\\n gl_FragColor =\\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\\n\\n gl_FragColor.a = c22.a;\\n}\\n\")||this;return o.uniforms.texelSize=new Float32Array(2),o.uniforms.matrix=new Float32Array(9),void 0!==n&&(o.matrix=n),o.width=t,o.height=r,o}return u(n,e),Object.defineProperty(n.prototype,\"matrix\",{get:function(){return this.uniforms.matrix},set:function(e){var n=this;e.forEach((function(e,t){n.uniforms.matrix[t]=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"width\",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(e){this.uniforms.texelSize[0]=1/e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"height\",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(e){this.uniforms.texelSize[1]=1/e},enumerable:!1,configurable:!0}),n}(n.Filter),F=function(e){function n(){return e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\n\\nvoid main(void)\\n{\\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\\n\\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\\n\\n if (lum < 1.00)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.75)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.50)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.3)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n}\\n\")||this}return u(n,e),n}(n.Filter),z=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nconst float SQRT_2 = 1.414213;\\n\\nconst float light = 1.0;\\n\\nuniform float curvature;\\nuniform float lineWidth;\\nuniform float lineContrast;\\nuniform bool verticalLine;\\nuniform float noise;\\nuniform float noiseSize;\\n\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\n\\nuniform float seed;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 dir = vec2(vTextureCoord.xy - vec2(0.5, 0.5)) * filterArea.xy / dimensions;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 rgb = gl_FragColor.rgb;\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n rgb += _noise * noise;\\n }\\n\\n if (lineWidth > 0.0)\\n {\\n float _c = curvature > 0. ? curvature : 1.;\\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\\n vec2 uv = dir * k;\\n\\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\\n rgb *= j;\\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\\n rgb *= 0.99 + ceil(segment) * 0.015;\\n }\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n gl_FragColor.rgb = rgb;\\n}\\n\")||this;return r.time=0,r.seed=0,r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"curvature\",{get:function(){return this.uniforms.curvature},set:function(e){this.uniforms.curvature=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lineWidth\",{get:function(){return this.uniforms.lineWidth},set:function(e){this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"lineContrast\",{get:function(){return this.uniforms.lineContrast},set:function(e){this.uniforms.lineContrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"verticalLine\",{get:function(){return this.uniforms.verticalLine},set:function(e){this.uniforms.verticalLine=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noise\",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noiseSize\",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignetting\",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingAlpha\",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingBlur\",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),n.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},n}(n.Filter),O=function(e){function n(n,t){void 0===n&&(n=1),void 0===t&&(t=5);var r=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform vec4 filterArea;\\nuniform sampler2D uSampler;\\n\\nuniform float angle;\\nuniform float scale;\\n\\nfloat pattern()\\n{\\n float s = sin(angle), c = cos(angle);\\n vec2 tex = vTextureCoord * filterArea.xy;\\n vec2 point = vec2(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * scale;\\n return (sin(point.x) * sin(point.y)) * 4.0;\\n}\\n\\nvoid main()\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float average = (color.r + color.g + color.b) / 3.0;\\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\\n}\\n\")||this;return r.scale=n,r.angle=t,r}return u(n,e),Object.defineProperty(n.prototype,\"scale\",{get:function(){return this.uniforms.scale},set:function(e){this.uniforms.scale=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"angle\",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),n}(n.Filter),P=function(e){function i(o){var l=e.call(this)||this;l.angle=45,l._distance=5,l._resolution=r.settings.FILTER_RESOLUTION;var a=o?f(f({},i.defaults),o):i.defaults,s=a.kernels,u=a.blur,m=a.quality,p=a.pixelSize,h=a.resolution;l._tintFilter=new n.Filter(c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform float alpha;\\nuniform vec3 color;\\n\\nuniform vec2 shift;\\nuniform vec4 inputSize;\\n\\nvoid main(void){\\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\\n\\n // Premultiply alpha\\n sample.rgb = color.rgb * sample.a;\\n\\n // alpha user alpha\\n sample *= alpha;\\n\\n gl_FragColor = sample;\\n}\"),l._tintFilter.uniforms.color=new Float32Array(4),l._tintFilter.uniforms.shift=new t.Point,l._tintFilter.resolution=h,l._blurFilter=s?new d(s):new d(u,m),l.pixelSize=p,l.resolution=h;var g=a.shadowOnly,v=a.rotation,y=a.distance,b=a.alpha,x=a.color;return l.shadowOnly=g,l.rotation=v,l.distance=y,l.alpha=b,l.color=x,l._updatePadding(),l}return u(i,e),i.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this._tintFilter.apply(e,n,o,1),this._blurFilter.apply(e,o,t,r),!0!==this.shadowOnly&&e.applyFilter(this,n,t,0),e.returnFilterTexture(o)},i.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},i.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(i.prototype,\"resolution\",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"distance\",{get:function(){return this._distance},set:function(e){this._distance=e,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"rotation\",{get:function(){return this.angle/t.DEG_TO_RAD},set:function(e){this.angle=e*t.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"alpha\",{get:function(){return this._tintFilter.uniforms.alpha},set:function(e){this._tintFilter.uniforms.alpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"color\",{get:function(){return o.rgb2hex(this._tintFilter.uniforms.color)},set:function(e){o.hex2rgb(e,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"kernels\",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"blur\",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"quality\",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,\"pixelSize\",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),i.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:r.settings.FILTER_RESOLUTION},i}(n.Filter),A=function(e){function n(n){void 0===n&&(n=5);var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float strength;\\nuniform vec4 filterArea;\\n\\n\\nvoid main(void)\\n{\\n\\tvec2 onePixel = vec2(1.0 / filterArea);\\n\\n\\tvec4 color;\\n\\n\\tcolor.rgb = vec3(0.5);\\n\\n\\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\\n\\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\\n\\n\\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\\n\\n\\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\\n\\n\\tgl_FragColor = vec4(color.rgb * alpha, alpha);\\n}\\n\")||this;return t.strength=n,t}return u(n,e),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.strength},set:function(e){this.uniforms.strength=e},enumerable:!1,configurable:!0}),n}(n.Filter),T=function(e){function r(t){var o=e.call(this,c,\"// precision highp float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\nuniform float aspect;\\n\\nuniform sampler2D displacementMap;\\nuniform float offset;\\nuniform float sinDir;\\nuniform float cosDir;\\nuniform int fillMode;\\n\\nuniform float seed;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nconst int TRANSPARENT = 0;\\nconst int ORIGINAL = 1;\\nconst int LOOP = 2;\\nconst int CLAMP = 3;\\nconst int MIRROR = 4;\\n\\nvoid main(void)\\n{\\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n return;\\n }\\n\\n float cx = coord.x - 0.5;\\n float cy = (coord.y - 0.5) * aspect;\\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\\n\\n // displacementMap: repeat\\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\\n\\n // displacementMap: mirror\\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\\n\\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\\n\\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\\n\\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n } else {\\n if( coord.x > filterClamp.z ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x -= filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = filterClamp.z * 2.0 - coord.x;\\n }\\n } else if( coord.x < filterClamp.x ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x += filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x *= -filterClamp.z;\\n }\\n }\\n\\n if( coord.y > filterClamp.w ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y -= filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = filterClamp.w * 2.0 - coord.y;\\n }\\n } else if( coord.y < filterClamp.y ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y += filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y *= -filterClamp.w;\\n }\\n }\\n }\\n\\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, coord).a;\\n}\\n\")||this;return o.offset=100,o.fillMode=r.TRANSPARENT,o.average=!1,o.seed=0,o.minSize=8,o.sampleSize=512,o._slices=0,o._offsets=new Float32Array(1),o._sizes=new Float32Array(1),o._direction=-1,o.uniforms.dimensions=new Float32Array(2),o._canvas=document.createElement(\"canvas\"),o._canvas.width=4,o._canvas.height=o.sampleSize,o.texture=n.Texture.from(o._canvas,{scaleMode:i.SCALE_MODES.NEAREST}),Object.assign(o,r.defaults,t),o}return u(r,e),r.prototype.apply=function(e,n,t,r){var o=n.filterFrame,i=o.width,l=o.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=l,this.uniforms.aspect=l/i,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,n,t,r)},r.prototype._randomizeSizes=function(){var e=this._sizes,n=this._slices-1,t=this.sampleSize,r=Math.min(this.minSize/t,.9/this._slices);if(this.average){for(var o=this._slices,i=1,l=0;l0;n--){var t=Math.random()*n>>0,r=e[n];e[n]=e[t],e[t]=r}},r.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,s=e<0?-e:0;r.fillStyle=\"rgba(\"+a+\", \"+s+\", 0, 1)\",r.fillRect(0,o>>0,n,l+1>>0),o+=l}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(r.prototype,\"sizes\",{get:function(){return this._sizes},set:function(e){for(var n=Math.min(this._slices,e.length),t=0;t>0)},Object.defineProperty(n.prototype,\"offset\",{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),n}(n.Filter),M=function(e){function n(n,t,r){void 0===t&&(t=.05),void 0===r&&(r=n.length);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float epsilon;\\n\\nconst int MAX_COLORS = %maxColors%;\\n\\nuniform vec3 originalColors[MAX_COLORS];\\nuniform vec3 targetColors[MAX_COLORS];\\n\\nvoid main(void)\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n\\n float alpha = gl_FragColor.a;\\n if (alpha < 0.0001)\\n {\\n return;\\n }\\n\\n vec3 color = gl_FragColor.rgb / alpha;\\n\\n for(int i = 0; i < MAX_COLORS; i++)\\n {\\n vec3 origColor = originalColors[i];\\n if (origColor.r < 0.0)\\n {\\n break;\\n }\\n vec3 colorDiff = origColor - color;\\n if (length(colorDiff) < epsilon)\\n {\\n vec3 targetColor = targetColors[i];\\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\\n return;\\n }\\n }\\n}\\n\".replace(/%maxColors%/g,r.toFixed(0)))||this;return o._replacements=[],o._maxColors=0,o.epsilon=t,o._maxColors=r,o.uniforms.originalColors=new Float32Array(3*r),o.uniforms.targetColors=new Float32Array(3*r),o.replacements=n,o}return u(n,e),Object.defineProperty(n.prototype,\"replacements\",{get:function(){return this._replacements},set:function(e){var n=this.uniforms.originalColors,t=this.uniforms.targetColors,r=e.length;if(r>this._maxColors)throw new Error(\"Length of replacements (\"+r+\") exceeds the maximum colors length (\"+this._maxColors+\")\");n[3*r]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\\n}\\n\\n\\nvoid main()\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 color = gl_FragColor.rgb;\\n\\n if (sepia > 0.0)\\n {\\n float gray = (color.x + color.y + color.z) / 3.0;\\n vec3 grayscale = vec3(gray);\\n\\n color = Overlay(SEPIA_RGB, grayscale);\\n\\n color = grayscale + sepia * (color - grayscale);\\n }\\n\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\\n dir.y *= dimensions.y / dimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n if (scratchDensity > seed && scratch != 0.0)\\n {\\n float phase = seed * 256.0;\\n float s = mod(floor(phase), 2.0);\\n float dist = 1.0 / scratchDensity;\\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\\n if (d < seed * 0.6 + 0.4)\\n {\\n highp float period = scratchDensity * 10.0;\\n\\n float xx = coord.x * period + phase;\\n float aa = abs(mod(xx, 0.5) * 4.0);\\n float bb = mod(floor(xx / 0.5), 2.0);\\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n float kk = 2.0 * period;\\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\\n float dh = dw * kk;\\n\\n float tine = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n float _sign = sign(scratch);\\n\\n tine = s * tine / period + scratch + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color.rgb *= tine;\\n }\\n }\\n }\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\\n // float _noise = snoise(d) * 0.5;\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n color += _noise * noise;\\n }\\n\\n gl_FragColor.rgb = color;\\n}\\n\")||this;return o.seed=0,o.uniforms.dimensions=new Float32Array(2),\"number\"==typeof t?(o.seed=t,t=void 0):o.seed=r,Object.assign(o,n.defaults,t),o}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,this.uniforms.seed=this.seed,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"sepia\",{get:function(){return this.uniforms.sepia},set:function(e){this.uniforms.sepia=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noise\",{get:function(){return this.uniforms.noise},set:function(e){this.uniforms.noise=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"noiseSize\",{get:function(){return this.uniforms.noiseSize},set:function(e){this.uniforms.noiseSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratch\",{get:function(){return this.uniforms.scratch},set:function(e){this.uniforms.scratch=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratchDensity\",{get:function(){return this.uniforms.scratchDensity},set:function(e){this.uniforms.scratchDensity=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"scratchWidth\",{get:function(){return this.uniforms.scratchWidth},set:function(e){this.uniforms.scratchWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignetting\",{get:function(){return this.uniforms.vignetting},set:function(e){this.uniforms.vignetting=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingAlpha\",{get:function(){return this.uniforms.vignettingAlpha},set:function(e){this.uniforms.vignettingAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"vignettingBlur\",{get:function(){return this.uniforms.vignettingBlur},set:function(e){this.uniforms.vignettingBlur=e},enumerable:!1,configurable:!0}),n.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},n}(n.Filter),E=function(e){function n(t,r,o){void 0===t&&(t=1),void 0===r&&(r=0),void 0===o&&(o=.1);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 thickness;\\nuniform vec4 outlineColor;\\nuniform vec4 filterClamp;\\n\\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\\n\\nvoid main(void) {\\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\\n vec4 curColor;\\n float maxAlpha = 0.;\\n vec2 displaced;\\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\\n maxAlpha = max(maxAlpha, curColor.a);\\n }\\n float resultAlpha = max(maxAlpha, ownColor.a);\\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\\n}\\n\".replace(/\\$\\{angleStep\\}/,n.getAngleStep(o)))||this;return i._thickness=1,i.uniforms.thickness=new Float32Array([0,0]),i.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(i,{thickness:t,color:r,quality:o}),i}return u(n,e),n.getAngleStep=function(e){var t=Math.max(e*n.MAX_SAMPLES,n.MIN_SAMPLES);return(2*Math.PI/t).toFixed(7)},n.prototype.apply=function(e,n,t,r){this.uniforms.thickness[0]=this._thickness/n._frame.width,this.uniforms.thickness[1]=this._thickness/n._frame.height,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"color\",{get:function(){return o.rgb2hex(this.uniforms.outlineColor)},set:function(e){o.hex2rgb(e,this.uniforms.outlineColor)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"thickness\",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.padding=e},enumerable:!1,configurable:!0}),n.MIN_SAMPLES=1,n.MAX_SAMPLES=100,n}(n.Filter),I=function(e){function n(n){void 0===n&&(n=10);var t=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform vec2 size;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n\\treturn floor( coord / size ) * size;\\n}\\n\\nvoid main(void)\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = pixelate(coord, size);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord);\\n}\\n\")||this;return t.size=n,t}return u(n,e),Object.defineProperty(n.prototype,\"size\",{get:function(){return this.uniforms.size},set:function(e){\"number\"==typeof e&&(e=[e,e]),this.uniforms.size=e},enumerable:!1,configurable:!0}),n}(n.Filter),k=function(e){function n(n,t,r,o){void 0===n&&(n=0),void 0===t&&(t=[0,0]),void 0===r&&(r=5),void 0===o&&(o=-1);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float uRadian;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform int uKernelSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n float aspect = filterArea.y / filterArea.x;\\n vec2 center = uCenter.xy / filterArea.xy;\\n float gradient = uRadius / filterArea.x * 0.3;\\n float radius = uRadius / filterArea.x - gradient * 0.5;\\n int k = uKernelSize - 1;\\n\\n vec2 coord = vTextureCoord;\\n vec2 dir = vec2(center - coord);\\n float dist = length(vec2(dir.x, dir.y * aspect));\\n\\n float radianStep = uRadian;\\n if (radius >= 0.0 && dist > radius) {\\n float delta = dist - radius;\\n float gap = gradient;\\n float scale = 1.0 - abs(delta / gap);\\n if (scale <= 0.0) {\\n gl_FragColor = color;\\n return;\\n }\\n radianStep *= scale;\\n }\\n radianStep /= float(k);\\n\\n float s = sin(radianStep);\\n float c = cos(radianStep);\\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n\\n vec4 sample = texture2D(uSampler, coord);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample;\\n }\\n\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\")||this;return i._angle=0,i.angle=n,i.center=t,i.kernelSize=r,i.radius=o,i}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"angle\",{get:function(){return this._angle},set:function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),n}(n.Filter),L=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nuniform bool mirror;\\nuniform float boundary;\\nuniform vec2 amplitude;\\nuniform vec2 waveLength;\\nuniform vec2 alpha;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n if (coord.y < boundary) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\\n float areaY = boundary * dimensions.y / filterArea.y;\\n float v = areaY + areaY - vTextureCoord.y;\\n float y = mirror ? v : vTextureCoord.y;\\n\\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\\n\\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\\n x = clamp(x, filterClamp.x, filterClamp.z);\\n\\n vec4 color = texture2D(uSampler, vec2(x, y));\\n\\n gl_FragColor = color * _alpha;\\n}\\n\")||this;return r.time=0,r.uniforms.amplitude=new Float32Array(2),r.uniforms.waveLength=new Float32Array(2),r.uniforms.alpha=new Float32Array(2),r.uniforms.dimensions=new Float32Array(2),Object.assign(r,n.defaults,t),r}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"mirror\",{get:function(){return this.uniforms.mirror},set:function(e){this.uniforms.mirror=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"boundary\",{get:function(){return this.uniforms.boundary},set:function(e){this.uniforms.boundary=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"amplitude\",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"waveLength\",{get:function(){return this.uniforms.waveLength},set:function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this.uniforms.alpha},set:function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},enumerable:!1,configurable:!0}),n.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},n}(n.Filter),N=function(e){function n(n,t,r){void 0===n&&(n=[-10,0]),void 0===t&&(t=[0,10]),void 0===r&&(r=[0,0]);var o=e.call(this,c,\"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nvoid main(void)\\n{\\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\\n}\\n\")||this;return o.red=n,o.green=t,o.blue=r,o}return u(n,e),Object.defineProperty(n.prototype,\"red\",{get:function(){return this.uniforms.red},set:function(e){this.uniforms.red=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"green\",{get:function(){return this.uniforms.green},set:function(e){this.uniforms.green=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"blue\",{get:function(){return this.uniforms.blue},set:function(e){this.uniforms.blue=e},enumerable:!1,configurable:!0}),n}(n.Filter),X=function(e){function n(t,r,o){void 0===t&&(t=[0,0]),void 0===o&&(o=0);var i=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\n\\nuniform vec2 center;\\n\\nuniform float amplitude;\\nuniform float wavelength;\\n// uniform float power;\\nuniform float brightness;\\nuniform float speed;\\nuniform float radius;\\n\\nuniform float time;\\n\\nconst float PI = 3.14159;\\n\\nvoid main()\\n{\\n float halfWavelength = wavelength * 0.5 / filterArea.x;\\n float maxRadius = radius / filterArea.x;\\n float currentRadius = time * speed / filterArea.x;\\n\\n float fade = 1.0;\\n\\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n\\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\\n dir.y *= filterArea.y / filterArea.x;\\n float dist = length(dir);\\n\\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n vec2 diffUV = normalize(dir);\\n\\n float diff = (dist - currentRadius) / halfWavelength;\\n\\n float p = 1.0 - pow(abs(diff), 2.0);\\n\\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\\n\\n vec2 offset = diffUV * powDiff / filterArea.xy;\\n\\n // Do clamp :\\n vec2 coord = vTextureCoord + offset;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n // No clamp :\\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\\n\\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\\n\\n gl_FragColor = color;\\n}\\n\")||this;return i.center=t,Object.assign(i,n.defaults,r),i.time=o,i}return u(n,e),n.prototype.apply=function(e,n,t,r){this.uniforms.time=this.time,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.center},set:function(e){this.uniforms.center=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"amplitude\",{get:function(){return this.uniforms.amplitude},set:function(e){this.uniforms.amplitude=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"wavelength\",{get:function(){return this.uniforms.wavelength},set:function(e){this.uniforms.wavelength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"brightness\",{get:function(){return this.uniforms.brightness},set:function(e){this.uniforms.brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"speed\",{get:function(){return this.uniforms.speed},set:function(e){this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),n.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},n}(n.Filter),B=function(e){function n(n,t,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=e.call(this,c,\"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D uLightmap;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\nuniform vec4 ambientColor;\\nvoid main() {\\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\\n vec4 light = texture2D(uLightmap, lightCoord);\\n vec3 ambient = ambientColor.rgb * ambientColor.a;\\n vec3 intensity = ambient + light.rgb;\\n vec3 finalColor = diffuseColor.rgb * intensity;\\n gl_FragColor = vec4(finalColor, diffuseColor.a);\\n}\\n\")||this;return o._color=0,o.uniforms.dimensions=new Float32Array(2),o.uniforms.ambientColor=new Float32Array([0,0,0,r]),o.texture=n,o.color=t,o}return u(n,e),n.prototype.apply=function(e,n,t,r){var o,i;this.uniforms.dimensions[0]=null===(o=n.filterFrame)||void 0===o?void 0:o.width,this.uniforms.dimensions[1]=null===(i=n.filterFrame)||void 0===i?void 0:i.height,e.applyFilter(this,n,t,r)},Object.defineProperty(n.prototype,\"texture\",{get:function(){return this.uniforms.uLightmap},set:function(e){this.uniforms.uLightmap=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"color\",{get:function(){return this._color},set:function(e){var n=this.uniforms.ambientColor;\"number\"==typeof e?(o.hex2rgb(e,n),this._color=e):(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],this._color=o.rgb2hex(n))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this.uniforms.ambientColor[3]},set:function(e){this.uniforms.ambientColor[3]=e},enumerable:!1,configurable:!0}),n}(n.Filter),G=function(e){function n(n,r,o,i){void 0===n&&(n=100),void 0===r&&(r=600);var l=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float blur;\\nuniform float gradientBlur;\\nuniform vec2 start;\\nuniform vec2 end;\\nuniform vec2 delta;\\nuniform vec2 texSize;\\n\\nfloat random(vec3 scale, float seed)\\n{\\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\\n}\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n float total = 0.0;\\n\\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\\n\\n for (float t = -30.0; t <= 30.0; t++)\\n {\\n float percent = (t + offset - 0.5) / 30.0;\\n float weight = 1.0 - abs(percent);\\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\\n sample.rgb *= sample.a;\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\")||this;return l.uniforms.blur=n,l.uniforms.gradientBlur=r,l.uniforms.start=o||new t.Point(0,window.innerHeight/2),l.uniforms.end=i||new t.Point(600,window.innerHeight/2),l.uniforms.delta=new t.Point(30,30),l.uniforms.texSize=new t.Point(window.innerWidth,window.innerHeight),l.updateDelta(),l}return u(n,e),n.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.uniforms.blur},set:function(e){this.uniforms.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"gradientBlur\",{get:function(){return this.uniforms.gradientBlur},set:function(e){this.uniforms.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"start\",{get:function(){return this.uniforms.start},set:function(e){this.uniforms.start=e,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"end\",{get:function(){return this.uniforms.end},set:function(e){this.uniforms.end=e,this.updateDelta()},enumerable:!1,configurable:!0}),n}(n.Filter),K=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return u(n,e),n.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,t=Math.sqrt(e*e+n*n);this.uniforms.delta.x=e/t,this.uniforms.delta.y=n/t},n}(G),q=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return u(n,e),n.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,t=Math.sqrt(e*e+n*n);this.uniforms.delta.x=-n/t,this.uniforms.delta.y=e/t},n}(G),W=function(e){function n(n,t,r,o){void 0===n&&(n=100),void 0===t&&(t=600);var i=e.call(this)||this;return i.tiltShiftXFilter=new K(n,t,r,o),i.tiltShiftYFilter=new q(n,t,r,o),i}return u(n,e),n.prototype.apply=function(e,n,t,r){var o=e.getFilterTexture();this.tiltShiftXFilter.apply(e,n,o,1),this.tiltShiftYFilter.apply(e,o,t,r),e.returnFilterTexture(o)},Object.defineProperty(n.prototype,\"blur\",{get:function(){return this.tiltShiftXFilter.blur},set:function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"gradientBlur\",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"start\",{get:function(){return this.tiltShiftXFilter.start},set:function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"end\",{get:function(){return this.tiltShiftXFilter.end},set:function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},enumerable:!1,configurable:!0}),n}(n.Filter),Y=function(e){function n(t){var r=e.call(this,c,\"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float radius;\\nuniform float angle;\\nuniform vec2 offset;\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 twist(vec2 coord)\\n{\\n coord -= offset;\\n\\n float dist = length(coord);\\n\\n if (dist < radius)\\n {\\n float ratioDist = (radius - dist) / radius;\\n float angleMod = ratioDist * ratioDist * angle;\\n float s = sin(angleMod);\\n float c = cos(angleMod);\\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\\n }\\n\\n coord += offset;\\n\\n return coord;\\n}\\n\\nvoid main(void)\\n{\\n\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = twist(coord);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord );\\n\\n}\\n\")||this;return Object.assign(r,n.defaults,t),r}return u(n,e),Object.defineProperty(n.prototype,\"offset\",{get:function(){return this.uniforms.offset},set:function(e){this.uniforms.offset=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.radius},set:function(e){this.uniforms.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"angle\",{get:function(){return this.uniforms.angle},set:function(e){this.uniforms.angle=e},enumerable:!1,configurable:!0}),n.defaults={radius:200,angle:4,padding:20,offset:new t.Point},n}(n.Filter),Z=function(e){function n(t){var r,o=Object.assign(n.defaults,t),i=o.maxKernelSize,l=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o= 0.0 && dist > radius) { // radius < 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n if (delta > 0.0) {\\n float normalCount = gap / filterArea.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n if (countLimit < 1.0)\\n {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n float offset = rand(vTextureCoord, 0.0);\\n\\n float total = 0.0;\\n vec4 color = vec4(0.0);\\n\\n dir *= strength;\\n\\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\\n float percent = (t + offset) / MAX_KERNEL_SIZE;\\n float weight = 4.0 * (percent - percent * percent);\\n vec2 p = vTextureCoord + dir * percent;\\n vec4 sample = texture2D(uSampler, p);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample * weight;\\n total += weight;\\n\\n if (t > countLimit){\\n break;\\n }\\n }\\n\\n color /= total;\\n // switch back from pre-multiplied alpha\\n // color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\".replace(\"${maxKernelSize}\",i.toFixed(1)))||this,Object.assign(r,l),r}return u(n,e),Object.defineProperty(n.prototype,\"center\",{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"strength\",{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"innerRadius\",{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,\"radius\",{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),n.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},n}(n.Filter);return e.AdjustmentFilter=m,e.AdvancedBloomFilter=h,e.AsciiFilter=g,e.BevelFilter=v,e.BloomFilter=y,e.BulgePinchFilter=b,e.CRTFilter=z,e.ColorMapFilter=x,e.ColorOverlayFilter=_,e.ColorReplaceFilter=C,e.ConvolutionFilter=S,e.CrossHatchFilter=F,e.DotFilter=O,e.DropShadowFilter=P,e.EmbossFilter=A,e.GlitchFilter=T,e.GlowFilter=w,e.GodrayFilter=D,e.KawaseBlurFilter=d,e.MotionBlurFilter=j,e.MultiColorReplaceFilter=M,e.OldFilmFilter=R,e.OutlineFilter=E,e.PixelateFilter=I,e.RGBSplitFilter=N,e.RadialBlurFilter=k,e.ReflectionFilter=L,e.ShockwaveFilter=X,e.SimpleLightmapFilter=B,e.TiltShiftAxisFilter=G,e.TiltShiftFilter=W,e.TiltShiftXFilter=K,e.TiltShiftYFilter=q,e.TwistFilter=Y,e.ZoomBlurFilter=Z,Object.defineProperty(e,\"__esModule\",{value:!0}),e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,__filters);\n//# sourceMappingURL=pixi-filters.js.map\n","import * as geo from \"./geo-utils.js\";\n// importing a local copy of PIXI filters, to avoid a long chain of npm pixi dependencies\nimport \"./lib/pixi-filters.min.js\";\n\n/**\n * Render the given dungeon state into the given container.\n */\nexport const render = async (container, state) => {\n // clear everything\n container.clear();\n // main geometry/config render pass\n await renderPass(container, state);\n // draw theme-painted areas as additional render passes\n await drawThemeAreas(container, state);\n};\n\n/** If texture is a video, start playing it. */\nconst maybeStartTextureVideo = (texture) => {\n const source = texture?.baseTexture?.resource?.source;\n const isVideo = source && source.tagName === \"VIDEO\";\n if (isVideo) {\n source.loop = true;\n // set to muted to avoid \"play() failed because the user didn't interact with the document first\" error\n source.muted = true;\n game.video.play(source);\n }\n};\n\n/**\n * Render pass: draw the given dungeon state/config into the given container.\n *\n * Child graphics ordering:\n * - exterior shadow\n * - floor\n * - interior shadow\n * - walls\n * - doors\n */\nconst renderPass = async (container, state) => {\n if (!state.geometry) {\n return;\n }\n\n const floorGfx = new PIXI.Graphics();\n const interiorShadowGfx = new PIXI.Graphics();\n const wallGfx = new PIXI.Graphics();\n const doorGfx = new PIXI.Graphics();\n\n // maybe draw an outer surrounding blurred shadow\n addExteriorShadow(container, state.config, state.geometry);\n\n // use a mask to clip the tiled background and interior shadows\n const clipMask = new PIXI.Graphics();\n drawMultiPolygonMask(clipMask, state.geometry);\n // TODO: verify mask add\n // the add seems necessary for inner shadows to show?\n container.addChild(clipMask);\n\n interiorShadowGfx.mask = clipMask;\n // apply alpha filter once for entire shadow graphics, so overlaps aren't additive\n const alphaFilter = new PIXI.filters.AlphaFilter(\n state.config.interiorShadowOpacity\n );\n const blurFilter = new PIXI.filters.BlurFilter();\n interiorShadowGfx.filters = [alphaFilter, blurFilter];\n\n // draw the dungeon geometry room(s)\n drawMultiPolygonRoom(\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n state.config,\n state.geometry\n );\n\n const wallMask = new PIXI.Graphics();\n const maskConfig = JSON.parse(JSON.stringify(state.config));\n maskConfig.wallColor = \"#000000\";\n\n // draw interior walls\n for (const wall of state.interiorWalls) {\n drawInteriorWallShadow(interiorShadowGfx, state.config, wall);\n if (state.config.wallTexture) {\n drawInteriorWall(wallMask, maskConfig, wall);\n } else {\n drawInteriorWall(wallGfx, state.config, wall);\n }\n }\n\n // draw invisible walls\n for (const wall of state.invisibleWalls) {\n // draw on the door gfx, so invis walls get layered on top of regular\n // walls. E.g., when used as visible windows.\n drawInvisibleWallShadow(interiorShadowGfx, state.config, wall);\n drawInvisibleWall(doorGfx, wallGfx, wallMask, state.config, wall);\n }\n\n // draw doors\n for (const door of state.doors) {\n drawDoorShadow(interiorShadowGfx, state.config, door);\n drawDoor(doorGfx, wallGfx, wallMask, state.config, door);\n }\n for (const secretDoor of state.secretDoors) {\n drawInteriorWallShadow(interiorShadowGfx, state.config, secretDoor);\n drawSecretDoor(doorGfx, wallGfx, wallMask, state.config, secretDoor);\n }\n\n // layer everything properly\n container.addChild(floorGfx);\n container.addChild(interiorShadowGfx);\n if (state.config.wallTexture) {\n drawMultiPolygonWallMask(\n wallMask,\n state.geometry,\n state.config.wallThickness\n );\n // TODO: verify mask add\n container.addChild(wallMask);\n // expand our geometry, so we add sprites\n // under the half of the wall thickness that expands past the geometry\n const expandedGeometry = geo.expandGeometry(\n state.geometry,\n state.config.wallThickness / 2.0\n );\n const texture = await getTexture(state.config.wallTexture);\n if (texture?.valid) {\n let matrix = null;\n if (state.config.wallTextureRotation) {\n matrix = PIXI.Matrix.IDENTITY.clone();\n matrix.rotate(state.config.wallTextureRotation * PIXI.DEG_TO_RAD);\n }\n maybeStartTextureVideo(texture);\n wallGfx.beginTextureFill({\n texture,\n alpha: 1.0,\n matrix,\n });\n const flatCoords = expandedGeometry\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat();\n wallGfx.drawPolygon(flatCoords);\n wallGfx.endFill();\n wallGfx.mask = wallMask;\n if (state.config.wallTextureTint) {\n wallGfx.tint = PIXI.utils.string2hex(state.config.wallTextureTint);\n }\n }\n }\n container.addChild(wallGfx);\n container.addChild(doorGfx);\n};\n\nconst drawThemeAreas = async (container, state) => {\n for (const area of state.themeAreas) {\n // hacky way to pass down the actual theme to paint\n const areaState = state.clone();\n areaState.config = area.config;\n // For now, just keep certain values from the main state config,\n // so the dungeon doors etc look consistent at meet up areas\n areaState.config.doorColor = state.config.doorColor;\n areaState.config.doorFillColor = state.config.doorFillColor;\n areaState.config.doorFillOpacity = state.config.doorFillOpacity;\n areaState.config.doorThickness = state.config.doorThickness;\n if (areaState.config.matchBaseWalls) {\n areaState.config.wallColor = state.config.wallColor;\n areaState.config.wallTexture = state.config.wallTexture;\n areaState.config.wallTextureTint = state.config.wallTextureTint;\n areaState.config.wallThickness = state.config.wallThickness;\n }\n areaState.config.exteriorShadowOpacity = 0.0; // don't draw additional exterior shadows\n\n // mask for our area shape\n const areaContainer = new PIXI.Container();\n const areaMask = new PIXI.Graphics();\n areaMask.beginFill(0xffffff, 1.0);\n areaMask.drawPolygon(area.points.flat());\n areaMask.endFill();\n areaContainer.mask = areaMask;\n\n // render the theme, clipping to our rectangle\n const clipPoly = geo.pointsToPolygon(area.points);\n await renderPass(areaContainer, areaState, { clipPoly });\n\n // TODO: verify mask add\n container.addChild(areaMask);\n container.addChild(areaContainer);\n }\n};\n\n/** Try-catch wrapper around loadTexture. */\nconst getTexture = async (path) => {\n try {\n const texture = await loadTexture(path);\n if (!texture) {\n ui.notifications.error(\n `${game.i18n.localize(\"DD.TextureLoadFailure\")}: ${path}`\n );\n }\n return texture;\n } catch (error) {\n console.log(error);\n }\n};\n\n/** Add an exterior blurred shadow. */\nconst addExteriorShadow = (container, config, geometry) => {\n if (\n !config.exteriorShadowThickness ||\n !config.exteriorShadowOpacity ||\n !geometry\n ) {\n // no visible shadows\n return;\n }\n\n // one graphics for all exterior shadow\n const exteriorShadowGfx = new PIXI.Graphics();\n exteriorShadowGfx.lineStyle({\n width: config.wallThickness + config.exteriorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // draw exterior for each poly\n for (let i = 0; i < geometry.getNumGeometries(); i++) {\n const poly = geometry.getGeometryN(i);\n addExteriorShadowForPoly(exteriorShadowGfx, config, poly);\n }\n\n // filters\n const alphaFilter = new PIXI.filters.AlphaFilter(\n config.exteriorShadowOpacity\n );\n const blurFilter = new PIXI.filters.BlurFilter();\n exteriorShadowGfx.filters = [alphaFilter, blurFilter];\n container.addChild(exteriorShadowGfx);\n};\n\n/** Add an exterior blurred shadow for the given polygon. */\nconst addExteriorShadowForPoly = (exteriorShadowGfx, config, poly) => {\n // draw shadow around the exterior ring of the polygon\n const exterior = poly.getExteriorRing();\n exteriorShadowGfx.drawPolygon(\n exterior\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat()\n );\n\n // draw inner hole shadows\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n exteriorShadowGfx.drawPolygon(\n hole\n .getCoordinates()\n .map((c) => [c.x, c.y])\n .flat()\n );\n }\n};\n\nconst drawPolygonMask = (gfx, poly) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.beginFill(0xffffff, 1.0);\n gfx.drawPolygon(flatCoords);\n gfx.endFill();\n\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(0, 0x000000, 1.0, 1, 0.5);\n gfx.beginHole();\n gfx.drawPolygon(flatCoords);\n gfx.endHole();\n }\n};\n\nconst drawMultiPolygonMask = (gfx, multi) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonMask(gfx, poly);\n }\n};\n\nconst drawPolygonWallMask = (gfx, poly, wallThickness) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(wallThickness, PIXI.utils.string2hex(\"#000000\"), 1.0, 0.5);\n gfx.drawPolygon(flatCoords);\n\n // draw interior hole wall polys\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n gfx.lineStyle(wallThickness, PIXI.utils.string2hex(\"#000000\"), 1.0);\n gfx.drawPolygon(flatCoords);\n }\n};\n\nconst drawMultiPolygonWallMask = (gfx, multi, wallThickness) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonWallMask(gfx, poly, wallThickness);\n }\n};\n\nconst drawMultiPolygonRoom = (\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n config,\n multi\n) => {\n for (let i = 0; i < multi.getNumGeometries(); i++) {\n const poly = multi.getGeometryN(i);\n drawPolygonRoom(floorGfx, interiorShadowGfx, wallGfx, config, poly);\n }\n};\n\nconst drawPolygonRoom = async (\n floorGfx,\n interiorShadowGfx,\n wallGfx,\n config,\n poly\n) => {\n const exterior = poly.getExteriorRing();\n const coords = exterior.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n\n // draw a floor texture if specified, otherwise solid-color floor\n if (config.floorTexture) {\n // TODO: optimize to not load the texture each pass\n const texture = await getTexture(config.floorTexture);\n if (texture?.valid) {\n let matrix = null;\n if (config.floorTextureRotation) {\n matrix = PIXI.Matrix.IDENTITY.clone();\n matrix.rotate(config.floorTextureRotation * PIXI.DEG_TO_RAD);\n }\n maybeStartTextureVideo(texture);\n floorGfx.beginTextureFill({\n texture,\n alpha: config.floorOpacity,\n matrix,\n });\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endFill();\n if (config.floorTextureTint) {\n floorGfx.tint = PIXI.utils.string2hex(config.floorTextureTint);\n }\n }\n } else {\n floorGfx.beginFill(\n PIXI.utils.string2hex(config.floorColor),\n config.floorOpacity\n );\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endFill();\n }\n\n // cut out holes\n const numHoles = poly.getNumInteriorRing();\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n floorGfx.lineStyle(0, 0x000000, 1.0, 1, 0.5);\n floorGfx.beginHole();\n floorGfx.drawPolygon(flatCoords);\n floorGfx.endHole();\n }\n\n // draw inner wall drop shadows\n if (config.interiorShadowOpacity) {\n // TODO: don't need to set this multiple times... bubble up?\n // TODO: there's a weird lag or visual artifact happening between the inner blur shadow and the solid line wall,\n // that sometimes leaves an unshadowed or lighter pixel line/area next to the wall.\n // To (partially) work around that, draw a wider shadow from the middle of the wall, rather than inside.\n interiorShadowGfx.lineStyle({\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n interiorShadowGfx.drawPolygon(flatCoords);\n }\n\n // draw outer wall poly\n if (!config.wallTexture) {\n wallGfx.lineStyle(\n config.wallThickness,\n PIXI.utils.string2hex(config.wallColor),\n 1.0,\n 0.5\n );\n wallGfx.drawPolygon(flatCoords);\n }\n\n // draw interior hole walls/shadows\n for (let i = 0; i < numHoles; i++) {\n const hole = poly.getInteriorRingN(i);\n const coords = hole.getCoordinates();\n const flatCoords = coords.map((c) => [c.x, c.y]).flat();\n\n // draw hole wall outer drop shadows\n interiorShadowGfx.drawPolygon(flatCoords);\n\n // draw hole wall poly\n if (!config.wallTexture) {\n wallGfx.lineStyle(\n config.wallThickness,\n PIXI.utils.string2hex(config.wallColor),\n 1.0\n );\n wallGfx.drawPolygon(flatCoords);\n }\n }\n};\n\n// [x1, y1, x2, y2]\nconst drawInteriorWall = (wallGfx, config, wall) => {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(wall[0], wall[1]);\n wallGfx.lineTo(wall[2], wall[3]);\n};\n\nconst drawInvisibleWall = (doorGfx, wallGfx, wallMask, config, wall) => {\n const doorConfig = {\n doorColor: config.invisibleWallColor,\n doorLineThickness: config.invisibleWallLineThickness,\n doorFillColor: config.invisibleWallFillColor,\n doorFillOpacity: config.invisibleWallFillOpacity,\n doorThickness: config.invisibleWallThickness,\n wallColor: config.wallColor,\n wallTexture: config.wallTexture,\n wallThickness: config.wallThickness,\n };\n drawDoor(doorGfx, wallGfx, wallMask, doorConfig, wall);\n // and another line across the rectangle\n doorGfx.lineStyle({\n width: config.invisibleWallLineThickness,\n color: PIXI.utils.string2hex(config.invisibleWallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n });\n doorGfx.moveTo(wall[0], wall[1]);\n doorGfx.lineTo(wall[2], wall[3]);\n};\n\nconst drawInteriorWallShadow = (gfx, config, wall) => {\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n cap: \"round\",\n });\n gfx.moveTo(wall[2], wall[3]);\n gfx.lineTo(wall[0], wall[1]);\n};\n\n// [x1, y1, x2, y2]\nconst drawDoor = (doorGfx, wallGfx, wallMask, config, door) => {\n // calculate some door dimensions\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const jambLength = 20;\n const rectLength = totalLength - 2 * jambLength;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n config.doorThickness,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n // draw the door jamb at wall thickness, either into the texture mask or onto the wall graphics\n if (config.wallTexture) {\n wallMask.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallMask.moveTo(door[0], door[1]);\n // left jamb\n wallMask.lineTo(jamb1End[0], jamb1End[1]);\n // right jamb\n wallMask.moveTo(rectEnd[0], rectEnd[1]);\n wallMask.lineTo(door[2], door[3]);\n } else {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(door[0], door[1]);\n // left jamb\n wallGfx.lineTo(jamb1End[0], jamb1End[1]);\n // right jamb\n wallGfx.moveTo(rectEnd[0], rectEnd[1]);\n wallGfx.lineTo(door[2], door[3]);\n }\n // door rectangle\n if (config.doorFillOpacity) {\n doorGfx.beginFill(\n PIXI.utils.string2hex(config.doorFillColor),\n config.doorFillOpacity\n );\n }\n // door rectangle is drawn at a different line thickness\n doorGfx.lineStyle(\n config.doorLineThickness,\n PIXI.utils.string2hex(config.doorColor),\n 1.0,\n 0.5\n );\n doorGfx.drawPolygon(\n doorRect[0],\n doorRect[1],\n doorRect[2],\n doorRect[3],\n doorRect[4],\n doorRect[5],\n doorRect[6],\n doorRect[7],\n doorRect[0],\n doorRect[1]\n );\n if (config.doorFillColor) {\n doorGfx.endFill();\n }\n};\n\nconst drawSecretDoor = (doorGfx, wallGfx, wallMask, config, door) => {\n const isGM = game.user.isGM;\n if (\n (isGM && config.secretDoorStyleGM === \"door\") ||\n (!isGM && config.secretDoorStylePlayer === \"door\")\n ) {\n // TODO: need to draw door shadow. where?\n drawDoor(doorGfx, wallGfx, wallMask, config, door);\n return;\n }\n\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const rectLength = 40.0;\n const jambLength = (totalLength - rectLength) / 2.0;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const middle = [door[0] + deltaX * 0.5, door[1] + deltaY * 0.5];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n 30.0,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n // draw a wall across the door opening\n if (config.wallTexture) {\n wallMask.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(\"#000000\"),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallMask.moveTo(door[0], door[1]);\n wallMask.lineTo(door[2], door[3]);\n } else {\n wallGfx.lineStyle({\n width: config.wallThickness,\n color: PIXI.utils.string2hex(config.wallColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n wallGfx.moveTo(door[0], door[1]);\n wallGfx.lineTo(door[2], door[3]);\n }\n\n // possibly draw an additional S-shape through the wall\n if (\n (isGM && config.secretDoorStyleGM === \"secret\") ||\n (!isGM && config.secretDoorStylePlayer === \"secret\")\n ) {\n const midRect = geo.rectangleForSegment(\n 50.0,\n jamb1End[0],\n jamb1End[1],\n middle[0],\n middle[1]\n );\n const midRect2 = geo.rectangleForSegment(\n 50.0,\n middle[0],\n middle[1],\n rectEnd[0],\n rectEnd[1]\n );\n doorGfx.lineStyle({\n width: 5.0,\n color: PIXI.utils.string2hex(config.secretDoorSColor),\n alpha: 1.0,\n alignment: 0.5, // middle\n cap: \"round\",\n });\n doorGfx.moveTo(doorRect[6], doorRect[7]);\n doorGfx.bezierCurveTo(\n midRect[0],\n midRect[1],\n midRect[2],\n midRect[3],\n middle[0],\n middle[1]\n );\n doorGfx.bezierCurveTo(\n midRect2[6],\n midRect2[7],\n midRect2[4],\n midRect2[5],\n doorRect[2],\n doorRect[3]\n );\n }\n};\n\nconst drawInvisibleWallShadow = (gfx, config, wall) => {\n const doorConfig = {\n doorLineThickness: config.invisibleWallLineThickness,\n doorThickness: config.invisibleWallThickness,\n interiorShadowColor: config.interiorShadowColor,\n interiorShadowThickness: config.interiorShadowThickness,\n wallThickness: config.wallThickness,\n };\n drawDoorShadow(gfx, doorConfig, wall);\n};\n\nconst drawDoorShadow = (gfx, config, door) => {\n // TODO: DRY up these repeated dimension calculations\n const totalLength = geo.distanceBetweenPoints(\n door[0],\n door[1],\n door[2],\n door[3]\n );\n const jambLength = 20;\n const rectLength = totalLength - 2 * jambLength;\n const jambFraction = jambLength / totalLength;\n const rectFraction = rectLength / totalLength;\n const rectEndFraction = jambFraction + rectFraction;\n const deltaX = door[2] - door[0];\n const deltaY = door[3] - door[1];\n const jamb1End = [\n door[0] + deltaX * jambFraction,\n door[1] + deltaY * jambFraction,\n ];\n const rectEnd = [\n door[0] + deltaX * rectEndFraction,\n door[1] + deltaY * rectEndFraction,\n ];\n const doorRect = geo.rectangleForSegment(\n config.doorThickness,\n jamb1End[0],\n jamb1End[1],\n rectEnd[0],\n rectEnd[1]\n );\n\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.wallThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // left jamb\n gfx.moveTo(door[2], door[3]);\n gfx.lineTo(rectEnd[0], rectEnd[1]);\n\n // right jamb\n gfx.moveTo(jamb1End[0], jamb1End[1]);\n gfx.lineTo(door[0], door[1]);\n\n gfx.lineStyle({\n // wide enough to be exposed on either side\n width: config.doorLineThickness + config.interiorShadowThickness,\n color: PIXI.utils.string2hex(config.interiorShadowColor),\n alignment: 0.5, // middle\n join: \"round\",\n });\n\n // door rectangle\n gfx.drawPolygon(\n doorRect[0],\n doorRect[1],\n doorRect[2],\n doorRect[3],\n doorRect[4],\n doorRect[5],\n doorRect[6],\n doorRect[7],\n doorRect[0],\n doorRect[1]\n );\n};\n","import { DungeonState } from \"./dungeonstate.js\";\nimport { render } from \"./renderer.js\";\nimport * as geo from \"./geo-utils.js\";\nimport { getTheme, getThemePainterThemeKey } from \"./themes.js\";\n\n/**\n * @extends {PlaceableObject}\n */\n// TODO: does Dungeon even need to be a PlaceableObject? Or could it just extend PIXI.Container?\nexport class Dungeon extends PlaceableObject {\n // expects JournalEntry for constructor\n constructor(journalEntry, note) {\n // note will be saved as this.document\n super(note);\n this.journalEntry = journalEntry;\n // time-ordered array of DungeonStates\n this.history = [DungeonState.startState()];\n this.historyIndex = 0;\n }\n\n /* -------------------------------------------- */\n\n // TODO: figure out what documentName / embeddedName / type we should be using\n /** @inheritdoc */\n static embeddedName = \"Drawing\";\n\n /** Convenience method to get most recent state. */\n state() {\n return this.history[this.historyIndex];\n }\n\n /* -------------------------------------------- */\n\n async deleteAll() {\n // keep our most recent config around\n const lastState = this.state();\n const resetState = DungeonState.startState();\n resetState.config = lastState.config;\n this.history = [resetState];\n this.historyIndex = 0;\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async saveToSceneBackground() {\n const tempContainer = new PIXI.Container();\n\n // clip to just the scene\n const mask = new PIXI.Graphics();\n // padding is rounded up to the nearest grid size increment\n const xOffset =\n Math.ceil(\n (canvas.scene.width * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size;\n const yOffset =\n Math.ceil(\n (canvas.scene.height * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size;\n const maskCoords = [\n xOffset,\n yOffset,\n xOffset + canvas.scene.width,\n yOffset,\n xOffset + canvas.scene.width,\n yOffset + canvas.scene.height,\n xOffset,\n yOffset + canvas.scene.height,\n xOffset,\n yOffset,\n ];\n mask.beginFill(PIXI.utils.string2hex(\"#FFFFFF\"), 1.0);\n mask.drawPolygon(maskCoords);\n mask.endFill();\n tempContainer.mask = mask;\n this.mask = mask;\n\n // force container to scene dimensions\n const sizeForcer = new PIXI.Sprite();\n sizeForcer.height = canvas.scene.height;\n sizeForcer.width = canvas.scene.width;\n sizeForcer.position.x = xOffset;\n sizeForcer.position.y = yOffset;\n tempContainer.addChild(sizeForcer);\n\n tempContainer.addChild(this);\n\n // TODO: decide if we want a folder, and if so, how to precreate\n // const folder = \"Dungeon Draw\";\n const folder = \"\";\n // uncomment for jpg+compression\n //const filename = `${canvas.scene.name}-dungeon.jpg`;\n //const base64 = await canvas.app.renderer.extract.base64(this, \"image/jpeg\", 0.5);\n const filename = `${canvas.scene.name}-dungeon.png`;\n const base64 = await canvas.app.renderer.extract.base64(tempContainer);\n const res = await fetch(base64);\n const blob = await res.blob();\n //const file = new File([blob], filename, { type: \"image/jpeg\" });\n const file = new File([blob], filename, { type: \"image/png\" });\n await FilePicker.upload(\"data\", folder, file, {});\n const path = folder ? folder + \"/\" + filename : filename;\n console.log(path);\n // make sure we don't keep using a cached copy\n // TODO: TextureLoader #cache is now a private instance var\n // TextureLoader.loader.cache.delete(path);\n if (canvas.scene.img === path) {\n // cheat to force a scene update when we're re-saving to the same filename\n await canvas.scene.update({ img: null }, { render: false });\n }\n await canvas.scene.update({ img: path });\n\n // remove our mask\n this.mask = null;\n }\n\n /* -------------------------------------------- */\n /* Rendering */\n /* -------------------------------------------- */\n\n /** @override */\n draw() {\n this.refresh();\n return this;\n }\n\n /** @override */\n refresh() {\n render(this, this.state());\n }\n\n async maybeRefresh(journalEntry) {\n if (journalEntry.id === this.journalEntry.id) {\n const savedState = await DungeonState.loadFromJournalEntry(\n this.journalEntry\n );\n // update state, but don't save to journal\n await this.pushState(savedState, false);\n }\n }\n\n /* -------------------------------------------- */\n\n async loadFromJournalEntry() {\n const savedState = await DungeonState.loadFromJournalEntry(\n this.journalEntry\n );\n this.history = [savedState];\n this.historyIndex = 0;\n this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async undo() {\n this.historyIndex = Math.max(0, this.historyIndex - 1);\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n await this.refresh();\n }\n\n async redo() {\n this.historyIndex = Math.min(\n this.history.length - 1,\n this.historyIndex + 1\n );\n await this.history[this.historyIndex].saveToJournalEntry(this.journalEntry);\n await this.refresh();\n }\n\n /* -------------------------------------------- */\n\n async pushState(newState, saveToJournalEntry = true) {\n // throw away any history states after current\n for (let i = this.history.length - 1; i > this.historyIndex; i--) {\n this.history.pop();\n }\n // and add our new state\n this.history.push(newState);\n this.historyIndex++;\n\n if (saveToJournalEntry) {\n await newState.saveToJournalEntry(this.journalEntry);\n }\n await this.refresh();\n }\n\n async setConfig(config) {\n const newState = this.state().clone();\n newState.config = config;\n await this.pushState(newState);\n }\n\n async addDoor(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"doors\");\n }\n\n async addSecretDoor(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"secretDoors\");\n }\n\n async addInvisibleWall(x1, y1, x2, y2) {\n await this._addDoor(x1, y1, x2, y2, \"invisibleWalls\");\n }\n\n async _addDoor(x1, y1, x2, y2, doorProperty) {\n const newState = this.history[this.historyIndex].clone();\n const doorPoly = geo.twoPointsToLineString(x1, y1, x2, y2);\n\n // possibly split interior walls\n const wallsToDelete = [];\n const wallsToAdd = [];\n for (const wall of newState.interiorWalls) {\n const wallPoly = geo.twoPointsToLineString(\n wall[0],\n wall[1],\n wall[2],\n wall[3]\n );\n const contains = geo.contains(wallPoly, doorPoly);\n if (contains) {\n wallsToDelete.push(wall);\n // make sure points are consistently ordered\n const w1 = geo.lesserPoint(wall[0], wall[1], wall[2], wall[3]);\n const w2 = geo.greaterPoint(wall[0], wall[1], wall[2], wall[3]);\n const d1 = geo.lesserPoint(x1, y1, x2, y2);\n const d2 = geo.greaterPoint(x1, y1, x2, y2);\n wallsToAdd.push([w1[0], w1[1], d1[0], d1[1]]);\n wallsToAdd.push([d2[0], d2[1], w2[0], w2[1]]);\n }\n }\n newState.interiorWalls = newState.interiorWalls.filter(\n (w) => wallsToDelete.indexOf(w) === -1\n );\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n newState[doorProperty].push([x1, y1, x2, y2]);\n await this.pushState(newState);\n }\n\n async addInteriorWall(x1, y1, x2, y2) {\n const newState = this.history[this.historyIndex].clone();\n const wallsToAdd = geo.maybeSplitWall(x1, y1, x2, y2, newState.doors);\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async removeInteriorWalls(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const wallsToKeep = this.history[this.historyIndex].interiorWalls.filter(\n (w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(rectPoly, wallPoly);\n }\n );\n if (\n wallsToKeep.length != this.history[this.historyIndex].interiorWalls.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.interiorWalls = wallsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeInvisibleWalls(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const wallsToKeep = this.history[this.historyIndex].invisibleWalls.filter(\n (w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(rectPoly, wallPoly);\n }\n );\n if (\n wallsToKeep.length !=\n this.history[this.historyIndex].invisibleWalls.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.invisibleWalls = wallsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeDoors(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const oldState = this.history[this.historyIndex];\n const doorsToKeep = oldState.doors.filter((d) => {\n const doorPoly = geo.twoPointsToLineString(d[0], d[1], d[2], d[3]);\n return !geo.intersects(rectPoly, doorPoly);\n });\n if (doorsToKeep.length != oldState.doors.length) {\n const newState = oldState.clone();\n newState.doors = doorsToKeep;\n await this.pushState(newState);\n }\n }\n\n // {x:, y:, height:, width:}\n async removeSecretDoors(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const oldState = this.history[this.historyIndex];\n const secretDoorsToKeep = oldState.secretDoors.filter((d) => {\n const doorPoly = geo.twoPointsToLineString(d[0], d[1], d[2], d[3]);\n return !geo.intersects(rectPoly, doorPoly);\n });\n if (secretDoorsToKeep.length != oldState.secretDoors.length) {\n const newState = oldState.clone();\n newState.secretDoors = secretDoorsToKeep;\n await this.pushState(newState);\n }\n }\n\n async _addPoly(poly) {\n const oldState = this.history[this.historyIndex];\n const newState = oldState.clone();\n if (newState.geometry) {\n newState.geometry = geo.union(newState.geometry, poly);\n const touches = geo.touches(oldState.geometry, poly);\n if (touches) {\n const intersection = geo.intersection(oldState.geometry, poly);\n const coordinates = intersection.getCoordinates();\n // TODO: do we need to handle more complicated overlaps, GeometryCollection etc?\n // this coordinate 2-step is flimsy\n if (coordinates.length > 1 && coordinates.length % 2 === 0) {\n for (let i = 0; i < coordinates.length; i += 2) {\n const wallsToAdd = geo.maybeSplitWall(\n coordinates[i].x,\n coordinates[i].y,\n coordinates[i + 1].x,\n coordinates[i + 1].y,\n newState.doors\n );\n newState.interiorWalls = newState.interiorWalls.concat(wallsToAdd);\n }\n }\n } else {\n // also nuke any interior walls in this new poly\n const wallsToKeep = newState.interiorWalls.filter((w) => {\n const wallPoly = geo.twoPointsToLineString(w[0], w[1], w[2], w[3]);\n return !geo.intersects(poly, wallPoly);\n });\n if (wallsToKeep.length != newState.interiorWalls.length) {\n newState.interiorWalls = wallsToKeep;\n }\n }\n } else {\n newState.geometry = poly;\n }\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async addRectangle(rect) {\n const poly = geo.rectToPolygon(rect);\n this._addPoly(poly);\n }\n\n // {x:, y:, height:, width:}\n async removeRectangle(rect) {\n const poly = geo.rectToPolygon(rect);\n await this._removePoly(poly);\n }\n\n async _removePoly(poly) {\n // only makes sense to remove if we have geometry\n if (!this.history[this.historyIndex].geometry) {\n return;\n }\n // and if the poly intersects existing geometry\n if (!geo.intersects(this.history[this.historyIndex].geometry, poly)) {\n return;\n }\n const newState = this.history[this.historyIndex].clone();\n newState.geometry = geo.difference(newState.geometry, poly);\n await this.pushState(newState);\n }\n\n // [[x,y]...]\n async addPolygon(points) {\n console.log(points);\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._addPoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorAddingPolygon\"));\n }\n }\n\n // [[x,y]...]\n async removePolygon(points) {\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._removePoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorRemovingPolygon\"));\n }\n }\n\n async addEllipse(x, y, width, height) {\n const poly = geo.ellipse(x, y, width, height);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._addPoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorAddingPolygon\"));\n }\n }\n\n async removeEllipse(x, y, width, height) {\n const poly = geo.ellipse(x, y, width, height);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n try {\n await this._removePoly(poly);\n } catch (error) {\n console.log(error);\n ui.notifications.error(game.i18n.localize(\"DD.ErrorRemovingPolygon\"));\n }\n }\n\n async addThemeArea(points) {\n // make sure we can create a valid polygon from the points\n const poly = geo.pointsToPolygon(points);\n if (!geo.isValid(poly)) {\n ui.notifications.error(game.i18n.localize(\"DD.ErrorInvalidShape\"));\n return;\n }\n\n const themeKey = getThemePainterThemeKey();\n const theme = getTheme(themeKey);\n const newArea = {\n points,\n config: theme.config,\n };\n const newState = this.history[this.historyIndex].clone();\n newState.themeAreas.push(newArea);\n await this.pushState(newState);\n }\n\n // {x:, y:, height:, width:}\n async removeThemeAreas(rect) {\n const rectPoly = geo.rectToPolygon(rect);\n const areasToKeep = this.history[this.historyIndex].themeAreas.filter(\n (a) => {\n try {\n const areaPoly = geo.pointsToPolygon(a.points);\n return !geo.intersects(rectPoly, areaPoly);\n } catch (error) {\n console.log(error);\n return false;\n }\n }\n );\n if (\n areasToKeep.length != this.history[this.historyIndex].themeAreas.length\n ) {\n const newState = this.history[this.historyIndex].clone();\n newState.themeAreas = areasToKeep;\n await this.pushState(newState);\n }\n }\n}\n","exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [], keys = []\n\n if (cycleReplacer == null) cycleReplacer = function(key, value) {\n if (stack[0] === value) return \"[Circular ~]\"\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this)\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n }\n else stack.push(value)\n\n return replacer == null ? value : replacer.call(this, key, value)\n }\n}\n","/*\n * random-seed\n * https://github.com/skratchdot/random-seed\n *\n * This code was originally written by Steve Gibson and can be found here:\n *\n * https://www.grc.com/otg/uheprng.htm\n *\n * It was slightly modified for use in node, to pass jshint, and a few additional\n * helper functions were added.\n *\n * Copyright (c) 2013 skratchdot\n * Dual Licensed under the MIT license and the original GRC copyright/license\n * included below.\n */\n/*\t============================================================================\n\t\t\t\t\t\t\t\t\tGibson Research Corporation\n\t\t\t\tUHEPRNG - Ultra High Entropy Pseudo-Random Number Generator\n\t============================================================================\n\tLICENSE AND COPYRIGHT: THIS CODE IS HEREBY RELEASED INTO THE PUBLIC DOMAIN\n\tGibson Research Corporation releases and disclaims ALL RIGHTS AND TITLE IN\n\tTHIS CODE OR ANY DERIVATIVES. Anyone may be freely use it for any purpose.\n\t============================================================================\n\tThis is GRC's cryptographically strong PRNG (pseudo-random number generator)\n\tfor JavaScript. It is driven by 1536 bits of entropy, stored in an array of\n\t48, 32-bit JavaScript variables. Since many applications of this generator,\n\tincluding ours with the \"Off The Grid\" Latin Square generator, may require\n\tthe deteriministic re-generation of a sequence of PRNs, this PRNG's initial\n\tentropic state can be read and written as a static whole, and incrementally\n\tevolved by pouring new source entropy into the generator's internal state.\n\t----------------------------------------------------------------------------\n\tENDLESS THANKS are due Johannes Baagoe for his careful development of highly\n\trobust JavaScript implementations of JS PRNGs. This work was based upon his\n\tJavaScript \"Alea\" PRNG which is based upon the extremely robust Multiply-\n\tWith-Carry (MWC) PRNG invented by George Marsaglia. MWC Algorithm References:\n\thttp://www.GRC.com/otg/Marsaglia_PRNGs.pdf\n\thttp://www.GRC.com/otg/Marsaglia_MWC_Generators.pdf\n\t----------------------------------------------------------------------------\n\tThe quality of this algorithm's pseudo-random numbers have been verified by\n\tmultiple independent researchers. It handily passes the fermilab.ch tests as\n\twell as the \"diehard\" and \"dieharder\" test suites. For individuals wishing\n\tto further verify the quality of this algorithm's pseudo-random numbers, a\n\t256-megabyte file of this algorithm's output may be downloaded from GRC.com,\n\tand a Microsoft Windows scripting host (WSH) version of this algorithm may be\n\tdownloaded and run from the Windows command prompt to generate unique files\n\tof any size:\n\tThe Fermilab \"ENT\" tests: http://fourmilab.ch/random/\n\tThe 256-megabyte sample PRN file at GRC: https://www.GRC.com/otg/uheprng.bin\n\tThe Windows scripting host version: https://www.GRC.com/otg/wsh-uheprng.js\n\t----------------------------------------------------------------------------\n\tQualifying MWC multipliers are: 187884, 686118, 898134, 1104375, 1250205,\n\t1460910 and 1768863. (We use the largest one that's < 2^21)\n\t============================================================================ */\n'use strict';\nvar stringify = require('json-stringify-safe');\n\n/*\t============================================================================\nThis is based upon Johannes Baagoe's carefully designed and efficient hash\nfunction for use with JavaScript. It has a proven \"avalanche\" effect such\nthat every bit of the input affects every bit of the output 50% of the time,\nwhich is good.\tSee: http://baagoe.com/en/RandomMusings/hash/avalanche.xhtml\n============================================================================\n*/\nvar Mash = function () {\n\tvar n = 0xefc8249d;\n\tvar mash = function (data) {\n\t\tif (data) {\n\t\t\tdata = data.toString();\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tn += data.charCodeAt(i);\n\t\t\t\tvar h = 0.02519603282416938 * n;\n\t\t\t\tn = h >>> 0;\n\t\t\t\th -= n;\n\t\t\t\th *= n;\n\t\t\t\tn = h >>> 0;\n\t\t\t\th -= n;\n\t\t\t\tn += h * 0x100000000; // 2^32\n\t\t\t}\n\t\t\treturn (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n\t\t} else {\n\t\t\tn = 0xefc8249d;\n\t\t}\n\t};\n\treturn mash;\n};\n\nvar uheprng = function (seed) {\n\treturn (function () {\n\t\tvar o = 48; // set the 'order' number of ENTROPY-holding 32-bit values\n\t\tvar c = 1; // init the 'carry' used by the multiply-with-carry (MWC) algorithm\n\t\tvar p = o; // init the 'phase' (max-1) of the intermediate variable pointer\n\t\tvar s = new Array(o); // declare our intermediate variables array\n\t\tvar i; // general purpose local\n\t\tvar j; // general purpose local\n\t\tvar k = 0; // general purpose local\n\n\t\t// when our \"uheprng\" is initially invoked our PRNG state is initialized from the\n\t\t// browser's own local PRNG. This is okay since although its generator might not\n\t\t// be wonderful, it's useful for establishing large startup entropy for our usage.\n\t\tvar mash = new Mash(); // get a pointer to our high-performance \"Mash\" hash\n\n\t\t// fill the array with initial mash hash values\n\t\tfor (i = 0; i < o; i++) {\n\t\t\ts[i] = mash(Math.random());\n\t\t}\n\n\t\t// this PRIVATE (internal access only) function is the heart of the multiply-with-carry\n\t\t// (MWC) PRNG algorithm. When called it returns a pseudo-random number in the form of a\n\t\t// 32-bit JavaScript fraction (0.0 to <1.0) it is a PRIVATE function used by the default\n\t\t// [0-1] return function, and by the random 'string(n)' function which returns 'n'\n\t\t// characters from 33 to 126.\n\t\tvar rawprng = function () {\n\t\t\tif (++p >= o) {\n\t\t\t\tp = 0;\n\t\t\t}\n\t\t\tvar t = 1768863 * s[p] + c * 2.3283064365386963e-10; // 2^-32\n\t\t\treturn s[p] = t - (c = t | 0);\n\t\t};\n\n\t\t// this EXPORTED function is the default function returned by this library.\n\t\t// The values returned are integers in the range from 0 to range-1. We first\n\t\t// obtain two 32-bit fractions (from rawprng) to synthesize a single high\n\t\t// resolution 53-bit prng (0 to <1), then we multiply this by the caller's\n\t\t// \"range\" param and take the \"floor\" to return a equally probable integer.\n\t\tvar random = function (range) {\n\t\t\treturn Math.floor(range * (rawprng() + (rawprng() * 0x200000 | 0) * 1.1102230246251565e-16)); // 2^-53\n\t\t};\n\n\t\t// this EXPORTED function 'string(n)' returns a pseudo-random string of\n\t\t// 'n' printable characters ranging from chr(33) to chr(126) inclusive.\n\t\trandom.string = function (count) {\n\t\t\tvar i;\n\t\t\tvar s = '';\n\t\t\tfor (i = 0; i < count; i++) {\n\t\t\t\ts += String.fromCharCode(33 + random(94));\n\t\t\t}\n\t\t\treturn s;\n\t\t};\n\n\t\t// this PRIVATE \"hash\" function is used to evolve the generator's internal\n\t\t// entropy state. It is also called by the EXPORTED addEntropy() function\n\t\t// which is used to pour entropy into the PRNG.\n\t\tvar hash = function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\tfor (i = 0; i < args.length; i++) {\n\t\t\t\tfor (j = 0; j < o; j++) {\n\t\t\t\t\ts[j] -= mash(args[i]);\n\t\t\t\t\tif (s[j] < 0) {\n\t\t\t\t\t\ts[j] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// this EXPORTED \"clean string\" function removes leading and trailing spaces and non-printing\n\t\t// control characters, including any embedded carriage-return (CR) and line-feed (LF) characters,\n\t\t// from any string it is handed. this is also used by the 'hashstring' function (below) to help\n\t\t// users always obtain the same EFFECTIVE uheprng seeding key.\n\t\trandom.cleanString = function (inStr) {\n\t\t\tinStr = inStr.replace(/(^\\s*)|(\\s*$)/gi, ''); // remove any/all leading spaces\n\t\t\tinStr = inStr.replace(/[\\x00-\\x1F]/gi, ''); // remove any/all control characters\n\t\t\tinStr = inStr.replace(/\\n /, '\\n'); // remove any/all trailing spaces\n\t\t\treturn inStr; // return the cleaned up result\n\t\t};\n\n\t\t// this EXPORTED \"hash string\" function hashes the provided character string after first removing\n\t\t// any leading or trailing spaces and ignoring any embedded carriage returns (CR) or Line Feeds (LF)\n\t\trandom.hashString = function (inStr) {\n\t\t\tinStr = random.cleanString(inStr);\n\t\t\tmash(inStr); // use the string to evolve the 'mash' state\n\t\t\tfor (i = 0; i < inStr.length; i++) { // scan through the characters in our string\n\t\t\t\tk = inStr.charCodeAt(i); // get the character code at the location\n\t\t\t\tfor (j = 0; j < o; j++) { //\t\"mash\" it into the UHEPRNG state\n\t\t\t\t\ts[j] -= mash(k);\n\t\t\t\t\tif (s[j] < 0) {\n\t\t\t\t\t\ts[j] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// this EXPORTED function allows you to seed the random generator.\n\t\trandom.seed = function (seed) {\n\t\t\tif (typeof seed === 'undefined' || seed === null) {\n\t\t\t\tseed = Math.random();\n\t\t\t}\n\t\t\tif (typeof seed !== 'string') {\n\t\t\t\tseed = stringify(seed, function (key, value) {\n\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\treturn (value).toString();\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t}\n\t\t\trandom.initState();\n\t\t\trandom.hashString(seed);\n\t\t};\n\n\t\t// this handy exported function is used to add entropy to our uheprng at any time\n\t\trandom.addEntropy = function ( /* accept zero or more arguments */ ) {\n\t\t\tvar args = [];\n\t\t\tfor (i = 0; i < arguments.length; i++) {\n\t\t\t\targs.push(arguments[i]);\n\t\t\t}\n\t\t\thash((k++) + (new Date().getTime()) + args.join('') + Math.random());\n\t\t};\n\n\t\t// if we want to provide a deterministic startup context for our PRNG,\n\t\t// but without directly setting the internal state variables, this allows\n\t\t// us to initialize the mash hash and PRNG's internal state before providing\n\t\t// some hashing input\n\t\trandom.initState = function () {\n\t\t\tmash(); // pass a null arg to force mash hash to init\n\t\t\tfor (i = 0; i < o; i++) {\n\t\t\t\ts[i] = mash(' '); // fill the array with initial mash hash values\n\t\t\t}\n\t\t\tc = 1; // init our multiply-with-carry carry\n\t\t\tp = o; // init our phase\n\t\t};\n\n\t\t// we use this (optional) exported function to signal the JavaScript interpreter\n\t\t// that we're finished using the \"Mash\" hash function so that it can free up the\n\t\t// local \"instance variables\" is will have been maintaining. It's not strictly\n\t\t// necessary, of course, but it's good JavaScript citizenship.\n\t\trandom.done = function () {\n\t\t\tmash = null;\n\t\t};\n\n\t\t// if we called \"uheprng\" with a seed value, then execute random.seed() before returning\n\t\tif (typeof seed !== 'undefined') {\n\t\t\trandom.seed(seed);\n\t\t}\n\n\t\t// Returns a random integer between 0 (inclusive) and range (exclusive)\n\t\trandom.range = function (range) {\n\t\t\treturn random(range);\n\t\t};\n\n\t\t// Returns a random float between 0 (inclusive) and 1 (exclusive)\n\t\trandom.random = function () {\n\t\t\treturn random(Number.MAX_VALUE - 1) / Number.MAX_VALUE;\n\t\t};\n\n\t\t// Returns a random float between min (inclusive) and max (exclusive)\n\t\trandom.floatBetween = function (min, max) {\n\t\t\treturn random.random() * (max - min) + min;\n\t\t};\n\n\t\t// Returns a random integer between min (inclusive) and max (inclusive)\n\t\trandom.intBetween = function (min, max) {\n\t\t\treturn Math.floor(random.random() * (max - min + 1)) + min;\n\t\t};\n\n\t\t// when our main outer \"uheprng\" function is called, after setting up our\n\t\t// initial variables and entropic state, we return an \"instance pointer\"\n\t\t// to the internal anonymous function which can then be used to access\n\t\t// the uheprng's various exported functions. As with the \".done\" function\n\t\t// above, we should set the returned value to 'null' once we're finished\n\t\t// using any of these functions.\n\t\treturn random;\n\t}());\n};\n\n// Modification for use in node:\nuheprng.create = function (seed) {\n\treturn new uheprng(seed);\n};\nmodule.exports = uheprng;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _randomSeed = require('random-seed');\n\nvar _randomSeed2 = _interopRequireDefault(_randomSeed);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Random = function () {\n function Random(seed) {\n _classCallCheck(this, Random);\n\n this.rng = _randomSeed2.default.create(seed);\n }\n\n _createClass(Random, [{\n key: 'int',\n value: function int(min, max) {\n return this.rng.intBetween(min, max);\n }\n }, {\n key: 'float',\n value: function float() {\n var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n return this.rng.floatBetween(min, max);\n }\n }, {\n key: 'vec',\n value: function vec(min, max) {\n // min and max are vectors [int, int];\n // returns [min[0]<=x<=max[0], min[1]<=y<=max[1]]\n return [this.int(min[0], max[0]), this.int(min[1], max[1])];\n }\n }, {\n key: 'choose',\n value: function choose(items) {\n var remove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var idx = this.rng.intBetween(0, items.length - 1);\n if (remove) {\n return items.splice(idx, 1)[0];\n } else {\n return items[idx];\n }\n }\n }, {\n key: 'maybe',\n value: function maybe(probability) {\n return this.float() <= probability;\n }\n }]);\n\n return Random;\n}();\n\nexports.default = Random;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Array2d = function () {\n function Array2d() {\n var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0];\n var default_value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, Array2d);\n\n this.rows = [];\n this.size = [];\n\n for (var y = 0; y < size[1]; y++) {\n var row = [];\n for (var x = 0; x < size[0]; x++) {\n row.push(default_value);\n }\n this.rows.push(row);\n }\n }\n\n _createClass(Array2d, [{\n key: \"iter\",\n value: function iter(callback, context) {\n for (var y = 0; y < this.size[1]; y++) {\n for (var x = 0; x < this.size[0]; x++) {\n callback.apply(context, [[x, y], this.get([x, y])]);\n }\n }\n }\n }, {\n key: \"get\",\n value: function get(_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n if (this.rows[y] === undefined) {\n return undefined;\n }\n return this.rows[y][x];\n }\n }, {\n key: \"set\",\n value: function set(_ref3, val) {\n var _ref4 = _slicedToArray(_ref3, 2),\n x = _ref4[0],\n y = _ref4[1];\n\n this.rows[y][x] = val;\n }\n }, {\n key: \"set_horizontal_line\",\n value: function set_horizontal_line(_ref5, delta_x, val) {\n var _ref6 = _slicedToArray(_ref5, 2),\n start_x = _ref6[0],\n start_y = _ref6[1];\n\n var c = Math.abs(delta_x);\n var mod = delta_x < 0 ? -1 : 1;\n\n for (var x = 0; x <= c; x++) {\n this.set([start_x + x * mod, start_y], val);\n }\n }\n }, {\n key: \"set_vertical_line\",\n value: function set_vertical_line(_ref7, delta_y, val) {\n var _ref8 = _slicedToArray(_ref7, 2),\n start_x = _ref8[0],\n start_y = _ref8[1];\n\n var c = Math.abs(delta_y);\n var mod = delta_y < 0 ? -1 : 1;\n\n for (var y = 0; y <= c; y++) {\n this.set([start_x, start_y + y * mod], val);\n }\n }\n }, {\n key: \"get_square\",\n value: function get_square(_ref9, _ref10) {\n var _ref12 = _slicedToArray(_ref9, 2),\n x = _ref12[0],\n y = _ref12[1];\n\n var _ref11 = _slicedToArray(_ref10, 2),\n size_x = _ref11[0],\n size_y = _ref11[1];\n\n var retv = new Array2d([size_x, size_y]);\n for (var dx = 0; dx < size_x; dx++) {\n for (var dy = 0; dy < size_y; dy++) {\n retv.set([dx, dy], this.get([x + dx, y + dy]));\n }\n }\n return retv;\n }\n }, {\n key: \"set_square\",\n value: function set_square(_ref13, _ref14, val) {\n var _ref16 = _slicedToArray(_ref13, 2),\n x = _ref16[0],\n y = _ref16[1];\n\n var _ref15 = _slicedToArray(_ref14, 2),\n size_x = _ref15[0],\n size_y = _ref15[1];\n\n var fill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!fill) {\n this.line_h([x, y], size_x - 1, val);\n this.line_h([x, y + size_y - 1], size_x - 1, val);\n this.line_v([x, y], size_y - 1, val);\n this.line_v([x + size_x - 1, y], size_y - 1, val);\n } else {\n for (var dx = 0; dx < size_x; dx++) {\n for (var dy = 0; dy < size_y; dy++) {\n this.set([x + dx, y + dy], val);\n }\n }\n }\n }\n }]);\n\n return Array2d;\n}();\n\nexports.default = Array2d;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/*\n * Rectangle\n * Visit http://createjs.com/ for documentation, updates and examples.\n *\n * Copyright (c) 2010 gskinner.com, inc.\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * @module EaselJS\n */\n\n// constructor:\n/**\n * Represents a rectangle as defined by the points (x, y) and (x+width, y+height).\n *\n *

Example

\n *\n * var rect = new createjs.Rectangle(0, 0, 100, 100);\n *\n * @class Rectangle\n * @param {Number} [x=0] X position.\n * @param {Number} [y=0] Y position.\n * @param {Number} [width=0] The width of the Rectangle.\n * @param {Number} [height=0] The height of the Rectangle.\n * @constructor\n **/\nfunction Rectangle(x, y, width, height) {\n if (Array.isArray(x) && Array.isArray(y)) {\n var _y = y;\n\n var _y2 = _slicedToArray(_y, 2);\n\n width = _y2[0];\n height = _y2[1];\n var _x = x;\n\n var _x2 = _slicedToArray(_x, 2);\n\n x = _x2[0];\n y = _x2[1];\n }\n this.setValues(x, y, width, height);\n\n // public properties:\n // assigned in the setValues method.\n /**\n * X position.\n * @property x\n * @type Number\n **/\n\n /**\n * Y position.\n * @property y\n * @type Number\n **/\n\n /**\n * Width.\n * @property width\n * @type Number\n **/\n\n /**\n * Height.\n * @property height\n * @type Number\n **/\n}\nvar p = Rectangle.prototype;\n\n/**\n * REMOVED. Removed in favor of using `MySuperClass_constructor`.\n * See {{#crossLink \"Utility Methods/extend\"}}{{/crossLink}} and {{#crossLink \"Utility Methods/promote\"}}{{/crossLink}}\n * for details.\n *\n * There is an inheritance tutorial distributed with EaselJS in /tutorials/Inheritance.\n *\n * @method initialize\n * @protected\n * @deprecated\n */\n// p.initialize = function() {}; // searchable for devs wondering where it is.\n\n// public methods:\n/**\n * Sets the specified values on this instance.\n * @method setValues\n * @param {Number} [x=0] X position.\n * @param {Number} [y=0] Y position.\n * @param {Number} [width=0] The width of the Rectangle.\n * @param {Number} [height=0] The height of the Rectangle.\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.setValues = function (x, y, width, height) {\n // don't forget to update docs in the constructor if these change:\n this.x = x || 0;\n this.y = y || 0;\n this.width = width || 0;\n this.height = height || 0;\n return this;\n};\n\n/**\n * Extends the rectangle's bounds to include the described point or rectangle.\n * @method extend\n * @param {Number} x X position of the point or rectangle.\n * @param {Number} y Y position of the point or rectangle.\n * @param {Number} [width=0] The width of the rectangle.\n * @param {Number} [height=0] The height of the rectangle.\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.extend = function (x, y, width, height) {\n width = width || 0;\n height = height || 0;\n if (x + width > this.x + this.width) {\n this.width = x + width - this.x;\n }\n if (y + height > this.y + this.height) {\n this.height = y + height - this.y;\n }\n if (x < this.x) {\n this.width += this.x - x;\n this.x = x;\n }\n if (y < this.y) {\n this.height += this.y - y;\n this.y = y;\n }\n return this;\n};\n\n/**\n * Adds the specified padding to the rectangle's bounds.\n * @method pad\n * @param {Number} top\n * @param {Number} left\n * @param {Number} right\n * @param {Number} bottom\n * @return {Rectangle} This instance. Useful for chaining method calls.\n * @chainable\n */\np.pad = function (top, left, bottom, right) {\n this.x -= left;\n this.y -= top;\n this.width += left + right;\n this.height += top + bottom;\n return this;\n};\n\n/**\n * Copies all properties from the specified rectangle to this rectangle.\n * @method copy\n * @param {Rectangle} rectangle The rectangle to copy properties from.\n * @return {Rectangle} This rectangle. Useful for chaining method calls.\n * @chainable\n */\np.copy = function (rectangle) {\n return this.setValues(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n};\n\n/**\n * Returns true if this rectangle fully encloses the described point or rectangle.\n * @method contains\n * @param {Number} x X position of the point or rectangle.\n * @param {Number} y Y position of the point or rectangle.\n * @param {Number} [width=0] The width of the rectangle.\n * @param {Number} [height=0] The height of the rectangle.\n * @return {Boolean} True if the described point or rectangle is contained within this rectangle.\n */\np.contains = function (x, y, width, height) {\n width = width || 0;\n height = height || 0;\n return x >= this.x && x + width <= this.x + this.width && y >= this.y && y + height <= this.y + this.height;\n};\n\n/**\n * Returns a new rectangle which contains this rectangle and the specified rectangle.\n * @method union\n * @param {Rectangle} rect The rectangle to calculate a union with.\n * @return {Rectangle} A new rectangle describing the union.\n */\np.union = function (rect) {\n return this.clone().extend(rect.x, rect.y, rect.width, rect.height);\n};\n\n/**\n * Returns a new rectangle which describes the intersection (overlap) of this rectangle and the specified rectangle,\n * or null if they do not intersect.\n * @method intersection\n * @param {Rectangle} rect The rectangle to calculate an intersection with.\n * @return {Rectangle} A new rectangle describing the intersection or null.\n */\np.intersection = function (rect) {\n var x1 = rect.x;\n var y1 = rect.y;\n var x2 = x1 + rect.width;\n var y2 = y1 + rect.height;\n if (this.x > x1) {\n x1 = this.x;\n }\n if (this.y > y1) {\n y1 = this.y;\n }\n if (this.x + this.width < x2) {\n x2 = this.x + this.width;\n }\n if (this.y + this.height < y2) {\n y2 = this.y + this.height;\n }\n return x2 <= x1 || y2 <= y1 ? null : new Rectangle(x1, y1, x2 - x1, y2 - y1);\n};\n\n/**\n * Returns true if the specified rectangle intersects (has any overlap) with this rectangle.\n * @method intersects\n * @param {Rectangle} rect The rectangle to compare.\n * @return {Boolean} True if the rectangles intersect.\n */\np.intersects = function (rect) {\n return rect.x <= this.x + this.width && this.x <= rect.x + rect.width && rect.y <= this.y + this.height && this.y <= rect.y + rect.height;\n};\n\n/**\n * Returns true if the width or height are equal or less than 0.\n * @method isEmpty\n * @return {Boolean} True if the rectangle is empty.\n */\np.isEmpty = function () {\n return this.width <= 0 || this.height <= 0;\n};\n\n/**\n * Returns a clone of the Rectangle instance.\n * @method clone\n * @return {Rectangle} a clone of the Rectangle instance.\n **/\np.clone = function () {\n return new Rectangle(this.x, this.y, this.width, this.height);\n};\n\n/**\n * Returns a string representation of this object.\n * @method toString\n * @return {String} a string representation of the instance.\n **/\np.toString = function () {\n return '[Rectangle (x=' + this.x + ' y=' + this.y + ' width=' + this.width + ' height=' + this.height + ')]';\n};\n\nexports.default = Rectangle;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _FACING_TO_STRING, _FACING_TO_MOD, _FACING_INVERSE, _FACING_MOD_RIGHT, _FACING_MOD_LEFT;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar TOP = exports.TOP = 0;\nvar RIGHT = exports.RIGHT = 90;\nvar BOTTOM = exports.BOTTOM = 180;\nvar LEFT = exports.LEFT = 270;\n\nvar FACING = exports.FACING = [TOP, RIGHT, BOTTOM, LEFT];\n\nvar FACING_TO_STRING = exports.FACING_TO_STRING = (_FACING_TO_STRING = {}, _defineProperty(_FACING_TO_STRING, TOP, 'top'), _defineProperty(_FACING_TO_STRING, RIGHT, 'right'), _defineProperty(_FACING_TO_STRING, BOTTOM, 'bottom'), _defineProperty(_FACING_TO_STRING, LEFT, 'left'), _FACING_TO_STRING);\n\nvar FACING_TO_MOD = exports.FACING_TO_MOD = (_FACING_TO_MOD = {}, _defineProperty(_FACING_TO_MOD, TOP, [0, -1]), _defineProperty(_FACING_TO_MOD, RIGHT, [1, 0]), _defineProperty(_FACING_TO_MOD, BOTTOM, [0, 1]), _defineProperty(_FACING_TO_MOD, LEFT, [-1, 0]), _FACING_TO_MOD);\n\nvar FACING_INVERSE = exports.FACING_INVERSE = (_FACING_INVERSE = {}, _defineProperty(_FACING_INVERSE, TOP, BOTTOM), _defineProperty(_FACING_INVERSE, RIGHT, LEFT), _defineProperty(_FACING_INVERSE, BOTTOM, TOP), _defineProperty(_FACING_INVERSE, LEFT, RIGHT), _FACING_INVERSE);\n\nvar FACING_MOD_RIGHT = exports.FACING_MOD_RIGHT = (_FACING_MOD_RIGHT = {}, _defineProperty(_FACING_MOD_RIGHT, TOP, RIGHT), _defineProperty(_FACING_MOD_RIGHT, RIGHT, BOTTOM), _defineProperty(_FACING_MOD_RIGHT, BOTTOM, LEFT), _defineProperty(_FACING_MOD_RIGHT, LEFT, TOP), _FACING_MOD_RIGHT);\n\nvar FACING_MOD_LEFT = exports.FACING_MOD_LEFT = (_FACING_MOD_LEFT = {}, _defineProperty(_FACING_MOD_LEFT, TOP, LEFT), _defineProperty(_FACING_MOD_LEFT, RIGHT, TOP), _defineProperty(_FACING_MOD_LEFT, BOTTOM, RIGHT), _defineProperty(_FACING_MOD_LEFT, LEFT, BOTTOM), _FACING_MOD_LEFT);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.iter_adjacent = iter_adjacent;\nexports.iter_2d = iter_2d;\nexports.iter_range = iter_range;\nexports.intersects = intersects;\nexports.array_test = array_test;\nexports.add = add;\nexports.shift = shift;\nexports.shift_left = shift_left;\nexports.shift_right = shift_right;\n\nvar _const = require('../const');\n\nfunction iter_adjacent(_ref, cb) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n cb([x - 1, y]);\n cb([x, y - 1]);\n cb([x + 1, y]);\n cb([x, y + 1]);\n}\n\nfunction iter_2d(size, callback) {\n for (var y = 0; y < size[1]; y++) {\n for (var x = 0; x < size[0]; x++) {\n callback([x, y]);\n }\n }\n}\n\nfunction iter_range(from, to, callback) {\n var fx = void 0,\n fy = void 0,\n tx = void 0,\n ty = void 0;\n if (from[0] < to[0]) {\n fx = from[0];\n tx = to[0];\n } else {\n fx = to[0];\n tx = from[0];\n }\n if (from[1] < to[1]) {\n fy = from[1];\n ty = to[1];\n } else {\n fy = to[1];\n ty = from[1];\n }\n for (var x = fx; x <= tx; x++) {\n for (var y = fy; y <= ty; y++) {\n callback([x, y]);\n }\n }\n}\n\nfunction intersects(pos_1, size_1, pos_2, size_2) {\n return !pos_2[0] > pos_1[0] + size_1[0] || pos_2[0] + size_2[0] < pos_1[0] || pos_2[1] > pos_1[1] + size_1[1] || pos_2[1] + size_2[1] < size_1[1];\n}\n\nfunction array_test(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (test(array[i])) {\n return true;\n }\n }\n return false;\n}\n\nfunction add(p1, p2) {\n return [p1[0] + p2[0], p1[1] + p2[1]];\n}\n\nfunction shift(pos, facing) {\n return add(pos, _const.FACING_TO_MOD[facing]);\n}\n\nfunction shift_left(pos, facing) {\n return shift(pos, (facing - 90 + 360) % 360);\n}\n\nfunction shift_right(pos, facing) {\n return shift(pos, (facing + 90 + 360) % 360);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _array2d = require('../utils/array2d');\n\nvar _array2d2 = _interopRequireDefault(_array2d);\n\nvar _rectangle = require('../utils/rectangle');\n\nvar _rectangle2 = _interopRequireDefault(_rectangle);\n\nvar _utils = require('../utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar next_piece_id = 0;\n\n// base dungeon piece class, to be extended\n\nvar Piece = function () {\n function Piece(options) {\n _classCallCheck(this, Piece);\n\n options = Object.assign({\n size: [1, 1],\n position: [0, 0],\n parent: null,\n max_exits: 10,\n tag: ''\n }, options);\n\n Object.assign(this, options);\n\n this.options = options;\n\n this.id = next_piece_id++;\n this.walls = new _array2d2.default(this.size, true);\n this.perimeter = [];\n this.exits = [];\n this.children = [];\n }\n\n _createClass(Piece, [{\n key: 'is_exit',\n value: function is_exit(_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n return this.exits.filter(function (_ref3) {\n var _ref4 = _toArray(_ref3),\n exit_x = _ref4[0],\n exit_y = _ref4[1],\n rest = _ref4.slice(2);\n\n return exit_x === x && exit_y === y;\n }).length !== 0;\n }\n }, {\n key: 'get_non_wall_tiles',\n value: function get_non_wall_tiles() {\n var retv = [];\n this.walls.iter(function (pos, is_wall) {\n if (!is_wall) {\n retv.push(pos);\n }\n });\n return retv;\n }\n }, {\n key: 'get_perimeter_by_facing',\n value: function get_perimeter_by_facing(facing) {\n return this.perimeter.filter(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n _ref6$ = _slicedToArray(_ref6[0], 2),\n x = _ref6$[0],\n y = _ref6$[1],\n f = _ref6[1];\n\n return facing === f;\n });\n }\n }, {\n key: 'get_inner_perimeter',\n value: function get_inner_perimeter() {\n var _this = this;\n\n // returns array of tiles in the piece that are adjacent to a wall,\n // but not an exit;\n\n var retv = [];\n var haswall = void 0;\n var exit_adjacent = void 0;\n\n this.walls.iter(function (pos, is_wall) {\n if (!is_wall && !_this.is_exit(pos)) {\n haswall = false;\n exit_adjacent = false;\n (0, _utils.iter_adjacent)(pos, function (p) {\n haswall = haswall || _this.walls.get(p);\n exit_adjacent = exit_adjacent || _this.is_exit(p);\n });\n if (haswall && !exit_adjacent) {\n retv.push(pos);\n }\n }\n });\n\n return retv;\n }\n\n // local position to parent position\n\n }, {\n key: 'parent_pos',\n value: function parent_pos(_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n x = _ref8[0],\n y = _ref8[1];\n\n return [this.position[0] + x, this.position[1] + y];\n }\n\n // local position to global position\n\n }, {\n key: 'global_pos',\n value: function global_pos(pos) {\n pos = this.parent_pos(pos);\n if (this.parent) {\n pos = this.parent.global_pos(pos);\n }\n return pos;\n }\n\n // parent position to local position\n\n }, {\n key: 'local_pos',\n value: function local_pos(pos) {\n return [pos[0] - this.position[0], pos[1] - this.position[1]];\n }\n\n // get (roughly) center tile position for the piece\n // @TODO consider if should use Math.floor instead of Math.round\n\n }, {\n key: 'get_center_pos',\n value: function get_center_pos() {\n return [Math.floor(this.size[0] / 2), Math.floor(this.size[1] / 2)];\n }\n }, {\n key: 'add_perimeter',\n value: function add_perimeter(p_from, p_to, facing) {\n var _this2 = this;\n\n (0, _utils.iter_range)(p_from, p_to, function (pos) {\n _this2.perimeter.push([pos, facing]);\n });\n }\n }, {\n key: 'remove_perimeter',\n value: function remove_perimeter(rect) {\n this.perimeter = this.perimeter.filter(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 3),\n x = _ref10[0],\n y = _ref10[1],\n facing = _ref10[2];\n\n return !rect.contains(x, y, 1, 1);\n });\n }\n }, {\n key: 'intersects',\n value: function intersects(piece) {\n return (0, _utils.intersects)(this.position, this.size, piece.position, piece.size);\n }\n }, {\n key: 'add_piece',\n value: function add_piece(piece) {\n var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if ((0, _utils.array_test)(this.children, function (c) {\n return c.id === piece.id;\n })) {\n return;\n }\n piece.parent = this;\n if (position) {\n piece.position = position;\n }\n this.children.push(piece);\n this.paste_in(piece);\n }\n }, {\n key: 'paste_in',\n value: function paste_in(piece) {\n var _this3 = this;\n\n (0, _utils.iter_2d)(piece.size, function (pos) {\n var is_wall = piece.walls.get(pos);\n if (!is_wall) {\n _this3.walls.set(piece.parent_pos(pos), false);\n }\n });\n }\n }, {\n key: 'add_exit',\n value: function add_exit(exit, room) {\n this.walls.set(exit[0], false);\n if (this.parent) {\n this.parent.paste_in(this);\n }\n this.exits.push([exit[0], exit[1], room]);\n }\n }, {\n key: 'print',\n value: function print() {\n for (var y = 0; y < this.size[1]; y++) {\n var row = '';\n for (var x = 0; x < this.size[0]; x++) {\n if (this.start_pos && this.start_pos[0] === x && this.start_pos[1] === y) {\n row += 's';\n } else {\n row += this.walls.get([x, y]) ? 'x' : ' ';\n }\n }\n console.log(row);\n }\n }\n }, {\n key: 'rect',\n get: function get() {\n return new _rectangle2.default(this.position[0], this.position[1], this.size[0], this.size[1]);\n }\n }]);\n\n return Piece;\n}();\n\nexports.default = Piece;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _random = require('../utils/random');\n\nvar _random2 = _interopRequireDefault(_random);\n\nvar _piece = require('../pieces/piece');\n\nvar _piece2 = _interopRequireDefault(_piece);\n\nvar _rectangle = require('../utils/rectangle');\n\nvar _rectangle2 = _interopRequireDefault(_rectangle);\n\nvar _const = require('../const');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Generator = function (_Piece) {\n _inherits(Generator, _Piece);\n\n function Generator(options) {\n _classCallCheck(this, Generator);\n\n var _this = _possibleConstructorReturn(this, (Generator.__proto__ || Object.getPrototypeOf(Generator)).call(this, options));\n\n _this.random = new _random2.default(_this.seed);\n\n _this.start_pos = [0, 0];\n _this.minx = _this.size[0];\n _this.maxx = 0;\n _this.miny = _this.size[1];\n _this.maxy = 0;\n return _this;\n }\n\n _createClass(Generator, [{\n key: 'add_piece',\n value: function add_piece(piece, position) {\n _get(Generator.prototype.__proto__ || Object.getPrototypeOf(Generator.prototype), 'add_piece', this).call(this, piece, position);\n\n this.minx = Math.min(this.minx, piece.position[0]);\n this.maxx = Math.max(this.maxx, piece.position[0] + piece.size[0]);\n\n this.miny = Math.min(this.miny, piece.position[1]);\n this.maxy = Math.max(this.maxy, piece.position[1] + piece.size[1]);\n }\n }, {\n key: 'trim',\n value: function trim() {\n var _this2 = this;\n\n this.size = [this.maxx - this.minx, this.maxy - this.miny];\n this.children.forEach(function (child) {\n child.position = [child.position[0] - _this2.minx, child.position[1] - _this2.miny];\n });\n\n this.start_pos = [this.start_pos[0] - this.minx, this.start_pos[1] - this.miny];\n this.walls = this.walls.get_square([this.minx, this.miny], this.size);\n\n this.minx = 0;\n this.maxx = this.size[0];\n\n this.miny = 0;\n this.maxy = this.size[1];\n }\n }, {\n key: 'generate',\n value: function generate() {\n throw new Error('not implemented');\n }\n }, {\n key: 'fits',\n value: function fits(piece, position) {\n var p = void 0,\n x = void 0,\n y = void 0;\n for (x = 0; x < piece.size[0]; x++) {\n for (y = 0; y < piece.size[1]; y++) {\n p = this.walls.get([position[0] + x, position[1] + y]);\n if (p === false || p === null || p === undefined) {\n return false;\n }\n }\n }\n return true;\n }\n }, {\n key: 'join_exits',\n value: function join_exits(piece1, piece1_exit, piece2, piece2_exit) {\n /*\n register an exit with each piece, remove intersecting perimeter tiles\n */\n\n piece1.add_exit(piece1_exit, piece2);\n piece2.add_exit(piece2_exit, piece1);\n\n var ic = piece1.rect.intersection(piece2.rect);\n if (ic) {\n piece1.remove_perimeter(new _rectangle2.default(piece1.local_pos([ic[0], ic[1]], [ic.width, ic.height])));\n piece2.remove_perimeter(new _rectangle2.default(piece2.local_pos([ic[0], ic[1]], [ic.width, ic.height])));\n }\n }\n }, {\n key: 'join',\n value: function join(piece1, piece2_exit, piece2, piece1_exit) {\n /*\n join piece 1 to piece2 provided at least one exit.\n piece1 should already be placed\n */\n if (!piece1_exit) {\n piece1_exit = this.random.choose(piece1.get_perimeter_by_facing(_const.FACING_INVERSE[piece2_exit[1]]));\n }\n\n // global piece2 exit pos\n var piece2_exit_pos = piece1.parent_pos(piece1_exit[0]);\n\n // figure out piece2 position\n var piece2_pos = [piece2_exit_pos[0] - piece2_exit[0][0], piece2_exit_pos[1] - piece2_exit[0][1]];\n\n if (!this.fits(piece2, piece2_pos)) {\n return false;\n }\n\n this.join_exits(piece1, piece1_exit, piece2, piece2_exit);\n this.add_piece(piece2, piece2_pos);\n\n return true;\n }\n }, {\n key: 'get_open_pieces',\n value: function get_open_pieces(pieces) {\n // filter out pieces\n return pieces.filter(function (piece) {\n return piece.exits.length < piece.max_exits && piece.perimeter.length;\n });\n }\n }]);\n\n return Generator;\n}(_piece2.default);\n\nexports.default = Generator;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _piece = require('./piece');\n\nvar _piece2 = _interopRequireDefault(_piece);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Room = function (_Piece) {\n _inherits(Room, _Piece);\n\n function Room(options) {\n _classCallCheck(this, Room);\n\n /*\n note, size to be provided is size without walls.\n */\n options.room_size = options.size;\n options.size = [options.size[0] + 2, options.size[1] + 2];\n\n options = Object.assign({}, {\n symmetric: false // if true,\n }, options);\n\n var _this = _possibleConstructorReturn(this, (Room.__proto__ || Object.getPrototypeOf(Room)).call(this, options));\n\n _this.walls.set_square([1, 1], _this.room_size, false, true);\n\n if (!_this.symmetric) {\n // any point at any wall can be exit\n _this.add_perimeter([1, 0], [_this.size[0] - 2, 0], 180);\n _this.add_perimeter([0, 1], [0, _this.size[1] - 2], 90);\n _this.add_perimeter([1, _this.size[1] - 1], [_this.size[0] - 2, _this.size[1] - 1], 0);\n _this.add_perimeter([_this.size[0] - 1, 1], [_this.size[0] - 1, _this.size[1] - 2], 270);\n } else {\n // only middle of each wall can be exit\n var _this$get_center_pos = _this.get_center_pos(),\n _this$get_center_pos2 = _slicedToArray(_this$get_center_pos, 2),\n w = _this$get_center_pos2[0],\n h = _this$get_center_pos2[1];\n\n _this.perimeter = [[[w, 0], 180], [[_this.size[0] - 1, h], 270], [[w, _this.size[1] - 1], 0], [[0, h], 90]];\n }\n return _this;\n }\n\n return Room;\n}(_piece2.default);\n\nexports.default = Room;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _room = require('./room');\n\nvar _room2 = _interopRequireDefault(_room);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Corridor = function (_Room) {\n _inherits(Corridor, _Room);\n\n function Corridor(options) {\n _classCallCheck(this, Corridor);\n\n options = Object.assign({}, {\n length: 2,\n facing: 0,\n max_exits: 4\n }, options);\n\n options.size = options.facing === 0 || options.facing === 180 ? [1, options.length] : [options.length, 1];\n\n var _this = _possibleConstructorReturn(this, (Corridor.__proto__ || Object.getPrototypeOf(Corridor)).call(this, options));\n\n var w = _this.size[0] - 1;\n var h = _this.size[1] - 1;\n\n // special perimeter: allow only 4 exit points, to keep this corridor corridor-like..\n if (_this.facing === 180) {\n _this.perimeter = [[[1, h], 0], [[0, 1], 90], [[2, 1], 270], [[1, 0], 180]];\n } else if (_this.facing === 270) {\n _this.perimeter = [[[0, 1], 90], [[w - 1, 0], 180], [[w - 1, 2], 0], [[w, 1], 270]];\n } else if (_this.facing === 0) {\n _this.perimeter = [[[1, 0], 180], [[2, h - 1], 270], [[0, h - 1], 90], [[1, h], 0]];\n } else if (_this.facing === 90) {\n _this.perimeter = [[[w, 1], 270], [[1, 2], 0], [[1, 0], 180], [[0, 1], 90]];\n }\n return _this;\n }\n\n return Corridor;\n}(_room2.default);\n\nexports.default = Corridor;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _generator = require('./generator');\n\nvar _generator2 = _interopRequireDefault(_generator);\n\nvar _corridor = require('../pieces/corridor');\n\nvar _corridor2 = _interopRequireDefault(_corridor);\n\nvar _room = require('../pieces/room');\n\nvar _room2 = _interopRequireDefault(_room);\n\nvar _const = require('../const');\n\nvar _utils = require('../utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dungeon = function (_Generator) {\n _inherits(Dungeon, _Generator);\n\n function Dungeon(options) {\n _classCallCheck(this, Dungeon);\n\n options = Object.assign({}, {\n max_iterations: 50,\n size: [100, 100],\n rooms: {\n initial: {\n min_size: [3, 3],\n max_size: [3, 3],\n max_exits: 1\n },\n any: {\n min_size: [2, 2],\n max_size: [5, 5],\n max_exits: 4\n }\n },\n max_corridor_length: 6,\n min_corridor_length: 2,\n corridor_density: 0.5, // corridors per room\n symmetric_rooms: false, // exits must be in the middle of walls\n interconnects: 1, // extra corridors to connect rooms and make circular paths. not guaranteed\n max_interconnect_length: 10,\n room_count: 10\n }, options);\n\n var _this = _possibleConstructorReturn(this, (Dungeon.__proto__ || Object.getPrototypeOf(Dungeon)).call(this, options));\n\n _this.room_tags = Object.keys(_this.rooms).filter(function (tag) {\n return tag !== 'any' && tag !== 'initial';\n });\n\n for (var i = _this.room_tags.length; i < _this.room_count; i++) {\n _this.room_tags.push('any');\n }\n\n _this.rooms = [];\n _this.corridors = [];\n return _this;\n }\n\n _createClass(Dungeon, [{\n key: 'add_room',\n value: function add_room(room, exit) {\n var add_to_room = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n // add a new piece, exit is local perimeter pos for that exit;\n var choices = void 0,\n old_room = void 0;\n // pick a placed room to connect this piece to\n if (add_to_room) {\n old_room = add_to_room;\n add_to_room = null;\n } else {\n choices = this.get_open_pieces(this.children);\n if (choices && choices.length) {\n old_room = this.random.choose(choices);\n } else {\n console.log('ran out of choices connecting');\n return false;\n }\n }\n\n // if exit is specified, try joining to this specific exit\n if (exit) {\n // try joining the rooms\n if (this.join(old_room, exit, room)) {\n return true;\n }\n // else try all perims to see\n } else {\n var perim = room.perimeter.slice();\n while (perim.length) {\n if (this.join(old_room, this.random.choose(perim, true), room)) {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: 'new_corridor',\n value: function new_corridor() {\n return new _corridor2.default({\n length: this.random.int(this.min_corridor_length, this.max_corridor_length),\n facing: this.random.choose(_const.FACING)\n });\n }\n }, {\n key: 'add_interconnect',\n value: function add_interconnect() {\n var perims = {};\n var hash = void 0;\n var exit = void 0;\n var p = void 0;\n\n // hash all possible exits\n this.children.forEach(function (child) {\n if (child.exits.length < child.max_exits) {\n child.perimeter.forEach(function (exit) {\n p = child.parent_pos(exit[0]);\n hash = p[0] + '_' + p[1];\n perims[hash] = [exit, child];\n });\n }\n });\n\n // search each room for a possible interconnect, backwards\n var room = void 0,\n length = void 0,\n corridor = void 0,\n room2 = void 0;\n for (var i = this.children.length - 1; i--; i >= 0) {\n room = this.children[i];\n\n // if room has exits available\n if (room.exits.length < room.max_exits) {\n // iterate exits\n for (var k = 0; k < room.perimeter.length; k++) {\n exit = room.perimeter[k];\n p = room.parent_pos(exit[0]);\n length = -1;\n\n // try to dig a tunnel from this exit and see if it hits anything\n while (length <= this.max_interconnect_length) {\n // check if space is not occupied\n if (!this.walls.get(p) || !this.walls.get((0, _utils.shift_left)(p, exit[1])) || !this.walls.get((0, _utils.shift_right)(p, exit[1]))) {\n break;\n }\n hash = p[0] + '_' + p[1];\n\n // is there a potential exit at these coordiantes (not of the same room)\n if (perims[hash] && perims[hash][1].id !== room.id) {\n room2 = perims[hash][1];\n\n // rooms cant be joined directly, add a corridor\n if (length > -1) {\n corridor = new _corridor2.default({\n length: length,\n facing: exit[1]\n });\n\n if (this.join(room, corridor.perimeter[0], corridor, exit)) {\n this.join_exits(room2, perims[hash][0], corridor, corridor.perimeter[corridor.perimeter.length - 1]);\n return true;\n } else {\n return false;\n }\n // rooms can be joined directly\n } else {\n this.join_exits(room2, perims[hash][0], room, exit);\n return true;\n }\n }\n\n // exit not found, try to make the interconnect longer\n p = (0, _utils.shift)(p, exit[1]);\n length++;\n }\n }\n }\n }\n }\n }, {\n key: 'new_room',\n value: function new_room(key) {\n // spawn next room\n key = key || this.random.choose(this.room_tags, false);\n\n var opts = this.options.rooms[key];\n\n var room = new _room2.default({\n size: this.random.vec(opts.min_size, opts.max_size),\n max_exits: opts.max_exits,\n symmetric: this.symmetric_rooms,\n tag: key\n });\n\n this.room_tags.splice(this.room_tags.indexOf(key), 1);\n\n if (key === 'initial') {\n this.initial_room = room;\n }\n return room;\n }\n }, {\n key: 'generate',\n value: function generate() {\n var no_rooms = this.options.room_count - 1;\n var room = this.new_room(this.options.rooms.initial ? 'initial' : undefined);\n var no_corridors = Math.round(this.corridor_density * no_rooms);\n\n this.add_piece(room, this.options.rooms.initial && this.options.rooms.initial.position ? this.options.rooms.initial.position : this.get_center_pos());\n\n var k = void 0;\n var iterations = this.max_iterations;\n\n while ((no_corridors || no_rooms) && --iterations) {\n k = this.random.int(1, no_rooms + no_corridors);\n if (k <= no_corridors) {\n var corridor = this.new_corridor();\n var added = this.add_room(corridor, corridor.perimeter[0]);\n no_corridors--;\n\n // try to connect to this corridor next\n if (no_rooms > 0 && added) {\n this.add_room(this.new_room(), null, corridor);\n no_rooms--;\n }\n } else {\n this.add_room(this.new_room());\n no_rooms--;\n }\n }\n\n for (k = 0; k < this.interconnects; k++) {\n this.add_interconnect();\n }\n\n this.trim();\n\n if (this.initial_room) {\n this.start_pos = this.initial_room.global_pos(this.initial_room.get_center_pos());\n }\n\n return iterations > 0;\n }\n }]);\n\n return Dungeon;\n}(_generator2.default);\n\nexports.default = Dungeon;","module.exports = require('./lib/generators/dungeon').default;\n\n","// Chance.js 1.1.8\n// http://chancejs.com\n// (c) 2013 Victor Quinn\n// Chance may be freely distributed or modified under the MIT license.\n\n(function () {\n\n // Constants\n var MAX_INT = 9007199254740992;\n var MIN_INT = -MAX_INT;\n var NUMBERS = '0123456789';\n var CHARS_LOWER = 'abcdefghijklmnopqrstuvwxyz';\n var CHARS_UPPER = CHARS_LOWER.toUpperCase();\n var HEX_POOL = NUMBERS + \"abcdef\";\n\n // Errors\n function UnsupportedError(message) {\n this.name = 'UnsupportedError';\n this.message = message || 'This feature is not supported on this platform';\n }\n\n UnsupportedError.prototype = new Error();\n UnsupportedError.prototype.constructor = UnsupportedError;\n\n // Cached array helpers\n var slice = Array.prototype.slice;\n\n // Constructor\n function Chance (seed) {\n if (!(this instanceof Chance)) {\n if (!seed) { seed = null; } // handle other non-truthy seeds, as described in issue #322\n return seed === null ? new Chance() : new Chance(seed);\n }\n\n // if user has provided a function, use that as the generator\n if (typeof seed === 'function') {\n this.random = seed;\n return this;\n }\n\n if (arguments.length) {\n // set a starting value of zero so we can add to it\n this.seed = 0;\n }\n\n // otherwise, leave this.seed blank so that MT will receive a blank\n\n for (var i = 0; i < arguments.length; i++) {\n var seedling = 0;\n if (Object.prototype.toString.call(arguments[i]) === '[object String]') {\n for (var j = 0; j < arguments[i].length; j++) {\n // create a numeric hash for each argument, add to seedling\n var hash = 0;\n for (var k = 0; k < arguments[i].length; k++) {\n hash = arguments[i].charCodeAt(k) + (hash << 6) + (hash << 16) - hash;\n }\n seedling += hash;\n }\n } else {\n seedling = arguments[i];\n }\n this.seed += (arguments.length - i) * seedling;\n }\n\n // If no generator function was provided, use our MT\n this.mt = this.mersenne_twister(this.seed);\n this.bimd5 = this.blueimp_md5();\n this.random = function () {\n return this.mt.random(this.seed);\n };\n\n return this;\n }\n\n Chance.prototype.VERSION = \"1.1.8\";\n\n // Random helper functions\n function initOptions(options, defaults) {\n options = options || {};\n\n if (defaults) {\n for (var i in defaults) {\n if (typeof options[i] === 'undefined') {\n options[i] = defaults[i];\n }\n }\n }\n\n return options;\n }\n\n function range(size) {\n return Array.apply(null, Array(size)).map(function (_, i) {return i;});\n }\n\n function testRange(test, errorMessage) {\n if (test) {\n throw new RangeError(errorMessage);\n }\n }\n\n /**\n * Encode the input string with Base64.\n */\n var base64 = function() {\n throw new Error('No Base64 encoder available.');\n };\n\n // Select proper Base64 encoder.\n (function determineBase64Encoder() {\n if (typeof btoa === 'function') {\n base64 = btoa;\n } else if (typeof Buffer === 'function') {\n base64 = function(input) {\n return new Buffer(input).toString('base64');\n };\n }\n })();\n\n // -- Basics --\n\n /**\n * Return a random bool, either true or false\n *\n * @param {Object} [options={ likelihood: 50 }] alter the likelihood of\n * receiving a true or false value back.\n * @throws {RangeError} if the likelihood is out of bounds\n * @returns {Bool} either true or false\n */\n Chance.prototype.bool = function (options) {\n // likelihood of success (true)\n options = initOptions(options, {likelihood : 50});\n\n // Note, we could get some minor perf optimizations by checking range\n // prior to initializing defaults, but that makes code a bit messier\n // and the check more complicated as we have to check existence of\n // the object then existence of the key before checking constraints.\n // Since the options initialization should be minor computationally,\n // decision made for code cleanliness intentionally. This is mentioned\n // here as it's the first occurrence, will not be mentioned again.\n testRange(\n options.likelihood < 0 || options.likelihood > 100,\n \"Chance: Likelihood accepts values from 0 to 100.\"\n );\n\n return this.random() * 100 < options.likelihood;\n };\n\n Chance.prototype.falsy = function (options) {\n // return a random falsy value\n options = initOptions(options, {pool: [false, null, 0, NaN, '']})\n var pool = options.pool,\n index = this.integer({min: 0, max: pool.length}),\n value = pool[index];\n\n return value;\n }\n\n Chance.prototype.animal = function (options){\n //returns a random animal\n options = initOptions(options);\n\n if(typeof options.type !== 'undefined'){\n //if user does not put in a valid animal type, user will get an error\n testRange(\n !this.get(\"animals\")[options.type.toLowerCase()],\n \"Please pick from desert, ocean, grassland, forest, zoo, pets, farm.\"\n );\n //if user does put in valid animal type, will return a random animal of that type\n return this.pick(this.get(\"animals\")[options.type.toLowerCase()]);\n }\n //if user does not put in any animal type, will return a random animal regardless\n var animalTypeArray = [\"desert\",\"forest\",\"ocean\",\"zoo\",\"farm\",\"pet\",\"grassland\"];\n return this.pick(this.get(\"animals\")[this.pick(animalTypeArray)]);\n };\n\n /**\n * Return a random character.\n *\n * @param {Object} [options={}] can specify a character pool or alpha,\n * numeric, symbols and casing (lower or upper)\n * @returns {String} a single random character\n */\n Chance.prototype.character = function (options) {\n options = initOptions(options);\n\n var symbols = \"!@#$%^&*()[]\",\n letters, pool;\n\n if (options.casing === 'lower') {\n letters = CHARS_LOWER;\n } else if (options.casing === 'upper') {\n letters = CHARS_UPPER;\n } else {\n letters = CHARS_LOWER + CHARS_UPPER;\n }\n\n if (options.pool) {\n pool = options.pool;\n } else {\n pool = '';\n if (options.alpha) {\n pool += letters;\n }\n if (options.numeric) {\n pool += NUMBERS;\n }\n if (options.symbols) {\n pool += symbols;\n }\n if (!pool) {\n pool = letters + NUMBERS + symbols;\n }\n }\n\n return pool.charAt(this.natural({max: (pool.length - 1)}));\n };\n\n // Note, wanted to use \"float\" or \"double\" but those are both JS reserved words.\n\n // Note, fixed means N OR LESS digits after the decimal. This because\n // It could be 14.9000 but in JavaScript, when this is cast as a number,\n // the trailing zeroes are dropped. Left to the consumer if trailing zeroes are\n // needed\n /**\n * Return a random floating point number\n *\n * @param {Object} [options={}] can specify a fixed precision, min, max\n * @returns {Number} a single floating point number\n * @throws {RangeError} Can only specify fixed or precision, not both. Also\n * min cannot be greater than max\n */\n Chance.prototype.floating = function (options) {\n options = initOptions(options, {fixed : 4});\n testRange(\n options.fixed && options.precision,\n \"Chance: Cannot specify both fixed and precision.\"\n );\n\n var num;\n var fixed = Math.pow(10, options.fixed);\n\n var max = MAX_INT / fixed;\n var min = -max;\n\n testRange(\n options.min && options.fixed && options.min < min,\n \"Chance: Min specified is out of range with fixed. Min should be, at least, \" + min\n );\n testRange(\n options.max && options.fixed && options.max > max,\n \"Chance: Max specified is out of range with fixed. Max should be, at most, \" + max\n );\n\n options = initOptions(options, { min : min, max : max });\n\n // Todo - Make this work!\n // options.precision = (typeof options.precision !== \"undefined\") ? options.precision : false;\n\n num = this.integer({min: options.min * fixed, max: options.max * fixed});\n var num_fixed = (num / fixed).toFixed(options.fixed);\n\n return parseFloat(num_fixed);\n };\n\n /**\n * Return a random integer\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.integer({min: 1, max: 3});\n * would return either 1, 2, or 3.\n *\n * @param {Object} [options={}] can specify a min and/or max\n * @returns {Number} a single random integer number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.integer = function (options) {\n // 9007199254740992 (2^53) is the max integer number in JavaScript\n // See: http://vq.io/132sa2j\n options = initOptions(options, {min: MIN_INT, max: MAX_INT});\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return Math.floor(this.random() * (options.max - options.min + 1) + options.min);\n };\n\n /**\n * Return a random natural\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.natural({min: 1, max: 3});\n * would return either 1, 2, or 3.\n *\n * @param {Object} [options={}] can specify a min and/or max or a numerals count.\n * @returns {Number} a single random integer number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.natural = function (options) {\n options = initOptions(options, {min: 0, max: MAX_INT});\n if (typeof options.numerals === 'number'){\n testRange(options.numerals < 1, \"Chance: Numerals cannot be less than one.\");\n options.min = Math.pow(10, options.numerals - 1);\n options.max = Math.pow(10, options.numerals) - 1;\n }\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n\n if (options.exclude) {\n testRange(!Array.isArray(options.exclude), \"Chance: exclude must be an array.\")\n\n for (var exclusionIndex in options.exclude) {\n testRange(!Number.isInteger(options.exclude[exclusionIndex]), \"Chance: exclude must be numbers.\")\n }\n\n var random = options.min + this.natural({max: options.max - options.min - options.exclude.length})\n var sortedExclusions = options.exclude.sort();\n for (var sortedExclusionIndex in sortedExclusions) {\n if (random < sortedExclusions[sortedExclusionIndex]) {\n break\n }\n random++\n }\n return random\n }\n return this.integer(options);\n };\n\n /**\n * Return a random prime number\n *\n * NOTE the max and min are INCLUDED in the range.\n *\n * @param {Object} [options={}] can specify a min and/or max\n * @returns {Number} a single random prime number\n * @throws {RangeError} min cannot be greater than max nor negative\n */\n Chance.prototype.prime = function (options) {\n options = initOptions(options, {min: 0, max: 10000});\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n var lastPrime = data.primes[data.primes.length - 1];\n if (options.max > lastPrime) {\n for (var i = lastPrime + 2; i <= options.max; ++i) {\n if (this.is_prime(i)) {\n data.primes.push(i);\n }\n }\n }\n var targetPrimes = data.primes.filter(function (prime) {\n return prime >= options.min && prime <= options.max;\n });\n return this.pick(targetPrimes);\n };\n\n /**\n * Determine whether a given number is prime or not.\n */\n Chance.prototype.is_prime = function (n) {\n if (n % 1 || n < 2) {\n return false;\n }\n if (n % 2 === 0) {\n return n === 2;\n }\n if (n % 3 === 0) {\n return n === 3;\n }\n var m = Math.sqrt(n);\n for (var i = 5; i <= m; i += 6) {\n if (n % i === 0 || n % (i + 2) === 0) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * Return a random hex number as string\n *\n * NOTE the max and min are INCLUDED in the range. So:\n * chance.hex({min: '9', max: 'B'});\n * would return either '9', 'A' or 'B'.\n *\n * @param {Object} [options={}] can specify a min and/or max and/or casing\n * @returns {String} a single random string hex number\n * @throws {RangeError} min cannot be greater than max\n */\n Chance.prototype.hex = function (options) {\n options = initOptions(options, {min: 0, max: MAX_INT, casing: 'lower'});\n testRange(options.min < 0, \"Chance: Min cannot be less than zero.\");\n\t\tvar integer = this.natural({min: options.min, max: options.max});\n\t\tif (options.casing === 'upper') {\n\t\t\treturn integer.toString(16).toUpperCase();\n\t\t}\n\t\treturn integer.toString(16);\n };\n\n Chance.prototype.letter = function(options) {\n options = initOptions(options, {casing: 'lower'});\n var pool = \"abcdefghijklmnopqrstuvwxyz\";\n var letter = this.character({pool: pool});\n if (options.casing === 'upper') {\n letter = letter.toUpperCase();\n }\n return letter;\n }\n\n /**\n * Return a random string\n *\n * @param {Object} [options={}] can specify a length or min and max\n * @returns {String} a string of random length\n * @throws {RangeError} length cannot be less than zero\n */\n Chance.prototype.string = function (options) {\n options = initOptions(options, { min: 5, max: 20 });\n\n if (!options.length) {\n options.length = this.natural({ min: options.min, max: options.max })\n }\n\n testRange(options.length < 0, \"Chance: Length cannot be less than zero.\");\n var length = options.length,\n text = this.n(this.character, length, options);\n\n return text.join(\"\");\n };\n\n function CopyToken(c) {\n this.c = c\n }\n\n CopyToken.prototype = {\n substitute: function () {\n return this.c\n }\n }\n\n function EscapeToken(c) {\n this.c = c\n }\n\n EscapeToken.prototype = {\n substitute: function () {\n if (!/[{}\\\\]/.test(this.c)) {\n throw new Error('Invalid escape sequence: \"\\\\' + this.c + '\".')\n }\n return this.c\n }\n }\n\n function ReplaceToken(c) {\n this.c = c\n }\n\n ReplaceToken.prototype = {\n replacers: {\n '#': function (chance) { return chance.character({ pool: NUMBERS }) },\n 'A': function (chance) { return chance.character({ pool: CHARS_UPPER }) },\n 'a': function (chance) { return chance.character({ pool: CHARS_LOWER }) },\n },\n\n substitute: function (chance) {\n var replacer = this.replacers[this.c]\n if (!replacer) {\n throw new Error('Invalid replacement character: \"' + this.c + '\".')\n }\n return replacer(chance)\n }\n }\n\n function parseTemplate(template) {\n var tokens = []\n var mode = 'identity'\n for (var i = 0; i MAX_DUPLICATES) {\n throw new RangeError(\"Chance: num is likely too large for sample set\");\n }\n }\n return arr;\n };\n\n /**\n * Gives an array of n random terms\n *\n * @param {Function} fn the function that generates something random\n * @param {Number} n number of terms to generate\n * @returns {Array} an array of length `n` with items generated by `fn`\n *\n * There can be more parameters after these. All additional parameters are provided to the given function\n */\n Chance.prototype.n = function(fn, n) {\n testRange(\n typeof fn !== \"function\",\n \"Chance: The first argument must be a function.\"\n );\n\n if (typeof n === 'undefined') {\n n = 1;\n }\n var i = n, arr = [], params = slice.call(arguments, 2);\n\n // Providing a negative count should result in a noop.\n i = Math.max( 0, i );\n\n for (null; i--; null) {\n arr.push(fn.apply(this, params));\n }\n\n return arr;\n };\n\n // H/T to SO for this one: http://vq.io/OtUrZ5\n Chance.prototype.pad = function (number, width, pad) {\n // Default pad to 0 if none provided\n pad = pad || '0';\n // Convert number to a string\n number = number + '';\n return number.length >= width ? number : new Array(width - number.length + 1).join(pad) + number;\n };\n\n // DEPRECATED on 2015-10-01\n Chance.prototype.pick = function (arr, count) {\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pick() from an empty array\");\n }\n if (!count || count === 1) {\n return arr[this.natural({max: arr.length - 1})];\n } else {\n return this.shuffle(arr).slice(0, count);\n }\n };\n\n // Given an array, returns a single random element\n Chance.prototype.pickone = function (arr) {\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pickone() from an empty array\");\n }\n return arr[this.natural({max: arr.length - 1})];\n };\n\n // Given an array, returns a random set with 'count' elements\n Chance.prototype.pickset = function (arr, count) {\n if (count === 0) {\n return [];\n }\n if (arr.length === 0) {\n throw new RangeError(\"Chance: Cannot pickset() from an empty array\");\n }\n if (count < 0) {\n throw new RangeError(\"Chance: Count must be a positive number\");\n }\n if (!count || count === 1) {\n return [ this.pickone(arr) ];\n } else {\n var array = arr.slice(0);\n var end = array.length;\n\n return this.n(function () {\n var index = this.natural({max: --end});\n var value = array[index];\n array[index] = array[end];\n return value;\n }, Math.min(end, count));\n }\n };\n\n Chance.prototype.shuffle = function (arr) {\n var new_array = [],\n j = 0,\n length = Number(arr.length),\n source_indexes = range(length),\n last_source_index = length - 1,\n selected_source_index;\n\n for (var i = 0; i < length; i++) {\n // Pick a random index from the array\n selected_source_index = this.natural({max: last_source_index});\n j = source_indexes[selected_source_index];\n\n // Add it to the new array\n new_array[i] = arr[j];\n\n // Mark the source index as used\n source_indexes[selected_source_index] = source_indexes[last_source_index];\n last_source_index -= 1;\n }\n\n return new_array;\n };\n\n // Returns a single item from an array with relative weighting of odds\n Chance.prototype.weighted = function (arr, weights, trim) {\n if (arr.length !== weights.length) {\n throw new RangeError(\"Chance: Length of array and weights must match\");\n }\n\n // scan weights array and sum valid entries\n var sum = 0;\n var val;\n for (var weightIndex = 0; weightIndex < weights.length; ++weightIndex) {\n val = weights[weightIndex];\n if (isNaN(val)) {\n throw new RangeError(\"Chance: All weights must be numbers\");\n }\n\n if (val > 0) {\n sum += val;\n }\n }\n\n if (sum === 0) {\n throw new RangeError(\"Chance: No valid entries in array weights\");\n }\n\n // select a value within range\n var selected = this.random() * sum;\n\n // find array entry corresponding to selected value\n var total = 0;\n var lastGoodIdx = -1;\n var chosenIdx;\n for (weightIndex = 0; weightIndex < weights.length; ++weightIndex) {\n val = weights[weightIndex];\n total += val;\n if (val > 0) {\n if (selected <= total) {\n chosenIdx = weightIndex;\n break;\n }\n lastGoodIdx = weightIndex;\n }\n\n // handle any possible rounding error comparison to ensure something is picked\n if (weightIndex === (weights.length - 1)) {\n chosenIdx = lastGoodIdx;\n }\n }\n\n var chosen = arr[chosenIdx];\n trim = (typeof trim === 'undefined') ? false : trim;\n if (trim) {\n arr.splice(chosenIdx, 1);\n weights.splice(chosenIdx, 1);\n }\n\n return chosen;\n };\n\n // -- End Helpers --\n\n // -- Text --\n\n Chance.prototype.paragraph = function (options) {\n options = initOptions(options);\n\n var sentences = options.sentences || this.natural({min: 3, max: 7}),\n sentence_array = this.n(this.sentence, sentences),\n separator = options.linebreak === true ? '\\n' : ' ';\n\n return sentence_array.join(separator);\n };\n\n // Could get smarter about this than generating random words and\n // chaining them together. Such as: http://vq.io/1a5ceOh\n Chance.prototype.sentence = function (options) {\n options = initOptions(options);\n\n var words = options.words || this.natural({min: 12, max: 18}),\n punctuation = options.punctuation,\n text, word_array = this.n(this.word, words);\n\n text = word_array.join(' ');\n\n // Capitalize first letter of sentence\n text = this.capitalize(text);\n\n // Make sure punctuation has a usable value\n if (punctuation !== false && !/^[.?;!:]$/.test(punctuation)) {\n punctuation = '.';\n }\n\n // Add punctuation mark\n if (punctuation) {\n text += punctuation;\n }\n\n return text;\n };\n\n Chance.prototype.syllable = function (options) {\n options = initOptions(options);\n\n var length = options.length || this.natural({min: 2, max: 3}),\n consonants = 'bcdfghjklmnprstvwz', // consonants except hard to speak ones\n vowels = 'aeiou', // vowels\n all = consonants + vowels, // all\n text = '',\n chr;\n\n // I'm sure there's a more elegant way to do this, but this works\n // decently well.\n for (var i = 0; i < length; i++) {\n if (i === 0) {\n // First character can be anything\n chr = this.character({pool: all});\n } else if (consonants.indexOf(chr) === -1) {\n // Last character was a vowel, now we want a consonant\n chr = this.character({pool: consonants});\n } else {\n // Last character was a consonant, now we want a vowel\n chr = this.character({pool: vowels});\n }\n\n text += chr;\n }\n\n if (options.capitalize) {\n text = this.capitalize(text);\n }\n\n return text;\n };\n\n Chance.prototype.word = function (options) {\n options = initOptions(options);\n\n testRange(\n options.syllables && options.length,\n \"Chance: Cannot specify both syllables AND length.\"\n );\n\n var syllables = options.syllables || this.natural({min: 1, max: 3}),\n text = '';\n\n if (options.length) {\n // Either bound word by length\n do {\n text += this.syllable();\n } while (text.length < options.length);\n text = text.substring(0, options.length);\n } else {\n // Or by number of syllables\n for (var i = 0; i < syllables; i++) {\n text += this.syllable();\n }\n }\n\n if (options.capitalize) {\n text = this.capitalize(text);\n }\n\n return text;\n };\n\n // -- End Text --\n\n // -- Person --\n\n Chance.prototype.age = function (options) {\n options = initOptions(options);\n var ageRange;\n\n switch (options.type) {\n case 'child':\n ageRange = {min: 0, max: 12};\n break;\n case 'teen':\n ageRange = {min: 13, max: 19};\n break;\n case 'adult':\n ageRange = {min: 18, max: 65};\n break;\n case 'senior':\n ageRange = {min: 65, max: 100};\n break;\n case 'all':\n ageRange = {min: 0, max: 100};\n break;\n default:\n ageRange = {min: 18, max: 65};\n break;\n }\n\n return this.natural(ageRange);\n };\n\n Chance.prototype.birthday = function (options) {\n var age = this.age(options);\n var currentYear = new Date().getFullYear();\n\n if (options && options.type) {\n var min = new Date();\n var max = new Date();\n min.setFullYear(currentYear - age - 1);\n max.setFullYear(currentYear - age);\n\n options = initOptions(options, {\n min: min,\n max: max\n });\n } else {\n options = initOptions(options, {\n year: currentYear - age\n });\n }\n\n return this.date(options);\n };\n\n // CPF; ID to identify taxpayers in Brazil\n Chance.prototype.cpf = function (options) {\n options = initOptions(options, {\n formatted: true\n });\n\n var n = this.n(this.natural, 9, { max: 9 });\n var d1 = n[8]*2+n[7]*3+n[6]*4+n[5]*5+n[4]*6+n[3]*7+n[2]*8+n[1]*9+n[0]*10;\n d1 = 11 - (d1 % 11);\n if (d1>=10) {\n d1 = 0;\n }\n var d2 = d1*2+n[8]*3+n[7]*4+n[6]*5+n[5]*6+n[4]*7+n[3]*8+n[2]*9+n[1]*10+n[0]*11;\n d2 = 11 - (d2 % 11);\n if (d2>=10) {\n d2 = 0;\n }\n var cpf = ''+n[0]+n[1]+n[2]+'.'+n[3]+n[4]+n[5]+'.'+n[6]+n[7]+n[8]+'-'+d1+d2;\n return options.formatted ? cpf : cpf.replace(/\\D/g,'');\n };\n\n // CNPJ: ID to identify companies in Brazil\n Chance.prototype.cnpj = function (options) {\n options = initOptions(options, {\n formatted: true\n });\n\n var n = this.n(this.natural, 12, { max: 12 });\n var d1 = n[11]*2+n[10]*3+n[9]*4+n[8]*5+n[7]*6+n[6]*7+n[5]*8+n[4]*9+n[3]*2+n[2]*3+n[1]*4+n[0]*5;\n d1 = 11 - (d1 % 11);\n if (d1<2) {\n d1 = 0;\n }\n var d2 = d1*2+n[11]*3+n[10]*4+n[9]*5+n[8]*6+n[7]*7+n[6]*8+n[5]*9+n[4]*2+n[3]*3+n[2]*4+n[1]*5+n[0]*6;\n d2 = 11 - (d2 % 11);\n if (d2<2) {\n d2 = 0;\n }\n var cnpj = ''+n[0]+n[1]+'.'+n[2]+n[3]+n[4]+'.'+n[5]+n[6]+n[7]+'/'+n[8]+n[9]+n[10]+n[11]+'-'+d1+d2;\n return options.formatted ? cnpj : cnpj.replace(/\\D/g,'');\n };\n\n Chance.prototype.first = function (options) {\n options = initOptions(options, {gender: this.gender(), nationality: 'en'});\n return this.pick(this.get(\"firstNames\")[options.gender.toLowerCase()][options.nationality.toLowerCase()]);\n };\n\n Chance.prototype.profession = function (options) {\n options = initOptions(options);\n if(options.rank){\n return this.pick(['Apprentice ', 'Junior ', 'Senior ', 'Lead ']) + this.pick(this.get(\"profession\"));\n } else{\n return this.pick(this.get(\"profession\"));\n }\n };\n\n Chance.prototype.company = function (){\n return this.pick(this.get(\"company\"));\n };\n\n Chance.prototype.gender = function (options) {\n options = initOptions(options, {extraGenders: []});\n return this.pick(['Male', 'Female'].concat(options.extraGenders));\n };\n\n Chance.prototype.last = function (options) {\n options = initOptions(options, {nationality: '*'});\n if (options.nationality === \"*\") {\n var allLastNames = []\n var lastNames = this.get(\"lastNames\")\n Object.keys(lastNames).forEach(function(key){\n allLastNames = allLastNames.concat(lastNames[key])\n })\n return this.pick(allLastNames)\n }\n else {\n return this.pick(this.get(\"lastNames\")[options.nationality.toLowerCase()]);\n }\n\n };\n\n Chance.prototype.israelId=function(){\n var x=this.string({pool: '0123456789',length:8});\n var y=0;\n for (var i=0;i hex\n * -> rgb\n * -> rgba\n * -> 0x\n * -> named color\n *\n * #Examples:\n * ===============================================\n * * Geerate random hex color\n * chance.color() => '#79c157' / 'rgb(110,52,164)' / '0x67ae0b' / '#e2e2e2' / '#29CFA7'\n *\n * * Generate Hex based color value\n * chance.color({format: 'hex'}) => '#d67118'\n *\n * * Generate simple rgb value\n * chance.color({format: 'rgb'}) => 'rgb(110,52,164)'\n *\n * * Generate Ox based color value\n * chance.color({format: '0x'}) => '0x67ae0b'\n *\n * * Generate graiscale based value\n * chance.color({grayscale: true}) => '#e2e2e2'\n *\n * * Return valide color name\n * chance.color({format: 'name'}) => 'red'\n *\n * * Make color uppercase\n * chance.color({casing: 'upper'}) => '#29CFA7'\n *\n * * Min Max values for RGBA\n * var light_red = chance.color({format: 'hex', min_red: 200, max_red: 255, max_green: 0, max_blue: 0, min_alpha: .2, max_alpha: .3});\n *\n * @param [object] options\n * @return [string] color value\n */\n Chance.prototype.color = function (options) {\n function gray(value, delimiter) {\n return [value, value, value].join(delimiter || '');\n }\n\n function rgb(hasAlpha) {\n var rgbValue = (hasAlpha) ? 'rgba' : 'rgb';\n var alphaChannel = (hasAlpha) ? (',' + this.floating({min:min_alpha, max:max_alpha})) : \"\";\n var colorValue = (isGrayscale) ? (gray(this.natural({min: min_rgb, max: max_rgb}), ',')) : (this.natural({min: min_green, max: max_green}) + ',' + this.natural({min: min_blue, max: max_blue}) + ',' + this.natural({max: 255}));\n return rgbValue + '(' + colorValue + alphaChannel + ')';\n }\n\n function hex(start, end, withHash) {\n var symbol = (withHash) ? \"#\" : \"\";\n var hexstring = \"\";\n\n if (isGrayscale) {\n hexstring = gray(this.pad(this.hex({min: min_rgb, max: max_rgb}), 2));\n if (options.format === \"shorthex\") {\n hexstring = gray(this.hex({min: 0, max: 15}));\n }\n }\n else {\n if (options.format === \"shorthex\") {\n hexstring = this.pad(this.hex({min: Math.floor(min_red / 16), max: Math.floor(max_red / 16)}), 1) + this.pad(this.hex({min: Math.floor(min_green / 16), max: Math.floor(max_green / 16)}), 1) + this.pad(this.hex({min: Math.floor(min_blue / 16), max: Math.floor(max_blue / 16)}), 1);\n }\n else if (min_red !== undefined || max_red !== undefined || min_green !== undefined || max_green !== undefined || min_blue !== undefined || max_blue !== undefined) {\n hexstring = this.pad(this.hex({min: min_red, max: max_red}), 2) + this.pad(this.hex({min: min_green, max: max_green}), 2) + this.pad(this.hex({min: min_blue, max: max_blue}), 2);\n }\n else {\n hexstring = this.pad(this.hex({min: min_rgb, max: max_rgb}), 2) + this.pad(this.hex({min: min_rgb, max: max_rgb}), 2) + this.pad(this.hex({min: min_rgb, max: max_rgb}), 2);\n }\n }\n\n return symbol + hexstring;\n }\n\n options = initOptions(options, {\n format: this.pick(['hex', 'shorthex', 'rgb', 'rgba', '0x', 'name']),\n grayscale: false,\n casing: 'lower',\n min: 0,\n max: 255,\n min_red: undefined,\n max_red: undefined,\n min_green: undefined,\n max_green: undefined,\n min_blue: undefined,\n max_blue: undefined,\n min_alpha: 0,\n max_alpha: 1\n });\n\n var isGrayscale = options.grayscale;\n var min_rgb = options.min;\n var max_rgb = options.max;\n var min_red = options.min_red;\n var max_red = options.max_red;\n var min_green = options.min_green;\n var max_green = options.max_green;\n var min_blue = options.min_blue;\n var max_blue = options.max_blue;\n var min_alpha = options.min_alpha;\n var max_alpha = options.max_alpha;\n if (options.min_red === undefined) { min_red = min_rgb; }\n if (options.max_red === undefined) { max_red = max_rgb; }\n if (options.min_green === undefined) { min_green = min_rgb; }\n if (options.max_green === undefined) { max_green = max_rgb; }\n if (options.min_blue === undefined) { min_blue = min_rgb; }\n if (options.max_blue === undefined) { max_blue = max_rgb; }\n if (options.min_alpha === undefined) { min_alpha = 0; }\n if (options.max_alpha === undefined) { max_alpha = 1; }\n if (isGrayscale && min_rgb === 0 && max_rgb === 255 && min_red !== undefined && max_red !== undefined) {\n min_rgb = ((min_red + min_green + min_blue) / 3);\n max_rgb = ((max_red + max_green + max_blue) / 3);\n }\n var colorValue;\n\n if (options.format === 'hex') {\n colorValue = hex.call(this, 2, 6, true);\n }\n else if (options.format === 'shorthex') {\n colorValue = hex.call(this, 1, 3, true);\n }\n else if (options.format === 'rgb') {\n colorValue = rgb.call(this, false);\n }\n else if (options.format === 'rgba') {\n colorValue = rgb.call(this, true);\n }\n else if (options.format === '0x') {\n colorValue = '0x' + hex.call(this, 2, 6);\n }\n else if(options.format === 'name') {\n return this.pick(this.get(\"colorNames\"));\n }\n else {\n throw new RangeError('Invalid format provided. Please provide one of \"hex\", \"shorthex\", \"rgb\", \"rgba\", \"0x\" or \"name\".');\n }\n\n if (options.casing === 'upper' ) {\n colorValue = colorValue.toUpperCase();\n }\n\n return colorValue;\n };\n\n Chance.prototype.domain = function (options) {\n options = initOptions(options);\n return this.word() + '.' + (options.tld || this.tld());\n };\n\n Chance.prototype.email = function (options) {\n options = initOptions(options);\n return this.word({length: options.length}) + '@' + (options.domain || this.domain());\n };\n\n /**\n * #Description:\n * ===============================================\n * Generate a random Facebook id, aka fbid.\n *\n * NOTE: At the moment (Sep 2017), Facebook ids are\n * \"numeric strings\" of length 16.\n * However, Facebook Graph API documentation states that\n * \"it is extremely likely to change over time\".\n * @see https://developers.facebook.com/docs/graph-api/overview/\n *\n * #Examples:\n * ===============================================\n * chance.fbid() => '1000035231661304'\n *\n * @return [string] facebook id\n */\n Chance.prototype.fbid = function () {\n return '10000' + this.string({pool: \"1234567890\", length: 11});\n };\n\n Chance.prototype.google_analytics = function () {\n var account = this.pad(this.natural({max: 999999}), 6);\n var property = this.pad(this.natural({max: 99}), 2);\n\n return 'UA-' + account + '-' + property;\n };\n\n Chance.prototype.hashtag = function () {\n return '#' + this.word();\n };\n\n Chance.prototype.ip = function () {\n // Todo: This could return some reserved IPs. See http://vq.io/137dgYy\n // this should probably be updated to account for that rare as it may be\n return this.natural({min: 1, max: 254}) + '.' +\n this.natural({max: 255}) + '.' +\n this.natural({max: 255}) + '.' +\n this.natural({min: 1, max: 254});\n };\n\n Chance.prototype.ipv6 = function () {\n var ip_addr = this.n(this.hash, 8, {length: 4});\n\n return ip_addr.join(\":\");\n };\n\n Chance.prototype.klout = function () {\n return this.natural({min: 1, max: 99});\n };\n\n Chance.prototype.mac = function (options) {\n // Todo: This could also be extended to EUI-64 based MACs\n // (https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml#ethernet-numbers-4)\n // Todo: This can return some reserved MACs (similar to IP function)\n // this should probably be updated to account for that rare as it may be\n options = initOptions(options, { delimiter: ':' });\n return this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2) + options.delimiter +\n this.pad(this.natural({max: 255}).toString(16),2);\n };\n\n Chance.prototype.semver = function (options) {\n options = initOptions(options, { include_prerelease: true });\n\n var range = this.pickone([\"^\", \"~\", \"<\", \">\", \"<=\", \">=\", \"=\"]);\n if (options.range) {\n range = options.range;\n }\n\n var prerelease = \"\";\n if (options.include_prerelease) {\n prerelease = this.weighted([\"\", \"-dev\", \"-beta\", \"-alpha\"], [50, 10, 5, 1]);\n }\n return range + this.rpg('3d10').join('.') + prerelease;\n };\n\n Chance.prototype.tlds = function () {\n return ['com', 'org', 'edu', 'gov', 'co.uk', 'net', 'io', 'ac', 'ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'ao', 'aq', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'cr', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', 'eg', 'eh', 'er', 'es', 'et', 'eu', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt', 'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'ss', 'st', 'su', 'sv', 'sx', 'sy', 'sz', 'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'ye', 'yt', 'za', 'zm', 'zw'];\n };\n\n Chance.prototype.tld = function () {\n return this.pick(this.tlds());\n };\n\n Chance.prototype.twitter = function () {\n return '@' + this.word();\n };\n\n Chance.prototype.url = function (options) {\n options = initOptions(options, { protocol: \"http\", domain: this.domain(options), domain_prefix: \"\", path: this.word(), extensions: []});\n\n var extension = options.extensions.length > 0 ? \".\" + this.pick(options.extensions) : \"\";\n var domain = options.domain_prefix ? options.domain_prefix + \".\" + options.domain : options.domain;\n\n return options.protocol + \"://\" + domain + \"/\" + options.path + extension;\n };\n\n Chance.prototype.port = function() {\n return this.integer({min: 0, max: 65535});\n };\n\n Chance.prototype.locale = function (options) {\n options = initOptions(options);\n if (options.region){\n return this.pick(this.get(\"locale_regions\"));\n } else {\n return this.pick(this.get(\"locale_languages\"));\n }\n };\n\n Chance.prototype.locales = function (options) {\n options = initOptions(options);\n if (options.region){\n return this.get(\"locale_regions\");\n } else {\n return this.get(\"locale_languages\");\n }\n };\n\n Chance.prototype.loremPicsum = function (options) {\n options = initOptions(options, { width: 500, height: 500, greyscale: false, blurred: false });\n\n var greyscale = options.greyscale ? 'g/' : '';\n var query = options.blurred ? '/?blur' : '/?random';\n\n return 'https://picsum.photos/' + greyscale + options.width + '/' + options.height + query;\n }\n\n // -- End Web --\n\n // -- Location --\n\n Chance.prototype.address = function (options) {\n options = initOptions(options);\n return this.natural({min: 5, max: 2000}) + ' ' + this.street(options);\n };\n\n Chance.prototype.altitude = function (options) {\n options = initOptions(options, {fixed: 5, min: 0, max: 8848});\n return this.floating({\n min: options.min,\n max: options.max,\n fixed: options.fixed\n });\n };\n\n Chance.prototype.areacode = function (options) {\n options = initOptions(options, {parens : true});\n // Don't want area codes to start with 1, or have a 9 as the second digit\n var areacode = options.exampleNumber ?\n \"555\" :\n this.natural({min: 2, max: 9}).toString() +\n this.natural({min: 0, max: 8}).toString() +\n this.natural({min: 0, max: 9}).toString();\n\n return options.parens ? '(' + areacode + ')' : areacode;\n };\n\n Chance.prototype.city = function () {\n return this.capitalize(this.word({syllables: 3}));\n };\n\n Chance.prototype.coordinates = function (options) {\n return this.latitude(options) + ', ' + this.longitude(options);\n };\n\n Chance.prototype.countries = function () {\n return this.get(\"countries\");\n };\n\n Chance.prototype.country = function (options) {\n options = initOptions(options);\n var country = this.pick(this.countries());\n return options.raw ? country : options.full ? country.name : country.abbreviation;\n };\n\n Chance.prototype.depth = function (options) {\n options = initOptions(options, {fixed: 5, min: -10994, max: 0});\n return this.floating({\n min: options.min,\n max: options.max,\n fixed: options.fixed\n });\n };\n\n Chance.prototype.geohash = function (options) {\n options = initOptions(options, { length: 7 });\n return this.string({ length: options.length, pool: '0123456789bcdefghjkmnpqrstuvwxyz' });\n };\n\n Chance.prototype.geojson = function (options) {\n return this.latitude(options) + ', ' + this.longitude(options) + ', ' + this.altitude(options);\n };\n\n Chance.prototype.latitude = function (options) {\n // Constants - Formats\n var [DDM, DMS, DD] = ['ddm', 'dms', 'dd'];\n\n options = initOptions(\noptions,\n options && options.format && [DDM, DMS].includes(options.format.toLowerCase()) ?\n {min: 0, max: 89, fixed: 4} :\n {fixed: 5, min: -90, max: 90, format: DD}\n);\n\n var format = options.format.toLowerCase();\n\n if (format === DDM || format === DMS) {\n testRange(options.min < 0 || options.min > 89, \"Chance: Min specified is out of range. Should be between 0 - 89\");\n testRange(options.max < 0 || options.max > 89, \"Chance: Max specified is out of range. Should be between 0 - 89\");\n testRange(options.fixed > 4, 'Chance: Fixed specified should be below or equal to 4');\n }\n\n switch (format) {\n case DDM: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.floating({min: 0, max: 59, fixed: options.fixed});\n }\n case DMS: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.integer({min: 0, max: 59}) + '’' +\n this.floating({min: 0, max: 59, fixed: options.fixed}) + '”';\n }\n case DD:\n default: {\n return this.floating({min: options.min, max: options.max, fixed: options.fixed});\n }\n }\n };\n\n Chance.prototype.longitude = function (options) {\n // Constants - Formats\n var [DDM, DMS, DD] = ['ddm', 'dms', 'dd'];\n\n options = initOptions(\noptions,\n options && options.format && [DDM, DMS].includes(options.format.toLowerCase()) ?\n {min: 0, max: 179, fixed: 4} :\n {fixed: 5, min: -180, max: 180, format: DD}\n);\n\n var format = options.format.toLowerCase();\n\n if (format === DDM || format === DMS) {\n testRange(options.min < 0 || options.min > 179, \"Chance: Min specified is out of range. Should be between 0 - 179\");\n testRange(options.max < 0 || options.max > 179, \"Chance: Max specified is out of range. Should be between 0 - 179\");\n testRange(options.fixed > 4, 'Chance: Fixed specified should be below or equal to 4');\n }\n\n switch (format) {\n case DDM: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.floating({min: 0, max: 59.9999, fixed: options.fixed})\n }\n case DMS: {\n return this.integer({min: options.min, max: options.max}) + '°' +\n this.integer({min: 0, max: 59}) + '’' +\n this.floating({min: 0, max: 59.9999, fixed: options.fixed}) + '”';\n }\n case DD:\n default: {\n return this.floating({min: options.min, max: options.max, fixed: options.fixed});\n }\n }\n };\n\n Chance.prototype.phone = function (options) {\n var self = this,\n numPick,\n ukNum = function (parts) {\n var section = [];\n //fills the section part of the phone number with random numbers.\n parts.sections.forEach(function(n) {\n section.push(self.string({ pool: '0123456789', length: n}));\n });\n return parts.area + section.join(' ');\n };\n options = initOptions(options, {\n formatted: true,\n country: 'us',\n mobile: false,\n exampleNumber: false,\n });\n if (!options.formatted) {\n options.parens = false;\n }\n var phone;\n switch (options.country) {\n case 'fr':\n if (!options.mobile) {\n numPick = this.pick([\n // Valid zone and département codes.\n '01' + this.pick(['30', '34', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '53', '55', '56', '58', '60', '64', '69', '70', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83']) + self.string({ pool: '0123456789', length: 6}),\n '02' + this.pick(['14', '18', '22', '23', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '40', '41', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '56', '57', '61', '62', '69', '72', '76', '77', '78', '85', '90', '96', '97', '98', '99']) + self.string({ pool: '0123456789', length: 6}),\n '03' + this.pick(['10', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '39', '44', '45', '51', '52', '54', '55', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90']) + self.string({ pool: '0123456789', length: 6}),\n '04' + this.pick(['11', '13', '15', '20', '22', '26', '27', '30', '32', '34', '37', '42', '43', '44', '50', '56', '57', '63', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '88', '89', '90', '91', '92', '93', '94', '95', '97', '98']) + self.string({ pool: '0123456789', length: 6}),\n '05' + this.pick(['08', '16', '17', '19', '24', '31', '32', '33', '34', '35', '40', '45', '46', '47', '49', '53', '55', '56', '57', '58', '59', '61', '62', '63', '64', '65', '67', '79', '81', '82', '86', '87', '90', '94']) + self.string({ pool: '0123456789', length: 6}),\n '09' + self.string({ pool: '0123456789', length: 8}),\n ]);\n phone = options.formatted ? numPick.match(/../g).join(' ') : numPick;\n } else {\n numPick = this.pick(['06', '07']) + self.string({ pool: '0123456789', length: 8});\n phone = options.formatted ? numPick.match(/../g).join(' ') : numPick;\n }\n break;\n case 'uk':\n if (!options.mobile) {\n numPick = this.pick([\n //valid area codes of major cities/counties followed by random numbers in required format.\n\n { area: '01' + this.character({ pool: '234569' }) + '1 ', sections: [3,4] },\n { area: '020 ' + this.character({ pool: '378' }), sections: [3,4] },\n { area: '023 ' + this.character({ pool: '89' }), sections: [3,4] },\n { area: '024 7', sections: [3,4] },\n { area: '028 ' + this.pick(['25','28','37','71','82','90','92','95']), sections: [2,4] },\n { area: '012' + this.pick(['04','08','54','76','97','98']) + ' ', sections: [6] },\n { area: '013' + this.pick(['63','64','84','86']) + ' ', sections: [6] },\n { area: '014' + this.pick(['04','20','60','61','80','88']) + ' ', sections: [6] },\n { area: '015' + this.pick(['24','27','62','66']) + ' ', sections: [6] },\n { area: '016' + this.pick(['06','29','35','47','59','95']) + ' ', sections: [6] },\n { area: '017' + this.pick(['26','44','50','68']) + ' ', sections: [6] },\n { area: '018' + this.pick(['27','37','84','97']) + ' ', sections: [6] },\n { area: '019' + this.pick(['00','05','35','46','49','63','95']) + ' ', sections: [6] }\n ]);\n phone = options.formatted ? ukNum(numPick) : ukNum(numPick).replace(' ', '', 'g');\n } else {\n numPick = this.pick([\n { area: '07' + this.pick(['4','5','7','8','9']), sections: [2,6] },\n { area: '07624 ', sections: [6] }\n ]);\n phone = options.formatted ? ukNum(numPick) : ukNum(numPick).replace(' ', '');\n }\n break;\n case 'za':\n if (!options.mobile) {\n numPick = this.pick([\n '01' + this.pick(['0', '1', '2', '3', '4', '5', '6', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n '02' + this.pick(['1', '2', '3', '4', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n '03' + this.pick(['1', '2', '3', '5', '6', '9']) + self.string({ pool: '0123456789', length: 7}),\n '04' + this.pick(['1', '2', '3', '4', '5','6','7', '8','9']) + self.string({ pool: '0123456789', length: 7}),\n '05' + this.pick(['1', '3', '4', '6', '7', '8']) + self.string({ pool: '0123456789', length: 7}),\n ]);\n phone = options.formatted || numPick;\n } else {\n numPick = this.pick([\n '060' + this.pick(['3','4','5','6','7','8','9']) + self.string({ pool: '0123456789', length: 6}),\n '061' + this.pick(['0','1','2','3','4','5','8']) + self.string({ pool: '0123456789', length: 6}),\n '06' + self.string({ pool: '0123456789', length: 7}),\n '071' + this.pick(['0','1','2','3','4','5','6','7','8','9']) + self.string({ pool: '0123456789', length: 6}),\n '07' + this.pick(['2','3','4','6','7','8','9']) + self.string({ pool: '0123456789', length: 7}),\n '08' + this.pick(['0','1','2','3','4','5']) + self.string({ pool: '0123456789', length: 7}),\n ]);\n phone = options.formatted || numPick;\n }\n break;\n case 'us':\n var areacode = this.areacode(options).toString();\n var exchange = this.natural({ min: 2, max: 9 }).toString() +\n this.natural({ min: 0, max: 9 }).toString() +\n this.natural({ min: 0, max: 9 }).toString();\n var subscriber = this.natural({ min: 1000, max: 9999 }).toString(); // this could be random [0-9]{4}\n phone = options.formatted ? areacode + ' ' + exchange + '-' + subscriber : areacode + exchange + subscriber;\n break;\n case 'br':\n var areaCode = this.pick([\"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"21\", \"22\", \"24\", \"27\", \"28\", \"31\", \"32\", \"33\", \"34\", \"35\", \"37\", \"38\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\", \"51\", \"53\", \"54\", \"55\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"71\", \"73\", \"74\", \"75\", \"77\", \"79\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"]);\n var prefix;\n if (options.mobile) {\n // Brasilian official reference (mobile): http://www.anatel.gov.br/setorregulado/plano-de-numeracao-brasileiro?id=330\n prefix = '9' + self.string({ pool: '0123456789', length: 4});\n } else {\n // Brasilian official reference: http://www.anatel.gov.br/setorregulado/plano-de-numeracao-brasileiro?id=331\n prefix = this.natural({ min: 2000, max: 5999 }).toString();\n }\n var mcdu = self.string({ pool: '0123456789', length: 4});\n phone = options.formatted ? '(' + areaCode + ') ' + prefix + '-' + mcdu : areaCode + prefix + mcdu;\n break;\n }\n return phone;\n };\n\n Chance.prototype.postal = function () {\n // Postal District\n var pd = this.character({pool: \"XVTSRPNKLMHJGECBA\"});\n // Forward Sortation Area (FSA)\n var fsa = pd + this.natural({max: 9}) + this.character({alpha: true, casing: \"upper\"});\n // Local Delivery Unut (LDU)\n var ldu = this.natural({max: 9}) + this.character({alpha: true, casing: \"upper\"}) + this.natural({max: 9});\n\n return fsa + \" \" + ldu;\n };\n\n Chance.prototype.postcode = function () {\n // Area\n var area = this.pick(this.get(\"postcodeAreas\")).code;\n // District\n var district = this.natural({max: 9});\n // Sub-District\n var subDistrict = this.bool() ? this.character({alpha: true, casing: \"upper\"}) : \"\";\n // Outward Code\n var outward = area + district + subDistrict;\n // Sector\n var sector = this.natural({max: 9});\n // Unit\n var unit = this.character({alpha: true, casing: \"upper\"}) + this.character({alpha: true, casing: \"upper\"});\n // Inward Code\n var inward = sector + unit;\n\n return outward + \" \" + inward;\n };\n\n Chance.prototype.counties = function (options) {\n options = initOptions(options, { country: 'uk' });\n return this.get(\"counties\")[options.country.toLowerCase()];\n };\n\n Chance.prototype.county = function (options) {\n return this.pick(this.counties(options)).name;\n };\n\n Chance.prototype.provinces = function (options) {\n options = initOptions(options, { country: 'ca' });\n return this.get(\"provinces\")[options.country.toLowerCase()];\n };\n\n Chance.prototype.province = function (options) {\n return (options && options.full) ?\n this.pick(this.provinces(options)).name :\n this.pick(this.provinces(options)).abbreviation;\n };\n\n Chance.prototype.state = function (options) {\n return (options && options.full) ?\n this.pick(this.states(options)).name :\n this.pick(this.states(options)).abbreviation;\n };\n\n Chance.prototype.states = function (options) {\n options = initOptions(options, { country: 'us', us_states_and_dc: true } );\n\n var states;\n\n switch (options.country.toLowerCase()) {\n case 'us':\n var us_states_and_dc = this.get(\"us_states_and_dc\"),\n territories = this.get(\"territories\"),\n armed_forces = this.get(\"armed_forces\");\n\n states = [];\n\n if (options.us_states_and_dc) {\n states = states.concat(us_states_and_dc);\n }\n if (options.territories) {\n states = states.concat(territories);\n }\n if (options.armed_forces) {\n states = states.concat(armed_forces);\n }\n break;\n case 'it':\n case 'mx':\n states = this.get(\"country_regions\")[options.country.toLowerCase()];\n break;\n case 'uk':\n states = this.get(\"counties\")[options.country.toLowerCase()];\n break;\n }\n\n return states;\n };\n\n Chance.prototype.street = function (options) {\n options = initOptions(options, { country: 'us', syllables: 2 });\n var street;\n\n switch (options.country.toLowerCase()) {\n case 'us':\n street = this.word({ syllables: options.syllables });\n street = this.capitalize(street);\n street += ' ';\n street += options.short_suffix ?\n this.street_suffix(options).abbreviation :\n this.street_suffix(options).name;\n break;\n case 'it':\n street = this.word({ syllables: options.syllables });\n street = this.capitalize(street);\n street = (options.short_suffix ?\n this.street_suffix(options).abbreviation :\n this.street_suffix(options).name) + \" \" + street;\n break;\n }\n return street;\n };\n\n Chance.prototype.street_suffix = function (options) {\n options = initOptions(options, { country: 'us' });\n return this.pick(this.street_suffixes(options));\n };\n\n Chance.prototype.street_suffixes = function (options) {\n options = initOptions(options, { country: 'us' });\n // These are the most common suffixes.\n return this.get(\"street_suffixes\")[options.country.toLowerCase()];\n };\n\n // Note: only returning US zip codes, internationalization will be a whole\n // other beast to tackle at some point.\n Chance.prototype.zip = function (options) {\n var zip = this.n(this.natural, 5, {max: 9});\n\n if (options && options.plusfour === true) {\n zip.push('-');\n zip = zip.concat(this.n(this.natural, 4, {max: 9}));\n }\n\n return zip.join(\"\");\n };\n\n // -- End Location --\n\n // -- Time\n\n Chance.prototype.ampm = function () {\n return this.bool() ? 'am' : 'pm';\n };\n\n Chance.prototype.date = function (options) {\n var date_string, date;\n\n // If interval is specified we ignore preset\n if(options && (options.min || options.max)) {\n options = initOptions(options, {\n american: true,\n string: false\n });\n var min = typeof options.min !== \"undefined\" ? options.min.getTime() : 1;\n // 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. http://es5.github.io/#x15.9.1.1\n var max = typeof options.max !== \"undefined\" ? options.max.getTime() : 8640000000000000;\n\n date = new Date(this.integer({min: min, max: max}));\n } else {\n var m = this.month({raw: true});\n var daysInMonth = m.days;\n\n if(options && options.month) {\n // Mod 12 to allow months outside range of 0-11 (not encouraged, but also not prevented).\n daysInMonth = this.get('months')[((options.month % 12) + 12) % 12].days;\n }\n\n options = initOptions(options, {\n year: parseInt(this.year(), 10),\n // Necessary to subtract 1 because Date() 0-indexes month but not day or year\n // for some reason.\n month: m.numeric - 1,\n day: this.natural({min: 1, max: daysInMonth}),\n hour: this.hour({twentyfour: true}),\n minute: this.minute(),\n second: this.second(),\n millisecond: this.millisecond(),\n american: true,\n string: false\n });\n\n date = new Date(options.year, options.month, options.day, options.hour, options.minute, options.second, options.millisecond);\n }\n\n if (options.american) {\n // Adding 1 to the month is necessary because Date() 0-indexes\n // months but not day for some odd reason.\n date_string = (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();\n } else {\n date_string = date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear();\n }\n\n return options.string ? date_string : date;\n };\n\n Chance.prototype.hammertime = function (options) {\n return this.date(options).getTime();\n };\n\n Chance.prototype.hour = function (options) {\n options = initOptions(options, {\n min: options && options.twentyfour ? 0 : 1,\n max: options && options.twentyfour ? 23 : 12\n });\n\n testRange(options.min < 0, \"Chance: Min cannot be less than 0.\");\n testRange(options.twentyfour && options.max > 23, \"Chance: Max cannot be greater than 23 for twentyfour option.\");\n testRange(!options.twentyfour && options.max > 12, \"Chance: Max cannot be greater than 12.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return this.natural({min: options.min, max: options.max});\n };\n\n Chance.prototype.millisecond = function () {\n return this.natural({max: 999});\n };\n\n Chance.prototype.minute = Chance.prototype.second = function (options) {\n options = initOptions(options, {min: 0, max: 59});\n\n testRange(options.min < 0, \"Chance: Min cannot be less than 0.\");\n testRange(options.max > 59, \"Chance: Max cannot be greater than 59.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n return this.natural({min: options.min, max: options.max});\n };\n\n Chance.prototype.month = function (options) {\n options = initOptions(options, {min: 1, max: 12});\n\n testRange(options.min < 1, \"Chance: Min cannot be less than 1.\");\n testRange(options.max > 12, \"Chance: Max cannot be greater than 12.\");\n testRange(options.min > options.max, \"Chance: Min cannot be greater than Max.\");\n\n var month = this.pick(this.months().slice(options.min - 1, options.max));\n return options.raw ? month : month.name;\n };\n\n Chance.prototype.months = function () {\n return this.get(\"months\");\n };\n\n Chance.prototype.second = function () {\n return this.natural({max: 59});\n };\n\n Chance.prototype.timestamp = function () {\n return this.natural({min: 1, max: parseInt(new Date().getTime() / 1000, 10)});\n };\n\n Chance.prototype.weekday = function (options) {\n options = initOptions(options, {weekday_only: false});\n var weekdays = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\"];\n if (!options.weekday_only) {\n weekdays.push(\"Saturday\");\n weekdays.push(\"Sunday\");\n }\n return this.pickone(weekdays);\n };\n\n Chance.prototype.year = function (options) {\n // Default to current year as min if none specified\n options = initOptions(options, {min: new Date().getFullYear()});\n\n // Default to one century after current year as max if none specified\n options.max = (typeof options.max !== \"undefined\") ? options.max : options.min + 100;\n\n return this.natural(options).toString();\n };\n\n // -- End Time\n\n // -- Finance --\n\n Chance.prototype.cc = function (options) {\n options = initOptions(options);\n\n var type, number, to_generate;\n\n type = (options.type) ?\n this.cc_type({ name: options.type, raw: true }) :\n this.cc_type({ raw: true });\n\n number = type.prefix.split(\"\");\n to_generate = type.length - type.prefix.length - 1;\n\n // Generates n - 1 digits\n number = number.concat(this.n(this.integer, to_generate, {min: 0, max: 9}));\n\n // Generates the last digit according to Luhn algorithm\n number.push(this.luhn_calculate(number.join(\"\")));\n\n return number.join(\"\");\n };\n\n Chance.prototype.cc_types = function () {\n // http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\n return this.get(\"cc_types\");\n };\n\n Chance.prototype.cc_type = function (options) {\n options = initOptions(options);\n var types = this.cc_types(),\n type = null;\n\n if (options.name) {\n for (var i = 0; i < types.length; i++) {\n // Accept either name or short_name to specify card type\n if (types[i].name === options.name || types[i].short_name === options.name) {\n type = types[i];\n break;\n }\n }\n if (type === null) {\n throw new RangeError(\"Chance: Credit card type '\" + options.name + \"' is not supported\");\n }\n } else {\n type = this.pick(types);\n }\n\n return options.raw ? type : type.name;\n };\n\n // return all world currency by ISO 4217\n Chance.prototype.currency_types = function () {\n return this.get(\"currency_types\");\n };\n\n // return random world currency by ISO 4217\n Chance.prototype.currency = function () {\n return this.pick(this.currency_types());\n };\n\n // return all timezones available\n Chance.prototype.timezones = function () {\n return this.get(\"timezones\");\n };\n\n // return random timezone\n Chance.prototype.timezone = function () {\n return this.pick(this.timezones());\n };\n\n //Return random correct currency exchange pair (e.g. EUR/USD) or array of currency code\n Chance.prototype.currency_pair = function (returnAsString) {\n var currencies = this.unique(this.currency, 2, {\n comparator: function(arr, val) {\n\n return arr.reduce(function(acc, item) {\n // If a match has been found, short circuit check and just return\n return acc || (item.code === val.code);\n }, false);\n }\n });\n\n if (returnAsString) {\n return currencies[0].code + '/' + currencies[1].code;\n } else {\n return currencies;\n }\n };\n\n Chance.prototype.dollar = function (options) {\n // By default, a somewhat more sane max for dollar than all available numbers\n options = initOptions(options, {max : 10000, min : 0});\n\n var dollar = this.floating({min: options.min, max: options.max, fixed: 2}).toString(),\n cents = dollar.split('.')[1];\n\n if (cents === undefined) {\n dollar += '.00';\n } else if (cents.length < 2) {\n dollar = dollar + '0';\n }\n\n if (dollar < 0) {\n return '-$' + dollar.replace('-', '');\n } else {\n return '$' + dollar;\n }\n };\n\n Chance.prototype.euro = function (options) {\n return Number(this.dollar(options).replace(\"$\", \"\")).toLocaleString() + \"€\";\n };\n\n Chance.prototype.exp = function (options) {\n options = initOptions(options);\n var exp = {};\n\n exp.year = this.exp_year();\n\n // If the year is this year, need to ensure month is greater than the\n // current month or this expiration will not be valid\n if (exp.year === (new Date().getFullYear()).toString()) {\n exp.month = this.exp_month({future: true});\n } else {\n exp.month = this.exp_month();\n }\n\n return options.raw ? exp : exp.month + '/' + exp.year;\n };\n\n Chance.prototype.exp_month = function (options) {\n options = initOptions(options);\n var month, month_int,\n // Date object months are 0 indexed\n curMonth = new Date().getMonth() + 1;\n\n if (options.future && (curMonth !== 12)) {\n do {\n month = this.month({raw: true}).numeric;\n month_int = parseInt(month, 10);\n } while (month_int <= curMonth);\n } else {\n month = this.month({raw: true}).numeric;\n }\n\n return month;\n };\n\n Chance.prototype.exp_year = function () {\n var curMonth = new Date().getMonth() + 1,\n curYear = new Date().getFullYear();\n\n return this.year({min: ((curMonth === 12) ? (curYear + 1) : curYear), max: (curYear + 10)});\n };\n\n Chance.prototype.vat = function (options) {\n options = initOptions(options, { country: 'it' });\n switch (options.country.toLowerCase()) {\n case 'it':\n return this.it_vat();\n }\n };\n\n /**\n * Generate a string matching IBAN pattern (https://en.wikipedia.org/wiki/International_Bank_Account_Number).\n * No country-specific formats support (yet)\n */\n Chance.prototype.iban = function () {\n var alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n var alphanum = alpha + '0123456789';\n var iban =\n this.string({ length: 2, pool: alpha }) +\n this.pad(this.integer({ min: 0, max: 99 }), 2) +\n this.string({ length: 4, pool: alphanum }) +\n this.pad(this.natural(), this.natural({ min: 6, max: 26 }));\n return iban;\n };\n\n // -- End Finance\n\n // -- Regional\n\n Chance.prototype.it_vat = function () {\n var it_vat = this.natural({min: 1, max: 1800000});\n\n it_vat = this.pad(it_vat, 7) + this.pad(this.pick(this.provinces({ country: 'it' })).code, 3);\n return it_vat + this.luhn_calculate(it_vat);\n };\n\n /*\n * this generator is written following the official algorithm\n * all data can be passed explicitely or randomized by calling chance.cf() without options\n * the code does not check that the input data is valid (it goes beyond the scope of the generator)\n *\n * @param [Object] options = { first: first name,\n * last: last name,\n * gender: female|male,\n birthday: JavaScript date object,\n city: string(4), 1 letter + 3 numbers\n }\n * @return [string] codice fiscale\n *\n */\n Chance.prototype.cf = function (options) {\n options = options || {};\n var gender = !!options.gender ? options.gender : this.gender(),\n first = !!options.first ? options.first : this.first( { gender: gender, nationality: 'it'} ),\n last = !!options.last ? options.last : this.last( { nationality: 'it'} ),\n birthday = !!options.birthday ? options.birthday : this.birthday(),\n city = !!options.city ? options.city : this.pickone(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'L', 'M', 'Z']) + this.pad(this.natural({max:999}), 3),\n cf = [],\n name_generator = function(name, isLast) {\n var temp,\n return_value = [];\n\n if (name.length < 3) {\n return_value = name.split(\"\").concat(\"XXX\".split(\"\")).splice(0,3);\n }\n else {\n temp = name.toUpperCase().split('').map(function(c){\n return (\"BCDFGHJKLMNPRSTVWZ\".indexOf(c) !== -1) ? c : undefined;\n }).join('');\n if (temp.length > 3) {\n if (isLast) {\n temp = temp.substr(0,3);\n } else {\n temp = temp[0] + temp.substr(2,2);\n }\n }\n if (temp.length < 3) {\n return_value = temp;\n temp = name.toUpperCase().split('').map(function(c){\n return (\"AEIOU\".indexOf(c) !== -1) ? c : undefined;\n }).join('').substr(0, 3 - return_value.length);\n }\n return_value = return_value + temp;\n }\n\n return return_value;\n },\n date_generator = function(birthday, gender, that) {\n var lettermonths = ['A', 'B', 'C', 'D', 'E', 'H', 'L', 'M', 'P', 'R', 'S', 'T'];\n\n return birthday.getFullYear().toString().substr(2) +\n lettermonths[birthday.getMonth()] +\n that.pad(birthday.getDate() + ((gender.toLowerCase() === \"female\") ? 40 : 0), 2);\n },\n checkdigit_generator = function(cf) {\n var range1 = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n range2 = \"ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n evens = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n odds = \"BAKPLCQDREVOSFTGUHMINJWZYX\",\n digit = 0;\n\n\n for(var i = 0; i < 15; i++) {\n if (i % 2 !== 0) {\n digit += evens.indexOf(range2[range1.indexOf(cf[i])]);\n }\n else {\n digit += odds.indexOf(range2[range1.indexOf(cf[i])]);\n }\n }\n return evens[digit % 26];\n };\n\n cf = cf.concat(name_generator(last, true), name_generator(first), date_generator(birthday, gender, this), city.toUpperCase().split(\"\")).join(\"\");\n cf += checkdigit_generator(cf.toUpperCase(), this);\n\n return cf.toUpperCase();\n };\n\n Chance.prototype.pl_pesel = function () {\n var number = this.natural({min: 1, max: 9999999999});\n var arr = this.pad(number, 10).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (1 * arr[0] + 3 * arr[1] + 7 * arr[2] + 9 * arr[3] + 1 * arr[4] + 3 * arr[5] + 7 * arr[6] + 9 * arr[7] + 1 * arr[8] + 3 * arr[9]) % 10;\n if(controlNumber !== 0) {\n controlNumber = 10 - controlNumber;\n }\n\n return arr.join('') + controlNumber;\n };\n\n Chance.prototype.pl_nip = function () {\n var number = this.natural({min: 1, max: 999999999});\n var arr = this.pad(number, 9).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (6 * arr[0] + 5 * arr[1] + 7 * arr[2] + 2 * arr[3] + 3 * arr[4] + 4 * arr[5] + 5 * arr[6] + 6 * arr[7] + 7 * arr[8]) % 11;\n if(controlNumber === 10) {\n return this.pl_nip();\n }\n\n return arr.join('') + controlNumber;\n };\n\n Chance.prototype.pl_regon = function () {\n var number = this.natural({min: 1, max: 99999999});\n var arr = this.pad(number, 8).split('');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = parseInt(arr[i]);\n }\n\n var controlNumber = (8 * arr[0] + 9 * arr[1] + 2 * arr[2] + 3 * arr[3] + 4 * arr[4] + 5 * arr[5] + 6 * arr[6] + 7 * arr[7]) % 11;\n if(controlNumber === 10) {\n controlNumber = 0;\n }\n\n return arr.join('') + controlNumber;\n };\n\n // -- End Regional\n\n // -- Music --\n\n Chance.prototype.note = function(options) {\n // choices for 'notes' option:\n // flatKey - chromatic scale with flat notes (default)\n // sharpKey - chromatic scale with sharp notes\n // flats - just flat notes\n // sharps - just sharp notes\n // naturals - just natural notes\n // all - naturals, sharps and flats\n options = initOptions(options, { notes : 'flatKey'});\n var scales = {\n naturals: ['C', 'D', 'E', 'F', 'G', 'A', 'B'],\n flats: ['D♭', 'E♭', 'G♭', 'A♭', 'B♭'],\n sharps: ['C♯', 'D♯', 'F♯', 'G♯', 'A♯']\n };\n scales.all = scales.naturals.concat(scales.flats.concat(scales.sharps))\n scales.flatKey = scales.naturals.concat(scales.flats)\n scales.sharpKey = scales.naturals.concat(scales.sharps)\n return this.pickone(scales[options.notes]);\n }\n\n Chance.prototype.midi_note = function(options) {\n var min = 0;\n var max = 127;\n options = initOptions(options, { min : min, max : max });\n return this.integer({min: options.min, max: options.max});\n }\n\n Chance.prototype.chord_quality = function(options) {\n options = initOptions(options, { jazz: true });\n var chord_qualities = ['maj', 'min', 'aug', 'dim'];\n if (options.jazz){\n chord_qualities = [\n 'maj7',\n 'min7',\n '7',\n 'sus',\n 'dim',\n 'ø'\n ];\n }\n return this.pickone(chord_qualities);\n }\n\n Chance.prototype.chord = function (options) {\n options = initOptions(options);\n return this.note(options) + this.chord_quality(options);\n }\n\n Chance.prototype.tempo = function (options) {\n var min = 40;\n var max = 320;\n options = initOptions(options, {min: min, max: max});\n return this.integer({min: options.min, max: options.max});\n }\n\n // -- End Music\n\n // -- Miscellaneous --\n\n // Coin - Flip, flip, flipadelphia\n Chance.prototype.coin = function() {\n return this.bool() ? \"heads\" : \"tails\";\n }\n\n // Dice - For all the board game geeks out there, myself included ;)\n function diceFn (range) {\n return function () {\n return this.natural(range);\n };\n }\n Chance.prototype.d4 = diceFn({min: 1, max: 4});\n Chance.prototype.d6 = diceFn({min: 1, max: 6});\n Chance.prototype.d8 = diceFn({min: 1, max: 8});\n Chance.prototype.d10 = diceFn({min: 1, max: 10});\n Chance.prototype.d12 = diceFn({min: 1, max: 12});\n Chance.prototype.d20 = diceFn({min: 1, max: 20});\n Chance.prototype.d30 = diceFn({min: 1, max: 30});\n Chance.prototype.d100 = diceFn({min: 1, max: 100});\n\n Chance.prototype.rpg = function (thrown, options) {\n options = initOptions(options);\n if (!thrown) {\n throw new RangeError(\"Chance: A type of die roll must be included\");\n } else {\n var bits = thrown.toLowerCase().split(\"d\"),\n rolls = [];\n\n if (bits.length !== 2 || !parseInt(bits[0], 10) || !parseInt(bits[1], 10)) {\n throw new Error(\"Chance: Invalid format provided. Please provide #d# where the first # is the number of dice to roll, the second # is the max of each die\");\n }\n for (var i = bits[0]; i > 0; i--) {\n rolls[i - 1] = this.natural({min: 1, max: bits[1]});\n }\n return (typeof options.sum !== 'undefined' && options.sum) ? rolls.reduce(function (p, c) { return p + c; }) : rolls;\n }\n };\n\n // Guid\n Chance.prototype.guid = function (options) {\n options = initOptions(options, { version: 5 });\n\n var guid_pool = \"abcdef1234567890\",\n variant_pool = \"ab89\",\n guid = this.string({ pool: guid_pool, length: 8 }) + '-' +\n this.string({ pool: guid_pool, length: 4 }) + '-' +\n // The Version\n options.version +\n this.string({ pool: guid_pool, length: 3 }) + '-' +\n // The Variant\n this.string({ pool: variant_pool, length: 1 }) +\n this.string({ pool: guid_pool, length: 3 }) + '-' +\n this.string({ pool: guid_pool, length: 12 });\n return guid;\n };\n\n // Hash\n Chance.prototype.hash = function (options) {\n options = initOptions(options, {length : 40, casing: 'lower'});\n var pool = options.casing === 'upper' ? HEX_POOL.toUpperCase() : HEX_POOL;\n return this.string({pool: pool, length: options.length});\n };\n\n Chance.prototype.luhn_check = function (num) {\n var str = num.toString();\n var checkDigit = +str.substring(str.length - 1);\n return checkDigit === this.luhn_calculate(+str.substring(0, str.length - 1));\n };\n\n Chance.prototype.luhn_calculate = function (num) {\n var digits = num.toString().split(\"\").reverse();\n var sum = 0;\n var digit;\n\n for (var i = 0, l = digits.length; l > i; ++i) {\n digit = +digits[i];\n if (i % 2 === 0) {\n digit *= 2;\n if (digit > 9) {\n digit -= 9;\n }\n }\n sum += digit;\n }\n return (sum * 9) % 10;\n };\n\n // MD5 Hash\n Chance.prototype.md5 = function(options) {\n var opts = { str: '', key: null, raw: false };\n\n if (!options) {\n opts.str = this.string();\n options = {};\n }\n else if (typeof options === 'string') {\n opts.str = options;\n options = {};\n }\n else if (typeof options !== 'object') {\n return null;\n }\n else if(options.constructor === 'Array') {\n return null;\n }\n\n opts = initOptions(options, opts);\n\n if(!opts.str){\n throw new Error('A parameter is required to return an md5 hash.');\n }\n\n return this.bimd5.md5(opts.str, opts.key, opts.raw);\n };\n\n /**\n * #Description:\n * =====================================================\n * Generate random file name with extension\n *\n * The argument provide extension type\n * -> raster\n * -> vector\n * -> 3d\n * -> document\n *\n * If nothing is provided the function return random file name with random\n * extension type of any kind\n *\n * The user can validate the file name length range\n * If nothing provided the generated file name is random\n *\n * #Extension Pool :\n * * Currently the supported extensions are\n * -> some of the most popular raster image extensions\n * -> some of the most popular vector image extensions\n * -> some of the most popular 3d image extensions\n * -> some of the most popular document extensions\n *\n * #Examples :\n * =====================================================\n *\n * Return random file name with random extension. The file extension\n * is provided by a predefined collection of extensions. More about the extension\n * pool can be found in #Extension Pool section\n *\n * chance.file()\n * => dsfsdhjf.xml\n *\n * In order to generate a file name with specific length, specify the\n * length property and integer value. The extension is going to be random\n *\n * chance.file({length : 10})\n * => asrtineqos.pdf\n *\n * In order to generate file with extension from some of the predefined groups\n * of the extension pool just specify the extension pool category in fileType property\n *\n * chance.file({fileType : 'raster'})\n * => dshgssds.psd\n *\n * You can provide specific extension for your files\n * chance.file({extension : 'html'})\n * => djfsd.html\n *\n * Or you could pass custom collection of extensions by array or by object\n * chance.file({extensions : [...]})\n * => dhgsdsd.psd\n *\n * chance.file({extensions : { key : [...], key : [...]}})\n * => djsfksdjsd.xml\n *\n * @param [collection] options\n * @return [string]\n *\n */\n Chance.prototype.file = function(options) {\n\n var fileOptions = options || {};\n var poolCollectionKey = \"fileExtension\";\n var typeRange = Object.keys(this.get(\"fileExtension\"));//['raster', 'vector', '3d', 'document'];\n var fileName;\n var fileExtension;\n\n // Generate random file name\n fileName = this.word({length : fileOptions.length});\n\n // Generate file by specific extension provided by the user\n if(fileOptions.extension) {\n\n fileExtension = fileOptions.extension;\n return (fileName + '.' + fileExtension);\n }\n\n // Generate file by specific extension collection\n if(fileOptions.extensions) {\n\n if(Array.isArray(fileOptions.extensions)) {\n\n fileExtension = this.pickone(fileOptions.extensions);\n return (fileName + '.' + fileExtension);\n }\n else if(fileOptions.extensions.constructor === Object) {\n\n var extensionObjectCollection = fileOptions.extensions;\n var keys = Object.keys(extensionObjectCollection);\n\n fileExtension = this.pickone(extensionObjectCollection[this.pickone(keys)]);\n return (fileName + '.' + fileExtension);\n }\n\n throw new Error(\"Chance: Extensions must be an Array or Object\");\n }\n\n // Generate file extension based on specific file type\n if(fileOptions.fileType) {\n\n var fileType = fileOptions.fileType;\n if(typeRange.indexOf(fileType) !== -1) {\n\n fileExtension = this.pickone(this.get(poolCollectionKey)[fileType]);\n return (fileName + '.' + fileExtension);\n }\n\n throw new RangeError(\"Chance: Expect file type value to be 'raster', 'vector', '3d' or 'document'\");\n }\n\n // Generate random file name if no extension options are passed\n fileExtension = this.pickone(this.get(poolCollectionKey)[this.pickone(typeRange)]);\n return (fileName + '.' + fileExtension);\n };\n\n var data = {\n\n firstNames: {\n \"male\": {\n \"en\": [\"James\", \"John\", \"Robert\", \"Michael\", \"William\", \"David\", \"Richard\", \"Joseph\", \"Charles\", \"Thomas\", \"Christopher\", \"Daniel\", \"Matthew\", \"George\", \"Donald\", \"Anthony\", \"Paul\", \"Mark\", \"Edward\", \"Steven\", \"Kenneth\", \"Andrew\", \"Brian\", \"Joshua\", \"Kevin\", \"Ronald\", \"Timothy\", \"Jason\", \"Jeffrey\", \"Frank\", \"Gary\", \"Ryan\", \"Nicholas\", \"Eric\", \"Stephen\", \"Jacob\", \"Larry\", \"Jonathan\", \"Scott\", \"Raymond\", \"Justin\", \"Brandon\", \"Gregory\", \"Samuel\", \"Benjamin\", \"Patrick\", \"Jack\", \"Henry\", \"Walter\", \"Dennis\", \"Jerry\", \"Alexander\", \"Peter\", \"Tyler\", \"Douglas\", \"Harold\", \"Aaron\", \"Jose\", \"Adam\", \"Arthur\", \"Zachary\", \"Carl\", \"Nathan\", \"Albert\", \"Kyle\", \"Lawrence\", \"Joe\", \"Willie\", \"Gerald\", \"Roger\", \"Keith\", \"Jeremy\", \"Terry\", \"Harry\", \"Ralph\", \"Sean\", \"Jesse\", \"Roy\", \"Louis\", \"Billy\", \"Austin\", \"Bruce\", \"Eugene\", \"Christian\", \"Bryan\", \"Wayne\", \"Russell\", \"Howard\", \"Fred\", \"Ethan\", \"Jordan\", \"Philip\", \"Alan\", \"Juan\", \"Randy\", \"Vincent\", \"Bobby\", \"Dylan\", \"Johnny\", \"Phillip\", \"Victor\", \"Clarence\", \"Ernest\", \"Martin\", \"Craig\", \"Stanley\", \"Shawn\", \"Travis\", \"Bradley\", \"Leonard\", \"Earl\", \"Gabriel\", \"Jimmy\", \"Francis\", \"Todd\", \"Noah\", \"Danny\", \"Dale\", \"Cody\", \"Carlos\", \"Allen\", \"Frederick\", \"Logan\", \"Curtis\", \"Alex\", \"Joel\", \"Luis\", \"Norman\", \"Marvin\", \"Glenn\", \"Tony\", \"Nathaniel\", \"Rodney\", \"Melvin\", \"Alfred\", \"Steve\", \"Cameron\", \"Chad\", \"Edwin\", \"Caleb\", \"Evan\", \"Antonio\", \"Lee\", \"Herbert\", \"Jeffery\", \"Isaac\", \"Derek\", \"Ricky\", \"Marcus\", \"Theodore\", \"Elijah\", \"Luke\", \"Jesus\", \"Eddie\", \"Troy\", \"Mike\", \"Dustin\", \"Ray\", \"Adrian\", \"Bernard\", \"Leroy\", \"Angel\", \"Randall\", \"Wesley\", \"Ian\", \"Jared\", \"Mason\", \"Hunter\", \"Calvin\", \"Oscar\", \"Clifford\", \"Jay\", \"Shane\", \"Ronnie\", \"Barry\", \"Lucas\", \"Corey\", \"Manuel\", \"Leo\", \"Tommy\", \"Warren\", \"Jackson\", \"Isaiah\", \"Connor\", \"Don\", \"Dean\", \"Jon\", \"Julian\", \"Miguel\", \"Bill\", \"Lloyd\", \"Charlie\", \"Mitchell\", \"Leon\", \"Jerome\", \"Darrell\", \"Jeremiah\", \"Alvin\", \"Brett\", \"Seth\", \"Floyd\", \"Jim\", \"Blake\", \"Micheal\", \"Gordon\", \"Trevor\", \"Lewis\", \"Erik\", \"Edgar\", \"Vernon\", \"Devin\", \"Gavin\", \"Jayden\", \"Chris\", \"Clyde\", \"Tom\", \"Derrick\", \"Mario\", \"Brent\", \"Marc\", \"Herman\", \"Chase\", \"Dominic\", \"Ricardo\", \"Franklin\", \"Maurice\", \"Max\", \"Aiden\", \"Owen\", \"Lester\", \"Gilbert\", \"Elmer\", \"Gene\", \"Francisco\", \"Glen\", \"Cory\", \"Garrett\", \"Clayton\", \"Sam\", \"Jorge\", \"Chester\", \"Alejandro\", \"Jeff\", \"Harvey\", \"Milton\", \"Cole\", \"Ivan\", \"Andre\", \"Duane\", \"Landon\"],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0163\n \"it\": [\"Adolfo\", \"Alberto\", \"Aldo\", \"Alessandro\", \"Alessio\", \"Alfredo\", \"Alvaro\", \"Andrea\", \"Angelo\", \"Angiolo\", \"Antonino\", \"Antonio\", \"Attilio\", \"Benito\", \"Bernardo\", \"Bruno\", \"Carlo\", \"Cesare\", \"Christian\", \"Claudio\", \"Corrado\", \"Cosimo\", \"Cristian\", \"Cristiano\", \"Daniele\", \"Dario\", \"David\", \"Davide\", \"Diego\", \"Dino\", \"Domenico\", \"Duccio\", \"Edoardo\", \"Elia\", \"Elio\", \"Emanuele\", \"Emiliano\", \"Emilio\", \"Enrico\", \"Enzo\", \"Ettore\", \"Fabio\", \"Fabrizio\", \"Federico\", \"Ferdinando\", \"Fernando\", \"Filippo\", \"Francesco\", \"Franco\", \"Gabriele\", \"Giacomo\", \"Giampaolo\", \"Giampiero\", \"Giancarlo\", \"Gianfranco\", \"Gianluca\", \"Gianmarco\", \"Gianni\", \"Gino\", \"Giorgio\", \"Giovanni\", \"Giuliano\", \"Giulio\", \"Giuseppe\", \"Graziano\", \"Gregorio\", \"Guido\", \"Iacopo\", \"Jacopo\", \"Lapo\", \"Leonardo\", \"Lorenzo\", \"Luca\", \"Luciano\", \"Luigi\", \"Manuel\", \"Marcello\", \"Marco\", \"Marino\", \"Mario\", \"Massimiliano\", \"Massimo\", \"Matteo\", \"Mattia\", \"Maurizio\", \"Mauro\", \"Michele\", \"Mirko\", \"Mohamed\", \"Nello\", \"Neri\", \"Niccolò\", \"Nicola\", \"Osvaldo\", \"Otello\", \"Paolo\", \"Pier Luigi\", \"Piero\", \"Pietro\", \"Raffaele\", \"Remo\", \"Renato\", \"Renzo\", \"Riccardo\", \"Roberto\", \"Rolando\", \"Romano\", \"Salvatore\", \"Samuele\", \"Sandro\", \"Sergio\", \"Silvano\", \"Simone\", \"Stefano\", \"Thomas\", \"Tommaso\", \"Ubaldo\", \"Ugo\", \"Umberto\", \"Valerio\", \"Valter\", \"Vasco\", \"Vincenzo\", \"Vittorio\"],\n // Data taken from http://www.svbkindernamen.nl/int/nl/kindernamen/index.html\n \"nl\": [\"Aaron\",\"Abel\",\"Adam\",\"Adriaan\",\"Albert\",\"Alexander\",\"Ali\",\"Arjen\",\"Arno\",\"Bart\",\"Bas\",\"Bastiaan\",\"Benjamin\",\"Bob\", \"Boris\",\"Bram\",\"Brent\",\"Cas\",\"Casper\",\"Chris\",\"Christiaan\",\"Cornelis\",\"Daan\",\"Daley\",\"Damian\",\"Dani\",\"Daniel\",\"Daniël\",\"David\",\"Dean\",\"Dirk\",\"Dylan\",\"Egbert\",\"Elijah\",\"Erik\",\"Erwin\",\"Evert\",\"Ezra\",\"Fabian\",\"Fedde\",\"Finn\",\"Florian\",\"Floris\",\"Frank\",\"Frans\",\"Frederik\",\"Freek\",\"Geert\",\"Gerard\",\"Gerben\",\"Gerrit\",\"Gijs\",\"Guus\",\"Hans\",\"Hendrik\",\"Henk\",\"Herman\",\"Hidde\",\"Hugo\",\"Jaap\",\"Jan Jaap\",\"Jan-Willem\",\"Jack\",\"Jacob\",\"Jan\",\"Jason\",\"Jasper\",\"Jayden\",\"Jelle\",\"Jelte\",\"Jens\",\"Jeroen\",\"Jesse\",\"Jim\",\"Job\",\"Joep\",\"Johannes\",\"John\",\"Jonathan\",\"Joris\",\"Joshua\",\"Joël\",\"Julian\",\"Kees\",\"Kevin\",\"Koen\",\"Lars\",\"Laurens\",\"Leendert\",\"Lennard\",\"Lodewijk\",\"Luc\",\"Luca\",\"Lucas\",\"Lukas\",\"Luuk\",\"Maarten\",\"Marcus\",\"Martijn\",\"Martin\",\"Matthijs\",\"Maurits\",\"Max\",\"Mees\",\"Melle\",\"Mick\",\"Mika\",\"Milan\",\"Mohamed\",\"Mohammed\",\"Morris\",\"Muhammed\",\"Nathan\",\"Nick\",\"Nico\",\"Niek\",\"Niels\",\"Noah\",\"Noud\",\"Olivier\",\"Oscar\",\"Owen\",\"Paul\",\"Pepijn\",\"Peter\",\"Pieter\",\"Pim\",\"Quinten\",\"Reinier\",\"Rens\",\"Robin\",\"Ruben\",\"Sam\",\"Samuel\",\"Sander\",\"Sebastiaan\",\"Sem\",\"Sep\",\"Sepp\",\"Siem\",\"Simon\",\"Stan\",\"Stef\",\"Steven\",\"Stijn\",\"Sven\",\"Teun\",\"Thijmen\",\"Thijs\",\"Thomas\",\"Tijn\",\"Tim\",\"Timo\",\"Tobias\",\"Tom\",\"Victor\",\"Vince\",\"Willem\",\"Wim\",\"Wouter\",\"Yusuf\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_de_pr%C3%A9noms_fran%C3%A7ais_et_de_la_francophonie\n \"fr\": [\"Aaron\",\"Abdon\",\"Abel\",\"Abélard\",\"Abelin\",\"Abondance\",\"Abraham\",\"Absalon\",\"Acace\",\"Achaire\",\"Achille\",\"Adalard\",\"Adalbald\",\"Adalbéron\",\"Adalbert\",\"Adalric\",\"Adam\",\"Adegrin\",\"Adel\",\"Adelin\",\"Andelin\",\"Adelphe\",\"Adam\",\"Adéodat\",\"Adhémar\",\"Adjutor\",\"Adolphe\",\"Adonis\",\"Adon\",\"Adrien\",\"Agapet\",\"Agathange\",\"Agathon\",\"Agilbert\",\"Agénor\",\"Agnan\",\"Aignan\",\"Agrippin\",\"Aimable\",\"Aimé\",\"Alain\",\"Alban\",\"Albin\",\"Aubin\",\"Albéric\",\"Albert\",\"Albertet\",\"Alcibiade\",\"Alcide\",\"Alcée\",\"Alcime\",\"Aldonce\",\"Aldric\",\"Aldéric\",\"Aleaume\",\"Alexandre\",\"Alexis\",\"Alix\",\"Alliaume\",\"Aleaume\",\"Almine\",\"Almire\",\"Aloïs\",\"Alphée\",\"Alphonse\",\"Alpinien\",\"Alverède\",\"Amalric\",\"Amaury\",\"Amandin\",\"Amant\",\"Ambroise\",\"Amédée\",\"Amélien\",\"Amiel\",\"Amour\",\"Anaël\",\"Anastase\",\"Anatole\",\"Ancelin\",\"Andéol\",\"Andoche\",\"André\",\"Andoche\",\"Ange\",\"Angelin\",\"Angilbe\",\"Anglebert\",\"Angoustan\",\"Anicet\",\"Anne\",\"Annibal\",\"Ansbert\",\"Anselme\",\"Anthelme\",\"Antheaume\",\"Anthime\",\"Antide\",\"Antoine\",\"Antonius\",\"Antonin\",\"Apollinaire\",\"Apollon\",\"Aquilin\",\"Arcade\",\"Archambaud\",\"Archambeau\",\"Archange\",\"Archibald\",\"Arian\",\"Ariel\",\"Ariste\",\"Aristide\",\"Armand\",\"Armel\",\"Armin\",\"Arnould\",\"Arnaud\",\"Arolde\",\"Arsène\",\"Arsinoé\",\"Arthaud\",\"Arthème\",\"Arthur\",\"Ascelin\",\"Athanase\",\"Aubry\",\"Audebert\",\"Audouin\",\"Audran\",\"Audric\",\"Auguste\",\"Augustin\",\"Aurèle\",\"Aurélien\",\"Aurian\",\"Auxence\",\"Axel\",\"Aymard\",\"Aymeric\",\"Aymon\",\"Aymond\",\"Balthazar\",\"Baptiste\",\"Barnabé\",\"Barthélemy\",\"Bartimée\",\"Basile\",\"Bastien\",\"Baudouin\",\"Bénigne\",\"Benjamin\",\"Benoît\",\"Bérenger\",\"Bérard\",\"Bernard\",\"Bertrand\",\"Blaise\",\"Bon\",\"Boniface\",\"Bouchard\",\"Brice\",\"Brieuc\",\"Bruno\",\"Brunon\",\"Calixte\",\"Calliste\",\"Camélien\",\"Camille\",\"Camillien\",\"Candide\",\"Caribert\",\"Carloman\",\"Cassandre\",\"Cassien\",\"Cédric\",\"Céleste\",\"Célestin\",\"Célien\",\"Césaire\",\"César\",\"Charles\",\"Charlemagne\",\"Childebert\",\"Chilpéric\",\"Chrétien\",\"Christian\",\"Christodule\",\"Christophe\",\"Chrysostome\",\"Clarence\",\"Claude\",\"Claudien\",\"Cléandre\",\"Clément\",\"Clotaire\",\"Côme\",\"Constance\",\"Constant\",\"Constantin\",\"Corentin\",\"Cyprien\",\"Cyriaque\",\"Cyrille\",\"Cyril\",\"Damien\",\"Daniel\",\"David\",\"Delphin\",\"Denis\",\"Désiré\",\"Didier\",\"Dieudonné\",\"Dimitri\",\"Dominique\",\"Dorian\",\"Dorothée\",\"Edgard\",\"Edmond\",\"Édouard\",\"Éleuthère\",\"Élie\",\"Élisée\",\"Émeric\",\"Émile\",\"Émilien\",\"Emmanuel\",\"Enguerrand\",\"Épiphane\",\"Éric\",\"Esprit\",\"Ernest\",\"Étienne\",\"Eubert\",\"Eudes\",\"Eudoxe\",\"Eugène\",\"Eusèbe\",\"Eustache\",\"Évariste\",\"Évrard\",\"Fabien\",\"Fabrice\",\"Falba\",\"Félicité\",\"Félix\",\"Ferdinand\",\"Fiacre\",\"Fidèle\",\"Firmin\",\"Flavien\",\"Flodoard\",\"Florent\",\"Florentin\",\"Florestan\",\"Florian\",\"Fortuné\",\"Foulques\",\"Francisque\",\"François\",\"Français\",\"Franciscus\",\"Francs\",\"Frédéric\",\"Fulbert\",\"Fulcran\",\"Fulgence\",\"Gabin\",\"Gabriel\",\"Gaël\",\"Garnier\",\"Gaston\",\"Gaspard\",\"Gatien\",\"Gaud\",\"Gautier\",\"Gédéon\",\"Geoffroy\",\"Georges\",\"Géraud\",\"Gérard\",\"Gerbert\",\"Germain\",\"Gervais\",\"Ghislain\",\"Gilbert\",\"Gilles\",\"Girart\",\"Gislebert\",\"Gondebaud\",\"Gonthier\",\"Gontran\",\"Gonzague\",\"Grégoire\",\"Guérin\",\"Gui\",\"Guillaume\",\"Gustave\",\"Guy\",\"Guyot\",\"Hardouin\",\"Hector\",\"Hédelin\",\"Hélier\",\"Henri\",\"Herbert\",\"Herluin\",\"Hervé\",\"Hilaire\",\"Hildebert\",\"Hincmar\",\"Hippolyte\",\"Honoré\",\"Hubert\",\"Hugues\",\"Innocent\",\"Isabeau\",\"Isidore\",\"Jacques\",\"Japhet\",\"Jason\",\"Jean\",\"Jeannel\",\"Jeannot\",\"Jérémie\",\"Jérôme\",\"Joachim\",\"Joanny\",\"Job\",\"Jocelyn\",\"Joël\",\"Johan\",\"Jonas\",\"Jonathan\",\"Joseph\",\"Josse\",\"Josselin\",\"Jourdain\",\"Jude\",\"Judicaël\",\"Jules\",\"Julien\",\"Juste\",\"Justin\",\"Lambert\",\"Landry\",\"Laurent\",\"Lazare\",\"Léandre\",\"Léon\",\"Léonard\",\"Léopold\",\"Leu\",\"Loup\",\"Leufroy\",\"Libère\",\"Liétald\",\"Lionel\",\"Loïc\",\"Longin\",\"Lorrain\",\"Lorraine\",\"Lothaire\",\"Louis\",\"Loup\",\"Luc\",\"Lucas\",\"Lucien\",\"Ludolphe\",\"Ludovic\",\"Macaire\",\"Malo\",\"Mamert\",\"Manassé\",\"Marc\",\"Marceau\",\"Marcel\",\"Marcelin\",\"Marius\",\"Marseille\",\"Martial\",\"Martin\",\"Mathurin\",\"Matthias\",\"Mathias\",\"Matthieu\",\"Maugis\",\"Maurice\",\"Mauricet\",\"Maxence\",\"Maxime\",\"Maximilien\",\"Mayeul\",\"Médéric\",\"Melchior\",\"Mence\",\"Merlin\",\"Mérovée\",\"Michaël\",\"Michel\",\"Moïse\",\"Morgan\",\"Nathan\",\"Nathanaël\",\"Narcisse\",\"Néhémie\",\"Nestor\",\"Nestor\",\"Nicéphore\",\"Nicolas\",\"Noé\",\"Noël\",\"Norbert\",\"Normand\",\"Normands\",\"Octave\",\"Odilon\",\"Odon\",\"Oger\",\"Olivier\",\"Oury\",\"Pacôme\",\"Palémon\",\"Parfait\",\"Pascal\",\"Paterne\",\"Patrice\",\"Paul\",\"Pépin\",\"Perceval\",\"Philémon\",\"Philibert\",\"Philippe\",\"Philothée\",\"Pie\",\"Pierre\",\"Pierrick\",\"Prosper\",\"Quentin\",\"Raoul\",\"Raphaël\",\"Raymond\",\"Régis\",\"Réjean\",\"Rémi\",\"Renaud\",\"René\",\"Reybaud\",\"Richard\",\"Robert\",\"Roch\",\"Rodolphe\",\"Rodrigue\",\"Roger\",\"Roland\",\"Romain\",\"Romuald\",\"Roméo\",\"Rome\",\"Ronan\",\"Roselin\",\"Salomon\",\"Samuel\",\"Savin\",\"Savinien\",\"Scholastique\",\"Sébastien\",\"Séraphin\",\"Serge\",\"Séverin\",\"Sidoine\",\"Sigebert\",\"Sigismond\",\"Silvère\",\"Simon\",\"Siméon\",\"Sixte\",\"Stanislas\",\"Stéphane\",\"Stephan\",\"Sylvain\",\"Sylvestre\",\"Tancrède\",\"Tanguy\",\"Taurin\",\"Théodore\",\"Théodose\",\"Théophile\",\"Théophraste\",\"Thibault\",\"Thibert\",\"Thierry\",\"Thomas\",\"Timoléon\",\"Timothée\",\"Titien\",\"Tonnin\",\"Toussaint\",\"Trajan\",\"Tristan\",\"Turold\",\"Tim\",\"Ulysse\",\"Urbain\",\"Valentin\",\"Valère\",\"Valéry\",\"Venance\",\"Venant\",\"Venceslas\",\"Vianney\",\"Victor\",\"Victorien\",\"Victorin\",\"Vigile\",\"Vincent\",\"Vital\",\"Vitalien\",\"Vivien\",\"Waleran\",\"Wandrille\",\"Xavier\",\"Xénophon\",\"Yves\",\"Zacharie\",\"Zaché\",\"Zéphirin\"]\n },\n\n \"female\": {\n \"en\": [\"Mary\", \"Emma\", \"Elizabeth\", \"Minnie\", \"Margaret\", \"Ida\", \"Alice\", \"Bertha\", \"Sarah\", \"Annie\", \"Clara\", \"Ella\", \"Florence\", \"Cora\", \"Martha\", \"Laura\", \"Nellie\", \"Grace\", \"Carrie\", \"Maude\", \"Mabel\", \"Bessie\", \"Jennie\", \"Gertrude\", \"Julia\", \"Hattie\", \"Edith\", \"Mattie\", \"Rose\", \"Catherine\", \"Lillian\", \"Ada\", \"Lillie\", \"Helen\", \"Jessie\", \"Louise\", \"Ethel\", \"Lula\", \"Myrtle\", \"Eva\", \"Frances\", \"Lena\", \"Lucy\", \"Edna\", \"Maggie\", \"Pearl\", \"Daisy\", \"Fannie\", \"Josephine\", \"Dora\", \"Rosa\", \"Katherine\", \"Agnes\", \"Marie\", \"Nora\", \"May\", \"Mamie\", \"Blanche\", \"Stella\", \"Ellen\", \"Nancy\", \"Effie\", \"Sallie\", \"Nettie\", \"Della\", \"Lizzie\", \"Flora\", \"Susie\", \"Maud\", \"Mae\", \"Etta\", \"Harriet\", \"Sadie\", \"Caroline\", \"Katie\", \"Lydia\", \"Elsie\", \"Kate\", \"Susan\", \"Mollie\", \"Alma\", \"Addie\", \"Georgia\", \"Eliza\", \"Lulu\", \"Nannie\", \"Lottie\", \"Amanda\", \"Belle\", \"Charlotte\", \"Rebecca\", \"Ruth\", \"Viola\", \"Olive\", \"Amelia\", \"Hannah\", \"Jane\", \"Virginia\", \"Emily\", \"Matilda\", \"Irene\", \"Kathryn\", \"Esther\", \"Willie\", \"Henrietta\", \"Ollie\", \"Amy\", \"Rachel\", \"Sara\", \"Estella\", \"Theresa\", \"Augusta\", \"Ora\", \"Pauline\", \"Josie\", \"Lola\", \"Sophia\", \"Leona\", \"Anne\", \"Mildred\", \"Ann\", \"Beulah\", \"Callie\", \"Lou\", \"Delia\", \"Eleanor\", \"Barbara\", \"Iva\", \"Louisa\", \"Maria\", \"Mayme\", \"Evelyn\", \"Estelle\", \"Nina\", \"Betty\", \"Marion\", \"Bettie\", \"Dorothy\", \"Luella\", \"Inez\", \"Lela\", \"Rosie\", \"Allie\", \"Millie\", \"Janie\", \"Cornelia\", \"Victoria\", \"Ruby\", \"Winifred\", \"Alta\", \"Celia\", \"Christine\", \"Beatrice\", \"Birdie\", \"Harriett\", \"Mable\", \"Myra\", \"Sophie\", \"Tillie\", \"Isabel\", \"Sylvia\", \"Carolyn\", \"Isabelle\", \"Leila\", \"Sally\", \"Ina\", \"Essie\", \"Bertie\", \"Nell\", \"Alberta\", \"Katharine\", \"Lora\", \"Rena\", \"Mina\", \"Rhoda\", \"Mathilda\", \"Abbie\", \"Eula\", \"Dollie\", \"Hettie\", \"Eunice\", \"Fanny\", \"Ola\", \"Lenora\", \"Adelaide\", \"Christina\", \"Lelia\", \"Nelle\", \"Sue\", \"Johanna\", \"Lilly\", \"Lucinda\", \"Minerva\", \"Lettie\", \"Roxie\", \"Cynthia\", \"Helena\", \"Hilda\", \"Hulda\", \"Bernice\", \"Genevieve\", \"Jean\", \"Cordelia\", \"Marian\", \"Francis\", \"Jeanette\", \"Adeline\", \"Gussie\", \"Leah\", \"Lois\", \"Lura\", \"Mittie\", \"Hallie\", \"Isabella\", \"Olga\", \"Phoebe\", \"Teresa\", \"Hester\", \"Lida\", \"Lina\", \"Winnie\", \"Claudia\", \"Marguerite\", \"Vera\", \"Cecelia\", \"Bess\", \"Emilie\", \"Rosetta\", \"Verna\", \"Myrtie\", \"Cecilia\", \"Elva\", \"Olivia\", \"Ophelia\", \"Georgie\", \"Elnora\", \"Violet\", \"Adele\", \"Lily\", \"Linnie\", \"Loretta\", \"Madge\", \"Polly\", \"Virgie\", \"Eugenia\", \"Lucile\", \"Lucille\", \"Mabelle\", \"Rosalie\"],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0162\n \"it\": [\"Ada\", \"Adriana\", \"Alessandra\", \"Alessia\", \"Alice\", \"Angela\", \"Anna\", \"Anna Maria\", \"Annalisa\", \"Annita\", \"Annunziata\", \"Antonella\", \"Arianna\", \"Asia\", \"Assunta\", \"Aurora\", \"Barbara\", \"Beatrice\", \"Benedetta\", \"Bianca\", \"Bruna\", \"Camilla\", \"Carla\", \"Carlotta\", \"Carmela\", \"Carolina\", \"Caterina\", \"Catia\", \"Cecilia\", \"Chiara\", \"Cinzia\", \"Clara\", \"Claudia\", \"Costanza\", \"Cristina\", \"Daniela\", \"Debora\", \"Diletta\", \"Dina\", \"Donatella\", \"Elena\", \"Eleonora\", \"Elisa\", \"Elisabetta\", \"Emanuela\", \"Emma\", \"Eva\", \"Federica\", \"Fernanda\", \"Fiorella\", \"Fiorenza\", \"Flora\", \"Franca\", \"Francesca\", \"Gabriella\", \"Gaia\", \"Gemma\", \"Giada\", \"Gianna\", \"Gina\", \"Ginevra\", \"Giorgia\", \"Giovanna\", \"Giulia\", \"Giuliana\", \"Giuseppa\", \"Giuseppina\", \"Grazia\", \"Graziella\", \"Greta\", \"Ida\", \"Ilaria\", \"Ines\", \"Iolanda\", \"Irene\", \"Irma\", \"Isabella\", \"Jessica\", \"Laura\", \"Lea\", \"Letizia\", \"Licia\", \"Lidia\", \"Liliana\", \"Lina\", \"Linda\", \"Lisa\", \"Livia\", \"Loretta\", \"Luana\", \"Lucia\", \"Luciana\", \"Lucrezia\", \"Luisa\", \"Manuela\", \"Mara\", \"Marcella\", \"Margherita\", \"Maria\", \"Maria Cristina\", \"Maria Grazia\", \"Maria Luisa\", \"Maria Pia\", \"Maria Teresa\", \"Marina\", \"Marisa\", \"Marta\", \"Martina\", \"Marzia\", \"Matilde\", \"Melissa\", \"Michela\", \"Milena\", \"Mirella\", \"Monica\", \"Natalina\", \"Nella\", \"Nicoletta\", \"Noemi\", \"Olga\", \"Paola\", \"Patrizia\", \"Piera\", \"Pierina\", \"Raffaella\", \"Rebecca\", \"Renata\", \"Rina\", \"Rita\", \"Roberta\", \"Rosa\", \"Rosanna\", \"Rossana\", \"Rossella\", \"Sabrina\", \"Sandra\", \"Sara\", \"Serena\", \"Silvana\", \"Silvia\", \"Simona\", \"Simonetta\", \"Sofia\", \"Sonia\", \"Stefania\", \"Susanna\", \"Teresa\", \"Tina\", \"Tiziana\", \"Tosca\", \"Valentina\", \"Valeria\", \"Vanda\", \"Vanessa\", \"Vanna\", \"Vera\", \"Veronica\", \"Vilma\", \"Viola\", \"Virginia\", \"Vittoria\"],\n // Data taken from http://www.svbkindernamen.nl/int/nl/kindernamen/index.html\n \"nl\": [\"Ada\", \"Arianne\", \"Afke\", \"Amanda\", \"Amber\", \"Amy\", \"Aniek\", \"Anita\", \"Anja\", \"Anna\", \"Anne\", \"Annelies\", \"Annemarie\", \"Annette\", \"Anouk\", \"Astrid\", \"Aukje\", \"Barbara\", \"Bianca\", \"Carla\", \"Carlijn\", \"Carolien\", \"Chantal\", \"Charlotte\", \"Claudia\", \"Daniëlle\", \"Debora\", \"Diane\", \"Dora\", \"Eline\", \"Elise\", \"Ella\", \"Ellen\", \"Emma\", \"Esmee\", \"Evelien\", \"Esther\", \"Erica\", \"Eva\", \"Femke\", \"Fleur\", \"Floor\", \"Froukje\", \"Gea\", \"Gerda\", \"Hanna\", \"Hanneke\", \"Heleen\", \"Hilde\", \"Ilona\", \"Ina\", \"Inge\", \"Ingrid\", \"Iris\", \"Isabel\", \"Isabelle\", \"Janneke\", \"Jasmijn\", \"Jeanine\", \"Jennifer\", \"Jessica\", \"Johanna\", \"Joke\", \"Julia\", \"Julie\", \"Karen\", \"Karin\", \"Katja\", \"Kim\", \"Lara\", \"Laura\", \"Lena\", \"Lianne\", \"Lieke\", \"Lilian\", \"Linda\", \"Lisa\", \"Lisanne\", \"Lotte\", \"Louise\", \"Maaike\", \"Manon\", \"Marga\", \"Maria\", \"Marissa\", \"Marit\", \"Marjolein\", \"Martine\", \"Marleen\", \"Melissa\", \"Merel\", \"Miranda\", \"Michelle\", \"Mirjam\", \"Mirthe\", \"Naomi\", \"Natalie\", 'Nienke', \"Nina\", \"Noortje\", \"Olivia\", \"Patricia\", \"Paula\", \"Paulien\", \"Ramona\", \"Ria\", \"Rianne\", \"Roos\", \"Rosanne\", \"Ruth\", \"Sabrina\", \"Sandra\", \"Sanne\", \"Sara\", \"Saskia\", \"Silvia\", \"Sofia\", \"Sophie\", \"Sonja\", \"Suzanne\", \"Tamara\", \"Tess\", \"Tessa\", \"Tineke\", \"Valerie\", \"Vanessa\", \"Veerle\", \"Vera\", \"Victoria\", \"Wendy\", \"Willeke\", \"Yvonne\", \"Zoë\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_de_pr%C3%A9noms_fran%C3%A7ais_et_de_la_francophonie\n \"fr\": [\"Abdon\",\"Abel\",\"Abigaëlle\",\"Abigaïl\",\"Acacius\",\"Acanthe\",\"Adalbert\",\"Adalsinde\",\"Adegrine\",\"Adélaïde\",\"Adèle\",\"Adélie\",\"Adeline\",\"Adeltrude\",\"Adolphe\",\"Adonis\",\"Adrastée\",\"Adrehilde\",\"Adrienne\",\"Agathe\",\"Agilbert\",\"Aglaé\",\"Aignan\",\"Agneflète\",\"Agnès\",\"Agrippine\",\"Aimé\",\"Alaine\",\"Alaïs\",\"Albane\",\"Albérade\",\"Alberte\",\"Alcide\",\"Alcine\",\"Alcyone\",\"Aldegonde\",\"Aleth\",\"Alexandrine\",\"Alexine\",\"Alice\",\"Aliénor\",\"Aliette\",\"Aline\",\"Alix\",\"Alizé\",\"Aloïse\",\"Aloyse\",\"Alphonsine\",\"Althée\",\"Amaliane\",\"Amalthée\",\"Amande\",\"Amandine\",\"Amant\",\"Amarande\",\"Amaranthe\",\"Amaryllis\",\"Ambre\",\"Ambroisie\",\"Amélie\",\"Améthyste\",\"Aminte\",\"Anaël\",\"Anaïs\",\"Anastasie\",\"Anatole\",\"Ancelin\",\"Andrée\",\"Anémone\",\"Angadrême\",\"Angèle\",\"Angeline\",\"Angélique\",\"Angilbert\",\"Anicet\",\"Annabelle\",\"Anne\",\"Annette\",\"Annick\",\"Annie\",\"Annonciade\",\"Ansbert\",\"Anstrudie\",\"Anthelme\",\"Antigone\",\"Antoinette\",\"Antonine\",\"Aphélie\",\"Apolline\",\"Apollonie\",\"Aquiline\",\"Arabelle\",\"Arcadie\",\"Archange\",\"Argine\",\"Ariane\",\"Aricie\",\"Ariel\",\"Arielle\",\"Arlette\",\"Armance\",\"Armande\",\"Armandine\",\"Armelle\",\"Armide\",\"Armelle\",\"Armin\",\"Arnaud\",\"Arsène\",\"Arsinoé\",\"Artémis\",\"Arthur\",\"Ascelin\",\"Ascension\",\"Assomption\",\"Astarté\",\"Astérie\",\"Astrée\",\"Astrid\",\"Athalie\",\"Athanasie\",\"Athina\",\"Aube\",\"Albert\",\"Aude\",\"Audrey\",\"Augustine\",\"Aure\",\"Aurélie\",\"Aurélien\",\"Aurèle\",\"Aurore\",\"Auxence\",\"Aveline\",\"Abigaëlle\",\"Avoye\",\"Axelle\",\"Aymard\",\"Azalée\",\"Adèle\",\"Adeline\",\"Barbe\",\"Basilisse\",\"Bathilde\",\"Béatrice\",\"Béatrix\",\"Bénédicte\",\"Bérengère\",\"Bernadette\",\"Berthe\",\"Bertille\",\"Beuve\",\"Blanche\",\"Blanc\",\"Blandine\",\"Brigitte\",\"Brune\",\"Brunehilde\",\"Callista\",\"Camille\",\"Capucine\",\"Carine\",\"Caroline\",\"Cassandre\",\"Catherine\",\"Cécile\",\"Céleste\",\"Célestine\",\"Céline\",\"Chantal\",\"Charlène\",\"Charline\",\"Charlotte\",\"Chloé\",\"Christelle\",\"Christiane\",\"Christine\",\"Claire\",\"Clara\",\"Claude\",\"Claudine\",\"Clarisse\",\"Clémence\",\"Clémentine\",\"Cléo\",\"Clio\",\"Clotilde\",\"Coline\",\"Conception\",\"Constance\",\"Coralie\",\"Coraline\",\"Corentine\",\"Corinne\",\"Cyrielle\",\"Daniel\",\"Daniel\",\"Daphné\",\"Débora\",\"Delphine\",\"Denise\",\"Diane\",\"Dieudonné\",\"Dominique\",\"Doriane\",\"Dorothée\",\"Douce\",\"Édith\",\"Edmée\",\"Éléonore\",\"Éliane\",\"Élia\",\"Éliette\",\"Élisabeth\",\"Élise\",\"Ella\",\"Élodie\",\"Éloïse\",\"Elsa\",\"Émeline\",\"Émérance\",\"Émérentienne\",\"Émérencie\",\"Émilie\",\"Emma\",\"Emmanuelle\",\"Emmelie\",\"Ernestine\",\"Esther\",\"Estelle\",\"Eudoxie\",\"Eugénie\",\"Eulalie\",\"Euphrasie\",\"Eusébie\",\"Évangéline\",\"Eva\",\"Ève\",\"Évelyne\",\"Fanny\",\"Fantine\",\"Faustine\",\"Félicie\",\"Fernande\",\"Flavie\",\"Fleur\",\"Flore\",\"Florence\",\"Florie\",\"Fortuné\",\"France\",\"Francia\",\"Françoise\",\"Francine\",\"Gabrielle\",\"Gaëlle\",\"Garance\",\"Geneviève\",\"Georgette\",\"Gerberge\",\"Germaine\",\"Gertrude\",\"Gisèle\",\"Guenièvre\",\"Guilhemine\",\"Guillemette\",\"Gustave\",\"Gwenael\",\"Hélène\",\"Héloïse\",\"Henriette\",\"Hermine\",\"Hermione\",\"Hippolyte\",\"Honorine\",\"Hortense\",\"Huguette\",\"Ines\",\"Irène\",\"Irina\",\"Iris\",\"Isabeau\",\"Isabelle\",\"Iseult\",\"Isolde\",\"Ismérie\",\"Jacinthe\",\"Jacqueline\",\"Jade\",\"Janine\",\"Jeanne\",\"Jocelyne\",\"Joëlle\",\"Joséphine\",\"Judith\",\"Julia\",\"Julie\",\"Jules\",\"Juliette\",\"Justine\",\"Katy\",\"Kathy\",\"Katie\",\"Laura\",\"Laure\",\"Laureline\",\"Laurence\",\"Laurene\",\"Lauriane\",\"Laurianne\",\"Laurine\",\"Léa\",\"Léna\",\"Léonie\",\"Léon\",\"Léontine\",\"Lorraine\",\"Lucie\",\"Lucienne\",\"Lucille\",\"Ludivine\",\"Lydie\",\"Lydie\",\"Megane\",\"Madeleine\",\"Magali\",\"Maguelone\",\"Mallaury\",\"Manon\",\"Marceline\",\"Margot\",\"Marguerite\",\"Marianne\",\"Marie\",\"Myriam\",\"Marie\",\"Marine\",\"Marion\",\"Marlène\",\"Marthe\",\"Martine\",\"Mathilde\",\"Maud\",\"Maureen\",\"Mauricette\",\"Maxime\",\"Mélanie\",\"Melissa\",\"Mélissandre\",\"Mélisande\",\"Mélodie\",\"Michel\",\"Micheline\",\"Mireille\",\"Miriam\",\"Moïse\",\"Monique\",\"Morgane\",\"Muriel\",\"Mylène\",\"Nadège\",\"Nadine\",\"Nathalie\",\"Nicole\",\"Nicolette\",\"Nine\",\"Noël\",\"Noémie\",\"Océane\",\"Odette\",\"Odile\",\"Olive\",\"Olivia\",\"Olympe\",\"Ombline\",\"Ombeline\",\"Ophélie\",\"Oriande\",\"Oriane\",\"Ozanne\",\"Pascale\",\"Pascaline\",\"Paule\",\"Paulette\",\"Pauline\",\"Priscille\",\"Prisca\",\"Prisque\",\"Pécine\",\"Pélagie\",\"Pénélope\",\"Perrine\",\"Pétronille\",\"Philippine\",\"Philomène\",\"Philothée\",\"Primerose\",\"Prudence\",\"Pulchérie\",\"Quentine\",\"Quiéta\",\"Quintia\",\"Quintilla\",\"Rachel\",\"Raphaëlle\",\"Raymonde\",\"Rebecca\",\"Régine\",\"Réjeanne\",\"René\",\"Rita\",\"Rita\",\"Rolande\",\"Romane\",\"Rosalie\",\"Rose\",\"Roseline\",\"Sabine\",\"Salomé\",\"Sandra\",\"Sandrine\",\"Sarah\",\"Ségolène\",\"Séverine\",\"Sibylle\",\"Simone\",\"Sixt\",\"Solange\",\"Soline\",\"Solène\",\"Sophie\",\"Stéphanie\",\"Suzanne\",\"Sylvain\",\"Sylvie\",\"Tatiana\",\"Thaïs\",\"Théodora\",\"Thérèse\",\"Tiphaine\",\"Ursule\",\"Valentine\",\"Valérie\",\"Véronique\",\"Victoire\",\"Victorine\",\"Vinciane\",\"Violette\",\"Virginie\",\"Viviane\",\"Xavière\",\"Yolande\",\"Ysaline\",\"Yvette\",\"Yvonne\",\"Zélie\",\"Zita\",\"Zoé\"]\n }\n },\n\n lastNames: {\n \"en\": ['Smith', 'Johnson', 'Williams', 'Jones', 'Brown', 'Davis', 'Miller', 'Wilson', 'Moore', 'Taylor', 'Anderson', 'Thomas', 'Jackson', 'White', 'Harris', 'Martin', 'Thompson', 'Garcia', 'Martinez', 'Robinson', 'Clark', 'Rodriguez', 'Lewis', 'Lee', 'Walker', 'Hall', 'Allen', 'Young', 'Hernandez', 'King', 'Wright', 'Lopez', 'Hill', 'Scott', 'Green', 'Adams', 'Baker', 'Gonzalez', 'Nelson', 'Carter', 'Mitchell', 'Perez', 'Roberts', 'Turner', 'Phillips', 'Campbell', 'Parker', 'Evans', 'Edwards', 'Collins', 'Stewart', 'Sanchez', 'Morris', 'Rogers', 'Reed', 'Cook', 'Morgan', 'Bell', 'Murphy', 'Bailey', 'Rivera', 'Cooper', 'Richardson', 'Cox', 'Howard', 'Ward', 'Torres', 'Peterson', 'Gray', 'Ramirez', 'James', 'Watson', 'Brooks', 'Kelly', 'Sanders', 'Price', 'Bennett', 'Wood', 'Barnes', 'Ross', 'Henderson', 'Coleman', 'Jenkins', 'Perry', 'Powell', 'Long', 'Patterson', 'Hughes', 'Flores', 'Washington', 'Butler', 'Simmons', 'Foster', 'Gonzales', 'Bryant', 'Alexander', 'Russell', 'Griffin', 'Diaz', 'Hayes', 'Myers', 'Ford', 'Hamilton', 'Graham', 'Sullivan', 'Wallace', 'Woods', 'Cole', 'West', 'Jordan', 'Owens', 'Reynolds', 'Fisher', 'Ellis', 'Harrison', 'Gibson', 'McDonald', 'Cruz', 'Marshall', 'Ortiz', 'Gomez', 'Murray', 'Freeman', 'Wells', 'Webb', 'Simpson', 'Stevens', 'Tucker', 'Porter', 'Hunter', 'Hicks', 'Crawford', 'Henry', 'Boyd', 'Mason', 'Morales', 'Kennedy', 'Warren', 'Dixon', 'Ramos', 'Reyes', 'Burns', 'Gordon', 'Shaw', 'Holmes', 'Rice', 'Robertson', 'Hunt', 'Black', 'Daniels', 'Palmer', 'Mills', 'Nichols', 'Grant', 'Knight', 'Ferguson', 'Rose', 'Stone', 'Hawkins', 'Dunn', 'Perkins', 'Hudson', 'Spencer', 'Gardner', 'Stephens', 'Payne', 'Pierce', 'Berry', 'Matthews', 'Arnold', 'Wagner', 'Willis', 'Ray', 'Watkins', 'Olson', 'Carroll', 'Duncan', 'Snyder', 'Hart', 'Cunningham', 'Bradley', 'Lane', 'Andrews', 'Ruiz', 'Harper', 'Fox', 'Riley', 'Armstrong', 'Carpenter', 'Weaver', 'Greene', 'Lawrence', 'Elliott', 'Chavez', 'Sims', 'Austin', 'Peters', 'Kelley', 'Franklin', 'Lawson', 'Fields', 'Gutierrez', 'Ryan', 'Schmidt', 'Carr', 'Vasquez', 'Castillo', 'Wheeler', 'Chapman', 'Oliver', 'Montgomery', 'Richards', 'Williamson', 'Johnston', 'Banks', 'Meyer', 'Bishop', 'McCoy', 'Howell', 'Alvarez', 'Morrison', 'Hansen', 'Fernandez', 'Garza', 'Harvey', 'Little', 'Burton', 'Stanley', 'Nguyen', 'George', 'Jacobs', 'Reid', 'Kim', 'Fuller', 'Lynch', 'Dean', 'Gilbert', 'Garrett', 'Romero', 'Welch', 'Larson', 'Frazier', 'Burke', 'Hanson', 'Day', 'Mendoza', 'Moreno', 'Bowman', 'Medina', 'Fowler', 'Brewer', 'Hoffman', 'Carlson', 'Silva', 'Pearson', 'Holland', 'Douglas', 'Fleming', 'Jensen', 'Vargas', 'Byrd', 'Davidson', 'Hopkins', 'May', 'Terry', 'Herrera', 'Wade', 'Soto', 'Walters', 'Curtis', 'Neal', 'Caldwell', 'Lowe', 'Jennings', 'Barnett', 'Graves', 'Jimenez', 'Horton', 'Shelton', 'Barrett', 'Obrien', 'Castro', 'Sutton', 'Gregory', 'McKinney', 'Lucas', 'Miles', 'Craig', 'Rodriquez', 'Chambers', 'Holt', 'Lambert', 'Fletcher', 'Watts', 'Bates', 'Hale', 'Rhodes', 'Pena', 'Beck', 'Newman', 'Haynes', 'McDaniel', 'Mendez', 'Bush', 'Vaughn', 'Parks', 'Dawson', 'Santiago', 'Norris', 'Hardy', 'Love', 'Steele', 'Curry', 'Powers', 'Schultz', 'Barker', 'Guzman', 'Page', 'Munoz', 'Ball', 'Keller', 'Chandler', 'Weber', 'Leonard', 'Walsh', 'Lyons', 'Ramsey', 'Wolfe', 'Schneider', 'Mullins', 'Benson', 'Sharp', 'Bowen', 'Daniel', 'Barber', 'Cummings', 'Hines', 'Baldwin', 'Griffith', 'Valdez', 'Hubbard', 'Salazar', 'Reeves', 'Warner', 'Stevenson', 'Burgess', 'Santos', 'Tate', 'Cross', 'Garner', 'Mann', 'Mack', 'Moss', 'Thornton', 'Dennis', 'McGee', 'Farmer', 'Delgado', 'Aguilar', 'Vega', 'Glover', 'Manning', 'Cohen', 'Harmon', 'Rodgers', 'Robbins', 'Newton', 'Todd', 'Blair', 'Higgins', 'Ingram', 'Reese', 'Cannon', 'Strickland', 'Townsend', 'Potter', 'Goodwin', 'Walton', 'Rowe', 'Hampton', 'Ortega', 'Patton', 'Swanson', 'Joseph', 'Francis', 'Goodman', 'Maldonado', 'Yates', 'Becker', 'Erickson', 'Hodges', 'Rios', 'Conner', 'Adkins', 'Webster', 'Norman', 'Malone', 'Hammond', 'Flowers', 'Cobb', 'Moody', 'Quinn', 'Blake', 'Maxwell', 'Pope', 'Floyd', 'Osborne', 'Paul', 'McCarthy', 'Guerrero', 'Lindsey', 'Estrada', 'Sandoval', 'Gibbs', 'Tyler', 'Gross', 'Fitzgerald', 'Stokes', 'Doyle', 'Sherman', 'Saunders', 'Wise', 'Colon', 'Gill', 'Alvarado', 'Greer', 'Padilla', 'Simon', 'Waters', 'Nunez', 'Ballard', 'Schwartz', 'McBride', 'Houston', 'Christensen', 'Klein', 'Pratt', 'Briggs', 'Parsons', 'McLaughlin', 'Zimmerman', 'French', 'Buchanan', 'Moran', 'Copeland', 'Roy', 'Pittman', 'Brady', 'McCormick', 'Holloway', 'Brock', 'Poole', 'Frank', 'Logan', 'Owen', 'Bass', 'Marsh', 'Drake', 'Wong', 'Jefferson', 'Park', 'Morton', 'Abbott', 'Sparks', 'Patrick', 'Norton', 'Huff', 'Clayton', 'Massey', 'Lloyd', 'Figueroa', 'Carson', 'Bowers', 'Roberson', 'Barton', 'Tran', 'Lamb', 'Harrington', 'Casey', 'Boone', 'Cortez', 'Clarke', 'Mathis', 'Singleton', 'Wilkins', 'Cain', 'Bryan', 'Underwood', 'Hogan', 'McKenzie', 'Collier', 'Luna', 'Phelps', 'McGuire', 'Allison', 'Bridges', 'Wilkerson', 'Nash', 'Summers', 'Atkins'],\n // Data taken from http://www.dati.gov.it/dataset/comune-di-firenze_0164 (first 1000)\n \"it\": [\"Acciai\", \"Aglietti\", \"Agostini\", \"Agresti\", \"Ahmed\", \"Aiazzi\", \"Albanese\", \"Alberti\", \"Alessi\", \"Alfani\", \"Alinari\", \"Alterini\", \"Amato\", \"Ammannati\", \"Ancillotti\", \"Andrei\", \"Andreini\", \"Andreoni\", \"Angeli\", \"Anichini\", \"Antonelli\", \"Antonini\", \"Arena\", \"Ariani\", \"Arnetoli\", \"Arrighi\", \"Baccani\", \"Baccetti\", \"Bacci\", \"Bacherini\", \"Badii\", \"Baggiani\", \"Baglioni\", \"Bagni\", \"Bagnoli\", \"Baldassini\", \"Baldi\", \"Baldini\", \"Ballerini\", \"Balli\", \"Ballini\", \"Balloni\", \"Bambi\", \"Banchi\", \"Bandinelli\", \"Bandini\", \"Bani\", \"Barbetti\", \"Barbieri\", \"Barchielli\", \"Bardazzi\", \"Bardelli\", \"Bardi\", \"Barducci\", \"Bargellini\", \"Bargiacchi\", \"Barni\", \"Baroncelli\", \"Baroncini\", \"Barone\", \"Baroni\", \"Baronti\", \"Bartalesi\", \"Bartoletti\", \"Bartoli\", \"Bartolini\", \"Bartoloni\", \"Bartolozzi\", \"Basagni\", \"Basile\", \"Bassi\", \"Batacchi\", \"Battaglia\", \"Battaglini\", \"Bausi\", \"Becagli\", \"Becattini\", \"Becchi\", \"Becucci\", \"Bellandi\", \"Bellesi\", \"Belli\", \"Bellini\", \"Bellucci\", \"Bencini\", \"Benedetti\", \"Benelli\", \"Beni\", \"Benini\", \"Bensi\", \"Benucci\", \"Benvenuti\", \"Berlincioni\", \"Bernacchioni\", \"Bernardi\", \"Bernardini\", \"Berni\", \"Bernini\", \"Bertelli\", \"Berti\", \"Bertini\", \"Bessi\", \"Betti\", \"Bettini\", \"Biagi\", \"Biagini\", \"Biagioni\", \"Biagiotti\", \"Biancalani\", \"Bianchi\", \"Bianchini\", \"Bianco\", \"Biffoli\", \"Bigazzi\", \"Bigi\", \"Biliotti\", \"Billi\", \"Binazzi\", \"Bindi\", \"Bini\", \"Biondi\", \"Bizzarri\", \"Bocci\", \"Bogani\", \"Bolognesi\", \"Bonaiuti\", \"Bonanni\", \"Bonciani\", \"Boncinelli\", \"Bondi\", \"Bonechi\", \"Bongini\", \"Boni\", \"Bonini\", \"Borchi\", \"Boretti\", \"Borghi\", \"Borghini\", \"Borgioli\", \"Borri\", \"Borselli\", \"Boschi\", \"Bottai\", \"Bracci\", \"Braccini\", \"Brandi\", \"Braschi\", \"Bravi\", \"Brazzini\", \"Breschi\", \"Brilli\", \"Brizzi\", \"Brogelli\", \"Brogi\", \"Brogioni\", \"Brunelli\", \"Brunetti\", \"Bruni\", \"Bruno\", \"Brunori\", \"Bruschi\", \"Bucci\", \"Bucciarelli\", \"Buccioni\", \"Bucelli\", \"Bulli\", \"Burberi\", \"Burchi\", \"Burgassi\", \"Burroni\", \"Bussotti\", \"Buti\", \"Caciolli\", \"Caiani\", \"Calabrese\", \"Calamai\", \"Calamandrei\", \"Caldini\", \"Calo'\", \"Calonaci\", \"Calosi\", \"Calvelli\", \"Cambi\", \"Camiciottoli\", \"Cammelli\", \"Cammilli\", \"Campolmi\", \"Cantini\", \"Capanni\", \"Capecchi\", \"Caponi\", \"Cappelletti\", \"Cappelli\", \"Cappellini\", \"Cappugi\", \"Capretti\", \"Caputo\", \"Carbone\", \"Carboni\", \"Cardini\", \"Carlesi\", \"Carletti\", \"Carli\", \"Caroti\", \"Carotti\", \"Carrai\", \"Carraresi\", \"Carta\", \"Caruso\", \"Casalini\", \"Casati\", \"Caselli\", \"Casini\", \"Castagnoli\", \"Castellani\", \"Castelli\", \"Castellucci\", \"Catalano\", \"Catarzi\", \"Catelani\", \"Cavaciocchi\", \"Cavallaro\", \"Cavallini\", \"Cavicchi\", \"Cavini\", \"Ceccarelli\", \"Ceccatelli\", \"Ceccherelli\", \"Ceccherini\", \"Cecchi\", \"Cecchini\", \"Cecconi\", \"Cei\", \"Cellai\", \"Celli\", \"Cellini\", \"Cencetti\", \"Ceni\", \"Cenni\", \"Cerbai\", \"Cesari\", \"Ceseri\", \"Checcacci\", \"Checchi\", \"Checcucci\", \"Cheli\", \"Chellini\", \"Chen\", \"Cheng\", \"Cherici\", \"Cherubini\", \"Chiaramonti\", \"Chiarantini\", \"Chiarelli\", \"Chiari\", \"Chiarini\", \"Chiarugi\", \"Chiavacci\", \"Chiesi\", \"Chimenti\", \"Chini\", \"Chirici\", \"Chiti\", \"Ciabatti\", \"Ciampi\", \"Cianchi\", \"Cianfanelli\", \"Cianferoni\", \"Ciani\", \"Ciapetti\", \"Ciappi\", \"Ciardi\", \"Ciatti\", \"Cicali\", \"Ciccone\", \"Cinelli\", \"Cini\", \"Ciobanu\", \"Ciolli\", \"Cioni\", \"Cipriani\", \"Cirillo\", \"Cirri\", \"Ciucchi\", \"Ciuffi\", \"Ciulli\", \"Ciullini\", \"Clemente\", \"Cocchi\", \"Cognome\", \"Coli\", \"Collini\", \"Colombo\", \"Colzi\", \"Comparini\", \"Conforti\", \"Consigli\", \"Conte\", \"Conti\", \"Contini\", \"Coppini\", \"Coppola\", \"Corsi\", \"Corsini\", \"Corti\", \"Cortini\", \"Cosi\", \"Costa\", \"Costantini\", \"Costantino\", \"Cozzi\", \"Cresci\", \"Crescioli\", \"Cresti\", \"Crini\", \"Curradi\", \"D'Agostino\", \"D'Alessandro\", \"D'Amico\", \"D'Angelo\", \"Daddi\", \"Dainelli\", \"Dallai\", \"Danti\", \"Davitti\", \"De Angelis\", \"De Luca\", \"De Marco\", \"De Rosa\", \"De Santis\", \"De Simone\", \"De Vita\", \"Degl'Innocenti\", \"Degli Innocenti\", \"Dei\", \"Del Lungo\", \"Del Re\", \"Di Marco\", \"Di Stefano\", \"Dini\", \"Diop\", \"Dobre\", \"Dolfi\", \"Donati\", \"Dondoli\", \"Dong\", \"Donnini\", \"Ducci\", \"Dumitru\", \"Ermini\", \"Esposito\", \"Evangelisti\", \"Fabbri\", \"Fabbrini\", \"Fabbrizzi\", \"Fabbroni\", \"Fabbrucci\", \"Fabiani\", \"Facchini\", \"Faggi\", \"Fagioli\", \"Failli\", \"Faini\", \"Falciani\", \"Falcini\", \"Falcone\", \"Fallani\", \"Falorni\", \"Falsini\", \"Falugiani\", \"Fancelli\", \"Fanelli\", \"Fanetti\", \"Fanfani\", \"Fani\", \"Fantappie'\", \"Fantechi\", \"Fanti\", \"Fantini\", \"Fantoni\", \"Farina\", \"Fattori\", \"Favilli\", \"Fedi\", \"Fei\", \"Ferrante\", \"Ferrara\", \"Ferrari\", \"Ferraro\", \"Ferretti\", \"Ferri\", \"Ferrini\", \"Ferroni\", \"Fiaschi\", \"Fibbi\", \"Fiesoli\", \"Filippi\", \"Filippini\", \"Fini\", \"Fioravanti\", \"Fiore\", \"Fiorentini\", \"Fiorini\", \"Fissi\", \"Focardi\", \"Foggi\", \"Fontana\", \"Fontanelli\", \"Fontani\", \"Forconi\", \"Formigli\", \"Forte\", \"Forti\", \"Fortini\", \"Fossati\", \"Fossi\", \"Francalanci\", \"Franceschi\", \"Franceschini\", \"Franchi\", \"Franchini\", \"Franci\", \"Francini\", \"Francioni\", \"Franco\", \"Frassineti\", \"Frati\", \"Fratini\", \"Frilli\", \"Frizzi\", \"Frosali\", \"Frosini\", \"Frullini\", \"Fusco\", \"Fusi\", \"Gabbrielli\", \"Gabellini\", \"Gagliardi\", \"Galanti\", \"Galardi\", \"Galeotti\", \"Galletti\", \"Galli\", \"Gallo\", \"Gallori\", \"Gambacciani\", \"Gargani\", \"Garofalo\", \"Garuglieri\", \"Gashi\", \"Gasperini\", \"Gatti\", \"Gelli\", \"Gensini\", \"Gentile\", \"Gentili\", \"Geri\", \"Gerini\", \"Gheri\", \"Ghini\", \"Giachetti\", \"Giachi\", \"Giacomelli\", \"Gianassi\", \"Giani\", \"Giannelli\", \"Giannetti\", \"Gianni\", \"Giannini\", \"Giannoni\", \"Giannotti\", \"Giannozzi\", \"Gigli\", \"Giordano\", \"Giorgetti\", \"Giorgi\", \"Giovacchini\", \"Giovannelli\", \"Giovannetti\", \"Giovannini\", \"Giovannoni\", \"Giuliani\", \"Giunti\", \"Giuntini\", \"Giusti\", \"Gonnelli\", \"Goretti\", \"Gori\", \"Gradi\", \"Gramigni\", \"Grassi\", \"Grasso\", \"Graziani\", \"Grazzini\", \"Greco\", \"Grifoni\", \"Grillo\", \"Grimaldi\", \"Grossi\", \"Gualtieri\", \"Guarducci\", \"Guarino\", \"Guarnieri\", \"Guasti\", \"Guerra\", \"Guerri\", \"Guerrini\", \"Guidi\", \"Guidotti\", \"He\", \"Hoxha\", \"Hu\", \"Huang\", \"Iandelli\", \"Ignesti\", \"Innocenti\", \"Jin\", \"La Rosa\", \"Lai\", \"Landi\", \"Landini\", \"Lanini\", \"Lapi\", \"Lapini\", \"Lari\", \"Lascialfari\", \"Lastrucci\", \"Latini\", \"Lazzeri\", \"Lazzerini\", \"Lelli\", \"Lenzi\", \"Leonardi\", \"Leoncini\", \"Leone\", \"Leoni\", \"Lepri\", \"Li\", \"Liao\", \"Lin\", \"Linari\", \"Lippi\", \"Lisi\", \"Livi\", \"Lombardi\", \"Lombardini\", \"Lombardo\", \"Longo\", \"Lopez\", \"Lorenzi\", \"Lorenzini\", \"Lorini\", \"Lotti\", \"Lu\", \"Lucchesi\", \"Lucherini\", \"Lunghi\", \"Lupi\", \"Madiai\", \"Maestrini\", \"Maffei\", \"Maggi\", \"Maggini\", \"Magherini\", \"Magini\", \"Magnani\", \"Magnelli\", \"Magni\", \"Magnolfi\", \"Magrini\", \"Malavolti\", \"Malevolti\", \"Manca\", \"Mancini\", \"Manetti\", \"Manfredi\", \"Mangani\", \"Mannelli\", \"Manni\", \"Mannini\", \"Mannucci\", \"Manuelli\", \"Manzini\", \"Marcelli\", \"Marchese\", \"Marchetti\", \"Marchi\", \"Marchiani\", \"Marchionni\", \"Marconi\", \"Marcucci\", \"Margheri\", \"Mari\", \"Mariani\", \"Marilli\", \"Marinai\", \"Marinari\", \"Marinelli\", \"Marini\", \"Marino\", \"Mariotti\", \"Marsili\", \"Martelli\", \"Martinelli\", \"Martini\", \"Martino\", \"Marzi\", \"Masi\", \"Masini\", \"Masoni\", \"Massai\", \"Materassi\", \"Mattei\", \"Matteini\", \"Matteucci\", \"Matteuzzi\", \"Mattioli\", \"Mattolini\", \"Matucci\", \"Mauro\", \"Mazzanti\", \"Mazzei\", \"Mazzetti\", \"Mazzi\", \"Mazzini\", \"Mazzocchi\", \"Mazzoli\", \"Mazzoni\", \"Mazzuoli\", \"Meacci\", \"Mecocci\", \"Meini\", \"Melani\", \"Mele\", \"Meli\", \"Mengoni\", \"Menichetti\", \"Meoni\", \"Merlini\", \"Messeri\", \"Messina\", \"Meucci\", \"Miccinesi\", \"Miceli\", \"Micheli\", \"Michelini\", \"Michelozzi\", \"Migliori\", \"Migliorini\", \"Milani\", \"Miniati\", \"Misuri\", \"Monaco\", \"Montagnani\", \"Montagni\", \"Montanari\", \"Montelatici\", \"Monti\", \"Montigiani\", \"Montini\", \"Morandi\", \"Morandini\", \"Morelli\", \"Moretti\", \"Morganti\", \"Mori\", \"Morini\", \"Moroni\", \"Morozzi\", \"Mugnai\", \"Mugnaini\", \"Mustafa\", \"Naldi\", \"Naldini\", \"Nannelli\", \"Nanni\", \"Nannini\", \"Nannucci\", \"Nardi\", \"Nardini\", \"Nardoni\", \"Natali\", \"Ndiaye\", \"Nencetti\", \"Nencini\", \"Nencioni\", \"Neri\", \"Nesi\", \"Nesti\", \"Niccolai\", \"Niccoli\", \"Niccolini\", \"Nigi\", \"Nistri\", \"Nocentini\", \"Noferini\", \"Novelli\", \"Nucci\", \"Nuti\", \"Nutini\", \"Oliva\", \"Olivieri\", \"Olmi\", \"Orlandi\", \"Orlandini\", \"Orlando\", \"Orsini\", \"Ortolani\", \"Ottanelli\", \"Pacciani\", \"Pace\", \"Paci\", \"Pacini\", \"Pagani\", \"Pagano\", \"Paggetti\", \"Pagliai\", \"Pagni\", \"Pagnini\", \"Paladini\", \"Palagi\", \"Palchetti\", \"Palloni\", \"Palmieri\", \"Palumbo\", \"Pampaloni\", \"Pancani\", \"Pandolfi\", \"Pandolfini\", \"Panerai\", \"Panichi\", \"Paoletti\", \"Paoli\", \"Paolini\", \"Papi\", \"Papini\", \"Papucci\", \"Parenti\", \"Parigi\", \"Parisi\", \"Parri\", \"Parrini\", \"Pasquini\", \"Passeri\", \"Pecchioli\", \"Pecorini\", \"Pellegrini\", \"Pepi\", \"Perini\", \"Perrone\", \"Peruzzi\", \"Pesci\", \"Pestelli\", \"Petri\", \"Petrini\", \"Petrucci\", \"Pettini\", \"Pezzati\", \"Pezzatini\", \"Piani\", \"Piazza\", \"Piazzesi\", \"Piazzini\", \"Piccardi\", \"Picchi\", \"Piccini\", \"Piccioli\", \"Pieraccini\", \"Pieraccioni\", \"Pieralli\", \"Pierattini\", \"Pieri\", \"Pierini\", \"Pieroni\", \"Pietrini\", \"Pini\", \"Pinna\", \"Pinto\", \"Pinzani\", \"Pinzauti\", \"Piras\", \"Pisani\", \"Pistolesi\", \"Poggesi\", \"Poggi\", \"Poggiali\", \"Poggiolini\", \"Poli\", \"Pollastri\", \"Porciani\", \"Pozzi\", \"Pratellesi\", \"Pratesi\", \"Prosperi\", \"Pruneti\", \"Pucci\", \"Puccini\", \"Puccioni\", \"Pugi\", \"Pugliese\", \"Puliti\", \"Querci\", \"Quercioli\", \"Raddi\", \"Radu\", \"Raffaelli\", \"Ragazzini\", \"Ranfagni\", \"Ranieri\", \"Rastrelli\", \"Raugei\", \"Raveggi\", \"Renai\", \"Renzi\", \"Rettori\", \"Ricci\", \"Ricciardi\", \"Ridi\", \"Ridolfi\", \"Rigacci\", \"Righi\", \"Righini\", \"Rinaldi\", \"Risaliti\", \"Ristori\", \"Rizzo\", \"Rocchi\", \"Rocchini\", \"Rogai\", \"Romagnoli\", \"Romanelli\", \"Romani\", \"Romano\", \"Romei\", \"Romeo\", \"Romiti\", \"Romoli\", \"Romolini\", \"Rontini\", \"Rosati\", \"Roselli\", \"Rosi\", \"Rossetti\", \"Rossi\", \"Rossini\", \"Rovai\", \"Ruggeri\", \"Ruggiero\", \"Russo\", \"Sabatini\", \"Saccardi\", \"Sacchetti\", \"Sacchi\", \"Sacco\", \"Salerno\", \"Salimbeni\", \"Salucci\", \"Salvadori\", \"Salvestrini\", \"Salvi\", \"Salvini\", \"Sanesi\", \"Sani\", \"Sanna\", \"Santi\", \"Santini\", \"Santoni\", \"Santoro\", \"Santucci\", \"Sardi\", \"Sarri\", \"Sarti\", \"Sassi\", \"Sbolci\", \"Scali\", \"Scarpelli\", \"Scarselli\", \"Scopetani\", \"Secci\", \"Selvi\", \"Senatori\", \"Senesi\", \"Serafini\", \"Sereni\", \"Serra\", \"Sestini\", \"Sguanci\", \"Sieni\", \"Signorini\", \"Silvestri\", \"Simoncini\", \"Simonetti\", \"Simoni\", \"Singh\", \"Sodi\", \"Soldi\", \"Somigli\", \"Sorbi\", \"Sorelli\", \"Sorrentino\", \"Sottili\", \"Spina\", \"Spinelli\", \"Staccioli\", \"Staderini\", \"Stefanelli\", \"Stefani\", \"Stefanini\", \"Stella\", \"Susini\", \"Tacchi\", \"Tacconi\", \"Taddei\", \"Tagliaferri\", \"Tamburini\", \"Tanganelli\", \"Tani\", \"Tanini\", \"Tapinassi\", \"Tarchi\", \"Tarchiani\", \"Targioni\", \"Tassi\", \"Tassini\", \"Tempesti\", \"Terzani\", \"Tesi\", \"Testa\", \"Testi\", \"Tilli\", \"Tinti\", \"Tirinnanzi\", \"Toccafondi\", \"Tofanari\", \"Tofani\", \"Tognaccini\", \"Tonelli\", \"Tonini\", \"Torelli\", \"Torrini\", \"Tosi\", \"Toti\", \"Tozzi\", \"Trambusti\", \"Trapani\", \"Tucci\", \"Turchi\", \"Ugolini\", \"Ulivi\", \"Valente\", \"Valenti\", \"Valentini\", \"Vangelisti\", \"Vanni\", \"Vannini\", \"Vannoni\", \"Vannozzi\", \"Vannucchi\", \"Vannucci\", \"Ventura\", \"Venturi\", \"Venturini\", \"Vestri\", \"Vettori\", \"Vichi\", \"Viciani\", \"Vieri\", \"Vigiani\", \"Vignoli\", \"Vignolini\", \"Vignozzi\", \"Villani\", \"Vinci\", \"Visani\", \"Vitale\", \"Vitali\", \"Viti\", \"Viviani\", \"Vivoli\", \"Volpe\", \"Volpi\", \"Wang\", \"Wu\", \"Xu\", \"Yang\", \"Ye\", \"Zagli\", \"Zani\", \"Zanieri\", \"Zanobini\", \"Zecchi\", \"Zetti\", \"Zhang\", \"Zheng\", \"Zhou\", \"Zhu\", \"Zingoni\", \"Zini\", \"Zoppi\"],\n // http://www.voornamelijk.nl/meest-voorkomende-achternamen-in-nederland-en-amsterdam/\n \"nl\":[\"Albers\", \"Alblas\", \"Appelman\", \"Baars\", \"Baas\", \"Bakker\", \"Blank\", \"Bleeker\", \"Blok\", \"Blom\", \"Boer\", \"Boers\", \"Boldewijn\", \"Boon\", \"Boot\", \"Bos\", \"Bosch\", \"Bosma\", \"Bosman\", \"Bouma\", \"Bouman\", \"Bouwman\", \"Brands\", \"Brouwer\", \"Burger\", \"Buijs\", \"Buitenhuis\", \"Ceder\", \"Cohen\", \"Dekker\", \"Dekkers\", \"Dijkman\", \"Dijkstra\", \"Driessen\", \"Drost\", \"Engel\", \"Evers\", \"Faber\", \"Franke\", \"Gerritsen\", \"Goedhart\", \"Goossens\", \"Groen\", \"Groenenberg\", \"Groot\", \"Haan\", \"Hart\", \"Heemskerk\", \"Hendriks\", \"Hermans\", \"Hoekstra\", \"Hofman\", \"Hopman\", \"Huisman\", \"Jacobs\", \"Jansen\", \"Janssen\", \"Jonker\", \"Jaspers\", \"Keijzer\", \"Klaassen\", \"Klein\", \"Koek\", \"Koenders\", \"Kok\", \"Kool\", \"Koopman\", \"Koopmans\", \"Koning\", \"Koster\", \"Kramer\", \"Kroon\", \"Kuijpers\", \"Kuiper\", \"Kuipers\", \"Kurt\", \"Koster\", \"Kwakman\", \"Los\", \"Lubbers\", \"Maas\", \"Markus\", \"Martens\", \"Meijer\", \"Mol\", \"Molenaar\", \"Mulder\", \"Nieuwenhuis\", \"Peeters\", \"Peters\", \"Pengel\", \"Pieters\", \"Pool\", \"Post\", \"Postma\", \"Prins\", \"Pronk\", \"Reijnders\", \"Rietveld\", \"Roest\", \"Roos\", \"Sanders\", \"Schaap\", \"Scheffer\", \"Schenk\", \"Schilder\", \"Schipper\", \"Schmidt\", \"Scholten\", \"Schouten\", \"Schut\", \"Schutte\", \"Schuurman\", \"Simons\", \"Smeets\", \"Smit\", \"Smits\", \"Snel\", \"Swinkels\", \"Tas\", \"Terpstra\", \"Timmermans\", \"Tol\", \"Tromp\", \"Troost\", \"Valk\", \"Veenstra\", \"Veldkamp\", \"Verbeek\", \"Verheul\", \"Verhoeven\", \"Vermeer\", \"Vermeulen\", \"Verweij\", \"Vink\", \"Visser\", \"Voorn\", \"Vos\", \"Wagenaar\", \"Wiersema\", \"Willems\", \"Willemsen\", \"Witteveen\", \"Wolff\", \"Wolters\", \"Zijlstra\", \"Zwart\", \"de Beer\", \"de Boer\", \"de Bruijn\", \"de Bruin\", \"de Graaf\", \"de Groot\", \"de Haan\", \"de Haas\", \"de Jager\", \"de Jong\", \"de Jonge\", \"de Koning\", \"de Lange\", \"de Leeuw\", \"de Ridder\", \"de Rooij\", \"de Ruiter\", \"de Vos\", \"de Vries\", \"de Waal\", \"de Wit\", \"de Zwart\", \"van Beek\", \"van Boven\", \"van Dam\", \"van Dijk\", \"van Dongen\", \"van Doorn\", \"van Egmond\", \"van Eijk\", \"van Es\", \"van Gelder\", \"van Gelderen\", \"van Houten\", \"van Hulst\", \"van Kempen\", \"van Kesteren\", \"van Leeuwen\", \"van Loon\", \"van Mill\", \"van Noord\", \"van Ommen\", \"van Ommeren\", \"van Oosten\", \"van Oostveen\", \"van Rijn\", \"van Schaik\", \"van Veen\", \"van Vliet\", \"van Wijk\", \"van Wijngaarden\", \"van den Poel\", \"van de Pol\", \"van den Ploeg\", \"van de Ven\", \"van den Berg\", \"van den Bosch\", \"van den Brink\", \"van den Broek\", \"van den Heuvel\", \"van der Heijden\", \"van der Horst\", \"van der Hulst\", \"van der Kroon\", \"van der Laan\", \"van der Linden\", \"van der Meer\", \"van der Meij\", \"van der Meulen\", \"van der Molen\", \"van der Sluis\", \"van der Spek\", \"van der Veen\", \"van der Velde\", \"van der Velden\", \"van der Vliet\", \"van der Wal\"],\n // https://surnames.behindthename.com/top/lists/england-wales/1991\n \"uk\":[\"Smith\",\"Jones\",\"Williams\",\"Taylor\",\"Brown\",\"Davies\",\"Evans\",\"Wilson\",\"Thomas\",\"Johnson\",\"Roberts\",\"Robinson\",\"Thompson\",\"Wright\",\"Walker\",\"White\",\"Edwards\",\"Hughes\",\"Green\",\"Hall\",\"Lewis\",\"Harris\",\"Clarke\",\"Patel\",\"Jackson\",\"Wood\",\"Turner\",\"Martin\",\"Cooper\",\"Hill\",\"Ward\",\"Morris\",\"Moore\",\"Clark\",\"Lee\",\"King\",\"Baker\",\"Harrison\",\"Morgan\",\"Allen\",\"James\",\"Scott\",\"Phillips\",\"Watson\",\"Davis\",\"Parker\",\"Price\",\"Bennett\",\"Young\",\"Griffiths\",\"Mitchell\",\"Kelly\",\"Cook\",\"Carter\",\"Richardson\",\"Bailey\",\"Collins\",\"Bell\",\"Shaw\",\"Murphy\",\"Miller\",\"Cox\",\"Richards\",\"Khan\",\"Marshall\",\"Anderson\",\"Simpson\",\"Ellis\",\"Adams\",\"Singh\",\"Begum\",\"Wilkinson\",\"Foster\",\"Chapman\",\"Powell\",\"Webb\",\"Rogers\",\"Gray\",\"Mason\",\"Ali\",\"Hunt\",\"Hussain\",\"Campbell\",\"Matthews\",\"Owen\",\"Palmer\",\"Holmes\",\"Mills\",\"Barnes\",\"Knight\",\"Lloyd\",\"Butler\",\"Russell\",\"Barker\",\"Fisher\",\"Stevens\",\"Jenkins\",\"Murray\",\"Dixon\",\"Harvey\",\"Graham\",\"Pearson\",\"Ahmed\",\"Fletcher\",\"Walsh\",\"Kaur\",\"Gibson\",\"Howard\",\"Andrews\",\"Stewart\",\"Elliott\",\"Reynolds\",\"Saunders\",\"Payne\",\"Fox\",\"Ford\",\"Pearce\",\"Day\",\"Brooks\",\"West\",\"Lawrence\",\"Cole\",\"Atkinson\",\"Bradley\",\"Spencer\",\"Gill\",\"Dawson\",\"Ball\",\"Burton\",\"O'brien\",\"Watts\",\"Rose\",\"Booth\",\"Perry\",\"Ryan\",\"Grant\",\"Wells\",\"Armstrong\",\"Francis\",\"Rees\",\"Hayes\",\"Hart\",\"Hudson\",\"Newman\",\"Barrett\",\"Webster\",\"Hunter\",\"Gregory\",\"Carr\",\"Lowe\",\"Page\",\"Marsh\",\"Riley\",\"Dunn\",\"Woods\",\"Parsons\",\"Berry\",\"Stone\",\"Reid\",\"Holland\",\"Hawkins\",\"Harding\",\"Porter\",\"Robertson\",\"Newton\",\"Oliver\",\"Reed\",\"Kennedy\",\"Williamson\",\"Bird\",\"Gardner\",\"Shah\",\"Dean\",\"Lane\",\"Cooke\",\"Bates\",\"Henderson\",\"Parry\",\"Burgess\",\"Bishop\",\"Walton\",\"Burns\",\"Nicholson\",\"Shepherd\",\"Ross\",\"Cross\",\"Long\",\"Freeman\",\"Warren\",\"Nicholls\",\"Hamilton\",\"Byrne\",\"Sutton\",\"Mcdonald\",\"Yates\",\"Hodgson\",\"Robson\",\"Curtis\",\"Hopkins\",\"O'connor\",\"Harper\",\"Coleman\",\"Watkins\",\"Moss\",\"Mccarthy\",\"Chambers\",\"O'neill\",\"Griffin\",\"Sharp\",\"Hardy\",\"Wheeler\",\"Potter\",\"Osborne\",\"Johnston\",\"Gordon\",\"Doyle\",\"Wallace\",\"George\",\"Jordan\",\"Hutchinson\",\"Rowe\",\"Burke\",\"May\",\"Pritchard\",\"Gilbert\",\"Willis\",\"Higgins\",\"Read\",\"Miles\",\"Stevenson\",\"Stephenson\",\"Hammond\",\"Arnold\",\"Buckley\",\"Walters\",\"Hewitt\",\"Barber\",\"Nelson\",\"Slater\",\"Austin\",\"Sullivan\",\"Whitehead\",\"Mann\",\"Frost\",\"Lambert\",\"Stephens\",\"Blake\",\"Akhtar\",\"Lynch\",\"Goodwin\",\"Barton\",\"Woodward\",\"Thomson\",\"Cunningham\",\"Quinn\",\"Barnett\",\"Baxter\",\"Bibi\",\"Clayton\",\"Nash\",\"Greenwood\",\"Jennings\",\"Holt\",\"Kemp\",\"Poole\",\"Gallagher\",\"Bond\",\"Stokes\",\"Tucker\",\"Davidson\",\"Fowler\",\"Heath\",\"Norman\",\"Middleton\",\"Lawson\",\"Banks\",\"French\",\"Stanley\",\"Jarvis\",\"Gibbs\",\"Ferguson\",\"Hayward\",\"Carroll\",\"Douglas\",\"Dickinson\",\"Todd\",\"Barlow\",\"Peters\",\"Lucas\",\"Knowles\",\"Hartley\",\"Miah\",\"Simmons\",\"Morton\",\"Alexander\",\"Field\",\"Morrison\",\"Norris\",\"Townsend\",\"Preston\",\"Hancock\",\"Thornton\",\"Baldwin\",\"Burrows\",\"Briggs\",\"Parkinson\",\"Reeves\",\"Macdonald\",\"Lamb\",\"Black\",\"Abbott\",\"Sanders\",\"Thorpe\",\"Holden\",\"Tomlinson\",\"Perkins\",\"Ashton\",\"Rhodes\",\"Fuller\",\"Howe\",\"Bryant\",\"Vaughan\",\"Dale\",\"Davey\",\"Weston\",\"Bartlett\",\"Whittaker\",\"Davison\",\"Kent\",\"Skinner\",\"Birch\",\"Morley\",\"Daniels\",\"Glover\",\"Howell\",\"Cartwright\",\"Pugh\",\"Humphreys\",\"Goddard\",\"Brennan\",\"Wall\",\"Kirby\",\"Bowen\",\"Savage\",\"Bull\",\"Wong\",\"Dobson\",\"Smart\",\"Wilkins\",\"Kirk\",\"Fraser\",\"Duffy\",\"Hicks\",\"Patterson\",\"Bradshaw\",\"Little\",\"Archer\",\"Warner\",\"Waters\",\"O'sullivan\",\"Farrell\",\"Brookes\",\"Atkins\",\"Kay\",\"Dodd\",\"Bentley\",\"Flynn\",\"John\",\"Schofield\",\"Short\",\"Haynes\",\"Wade\",\"Butcher\",\"Henry\",\"Sanderson\",\"Crawford\",\"Sheppard\",\"Bolton\",\"Coates\",\"Giles\",\"Gould\",\"Houghton\",\"Gibbons\",\"Pratt\",\"Manning\",\"Law\",\"Hooper\",\"Noble\",\"Dyer\",\"Rahman\",\"Clements\",\"Moran\",\"Sykes\",\"Chan\",\"Doherty\",\"Connolly\",\"Joyce\",\"Franklin\",\"Hobbs\",\"Coles\",\"Herbert\",\"Steele\",\"Kerr\",\"Leach\",\"Winter\",\"Owens\",\"Duncan\",\"Naylor\",\"Fleming\",\"Horton\",\"Finch\",\"Fitzgerald\",\"Randall\",\"Carpenter\",\"Marsden\",\"Browne\",\"Garner\",\"Pickering\",\"Hale\",\"Dennis\",\"Vincent\",\"Chadwick\",\"Chandler\",\"Sharpe\",\"Nolan\",\"Lyons\",\"Hurst\",\"Collier\",\"Peacock\",\"Howarth\",\"Faulkner\",\"Rice\",\"Pollard\",\"Welch\",\"Norton\",\"Gough\",\"Sinclair\",\"Blackburn\",\"Bryan\",\"Conway\",\"Power\",\"Cameron\",\"Daly\",\"Allan\",\"Hanson\",\"Gardiner\",\"Boyle\",\"Myers\",\"Turnbull\",\"Wallis\",\"Mahmood\",\"Sims\",\"Swift\",\"Iqbal\",\"Pope\",\"Brady\",\"Chamberlain\",\"Rowley\",\"Tyler\",\"Farmer\",\"Metcalfe\",\"Hilton\",\"Godfrey\",\"Holloway\",\"Parkin\",\"Bray\",\"Talbot\",\"Donnelly\",\"Nixon\",\"Charlton\",\"Benson\",\"Whitehouse\",\"Barry\",\"Hope\",\"Lord\",\"North\",\"Storey\",\"Connor\",\"Potts\",\"Bevan\",\"Hargreaves\",\"Mclean\",\"Mistry\",\"Bruce\",\"Howells\",\"Hyde\",\"Parkes\",\"Wyatt\",\"Fry\",\"Lees\",\"O'donnell\",\"Craig\",\"Forster\",\"Mckenzie\",\"Humphries\",\"Mellor\",\"Carey\",\"Ingram\",\"Summers\",\"Leonard\"],\n // https://surnames.behindthename.com/top/lists/germany/2017\n \"de\": [\"Müller\",\"Schmidt\",\"Schneider\",\"Fischer\",\"Weber\",\"Meyer\",\"Wagner\",\"Becker\",\"Schulz\",\"Hoffmann\",\"Schäfer\",\"Koch\",\"Bauer\",\"Richter\",\"Klein\",\"Wolf\",\"Schröder\",\"Neumann\",\"Schwarz\",\"Zimmermann\",\"Braun\",\"Krüger\",\"Hofmann\",\"Hartmann\",\"Lange\",\"Schmitt\",\"Werner\",\"Schmitz\",\"Krause\",\"Meier\",\"Lehmann\",\"Schmid\",\"Schulze\",\"Maier\",\"Köhler\",\"Herrmann\",\"König\",\"Walter\",\"Mayer\",\"Huber\",\"Kaiser\",\"Fuchs\",\"Peters\",\"Lang\",\"Scholz\",\"Möller\",\"Weiß\",\"Jung\",\"Hahn\",\"Schubert\",\"Vogel\",\"Friedrich\",\"Keller\",\"Günther\",\"Frank\",\"Berger\",\"Winkler\",\"Roth\",\"Beck\",\"Lorenz\",\"Baumann\",\"Franke\",\"Albrecht\",\"Schuster\",\"Simon\",\"Ludwig\",\"Böhm\",\"Winter\",\"Kraus\",\"Martin\",\"Schumacher\",\"Krämer\",\"Vogt\",\"Stein\",\"Jäger\",\"Otto\",\"Sommer\",\"Groß\",\"Seidel\",\"Heinrich\",\"Brandt\",\"Haas\",\"Schreiber\",\"Graf\",\"Schulte\",\"Dietrich\",\"Ziegler\",\"Kuhn\",\"Kühn\",\"Pohl\",\"Engel\",\"Horn\",\"Busch\",\"Bergmann\",\"Thomas\",\"Voigt\",\"Sauer\",\"Arnold\",\"Wolff\",\"Pfeiffer\"],\n // http://www.japantimes.co.jp/life/2009/10/11/lifestyle/japans-top-100-most-common-family-names/\n \"jp\": [\"Sato\",\"Suzuki\",\"Takahashi\",\"Tanaka\",\"Watanabe\",\"Ito\",\"Yamamoto\",\"Nakamura\",\"Kobayashi\",\"Kato\",\"Yoshida\",\"Yamada\",\"Sasaki\",\"Yamaguchi\",\"Saito\",\"Matsumoto\",\"Inoue\",\"Kimura\",\"Hayashi\",\"Shimizu\",\"Yamazaki\",\"Mori\",\"Abe\",\"Ikeda\",\"Hashimoto\",\"Yamashita\",\"Ishikawa\",\"Nakajima\",\"Maeda\",\"Fujita\",\"Ogawa\",\"Goto\",\"Okada\",\"Hasegawa\",\"Murakami\",\"Kondo\",\"Ishii\",\"Saito\",\"Sakamoto\",\"Endo\",\"Aoki\",\"Fujii\",\"Nishimura\",\"Fukuda\",\"Ota\",\"Miura\",\"Fujiwara\",\"Okamoto\",\"Matsuda\",\"Nakagawa\",\"Nakano\",\"Harada\",\"Ono\",\"Tamura\",\"Takeuchi\",\"Kaneko\",\"Wada\",\"Nakayama\",\"Ishida\",\"Ueda\",\"Morita\",\"Hara\",\"Shibata\",\"Sakai\",\"Kudo\",\"Yokoyama\",\"Miyazaki\",\"Miyamoto\",\"Uchida\",\"Takagi\",\"Ando\",\"Taniguchi\",\"Ohno\",\"Maruyama\",\"Imai\",\"Takada\",\"Fujimoto\",\"Takeda\",\"Murata\",\"Ueno\",\"Sugiyama\",\"Masuda\",\"Sugawara\",\"Hirano\",\"Kojima\",\"Otsuka\",\"Chiba\",\"Kubo\",\"Matsui\",\"Iwasaki\",\"Sakurai\",\"Kinoshita\",\"Noguchi\",\"Matsuo\",\"Nomura\",\"Kikuchi\",\"Sano\",\"Onishi\",\"Sugimoto\",\"Arai\"],\n // http://www.lowchensaustralia.com/names/popular-spanish-names.htm\n \"es\": [\"Garcia\",\"Fernandez\",\"Lopez\",\"Martinez\",\"Gonzalez\",\"Rodriguez\",\"Sanchez\",\"Perez\",\"Martin\",\"Gomez\",\"Ruiz\",\"Diaz\",\"Hernandez\",\"Alvarez\",\"Jimenez\",\"Moreno\",\"Munoz\",\"Alonso\",\"Romero\",\"Navarro\",\"Gutierrez\",\"Torres\",\"Dominguez\",\"Gil\",\"Vazquez\",\"Blanco\",\"Serrano\",\"Ramos\",\"Castro\",\"Suarez\",\"Sanz\",\"Rubio\",\"Ortega\",\"Molina\",\"Delgado\",\"Ortiz\",\"Morales\",\"Ramirez\",\"Marin\",\"Iglesias\",\"Santos\",\"Castillo\",\"Garrido\",\"Calvo\",\"Pena\",\"Cruz\",\"Cano\",\"Nunez\",\"Prieto\",\"Diez\",\"Lozano\",\"Vidal\",\"Pascual\",\"Ferrer\",\"Medina\",\"Vega\",\"Leon\",\"Herrero\",\"Vicente\",\"Mendez\",\"Guerrero\",\"Fuentes\",\"Campos\",\"Nieto\",\"Cortes\",\"Caballero\",\"Ibanez\",\"Lorenzo\",\"Pastor\",\"Gimenez\",\"Saez\",\"Soler\",\"Marquez\",\"Carrasco\",\"Herrera\",\"Montero\",\"Arias\",\"Crespo\",\"Flores\",\"Andres\",\"Aguilar\",\"Hidalgo\",\"Cabrera\",\"Mora\",\"Duran\",\"Velasco\",\"Rey\",\"Pardo\",\"Roman\",\"Vila\",\"Bravo\",\"Merino\",\"Moya\",\"Soto\",\"Izquierdo\",\"Reyes\",\"Redondo\",\"Marcos\",\"Carmona\",\"Menendez\"],\n // Data taken from https://fr.wikipedia.org/wiki/Liste_des_noms_de_famille_les_plus_courants_en_France\n \"fr\": [\"Martin\",\"Bernard\",\"Thomas\",\"Petit\",\"Robert\",\"Richard\",\"Durand\",\"Dubois\",\"Moreau\",\"Laurent\",\"Simon\",\"Michel\",\"Lefèvre\",\"Leroy\",\"Roux\",\"David\",\"Bertrand\",\"Morel\",\"Fournier\",\"Girard\",\"Bonnet\",\"Dupont\",\"Lambert\",\"Fontaine\",\"Rousseau\",\"Vincent\",\"Müller\",\"Lefèvre\",\"Faure\",\"André\",\"Mercier\",\"Blanc\",\"Guérin\",\"Boyer\",\"Garnier\",\"Chevalier\",\"François\",\"Legrand\",\"Gauthier\",\"Garcia\",\"Perrin\",\"Robin\",\"Clément\",\"Morin\",\"Nicolas\",\"Henry\",\"Roussel\",\"Matthieu\",\"Gautier\",\"Masson\",\"Marchand\",\"Duval\",\"Denis\",\"Dumont\",\"Marie\",\"Lemaire\",\"Noël\",\"Meyer\",\"Dufour\",\"Meunier\",\"Brun\",\"Blanchard\",\"Giraud\",\"Joly\",\"Rivière\",\"Lucas\",\"Brunet\",\"Gaillard\",\"Barbier\",\"Arnaud\",\"Martínez\",\"Gérard\",\"Roche\",\"Renard\",\"Schmitt\",\"Roy\",\"Leroux\",\"Colin\",\"Vidal\",\"Caron\",\"Picard\",\"Roger\",\"Fabre\",\"Aubert\",\"Lemoine\",\"Renaud\",\"Dumas\",\"Lacroix\",\"Olivier\",\"Philippe\",\"Bourgeois\",\"Pierre\",\"Benoît\",\"Rey\",\"Leclerc\",\"Payet\",\"Rolland\",\"Leclercq\",\"Guillaume\",\"Lecomte\",\"López\",\"Jean\",\"Dupuy\",\"Guillot\",\"Hubert\",\"Berger\",\"Carpentier\",\"Sánchez\",\"Dupuis\",\"Moulin\",\"Louis\",\"Deschamps\",\"Huet\",\"Vasseur\",\"Perez\",\"Boucher\",\"Fleury\",\"Royer\",\"Klein\",\"Jacquet\",\"Adam\",\"Paris\",\"Poirier\",\"Marty\",\"Aubry\",\"Guyot\",\"Carré\",\"Charles\",\"Renault\",\"Charpentier\",\"Ménard\",\"Maillard\",\"Baron\",\"Bertin\",\"Bailly\",\"Hervé\",\"Schneider\",\"Fernández\",\"Le GallGall\",\"Collet\",\"Léger\",\"Bouvier\",\"Julien\",\"Prévost\",\"Millet\",\"Perrot\",\"Daniel\",\"Le RouxRoux\",\"Cousin\",\"Germain\",\"Breton\",\"Besson\",\"Langlois\",\"Rémi\",\"Le GoffGoff\",\"Pelletier\",\"Lévêque\",\"Perrier\",\"Leblanc\",\"Barré\",\"Lebrun\",\"Marchal\",\"Weber\",\"Mallet\",\"Hamon\",\"Boulanger\",\"Jacob\",\"Monnier\",\"Michaud\",\"Rodríguez\",\"Guichard\",\"Gillet\",\"Étienne\",\"Grondin\",\"Poulain\",\"Tessier\",\"Chevallier\",\"Collin\",\"Chauvin\",\"Da SilvaSilva\",\"Bouchet\",\"Gay\",\"Lemaître\",\"Bénard\",\"Maréchal\",\"Humbert\",\"Reynaud\",\"Antoine\",\"Hoarau\",\"Perret\",\"Barthélemy\",\"Cordier\",\"Pichon\",\"Lejeune\",\"Gilbert\",\"Lamy\",\"Delaunay\",\"Pasquier\",\"Carlier\",\"LaporteLaporte\"]\n },\n\n // Data taken from http://geoportal.statistics.gov.uk/datasets/ons-postcode-directory-latest-centroids\n postcodeAreas: [{code: 'AB'}, {code: 'AL'}, {code: 'B'}, {code: 'BA'}, {code: 'BB'}, {code: 'BD'}, {code: 'BH'}, {code: 'BL'}, {code: 'BN'}, {code: 'BR'}, {code: 'BS'}, {code: 'BT'}, {code: 'CA'}, {code: 'CB'}, {code: 'CF'}, {code: 'CH'}, {code: 'CM'}, {code: 'CO'}, {code: 'CR'}, {code: 'CT'}, {code: 'CV'}, {code: 'CW'}, {code: 'DA'}, {code: 'DD'}, {code: 'DE'}, {code: 'DG'}, {code: 'DH'}, {code: 'DL'}, {code: 'DN'}, {code: 'DT'}, {code: 'DY'}, {code: 'E'}, {code: 'EC'}, {code: 'EH'}, {code: 'EN'}, {code: 'EX'}, {code: 'FK'}, {code: 'FY'}, {code: 'G'}, {code: 'GL'}, {code: 'GU'}, {code: 'GY'}, {code: 'HA'}, {code: 'HD'}, {code: 'HG'}, {code: 'HP'}, {code: 'HR'}, {code: 'HS'}, {code: 'HU'}, {code: 'HX'}, {code: 'IG'}, {code: 'IM'}, {code: 'IP'}, {code: 'IV'}, {code: 'JE'}, {code: 'KA'}, {code: 'KT'}, {code: 'KW'}, {code: 'KY'}, {code: 'L'}, {code: 'LA'}, {code: 'LD'}, {code: 'LE'}, {code: 'LL'}, {code: 'LN'}, {code: 'LS'}, {code: 'LU'}, {code: 'M'}, {code: 'ME'}, {code: 'MK'}, {code: 'ML'}, {code: 'N'}, {code: 'NE'}, {code: 'NG'}, {code: 'NN'}, {code: 'NP'}, {code: 'NR'}, {code: 'NW'}, {code: 'OL'}, {code: 'OX'}, {code: 'PA'}, {code: 'PE'}, {code: 'PH'}, {code: 'PL'}, {code: 'PO'}, {code: 'PR'}, {code: 'RG'}, {code: 'RH'}, {code: 'RM'}, {code: 'S'}, {code: 'SA'}, {code: 'SE'}, {code: 'SG'}, {code: 'SK'}, {code: 'SL'}, {code: 'SM'}, {code: 'SN'}, {code: 'SO'}, {code: 'SP'}, {code: 'SR'}, {code: 'SS'}, {code: 'ST'}, {code: 'SW'}, {code: 'SY'}, {code: 'TA'}, {code: 'TD'}, {code: 'TF'}, {code: 'TN'}, {code: 'TQ'}, {code: 'TR'}, {code: 'TS'}, {code: 'TW'}, {code: 'UB'}, {code: 'W'}, {code: 'WA'}, {code: 'WC'}, {code: 'WD'}, {code: 'WF'}, {code: 'WN'}, {code: 'WR'}, {code: 'WS'}, {code: 'WV'}, {code: 'YO'}, {code: 'ZE'}],\n\n // Data taken from https://github.com/umpirsky/country-list/blob/master/data/en_US/country.json\n countries: [{\"name\":\"Afghanistan\",\"abbreviation\":\"AF\"},{\"name\":\"Åland Islands\",\"abbreviation\":\"AX\"},{\"name\":\"Albania\",\"abbreviation\":\"AL\"},{\"name\":\"Algeria\",\"abbreviation\":\"DZ\"},{\"name\":\"American Samoa\",\"abbreviation\":\"AS\"},{\"name\":\"Andorra\",\"abbreviation\":\"AD\"},{\"name\":\"Angola\",\"abbreviation\":\"AO\"},{\"name\":\"Anguilla\",\"abbreviation\":\"AI\"},{\"name\":\"Antarctica\",\"abbreviation\":\"AQ\"},{\"name\":\"Antigua & Barbuda\",\"abbreviation\":\"AG\"},{\"name\":\"Argentina\",\"abbreviation\":\"AR\"},{\"name\":\"Armenia\",\"abbreviation\":\"AM\"},{\"name\":\"Aruba\",\"abbreviation\":\"AW\"},{\"name\":\"Ascension Island\",\"abbreviation\":\"AC\"},{\"name\":\"Australia\",\"abbreviation\":\"AU\"},{\"name\":\"Austria\",\"abbreviation\":\"AT\"},{\"name\":\"Azerbaijan\",\"abbreviation\":\"AZ\"},{\"name\":\"Bahamas\",\"abbreviation\":\"BS\"},{\"name\":\"Bahrain\",\"abbreviation\":\"BH\"},{\"name\":\"Bangladesh\",\"abbreviation\":\"BD\"},{\"name\":\"Barbados\",\"abbreviation\":\"BB\"},{\"name\":\"Belarus\",\"abbreviation\":\"BY\"},{\"name\":\"Belgium\",\"abbreviation\":\"BE\"},{\"name\":\"Belize\",\"abbreviation\":\"BZ\"},{\"name\":\"Benin\",\"abbreviation\":\"BJ\"},{\"name\":\"Bermuda\",\"abbreviation\":\"BM\"},{\"name\":\"Bhutan\",\"abbreviation\":\"BT\"},{\"name\":\"Bolivia\",\"abbreviation\":\"BO\"},{\"name\":\"Bosnia & Herzegovina\",\"abbreviation\":\"BA\"},{\"name\":\"Botswana\",\"abbreviation\":\"BW\"},{\"name\":\"Brazil\",\"abbreviation\":\"BR\"},{\"name\":\"British Indian Ocean Territory\",\"abbreviation\":\"IO\"},{\"name\":\"British Virgin Islands\",\"abbreviation\":\"VG\"},{\"name\":\"Brunei\",\"abbreviation\":\"BN\"},{\"name\":\"Bulgaria\",\"abbreviation\":\"BG\"},{\"name\":\"Burkina Faso\",\"abbreviation\":\"BF\"},{\"name\":\"Burundi\",\"abbreviation\":\"BI\"},{\"name\":\"Cambodia\",\"abbreviation\":\"KH\"},{\"name\":\"Cameroon\",\"abbreviation\":\"CM\"},{\"name\":\"Canada\",\"abbreviation\":\"CA\"},{\"name\":\"Canary Islands\",\"abbreviation\":\"IC\"},{\"name\":\"Cape Verde\",\"abbreviation\":\"CV\"},{\"name\":\"Caribbean Netherlands\",\"abbreviation\":\"BQ\"},{\"name\":\"Cayman Islands\",\"abbreviation\":\"KY\"},{\"name\":\"Central African Republic\",\"abbreviation\":\"CF\"},{\"name\":\"Ceuta & Melilla\",\"abbreviation\":\"EA\"},{\"name\":\"Chad\",\"abbreviation\":\"TD\"},{\"name\":\"Chile\",\"abbreviation\":\"CL\"},{\"name\":\"China\",\"abbreviation\":\"CN\"},{\"name\":\"Christmas Island\",\"abbreviation\":\"CX\"},{\"name\":\"Cocos (Keeling) Islands\",\"abbreviation\":\"CC\"},{\"name\":\"Colombia\",\"abbreviation\":\"CO\"},{\"name\":\"Comoros\",\"abbreviation\":\"KM\"},{\"name\":\"Congo - Brazzaville\",\"abbreviation\":\"CG\"},{\"name\":\"Congo - Kinshasa\",\"abbreviation\":\"CD\"},{\"name\":\"Cook Islands\",\"abbreviation\":\"CK\"},{\"name\":\"Costa Rica\",\"abbreviation\":\"CR\"},{\"name\":\"Côte d'Ivoire\",\"abbreviation\":\"CI\"},{\"name\":\"Croatia\",\"abbreviation\":\"HR\"},{\"name\":\"Cuba\",\"abbreviation\":\"CU\"},{\"name\":\"Curaçao\",\"abbreviation\":\"CW\"},{\"name\":\"Cyprus\",\"abbreviation\":\"CY\"},{\"name\":\"Czech Republic\",\"abbreviation\":\"CZ\"},{\"name\":\"Denmark\",\"abbreviation\":\"DK\"},{\"name\":\"Diego Garcia\",\"abbreviation\":\"DG\"},{\"name\":\"Djibouti\",\"abbreviation\":\"DJ\"},{\"name\":\"Dominica\",\"abbreviation\":\"DM\"},{\"name\":\"Dominican Republic\",\"abbreviation\":\"DO\"},{\"name\":\"Ecuador\",\"abbreviation\":\"EC\"},{\"name\":\"Egypt\",\"abbreviation\":\"EG\"},{\"name\":\"El Salvador\",\"abbreviation\":\"SV\"},{\"name\":\"Equatorial Guinea\",\"abbreviation\":\"GQ\"},{\"name\":\"Eritrea\",\"abbreviation\":\"ER\"},{\"name\":\"Estonia\",\"abbreviation\":\"EE\"},{\"name\":\"Ethiopia\",\"abbreviation\":\"ET\"},{\"name\":\"Falkland Islands\",\"abbreviation\":\"FK\"},{\"name\":\"Faroe Islands\",\"abbreviation\":\"FO\"},{\"name\":\"Fiji\",\"abbreviation\":\"FJ\"},{\"name\":\"Finland\",\"abbreviation\":\"FI\"},{\"name\":\"France\",\"abbreviation\":\"FR\"},{\"name\":\"French Guiana\",\"abbreviation\":\"GF\"},{\"name\":\"French Polynesia\",\"abbreviation\":\"PF\"},{\"name\":\"French Southern Territories\",\"abbreviation\":\"TF\"},{\"name\":\"Gabon\",\"abbreviation\":\"GA\"},{\"name\":\"Gambia\",\"abbreviation\":\"GM\"},{\"name\":\"Georgia\",\"abbreviation\":\"GE\"},{\"name\":\"Germany\",\"abbreviation\":\"DE\"},{\"name\":\"Ghana\",\"abbreviation\":\"GH\"},{\"name\":\"Gibraltar\",\"abbreviation\":\"GI\"},{\"name\":\"Greece\",\"abbreviation\":\"GR\"},{\"name\":\"Greenland\",\"abbreviation\":\"GL\"},{\"name\":\"Grenada\",\"abbreviation\":\"GD\"},{\"name\":\"Guadeloupe\",\"abbreviation\":\"GP\"},{\"name\":\"Guam\",\"abbreviation\":\"GU\"},{\"name\":\"Guatemala\",\"abbreviation\":\"GT\"},{\"name\":\"Guernsey\",\"abbreviation\":\"GG\"},{\"name\":\"Guinea\",\"abbreviation\":\"GN\"},{\"name\":\"Guinea-Bissau\",\"abbreviation\":\"GW\"},{\"name\":\"Guyana\",\"abbreviation\":\"GY\"},{\"name\":\"Haiti\",\"abbreviation\":\"HT\"},{\"name\":\"Honduras\",\"abbreviation\":\"HN\"},{\"name\":\"Hong Kong SAR China\",\"abbreviation\":\"HK\"},{\"name\":\"Hungary\",\"abbreviation\":\"HU\"},{\"name\":\"Iceland\",\"abbreviation\":\"IS\"},{\"name\":\"India\",\"abbreviation\":\"IN\"},{\"name\":\"Indonesia\",\"abbreviation\":\"ID\"},{\"name\":\"Iran\",\"abbreviation\":\"IR\"},{\"name\":\"Iraq\",\"abbreviation\":\"IQ\"},{\"name\":\"Ireland\",\"abbreviation\":\"IE\"},{\"name\":\"Isle of Man\",\"abbreviation\":\"IM\"},{\"name\":\"Israel\",\"abbreviation\":\"IL\"},{\"name\":\"Italy\",\"abbreviation\":\"IT\"},{\"name\":\"Jamaica\",\"abbreviation\":\"JM\"},{\"name\":\"Japan\",\"abbreviation\":\"JP\"},{\"name\":\"Jersey\",\"abbreviation\":\"JE\"},{\"name\":\"Jordan\",\"abbreviation\":\"JO\"},{\"name\":\"Kazakhstan\",\"abbreviation\":\"KZ\"},{\"name\":\"Kenya\",\"abbreviation\":\"KE\"},{\"name\":\"Kiribati\",\"abbreviation\":\"KI\"},{\"name\":\"Kosovo\",\"abbreviation\":\"XK\"},{\"name\":\"Kuwait\",\"abbreviation\":\"KW\"},{\"name\":\"Kyrgyzstan\",\"abbreviation\":\"KG\"},{\"name\":\"Laos\",\"abbreviation\":\"LA\"},{\"name\":\"Latvia\",\"abbreviation\":\"LV\"},{\"name\":\"Lebanon\",\"abbreviation\":\"LB\"},{\"name\":\"Lesotho\",\"abbreviation\":\"LS\"},{\"name\":\"Liberia\",\"abbreviation\":\"LR\"},{\"name\":\"Libya\",\"abbreviation\":\"LY\"},{\"name\":\"Liechtenstein\",\"abbreviation\":\"LI\"},{\"name\":\"Lithuania\",\"abbreviation\":\"LT\"},{\"name\":\"Luxembourg\",\"abbreviation\":\"LU\"},{\"name\":\"Macau SAR China\",\"abbreviation\":\"MO\"},{\"name\":\"Macedonia\",\"abbreviation\":\"MK\"},{\"name\":\"Madagascar\",\"abbreviation\":\"MG\"},{\"name\":\"Malawi\",\"abbreviation\":\"MW\"},{\"name\":\"Malaysia\",\"abbreviation\":\"MY\"},{\"name\":\"Maldives\",\"abbreviation\":\"MV\"},{\"name\":\"Mali\",\"abbreviation\":\"ML\"},{\"name\":\"Malta\",\"abbreviation\":\"MT\"},{\"name\":\"Marshall Islands\",\"abbreviation\":\"MH\"},{\"name\":\"Martinique\",\"abbreviation\":\"MQ\"},{\"name\":\"Mauritania\",\"abbreviation\":\"MR\"},{\"name\":\"Mauritius\",\"abbreviation\":\"MU\"},{\"name\":\"Mayotte\",\"abbreviation\":\"YT\"},{\"name\":\"Mexico\",\"abbreviation\":\"MX\"},{\"name\":\"Micronesia\",\"abbreviation\":\"FM\"},{\"name\":\"Moldova\",\"abbreviation\":\"MD\"},{\"name\":\"Monaco\",\"abbreviation\":\"MC\"},{\"name\":\"Mongolia\",\"abbreviation\":\"MN\"},{\"name\":\"Montenegro\",\"abbreviation\":\"ME\"},{\"name\":\"Montserrat\",\"abbreviation\":\"MS\"},{\"name\":\"Morocco\",\"abbreviation\":\"MA\"},{\"name\":\"Mozambique\",\"abbreviation\":\"MZ\"},{\"name\":\"Myanmar (Burma)\",\"abbreviation\":\"MM\"},{\"name\":\"Namibia\",\"abbreviation\":\"NA\"},{\"name\":\"Nauru\",\"abbreviation\":\"NR\"},{\"name\":\"Nepal\",\"abbreviation\":\"NP\"},{\"name\":\"Netherlands\",\"abbreviation\":\"NL\"},{\"name\":\"New Caledonia\",\"abbreviation\":\"NC\"},{\"name\":\"New Zealand\",\"abbreviation\":\"NZ\"},{\"name\":\"Nicaragua\",\"abbreviation\":\"NI\"},{\"name\":\"Niger\",\"abbreviation\":\"NE\"},{\"name\":\"Nigeria\",\"abbreviation\":\"NG\"},{\"name\":\"Niue\",\"abbreviation\":\"NU\"},{\"name\":\"Norfolk Island\",\"abbreviation\":\"NF\"},{\"name\":\"North Korea\",\"abbreviation\":\"KP\"},{\"name\":\"Northern Mariana Islands\",\"abbreviation\":\"MP\"},{\"name\":\"Norway\",\"abbreviation\":\"NO\"},{\"name\":\"Oman\",\"abbreviation\":\"OM\"},{\"name\":\"Pakistan\",\"abbreviation\":\"PK\"},{\"name\":\"Palau\",\"abbreviation\":\"PW\"},{\"name\":\"Palestinian Territories\",\"abbreviation\":\"PS\"},{\"name\":\"Panama\",\"abbreviation\":\"PA\"},{\"name\":\"Papua New Guinea\",\"abbreviation\":\"PG\"},{\"name\":\"Paraguay\",\"abbreviation\":\"PY\"},{\"name\":\"Peru\",\"abbreviation\":\"PE\"},{\"name\":\"Philippines\",\"abbreviation\":\"PH\"},{\"name\":\"Pitcairn Islands\",\"abbreviation\":\"PN\"},{\"name\":\"Poland\",\"abbreviation\":\"PL\"},{\"name\":\"Portugal\",\"abbreviation\":\"PT\"},{\"name\":\"Puerto Rico\",\"abbreviation\":\"PR\"},{\"name\":\"Qatar\",\"abbreviation\":\"QA\"},{\"name\":\"Réunion\",\"abbreviation\":\"RE\"},{\"name\":\"Romania\",\"abbreviation\":\"RO\"},{\"name\":\"Russia\",\"abbreviation\":\"RU\"},{\"name\":\"Rwanda\",\"abbreviation\":\"RW\"},{\"name\":\"Samoa\",\"abbreviation\":\"WS\"},{\"name\":\"San Marino\",\"abbreviation\":\"SM\"},{\"name\":\"São Tomé and Príncipe\",\"abbreviation\":\"ST\"},{\"name\":\"Saudi Arabia\",\"abbreviation\":\"SA\"},{\"name\":\"Senegal\",\"abbreviation\":\"SN\"},{\"name\":\"Serbia\",\"abbreviation\":\"RS\"},{\"name\":\"Seychelles\",\"abbreviation\":\"SC\"},{\"name\":\"Sierra Leone\",\"abbreviation\":\"SL\"},{\"name\":\"Singapore\",\"abbreviation\":\"SG\"},{\"name\":\"Sint Maarten\",\"abbreviation\":\"SX\"},{\"name\":\"Slovakia\",\"abbreviation\":\"SK\"},{\"name\":\"Slovenia\",\"abbreviation\":\"SI\"},{\"name\":\"Solomon Islands\",\"abbreviation\":\"SB\"},{\"name\":\"Somalia\",\"abbreviation\":\"SO\"},{\"name\":\"South Africa\",\"abbreviation\":\"ZA\"},{\"name\":\"South Georgia & South Sandwich Islands\",\"abbreviation\":\"GS\"},{\"name\":\"South Korea\",\"abbreviation\":\"KR\"},{\"name\":\"South Sudan\",\"abbreviation\":\"SS\"},{\"name\":\"Spain\",\"abbreviation\":\"ES\"},{\"name\":\"Sri Lanka\",\"abbreviation\":\"LK\"},{\"name\":\"St. Barthélemy\",\"abbreviation\":\"BL\"},{\"name\":\"St. Helena\",\"abbreviation\":\"SH\"},{\"name\":\"St. Kitts & Nevis\",\"abbreviation\":\"KN\"},{\"name\":\"St. Lucia\",\"abbreviation\":\"LC\"},{\"name\":\"St. Martin\",\"abbreviation\":\"MF\"},{\"name\":\"St. Pierre & Miquelon\",\"abbreviation\":\"PM\"},{\"name\":\"St. Vincent & Grenadines\",\"abbreviation\":\"VC\"},{\"name\":\"Sudan\",\"abbreviation\":\"SD\"},{\"name\":\"Suriname\",\"abbreviation\":\"SR\"},{\"name\":\"Svalbard & Jan Mayen\",\"abbreviation\":\"SJ\"},{\"name\":\"Swaziland\",\"abbreviation\":\"SZ\"},{\"name\":\"Sweden\",\"abbreviation\":\"SE\"},{\"name\":\"Switzerland\",\"abbreviation\":\"CH\"},{\"name\":\"Syria\",\"abbreviation\":\"SY\"},{\"name\":\"Taiwan\",\"abbreviation\":\"TW\"},{\"name\":\"Tajikistan\",\"abbreviation\":\"TJ\"},{\"name\":\"Tanzania\",\"abbreviation\":\"TZ\"},{\"name\":\"Thailand\",\"abbreviation\":\"TH\"},{\"name\":\"Timor-Leste\",\"abbreviation\":\"TL\"},{\"name\":\"Togo\",\"abbreviation\":\"TG\"},{\"name\":\"Tokelau\",\"abbreviation\":\"TK\"},{\"name\":\"Tonga\",\"abbreviation\":\"TO\"},{\"name\":\"Trinidad & Tobago\",\"abbreviation\":\"TT\"},{\"name\":\"Tristan da Cunha\",\"abbreviation\":\"TA\"},{\"name\":\"Tunisia\",\"abbreviation\":\"TN\"},{\"name\":\"Turkey\",\"abbreviation\":\"TR\"},{\"name\":\"Turkmenistan\",\"abbreviation\":\"TM\"},{\"name\":\"Turks & Caicos Islands\",\"abbreviation\":\"TC\"},{\"name\":\"Tuvalu\",\"abbreviation\":\"TV\"},{\"name\":\"U.S. Outlying Islands\",\"abbreviation\":\"UM\"},{\"name\":\"U.S. Virgin Islands\",\"abbreviation\":\"VI\"},{\"name\":\"Uganda\",\"abbreviation\":\"UG\"},{\"name\":\"Ukraine\",\"abbreviation\":\"UA\"},{\"name\":\"United Arab Emirates\",\"abbreviation\":\"AE\"},{\"name\":\"United Kingdom\",\"abbreviation\":\"GB\"},{\"name\":\"United States\",\"abbreviation\":\"US\"},{\"name\":\"Uruguay\",\"abbreviation\":\"UY\"},{\"name\":\"Uzbekistan\",\"abbreviation\":\"UZ\"},{\"name\":\"Vanuatu\",\"abbreviation\":\"VU\"},{\"name\":\"Vatican City\",\"abbreviation\":\"VA\"},{\"name\":\"Venezuela\",\"abbreviation\":\"VE\"},{\"name\":\"Vietnam\",\"abbreviation\":\"VN\"},{\"name\":\"Wallis & Futuna\",\"abbreviation\":\"WF\"},{\"name\":\"Western Sahara\",\"abbreviation\":\"EH\"},{\"name\":\"Yemen\",\"abbreviation\":\"YE\"},{\"name\":\"Zambia\",\"abbreviation\":\"ZM\"},{\"name\":\"Zimbabwe\",\"abbreviation\":\"ZW\"}],\n\n counties: {\n // Data taken from http://www.downloadexcelfiles.com/gb_en/download-excel-file-list-counties-uk\n \"uk\": [\n {name: 'Bath and North East Somerset'},\n {name: 'Aberdeenshire'},\n {name: 'Anglesey'},\n {name: 'Angus'},\n {name: 'Bedford'},\n {name: 'Blackburn with Darwen'},\n {name: 'Blackpool'},\n {name: 'Bournemouth'},\n {name: 'Bracknell Forest'},\n {name: 'Brighton & Hove'},\n {name: 'Bristol'},\n {name: 'Buckinghamshire'},\n {name: 'Cambridgeshire'},\n {name: 'Carmarthenshire'},\n {name: 'Central Bedfordshire'},\n {name: 'Ceredigion'},\n {name: 'Cheshire East'},\n {name: 'Cheshire West and Chester'},\n {name: 'Clackmannanshire'},\n {name: 'Conwy'},\n {name: 'Cornwall'},\n {name: 'County Antrim'},\n {name: 'County Armagh'},\n {name: 'County Down'},\n {name: 'County Durham'},\n {name: 'County Fermanagh'},\n {name: 'County Londonderry'},\n {name: 'County Tyrone'},\n {name: 'Cumbria'},\n {name: 'Darlington'},\n {name: 'Denbighshire'},\n {name: 'Derby'},\n {name: 'Derbyshire'},\n {name: 'Devon'},\n {name: 'Dorset'},\n {name: 'Dumfries and Galloway'},\n {name: 'Dundee'},\n {name: 'East Lothian'},\n {name: 'East Riding of Yorkshire'},\n {name: 'East Sussex'},\n {name: 'Edinburgh?'},\n {name: 'Essex'},\n {name: 'Falkirk'},\n {name: 'Fife'},\n {name: 'Flintshire'},\n {name: 'Gloucestershire'},\n {name: 'Greater London'},\n {name: 'Greater Manchester'},\n {name: 'Gwent'},\n {name: 'Gwynedd'},\n {name: 'Halton'},\n {name: 'Hampshire'},\n {name: 'Hartlepool'},\n {name: 'Herefordshire'},\n {name: 'Hertfordshire'},\n {name: 'Highlands'},\n {name: 'Hull'},\n {name: 'Isle of Wight'},\n {name: 'Isles of Scilly'},\n {name: 'Kent'},\n {name: 'Lancashire'},\n {name: 'Leicester'},\n {name: 'Leicestershire'},\n {name: 'Lincolnshire'},\n {name: 'Lothian'},\n {name: 'Luton'},\n {name: 'Medway'},\n {name: 'Merseyside'},\n {name: 'Mid Glamorgan'},\n {name: 'Middlesbrough'},\n {name: 'Milton Keynes'},\n {name: 'Monmouthshire'},\n {name: 'Moray'},\n {name: 'Norfolk'},\n {name: 'North East Lincolnshire'},\n {name: 'North Lincolnshire'},\n {name: 'North Somerset'},\n {name: 'North Yorkshire'},\n {name: 'Northamptonshire'},\n {name: 'Northumberland'},\n {name: 'Nottingham'},\n {name: 'Nottinghamshire'},\n {name: 'Oxfordshire'},\n {name: 'Pembrokeshire'},\n {name: 'Perth and Kinross'},\n {name: 'Peterborough'},\n {name: 'Plymouth'},\n {name: 'Poole'},\n {name: 'Portsmouth'},\n {name: 'Powys'},\n {name: 'Reading'},\n {name: 'Redcar and Cleveland'},\n {name: 'Rutland'},\n {name: 'Scottish Borders'},\n {name: 'Shropshire'},\n {name: 'Slough'},\n {name: 'Somerset'},\n {name: 'South Glamorgan'},\n {name: 'South Gloucestershire'},\n {name: 'South Yorkshire'},\n {name: 'Southampton'},\n {name: 'Southend-on-Sea'},\n {name: 'Staffordshire'},\n {name: 'Stirlingshire'},\n {name: 'Stockton-on-Tees'},\n {name: 'Stoke-on-Trent'},\n {name: 'Strathclyde'},\n {name: 'Suffolk'},\n {name: 'Surrey'},\n {name: 'Swindon'},\n {name: 'Telford and Wrekin'},\n {name: 'Thurrock'},\n {name: 'Torbay'},\n {name: 'Tyne and Wear'},\n {name: 'Warrington'},\n {name: 'Warwickshire'},\n {name: 'West Berkshire'},\n {name: 'West Glamorgan'},\n {name: 'West Lothian'},\n {name: 'West Midlands'},\n {name: 'West Sussex'},\n {name: 'West Yorkshire'},\n {name: 'Western Isles'},\n {name: 'Wiltshire'},\n {name: 'Windsor and Maidenhead'},\n {name: 'Wokingham'},\n {name: 'Worcestershire'},\n {name: 'Wrexham'},\n {name: 'York'}]\n },\n provinces: {\n \"ca\": [\n {name: 'Alberta', abbreviation: 'AB'},\n {name: 'British Columbia', abbreviation: 'BC'},\n {name: 'Manitoba', abbreviation: 'MB'},\n {name: 'New Brunswick', abbreviation: 'NB'},\n {name: 'Newfoundland and Labrador', abbreviation: 'NL'},\n {name: 'Nova Scotia', abbreviation: 'NS'},\n {name: 'Ontario', abbreviation: 'ON'},\n {name: 'Prince Edward Island', abbreviation: 'PE'},\n {name: 'Quebec', abbreviation: 'QC'},\n {name: 'Saskatchewan', abbreviation: 'SK'},\n\n // The case could be made that the following are not actually provinces\n // since they are technically considered \"territories\" however they all\n // look the same on an envelope!\n {name: 'Northwest Territories', abbreviation: 'NT'},\n {name: 'Nunavut', abbreviation: 'NU'},\n {name: 'Yukon', abbreviation: 'YT'}\n ],\n \"it\": [\n { name: \"Agrigento\", abbreviation: \"AG\", code: 84 },\n { name: \"Alessandria\", abbreviation: \"AL\", code: 6 },\n { name: \"Ancona\", abbreviation: \"AN\", code: 42 },\n { name: \"Aosta\", abbreviation: \"AO\", code: 7 },\n { name: \"L'Aquila\", abbreviation: \"AQ\", code: 66 },\n { name: \"Arezzo\", abbreviation: \"AR\", code: 51 },\n { name: \"Ascoli-Piceno\", abbreviation: \"AP\", code: 44 },\n { name: \"Asti\", abbreviation: \"AT\", code: 5 },\n { name: \"Avellino\", abbreviation: \"AV\", code: 64 },\n { name: \"Bari\", abbreviation: \"BA\", code: 72 },\n { name: \"Barletta-Andria-Trani\", abbreviation: \"BT\", code: 72 },\n { name: \"Belluno\", abbreviation: \"BL\", code: 25 },\n { name: \"Benevento\", abbreviation: \"BN\", code: 62 },\n { name: \"Bergamo\", abbreviation: \"BG\", code: 16 },\n { name: \"Biella\", abbreviation: \"BI\", code: 96 },\n { name: \"Bologna\", abbreviation: \"BO\", code: 37 },\n { name: \"Bolzano\", abbreviation: \"BZ\", code: 21 },\n { name: \"Brescia\", abbreviation: \"BS\", code: 17 },\n { name: \"Brindisi\", abbreviation: \"BR\", code: 74 },\n { name: \"Cagliari\", abbreviation: \"CA\", code: 92 },\n { name: \"Caltanissetta\", abbreviation: \"CL\", code: 85 },\n { name: \"Campobasso\", abbreviation: \"CB\", code: 70 },\n { name: \"Carbonia Iglesias\", abbreviation: \"CI\", code: 70 },\n { name: \"Caserta\", abbreviation: \"CE\", code: 61 },\n { name: \"Catania\", abbreviation: \"CT\", code: 87 },\n { name: \"Catanzaro\", abbreviation: \"CZ\", code: 79 },\n { name: \"Chieti\", abbreviation: \"CH\", code: 69 },\n { name: \"Como\", abbreviation: \"CO\", code: 13 },\n { name: \"Cosenza\", abbreviation: \"CS\", code: 78 },\n { name: \"Cremona\", abbreviation: \"CR\", code: 19 },\n { name: \"Crotone\", abbreviation: \"KR\", code: 101 },\n { name: \"Cuneo\", abbreviation: \"CN\", code: 4 },\n { name: \"Enna\", abbreviation: \"EN\", code: 86 },\n { name: \"Fermo\", abbreviation: \"FM\", code: 86 },\n { name: \"Ferrara\", abbreviation: \"FE\", code: 38 },\n { name: \"Firenze\", abbreviation: \"FI\", code: 48 },\n { name: \"Foggia\", abbreviation: \"FG\", code: 71 },\n { name: \"Forli-Cesena\", abbreviation: \"FC\", code: 71 },\n { name: \"Frosinone\", abbreviation: \"FR\", code: 60 },\n { name: \"Genova\", abbreviation: \"GE\", code: 10 },\n { name: \"Gorizia\", abbreviation: \"GO\", code: 31 },\n { name: \"Grosseto\", abbreviation: \"GR\", code: 53 },\n { name: \"Imperia\", abbreviation: \"IM\", code: 8 },\n { name: \"Isernia\", abbreviation: \"IS\", code: 94 },\n { name: \"La-Spezia\", abbreviation: \"SP\", code: 66 },\n { name: \"Latina\", abbreviation: \"LT\", code: 59 },\n { name: \"Lecce\", abbreviation: \"LE\", code: 75 },\n { name: \"Lecco\", abbreviation: \"LC\", code: 97 },\n { name: \"Livorno\", abbreviation: \"LI\", code: 49 },\n { name: \"Lodi\", abbreviation: \"LO\", code: 98 },\n { name: \"Lucca\", abbreviation: \"LU\", code: 46 },\n { name: \"Macerata\", abbreviation: \"MC\", code: 43 },\n { name: \"Mantova\", abbreviation: \"MN\", code: 20 },\n { name: \"Massa-Carrara\", abbreviation: \"MS\", code: 45 },\n { name: \"Matera\", abbreviation: \"MT\", code: 77 },\n { name: \"Medio Campidano\", abbreviation: \"VS\", code: 77 },\n { name: \"Messina\", abbreviation: \"ME\", code: 83 },\n { name: \"Milano\", abbreviation: \"MI\", code: 15 },\n { name: \"Modena\", abbreviation: \"MO\", code: 36 },\n { name: \"Monza-Brianza\", abbreviation: \"MB\", code: 36 },\n { name: \"Napoli\", abbreviation: \"NA\", code: 63 },\n { name: \"Novara\", abbreviation: \"NO\", code: 3 },\n { name: \"Nuoro\", abbreviation: \"NU\", code: 91 },\n { name: \"Ogliastra\", abbreviation: \"OG\", code: 91 },\n { name: \"Olbia Tempio\", abbreviation: \"OT\", code: 91 },\n { name: \"Oristano\", abbreviation: \"OR\", code: 95 },\n { name: \"Padova\", abbreviation: \"PD\", code: 28 },\n { name: \"Palermo\", abbreviation: \"PA\", code: 82 },\n { name: \"Parma\", abbreviation: \"PR\", code: 34 },\n { name: \"Pavia\", abbreviation: \"PV\", code: 18 },\n { name: \"Perugia\", abbreviation: \"PG\", code: 54 },\n { name: \"Pesaro-Urbino\", abbreviation: \"PU\", code: 41 },\n { name: \"Pescara\", abbreviation: \"PE\", code: 68 },\n { name: \"Piacenza\", abbreviation: \"PC\", code: 33 },\n { name: \"Pisa\", abbreviation: \"PI\", code: 50 },\n { name: \"Pistoia\", abbreviation: \"PT\", code: 47 },\n { name: \"Pordenone\", abbreviation: \"PN\", code: 93 },\n { name: \"Potenza\", abbreviation: \"PZ\", code: 76 },\n { name: \"Prato\", abbreviation: \"PO\", code: 100 },\n { name: \"Ragusa\", abbreviation: \"RG\", code: 88 },\n { name: \"Ravenna\", abbreviation: \"RA\", code: 39 },\n { name: \"Reggio-Calabria\", abbreviation: \"RC\", code: 35 },\n { name: \"Reggio-Emilia\", abbreviation: \"RE\", code: 35 },\n { name: \"Rieti\", abbreviation: \"RI\", code: 57 },\n { name: \"Rimini\", abbreviation: \"RN\", code: 99 },\n { name: \"Roma\", abbreviation: \"Roma\", code: 58 },\n { name: \"Rovigo\", abbreviation: \"RO\", code: 29 },\n { name: \"Salerno\", abbreviation: \"SA\", code: 65 },\n { name: \"Sassari\", abbreviation: \"SS\", code: 90 },\n { name: \"Savona\", abbreviation: \"SV\", code: 9 },\n { name: \"Siena\", abbreviation: \"SI\", code: 52 },\n { name: \"Siracusa\", abbreviation: \"SR\", code: 89 },\n { name: \"Sondrio\", abbreviation: \"SO\", code: 14 },\n { name: \"Taranto\", abbreviation: \"TA\", code: 73 },\n { name: \"Teramo\", abbreviation: \"TE\", code: 67 },\n { name: \"Terni\", abbreviation: \"TR\", code: 55 },\n { name: \"Torino\", abbreviation: \"TO\", code: 1 },\n { name: \"Trapani\", abbreviation: \"TP\", code: 81 },\n { name: \"Trento\", abbreviation: \"TN\", code: 22 },\n { name: \"Treviso\", abbreviation: \"TV\", code: 26 },\n { name: \"Trieste\", abbreviation: \"TS\", code: 32 },\n { name: \"Udine\", abbreviation: \"UD\", code: 30 },\n { name: \"Varese\", abbreviation: \"VA\", code: 12 },\n { name: \"Venezia\", abbreviation: \"VE\", code: 27 },\n { name: \"Verbania\", abbreviation: \"VB\", code: 27 },\n { name: \"Vercelli\", abbreviation: \"VC\", code: 2 },\n { name: \"Verona\", abbreviation: \"VR\", code: 23 },\n { name: \"Vibo-Valentia\", abbreviation: \"VV\", code: 102 },\n { name: \"Vicenza\", abbreviation: \"VI\", code: 24 },\n { name: \"Viterbo\", abbreviation: \"VT\", code: 56 }\n ]\n },\n\n // from: https://github.com/samsargent/Useful-Autocomplete-Data/blob/master/data/nationalities.json\n nationalities: [\n {name: 'Afghan'},\n {name: 'Albanian'},\n {name: 'Algerian'},\n {name: 'American'},\n {name: 'Andorran'},\n {name: 'Angolan'},\n {name: 'Antiguans'},\n {name: 'Argentinean'},\n {name: 'Armenian'},\n {name: 'Australian'},\n {name: 'Austrian'},\n {name: 'Azerbaijani'},\n {name: 'Bahami'},\n {name: 'Bahraini'},\n {name: 'Bangladeshi'},\n {name: 'Barbadian'},\n {name: 'Barbudans'},\n {name: 'Batswana'},\n {name: 'Belarusian'},\n {name: 'Belgian'},\n {name: 'Belizean'},\n {name: 'Beninese'},\n {name: 'Bhutanese'},\n {name: 'Bolivian'},\n {name: 'Bosnian'},\n {name: 'Brazilian'},\n {name: 'British'},\n {name: 'Bruneian'},\n {name: 'Bulgarian'},\n {name: 'Burkinabe'},\n {name: 'Burmese'},\n {name: 'Burundian'},\n {name: 'Cambodian'},\n {name: 'Cameroonian'},\n {name: 'Canadian'},\n {name: 'Cape Verdean'},\n {name: 'Central African'},\n {name: 'Chadian'},\n {name: 'Chilean'},\n {name: 'Chinese'},\n {name: 'Colombian'},\n {name: 'Comoran'},\n {name: 'Congolese'},\n {name: 'Costa Rican'},\n {name: 'Croatian'},\n {name: 'Cuban'},\n {name: 'Cypriot'},\n {name: 'Czech'},\n {name: 'Danish'},\n {name: 'Djibouti'},\n {name: 'Dominican'},\n {name: 'Dutch'},\n {name: 'East Timorese'},\n {name: 'Ecuadorean'},\n {name: 'Egyptian'},\n {name: 'Emirian'},\n {name: 'Equatorial Guinean'},\n {name: 'Eritrean'},\n {name: 'Estonian'},\n {name: 'Ethiopian'},\n {name: 'Fijian'},\n {name: 'Filipino'},\n {name: 'Finnish'},\n {name: 'French'},\n {name: 'Gabonese'},\n {name: 'Gambian'},\n {name: 'Georgian'},\n {name: 'German'},\n {name: 'Ghanaian'},\n {name: 'Greek'},\n {name: 'Grenadian'},\n {name: 'Guatemalan'},\n {name: 'Guinea-Bissauan'},\n {name: 'Guinean'},\n {name: 'Guyanese'},\n {name: 'Haitian'},\n {name: 'Herzegovinian'},\n {name: 'Honduran'},\n {name: 'Hungarian'},\n {name: 'I-Kiribati'},\n {name: 'Icelander'},\n {name: 'Indian'},\n {name: 'Indonesian'},\n {name: 'Iranian'},\n {name: 'Iraqi'},\n {name: 'Irish'},\n {name: 'Israeli'},\n {name: 'Italian'},\n {name: 'Ivorian'},\n {name: 'Jamaican'},\n {name: 'Japanese'},\n {name: 'Jordanian'},\n {name: 'Kazakhstani'},\n {name: 'Kenyan'},\n {name: 'Kittian and Nevisian'},\n {name: 'Kuwaiti'},\n {name: 'Kyrgyz'},\n {name: 'Laotian'},\n {name: 'Latvian'},\n {name: 'Lebanese'},\n {name: 'Liberian'},\n {name: 'Libyan'},\n {name: 'Liechtensteiner'},\n {name: 'Lithuanian'},\n {name: 'Luxembourger'},\n {name: 'Macedonian'},\n {name: 'Malagasy'},\n {name: 'Malawian'},\n {name: 'Malaysian'},\n {name: 'Maldivan'},\n {name: 'Malian'},\n {name: 'Maltese'},\n {name: 'Marshallese'},\n {name: 'Mauritanian'},\n {name: 'Mauritian'},\n {name: 'Mexican'},\n {name: 'Micronesian'},\n {name: 'Moldovan'},\n {name: 'Monacan'},\n {name: 'Mongolian'},\n {name: 'Moroccan'},\n {name: 'Mosotho'},\n {name: 'Motswana'},\n {name: 'Mozambican'},\n {name: 'Namibian'},\n {name: 'Nauruan'},\n {name: 'Nepalese'},\n {name: 'New Zealander'},\n {name: 'Nicaraguan'},\n {name: 'Nigerian'},\n {name: 'Nigerien'},\n {name: 'North Korean'},\n {name: 'Northern Irish'},\n {name: 'Norwegian'},\n {name: 'Omani'},\n {name: 'Pakistani'},\n {name: 'Palauan'},\n {name: 'Panamanian'},\n {name: 'Papua New Guinean'},\n {name: 'Paraguayan'},\n {name: 'Peruvian'},\n {name: 'Polish'},\n {name: 'Portuguese'},\n {name: 'Qatari'},\n {name: 'Romani'},\n {name: 'Russian'},\n {name: 'Rwandan'},\n {name: 'Saint Lucian'},\n {name: 'Salvadoran'},\n {name: 'Samoan'},\n {name: 'San Marinese'},\n {name: 'Sao Tomean'},\n {name: 'Saudi'},\n {name: 'Scottish'},\n {name: 'Senegalese'},\n {name: 'Serbian'},\n {name: 'Seychellois'},\n {name: 'Sierra Leonean'},\n {name: 'Singaporean'},\n {name: 'Slovakian'},\n {name: 'Slovenian'},\n {name: 'Solomon Islander'},\n {name: 'Somali'},\n {name: 'South African'},\n {name: 'South Korean'},\n {name: 'Spanish'},\n {name: 'Sri Lankan'},\n {name: 'Sudanese'},\n {name: 'Surinamer'},\n {name: 'Swazi'},\n {name: 'Swedish'},\n {name: 'Swiss'},\n {name: 'Syrian'},\n {name: 'Taiwanese'},\n {name: 'Tajik'},\n {name: 'Tanzanian'},\n {name: 'Thai'},\n {name: 'Togolese'},\n {name: 'Tongan'},\n {name: 'Trinidadian or Tobagonian'},\n {name: 'Tunisian'},\n {name: 'Turkish'},\n {name: 'Tuvaluan'},\n {name: 'Ugandan'},\n {name: 'Ukrainian'},\n {name: 'Uruguaya'},\n {name: 'Uzbekistani'},\n {name: 'Venezuela'},\n {name: 'Vietnamese'},\n {name: 'Wels'},\n {name: 'Yemenit'},\n {name: 'Zambia'},\n {name: 'Zimbabwe'},\n ],\n // http://www.loc.gov/standards/iso639-2/php/code_list.php (ISO-639-1 codes)\n locale_languages: [\n \"aa\",\n \"ab\",\n \"ae\",\n \"af\",\n \"ak\",\n \"am\",\n \"an\",\n \"ar\",\n \"as\",\n \"av\",\n \"ay\",\n \"az\",\n \"ba\",\n \"be\",\n \"bg\",\n \"bh\",\n \"bi\",\n \"bm\",\n \"bn\",\n \"bo\",\n \"br\",\n \"bs\",\n \"ca\",\n \"ce\",\n \"ch\",\n \"co\",\n \"cr\",\n \"cs\",\n \"cu\",\n \"cv\",\n \"cy\",\n \"da\",\n \"de\",\n \"dv\",\n \"dz\",\n \"ee\",\n \"el\",\n \"en\",\n \"eo\",\n \"es\",\n \"et\",\n \"eu\",\n \"fa\",\n \"ff\",\n \"fi\",\n \"fj\",\n \"fo\",\n \"fr\",\n \"fy\",\n \"ga\",\n \"gd\",\n \"gl\",\n \"gn\",\n \"gu\",\n \"gv\",\n \"ha\",\n \"he\",\n \"hi\",\n \"ho\",\n \"hr\",\n \"ht\",\n \"hu\",\n \"hy\",\n \"hz\",\n \"ia\",\n \"id\",\n \"ie\",\n \"ig\",\n \"ii\",\n \"ik\",\n \"io\",\n \"is\",\n \"it\",\n \"iu\",\n \"ja\",\n \"jv\",\n \"ka\",\n \"kg\",\n \"ki\",\n \"kj\",\n \"kk\",\n \"kl\",\n \"km\",\n \"kn\",\n \"ko\",\n \"kr\",\n \"ks\",\n \"ku\",\n \"kv\",\n \"kw\",\n \"ky\",\n \"la\",\n \"lb\",\n \"lg\",\n \"li\",\n \"ln\",\n \"lo\",\n \"lt\",\n \"lu\",\n \"lv\",\n \"mg\",\n \"mh\",\n \"mi\",\n \"mk\",\n \"ml\",\n \"mn\",\n \"mr\",\n \"ms\",\n \"mt\",\n \"my\",\n \"na\",\n \"nb\",\n \"nd\",\n \"ne\",\n \"ng\",\n \"nl\",\n \"nn\",\n \"no\",\n \"nr\",\n \"nv\",\n \"ny\",\n \"oc\",\n \"oj\",\n \"om\",\n \"or\",\n \"os\",\n \"pa\",\n \"pi\",\n \"pl\",\n \"ps\",\n \"pt\",\n \"qu\",\n \"rm\",\n \"rn\",\n \"ro\",\n \"ru\",\n \"rw\",\n \"sa\",\n \"sc\",\n \"sd\",\n \"se\",\n \"sg\",\n \"si\",\n \"sk\",\n \"sl\",\n \"sm\",\n \"sn\",\n \"so\",\n \"sq\",\n \"sr\",\n \"ss\",\n \"st\",\n \"su\",\n \"sv\",\n \"sw\",\n \"ta\",\n \"te\",\n \"tg\",\n \"th\",\n \"ti\",\n \"tk\",\n \"tl\",\n \"tn\",\n \"to\",\n \"tr\",\n \"ts\",\n \"tt\",\n \"tw\",\n \"ty\",\n \"ug\",\n \"uk\",\n \"ur\",\n \"uz\",\n \"ve\",\n \"vi\",\n \"vo\",\n \"wa\",\n \"wo\",\n \"xh\",\n \"yi\",\n \"yo\",\n \"za\",\n \"zh\",\n \"zu\"\n ],\n\n // From http://data.okfn.org/data/core/language-codes#resource-language-codes-full (IETF language tags)\n locale_regions: [\n \"agq-CM\",\n \"asa-TZ\",\n \"ast-ES\",\n \"bas-CM\",\n \"bem-ZM\",\n \"bez-TZ\",\n \"brx-IN\",\n \"cgg-UG\",\n \"chr-US\",\n \"dav-KE\",\n \"dje-NE\",\n \"dsb-DE\",\n \"dua-CM\",\n \"dyo-SN\",\n \"ebu-KE\",\n \"ewo-CM\",\n \"fil-PH\",\n \"fur-IT\",\n \"gsw-CH\",\n \"gsw-FR\",\n \"gsw-LI\",\n \"guz-KE\",\n \"haw-US\",\n \"hsb-DE\",\n \"jgo-CM\",\n \"jmc-TZ\",\n \"kab-DZ\",\n \"kam-KE\",\n \"kde-TZ\",\n \"kea-CV\",\n \"khq-ML\",\n \"kkj-CM\",\n \"kln-KE\",\n \"kok-IN\",\n \"ksb-TZ\",\n \"ksf-CM\",\n \"ksh-DE\",\n \"lag-TZ\",\n \"lkt-US\",\n \"luo-KE\",\n \"luy-KE\",\n \"mas-KE\",\n \"mas-TZ\",\n \"mer-KE\",\n \"mfe-MU\",\n \"mgh-MZ\",\n \"mgo-CM\",\n \"mua-CM\",\n \"naq-NA\",\n \"nmg-CM\",\n \"nnh-CM\",\n \"nus-SD\",\n \"nyn-UG\",\n \"rof-TZ\",\n \"rwk-TZ\",\n \"sah-RU\",\n \"saq-KE\",\n \"sbp-TZ\",\n \"seh-MZ\",\n \"ses-ML\",\n \"shi-Latn\",\n \"shi-Latn-MA\",\n \"shi-Tfng\",\n \"shi-Tfng-MA\",\n \"smn-FI\",\n \"teo-KE\",\n \"teo-UG\",\n \"twq-NE\",\n \"tzm-Latn\",\n \"tzm-Latn-MA\",\n \"vai-Latn\",\n \"vai-Latn-LR\",\n \"vai-Vaii\",\n \"vai-Vaii-LR\",\n \"vun-TZ\",\n \"wae-CH\",\n \"xog-UG\",\n \"yav-CM\",\n \"zgh-MA\",\n \"af-NA\",\n \"af-ZA\",\n \"ak-GH\",\n \"am-ET\",\n \"ar-001\",\n \"ar-AE\",\n \"ar-BH\",\n \"ar-DJ\",\n \"ar-DZ\",\n \"ar-EG\",\n \"ar-EH\",\n \"ar-ER\",\n \"ar-IL\",\n \"ar-IQ\",\n \"ar-JO\",\n \"ar-KM\",\n \"ar-KW\",\n \"ar-LB\",\n \"ar-LY\",\n \"ar-MA\",\n \"ar-MR\",\n \"ar-OM\",\n \"ar-PS\",\n \"ar-QA\",\n \"ar-SA\",\n \"ar-SD\",\n \"ar-SO\",\n \"ar-SS\",\n \"ar-SY\",\n \"ar-TD\",\n \"ar-TN\",\n \"ar-YE\",\n \"as-IN\",\n \"az-Cyrl\",\n \"az-Cyrl-AZ\",\n \"az-Latn\",\n \"az-Latn-AZ\",\n \"be-BY\",\n \"bg-BG\",\n \"bm-Latn\",\n \"bm-Latn-ML\",\n \"bn-BD\",\n \"bn-IN\",\n \"bo-CN\",\n \"bo-IN\",\n \"br-FR\",\n \"bs-Cyrl\",\n \"bs-Cyrl-BA\",\n \"bs-Latn\",\n \"bs-Latn-BA\",\n \"ca-AD\",\n \"ca-ES\",\n \"ca-ES-VALENCIA\",\n \"ca-FR\",\n \"ca-IT\",\n \"cs-CZ\",\n \"cy-GB\",\n \"da-DK\",\n \"da-GL\",\n \"de-AT\",\n \"de-BE\",\n \"de-CH\",\n \"de-DE\",\n \"de-LI\",\n \"de-LU\",\n \"dz-BT\",\n \"ee-GH\",\n \"ee-TG\",\n \"el-CY\",\n \"el-GR\",\n \"en-001\",\n \"en-150\",\n \"en-AG\",\n \"en-AI\",\n \"en-AS\",\n \"en-AU\",\n \"en-BB\",\n \"en-BE\",\n \"en-BM\",\n \"en-BS\",\n \"en-BW\",\n \"en-BZ\",\n \"en-CA\",\n \"en-CC\",\n \"en-CK\",\n \"en-CM\",\n \"en-CX\",\n \"en-DG\",\n \"en-DM\",\n \"en-ER\",\n \"en-FJ\",\n \"en-FK\",\n \"en-FM\",\n \"en-GB\",\n \"en-GD\",\n \"en-GG\",\n \"en-GH\",\n \"en-GI\",\n \"en-GM\",\n \"en-GU\",\n \"en-GY\",\n \"en-HK\",\n \"en-IE\",\n \"en-IM\",\n \"en-IN\",\n \"en-IO\",\n \"en-JE\",\n \"en-JM\",\n \"en-KE\",\n \"en-KI\",\n \"en-KN\",\n \"en-KY\",\n \"en-LC\",\n \"en-LR\",\n \"en-LS\",\n \"en-MG\",\n \"en-MH\",\n \"en-MO\",\n \"en-MP\",\n \"en-MS\",\n \"en-MT\",\n \"en-MU\",\n \"en-MW\",\n \"en-MY\",\n \"en-NA\",\n \"en-NF\",\n \"en-NG\",\n \"en-NR\",\n \"en-NU\",\n \"en-NZ\",\n \"en-PG\",\n \"en-PH\",\n \"en-PK\",\n \"en-PN\",\n \"en-PR\",\n \"en-PW\",\n \"en-RW\",\n \"en-SB\",\n \"en-SC\",\n \"en-SD\",\n \"en-SG\",\n \"en-SH\",\n \"en-SL\",\n \"en-SS\",\n \"en-SX\",\n \"en-SZ\",\n \"en-TC\",\n \"en-TK\",\n \"en-TO\",\n \"en-TT\",\n \"en-TV\",\n \"en-TZ\",\n \"en-UG\",\n \"en-UM\",\n \"en-US\",\n \"en-US-POSIX\",\n \"en-VC\",\n \"en-VG\",\n \"en-VI\",\n \"en-VU\",\n \"en-WS\",\n \"en-ZA\",\n \"en-ZM\",\n \"en-ZW\",\n \"eo-001\",\n \"es-419\",\n \"es-AR\",\n \"es-BO\",\n \"es-CL\",\n \"es-CO\",\n \"es-CR\",\n \"es-CU\",\n \"es-DO\",\n \"es-EA\",\n \"es-EC\",\n \"es-ES\",\n \"es-GQ\",\n \"es-GT\",\n \"es-HN\",\n \"es-IC\",\n \"es-MX\",\n \"es-NI\",\n \"es-PA\",\n \"es-PE\",\n \"es-PH\",\n \"es-PR\",\n \"es-PY\",\n \"es-SV\",\n \"es-US\",\n \"es-UY\",\n \"es-VE\",\n \"et-EE\",\n \"eu-ES\",\n \"fa-AF\",\n \"fa-IR\",\n \"ff-CM\",\n \"ff-GN\",\n \"ff-MR\",\n \"ff-SN\",\n \"fi-FI\",\n \"fo-FO\",\n \"fr-BE\",\n \"fr-BF\",\n \"fr-BI\",\n \"fr-BJ\",\n \"fr-BL\",\n \"fr-CA\",\n \"fr-CD\",\n \"fr-CF\",\n \"fr-CG\",\n \"fr-CH\",\n \"fr-CI\",\n \"fr-CM\",\n \"fr-DJ\",\n \"fr-DZ\",\n \"fr-FR\",\n \"fr-GA\",\n \"fr-GF\",\n \"fr-GN\",\n \"fr-GP\",\n \"fr-GQ\",\n \"fr-HT\",\n \"fr-KM\",\n \"fr-LU\",\n \"fr-MA\",\n \"fr-MC\",\n \"fr-MF\",\n \"fr-MG\",\n \"fr-ML\",\n \"fr-MQ\",\n \"fr-MR\",\n \"fr-MU\",\n \"fr-NC\",\n \"fr-NE\",\n \"fr-PF\",\n \"fr-PM\",\n \"fr-RE\",\n \"fr-RW\",\n \"fr-SC\",\n \"fr-SN\",\n \"fr-SY\",\n \"fr-TD\",\n \"fr-TG\",\n \"fr-TN\",\n \"fr-VU\",\n \"fr-WF\",\n \"fr-YT\",\n \"fy-NL\",\n \"ga-IE\",\n \"gd-GB\",\n \"gl-ES\",\n \"gu-IN\",\n \"gv-IM\",\n \"ha-Latn\",\n \"ha-Latn-GH\",\n \"ha-Latn-NE\",\n \"ha-Latn-NG\",\n \"he-IL\",\n \"hi-IN\",\n \"hr-BA\",\n \"hr-HR\",\n \"hu-HU\",\n \"hy-AM\",\n \"id-ID\",\n \"ig-NG\",\n \"ii-CN\",\n \"is-IS\",\n \"it-CH\",\n \"it-IT\",\n \"it-SM\",\n \"ja-JP\",\n \"ka-GE\",\n \"ki-KE\",\n \"kk-Cyrl\",\n \"kk-Cyrl-KZ\",\n \"kl-GL\",\n \"km-KH\",\n \"kn-IN\",\n \"ko-KP\",\n \"ko-KR\",\n \"ks-Arab\",\n \"ks-Arab-IN\",\n \"kw-GB\",\n \"ky-Cyrl\",\n \"ky-Cyrl-KG\",\n \"lb-LU\",\n \"lg-UG\",\n \"ln-AO\",\n \"ln-CD\",\n \"ln-CF\",\n \"ln-CG\",\n \"lo-LA\",\n \"lt-LT\",\n \"lu-CD\",\n \"lv-LV\",\n \"mg-MG\",\n \"mk-MK\",\n \"ml-IN\",\n \"mn-Cyrl\",\n \"mn-Cyrl-MN\",\n \"mr-IN\",\n \"ms-Latn\",\n \"ms-Latn-BN\",\n \"ms-Latn-MY\",\n \"ms-Latn-SG\",\n \"mt-MT\",\n \"my-MM\",\n \"nb-NO\",\n \"nb-SJ\",\n \"nd-ZW\",\n \"ne-IN\",\n \"ne-NP\",\n \"nl-AW\",\n \"nl-BE\",\n \"nl-BQ\",\n \"nl-CW\",\n \"nl-NL\",\n \"nl-SR\",\n \"nl-SX\",\n \"nn-NO\",\n \"om-ET\",\n \"om-KE\",\n \"or-IN\",\n \"os-GE\",\n \"os-RU\",\n \"pa-Arab\",\n \"pa-Arab-PK\",\n \"pa-Guru\",\n \"pa-Guru-IN\",\n \"pl-PL\",\n \"ps-AF\",\n \"pt-AO\",\n \"pt-BR\",\n \"pt-CV\",\n \"pt-GW\",\n \"pt-MO\",\n \"pt-MZ\",\n \"pt-PT\",\n \"pt-ST\",\n \"pt-TL\",\n \"qu-BO\",\n \"qu-EC\",\n \"qu-PE\",\n \"rm-CH\",\n \"rn-BI\",\n \"ro-MD\",\n \"ro-RO\",\n \"ru-BY\",\n \"ru-KG\",\n \"ru-KZ\",\n \"ru-MD\",\n \"ru-RU\",\n \"ru-UA\",\n \"rw-RW\",\n \"se-FI\",\n \"se-NO\",\n \"se-SE\",\n \"sg-CF\",\n \"si-LK\",\n \"sk-SK\",\n \"sl-SI\",\n \"sn-ZW\",\n \"so-DJ\",\n \"so-ET\",\n \"so-KE\",\n \"so-SO\",\n \"sq-AL\",\n \"sq-MK\",\n \"sq-XK\",\n \"sr-Cyrl\",\n \"sr-Cyrl-BA\",\n \"sr-Cyrl-ME\",\n \"sr-Cyrl-RS\",\n \"sr-Cyrl-XK\",\n \"sr-Latn\",\n \"sr-Latn-BA\",\n \"sr-Latn-ME\",\n \"sr-Latn-RS\",\n \"sr-Latn-XK\",\n \"sv-AX\",\n \"sv-FI\",\n \"sv-SE\",\n \"sw-CD\",\n \"sw-KE\",\n \"sw-TZ\",\n \"sw-UG\",\n \"ta-IN\",\n \"ta-LK\",\n \"ta-MY\",\n \"ta-SG\",\n \"te-IN\",\n \"th-TH\",\n \"ti-ER\",\n \"ti-ET\",\n \"to-TO\",\n \"tr-CY\",\n \"tr-TR\",\n \"ug-Arab\",\n \"ug-Arab-CN\",\n \"uk-UA\",\n \"ur-IN\",\n \"ur-PK\",\n \"uz-Arab\",\n \"uz-Arab-AF\",\n \"uz-Cyrl\",\n \"uz-Cyrl-UZ\",\n \"uz-Latn\",\n \"uz-Latn-UZ\",\n \"vi-VN\",\n \"yi-001\",\n \"yo-BJ\",\n \"yo-NG\",\n \"zh-Hans\",\n \"zh-Hans-CN\",\n \"zh-Hans-HK\",\n \"zh-Hans-MO\",\n \"zh-Hans-SG\",\n \"zh-Hant\",\n \"zh-Hant-HK\",\n \"zh-Hant-MO\",\n \"zh-Hant-TW\",\n \"zu-ZA\"\n ],\n\n us_states_and_dc: [\n {name: 'Alabama', abbreviation: 'AL'},\n {name: 'Alaska', abbreviation: 'AK'},\n {name: 'Arizona', abbreviation: 'AZ'},\n {name: 'Arkansas', abbreviation: 'AR'},\n {name: 'California', abbreviation: 'CA'},\n {name: 'Colorado', abbreviation: 'CO'},\n {name: 'Connecticut', abbreviation: 'CT'},\n {name: 'Delaware', abbreviation: 'DE'},\n {name: 'District of Columbia', abbreviation: 'DC'},\n {name: 'Florida', abbreviation: 'FL'},\n {name: 'Georgia', abbreviation: 'GA'},\n {name: 'Hawaii', abbreviation: 'HI'},\n {name: 'Idaho', abbreviation: 'ID'},\n {name: 'Illinois', abbreviation: 'IL'},\n {name: 'Indiana', abbreviation: 'IN'},\n {name: 'Iowa', abbreviation: 'IA'},\n {name: 'Kansas', abbreviation: 'KS'},\n {name: 'Kentucky', abbreviation: 'KY'},\n {name: 'Louisiana', abbreviation: 'LA'},\n {name: 'Maine', abbreviation: 'ME'},\n {name: 'Maryland', abbreviation: 'MD'},\n {name: 'Massachusetts', abbreviation: 'MA'},\n {name: 'Michigan', abbreviation: 'MI'},\n {name: 'Minnesota', abbreviation: 'MN'},\n {name: 'Mississippi', abbreviation: 'MS'},\n {name: 'Missouri', abbreviation: 'MO'},\n {name: 'Montana', abbreviation: 'MT'},\n {name: 'Nebraska', abbreviation: 'NE'},\n {name: 'Nevada', abbreviation: 'NV'},\n {name: 'New Hampshire', abbreviation: 'NH'},\n {name: 'New Jersey', abbreviation: 'NJ'},\n {name: 'New Mexico', abbreviation: 'NM'},\n {name: 'New York', abbreviation: 'NY'},\n {name: 'North Carolina', abbreviation: 'NC'},\n {name: 'North Dakota', abbreviation: 'ND'},\n {name: 'Ohio', abbreviation: 'OH'},\n {name: 'Oklahoma', abbreviation: 'OK'},\n {name: 'Oregon', abbreviation: 'OR'},\n {name: 'Pennsylvania', abbreviation: 'PA'},\n {name: 'Rhode Island', abbreviation: 'RI'},\n {name: 'South Carolina', abbreviation: 'SC'},\n {name: 'South Dakota', abbreviation: 'SD'},\n {name: 'Tennessee', abbreviation: 'TN'},\n {name: 'Texas', abbreviation: 'TX'},\n {name: 'Utah', abbreviation: 'UT'},\n {name: 'Vermont', abbreviation: 'VT'},\n {name: 'Virginia', abbreviation: 'VA'},\n {name: 'Washington', abbreviation: 'WA'},\n {name: 'West Virginia', abbreviation: 'WV'},\n {name: 'Wisconsin', abbreviation: 'WI'},\n {name: 'Wyoming', abbreviation: 'WY'}\n ],\n\n territories: [\n {name: 'American Samoa', abbreviation: 'AS'},\n {name: 'Federated States of Micronesia', abbreviation: 'FM'},\n {name: 'Guam', abbreviation: 'GU'},\n {name: 'Marshall Islands', abbreviation: 'MH'},\n {name: 'Northern Mariana Islands', abbreviation: 'MP'},\n {name: 'Puerto Rico', abbreviation: 'PR'},\n {name: 'Virgin Islands, U.S.', abbreviation: 'VI'}\n ],\n\n armed_forces: [\n {name: 'Armed Forces Europe', abbreviation: 'AE'},\n {name: 'Armed Forces Pacific', abbreviation: 'AP'},\n {name: 'Armed Forces the Americas', abbreviation: 'AA'}\n ],\n\n country_regions: {\n it: [\n { name: \"Valle d'Aosta\", abbreviation: \"VDA\" },\n { name: \"Piemonte\", abbreviation: \"PIE\" },\n { name: \"Lombardia\", abbreviation: \"LOM\" },\n { name: \"Veneto\", abbreviation: \"VEN\" },\n { name: \"Trentino Alto Adige\", abbreviation: \"TAA\" },\n { name: \"Friuli Venezia Giulia\", abbreviation: \"FVG\" },\n { name: \"Liguria\", abbreviation: \"LIG\" },\n { name: \"Emilia Romagna\", abbreviation: \"EMR\" },\n { name: \"Toscana\", abbreviation: \"TOS\" },\n { name: \"Umbria\", abbreviation: \"UMB\" },\n { name: \"Marche\", abbreviation: \"MAR\" },\n { name: \"Abruzzo\", abbreviation: \"ABR\" },\n { name: \"Lazio\", abbreviation: \"LAZ\" },\n { name: \"Campania\", abbreviation: \"CAM\" },\n { name: \"Puglia\", abbreviation: \"PUG\" },\n { name: \"Basilicata\", abbreviation: \"BAS\" },\n { name: \"Molise\", abbreviation: \"MOL\" },\n { name: \"Calabria\", abbreviation: \"CAL\" },\n { name: \"Sicilia\", abbreviation: \"SIC\" },\n { name: \"Sardegna\", abbreviation: \"SAR\" }\n ],\n mx: [\n { name: 'Aguascalientes', abbreviation: 'AGU' },\n { name: 'Baja California', abbreviation: 'BCN' },\n { name: 'Baja California Sur', abbreviation: 'BCS' },\n { name: 'Campeche', abbreviation: 'CAM' },\n { name: 'Chiapas', abbreviation: 'CHP' },\n { name: 'Chihuahua', abbreviation: 'CHH' },\n { name: 'Ciudad de México', abbreviation: 'DIF' },\n { name: 'Coahuila', abbreviation: 'COA' },\n { name: 'Colima', abbreviation: 'COL' },\n { name: 'Durango', abbreviation: 'DUR' },\n { name: 'Guanajuato', abbreviation: 'GUA' },\n { name: 'Guerrero', abbreviation: 'GRO' },\n { name: 'Hidalgo', abbreviation: 'HID' },\n { name: 'Jalisco', abbreviation: 'JAL' },\n { name: 'México', abbreviation: 'MEX' },\n { name: 'Michoacán', abbreviation: 'MIC' },\n { name: 'Morelos', abbreviation: 'MOR' },\n { name: 'Nayarit', abbreviation: 'NAY' },\n { name: 'Nuevo León', abbreviation: 'NLE' },\n { name: 'Oaxaca', abbreviation: 'OAX' },\n { name: 'Puebla', abbreviation: 'PUE' },\n { name: 'Querétaro', abbreviation: 'QUE' },\n { name: 'Quintana Roo', abbreviation: 'ROO' },\n { name: 'San Luis Potosí', abbreviation: 'SLP' },\n { name: 'Sinaloa', abbreviation: 'SIN' },\n { name: 'Sonora', abbreviation: 'SON' },\n { name: 'Tabasco', abbreviation: 'TAB' },\n { name: 'Tamaulipas', abbreviation: 'TAM' },\n { name: 'Tlaxcala', abbreviation: 'TLA' },\n { name: 'Veracruz', abbreviation: 'VER' },\n { name: 'Yucatán', abbreviation: 'YUC' },\n { name: 'Zacatecas', abbreviation: 'ZAC' }\n ]\n },\n\n street_suffixes: {\n 'us': [\n {name: 'Avenue', abbreviation: 'Ave'},\n {name: 'Boulevard', abbreviation: 'Blvd'},\n {name: 'Center', abbreviation: 'Ctr'},\n {name: 'Circle', abbreviation: 'Cir'},\n {name: 'Court', abbreviation: 'Ct'},\n {name: 'Drive', abbreviation: 'Dr'},\n {name: 'Extension', abbreviation: 'Ext'},\n {name: 'Glen', abbreviation: 'Gln'},\n {name: 'Grove', abbreviation: 'Grv'},\n {name: 'Heights', abbreviation: 'Hts'},\n {name: 'Highway', abbreviation: 'Hwy'},\n {name: 'Junction', abbreviation: 'Jct'},\n {name: 'Key', abbreviation: 'Key'},\n {name: 'Lane', abbreviation: 'Ln'},\n {name: 'Loop', abbreviation: 'Loop'},\n {name: 'Manor', abbreviation: 'Mnr'},\n {name: 'Mill', abbreviation: 'Mill'},\n {name: 'Park', abbreviation: 'Park'},\n {name: 'Parkway', abbreviation: 'Pkwy'},\n {name: 'Pass', abbreviation: 'Pass'},\n {name: 'Path', abbreviation: 'Path'},\n {name: 'Pike', abbreviation: 'Pike'},\n {name: 'Place', abbreviation: 'Pl'},\n {name: 'Plaza', abbreviation: 'Plz'},\n {name: 'Point', abbreviation: 'Pt'},\n {name: 'Ridge', abbreviation: 'Rdg'},\n {name: 'River', abbreviation: 'Riv'},\n {name: 'Road', abbreviation: 'Rd'},\n {name: 'Square', abbreviation: 'Sq'},\n {name: 'Street', abbreviation: 'St'},\n {name: 'Terrace', abbreviation: 'Ter'},\n {name: 'Trail', abbreviation: 'Trl'},\n {name: 'Turnpike', abbreviation: 'Tpke'},\n {name: 'View', abbreviation: 'Vw'},\n {name: 'Way', abbreviation: 'Way'}\n ],\n 'it': [\n { name: 'Accesso', abbreviation: 'Acc.' },\n { name: 'Alzaia', abbreviation: 'Alz.' },\n { name: 'Arco', abbreviation: 'Arco' },\n { name: 'Archivolto', abbreviation: 'Acv.' },\n { name: 'Arena', abbreviation: 'Arena' },\n { name: 'Argine', abbreviation: 'Argine' },\n { name: 'Bacino', abbreviation: 'Bacino' },\n { name: 'Banchi', abbreviation: 'Banchi' },\n { name: 'Banchina', abbreviation: 'Ban.' },\n { name: 'Bastioni', abbreviation: 'Bas.' },\n { name: 'Belvedere', abbreviation: 'Belv.' },\n { name: 'Borgata', abbreviation: 'B.ta' },\n { name: 'Borgo', abbreviation: 'B.go' },\n { name: 'Calata', abbreviation: 'Cal.' },\n { name: 'Calle', abbreviation: 'Calle' },\n { name: 'Campiello', abbreviation: 'Cam.' },\n { name: 'Campo', abbreviation: 'Cam.' },\n { name: 'Canale', abbreviation: 'Can.' },\n { name: 'Carraia', abbreviation: 'Carr.' },\n { name: 'Cascina', abbreviation: 'Cascina' },\n { name: 'Case sparse', abbreviation: 'c.s.' },\n { name: 'Cavalcavia', abbreviation: 'Cv.' },\n { name: 'Circonvallazione', abbreviation: 'Cv.' },\n { name: 'Complanare', abbreviation: 'C.re' },\n { name: 'Contrada', abbreviation: 'C.da' },\n { name: 'Corso', abbreviation: 'C.so' },\n { name: 'Corte', abbreviation: 'C.te' },\n { name: 'Cortile', abbreviation: 'C.le' },\n { name: 'Diramazione', abbreviation: 'Dir.' },\n { name: 'Fondaco', abbreviation: 'F.co' },\n { name: 'Fondamenta', abbreviation: 'F.ta' },\n { name: 'Fondo', abbreviation: 'F.do' },\n { name: 'Frazione', abbreviation: 'Fr.' },\n { name: 'Isola', abbreviation: 'Is.' },\n { name: 'Largo', abbreviation: 'L.go' },\n { name: 'Litoranea', abbreviation: 'Lit.' },\n { name: 'Lungolago', abbreviation: 'L.go lago' },\n { name: 'Lungo Po', abbreviation: 'l.go Po' },\n { name: 'Molo', abbreviation: 'Molo' },\n { name: 'Mura', abbreviation: 'Mura' },\n { name: 'Passaggio privato', abbreviation: 'pass. priv.' },\n { name: 'Passeggiata', abbreviation: 'Pass.' },\n { name: 'Piazza', abbreviation: 'P.zza' },\n { name: 'Piazzale', abbreviation: 'P.le' },\n { name: 'Ponte', abbreviation: 'P.te' },\n { name: 'Portico', abbreviation: 'P.co' },\n { name: 'Rampa', abbreviation: 'Rampa' },\n { name: 'Regione', abbreviation: 'Reg.' },\n { name: 'Rione', abbreviation: 'R.ne' },\n { name: 'Rio', abbreviation: 'Rio' },\n { name: 'Ripa', abbreviation: 'Ripa' },\n { name: 'Riva', abbreviation: 'Riva' },\n { name: 'Rondò', abbreviation: 'Rondò' },\n { name: 'Rotonda', abbreviation: 'Rot.' },\n { name: 'Sagrato', abbreviation: 'Sagr.' },\n { name: 'Salita', abbreviation: 'Sal.' },\n { name: 'Scalinata', abbreviation: 'Scal.' },\n { name: 'Scalone', abbreviation: 'Scal.' },\n { name: 'Slargo', abbreviation: 'Sl.' },\n { name: 'Sottoportico', abbreviation: 'Sott.' },\n { name: 'Strada', abbreviation: 'Str.' },\n { name: 'Stradale', abbreviation: 'Str.le' },\n { name: 'Strettoia', abbreviation: 'Strett.' },\n { name: 'Traversa', abbreviation: 'Trav.' },\n { name: 'Via', abbreviation: 'V.' },\n { name: 'Viale', abbreviation: 'V.le' },\n { name: 'Vicinale', abbreviation: 'Vic.le' },\n { name: 'Vicolo', abbreviation: 'Vic.' }\n ],\n 'uk' : [\n {name: 'Avenue', abbreviation: 'Ave'},\n {name: 'Close', abbreviation: 'Cl'},\n {name: 'Court', abbreviation: 'Ct'},\n {name: 'Crescent', abbreviation: 'Cr'},\n {name: 'Drive', abbreviation: 'Dr'},\n {name: 'Garden', abbreviation: 'Gdn'},\n {name: 'Gardens', abbreviation: 'Gdns'},\n {name: 'Green', abbreviation: 'Gn'},\n {name: 'Grove', abbreviation: 'Gr'},\n {name: 'Lane', abbreviation: 'Ln'},\n {name: 'Mount', abbreviation: 'Mt'},\n {name: 'Place', abbreviation: 'Pl'},\n {name: 'Park', abbreviation: 'Pk'},\n {name: 'Ridge', abbreviation: 'Rdg'},\n {name: 'Road', abbreviation: 'Rd'},\n {name: 'Square', abbreviation: 'Sq'},\n {name: 'Street', abbreviation: 'St'},\n {name: 'Terrace', abbreviation: 'Ter'},\n {name: 'Valley', abbreviation: 'Val'}\n ]\n },\n\n months: [\n {name: 'January', short_name: 'Jan', numeric: '01', days: 31},\n // Not messing with leap years...\n {name: 'February', short_name: 'Feb', numeric: '02', days: 28},\n {name: 'March', short_name: 'Mar', numeric: '03', days: 31},\n {name: 'April', short_name: 'Apr', numeric: '04', days: 30},\n {name: 'May', short_name: 'May', numeric: '05', days: 31},\n {name: 'June', short_name: 'Jun', numeric: '06', days: 30},\n {name: 'July', short_name: 'Jul', numeric: '07', days: 31},\n {name: 'August', short_name: 'Aug', numeric: '08', days: 31},\n {name: 'September', short_name: 'Sep', numeric: '09', days: 30},\n {name: 'October', short_name: 'Oct', numeric: '10', days: 31},\n {name: 'November', short_name: 'Nov', numeric: '11', days: 30},\n {name: 'December', short_name: 'Dec', numeric: '12', days: 31}\n ],\n\n // http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\n cc_types: [\n {name: \"American Express\", short_name: 'amex', prefix: '34', length: 15},\n {name: \"Bankcard\", short_name: 'bankcard', prefix: '5610', length: 16},\n {name: \"China UnionPay\", short_name: 'chinaunion', prefix: '62', length: 16},\n {name: \"Diners Club Carte Blanche\", short_name: 'dccarte', prefix: '300', length: 14},\n {name: \"Diners Club enRoute\", short_name: 'dcenroute', prefix: '2014', length: 15},\n {name: \"Diners Club International\", short_name: 'dcintl', prefix: '36', length: 14},\n {name: \"Diners Club United States & Canada\", short_name: 'dcusc', prefix: '54', length: 16},\n {name: \"Discover Card\", short_name: 'discover', prefix: '6011', length: 16},\n {name: \"InstaPayment\", short_name: 'instapay', prefix: '637', length: 16},\n {name: \"JCB\", short_name: 'jcb', prefix: '3528', length: 16},\n {name: \"Laser\", short_name: 'laser', prefix: '6304', length: 16},\n {name: \"Maestro\", short_name: 'maestro', prefix: '5018', length: 16},\n {name: \"Mastercard\", short_name: 'mc', prefix: '51', length: 16},\n {name: \"Solo\", short_name: 'solo', prefix: '6334', length: 16},\n {name: \"Switch\", short_name: 'switch', prefix: '4903', length: 16},\n {name: \"Visa\", short_name: 'visa', prefix: '4', length: 16},\n {name: \"Visa Electron\", short_name: 'electron', prefix: '4026', length: 16}\n ],\n\n //return all world currency by ISO 4217\n currency_types: [\n {'code' : 'AED', 'name' : 'United Arab Emirates Dirham'},\n {'code' : 'AFN', 'name' : 'Afghanistan Afghani'},\n {'code' : 'ALL', 'name' : 'Albania Lek'},\n {'code' : 'AMD', 'name' : 'Armenia Dram'},\n {'code' : 'ANG', 'name' : 'Netherlands Antilles Guilder'},\n {'code' : 'AOA', 'name' : 'Angola Kwanza'},\n {'code' : 'ARS', 'name' : 'Argentina Peso'},\n {'code' : 'AUD', 'name' : 'Australia Dollar'},\n {'code' : 'AWG', 'name' : 'Aruba Guilder'},\n {'code' : 'AZN', 'name' : 'Azerbaijan New Manat'},\n {'code' : 'BAM', 'name' : 'Bosnia and Herzegovina Convertible Marka'},\n {'code' : 'BBD', 'name' : 'Barbados Dollar'},\n {'code' : 'BDT', 'name' : 'Bangladesh Taka'},\n {'code' : 'BGN', 'name' : 'Bulgaria Lev'},\n {'code' : 'BHD', 'name' : 'Bahrain Dinar'},\n {'code' : 'BIF', 'name' : 'Burundi Franc'},\n {'code' : 'BMD', 'name' : 'Bermuda Dollar'},\n {'code' : 'BND', 'name' : 'Brunei Darussalam Dollar'},\n {'code' : 'BOB', 'name' : 'Bolivia Boliviano'},\n {'code' : 'BRL', 'name' : 'Brazil Real'},\n {'code' : 'BSD', 'name' : 'Bahamas Dollar'},\n {'code' : 'BTN', 'name' : 'Bhutan Ngultrum'},\n {'code' : 'BWP', 'name' : 'Botswana Pula'},\n {'code' : 'BYR', 'name' : 'Belarus Ruble'},\n {'code' : 'BZD', 'name' : 'Belize Dollar'},\n {'code' : 'CAD', 'name' : 'Canada Dollar'},\n {'code' : 'CDF', 'name' : 'Congo/Kinshasa Franc'},\n {'code' : 'CHF', 'name' : 'Switzerland Franc'},\n {'code' : 'CLP', 'name' : 'Chile Peso'},\n {'code' : 'CNY', 'name' : 'China Yuan Renminbi'},\n {'code' : 'COP', 'name' : 'Colombia Peso'},\n {'code' : 'CRC', 'name' : 'Costa Rica Colon'},\n {'code' : 'CUC', 'name' : 'Cuba Convertible Peso'},\n {'code' : 'CUP', 'name' : 'Cuba Peso'},\n {'code' : 'CVE', 'name' : 'Cape Verde Escudo'},\n {'code' : 'CZK', 'name' : 'Czech Republic Koruna'},\n {'code' : 'DJF', 'name' : 'Djibouti Franc'},\n {'code' : 'DKK', 'name' : 'Denmark Krone'},\n {'code' : 'DOP', 'name' : 'Dominican Republic Peso'},\n {'code' : 'DZD', 'name' : 'Algeria Dinar'},\n {'code' : 'EGP', 'name' : 'Egypt Pound'},\n {'code' : 'ERN', 'name' : 'Eritrea Nakfa'},\n {'code' : 'ETB', 'name' : 'Ethiopia Birr'},\n {'code' : 'EUR', 'name' : 'Euro Member Countries'},\n {'code' : 'FJD', 'name' : 'Fiji Dollar'},\n {'code' : 'FKP', 'name' : 'Falkland Islands (Malvinas) Pound'},\n {'code' : 'GBP', 'name' : 'United Kingdom Pound'},\n {'code' : 'GEL', 'name' : 'Georgia Lari'},\n {'code' : 'GGP', 'name' : 'Guernsey Pound'},\n {'code' : 'GHS', 'name' : 'Ghana Cedi'},\n {'code' : 'GIP', 'name' : 'Gibraltar Pound'},\n {'code' : 'GMD', 'name' : 'Gambia Dalasi'},\n {'code' : 'GNF', 'name' : 'Guinea Franc'},\n {'code' : 'GTQ', 'name' : 'Guatemala Quetzal'},\n {'code' : 'GYD', 'name' : 'Guyana Dollar'},\n {'code' : 'HKD', 'name' : 'Hong Kong Dollar'},\n {'code' : 'HNL', 'name' : 'Honduras Lempira'},\n {'code' : 'HRK', 'name' : 'Croatia Kuna'},\n {'code' : 'HTG', 'name' : 'Haiti Gourde'},\n {'code' : 'HUF', 'name' : 'Hungary Forint'},\n {'code' : 'IDR', 'name' : 'Indonesia Rupiah'},\n {'code' : 'ILS', 'name' : 'Israel Shekel'},\n {'code' : 'IMP', 'name' : 'Isle of Man Pound'},\n {'code' : 'INR', 'name' : 'India Rupee'},\n {'code' : 'IQD', 'name' : 'Iraq Dinar'},\n {'code' : 'IRR', 'name' : 'Iran Rial'},\n {'code' : 'ISK', 'name' : 'Iceland Krona'},\n {'code' : 'JEP', 'name' : 'Jersey Pound'},\n {'code' : 'JMD', 'name' : 'Jamaica Dollar'},\n {'code' : 'JOD', 'name' : 'Jordan Dinar'},\n {'code' : 'JPY', 'name' : 'Japan Yen'},\n {'code' : 'KES', 'name' : 'Kenya Shilling'},\n {'code' : 'KGS', 'name' : 'Kyrgyzstan Som'},\n {'code' : 'KHR', 'name' : 'Cambodia Riel'},\n {'code' : 'KMF', 'name' : 'Comoros Franc'},\n {'code' : 'KPW', 'name' : 'Korea (North) Won'},\n {'code' : 'KRW', 'name' : 'Korea (South) Won'},\n {'code' : 'KWD', 'name' : 'Kuwait Dinar'},\n {'code' : 'KYD', 'name' : 'Cayman Islands Dollar'},\n {'code' : 'KZT', 'name' : 'Kazakhstan Tenge'},\n {'code' : 'LAK', 'name' : 'Laos Kip'},\n {'code' : 'LBP', 'name' : 'Lebanon Pound'},\n {'code' : 'LKR', 'name' : 'Sri Lanka Rupee'},\n {'code' : 'LRD', 'name' : 'Liberia Dollar'},\n {'code' : 'LSL', 'name' : 'Lesotho Loti'},\n {'code' : 'LTL', 'name' : 'Lithuania Litas'},\n {'code' : 'LYD', 'name' : 'Libya Dinar'},\n {'code' : 'MAD', 'name' : 'Morocco Dirham'},\n {'code' : 'MDL', 'name' : 'Moldova Leu'},\n {'code' : 'MGA', 'name' : 'Madagascar Ariary'},\n {'code' : 'MKD', 'name' : 'Macedonia Denar'},\n {'code' : 'MMK', 'name' : 'Myanmar (Burma) Kyat'},\n {'code' : 'MNT', 'name' : 'Mongolia Tughrik'},\n {'code' : 'MOP', 'name' : 'Macau Pataca'},\n {'code' : 'MRO', 'name' : 'Mauritania Ouguiya'},\n {'code' : 'MUR', 'name' : 'Mauritius Rupee'},\n {'code' : 'MVR', 'name' : 'Maldives (Maldive Islands) Rufiyaa'},\n {'code' : 'MWK', 'name' : 'Malawi Kwacha'},\n {'code' : 'MXN', 'name' : 'Mexico Peso'},\n {'code' : 'MYR', 'name' : 'Malaysia Ringgit'},\n {'code' : 'MZN', 'name' : 'Mozambique Metical'},\n {'code' : 'NAD', 'name' : 'Namibia Dollar'},\n {'code' : 'NGN', 'name' : 'Nigeria Naira'},\n {'code' : 'NIO', 'name' : 'Nicaragua Cordoba'},\n {'code' : 'NOK', 'name' : 'Norway Krone'},\n {'code' : 'NPR', 'name' : 'Nepal Rupee'},\n {'code' : 'NZD', 'name' : 'New Zealand Dollar'},\n {'code' : 'OMR', 'name' : 'Oman Rial'},\n {'code' : 'PAB', 'name' : 'Panama Balboa'},\n {'code' : 'PEN', 'name' : 'Peru Nuevo Sol'},\n {'code' : 'PGK', 'name' : 'Papua New Guinea Kina'},\n {'code' : 'PHP', 'name' : 'Philippines Peso'},\n {'code' : 'PKR', 'name' : 'Pakistan Rupee'},\n {'code' : 'PLN', 'name' : 'Poland Zloty'},\n {'code' : 'PYG', 'name' : 'Paraguay Guarani'},\n {'code' : 'QAR', 'name' : 'Qatar Riyal'},\n {'code' : 'RON', 'name' : 'Romania New Leu'},\n {'code' : 'RSD', 'name' : 'Serbia Dinar'},\n {'code' : 'RUB', 'name' : 'Russia Ruble'},\n {'code' : 'RWF', 'name' : 'Rwanda Franc'},\n {'code' : 'SAR', 'name' : 'Saudi Arabia Riyal'},\n {'code' : 'SBD', 'name' : 'Solomon Islands Dollar'},\n {'code' : 'SCR', 'name' : 'Seychelles Rupee'},\n {'code' : 'SDG', 'name' : 'Sudan Pound'},\n {'code' : 'SEK', 'name' : 'Sweden Krona'},\n {'code' : 'SGD', 'name' : 'Singapore Dollar'},\n {'code' : 'SHP', 'name' : 'Saint Helena Pound'},\n {'code' : 'SLL', 'name' : 'Sierra Leone Leone'},\n {'code' : 'SOS', 'name' : 'Somalia Shilling'},\n {'code' : 'SPL', 'name' : 'Seborga Luigino'},\n {'code' : 'SRD', 'name' : 'Suriname Dollar'},\n {'code' : 'STD', 'name' : 'São Tomé and Príncipe Dobra'},\n {'code' : 'SVC', 'name' : 'El Salvador Colon'},\n {'code' : 'SYP', 'name' : 'Syria Pound'},\n {'code' : 'SZL', 'name' : 'Swaziland Lilangeni'},\n {'code' : 'THB', 'name' : 'Thailand Baht'},\n {'code' : 'TJS', 'name' : 'Tajikistan Somoni'},\n {'code' : 'TMT', 'name' : 'Turkmenistan Manat'},\n {'code' : 'TND', 'name' : 'Tunisia Dinar'},\n {'code' : 'TOP', 'name' : 'Tonga Pa\\'anga'},\n {'code' : 'TRY', 'name' : 'Turkey Lira'},\n {'code' : 'TTD', 'name' : 'Trinidad and Tobago Dollar'},\n {'code' : 'TVD', 'name' : 'Tuvalu Dollar'},\n {'code' : 'TWD', 'name' : 'Taiwan New Dollar'},\n {'code' : 'TZS', 'name' : 'Tanzania Shilling'},\n {'code' : 'UAH', 'name' : 'Ukraine Hryvnia'},\n {'code' : 'UGX', 'name' : 'Uganda Shilling'},\n {'code' : 'USD', 'name' : 'United States Dollar'},\n {'code' : 'UYU', 'name' : 'Uruguay Peso'},\n {'code' : 'UZS', 'name' : 'Uzbekistan Som'},\n {'code' : 'VEF', 'name' : 'Venezuela Bolivar'},\n {'code' : 'VND', 'name' : 'Viet Nam Dong'},\n {'code' : 'VUV', 'name' : 'Vanuatu Vatu'},\n {'code' : 'WST', 'name' : 'Samoa Tala'},\n {'code' : 'XAF', 'name' : 'Communauté Financière Africaine (BEAC) CFA Franc BEAC'},\n {'code' : 'XCD', 'name' : 'East Caribbean Dollar'},\n {'code' : 'XDR', 'name' : 'International Monetary Fund (IMF) Special Drawing Rights'},\n {'code' : 'XOF', 'name' : 'Communauté Financière Africaine (BCEAO) Franc'},\n {'code' : 'XPF', 'name' : 'Comptoirs Français du Pacifique (CFP) Franc'},\n {'code' : 'YER', 'name' : 'Yemen Rial'},\n {'code' : 'ZAR', 'name' : 'South Africa Rand'},\n {'code' : 'ZMW', 'name' : 'Zambia Kwacha'},\n {'code' : 'ZWD', 'name' : 'Zimbabwe Dollar'}\n ],\n\n // return the names of all valide colors\n colorNames : [ \"AliceBlue\", \"Black\", \"Navy\", \"DarkBlue\", \"MediumBlue\", \"Blue\", \"DarkGreen\", \"Green\", \"Teal\", \"DarkCyan\", \"DeepSkyBlue\", \"DarkTurquoise\", \"MediumSpringGreen\", \"Lime\", \"SpringGreen\",\n \"Aqua\", \"Cyan\", \"MidnightBlue\", \"DodgerBlue\", \"LightSeaGreen\", \"ForestGreen\", \"SeaGreen\", \"DarkSlateGray\", \"LimeGreen\", \"MediumSeaGreen\", \"Turquoise\", \"RoyalBlue\", \"SteelBlue\", \"DarkSlateBlue\", \"MediumTurquoise\",\n \"Indigo\", \"DarkOliveGreen\", \"CadetBlue\", \"CornflowerBlue\", \"RebeccaPurple\", \"MediumAquaMarine\", \"DimGray\", \"SlateBlue\", \"OliveDrab\", \"SlateGray\", \"LightSlateGray\", \"MediumSlateBlue\", \"LawnGreen\", \"Chartreuse\",\n \"Aquamarine\", \"Maroon\", \"Purple\", \"Olive\", \"Gray\", \"SkyBlue\", \"LightSkyBlue\", \"BlueViolet\", \"DarkRed\", \"DarkMagenta\", \"SaddleBrown\", \"Ivory\", \"White\",\n \"DarkSeaGreen\", \"LightGreen\", \"MediumPurple\", \"DarkViolet\", \"PaleGreen\", \"DarkOrchid\", \"YellowGreen\", \"Sienna\", \"Brown\", \"DarkGray\", \"LightBlue\", \"GreenYellow\", \"PaleTurquoise\", \"LightSteelBlue\", \"PowderBlue\",\n \"FireBrick\", \"DarkGoldenRod\", \"MediumOrchid\", \"RosyBrown\", \"DarkKhaki\", \"Silver\", \"MediumVioletRed\", \"IndianRed\", \"Peru\", \"Chocolate\", \"Tan\", \"LightGray\", \"Thistle\", \"Orchid\", \"GoldenRod\", \"PaleVioletRed\",\n \"Crimson\", \"Gainsboro\", \"Plum\", \"BurlyWood\", \"LightCyan\", \"Lavender\", \"DarkSalmon\", \"Violet\", \"PaleGoldenRod\", \"LightCoral\", \"Khaki\", \"AliceBlue\", \"HoneyDew\", \"Azure\", \"SandyBrown\", \"Wheat\", \"Beige\", \"WhiteSmoke\",\n \"MintCream\", \"GhostWhite\", \"Salmon\", \"AntiqueWhite\", \"Linen\", \"LightGoldenRodYellow\", \"OldLace\", \"Red\", \"Fuchsia\", \"Magenta\", \"DeepPink\", \"OrangeRed\", \"Tomato\", \"HotPink\", \"Coral\", \"DarkOrange\", \"LightSalmon\", \"Orange\",\n \"LightPink\", \"Pink\", \"Gold\", \"PeachPuff\", \"NavajoWhite\", \"Moccasin\", \"Bisque\", \"MistyRose\", \"BlanchedAlmond\", \"PapayaWhip\", \"LavenderBlush\", \"SeaShell\", \"Cornsilk\", \"LemonChiffon\", \"FloralWhite\", \"Snow\", \"Yellow\", \"LightYellow\"\n ],\n\n // Data taken from https://www.sec.gov/rules/other/4-460list.htm\n company: [ \"3Com Corp\",\n \"3M Company\",\n \"A.G. Edwards Inc.\",\n \"Abbott Laboratories\",\n \"Abercrombie & Fitch Co.\",\n \"ABM Industries Incorporated\",\n \"Ace Hardware Corporation\",\n \"ACT Manufacturing Inc.\",\n \"Acterna Corp.\",\n \"Adams Resources & Energy, Inc.\",\n \"ADC Telecommunications, Inc.\",\n \"Adelphia Communications Corporation\",\n \"Administaff, Inc.\",\n \"Adobe Systems Incorporated\",\n \"Adolph Coors Company\",\n \"Advance Auto Parts, Inc.\",\n \"Advanced Micro Devices, Inc.\",\n \"AdvancePCS, Inc.\",\n \"Advantica Restaurant Group, Inc.\",\n \"The AES Corporation\",\n \"Aetna Inc.\",\n \"Affiliated Computer Services, Inc.\",\n \"AFLAC Incorporated\",\n \"AGCO Corporation\",\n \"Agilent Technologies, Inc.\",\n \"Agway Inc.\",\n \"Apartment Investment and Management Company\",\n \"Air Products and Chemicals, Inc.\",\n \"Airborne, Inc.\",\n \"Airgas, Inc.\",\n \"AK Steel Holding Corporation\",\n \"Alaska Air Group, Inc.\",\n \"Alberto-Culver Company\",\n \"Albertson's, Inc.\",\n \"Alcoa Inc.\",\n \"Alleghany Corporation\",\n \"Allegheny Energy, Inc.\",\n \"Allegheny Technologies Incorporated\",\n \"Allergan, Inc.\",\n \"ALLETE, Inc.\",\n \"Alliant Energy Corporation\",\n \"Allied Waste Industries, Inc.\",\n \"Allmerica Financial Corporation\",\n \"The Allstate Corporation\",\n \"ALLTEL Corporation\",\n \"The Alpine Group, Inc.\",\n \"Amazon.com, Inc.\",\n \"AMC Entertainment Inc.\",\n \"American Power Conversion Corporation\",\n \"Amerada Hess Corporation\",\n \"AMERCO\",\n \"Ameren Corporation\",\n \"America West Holdings Corporation\",\n \"American Axle & Manufacturing Holdings, Inc.\",\n \"American Eagle Outfitters, Inc.\",\n \"American Electric Power Company, Inc.\",\n \"American Express Company\",\n \"American Financial Group, Inc.\",\n \"American Greetings Corporation\",\n \"American International Group, Inc.\",\n \"American Standard Companies Inc.\",\n \"American Water Works Company, Inc.\",\n \"AmerisourceBergen Corporation\",\n \"Ames Department Stores, Inc.\",\n \"Amgen Inc.\",\n \"Amkor Technology, Inc.\",\n \"AMR Corporation\",\n \"AmSouth Bancorp.\",\n \"Amtran, Inc.\",\n \"Anadarko Petroleum Corporation\",\n \"Analog Devices, Inc.\",\n \"Anheuser-Busch Companies, Inc.\",\n \"Anixter International Inc.\",\n \"AnnTaylor Inc.\",\n \"Anthem, Inc.\",\n \"AOL Time Warner Inc.\",\n \"Aon Corporation\",\n \"Apache Corporation\",\n \"Apple Computer, Inc.\",\n \"Applera Corporation\",\n \"Applied Industrial Technologies, Inc.\",\n \"Applied Materials, Inc.\",\n \"Aquila, Inc.\",\n \"ARAMARK Corporation\",\n \"Arch Coal, Inc.\",\n \"Archer Daniels Midland Company\",\n \"Arkansas Best Corporation\",\n \"Armstrong Holdings, Inc.\",\n \"Arrow Electronics, Inc.\",\n \"ArvinMeritor, Inc.\",\n \"Ashland Inc.\",\n \"Astoria Financial Corporation\",\n \"AT&T Corp.\",\n \"Atmel Corporation\",\n \"Atmos Energy Corporation\",\n \"Audiovox Corporation\",\n \"Autoliv, Inc.\",\n \"Automatic Data Processing, Inc.\",\n \"AutoNation, Inc.\",\n \"AutoZone, Inc.\",\n \"Avaya Inc.\",\n \"Avery Dennison Corporation\",\n \"Avista Corporation\",\n \"Avnet, Inc.\",\n \"Avon Products, Inc.\",\n \"Baker Hughes Incorporated\",\n \"Ball Corporation\",\n \"Bank of America Corporation\",\n \"The Bank of New York Company, Inc.\",\n \"Bank One Corporation\",\n \"Banknorth Group, Inc.\",\n \"Banta Corporation\",\n \"Barnes & Noble, Inc.\",\n \"Bausch & Lomb Incorporated\",\n \"Baxter International Inc.\",\n \"BB&T Corporation\",\n \"The Bear Stearns Companies Inc.\",\n \"Beazer Homes USA, Inc.\",\n \"Beckman Coulter, Inc.\",\n \"Becton, Dickinson and Company\",\n \"Bed Bath & Beyond Inc.\",\n \"Belk, Inc.\",\n \"Bell Microproducts Inc.\",\n \"BellSouth Corporation\",\n \"Belo Corp.\",\n \"Bemis Company, Inc.\",\n \"Benchmark Electronics, Inc.\",\n \"Berkshire Hathaway Inc.\",\n \"Best Buy Co., Inc.\",\n \"Bethlehem Steel Corporation\",\n \"Beverly Enterprises, Inc.\",\n \"Big Lots, Inc.\",\n \"BJ Services Company\",\n \"BJ's Wholesale Club, Inc.\",\n \"The Black & Decker Corporation\",\n \"Black Hills Corporation\",\n \"BMC Software, Inc.\",\n \"The Boeing Company\",\n \"Boise Cascade Corporation\",\n \"Borders Group, Inc.\",\n \"BorgWarner Inc.\",\n \"Boston Scientific Corporation\",\n \"Bowater Incorporated\",\n \"Briggs & Stratton Corporation\",\n \"Brightpoint, Inc.\",\n \"Brinker International, Inc.\",\n \"Bristol-Myers Squibb Company\",\n \"Broadwing, Inc.\",\n \"Brown Shoe Company, Inc.\",\n \"Brown-Forman Corporation\",\n \"Brunswick Corporation\",\n \"Budget Group, Inc.\",\n \"Burlington Coat Factory Warehouse Corporation\",\n \"Burlington Industries, Inc.\",\n \"Burlington Northern Santa Fe Corporation\",\n \"Burlington Resources Inc.\",\n \"C. H. Robinson Worldwide Inc.\",\n \"Cablevision Systems Corp\",\n \"Cabot Corp\",\n \"Cadence Design Systems, Inc.\",\n \"Calpine Corp.\",\n \"Campbell Soup Co.\",\n \"Capital One Financial Corp.\",\n \"Cardinal Health Inc.\",\n \"Caremark Rx Inc.\",\n \"Carlisle Cos. Inc.\",\n \"Carpenter Technology Corp.\",\n \"Casey's General Stores Inc.\",\n \"Caterpillar Inc.\",\n \"CBRL Group Inc.\",\n \"CDI Corp.\",\n \"CDW Computer Centers Inc.\",\n \"CellStar Corp.\",\n \"Cendant Corp\",\n \"Cenex Harvest States Cooperatives\",\n \"Centex Corp.\",\n \"CenturyTel Inc.\",\n \"Ceridian Corp.\",\n \"CH2M Hill Cos. Ltd.\",\n \"Champion Enterprises Inc.\",\n \"Charles Schwab Corp.\",\n \"Charming Shoppes Inc.\",\n \"Charter Communications Inc.\",\n \"Charter One Financial Inc.\",\n \"ChevronTexaco Corp.\",\n \"Chiquita Brands International Inc.\",\n \"Chubb Corp\",\n \"Ciena Corp.\",\n \"Cigna Corp\",\n \"Cincinnati Financial Corp.\",\n \"Cinergy Corp.\",\n \"Cintas Corp.\",\n \"Circuit City Stores Inc.\",\n \"Cisco Systems Inc.\",\n \"Citigroup, Inc\",\n \"Citizens Communications Co.\",\n \"CKE Restaurants Inc.\",\n \"Clear Channel Communications Inc.\",\n \"The Clorox Co.\",\n \"CMGI Inc.\",\n \"CMS Energy Corp.\",\n \"CNF Inc.\",\n \"Coca-Cola Co.\",\n \"Coca-Cola Enterprises Inc.\",\n \"Colgate-Palmolive Co.\",\n \"Collins & Aikman Corp.\",\n \"Comcast Corp.\",\n \"Comdisco Inc.\",\n \"Comerica Inc.\",\n \"Comfort Systems USA Inc.\",\n \"Commercial Metals Co.\",\n \"Community Health Systems Inc.\",\n \"Compass Bancshares Inc\",\n \"Computer Associates International Inc.\",\n \"Computer Sciences Corp.\",\n \"Compuware Corp.\",\n \"Comverse Technology Inc.\",\n \"ConAgra Foods Inc.\",\n \"Concord EFS Inc.\",\n \"Conectiv, Inc\",\n \"Conoco Inc\",\n \"Conseco Inc.\",\n \"Consolidated Freightways Corp.\",\n \"Consolidated Edison Inc.\",\n \"Constellation Brands Inc.\",\n \"Constellation Emergy Group Inc.\",\n \"Continental Airlines Inc.\",\n \"Convergys Corp.\",\n \"Cooper Cameron Corp.\",\n \"Cooper Industries Ltd.\",\n \"Cooper Tire & Rubber Co.\",\n \"Corn Products International Inc.\",\n \"Corning Inc.\",\n \"Costco Wholesale Corp.\",\n \"Countrywide Credit Industries Inc.\",\n \"Coventry Health Care Inc.\",\n \"Cox Communications Inc.\",\n \"Crane Co.\",\n \"Crompton Corp.\",\n \"Crown Cork & Seal Co. Inc.\",\n \"CSK Auto Corp.\",\n \"CSX Corp.\",\n \"Cummins Inc.\",\n \"CVS Corp.\",\n \"Cytec Industries Inc.\",\n \"D&K Healthcare Resources, Inc.\",\n \"D.R. Horton Inc.\",\n \"Dana Corporation\",\n \"Danaher Corporation\",\n \"Darden Restaurants Inc.\",\n \"DaVita Inc.\",\n \"Dean Foods Company\",\n \"Deere & Company\",\n \"Del Monte Foods Co\",\n \"Dell Computer Corporation\",\n \"Delphi Corp.\",\n \"Delta Air Lines Inc.\",\n \"Deluxe Corporation\",\n \"Devon Energy Corporation\",\n \"Di Giorgio Corporation\",\n \"Dial Corporation\",\n \"Diebold Incorporated\",\n \"Dillard's Inc.\",\n \"DIMON Incorporated\",\n \"Dole Food Company, Inc.\",\n \"Dollar General Corporation\",\n \"Dollar Tree Stores, Inc.\",\n \"Dominion Resources, Inc.\",\n \"Domino's Pizza LLC\",\n \"Dover Corporation, Inc.\",\n \"Dow Chemical Company\",\n \"Dow Jones & Company, Inc.\",\n \"DPL Inc.\",\n \"DQE Inc.\",\n \"Dreyer's Grand Ice Cream, Inc.\",\n \"DST Systems, Inc.\",\n \"DTE Energy Co.\",\n \"E.I. Du Pont de Nemours and Company\",\n \"Duke Energy Corp\",\n \"Dun & Bradstreet Inc.\",\n \"DURA Automotive Systems Inc.\",\n \"DynCorp\",\n \"Dynegy Inc.\",\n \"E*Trade Group, Inc.\",\n \"E.W. Scripps Company\",\n \"Earthlink, Inc.\",\n \"Eastman Chemical Company\",\n \"Eastman Kodak Company\",\n \"Eaton Corporation\",\n \"Echostar Communications Corporation\",\n \"Ecolab Inc.\",\n \"Edison International\",\n \"EGL Inc.\",\n \"El Paso Corporation\",\n \"Electronic Arts Inc.\",\n \"Electronic Data Systems Corp.\",\n \"Eli Lilly and Company\",\n \"EMC Corporation\",\n \"Emcor Group Inc.\",\n \"Emerson Electric Co.\",\n \"Encompass Services Corporation\",\n \"Energizer Holdings Inc.\",\n \"Energy East Corporation\",\n \"Engelhard Corporation\",\n \"Enron Corp.\",\n \"Entergy Corporation\",\n \"Enterprise Products Partners L.P.\",\n \"EOG Resources, Inc.\",\n \"Equifax Inc.\",\n \"Equitable Resources Inc.\",\n \"Equity Office Properties Trust\",\n \"Equity Residential Properties Trust\",\n \"Estee Lauder Companies Inc.\",\n \"Exelon Corporation\",\n \"Exide Technologies\",\n \"Expeditors International of Washington Inc.\",\n \"Express Scripts Inc.\",\n \"ExxonMobil Corporation\",\n \"Fairchild Semiconductor International Inc.\",\n \"Family Dollar Stores Inc.\",\n \"Farmland Industries Inc.\",\n \"Federal Mogul Corp.\",\n \"Federated Department Stores Inc.\",\n \"Federal Express Corp.\",\n \"Felcor Lodging Trust Inc.\",\n \"Ferro Corp.\",\n \"Fidelity National Financial Inc.\",\n \"Fifth Third Bancorp\",\n \"First American Financial Corp.\",\n \"First Data Corp.\",\n \"First National of Nebraska Inc.\",\n \"First Tennessee National Corp.\",\n \"FirstEnergy Corp.\",\n \"Fiserv Inc.\",\n \"Fisher Scientific International Inc.\",\n \"FleetBoston Financial Co.\",\n \"Fleetwood Enterprises Inc.\",\n \"Fleming Companies Inc.\",\n \"Flowers Foods Inc.\",\n \"Flowserv Corp\",\n \"Fluor Corp\",\n \"FMC Corp\",\n \"Foamex International Inc\",\n \"Foot Locker Inc\",\n \"Footstar Inc.\",\n \"Ford Motor Co\",\n \"Forest Laboratories Inc.\",\n \"Fortune Brands Inc.\",\n \"Foster Wheeler Ltd.\",\n \"FPL Group Inc.\",\n \"Franklin Resources Inc.\",\n \"Freeport McMoran Copper & Gold Inc.\",\n \"Frontier Oil Corp\",\n \"Furniture Brands International Inc.\",\n \"Gannett Co., Inc.\",\n \"Gap Inc.\",\n \"Gateway Inc.\",\n \"GATX Corporation\",\n \"Gemstar-TV Guide International Inc.\",\n \"GenCorp Inc.\",\n \"General Cable Corporation\",\n \"General Dynamics Corporation\",\n \"General Electric Company\",\n \"General Mills Inc\",\n \"General Motors Corporation\",\n \"Genesis Health Ventures Inc.\",\n \"Gentek Inc.\",\n \"Gentiva Health Services Inc.\",\n \"Genuine Parts Company\",\n \"Genuity Inc.\",\n \"Genzyme Corporation\",\n \"Georgia Gulf Corporation\",\n \"Georgia-Pacific Corporation\",\n \"Gillette Company\",\n \"Gold Kist Inc.\",\n \"Golden State Bancorp Inc.\",\n \"Golden West Financial Corporation\",\n \"Goldman Sachs Group Inc.\",\n \"Goodrich Corporation\",\n \"The Goodyear Tire & Rubber Company\",\n \"Granite Construction Incorporated\",\n \"Graybar Electric Company Inc.\",\n \"Great Lakes Chemical Corporation\",\n \"Great Plains Energy Inc.\",\n \"GreenPoint Financial Corp.\",\n \"Greif Bros. Corporation\",\n \"Grey Global Group Inc.\",\n \"Group 1 Automotive Inc.\",\n \"Guidant Corporation\",\n \"H&R Block Inc.\",\n \"H.B. Fuller Company\",\n \"H.J. Heinz Company\",\n \"Halliburton Co.\",\n \"Harley-Davidson Inc.\",\n \"Harman International Industries Inc.\",\n \"Harrah's Entertainment Inc.\",\n \"Harris Corp.\",\n \"Harsco Corp.\",\n \"Hartford Financial Services Group Inc.\",\n \"Hasbro Inc.\",\n \"Hawaiian Electric Industries Inc.\",\n \"HCA Inc.\",\n \"Health Management Associates Inc.\",\n \"Health Net Inc.\",\n \"Healthsouth Corp\",\n \"Henry Schein Inc.\",\n \"Hercules Inc.\",\n \"Herman Miller Inc.\",\n \"Hershey Foods Corp.\",\n \"Hewlett-Packard Company\",\n \"Hibernia Corp.\",\n \"Hillenbrand Industries Inc.\",\n \"Hilton Hotels Corp.\",\n \"Hollywood Entertainment Corp.\",\n \"Home Depot Inc.\",\n \"Hon Industries Inc.\",\n \"Honeywell International Inc.\",\n \"Hormel Foods Corp.\",\n \"Host Marriott Corp.\",\n \"Household International Corp.\",\n \"Hovnanian Enterprises Inc.\",\n \"Hub Group Inc.\",\n \"Hubbell Inc.\",\n \"Hughes Supply Inc.\",\n \"Humana Inc.\",\n \"Huntington Bancshares Inc.\",\n \"Idacorp Inc.\",\n \"IDT Corporation\",\n \"IKON Office Solutions Inc.\",\n \"Illinois Tool Works Inc.\",\n \"IMC Global Inc.\",\n \"Imperial Sugar Company\",\n \"IMS Health Inc.\",\n \"Ingles Market Inc\",\n \"Ingram Micro Inc.\",\n \"Insight Enterprises Inc.\",\n \"Integrated Electrical Services Inc.\",\n \"Intel Corporation\",\n \"International Paper Co.\",\n \"Interpublic Group of Companies Inc.\",\n \"Interstate Bakeries Corporation\",\n \"International Business Machines Corp.\",\n \"International Flavors & Fragrances Inc.\",\n \"International Multifoods Corporation\",\n \"Intuit Inc.\",\n \"IT Group Inc.\",\n \"ITT Industries Inc.\",\n \"Ivax Corp.\",\n \"J.B. Hunt Transport Services Inc.\",\n \"J.C. Penny Co.\",\n \"J.P. Morgan Chase & Co.\",\n \"Jabil Circuit Inc.\",\n \"Jack In The Box Inc.\",\n \"Jacobs Engineering Group Inc.\",\n \"JDS Uniphase Corp.\",\n \"Jefferson-Pilot Co.\",\n \"John Hancock Financial Services Inc.\",\n \"Johnson & Johnson\",\n \"Johnson Controls Inc.\",\n \"Jones Apparel Group Inc.\",\n \"KB Home\",\n \"Kellogg Company\",\n \"Kellwood Company\",\n \"Kelly Services Inc.\",\n \"Kemet Corp.\",\n \"Kennametal Inc.\",\n \"Kerr-McGee Corporation\",\n \"KeyCorp\",\n \"KeySpan Corp.\",\n \"Kimball International Inc.\",\n \"Kimberly-Clark Corporation\",\n \"Kindred Healthcare Inc.\",\n \"KLA-Tencor Corporation\",\n \"K-Mart Corp.\",\n \"Knight-Ridder Inc.\",\n \"Kohl's Corp.\",\n \"KPMG Consulting Inc.\",\n \"Kroger Co.\",\n \"L-3 Communications Holdings Inc.\",\n \"Laboratory Corporation of America Holdings\",\n \"Lam Research Corporation\",\n \"LandAmerica Financial Group Inc.\",\n \"Lands' End Inc.\",\n \"Landstar System Inc.\",\n \"La-Z-Boy Inc.\",\n \"Lear Corporation\",\n \"Legg Mason Inc.\",\n \"Leggett & Platt Inc.\",\n \"Lehman Brothers Holdings Inc.\",\n \"Lennar Corporation\",\n \"Lennox International Inc.\",\n \"Level 3 Communications Inc.\",\n \"Levi Strauss & Co.\",\n \"Lexmark International Inc.\",\n \"Limited Inc.\",\n \"Lincoln National Corporation\",\n \"Linens 'n Things Inc.\",\n \"Lithia Motors Inc.\",\n \"Liz Claiborne Inc.\",\n \"Lockheed Martin Corporation\",\n \"Loews Corporation\",\n \"Longs Drug Stores Corporation\",\n \"Louisiana-Pacific Corporation\",\n \"Lowe's Companies Inc.\",\n \"LSI Logic Corporation\",\n \"The LTV Corporation\",\n \"The Lubrizol Corporation\",\n \"Lucent Technologies Inc.\",\n \"Lyondell Chemical Company\",\n \"M & T Bank Corporation\",\n \"Magellan Health Services Inc.\",\n \"Mail-Well Inc.\",\n \"Mandalay Resort Group\",\n \"Manor Care Inc.\",\n \"Manpower Inc.\",\n \"Marathon Oil Corporation\",\n \"Mariner Health Care Inc.\",\n \"Markel Corporation\",\n \"Marriott International Inc.\",\n \"Marsh & McLennan Companies Inc.\",\n \"Marsh Supermarkets Inc.\",\n \"Marshall & Ilsley Corporation\",\n \"Martin Marietta Materials Inc.\",\n \"Masco Corporation\",\n \"Massey Energy Company\",\n \"MasTec Inc.\",\n \"Mattel Inc.\",\n \"Maxim Integrated Products Inc.\",\n \"Maxtor Corporation\",\n \"Maxxam Inc.\",\n \"The May Department Stores Company\",\n \"Maytag Corporation\",\n \"MBNA Corporation\",\n \"McCormick & Company Incorporated\",\n \"McDonald's Corporation\",\n \"The McGraw-Hill Companies Inc.\",\n \"McKesson Corporation\",\n \"McLeodUSA Incorporated\",\n \"M.D.C. Holdings Inc.\",\n \"MDU Resources Group Inc.\",\n \"MeadWestvaco Corporation\",\n \"Medtronic Inc.\",\n \"Mellon Financial Corporation\",\n \"The Men's Wearhouse Inc.\",\n \"Merck & Co., Inc.\",\n \"Mercury General Corporation\",\n \"Merrill Lynch & Co. Inc.\",\n \"Metaldyne Corporation\",\n \"Metals USA Inc.\",\n \"MetLife Inc.\",\n \"Metris Companies Inc\",\n \"MGIC Investment Corporation\",\n \"MGM Mirage\",\n \"Michaels Stores Inc.\",\n \"Micron Technology Inc.\",\n \"Microsoft Corporation\",\n \"Milacron Inc.\",\n \"Millennium Chemicals Inc.\",\n \"Mirant Corporation\",\n \"Mohawk Industries Inc.\",\n \"Molex Incorporated\",\n \"The MONY Group Inc.\",\n \"Morgan Stanley Dean Witter & Co.\",\n \"Motorola Inc.\",\n \"MPS Group Inc.\",\n \"Murphy Oil Corporation\",\n \"Nabors Industries Inc\",\n \"Nacco Industries Inc\",\n \"Nash Finch Company\",\n \"National City Corp.\",\n \"National Commerce Financial Corporation\",\n \"National Fuel Gas Company\",\n \"National Oilwell Inc\",\n \"National Rural Utilities Cooperative Finance Corporation\",\n \"National Semiconductor Corporation\",\n \"National Service Industries Inc\",\n \"Navistar International Corporation\",\n \"NCR Corporation\",\n \"The Neiman Marcus Group Inc.\",\n \"New Jersey Resources Corporation\",\n \"New York Times Company\",\n \"Newell Rubbermaid Inc\",\n \"Newmont Mining Corporation\",\n \"Nextel Communications Inc\",\n \"Nicor Inc\",\n \"Nike Inc\",\n \"NiSource Inc\",\n \"Noble Energy Inc\",\n \"Nordstrom Inc\",\n \"Norfolk Southern Corporation\",\n \"Nortek Inc\",\n \"North Fork Bancorporation Inc\",\n \"Northeast Utilities System\",\n \"Northern Trust Corporation\",\n \"Northrop Grumman Corporation\",\n \"NorthWestern Corporation\",\n \"Novellus Systems Inc\",\n \"NSTAR\",\n \"NTL Incorporated\",\n \"Nucor Corp\",\n \"Nvidia Corp\",\n \"NVR Inc\",\n \"Northwest Airlines Corp\",\n \"Occidental Petroleum Corp\",\n \"Ocean Energy Inc\",\n \"Office Depot Inc.\",\n \"OfficeMax Inc\",\n \"OGE Energy Corp\",\n \"Oglethorpe Power Corp.\",\n \"Ohio Casualty Corp.\",\n \"Old Republic International Corp.\",\n \"Olin Corp.\",\n \"OM Group Inc\",\n \"Omnicare Inc\",\n \"Omnicom Group\",\n \"On Semiconductor Corp\",\n \"ONEOK Inc\",\n \"Oracle Corp\",\n \"Oshkosh Truck Corp\",\n \"Outback Steakhouse Inc.\",\n \"Owens & Minor Inc.\",\n \"Owens Corning\",\n \"Owens-Illinois Inc\",\n \"Oxford Health Plans Inc\",\n \"Paccar Inc\",\n \"PacifiCare Health Systems Inc\",\n \"Packaging Corp. of America\",\n \"Pactiv Corp\",\n \"Pall Corp\",\n \"Pantry Inc\",\n \"Park Place Entertainment Corp\",\n \"Parker Hannifin Corp.\",\n \"Pathmark Stores Inc.\",\n \"Paychex Inc\",\n \"Payless Shoesource Inc\",\n \"Penn Traffic Co.\",\n \"Pennzoil-Quaker State Company\",\n \"Pentair Inc\",\n \"Peoples Energy Corp.\",\n \"PeopleSoft Inc\",\n \"Pep Boys Manny, Moe & Jack\",\n \"Potomac Electric Power Co.\",\n \"Pepsi Bottling Group Inc.\",\n \"PepsiAmericas Inc.\",\n \"PepsiCo Inc.\",\n \"Performance Food Group Co.\",\n \"Perini Corp\",\n \"PerkinElmer Inc\",\n \"Perot Systems Corp\",\n \"Petco Animal Supplies Inc.\",\n \"Peter Kiewit Sons', Inc.\",\n \"PETsMART Inc\",\n \"Pfizer Inc\",\n \"Pacific Gas & Electric Corp.\",\n \"Pharmacia Corp\",\n \"Phar Mor Inc.\",\n \"Phelps Dodge Corp.\",\n \"Philip Morris Companies Inc.\",\n \"Phillips Petroleum Co\",\n \"Phillips Van Heusen Corp.\",\n \"Phoenix Companies Inc\",\n \"Pier 1 Imports Inc.\",\n \"Pilgrim's Pride Corporation\",\n \"Pinnacle West Capital Corp\",\n \"Pioneer-Standard Electronics Inc.\",\n \"Pitney Bowes Inc.\",\n \"Pittston Brinks Group\",\n \"Plains All American Pipeline LP\",\n \"PNC Financial Services Group Inc.\",\n \"PNM Resources Inc\",\n \"Polaris Industries Inc.\",\n \"Polo Ralph Lauren Corp\",\n \"PolyOne Corp\",\n \"Popular Inc\",\n \"Potlatch Corp\",\n \"PPG Industries Inc\",\n \"PPL Corp\",\n \"Praxair Inc\",\n \"Precision Castparts Corp\",\n \"Premcor Inc.\",\n \"Pride International Inc\",\n \"Primedia Inc\",\n \"Principal Financial Group Inc.\",\n \"Procter & Gamble Co.\",\n \"Pro-Fac Cooperative Inc.\",\n \"Progress Energy Inc\",\n \"Progressive Corporation\",\n \"Protective Life Corp\",\n \"Provident Financial Group\",\n \"Providian Financial Corp.\",\n \"Prudential Financial Inc.\",\n \"PSS World Medical Inc\",\n \"Public Service Enterprise Group Inc.\",\n \"Publix Super Markets Inc.\",\n \"Puget Energy Inc.\",\n \"Pulte Homes Inc\",\n \"Qualcomm Inc\",\n \"Quanta Services Inc.\",\n \"Quantum Corp\",\n \"Quest Diagnostics Inc.\",\n \"Questar Corp\",\n \"Quintiles Transnational\",\n \"Qwest Communications Intl Inc\",\n \"R.J. Reynolds Tobacco Company\",\n \"R.R. Donnelley & Sons Company\",\n \"Radio Shack Corporation\",\n \"Raymond James Financial Inc.\",\n \"Raytheon Company\",\n \"Reader's Digest Association Inc.\",\n \"Reebok International Ltd.\",\n \"Regions Financial Corp.\",\n \"Regis Corporation\",\n \"Reliance Steel & Aluminum Co.\",\n \"Reliant Energy Inc.\",\n \"Rent A Center Inc\",\n \"Republic Services Inc\",\n \"Revlon Inc\",\n \"RGS Energy Group Inc\",\n \"Rite Aid Corp\",\n \"Riverwood Holding Inc.\",\n \"RoadwayCorp\",\n \"Robert Half International Inc.\",\n \"Rock-Tenn Co\",\n \"Rockwell Automation Inc\",\n \"Rockwell Collins Inc\",\n \"Rohm & Haas Co.\",\n \"Ross Stores Inc\",\n \"RPM Inc.\",\n \"Ruddick Corp\",\n \"Ryder System Inc\",\n \"Ryerson Tull Inc\",\n \"Ryland Group Inc.\",\n \"Sabre Holdings Corp\",\n \"Safeco Corp\",\n \"Safeguard Scientifics Inc.\",\n \"Safeway Inc\",\n \"Saks Inc\",\n \"Sanmina-SCI Inc\",\n \"Sara Lee Corp\",\n \"SBC Communications Inc\",\n \"Scana Corp.\",\n \"Schering-Plough Corp\",\n \"Scholastic Corp\",\n \"SCI Systems Onc.\",\n \"Science Applications Intl. Inc.\",\n \"Scientific-Atlanta Inc\",\n \"Scotts Company\",\n \"Seaboard Corp\",\n \"Sealed Air Corp\",\n \"Sears Roebuck & Co\",\n \"Sempra Energy\",\n \"Sequa Corp\",\n \"Service Corp. International\",\n \"ServiceMaster Co\",\n \"Shaw Group Inc\",\n \"Sherwin-Williams Company\",\n \"Shopko Stores Inc\",\n \"Siebel Systems Inc\",\n \"Sierra Health Services Inc\",\n \"Sierra Pacific Resources\",\n \"Silgan Holdings Inc.\",\n \"Silicon Graphics Inc\",\n \"Simon Property Group Inc\",\n \"SLM Corporation\",\n \"Smith International Inc\",\n \"Smithfield Foods Inc\",\n \"Smurfit-Stone Container Corp\",\n \"Snap-On Inc\",\n \"Solectron Corp\",\n \"Solutia Inc\",\n \"Sonic Automotive Inc.\",\n \"Sonoco Products Co.\",\n \"Southern Company\",\n \"Southern Union Company\",\n \"SouthTrust Corp.\",\n \"Southwest Airlines Co\",\n \"Southwest Gas Corp\",\n \"Sovereign Bancorp Inc.\",\n \"Spartan Stores Inc\",\n \"Spherion Corp\",\n \"Sports Authority Inc\",\n \"Sprint Corp.\",\n \"SPX Corp\",\n \"St. Jude Medical Inc\",\n \"St. Paul Cos.\",\n \"Staff Leasing Inc.\",\n \"StanCorp Financial Group Inc\",\n \"Standard Pacific Corp.\",\n \"Stanley Works\",\n \"Staples Inc\",\n \"Starbucks Corp\",\n \"Starwood Hotels & Resorts Worldwide Inc\",\n \"State Street Corp.\",\n \"Stater Bros. Holdings Inc.\",\n \"Steelcase Inc\",\n \"Stein Mart Inc\",\n \"Stewart & Stevenson Services Inc\",\n \"Stewart Information Services Corp\",\n \"Stilwell Financial Inc\",\n \"Storage Technology Corporation\",\n \"Stryker Corp\",\n \"Sun Healthcare Group Inc.\",\n \"Sun Microsystems Inc.\",\n \"SunGard Data Systems Inc.\",\n \"Sunoco Inc.\",\n \"SunTrust Banks Inc\",\n \"Supervalu Inc\",\n \"Swift Transportation, Co., Inc\",\n \"Symbol Technologies Inc\",\n \"Synovus Financial Corp.\",\n \"Sysco Corp\",\n \"Systemax Inc.\",\n \"Target Corp.\",\n \"Tech Data Corporation\",\n \"TECO Energy Inc\",\n \"Tecumseh Products Company\",\n \"Tektronix Inc\",\n \"Teleflex Incorporated\",\n \"Telephone & Data Systems Inc\",\n \"Tellabs Inc.\",\n \"Temple-Inland Inc\",\n \"Tenet Healthcare Corporation\",\n \"Tenneco Automotive Inc.\",\n \"Teradyne Inc\",\n \"Terex Corp\",\n \"Tesoro Petroleum Corp.\",\n \"Texas Industries Inc.\",\n \"Texas Instruments Incorporated\",\n \"Textron Inc\",\n \"Thermo Electron Corporation\",\n \"Thomas & Betts Corporation\",\n \"Tiffany & Co\",\n \"Timken Company\",\n \"TJX Companies Inc\",\n \"TMP Worldwide Inc\",\n \"Toll Brothers Inc\",\n \"Torchmark Corporation\",\n \"Toro Company\",\n \"Tower Automotive Inc.\",\n \"Toys 'R' Us Inc\",\n \"Trans World Entertainment Corp.\",\n \"TransMontaigne Inc\",\n \"Transocean Inc\",\n \"TravelCenters of America Inc.\",\n \"Triad Hospitals Inc\",\n \"Tribune Company\",\n \"Trigon Healthcare Inc.\",\n \"Trinity Industries Inc\",\n \"Trump Hotels & Casino Resorts Inc.\",\n \"TruServ Corporation\",\n \"TRW Inc\",\n \"TXU Corp\",\n \"Tyson Foods Inc\",\n \"U.S. Bancorp\",\n \"U.S. Industries Inc.\",\n \"UAL Corporation\",\n \"UGI Corporation\",\n \"Unified Western Grocers Inc\",\n \"Union Pacific Corporation\",\n \"Union Planters Corp\",\n \"Unisource Energy Corp\",\n \"Unisys Corporation\",\n \"United Auto Group Inc\",\n \"United Defense Industries Inc.\",\n \"United Parcel Service Inc\",\n \"United Rentals Inc\",\n \"United Stationers Inc\",\n \"United Technologies Corporation\",\n \"UnitedHealth Group Incorporated\",\n \"Unitrin Inc\",\n \"Universal Corporation\",\n \"Universal Forest Products Inc\",\n \"Universal Health Services Inc\",\n \"Unocal Corporation\",\n \"Unova Inc\",\n \"UnumProvident Corporation\",\n \"URS Corporation\",\n \"US Airways Group Inc\",\n \"US Oncology Inc\",\n \"USA Interactive\",\n \"USFreighways Corporation\",\n \"USG Corporation\",\n \"UST Inc\",\n \"Valero Energy Corporation\",\n \"Valspar Corporation\",\n \"Value City Department Stores Inc\",\n \"Varco International Inc\",\n \"Vectren Corporation\",\n \"Veritas Software Corporation\",\n \"Verizon Communications Inc\",\n \"VF Corporation\",\n \"Viacom Inc\",\n \"Viad Corp\",\n \"Viasystems Group Inc\",\n \"Vishay Intertechnology Inc\",\n \"Visteon Corporation\",\n \"Volt Information Sciences Inc\",\n \"Vulcan Materials Company\",\n \"W.R. Berkley Corporation\",\n \"W.R. Grace & Co\",\n \"W.W. Grainger Inc\",\n \"Wachovia Corporation\",\n \"Wakenhut Corporation\",\n \"Walgreen Co\",\n \"Wallace Computer Services Inc\",\n \"Wal-Mart Stores Inc\",\n \"Walt Disney Co\",\n \"Walter Industries Inc\",\n \"Washington Mutual Inc\",\n \"Washington Post Co.\",\n \"Waste Management Inc\",\n \"Watsco Inc\",\n \"Weatherford International Inc\",\n \"Weis Markets Inc.\",\n \"Wellpoint Health Networks Inc\",\n \"Wells Fargo & Company\",\n \"Wendy's International Inc\",\n \"Werner Enterprises Inc\",\n \"WESCO International Inc\",\n \"Western Digital Inc\",\n \"Western Gas Resources Inc\",\n \"WestPoint Stevens Inc\",\n \"Weyerhauser Company\",\n \"WGL Holdings Inc\",\n \"Whirlpool Corporation\",\n \"Whole Foods Market Inc\",\n \"Willamette Industries Inc.\",\n \"Williams Companies Inc\",\n \"Williams Sonoma Inc\",\n \"Winn Dixie Stores Inc\",\n \"Wisconsin Energy Corporation\",\n \"Wm Wrigley Jr Company\",\n \"World Fuel Services Corporation\",\n \"WorldCom Inc\",\n \"Worthington Industries Inc\",\n \"WPS Resources Corporation\",\n \"Wyeth\",\n \"Wyndham International Inc\",\n \"Xcel Energy Inc\",\n \"Xerox Corp\",\n \"Xilinx Inc\",\n \"XO Communications Inc\",\n \"Yellow Corporation\",\n \"York International Corp\",\n \"Yum Brands Inc.\",\n \"Zale Corporation\",\n \"Zions Bancorporation\"\n ],\n\n fileExtension : {\n \"raster\" : [\"bmp\", \"gif\", \"gpl\", \"ico\", \"jpeg\", \"psd\", \"png\", \"psp\", \"raw\", \"tiff\"],\n \"vector\" : [\"3dv\", \"amf\", \"awg\", \"ai\", \"cgm\", \"cdr\", \"cmx\", \"dxf\", \"e2d\", \"egt\", \"eps\", \"fs\", \"odg\", \"svg\", \"xar\"],\n \"3d\" : [\"3dmf\", \"3dm\", \"3mf\", \"3ds\", \"an8\", \"aoi\", \"blend\", \"cal3d\", \"cob\", \"ctm\", \"iob\", \"jas\", \"max\", \"mb\", \"mdx\", \"obj\", \"x\", \"x3d\"],\n \"document\" : [\"doc\", \"docx\", \"dot\", \"html\", \"xml\", \"odt\", \"odm\", \"ott\", \"csv\", \"rtf\", \"tex\", \"xhtml\", \"xps\"]\n },\n\n // Data taken from https://github.com/dmfilipenko/timezones.json/blob/master/timezones.json\n timezones: [\n {\n \"name\": \"Dateline Standard Time\",\n \"abbr\": \"DST\",\n \"offset\": -12,\n \"isdst\": false,\n \"text\": \"(UTC-12:00) International Date Line West\",\n \"utc\": [\n \"Etc/GMT+12\"\n ]\n },\n {\n \"name\": \"UTC-11\",\n \"abbr\": \"U\",\n \"offset\": -11,\n \"isdst\": false,\n \"text\": \"(UTC-11:00) Coordinated Universal Time-11\",\n \"utc\": [\n \"Etc/GMT+11\",\n \"Pacific/Midway\",\n \"Pacific/Niue\",\n \"Pacific/Pago_Pago\"\n ]\n },\n {\n \"name\": \"Hawaiian Standard Time\",\n \"abbr\": \"HST\",\n \"offset\": -10,\n \"isdst\": false,\n \"text\": \"(UTC-10:00) Hawaii\",\n \"utc\": [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\"\n ]\n },\n {\n \"name\": \"Alaskan Standard Time\",\n \"abbr\": \"AKDT\",\n \"offset\": -8,\n \"isdst\": true,\n \"text\": \"(UTC-09:00) Alaska\",\n \"utc\": [\n \"America/Anchorage\",\n \"America/Juneau\",\n \"America/Nome\",\n \"America/Sitka\",\n \"America/Yakutat\"\n ]\n },\n {\n \"name\": \"Pacific Standard Time (Mexico)\",\n \"abbr\": \"PDT\",\n \"offset\": -7,\n \"isdst\": true,\n \"text\": \"(UTC-08:00) Baja California\",\n \"utc\": [\n \"America/Santa_Isabel\"\n ]\n },\n {\n \"name\": \"Pacific Daylight Time\",\n \"abbr\": \"PDT\",\n \"offset\": -7,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Pacific Time (US & Canada)\",\n \"utc\": [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\"\n ]\n },\n {\n \"name\": \"Pacific Standard Time\",\n \"abbr\": \"PST\",\n \"offset\": -8,\n \"isdst\": false,\n \"text\": \"(UTC-08:00) Pacific Time (US & Canada)\",\n \"utc\": [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\",\n \"PST8PDT\"\n ]\n },\n {\n \"name\": \"US Mountain Standard Time\",\n \"abbr\": \"UMST\",\n \"offset\": -7,\n \"isdst\": false,\n \"text\": \"(UTC-07:00) Arizona\",\n \"utc\": [\n \"America/Creston\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"Etc/GMT+7\"\n ]\n },\n {\n \"name\": \"Mountain Standard Time (Mexico)\",\n \"abbr\": \"MDT\",\n \"offset\": -6,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Chihuahua, La Paz, Mazatlan\",\n \"utc\": [\n \"America/Chihuahua\",\n \"America/Mazatlan\"\n ]\n },\n {\n \"name\": \"Mountain Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": -6,\n \"isdst\": true,\n \"text\": \"(UTC-07:00) Mountain Time (US & Canada)\",\n \"utc\": [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\"\n ]\n },\n {\n \"name\": \"Central America Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": -6,\n \"isdst\": false,\n \"text\": \"(UTC-06:00) Central America\",\n \"utc\": [\n \"America/Belize\",\n \"America/Costa_Rica\",\n \"America/El_Salvador\",\n \"America/Guatemala\",\n \"America/Managua\",\n \"America/Tegucigalpa\",\n \"Etc/GMT+6\",\n \"Pacific/Galapagos\"\n ]\n },\n {\n \"name\": \"Central Standard Time\",\n \"abbr\": \"CDT\",\n \"offset\": -5,\n \"isdst\": true,\n \"text\": \"(UTC-06:00) Central Time (US & Canada)\",\n \"utc\": [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\"\n ]\n },\n {\n \"name\": \"Central Standard Time (Mexico)\",\n \"abbr\": \"CDT\",\n \"offset\": -5,\n \"isdst\": true,\n \"text\": \"(UTC-06:00) Guadalajara, Mexico City, Monterrey\",\n \"utc\": [\n \"America/Bahia_Banderas\",\n \"America/Cancun\",\n \"America/Merida\",\n \"America/Mexico_City\",\n \"America/Monterrey\"\n ]\n },\n {\n \"name\": \"Canada Central Standard Time\",\n \"abbr\": \"CCST\",\n \"offset\": -6,\n \"isdst\": false,\n \"text\": \"(UTC-06:00) Saskatchewan\",\n \"utc\": [\n \"America/Regina\",\n \"America/Swift_Current\"\n ]\n },\n {\n \"name\": \"SA Pacific Standard Time\",\n \"abbr\": \"SPST\",\n \"offset\": -5,\n \"isdst\": false,\n \"text\": \"(UTC-05:00) Bogota, Lima, Quito\",\n \"utc\": [\n \"America/Bogota\",\n \"America/Cayman\",\n \"America/Coral_Harbour\",\n \"America/Eirunepe\",\n \"America/Guayaquil\",\n \"America/Jamaica\",\n \"America/Lima\",\n \"America/Panama\",\n \"America/Rio_Branco\",\n \"Etc/GMT+5\"\n ]\n },\n {\n \"name\": \"Eastern Standard Time\",\n \"abbr\": \"EDT\",\n \"offset\": -4,\n \"isdst\": true,\n \"text\": \"(UTC-05:00) Eastern Time (US & Canada)\",\n \"utc\": [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n \"EST5EDT\"\n ]\n },\n {\n \"name\": \"US Eastern Standard Time\",\n \"abbr\": \"UEDT\",\n \"offset\": -4,\n \"isdst\": true,\n \"text\": \"(UTC-05:00) Indiana (East)\",\n \"utc\": [\n \"America/Indiana/Marengo\",\n \"America/Indiana/Vevay\",\n \"America/Indianapolis\"\n ]\n },\n {\n \"name\": \"Venezuela Standard Time\",\n \"abbr\": \"VST\",\n \"offset\": -4.5,\n \"isdst\": false,\n \"text\": \"(UTC-04:30) Caracas\",\n \"utc\": [\n \"America/Caracas\"\n ]\n },\n {\n \"name\": \"Paraguay Standard Time\",\n \"abbr\": \"PYT\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Asuncion\",\n \"utc\": [\n \"America/Asuncion\"\n ]\n },\n {\n \"name\": \"Atlantic Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": -3,\n \"isdst\": true,\n \"text\": \"(UTC-04:00) Atlantic Time (Canada)\",\n \"utc\": [\n \"America/Glace_Bay\",\n \"America/Goose_Bay\",\n \"America/Halifax\",\n \"America/Moncton\",\n \"America/Thule\",\n \"Atlantic/Bermuda\"\n ]\n },\n {\n \"name\": \"Central Brazilian Standard Time\",\n \"abbr\": \"CBST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Cuiaba\",\n \"utc\": [\n \"America/Campo_Grande\",\n \"America/Cuiaba\"\n ]\n },\n {\n \"name\": \"SA Western Standard Time\",\n \"abbr\": \"SWST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan\",\n \"utc\": [\n \"America/Anguilla\",\n \"America/Antigua\",\n \"America/Aruba\",\n \"America/Barbados\",\n \"America/Blanc-Sablon\",\n \"America/Boa_Vista\",\n \"America/Curacao\",\n \"America/Dominica\",\n \"America/Grand_Turk\",\n \"America/Grenada\",\n \"America/Guadeloupe\",\n \"America/Guyana\",\n \"America/Kralendijk\",\n \"America/La_Paz\",\n \"America/Lower_Princes\",\n \"America/Manaus\",\n \"America/Marigot\",\n \"America/Martinique\",\n \"America/Montserrat\",\n \"America/Port_of_Spain\",\n \"America/Porto_Velho\",\n \"America/Puerto_Rico\",\n \"America/Santo_Domingo\",\n \"America/St_Barthelemy\",\n \"America/St_Kitts\",\n \"America/St_Lucia\",\n \"America/St_Thomas\",\n \"America/St_Vincent\",\n \"America/Tortola\",\n \"Etc/GMT+4\"\n ]\n },\n {\n \"name\": \"Pacific SA Standard Time\",\n \"abbr\": \"PSST\",\n \"offset\": -4,\n \"isdst\": false,\n \"text\": \"(UTC-04:00) Santiago\",\n \"utc\": [\n \"America/Santiago\",\n \"Antarctica/Palmer\"\n ]\n },\n {\n \"name\": \"Newfoundland Standard Time\",\n \"abbr\": \"NDT\",\n \"offset\": -2.5,\n \"isdst\": true,\n \"text\": \"(UTC-03:30) Newfoundland\",\n \"utc\": [\n \"America/St_Johns\"\n ]\n },\n {\n \"name\": \"E. South America Standard Time\",\n \"abbr\": \"ESAST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Brasilia\",\n \"utc\": [\n \"America/Sao_Paulo\"\n ]\n },\n {\n \"name\": \"Argentina Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Buenos Aires\",\n \"utc\": [\n \"America/Argentina/La_Rioja\",\n \"America/Argentina/Rio_Gallegos\",\n \"America/Argentina/Salta\",\n \"America/Argentina/San_Juan\",\n \"America/Argentina/San_Luis\",\n \"America/Argentina/Tucuman\",\n \"America/Argentina/Ushuaia\",\n \"America/Buenos_Aires\",\n \"America/Catamarca\",\n \"America/Cordoba\",\n \"America/Jujuy\",\n \"America/Mendoza\"\n ]\n },\n {\n \"name\": \"SA Eastern Standard Time\",\n \"abbr\": \"SEST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Cayenne, Fortaleza\",\n \"utc\": [\n \"America/Araguaina\",\n \"America/Belem\",\n \"America/Cayenne\",\n \"America/Fortaleza\",\n \"America/Maceio\",\n \"America/Paramaribo\",\n \"America/Recife\",\n \"America/Santarem\",\n \"Antarctica/Rothera\",\n \"Atlantic/Stanley\",\n \"Etc/GMT+3\"\n ]\n },\n {\n \"name\": \"Greenland Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": -3,\n \"isdst\": true,\n \"text\": \"(UTC-03:00) Greenland\",\n \"utc\": [\n \"America/Godthab\"\n ]\n },\n {\n \"name\": \"Montevideo Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Montevideo\",\n \"utc\": [\n \"America/Montevideo\"\n ]\n },\n {\n \"name\": \"Bahia Standard Time\",\n \"abbr\": \"BST\",\n \"offset\": -3,\n \"isdst\": false,\n \"text\": \"(UTC-03:00) Salvador\",\n \"utc\": [\n \"America/Bahia\"\n ]\n },\n {\n \"name\": \"UTC-02\",\n \"abbr\": \"U\",\n \"offset\": -2,\n \"isdst\": false,\n \"text\": \"(UTC-02:00) Coordinated Universal Time-02\",\n \"utc\": [\n \"America/Noronha\",\n \"Atlantic/South_Georgia\",\n \"Etc/GMT+2\"\n ]\n },\n {\n \"name\": \"Mid-Atlantic Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": -1,\n \"isdst\": true,\n \"text\": \"(UTC-02:00) Mid-Atlantic - Old\",\n \"utc\": []\n },\n {\n \"name\": \"Azores Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": 0,\n \"isdst\": true,\n \"text\": \"(UTC-01:00) Azores\",\n \"utc\": [\n \"America/Scoresbysund\",\n \"Atlantic/Azores\"\n ]\n },\n {\n \"name\": \"Cape Verde Standard Time\",\n \"abbr\": \"CVST\",\n \"offset\": -1,\n \"isdst\": false,\n \"text\": \"(UTC-01:00) Cape Verde Is.\",\n \"utc\": [\n \"Atlantic/Cape_Verde\",\n \"Etc/GMT+1\"\n ]\n },\n {\n \"name\": \"Morocco Standard Time\",\n \"abbr\": \"MDT\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC) Casablanca\",\n \"utc\": [\n \"Africa/Casablanca\",\n \"Africa/El_Aaiun\"\n ]\n },\n {\n \"name\": \"UTC\",\n \"abbr\": \"UTC\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Coordinated Universal Time\",\n \"utc\": [\n \"America/Danmarkshavn\",\n \"Etc/GMT\"\n ]\n },\n {\n \"name\": \"GMT Standard Time\",\n \"abbr\": \"GMT\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Edinburgh, London\",\n \"utc\": [\n \"Europe/Isle_of_Man\",\n \"Europe/Guernsey\",\n \"Europe/Jersey\",\n \"Europe/London\"\n ]\n },\n {\n \"name\": \"British Summer Time\",\n \"abbr\": \"BST\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Edinburgh, London\",\n \"utc\": [\n \"Europe/Isle_of_Man\",\n \"Europe/Guernsey\",\n \"Europe/Jersey\",\n \"Europe/London\"\n ]\n },\n {\n \"name\": \"GMT Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": 1,\n \"isdst\": true,\n \"text\": \"(UTC) Dublin, Lisbon\",\n \"utc\": [\n \"Atlantic/Canary\",\n \"Atlantic/Faeroe\",\n \"Atlantic/Madeira\",\n \"Europe/Dublin\",\n \"Europe/Lisbon\"\n ]\n },\n {\n \"name\": \"Greenwich Standard Time\",\n \"abbr\": \"GST\",\n \"offset\": 0,\n \"isdst\": false,\n \"text\": \"(UTC) Monrovia, Reykjavik\",\n \"utc\": [\n \"Africa/Abidjan\",\n \"Africa/Accra\",\n \"Africa/Bamako\",\n \"Africa/Banjul\",\n \"Africa/Bissau\",\n \"Africa/Conakry\",\n \"Africa/Dakar\",\n \"Africa/Freetown\",\n \"Africa/Lome\",\n \"Africa/Monrovia\",\n \"Africa/Nouakchott\",\n \"Africa/Ouagadougou\",\n \"Africa/Sao_Tome\",\n \"Atlantic/Reykjavik\",\n \"Atlantic/St_Helena\"\n ]\n },\n {\n \"name\": \"W. Europe Standard Time\",\n \"abbr\": \"WEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\n \"utc\": [\n \"Arctic/Longyearbyen\",\n \"Europe/Amsterdam\",\n \"Europe/Andorra\",\n \"Europe/Berlin\",\n \"Europe/Busingen\",\n \"Europe/Gibraltar\",\n \"Europe/Luxembourg\",\n \"Europe/Malta\",\n \"Europe/Monaco\",\n \"Europe/Oslo\",\n \"Europe/Rome\",\n \"Europe/San_Marino\",\n \"Europe/Stockholm\",\n \"Europe/Vaduz\",\n \"Europe/Vatican\",\n \"Europe/Vienna\",\n \"Europe/Zurich\"\n ]\n },\n {\n \"name\": \"Central Europe Standard Time\",\n \"abbr\": \"CEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\n \"utc\": [\n \"Europe/Belgrade\",\n \"Europe/Bratislava\",\n \"Europe/Budapest\",\n \"Europe/Ljubljana\",\n \"Europe/Podgorica\",\n \"Europe/Prague\",\n \"Europe/Tirane\"\n ]\n },\n {\n \"name\": \"Romance Standard Time\",\n \"abbr\": \"RDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris\",\n \"utc\": [\n \"Africa/Ceuta\",\n \"Europe/Brussels\",\n \"Europe/Copenhagen\",\n \"Europe/Madrid\",\n \"Europe/Paris\"\n ]\n },\n {\n \"name\": \"Central European Standard Time\",\n \"abbr\": \"CEDT\",\n \"offset\": 2,\n \"isdst\": true,\n \"text\": \"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb\",\n \"utc\": [\n \"Europe/Sarajevo\",\n \"Europe/Skopje\",\n \"Europe/Warsaw\",\n \"Europe/Zagreb\"\n ]\n },\n {\n \"name\": \"W. Central Africa Standard Time\",\n \"abbr\": \"WCAST\",\n \"offset\": 1,\n \"isdst\": false,\n \"text\": \"(UTC+01:00) West Central Africa\",\n \"utc\": [\n \"Africa/Algiers\",\n \"Africa/Bangui\",\n \"Africa/Brazzaville\",\n \"Africa/Douala\",\n \"Africa/Kinshasa\",\n \"Africa/Lagos\",\n \"Africa/Libreville\",\n \"Africa/Luanda\",\n \"Africa/Malabo\",\n \"Africa/Ndjamena\",\n \"Africa/Niamey\",\n \"Africa/Porto-Novo\",\n \"Africa/Tunis\",\n \"Etc/GMT-1\"\n ]\n },\n {\n \"name\": \"Namibia Standard Time\",\n \"abbr\": \"NST\",\n \"offset\": 1,\n \"isdst\": false,\n \"text\": \"(UTC+01:00) Windhoek\",\n \"utc\": [\n \"Africa/Windhoek\"\n ]\n },\n {\n \"name\": \"GTB Standard Time\",\n \"abbr\": \"GDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Athens, Bucharest\",\n \"utc\": [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\"\n ]\n },\n {\n \"name\": \"Middle East Standard Time\",\n \"abbr\": \"MEDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Beirut\",\n \"utc\": [\n \"Asia/Beirut\"\n ]\n },\n {\n \"name\": \"Egypt Standard Time\",\n \"abbr\": \"EST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Cairo\",\n \"utc\": [\n \"Africa/Cairo\"\n ]\n },\n {\n \"name\": \"Syria Standard Time\",\n \"abbr\": \"SDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Damascus\",\n \"utc\": [\n \"Asia/Damascus\"\n ]\n },\n {\n \"name\": \"E. Europe Standard Time\",\n \"abbr\": \"EEDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) E. Europe\",\n \"utc\": [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\",\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Nicosia\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\"\n ]\n },\n {\n \"name\": \"South Africa Standard Time\",\n \"abbr\": \"SAST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Harare, Pretoria\",\n \"utc\": [\n \"Africa/Blantyre\",\n \"Africa/Bujumbura\",\n \"Africa/Gaborone\",\n \"Africa/Harare\",\n \"Africa/Johannesburg\",\n \"Africa/Kigali\",\n \"Africa/Lubumbashi\",\n \"Africa/Lusaka\",\n \"Africa/Maputo\",\n \"Africa/Maseru\",\n \"Africa/Mbabane\",\n \"Etc/GMT-2\"\n ]\n },\n {\n \"name\": \"FLE Standard Time\",\n \"abbr\": \"FDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n \"utc\": [\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\"\n ]\n },\n {\n \"name\": \"Turkey Standard Time\",\n \"abbr\": \"TDT\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Istanbul\",\n \"utc\": [\n \"Europe/Istanbul\"\n ]\n },\n {\n \"name\": \"Israel Standard Time\",\n \"abbr\": \"JDT\",\n \"offset\": 3,\n \"isdst\": true,\n \"text\": \"(UTC+02:00) Jerusalem\",\n \"utc\": [\n \"Asia/Jerusalem\"\n ]\n },\n {\n \"name\": \"Libya Standard Time\",\n \"abbr\": \"LST\",\n \"offset\": 2,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Tripoli\",\n \"utc\": [\n \"Africa/Tripoli\"\n ]\n },\n {\n \"name\": \"Jordan Standard Time\",\n \"abbr\": \"JST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Amman\",\n \"utc\": [\n \"Asia/Amman\"\n ]\n },\n {\n \"name\": \"Arabic Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Baghdad\",\n \"utc\": [\n \"Asia/Baghdad\"\n ]\n },\n {\n \"name\": \"Kaliningrad Standard Time\",\n \"abbr\": \"KST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+02:00) Kaliningrad\",\n \"utc\": [\n \"Europe/Kaliningrad\"\n ]\n },\n {\n \"name\": \"Arab Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Kuwait, Riyadh\",\n \"utc\": [\n \"Asia/Aden\",\n \"Asia/Bahrain\",\n \"Asia/Kuwait\",\n \"Asia/Qatar\",\n \"Asia/Riyadh\"\n ]\n },\n {\n \"name\": \"E. Africa Standard Time\",\n \"abbr\": \"EAST\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Nairobi\",\n \"utc\": [\n \"Africa/Addis_Ababa\",\n \"Africa/Asmera\",\n \"Africa/Dar_es_Salaam\",\n \"Africa/Djibouti\",\n \"Africa/Juba\",\n \"Africa/Kampala\",\n \"Africa/Khartoum\",\n \"Africa/Mogadishu\",\n \"Africa/Nairobi\",\n \"Antarctica/Syowa\",\n \"Etc/GMT-3\",\n \"Indian/Antananarivo\",\n \"Indian/Comoro\",\n \"Indian/Mayotte\"\n ]\n },\n {\n \"name\": \"Moscow Standard Time\",\n \"abbr\": \"MSK\",\n \"offset\": 3,\n \"isdst\": false,\n \"text\": \"(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk\",\n \"utc\": [\n \"Europe/Kirov\",\n \"Europe/Moscow\",\n \"Europe/Simferopol\",\n \"Europe/Volgograd\",\n \"Europe/Minsk\"\n ]\n },\n {\n \"name\": \"Samara Time\",\n \"abbr\": \"SAMT\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Samara, Ulyanovsk, Saratov\",\n \"utc\": [\n \"Europe/Astrakhan\",\n \"Europe/Samara\",\n \"Europe/Ulyanovsk\"\n ]\n },\n {\n \"name\": \"Iran Standard Time\",\n \"abbr\": \"IDT\",\n \"offset\": 4.5,\n \"isdst\": true,\n \"text\": \"(UTC+03:30) Tehran\",\n \"utc\": [\n \"Asia/Tehran\"\n ]\n },\n {\n \"name\": \"Arabian Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Abu Dhabi, Muscat\",\n \"utc\": [\n \"Asia/Dubai\",\n \"Asia/Muscat\",\n \"Etc/GMT-4\"\n ]\n },\n {\n \"name\": \"Azerbaijan Standard Time\",\n \"abbr\": \"ADT\",\n \"offset\": 5,\n \"isdst\": true,\n \"text\": \"(UTC+04:00) Baku\",\n \"utc\": [\n \"Asia/Baku\"\n ]\n },\n {\n \"name\": \"Mauritius Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Port Louis\",\n \"utc\": [\n \"Indian/Mahe\",\n \"Indian/Mauritius\",\n \"Indian/Reunion\"\n ]\n },\n {\n \"name\": \"Georgian Standard Time\",\n \"abbr\": \"GET\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Tbilisi\",\n \"utc\": [\n \"Asia/Tbilisi\"\n ]\n },\n {\n \"name\": \"Caucasus Standard Time\",\n \"abbr\": \"CST\",\n \"offset\": 4,\n \"isdst\": false,\n \"text\": \"(UTC+04:00) Yerevan\",\n \"utc\": [\n \"Asia/Yerevan\"\n ]\n },\n {\n \"name\": \"Afghanistan Standard Time\",\n \"abbr\": \"AST\",\n \"offset\": 4.5,\n \"isdst\": false,\n \"text\": \"(UTC+04:30) Kabul\",\n \"utc\": [\n \"Asia/Kabul\"\n ]\n },\n {\n \"name\": \"West Asia Standard Time\",\n \"abbr\": \"WAST\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Ashgabat, Tashkent\",\n \"utc\": [\n \"Antarctica/Mawson\",\n \"Asia/Aqtau\",\n \"Asia/Aqtobe\",\n \"Asia/Ashgabat\",\n \"Asia/Dushanbe\",\n \"Asia/Oral\",\n \"Asia/Samarkand\",\n \"Asia/Tashkent\",\n \"Etc/GMT-5\",\n \"Indian/Kerguelen\",\n \"Indian/Maldives\"\n ]\n },\n {\n \"name\": \"Yekaterinburg Time\",\n \"abbr\": \"YEKT\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Yekaterinburg\",\n \"utc\": [\n \"Asia/Yekaterinburg\"\n ]\n },\n {\n \"name\": \"Pakistan Standard Time\",\n \"abbr\": \"PKT\",\n \"offset\": 5,\n \"isdst\": false,\n \"text\": \"(UTC+05:00) Islamabad, Karachi\",\n \"utc\": [\n \"Asia/Karachi\"\n ]\n },\n {\n \"name\": \"India Standard Time\",\n \"abbr\": \"IST\",\n \"offset\": 5.5,\n \"isdst\": false,\n \"text\": \"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi\",\n \"utc\": [\n \"Asia/Kolkata\"\n ]\n },\n {\n \"name\": \"Sri Lanka Standard Time\",\n \"abbr\": \"SLST\",\n \"offset\": 5.5,\n \"isdst\": false,\n \"text\": \"(UTC+05:30) Sri Jayawardenepura\",\n \"utc\": [\n \"Asia/Colombo\"\n ]\n },\n {\n \"name\": \"Nepal Standard Time\",\n \"abbr\": \"NST\",\n \"offset\": 5.75,\n \"isdst\": false,\n \"text\": \"(UTC+05:45) Kathmandu\",\n \"utc\": [\n \"Asia/Kathmandu\"\n ]\n },\n {\n \"name\": \"Central Asia Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": 6,\n \"isdst\": false,\n \"text\": \"(UTC+06:00) Nur-Sultan (Astana)\",\n \"utc\": [\n \"Antarctica/Vostok\",\n \"Asia/Almaty\",\n \"Asia/Bishkek\",\n \"Asia/Qyzylorda\",\n \"Asia/Urumqi\",\n \"Etc/GMT-6\",\n \"Indian/Chagos\"\n ]\n },\n {\n \"name\": \"Bangladesh Standard Time\",\n \"abbr\": \"BST\",\n \"offset\": 6,\n \"isdst\": false,\n \"text\": \"(UTC+06:00) Dhaka\",\n \"utc\": [\n \"Asia/Dhaka\",\n \"Asia/Thimphu\"\n ]\n },\n {\n \"name\": \"Myanmar Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 6.5,\n \"isdst\": false,\n \"text\": \"(UTC+06:30) Yangon (Rangoon)\",\n \"utc\": [\n \"Asia/Rangoon\",\n \"Indian/Cocos\"\n ]\n },\n {\n \"name\": \"SE Asia Standard Time\",\n \"abbr\": \"SAST\",\n \"offset\": 7,\n \"isdst\": false,\n \"text\": \"(UTC+07:00) Bangkok, Hanoi, Jakarta\",\n \"utc\": [\n \"Antarctica/Davis\",\n \"Asia/Bangkok\",\n \"Asia/Hovd\",\n \"Asia/Jakarta\",\n \"Asia/Phnom_Penh\",\n \"Asia/Pontianak\",\n \"Asia/Saigon\",\n \"Asia/Vientiane\",\n \"Etc/GMT-7\",\n \"Indian/Christmas\"\n ]\n },\n {\n \"name\": \"N. Central Asia Standard Time\",\n \"abbr\": \"NCAST\",\n \"offset\": 7,\n \"isdst\": false,\n \"text\": \"(UTC+07:00) Novosibirsk\",\n \"utc\": [\n \"Asia/Novokuznetsk\",\n \"Asia/Novosibirsk\",\n \"Asia/Omsk\"\n ]\n },\n {\n \"name\": \"China Standard Time\",\n \"abbr\": \"CST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi\",\n \"utc\": [\n \"Asia/Hong_Kong\",\n \"Asia/Macau\",\n \"Asia/Shanghai\"\n ]\n },\n {\n \"name\": \"North Asia Standard Time\",\n \"abbr\": \"NAST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Krasnoyarsk\",\n \"utc\": [\n \"Asia/Krasnoyarsk\"\n ]\n },\n {\n \"name\": \"Singapore Standard Time\",\n \"abbr\": \"MPST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Kuala Lumpur, Singapore\",\n \"utc\": [\n \"Asia/Brunei\",\n \"Asia/Kuala_Lumpur\",\n \"Asia/Kuching\",\n \"Asia/Makassar\",\n \"Asia/Manila\",\n \"Asia/Singapore\",\n \"Etc/GMT-8\"\n ]\n },\n {\n \"name\": \"W. Australia Standard Time\",\n \"abbr\": \"WAST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Perth\",\n \"utc\": [\n \"Antarctica/Casey\",\n \"Australia/Perth\"\n ]\n },\n {\n \"name\": \"Taipei Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Taipei\",\n \"utc\": [\n \"Asia/Taipei\"\n ]\n },\n {\n \"name\": \"Ulaanbaatar Standard Time\",\n \"abbr\": \"UST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Ulaanbaatar\",\n \"utc\": [\n \"Asia/Choibalsan\",\n \"Asia/Ulaanbaatar\"\n ]\n },\n {\n \"name\": \"North Asia East Standard Time\",\n \"abbr\": \"NAEST\",\n \"offset\": 8,\n \"isdst\": false,\n \"text\": \"(UTC+08:00) Irkutsk\",\n \"utc\": [\n \"Asia/Irkutsk\"\n ]\n },\n {\n \"name\": \"Japan Standard Time\",\n \"abbr\": \"JST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Osaka, Sapporo, Tokyo\",\n \"utc\": [\n \"Asia/Dili\",\n \"Asia/Jayapura\",\n \"Asia/Tokyo\",\n \"Etc/GMT-9\",\n \"Pacific/Palau\"\n ]\n },\n {\n \"name\": \"Korea Standard Time\",\n \"abbr\": \"KST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Seoul\",\n \"utc\": [\n \"Asia/Pyongyang\",\n \"Asia/Seoul\"\n ]\n },\n {\n \"name\": \"Cen. Australia Standard Time\",\n \"abbr\": \"CAST\",\n \"offset\": 9.5,\n \"isdst\": false,\n \"text\": \"(UTC+09:30) Adelaide\",\n \"utc\": [\n \"Australia/Adelaide\",\n \"Australia/Broken_Hill\"\n ]\n },\n {\n \"name\": \"AUS Central Standard Time\",\n \"abbr\": \"ACST\",\n \"offset\": 9.5,\n \"isdst\": false,\n \"text\": \"(UTC+09:30) Darwin\",\n \"utc\": [\n \"Australia/Darwin\"\n ]\n },\n {\n \"name\": \"E. Australia Standard Time\",\n \"abbr\": \"EAST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Brisbane\",\n \"utc\": [\n \"Australia/Brisbane\",\n \"Australia/Lindeman\"\n ]\n },\n {\n \"name\": \"AUS Eastern Standard Time\",\n \"abbr\": \"AEST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Canberra, Melbourne, Sydney\",\n \"utc\": [\n \"Australia/Melbourne\",\n \"Australia/Sydney\"\n ]\n },\n {\n \"name\": \"West Pacific Standard Time\",\n \"abbr\": \"WPST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Guam, Port Moresby\",\n \"utc\": [\n \"Antarctica/DumontDUrville\",\n \"Etc/GMT-10\",\n \"Pacific/Guam\",\n \"Pacific/Port_Moresby\",\n \"Pacific/Saipan\",\n \"Pacific/Truk\"\n ]\n },\n {\n \"name\": \"Tasmania Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 10,\n \"isdst\": false,\n \"text\": \"(UTC+10:00) Hobart\",\n \"utc\": [\n \"Australia/Currie\",\n \"Australia/Hobart\"\n ]\n },\n {\n \"name\": \"Yakutsk Standard Time\",\n \"abbr\": \"YST\",\n \"offset\": 9,\n \"isdst\": false,\n \"text\": \"(UTC+09:00) Yakutsk\",\n \"utc\": [\n \"Asia/Chita\",\n \"Asia/Khandyga\",\n \"Asia/Yakutsk\"\n ]\n },\n {\n \"name\": \"Central Pacific Standard Time\",\n \"abbr\": \"CPST\",\n \"offset\": 11,\n \"isdst\": false,\n \"text\": \"(UTC+11:00) Solomon Is., New Caledonia\",\n \"utc\": [\n \"Antarctica/Macquarie\",\n \"Etc/GMT-11\",\n \"Pacific/Efate\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Kosrae\",\n \"Pacific/Noumea\",\n \"Pacific/Ponape\"\n ]\n },\n {\n \"name\": \"Vladivostok Standard Time\",\n \"abbr\": \"VST\",\n \"offset\": 11,\n \"isdst\": false,\n \"text\": \"(UTC+11:00) Vladivostok\",\n \"utc\": [\n \"Asia/Sakhalin\",\n \"Asia/Ust-Nera\",\n \"Asia/Vladivostok\"\n ]\n },\n {\n \"name\": \"New Zealand Standard Time\",\n \"abbr\": \"NZST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Auckland, Wellington\",\n \"utc\": [\n \"Antarctica/McMurdo\",\n \"Pacific/Auckland\"\n ]\n },\n {\n \"name\": \"UTC+12\",\n \"abbr\": \"U\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Coordinated Universal Time+12\",\n \"utc\": [\n \"Etc/GMT-12\",\n \"Pacific/Funafuti\",\n \"Pacific/Kwajalein\",\n \"Pacific/Majuro\",\n \"Pacific/Nauru\",\n \"Pacific/Tarawa\",\n \"Pacific/Wake\",\n \"Pacific/Wallis\"\n ]\n },\n {\n \"name\": \"Fiji Standard Time\",\n \"abbr\": \"FST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Fiji\",\n \"utc\": [\n \"Pacific/Fiji\"\n ]\n },\n {\n \"name\": \"Magadan Standard Time\",\n \"abbr\": \"MST\",\n \"offset\": 12,\n \"isdst\": false,\n \"text\": \"(UTC+12:00) Magadan\",\n \"utc\": [\n \"Asia/Anadyr\",\n \"Asia/Kamchatka\",\n \"Asia/Magadan\",\n \"Asia/Srednekolymsk\"\n ]\n },\n {\n \"name\": \"Kamchatka Standard Time\",\n \"abbr\": \"KDT\",\n \"offset\": 13,\n \"isdst\": true,\n \"text\": \"(UTC+12:00) Petropavlovsk-Kamchatsky - Old\",\n \"utc\": [\n \"Asia/Kamchatka\"\n ]\n },\n {\n \"name\": \"Tonga Standard Time\",\n \"abbr\": \"TST\",\n \"offset\": 13,\n \"isdst\": false,\n \"text\": \"(UTC+13:00) Nuku'alofa\",\n \"utc\": [\n \"Etc/GMT-13\",\n \"Pacific/Enderbury\",\n \"Pacific/Fakaofo\",\n \"Pacific/Tongatapu\"\n ]\n },\n {\n \"name\": \"Samoa Standard Time\",\n \"abbr\": \"SST\",\n \"offset\": 13,\n \"isdst\": false,\n \"text\": \"(UTC+13:00) Samoa\",\n \"utc\": [\n \"Pacific/Apia\"\n ]\n }\n ],\n //List source: http://answers.google.com/answers/threadview/id/589312.html\n profession: [\n \"Airline Pilot\",\n \"Academic Team\",\n \"Accountant\",\n \"Account Executive\",\n \"Actor\",\n \"Actuary\",\n \"Acquisition Analyst\",\n \"Administrative Asst.\",\n \"Administrative Analyst\",\n \"Administrator\",\n \"Advertising Director\",\n \"Aerospace Engineer\",\n \"Agent\",\n \"Agricultural Inspector\",\n \"Agricultural Scientist\",\n \"Air Traffic Controller\",\n \"Animal Trainer\",\n \"Anthropologist\",\n \"Appraiser\",\n \"Architect\",\n \"Art Director\",\n \"Artist\",\n \"Astronomer\",\n \"Athletic Coach\",\n \"Auditor\",\n \"Author\",\n \"Baker\",\n \"Banker\",\n \"Bankruptcy Attorney\",\n \"Benefits Manager\",\n \"Biologist\",\n \"Bio-feedback Specialist\",\n \"Biomedical Engineer\",\n \"Biotechnical Researcher\",\n \"Broadcaster\",\n \"Broker\",\n \"Building Manager\",\n \"Building Contractor\",\n \"Building Inspector\",\n \"Business Analyst\",\n \"Business Planner\",\n \"Business Manager\",\n \"Buyer\",\n \"Call Center Manager\",\n \"Career Counselor\",\n \"Cash Manager\",\n \"Ceramic Engineer\",\n \"Chief Executive Officer\",\n \"Chief Operation Officer\",\n \"Chef\",\n \"Chemical Engineer\",\n \"Chemist\",\n \"Child Care Manager\",\n \"Chief Medical Officer\",\n \"Chiropractor\",\n \"Cinematographer\",\n \"City Housing Manager\",\n \"City Manager\",\n \"Civil Engineer\",\n \"Claims Manager\",\n \"Clinical Research Assistant\",\n \"Collections Manager\",\n \"Compliance Manager\",\n \"Comptroller\",\n \"Computer Manager\",\n \"Commercial Artist\",\n \"Communications Affairs Director\",\n \"Communications Director\",\n \"Communications Engineer\",\n \"Compensation Analyst\",\n \"Computer Programmer\",\n \"Computer Ops. Manager\",\n \"Computer Engineer\",\n \"Computer Operator\",\n \"Computer Graphics Specialist\",\n \"Construction Engineer\",\n \"Construction Manager\",\n \"Consultant\",\n \"Consumer Relations Manager\",\n \"Contract Administrator\",\n \"Copyright Attorney\",\n \"Copywriter\",\n \"Corporate Planner\",\n \"Corrections Officer\",\n \"Cosmetologist\",\n \"Credit Analyst\",\n \"Cruise Director\",\n \"Chief Information Officer\",\n \"Chief Technology Officer\",\n \"Customer Service Manager\",\n \"Cryptologist\",\n \"Dancer\",\n \"Data Security Manager\",\n \"Database Manager\",\n \"Day Care Instructor\",\n \"Dentist\",\n \"Designer\",\n \"Design Engineer\",\n \"Desktop Publisher\",\n \"Developer\",\n \"Development Officer\",\n \"Diamond Merchant\",\n \"Dietitian\",\n \"Direct Marketer\",\n \"Director\",\n \"Distribution Manager\",\n \"Diversity Manager\",\n \"Economist\",\n \"EEO Compliance Manager\",\n \"Editor\",\n \"Education Adminator\",\n \"Electrical Engineer\",\n \"Electro Optical Engineer\",\n \"Electronics Engineer\",\n \"Embassy Management\",\n \"Employment Agent\",\n \"Engineer Technician\",\n \"Entrepreneur\",\n \"Environmental Analyst\",\n \"Environmental Attorney\",\n \"Environmental Engineer\",\n \"Environmental Specialist\",\n \"Escrow Officer\",\n \"Estimator\",\n \"Executive Assistant\",\n \"Executive Director\",\n \"Executive Recruiter\",\n \"Facilities Manager\",\n \"Family Counselor\",\n \"Fashion Events Manager\",\n \"Fashion Merchandiser\",\n \"Fast Food Manager\",\n \"Film Producer\",\n \"Film Production Assistant\",\n \"Financial Analyst\",\n \"Financial Planner\",\n \"Financier\",\n \"Fine Artist\",\n \"Wildlife Specialist\",\n \"Fitness Consultant\",\n \"Flight Attendant\",\n \"Flight Engineer\",\n \"Floral Designer\",\n \"Food & Beverage Director\",\n \"Food Service Manager\",\n \"Forestry Technician\",\n \"Franchise Management\",\n \"Franchise Sales\",\n \"Fraud Investigator\",\n \"Freelance Writer\",\n \"Fund Raiser\",\n \"General Manager\",\n \"Geologist\",\n \"General Counsel\",\n \"Geriatric Specialist\",\n \"Gerontologist\",\n \"Glamour Photographer\",\n \"Golf Club Manager\",\n \"Gourmet Chef\",\n \"Graphic Designer\",\n \"Grounds Keeper\",\n \"Hazardous Waste Manager\",\n \"Health Care Manager\",\n \"Health Therapist\",\n \"Health Service Administrator\",\n \"Hearing Officer\",\n \"Home Economist\",\n \"Horticulturist\",\n \"Hospital Administrator\",\n \"Hotel Manager\",\n \"Human Resources Manager\",\n \"Importer\",\n \"Industrial Designer\",\n \"Industrial Engineer\",\n \"Information Director\",\n \"Inside Sales\",\n \"Insurance Adjuster\",\n \"Interior Decorator\",\n \"Internal Controls Director\",\n \"International Acct.\",\n \"International Courier\",\n \"International Lawyer\",\n \"Interpreter\",\n \"Investigator\",\n \"Investment Banker\",\n \"Investment Manager\",\n \"IT Architect\",\n \"IT Project Manager\",\n \"IT Systems Analyst\",\n \"Jeweler\",\n \"Joint Venture Manager\",\n \"Journalist\",\n \"Labor Negotiator\",\n \"Labor Organizer\",\n \"Labor Relations Manager\",\n \"Lab Services Director\",\n \"Lab Technician\",\n \"Land Developer\",\n \"Landscape Architect\",\n \"Law Enforcement Officer\",\n \"Lawyer\",\n \"Lead Software Engineer\",\n \"Lead Software Test Engineer\",\n \"Leasing Manager\",\n \"Legal Secretary\",\n \"Library Manager\",\n \"Litigation Attorney\",\n \"Loan Officer\",\n \"Lobbyist\",\n \"Logistics Manager\",\n \"Maintenance Manager\",\n \"Management Consultant\",\n \"Managed Care Director\",\n \"Managing Partner\",\n \"Manufacturing Director\",\n \"Manpower Planner\",\n \"Marine Biologist\",\n \"Market Res. Analyst\",\n \"Marketing Director\",\n \"Materials Manager\",\n \"Mathematician\",\n \"Membership Chairman\",\n \"Mechanic\",\n \"Mechanical Engineer\",\n \"Media Buyer\",\n \"Medical Investor\",\n \"Medical Secretary\",\n \"Medical Technician\",\n \"Mental Health Counselor\",\n \"Merchandiser\",\n \"Metallurgical Engineering\",\n \"Meteorologist\",\n \"Microbiologist\",\n \"MIS Manager\",\n \"Motion Picture Director\",\n \"Multimedia Director\",\n \"Musician\",\n \"Network Administrator\",\n \"Network Specialist\",\n \"Network Operator\",\n \"New Product Manager\",\n \"Novelist\",\n \"Nuclear Engineer\",\n \"Nuclear Specialist\",\n \"Nutritionist\",\n \"Nursing Administrator\",\n \"Occupational Therapist\",\n \"Oceanographer\",\n \"Office Manager\",\n \"Operations Manager\",\n \"Operations Research Director\",\n \"Optical Technician\",\n \"Optometrist\",\n \"Organizational Development Manager\",\n \"Outplacement Specialist\",\n \"Paralegal\",\n \"Park Ranger\",\n \"Patent Attorney\",\n \"Payroll Specialist\",\n \"Personnel Specialist\",\n \"Petroleum Engineer\",\n \"Pharmacist\",\n \"Photographer\",\n \"Physical Therapist\",\n \"Physician\",\n \"Physician Assistant\",\n \"Physicist\",\n \"Planning Director\",\n \"Podiatrist\",\n \"Political Analyst\",\n \"Political Scientist\",\n \"Politician\",\n \"Portfolio Manager\",\n \"Preschool Management\",\n \"Preschool Teacher\",\n \"Principal\",\n \"Private Banker\",\n \"Private Investigator\",\n \"Probation Officer\",\n \"Process Engineer\",\n \"Producer\",\n \"Product Manager\",\n \"Product Engineer\",\n \"Production Engineer\",\n \"Production Planner\",\n \"Professional Athlete\",\n \"Professional Coach\",\n \"Professor\",\n \"Project Engineer\",\n \"Project Manager\",\n \"Program Manager\",\n \"Property Manager\",\n \"Public Administrator\",\n \"Public Safety Director\",\n \"PR Specialist\",\n \"Publisher\",\n \"Purchasing Agent\",\n \"Publishing Director\",\n \"Quality Assurance Specialist\",\n \"Quality Control Engineer\",\n \"Quality Control Inspector\",\n \"Radiology Manager\",\n \"Railroad Engineer\",\n \"Real Estate Broker\",\n \"Recreational Director\",\n \"Recruiter\",\n \"Redevelopment Specialist\",\n \"Regulatory Affairs Manager\",\n \"Registered Nurse\",\n \"Rehabilitation Counselor\",\n \"Relocation Manager\",\n \"Reporter\",\n \"Research Specialist\",\n \"Restaurant Manager\",\n \"Retail Store Manager\",\n \"Risk Analyst\",\n \"Safety Engineer\",\n \"Sales Engineer\",\n \"Sales Trainer\",\n \"Sales Promotion Manager\",\n \"Sales Representative\",\n \"Sales Manager\",\n \"Service Manager\",\n \"Sanitation Engineer\",\n \"Scientific Programmer\",\n \"Scientific Writer\",\n \"Securities Analyst\",\n \"Security Consultant\",\n \"Security Director\",\n \"Seminar Presenter\",\n \"Ship's Officer\",\n \"Singer\",\n \"Social Director\",\n \"Social Program Planner\",\n \"Social Research\",\n \"Social Scientist\",\n \"Social Worker\",\n \"Sociologist\",\n \"Software Developer\",\n \"Software Engineer\",\n \"Software Test Engineer\",\n \"Soil Scientist\",\n \"Special Events Manager\",\n \"Special Education Teacher\",\n \"Special Projects Director\",\n \"Speech Pathologist\",\n \"Speech Writer\",\n \"Sports Event Manager\",\n \"Statistician\",\n \"Store Manager\",\n \"Strategic Alliance Director\",\n \"Strategic Planning Director\",\n \"Stress Reduction Specialist\",\n \"Stockbroker\",\n \"Surveyor\",\n \"Structural Engineer\",\n \"Superintendent\",\n \"Supply Chain Director\",\n \"System Engineer\",\n \"Systems Analyst\",\n \"Systems Programmer\",\n \"System Administrator\",\n \"Tax Specialist\",\n \"Teacher\",\n \"Technical Support Specialist\",\n \"Technical Illustrator\",\n \"Technical Writer\",\n \"Technology Director\",\n \"Telecom Analyst\",\n \"Telemarketer\",\n \"Theatrical Director\",\n \"Title Examiner\",\n \"Tour Escort\",\n \"Tour Guide Director\",\n \"Traffic Manager\",\n \"Trainer Translator\",\n \"Transportation Manager\",\n \"Travel Agent\",\n \"Treasurer\",\n \"TV Programmer\",\n \"Underwriter\",\n \"Union Representative\",\n \"University Administrator\",\n \"University Dean\",\n \"Urban Planner\",\n \"Veterinarian\",\n \"Vendor Relations Director\",\n \"Viticulturist\",\n \"Warehouse Manager\"\n ],\n animals : {\n //list of ocean animals comes from https://owlcation.com/stem/list-of-ocean-animals\n \"ocean\" : [\"Acantharea\",\"Anemone\",\"Angelfish King\",\"Ahi Tuna\",\"Albacore\",\"American Oyster\",\"Anchovy\",\"Armored Snail\",\"Arctic Char\",\"Atlantic Bluefin Tuna\",\"Atlantic Cod\",\"Atlantic Goliath Grouper\",\"Atlantic Trumpetfish\",\"Atlantic Wolffish\",\"Baleen Whale\",\"Banded Butterflyfish\",\"Banded Coral Shrimp\",\"Banded Sea Krait\",\"Barnacle\",\"Barndoor Skate\",\"Barracuda\",\"Basking Shark\",\"Bass\",\"Beluga Whale\",\"Bluebanded Goby\",\"Bluehead Wrasse\",\"Bluefish\",\"Bluestreak Cleaner-Wrasse\",\"Blue Marlin\",\"Blue Shark\",\"Blue Spiny Lobster\",\"Blue Tang\",\"Blue Whale\",\"Broadclub Cuttlefish\",\"Bull Shark\",\"Chambered Nautilus\",\"Chilean Basket Star\",\"Chilean Jack Mackerel\",\"Chinook Salmon\",\"Christmas Tree Worm\",\"Clam\",\"Clown Anemonefish\",\"Clown Triggerfish\",\"Cod\",\"Coelacanth\",\"Cockscomb Cup Coral\",\"Common Fangtooth\",\"Conch\",\"Cookiecutter Shark\",\"Copepod\",\"Coral\",\"Corydoras\",\"Cownose Ray\",\"Crab\",\"Crown-of-Thorns Starfish\",\"Cushion Star\",\"Cuttlefish\",\"California Sea Otters\",\"Dolphin\",\"Dolphinfish\",\"Dory\",\"Devil Fish\",\"Dugong\",\"Dumbo Octopus\",\"Dungeness Crab\",\"Eccentric Sand Dollar\",\"Edible Sea Cucumber\",\"Eel\",\"Elephant Seal\",\"Elkhorn Coral\",\"Emperor Shrimp\",\"Estuarine Crocodile\",\"Fathead Sculpin\",\"Fiddler Crab\",\"Fin Whale\",\"Flameback\",\"Flamingo Tongue Snail\",\"Flashlight Fish\",\"Flatback Turtle\",\"Flatfish\",\"Flying Fish\",\"Flounder\",\"Fluke\",\"French Angelfish\",\"Frilled Shark\",\"Fugu (also called Pufferfish)\",\"Gar\",\"Geoduck\",\"Giant Barrel Sponge\",\"Giant Caribbean Sea Anemone\",\"Giant Clam\",\"Giant Isopod\",\"Giant Kingfish\",\"Giant Oarfish\",\"Giant Pacific Octopus\",\"Giant Pyrosome\",\"Giant Sea Star\",\"Giant Squid\",\"Glowing Sucker Octopus\",\"Giant Tube Worm\",\"Goblin Shark\",\"Goosefish\",\"Great White Shark\",\"Greenland Shark\",\"Grey Atlantic Seal\",\"Grouper\",\"Grunion\",\"Guineafowl Puffer\",\"Haddock\",\"Hake\",\"Halibut\",\"Hammerhead Shark\",\"Hapuka\",\"Harbor Porpoise\",\"Harbor Seal\",\"Hatchetfish\",\"Hawaiian Monk Seal\",\"Hawksbill Turtle\",\"Hector's Dolphin\",\"Hermit Crab\",\"Herring\",\"Hoki\",\"Horn Shark\",\"Horseshoe Crab\",\"Humpback Anglerfish\",\"Humpback Whale\",\"Icefish\",\"Imperator Angelfish\",\"Irukandji Jellyfish\",\"Isopod\",\"Ivory Bush Coral\",\"Japanese Spider Crab\",\"Jellyfish\",\"John Dory\",\"Juan Fernandez Fur Seal\",\"Killer Whale\",\"Kiwa Hirsuta\",\"Krill\",\"Lagoon Triggerfish\",\"Lamprey\",\"Leafy Seadragon\",\"Leopard Seal\",\"Limpet\",\"Ling\",\"Lionfish\",\"Lions Mane Jellyfish\",\"Lobe Coral\",\"Lobster\",\"Loggerhead Turtle\",\"Longnose Sawshark\",\"Longsnout Seahorse\",\"Lophelia Coral\",\"Marrus Orthocanna\",\"Manatee\",\"Manta Ray\",\"Marlin\",\"Megamouth Shark\",\"Mexican Lookdown\",\"Mimic Octopus\",\"Moon Jelly\",\"Mollusk\",\"Monkfish\",\"Moray Eel\",\"Mullet\",\"Mussel\",\"Megaladon\",\"Napoleon Wrasse\",\"Nassau Grouper\",\"Narwhal\",\"Nautilus\",\"Needlefish\",\"Northern Seahorse\",\"North Atlantic Right Whale\",\"Northern Red Snapper\",\"Norway Lobster\",\"Nudibranch\",\"Nurse Shark\",\"Oarfish\",\"Ocean Sunfish\",\"Oceanic Whitetip Shark\",\"Octopus\",\"Olive Sea Snake\",\"Orange Roughy\",\"Ostracod\",\"Otter\",\"Oyster\",\"Pacific Angelshark\",\"Pacific Blackdragon\",\"Pacific Halibut\",\"Pacific Sardine\",\"Pacific Sea Nettle Jellyfish\",\"Pacific White Sided Dolphin\",\"Pantropical Spotted Dolphin\",\"Patagonian Toothfish\",\"Peacock Mantis Shrimp\",\"Pelagic Thresher Shark\",\"Penguin\",\"Peruvian Anchoveta\",\"Pilchard\",\"Pink Salmon\",\"Pinniped\",\"Plankton\",\"Porpoise\",\"Polar Bear\",\"Portuguese Man o' War\",\"Pycnogonid Sea Spider\",\"Quahog\",\"Queen Angelfish\",\"Queen Conch\",\"Queen Parrotfish\",\"Queensland Grouper\",\"Ragfish\",\"Ratfish\",\"Rattail Fish\",\"Ray\",\"Red Drum\",\"Red King Crab\",\"Ringed Seal\",\"Risso's Dolphin\",\"Ross Seals\",\"Sablefish\",\"Salmon\",\"Sand Dollar\",\"Sandbar Shark\",\"Sawfish\",\"Sarcastic Fringehead\",\"Scalloped Hammerhead Shark\",\"Seahorse\",\"Sea Cucumber\",\"Sea Lion\",\"Sea Urchin\",\"Seal\",\"Shark\",\"Shortfin Mako Shark\",\"Shovelnose Guitarfish\",\"Shrimp\",\"Silverside Fish\",\"Skipjack Tuna\",\"Slender Snipe Eel\",\"Smalltooth Sawfish\",\"Smelts\",\"Sockeye Salmon\",\"Southern Stingray\",\"Sponge\",\"Spotted Porcupinefish\",\"Spotted Dolphin\",\"Spotted Eagle Ray\",\"Spotted Moray\",\"Squid\",\"Squidworm\",\"Starfish\",\"Stickleback\",\"Stonefish\",\"Stoplight Loosejaw\",\"Sturgeon\",\"Swordfish\",\"Tan Bristlemouth\",\"Tasseled Wobbegong\",\"Terrible Claw Lobster\",\"Threespot Damselfish\",\"Tiger Prawn\",\"Tiger Shark\",\"Tilefish\",\"Toadfish\",\"Tropical Two-Wing Flyfish\",\"Tuna\",\"Umbrella Squid\",\"Velvet Crab\",\"Venus Flytrap Sea Anemone\",\"Vigtorniella Worm\",\"Viperfish\",\"Vampire Squid\",\"Vaquita\",\"Wahoo\",\"Walrus\",\"West Indian Manatee\",\"Whale\",\"Whale Shark\",\"Whiptail Gulper\",\"White-Beaked Dolphin\",\"White-Ring Garden Eel\",\"White Shrimp\",\"Wobbegong\",\"Wrasse\",\"Wreckfish\",\"Xiphosura\",\"Yellowtail Damselfish\",\"Yelloweye Rockfish\",\"Yellow Cup Black Coral\",\"Yellow Tube Sponge\",\"Yellowfin Tuna\",\"Zebrashark\",\"Zooplankton\"],\n //list of desert, grassland, and forest animals comes from http://www.skyenimals.com/\n \"desert\" : [\"Aardwolf\",\"Addax\",\"African Wild Ass\",\"Ant\",\"Antelope\",\"Armadillo\",\"Baboon\",\"Badger\",\"Bat\",\"Bearded Dragon\",\"Beetle\",\"Bird\",\"Black-footed Cat\",\"Boa\",\"Brown Bear\",\"Bustard\",\"Butterfly\",\"Camel\",\"Caracal\",\"Caracara\",\"Caterpillar\",\"Centipede\",\"Cheetah\",\"Chipmunk\",\"Chuckwalla\",\"Climbing Mouse\",\"Coati\",\"Cobra\",\"Cotton Rat\",\"Cougar\",\"Courser\",\"Crane Fly\",\"Crow\",\"Dassie Rat\",\"Dove\",\"Dunnart\",\"Eagle\",\"Echidna\",\"Elephant\",\"Emu\",\"Falcon\",\"Fly\",\"Fox\",\"Frogmouth\",\"Gecko\",\"Geoffroy's Cat\",\"Gerbil\",\"Grasshopper\",\"Guanaco\",\"Gundi\",\"Hamster\",\"Hawk\",\"Hedgehog\",\"Hyena\",\"Hyrax\",\"Jackal\",\"Kangaroo\",\"Kangaroo Rat\",\"Kestrel\",\"Kowari\",\"Kultarr\",\"Leopard\",\"Lion\",\"Macaw\",\"Meerkat\",\"Mouse\",\"Oryx\",\"Ostrich\",\"Owl\",\"Pronghorn\",\"Python\",\"Rabbit\",\"Raccoon\",\"Rattlesnake\",\"Rhinoceros\",\"Sand Cat\",\"Spectacled Bear\",\"Spiny Mouse\",\"Starling\",\"Stick Bug\",\"Tarantula\",\"Tit\",\"Toad\",\"Tortoise\",\"Tyrant Flycatcher\",\"Viper\",\"Vulture\",\"Waxwing\",\"Xerus\",\"Zebra\"],\n \"grassland\" : [\"Aardvark\",\"Aardwolf\",\"Accentor\",\"African Buffalo\",\"African Wild Dog\",\"Alpaca\",\"Anaconda\",\"Ant\",\"Anteater\",\"Antelope\",\"Armadillo\",\"Baboon\",\"Badger\",\"Bandicoot\",\"Barbet\",\"Bat\",\"Bee\",\"Bee-eater\",\"Beetle\",\"Bird\",\"Bison\",\"Black-footed Cat\",\"Black-footed Ferret\",\"Bluebird\",\"Boa\",\"Bowerbird\",\"Brown Bear\",\"Bush Dog\",\"Bushshrike\",\"Bustard\",\"Butterfly\",\"Buzzard\",\"Caracal\",\"Caracara\",\"Cardinal\",\"Caterpillar\",\"Cheetah\",\"Chipmunk\",\"Civet\",\"Climbing Mouse\",\"Clouded Leopard\",\"Coati\",\"Cobra\",\"Cockatoo\",\"Cockroach\",\"Common Genet\",\"Cotton Rat\",\"Cougar\",\"Courser\",\"Coyote\",\"Crane\",\"Crane Fly\",\"Cricket\",\"Crow\",\"Culpeo\",\"Death Adder\",\"Deer\",\"Deer Mouse\",\"Dingo\",\"Dinosaur\",\"Dove\",\"Drongo\",\"Duck\",\"Duiker\",\"Dunnart\",\"Eagle\",\"Echidna\",\"Elephant\",\"Elk\",\"Emu\",\"Falcon\",\"Finch\",\"Flea\",\"Fly\",\"Flying Frog\",\"Fox\",\"Frog\",\"Frogmouth\",\"Garter Snake\",\"Gazelle\",\"Gecko\",\"Geoffroy's Cat\",\"Gerbil\",\"Giant Tortoise\",\"Giraffe\",\"Grasshopper\",\"Grison\",\"Groundhog\",\"Grouse\",\"Guanaco\",\"Guinea Pig\",\"Hamster\",\"Harrier\",\"Hartebeest\",\"Hawk\",\"Hedgehog\",\"Helmetshrike\",\"Hippopotamus\",\"Hornbill\",\"Hyena\",\"Hyrax\",\"Impala\",\"Jackal\",\"Jaguar\",\"Jaguarundi\",\"Kangaroo\",\"Kangaroo Rat\",\"Kestrel\",\"Kultarr\",\"Ladybug\",\"Leopard\",\"Lion\",\"Macaw\",\"Meerkat\",\"Mouse\",\"Newt\",\"Oryx\",\"Ostrich\",\"Owl\",\"Pangolin\",\"Pheasant\",\"Prairie Dog\",\"Pronghorn\",\"Przewalski's Horse\",\"Python\",\"Quoll\",\"Rabbit\",\"Raven\",\"Rhinoceros\",\"Shelduck\",\"Sloth Bear\",\"Spectacled Bear\",\"Squirrel\",\"Starling\",\"Stick Bug\",\"Tamandua\",\"Tasmanian Devil\",\"Thornbill\",\"Thrush\",\"Toad\",\"Tortoise\"],\n \"forest\" : [\"Agouti\",\"Anaconda\",\"Anoa\",\"Ant\",\"Anteater\",\"Antelope\",\"Armadillo\",\"Asian Black Bear\",\"Aye-aye\",\"Babirusa\",\"Baboon\",\"Badger\",\"Bandicoot\",\"Banteng\",\"Barbet\",\"Basilisk\",\"Bat\",\"Bearded Dragon\",\"Bee\",\"Bee-eater\",\"Beetle\",\"Bettong\",\"Binturong\",\"Bird-of-paradise\",\"Bongo\",\"Bowerbird\",\"Bulbul\",\"Bush Dog\",\"Bushbaby\",\"Bushshrike\",\"Butterfly\",\"Buzzard\",\"Caecilian\",\"Cardinal\",\"Cassowary\",\"Caterpillar\",\"Centipede\",\"Chameleon\",\"Chimpanzee\",\"Cicada\",\"Civet\",\"Clouded Leopard\",\"Coati\",\"Cobra\",\"Cockatoo\",\"Cockroach\",\"Colugo\",\"Cotinga\",\"Cotton Rat\",\"Cougar\",\"Crane Fly\",\"Cricket\",\"Crocodile\",\"Crow\",\"Cuckoo\",\"Cuscus\",\"Death Adder\",\"Deer\",\"Dhole\",\"Dingo\",\"Dinosaur\",\"Drongo\",\"Duck\",\"Duiker\",\"Eagle\",\"Echidna\",\"Elephant\",\"Finch\",\"Flat-headed Cat\",\"Flea\",\"Flowerpecker\",\"Fly\",\"Flying Frog\",\"Fossa\",\"Frog\",\"Frogmouth\",\"Gaur\",\"Gecko\",\"Gorilla\",\"Grison\",\"Hawaiian Honeycreeper\",\"Hawk\",\"Hedgehog\",\"Helmetshrike\",\"Hornbill\",\"Hyrax\",\"Iguana\",\"Jackal\",\"Jaguar\",\"Jaguarundi\",\"Kestrel\",\"Ladybug\",\"Lemur\",\"Leopard\",\"Lion\",\"Macaw\",\"Mandrill\",\"Margay\",\"Monkey\",\"Mouse\",\"Mouse Deer\",\"Newt\",\"Okapi\",\"Old World Flycatcher\",\"Orangutan\",\"Owl\",\"Pangolin\",\"Peafowl\",\"Pheasant\",\"Possum\",\"Python\",\"Quokka\",\"Rabbit\",\"Raccoon\",\"Red Panda\",\"Red River Hog\",\"Rhinoceros\",\"Sloth Bear\",\"Spectacled Bear\",\"Squirrel\",\"Starling\",\"Stick Bug\",\"Sun Bear\",\"Tamandua\",\"Tamarin\",\"Tapir\",\"Tarantula\",\"Thrush\",\"Tiger\",\"Tit\",\"Toad\",\"Tortoise\",\"Toucan\",\"Trogon\",\"Trumpeter\",\"Turaco\",\"Turtle\",\"Tyrant Flycatcher\",\"Viper\",\"Vulture\",\"Wallaby\",\"Warbler\",\"Wasp\",\"Waxwing\",\"Weaver\",\"Weaver-finch\",\"Whistler\",\"White-eye\",\"Whydah\",\"Woodswallow\",\"Worm\",\"Wren\",\"Xenops\",\"Yellowjacket\",\"Accentor\",\"African Buffalo\",\"American Black Bear\",\"Anole\",\"Bird\",\"Bison\",\"Boa\",\"Brown Bear\",\"Chipmunk\",\"Common Genet\",\"Copperhead\",\"Coyote\",\"Deer Mouse\",\"Dormouse\",\"Elk\",\"Emu\",\"Fisher\",\"Fox\",\"Garter Snake\",\"Giant Panda\",\"Giant Tortoise\",\"Groundhog\",\"Grouse\",\"Guanaco\",\"Himalayan Tahr\",\"Kangaroo\",\"Koala\",\"Numbat\",\"Quoll\",\"Raccoon dog\",\"Tasmanian Devil\",\"Thornbill\",\"Turkey\",\"Vole\",\"Weasel\",\"Wildcat\",\"Wolf\",\"Wombat\",\"Woodchuck\",\"Woodpecker\"],\n //list of farm animals comes from https://www.buzzle.com/articles/farm-animals-list.html\n \"farm\" : [\"Alpaca\",\"Buffalo\",\"Banteng\",\"Cow\",\"Cat\",\"Chicken\",\"Carp\",\"Camel\",\"Donkey\",\"Dog\",\"Duck\",\"Emu\",\"Goat\",\"Gayal\",\"Guinea\",\"Goose\",\"Horse\",\"Honey\",\"Llama\",\"Pig\",\"Pigeon\",\"Rhea\",\"Rabbit\",\"Sheep\",\"Silkworm\",\"Turkey\",\"Yak\",\"Zebu\"],\n //list of pet animals comes from https://www.dogbreedinfo.com/pets/pet.htm\n \"pet\" : [\"Bearded Dragon\",\"Birds\",\"Burro\",\"Cats\",\"Chameleons\",\"Chickens\",\"Chinchillas\",\"Chinese Water Dragon\",\"Cows\",\"Dogs\",\"Donkey\",\"Ducks\",\"Ferrets\",\"Fish\",\"Geckos\",\"Geese\",\"Gerbils\",\"Goats\",\"Guinea Fowl\",\"Guinea Pigs\",\"Hamsters\",\"Hedgehogs\",\"Horses\",\"Iguanas\",\"Llamas\",\"Lizards\",\"Mice\",\"Mule\",\"Peafowl\",\"Pigs and Hogs\",\"Pigeons\",\"Ponies\",\"Pot Bellied Pig\",\"Rabbits\",\"Rats\",\"Sheep\",\"Skinks\",\"Snakes\",\"Stick Insects\",\"Sugar Gliders\",\"Tarantula\",\"Turkeys\",\"Turtles\"],\n //list of zoo animals comes from https://bronxzoo.com/animals\n \"zoo\" : [\"Aardvark\",\"African Wild Dog\",\"Aldabra Tortoise\",\"American Alligator\",\"American Bison\",\"Amur Tiger\",\"Anaconda\",\"Andean Condor\",\"Asian Elephant\",\"Baby Doll Sheep\",\"Bald Eagle\",\"Barred Owl\",\"Blue Iguana\",\"Boer Goat\",\"California Sea Lion\",\"Caribbean Flamingo\",\"Chinchilla\",\"Collared Lemur\",\"Coquerel's Sifaka\",\"Cuban Amazon Parrot\",\"Ebony Langur\",\"Fennec Fox\",\"Fossa\",\"Gelada\",\"Giant Anteater\",\"Giraffe\",\"Gorilla\",\"Grizzly Bear\",\"Henkel's Leaf-tailed Gecko\",\"Indian Gharial\",\"Indian Rhinoceros\",\"King Cobra\",\"King Vulture\",\"Komodo Dragon\",\"Linne's Two-toed Sloth\",\"Lion\",\"Little Penguin\",\"Madagascar Tree Boa\",\"Magellanic Penguin\",\"Malayan Tapir\",\"Malayan Tiger\",\"Matschies Tree Kangaroo\",\"Mini Donkey\",\"Monarch Butterfly\",\"Nile crocodile\",\"North American Porcupine\",\"Nubian Ibex\",\"Okapi\",\"Poison Dart Frog\",\"Polar Bear\",\"Pygmy Marmoset\",\"Radiated Tortoise\",\"Red Panda\",\"Red Ruffed Lemur\",\"Ring-tailed Lemur\",\"Ring-tailed Mongoose\",\"Rock Hyrax\",\"Small Clawed Asian Otter\",\"Snow Leopard\",\"Snowy Owl\",\"Southern White-faced Owl\",\"Southern White Rhinocerous\",\"Squirrel Monkey\",\"Tufted Puffin\",\"White Cheeked Gibbon\",\"White-throated Bee Eater\",\"Zebra\"]\n },\n primes: [\n // 1230 first primes, i.e. all primes up to the first one greater than 10000, inclusive.\n 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007\n ],\n emotions: [\n \"love\",\n \"joy\",\n \"surprise\",\n \"anger\",\n \"sadness\",\n \"fear\"\n ],\n };\n\n var o_hasOwnProperty = Object.prototype.hasOwnProperty;\n var o_keys = (Object.keys || function(obj) {\n var result = [];\n for (var key in obj) {\n if (o_hasOwnProperty.call(obj, key)) {\n result.push(key);\n }\n }\n\n return result;\n });\n\n\n function _copyObject(source, target) {\n var keys = o_keys(source);\n var key;\n\n for (var i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n target[key] = source[key] || target[key];\n }\n }\n\n function _copyArray(source, target) {\n for (var i = 0, l = source.length; i < l; i++) {\n target[i] = source[i];\n }\n }\n\n function copyObject(source, _target) {\n var isArray = Array.isArray(source);\n var target = _target || (isArray ? new Array(source.length) : {});\n\n if (isArray) {\n _copyArray(source, target);\n } else {\n _copyObject(source, target);\n }\n\n return target;\n }\n\n /** Get the data based on key**/\n Chance.prototype.get = function (name) {\n return copyObject(data[name]);\n };\n\n // Mac Address\n Chance.prototype.mac_address = function(options){\n // typically mac addresses are separated by \":\"\n // however they can also be separated by \"-\"\n // the network variant uses a dot every fourth byte\n\n options = initOptions(options);\n if(!options.separator) {\n options.separator = options.networkVersion ? \".\" : \":\";\n }\n\n var mac_pool=\"ABCDEF1234567890\",\n mac = \"\";\n if(!options.networkVersion) {\n mac = this.n(this.string, 6, { pool: mac_pool, length:2 }).join(options.separator);\n } else {\n mac = this.n(this.string, 3, { pool: mac_pool, length:4 }).join(options.separator);\n }\n\n return mac;\n };\n\n Chance.prototype.normal = function (options) {\n options = initOptions(options, {mean : 0, dev : 1, pool : []});\n\n testRange(\n options.pool.constructor !== Array,\n \"Chance: The pool option must be a valid array.\"\n );\n testRange(\n typeof options.mean !== 'number',\n \"Chance: Mean (mean) must be a number\"\n );\n testRange(\n typeof options.dev !== 'number',\n \"Chance: Standard deviation (dev) must be a number\"\n );\n\n // If a pool has been passed, then we are returning an item from that pool,\n // using the normal distribution settings that were passed in\n if (options.pool.length > 0) {\n return this.normal_pool(options);\n }\n\n // The Marsaglia Polar method\n var s, u, v, norm,\n mean = options.mean,\n dev = options.dev;\n\n do {\n // U and V are from the uniform distribution on (-1, 1)\n u = this.random() * 2 - 1;\n v = this.random() * 2 - 1;\n\n s = u * u + v * v;\n } while (s >= 1);\n\n // Compute the standard normal variate\n norm = u * Math.sqrt(-2 * Math.log(s) / s);\n\n // Shape and scale\n return dev * norm + mean;\n };\n\n Chance.prototype.normal_pool = function(options) {\n var performanceCounter = 0;\n do {\n var idx = Math.round(this.normal({ mean: options.mean, dev: options.dev }));\n if (idx < options.pool.length && idx >= 0) {\n return options.pool[idx];\n } else {\n performanceCounter++;\n }\n } while(performanceCounter < 100);\n\n throw new RangeError(\"Chance: Your pool is too small for the given mean and standard deviation. Please adjust.\");\n };\n\n Chance.prototype.radio = function (options) {\n // Initial Letter (Typically Designated by Side of Mississippi River)\n options = initOptions(options, {side : \"?\"});\n var fl = \"\";\n switch (options.side.toLowerCase()) {\n case \"east\":\n case \"e\":\n fl = \"W\";\n break;\n case \"west\":\n case \"w\":\n fl = \"K\";\n break;\n default:\n fl = this.character({pool: \"KW\"});\n break;\n }\n\n return fl + this.character({alpha: true, casing: \"upper\"}) +\n this.character({alpha: true, casing: \"upper\"}) +\n this.character({alpha: true, casing: \"upper\"});\n };\n\n // Set the data as key and data or the data map\n Chance.prototype.set = function (name, values) {\n if (typeof name === \"string\") {\n data[name] = values;\n } else {\n data = copyObject(name, data);\n }\n };\n\n Chance.prototype.tv = function (options) {\n return this.radio(options);\n };\n\n // ID number for Brazil companies\n Chance.prototype.cnpj = function () {\n var n = this.n(this.natural, 8, { max: 9 });\n var d1 = 2+n[7]*6+n[6]*7+n[5]*8+n[4]*9+n[3]*2+n[2]*3+n[1]*4+n[0]*5;\n d1 = 11 - (d1 % 11);\n if (d1>=10){\n d1 = 0;\n }\n var d2 = d1*2+3+n[7]*7+n[6]*8+n[5]*9+n[4]*2+n[3]*3+n[2]*4+n[1]*5+n[0]*6;\n d2 = 11 - (d2 % 11);\n if (d2>=10){\n d2 = 0;\n }\n return ''+n[0]+n[1]+'.'+n[2]+n[3]+n[4]+'.'+n[5]+n[6]+n[7]+'/0001-'+d1+d2;\n };\n\n Chance.prototype.emotion = function () {\n return this.pick(this.get(\"emotions\"));\n };\n\n // -- End Miscellaneous --\n\n Chance.prototype.mersenne_twister = function (seed) {\n return new MersenneTwister(seed);\n };\n\n Chance.prototype.blueimp_md5 = function () {\n return new BlueImpMD5();\n };\n\n // Mersenne Twister from https://gist.github.com/banksean/300494\n /*\n A C-program for MT19937, with initialization improved 2002/1/26.\n Coded by Takuji Nishimura and Makoto Matsumoto.\n\n Before using, initialize the state by using init_genrand(seed)\n or init_by_array(init_key, key_length).\n\n Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n 3. The names of its contributors may not be used to endorse or promote\n products derived from this software without specific prior written\n permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n Any feedback is very welcome.\n http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html\n email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)\n */\n var MersenneTwister = function (seed) {\n if (seed === undefined) {\n // kept random number same size as time used previously to ensure no unexpected results downstream\n seed = Math.floor(Math.random()*Math.pow(10,13));\n }\n /* Period parameters */\n this.N = 624;\n this.M = 397;\n this.MATRIX_A = 0x9908b0df; /* constant vector a */\n this.UPPER_MASK = 0x80000000; /* most significant w-r bits */\n this.LOWER_MASK = 0x7fffffff; /* least significant r bits */\n\n this.mt = new Array(this.N); /* the array for the state vector */\n this.mti = this.N + 1; /* mti==N + 1 means mt[N] is not initialized */\n\n this.init_genrand(seed);\n };\n\n /* initializes mt[N] with a seed */\n MersenneTwister.prototype.init_genrand = function (s) {\n this.mt[0] = s >>> 0;\n for (this.mti = 1; this.mti < this.N; this.mti++) {\n s = this.mt[this.mti - 1] ^ (this.mt[this.mti - 1] >>> 30);\n this.mt[this.mti] = (((((s & 0xffff0000) >>> 16) * 1812433253) << 16) + (s & 0x0000ffff) * 1812433253) + this.mti;\n /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */\n /* In the previous versions, MSBs of the seed affect */\n /* only MSBs of the array mt[]. */\n /* 2002/01/09 modified by Makoto Matsumoto */\n this.mt[this.mti] >>>= 0;\n /* for >32 bit machines */\n }\n };\n\n /* initialize by an array with array-length */\n /* init_key is the array for initializing keys */\n /* key_length is its length */\n /* slight change for C++, 2004/2/26 */\n MersenneTwister.prototype.init_by_array = function (init_key, key_length) {\n var i = 1, j = 0, k, s;\n this.init_genrand(19650218);\n k = (this.N > key_length ? this.N : key_length);\n for (; k; k--) {\n s = this.mt[i - 1] ^ (this.mt[i - 1] >>> 30);\n this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1664525) << 16) + ((s & 0x0000ffff) * 1664525))) + init_key[j] + j; /* non linear */\n this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */\n i++;\n j++;\n if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; }\n if (j >= key_length) { j = 0; }\n }\n for (k = this.N - 1; k; k--) {\n s = this.mt[i - 1] ^ (this.mt[i - 1] >>> 30);\n this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1566083941) << 16) + (s & 0x0000ffff) * 1566083941)) - i; /* non linear */\n this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */\n i++;\n if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; }\n }\n\n this.mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */\n };\n\n /* generates a random number on [0,0xffffffff]-interval */\n MersenneTwister.prototype.genrand_int32 = function () {\n var y;\n var mag01 = new Array(0x0, this.MATRIX_A);\n /* mag01[x] = x * MATRIX_A for x=0,1 */\n\n if (this.mti >= this.N) { /* generate N words at one time */\n var kk;\n\n if (this.mti === this.N + 1) { /* if init_genrand() has not been called, */\n this.init_genrand(5489); /* a default initial seed is used */\n }\n for (kk = 0; kk < this.N - this.M; kk++) {\n y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk + 1]&this.LOWER_MASK);\n this.mt[kk] = this.mt[kk + this.M] ^ (y >>> 1) ^ mag01[y & 0x1];\n }\n for (;kk < this.N - 1; kk++) {\n y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk + 1]&this.LOWER_MASK);\n this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ (y >>> 1) ^ mag01[y & 0x1];\n }\n y = (this.mt[this.N - 1]&this.UPPER_MASK)|(this.mt[0]&this.LOWER_MASK);\n this.mt[this.N - 1] = this.mt[this.M - 1] ^ (y >>> 1) ^ mag01[y & 0x1];\n\n this.mti = 0;\n }\n\n y = this.mt[this.mti++];\n\n /* Tempering */\n y ^= (y >>> 11);\n y ^= (y << 7) & 0x9d2c5680;\n y ^= (y << 15) & 0xefc60000;\n y ^= (y >>> 18);\n\n return y >>> 0;\n };\n\n /* generates a random number on [0,0x7fffffff]-interval */\n MersenneTwister.prototype.genrand_int31 = function () {\n return (this.genrand_int32() >>> 1);\n };\n\n /* generates a random number on [0,1]-real-interval */\n MersenneTwister.prototype.genrand_real1 = function () {\n return this.genrand_int32() * (1.0 / 4294967295.0);\n /* divided by 2^32-1 */\n };\n\n /* generates a random number on [0,1)-real-interval */\n MersenneTwister.prototype.random = function () {\n return this.genrand_int32() * (1.0 / 4294967296.0);\n /* divided by 2^32 */\n };\n\n /* generates a random number on (0,1)-real-interval */\n MersenneTwister.prototype.genrand_real3 = function () {\n return (this.genrand_int32() + 0.5) * (1.0 / 4294967296.0);\n /* divided by 2^32 */\n };\n\n /* generates a random number on [0,1) with 53-bit resolution*/\n MersenneTwister.prototype.genrand_res53 = function () {\n var a = this.genrand_int32()>>>5, b = this.genrand_int32()>>>6;\n return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0);\n };\n\n // BlueImp MD5 hashing algorithm from https://github.com/blueimp/JavaScript-MD5\n var BlueImpMD5 = function () {};\n\n BlueImpMD5.prototype.VERSION = '1.0.1';\n\n /*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n BlueImpMD5.prototype.safe_add = function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n };\n\n /*\n * Bitwise rotate a 32-bit number to the left.\n */\n BlueImpMD5.prototype.bit_roll = function (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt));\n };\n\n /*\n * These functions implement the five basic operations the algorithm uses.\n */\n BlueImpMD5.prototype.md5_cmn = function (q, a, b, x, s, t) {\n return this.safe_add(this.bit_roll(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b);\n };\n BlueImpMD5.prototype.md5_ff = function (a, b, c, d, x, s, t) {\n return this.md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_gg = function (a, b, c, d, x, s, t) {\n return this.md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_hh = function (a, b, c, d, x, s, t) {\n return this.md5_cmn(b ^ c ^ d, a, b, x, s, t);\n };\n BlueImpMD5.prototype.md5_ii = function (a, b, c, d, x, s, t) {\n return this.md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\n };\n\n /*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n BlueImpMD5.prototype.binl_md5 = function (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = this.md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = this.md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = this.md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = this.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = this.md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = this.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = this.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = this.md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = this.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = this.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = this.md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = this.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = this.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = this.md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = this.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = this.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = this.md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = this.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = this.md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = this.md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = this.md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = this.md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = this.md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = this.md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = this.md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = this.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = this.md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = this.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = this.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = this.md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = this.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = this.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = this.md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = this.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = this.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = this.md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = this.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = this.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = this.md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = this.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = this.md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = this.md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = this.md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = this.md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = this.md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = this.md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = this.md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = this.md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = this.md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = this.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = this.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = this.md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = this.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = this.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = this.md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = this.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = this.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = this.md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = this.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = this.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = this.md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = this.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = this.md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = this.md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = this.safe_add(a, olda);\n b = this.safe_add(b, oldb);\n c = this.safe_add(c, oldc);\n d = this.safe_add(d, oldd);\n }\n return [a, b, c, d];\n };\n\n /*\n * Convert an array of little-endian words to a string\n */\n BlueImpMD5.prototype.binl2rstr = function (input) {\n var i,\n output = '';\n for (i = 0; i < input.length * 32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF);\n }\n return output;\n };\n\n /*\n * Convert a raw string to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n BlueImpMD5.prototype.rstr2binl = function (input) {\n var i,\n output = [];\n output[(input.length >> 2) - 1] = undefined;\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < input.length * 8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32);\n }\n return output;\n };\n\n /*\n * Calculate the MD5 of a raw string\n */\n BlueImpMD5.prototype.rstr_md5 = function (s) {\n return this.binl2rstr(this.binl_md5(this.rstr2binl(s), s.length * 8));\n };\n\n /*\n * Calculate the HMAC-MD5, of a key and some data (raw strings)\n */\n BlueImpMD5.prototype.rstr_hmac_md5 = function (key, data) {\n var i,\n bkey = this.rstr2binl(key),\n ipad = [],\n opad = [],\n hash;\n ipad[15] = opad[15] = undefined;\n if (bkey.length > 16) {\n bkey = this.binl_md5(bkey, key.length * 8);\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636;\n opad[i] = bkey[i] ^ 0x5C5C5C5C;\n }\n hash = this.binl_md5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8);\n return this.binl2rstr(this.binl_md5(opad.concat(hash), 512 + 128));\n };\n\n /*\n * Convert a raw string to a hex string\n */\n BlueImpMD5.prototype.rstr2hex = function (input) {\n var hex_tab = '0123456789abcdef',\n output = '',\n x,\n i;\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i);\n output += hex_tab.charAt((x >>> 4) & 0x0F) +\n hex_tab.charAt(x & 0x0F);\n }\n return output;\n };\n\n /*\n * Encode a string as utf-8\n */\n BlueImpMD5.prototype.str2rstr_utf8 = function (input) {\n return unescape(encodeURIComponent(input));\n };\n\n /*\n * Take string arguments and return either raw or hex encoded strings\n */\n BlueImpMD5.prototype.raw_md5 = function (s) {\n return this.rstr_md5(this.str2rstr_utf8(s));\n };\n BlueImpMD5.prototype.hex_md5 = function (s) {\n return this.rstr2hex(this.raw_md5(s));\n };\n BlueImpMD5.prototype.raw_hmac_md5 = function (k, d) {\n return this.rstr_hmac_md5(this.str2rstr_utf8(k), this.str2rstr_utf8(d));\n };\n BlueImpMD5.prototype.hex_hmac_md5 = function (k, d) {\n return this.rstr2hex(this.raw_hmac_md5(k, d));\n };\n\n BlueImpMD5.prototype.md5 = function (string, key, raw) {\n if (!key) {\n if (!raw) {\n return this.hex_md5(string);\n }\n\n return this.raw_md5(string);\n }\n\n if (!raw) {\n return this.hex_hmac_md5(key, string);\n }\n\n return this.raw_hmac_md5(key, string);\n };\n\n // CommonJS module\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = Chance;\n }\n exports.Chance = Chance;\n }\n\n // Register as an anonymous AMD module\n if (typeof define === 'function' && define.amd) {\n define([], function () {\n return Chance;\n });\n }\n\n // if there is a importsScrips object define chance for worker\n // allows worker to use full Chance functionality with seed\n if (typeof importScripts !== 'undefined') {\n chance = new Chance();\n self.Chance = Chance;\n }\n\n // If there is a window object, that at least has a document property,\n // instantiate and define chance on the window\n if (typeof window === \"object\" && typeof window.document === \"object\") {\n window.Chance = Chance;\n window.chance = new Chance();\n }\n})();\n","exports = module.exports = Victor;\n\n/**\n * # Victor - A JavaScript 2D vector class with methods for common vector operations\n */\n\n/**\n * Constructor. Will also work without the `new` keyword\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = Victor(42, 1337);\n *\n * @param {Number} x Value of the x axis\n * @param {Number} y Value of the y axis\n * @return {Victor}\n * @api public\n */\nfunction Victor (x, y) {\n\tif (!(this instanceof Victor)) {\n\t\treturn new Victor(x, y);\n\t}\n\n\t/**\n\t * The X axis\n\t *\n\t * ### Examples:\n\t * var vec = new Victor.fromArray(42, 21);\n\t *\n\t * vec.x;\n\t * // => 42\n\t *\n\t * @api public\n\t */\n\tthis.x = x || 0;\n\n\t/**\n\t * The Y axis\n\t *\n\t * ### Examples:\n\t * var vec = new Victor.fromArray(42, 21);\n\t *\n\t * vec.y;\n\t * // => 21\n\t *\n\t * @api public\n\t */\n\tthis.y = y || 0;\n};\n\n/**\n * # Static\n */\n\n/**\n * Creates a new instance from an array\n *\n * ### Examples:\n * var vec = Victor.fromArray([42, 21]);\n *\n * vec.toString();\n * // => x:42, y:21\n *\n * @name Victor.fromArray\n * @param {Array} array Array with the x and y values at index 0 and 1 respectively\n * @return {Victor} The new instance\n * @api public\n */\nVictor.fromArray = function (arr) {\n\treturn new Victor(arr[0] || 0, arr[1] || 0);\n};\n\n/**\n * Creates a new instance from an object\n *\n * ### Examples:\n * var vec = Victor.fromObject({ x: 42, y: 21 });\n *\n * vec.toString();\n * // => x:42, y:21\n *\n * @name Victor.fromObject\n * @param {Object} obj Object with the values for x and y\n * @return {Victor} The new instance\n * @api public\n */\nVictor.fromObject = function (obj) {\n\treturn new Victor(obj.x || 0, obj.y || 0);\n};\n\n/**\n * # Manipulation\n *\n * These functions are chainable.\n */\n\n/**\n * Adds another vector's X axis to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.addX(vec2);\n * vec1.toString();\n * // => x:30, y:10\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addX = function (vec) {\n\tthis.x += vec.x;\n\treturn this;\n};\n\n/**\n * Adds another vector's Y axis to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.addY(vec2);\n * vec1.toString();\n * // => x:10, y:40\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addY = function (vec) {\n\tthis.y += vec.y;\n\treturn this;\n};\n\n/**\n * Adds another vector to this one\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.add(vec2);\n * vec1.toString();\n * // => x:30, y:40\n *\n * @param {Victor} vector The other vector you want to add to this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.add = function (vec) {\n\tthis.x += vec.x;\n\tthis.y += vec.y;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to both vector axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalar(2);\n * vec.toString();\n * // => x: 3, y: 4\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalar = function (scalar) {\n\tthis.x += scalar;\n\tthis.y += scalar;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to the X axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalarX(2);\n * vec.toString();\n * // => x: 3, y: 2\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalarX = function (scalar) {\n\tthis.x += scalar;\n\treturn this;\n};\n\n/**\n * Adds the given scalar to the Y axis\n *\n * ### Examples:\n * var vec = new Victor(1, 2);\n *\n * vec.addScalarY(2);\n * vec.toString();\n * // => x: 1, y: 4\n *\n * @param {Number} scalar The scalar to add\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.addScalarY = function (scalar) {\n\tthis.y += scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the X axis of another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtractX(vec2);\n * vec1.toString();\n * // => x:80, y:50\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractX = function (vec) {\n\tthis.x -= vec.x;\n\treturn this;\n};\n\n/**\n * Subtracts the Y axis of another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtractY(vec2);\n * vec1.toString();\n * // => x:100, y:20\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractY = function (vec) {\n\tthis.y -= vec.y;\n\treturn this;\n};\n\n/**\n * Subtracts another vector from this one\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(20, 30);\n *\n * vec1.subtract(vec2);\n * vec1.toString();\n * // => x:80, y:20\n *\n * @param {Victor} vector The other vector you want subtract from this one\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtract = function (vec) {\n\tthis.x -= vec.x;\n\tthis.y -= vec.y;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from both axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalar(20);\n * vec.toString();\n * // => x: 80, y: 180\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalar = function (scalar) {\n\tthis.x -= scalar;\n\tthis.y -= scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from the X axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalarX(20);\n * vec.toString();\n * // => x: 80, y: 200\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalarX = function (scalar) {\n\tthis.x -= scalar;\n\treturn this;\n};\n\n/**\n * Subtracts the given scalar from the Y axis\n *\n * ### Examples:\n * var vec = new Victor(100, 200);\n *\n * vec.subtractScalarY(20);\n * vec.toString();\n * // => x: 100, y: 180\n *\n * @param {Number} scalar The scalar to subtract\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.subtractScalarY = function (scalar) {\n\tthis.y -= scalar;\n\treturn this;\n};\n\n/**\n * Divides the X axis by the x component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 0);\n *\n * vec.divideX(vec2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Victor} vector The other vector you want divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideX = function (vector) {\n\tthis.x /= vector.x;\n\treturn this;\n};\n\n/**\n * Divides the Y axis by the y component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(0, 2);\n *\n * vec.divideY(vec2);\n * vec.toString();\n * // => x:100, y:25\n *\n * @param {Victor} vector The other vector you want divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideY = function (vector) {\n\tthis.y /= vector.y;\n\treturn this;\n};\n\n/**\n * Divides both vector axis by a axis values of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 2);\n *\n * vec.divide(vec2);\n * vec.toString();\n * // => x:50, y:25\n *\n * @param {Victor} vector The vector to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divide = function (vector) {\n\tthis.x /= vector.x;\n\tthis.y /= vector.y;\n\treturn this;\n};\n\n/**\n * Divides both vector axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalar(2);\n * vec.toString();\n * // => x:50, y:25\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalar = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.x /= scalar;\n\t\tthis.y /= scalar;\n\t} else {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}\n\n\treturn this;\n};\n\n/**\n * Divides the X axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalarX(2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalarX = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.x /= scalar;\n\t} else {\n\t\tthis.x = 0;\n\t}\n\treturn this;\n};\n\n/**\n * Divides the Y axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.divideScalarY(2);\n * vec.toString();\n * // => x:100, y:25\n *\n * @param {Number} The scalar to divide by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.divideScalarY = function (scalar) {\n\tif (scalar !== 0) {\n\t\tthis.y /= scalar;\n\t} else {\n\t\tthis.y = 0;\n\t}\n\treturn this;\n};\n\n/**\n * Inverts the X axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invertX();\n * vec.toString();\n * // => x:-100, y:50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invertX = function () {\n\tthis.x *= -1;\n\treturn this;\n};\n\n/**\n * Inverts the Y axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invertY();\n * vec.toString();\n * // => x:100, y:-50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invertY = function () {\n\tthis.y *= -1;\n\treturn this;\n};\n\n/**\n * Inverts both axis\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.invert();\n * vec.toString();\n * // => x:-100, y:-50\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.invert = function () {\n\tthis.invertX();\n\tthis.invertY();\n\treturn this;\n};\n\n/**\n * Multiplies the X axis by X component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 0);\n *\n * vec.multiplyX(vec2);\n * vec.toString();\n * // => x:200, y:50\n *\n * @param {Victor} vector The vector to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyX = function (vector) {\n\tthis.x *= vector.x;\n\treturn this;\n};\n\n/**\n * Multiplies the Y axis by Y component of given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(0, 2);\n *\n * vec.multiplyX(vec2);\n * vec.toString();\n * // => x:100, y:100\n *\n * @param {Victor} vector The vector to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyY = function (vector) {\n\tthis.y *= vector.y;\n\treturn this;\n};\n\n/**\n * Multiplies both vector axis by values from a given vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * var vec2 = new Victor(2, 2);\n *\n * vec.multiply(vec2);\n * vec.toString();\n * // => x:200, y:100\n *\n * @param {Victor} vector The vector to multiply by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiply = function (vector) {\n\tthis.x *= vector.x;\n\tthis.y *= vector.y;\n\treturn this;\n};\n\n/**\n * Multiplies both vector axis by the given scalar value\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalar(2);\n * vec.toString();\n * // => x:200, y:100\n *\n * @param {Number} The scalar to multiply by\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalar = function (scalar) {\n\tthis.x *= scalar;\n\tthis.y *= scalar;\n\treturn this;\n};\n\n/**\n * Multiplies the X axis by the given scalar\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalarX(2);\n * vec.toString();\n * // => x:200, y:50\n *\n * @param {Number} The scalar to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalarX = function (scalar) {\n\tthis.x *= scalar;\n\treturn this;\n};\n\n/**\n * Multiplies the Y axis by the given scalar\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.multiplyScalarY(2);\n * vec.toString();\n * // => x:100, y:100\n *\n * @param {Number} The scalar to multiply the axis with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.multiplyScalarY = function (scalar) {\n\tthis.y *= scalar;\n\treturn this;\n};\n\n/**\n * Normalize\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.normalize = function () {\n\tvar length = this.length();\n\n\tif (length === 0) {\n\t\tthis.x = 1;\n\t\tthis.y = 0;\n\t} else {\n\t\tthis.divide(Victor(length, length));\n\t}\n\treturn this;\n};\n\nVictor.prototype.norm = Victor.prototype.normalize;\n\n/**\n * If the absolute vector axis is greater than `max`, multiplies the axis by `factor`\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.limit(80, 0.9);\n * vec.toString();\n * // => x:90, y:50\n *\n * @param {Number} max The maximum value for both x and y axis\n * @param {Number} factor Factor by which the axis are to be multiplied with\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.limit = function (max, factor) {\n\tif (Math.abs(this.x) > max){ this.x *= factor; }\n\tif (Math.abs(this.y) > max){ this.y *= factor; }\n\treturn this;\n};\n\n/**\n * Randomizes both vector axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomize(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:67, y:73\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomize = function (topLeft, bottomRight) {\n\tthis.randomizeX(topLeft, bottomRight);\n\tthis.randomizeY(topLeft, bottomRight);\n\n\treturn this;\n};\n\n/**\n * Randomizes the y axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeX(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:55, y:50\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeX = function (topLeft, bottomRight) {\n\tvar min = Math.min(topLeft.x, bottomRight.x);\n\tvar max = Math.max(topLeft.x, bottomRight.x);\n\tthis.x = random(min, max);\n\treturn this;\n};\n\n/**\n * Randomizes the y axis with a value between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeY(new Victor(50, 60), new Victor(70, 80`));\n * vec.toString();\n * // => x:100, y:66\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeY = function (topLeft, bottomRight) {\n\tvar min = Math.min(topLeft.y, bottomRight.y);\n\tvar max = Math.max(topLeft.y, bottomRight.y);\n\tthis.y = random(min, max);\n\treturn this;\n};\n\n/**\n * Randomly randomizes either axis between 2 vectors\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.randomizeAny(new Victor(50, 60), new Victor(70, 80));\n * vec.toString();\n * // => x:100, y:77\n *\n * @param {Victor} topLeft first vector\n * @param {Victor} bottomRight second vector\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.randomizeAny = function (topLeft, bottomRight) {\n\tif (!! Math.round(Math.random())) {\n\t\tthis.randomizeX(topLeft, bottomRight);\n\t} else {\n\t\tthis.randomizeY(topLeft, bottomRight);\n\t}\n\treturn this;\n};\n\n/**\n * Rounds both axis to an integer value\n *\n * ### Examples:\n * var vec = new Victor(100.2, 50.9);\n *\n * vec.unfloat();\n * vec.toString();\n * // => x:100, y:51\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.unfloat = function () {\n\tthis.x = Math.round(this.x);\n\tthis.y = Math.round(this.y);\n\treturn this;\n};\n\n/**\n * Rounds both axis to a certain precision\n *\n * ### Examples:\n * var vec = new Victor(100.2, 50.9);\n *\n * vec.unfloat();\n * vec.toString();\n * // => x:100, y:51\n *\n * @param {Number} Precision (default: 8)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.toFixed = function (precision) {\n\tif (typeof precision === 'undefined') { precision = 8; }\n\tthis.x = this.x.toFixed(precision);\n\tthis.y = this.y.toFixed(precision);\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation of the X axis towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mixX(vec2, 0.5);\n * vec.toString();\n * // => x:150, y:100\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mixX = function (vec, amount) {\n\tif (typeof amount === 'undefined') {\n\t\tamount = 0.5;\n\t}\n\n\tthis.x = (1 - amount) * this.x + amount * vec.x;\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation of the Y axis towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mixY(vec2, 0.5);\n * vec.toString();\n * // => x:100, y:150\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mixY = function (vec, amount) {\n\tif (typeof amount === 'undefined') {\n\t\tamount = 0.5;\n\t}\n\n\tthis.y = (1 - amount) * this.y + amount * vec.y;\n\treturn this;\n};\n\n/**\n * Performs a linear blend / interpolation towards another vector\n *\n * ### Examples:\n * var vec1 = new Victor(100, 100);\n * var vec2 = new Victor(200, 200);\n *\n * vec1.mix(vec2, 0.5);\n * vec.toString();\n * // => x:150, y:150\n *\n * @param {Victor} vector The other vector\n * @param {Number} amount The blend amount (optional, default: 0.5)\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.mix = function (vec, amount) {\n\tthis.mixX(vec, amount);\n\tthis.mixY(vec, amount);\n\treturn this;\n};\n\n/**\n * # Products\n */\n\n/**\n * Creates a clone of this vector\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = vec1.clone();\n *\n * vec2.toString();\n * // => x:10, y:10\n *\n * @return {Victor} A clone of the vector\n * @api public\n */\nVictor.prototype.clone = function () {\n\treturn new Victor(this.x, this.y);\n};\n\n/**\n * Copies another vector's X component in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copyX(vec1);\n *\n * vec2.toString();\n * // => x:20, y:10\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copyX = function (vec) {\n\tthis.x = vec.x;\n\treturn this;\n};\n\n/**\n * Copies another vector's Y component in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copyY(vec1);\n *\n * vec2.toString();\n * // => x:10, y:20\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copyY = function (vec) {\n\tthis.y = vec.y;\n\treturn this;\n};\n\n/**\n * Copies another vector's X and Y components in to its own\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n * var vec2 = new Victor(20, 20);\n * var vec2 = vec1.copy(vec1);\n *\n * vec2.toString();\n * // => x:20, y:20\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.copy = function (vec) {\n\tthis.copyX(vec);\n\tthis.copyY(vec);\n\treturn this;\n};\n\n/**\n * Sets the vector to zero (0,0)\n *\n * ### Examples:\n * var vec1 = new Victor(10, 10);\n *\t\t var1.zero();\n * vec1.toString();\n * // => x:0, y:0\n *\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.zero = function () {\n\tthis.x = this.y = 0;\n\treturn this;\n};\n\n/**\n * Calculates the dot product of this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.dot(vec2);\n * // => 23000\n *\n * @param {Victor} vector The second vector\n * @return {Number} Dot product\n * @api public\n */\nVictor.prototype.dot = function (vec2) {\n\treturn this.x * vec2.x + this.y * vec2.y;\n};\n\nVictor.prototype.cross = function (vec2) {\n\treturn (this.x * vec2.y ) - (this.y * vec2.x );\n};\n\n/**\n * Projects a vector onto another vector, setting itself to the result.\n *\n * ### Examples:\n * var vec = new Victor(100, 0);\n * var vec2 = new Victor(100, 100);\n *\n * vec.projectOnto(vec2);\n * vec.toString();\n * // => x:50, y:50\n *\n * @param {Victor} vector The other vector you want to project this vector onto\n * @return {Victor} `this` for chaining capabilities\n * @api public\n */\nVictor.prototype.projectOnto = function (vec2) {\n var coeff = ( (this.x * vec2.x)+(this.y * vec2.y) ) / ((vec2.x*vec2.x)+(vec2.y*vec2.y));\n this.x = coeff * vec2.x;\n this.y = coeff * vec2.y;\n return this;\n};\n\n\nVictor.prototype.horizontalAngle = function () {\n\treturn Math.atan2(this.y, this.x);\n};\n\nVictor.prototype.horizontalAngleDeg = function () {\n\treturn radian2degrees(this.horizontalAngle());\n};\n\nVictor.prototype.verticalAngle = function () {\n\treturn Math.atan2(this.x, this.y);\n};\n\nVictor.prototype.verticalAngleDeg = function () {\n\treturn radian2degrees(this.verticalAngle());\n};\n\nVictor.prototype.angle = Victor.prototype.horizontalAngle;\nVictor.prototype.angleDeg = Victor.prototype.horizontalAngleDeg;\nVictor.prototype.direction = Victor.prototype.horizontalAngle;\n\nVictor.prototype.rotate = function (angle) {\n\tvar nx = (this.x * Math.cos(angle)) - (this.y * Math.sin(angle));\n\tvar ny = (this.x * Math.sin(angle)) + (this.y * Math.cos(angle));\n\n\tthis.x = nx;\n\tthis.y = ny;\n\n\treturn this;\n};\n\nVictor.prototype.rotateDeg = function (angle) {\n\tangle = degrees2radian(angle);\n\treturn this.rotate(angle);\n};\n\nVictor.prototype.rotateTo = function(rotation) {\n\treturn this.rotate(rotation-this.angle());\n};\n\nVictor.prototype.rotateToDeg = function(rotation) {\n\trotation = degrees2radian(rotation);\n\treturn this.rotateTo(rotation);\n};\n\nVictor.prototype.rotateBy = function (rotation) {\n\tvar angle = this.angle() + rotation;\n\n\treturn this.rotate(angle);\n};\n\nVictor.prototype.rotateByDeg = function (rotation) {\n\trotation = degrees2radian(rotation);\n\treturn this.rotateBy(rotation);\n};\n\n/**\n * Calculates the distance of the X axis between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceX(vec2);\n * // => -100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceX = function (vec) {\n\treturn this.x - vec.x;\n};\n\n/**\n * Same as `distanceX()` but always returns an absolute number\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.absDistanceX(vec2);\n * // => 100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Absolute distance\n * @api public\n */\nVictor.prototype.absDistanceX = function (vec) {\n\treturn Math.abs(this.distanceX(vec));\n};\n\n/**\n * Calculates the distance of the Y axis between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceY(vec2);\n * // => -10\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceY = function (vec) {\n\treturn this.y - vec.y;\n};\n\n/**\n * Same as `distanceY()` but always returns an absolute number\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceY(vec2);\n * // => 10\n *\n * @param {Victor} vector The second vector\n * @return {Number} Absolute distance\n * @api public\n */\nVictor.prototype.absDistanceY = function (vec) {\n\treturn Math.abs(this.distanceY(vec));\n};\n\n/**\n * Calculates the euclidean distance between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distance(vec2);\n * // => 100.4987562112089\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distance = function (vec) {\n\treturn Math.sqrt(this.distanceSq(vec));\n};\n\n/**\n * Calculates the squared euclidean distance between this vector and another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(200, 60);\n *\n * vec1.distanceSq(vec2);\n * // => 10100\n *\n * @param {Victor} vector The second vector\n * @return {Number} Distance\n * @api public\n */\nVictor.prototype.distanceSq = function (vec) {\n\tvar dx = this.distanceX(vec),\n\t\tdy = this.distanceY(vec);\n\n\treturn dx * dx + dy * dy;\n};\n\n/**\n * Calculates the length or magnitude of the vector\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.length();\n * // => 111.80339887498948\n *\n * @return {Number} Length / Magnitude\n * @api public\n */\nVictor.prototype.length = function () {\n\treturn Math.sqrt(this.lengthSq());\n};\n\n/**\n * Squared length / magnitude\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n *\n * vec.lengthSq();\n * // => 12500\n *\n * @return {Number} Length / Magnitude\n * @api public\n */\nVictor.prototype.lengthSq = function () {\n\treturn this.x * this.x + this.y * this.y;\n};\n\nVictor.prototype.magnitude = Victor.prototype.length;\n\n/**\n * Returns a true if vector is (0, 0)\n *\n * ### Examples:\n * var vec = new Victor(100, 50);\n * vec.zero();\n *\n * // => true\n *\n * @return {Boolean}\n * @api public\n */\nVictor.prototype.isZero = function() {\n\treturn this.x === 0 && this.y === 0;\n};\n\n/**\n * Returns a true if this vector is the same as another\n *\n * ### Examples:\n * var vec1 = new Victor(100, 50);\n * var vec2 = new Victor(100, 50);\n * vec1.isEqualTo(vec2);\n *\n * // => true\n *\n * @return {Boolean}\n * @api public\n */\nVictor.prototype.isEqualTo = function(vec2) {\n\treturn this.x === vec2.x && this.y === vec2.y;\n};\n\n/**\n * # Utility Methods\n */\n\n/**\n * Returns an string representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toString();\n * // => x:10, y:20\n *\n * @return {String}\n * @api public\n */\nVictor.prototype.toString = function () {\n\treturn 'x:' + this.x + ', y:' + this.y;\n};\n\n/**\n * Returns an array representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toArray();\n * // => [10, 20]\n *\n * @return {Array}\n * @api public\n */\nVictor.prototype.toArray = function () {\n\treturn [ this.x, this.y ];\n};\n\n/**\n * Returns an object representation of the vector\n *\n * ### Examples:\n * var vec = new Victor(10, 20);\n *\n * vec.toObject();\n * // => { x: 10, y: 20 }\n *\n * @return {Object}\n * @api public\n */\nVictor.prototype.toObject = function () {\n\treturn { x: this.x, y: this.y };\n};\n\n\nvar degrees = 180 / Math.PI;\n\nfunction random (min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\nfunction radian2degrees (rad) {\n\treturn rad * degrees;\n}\n\nfunction degrees2radian (deg) {\n\treturn deg / degrees;\n}\n","// Current version.\nexport var VERSION = '1.13.2';\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nexport var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n Function('return this')() ||\n {};\n\n// Save bytes in the minified (but not gzipped) version:\nexport var ArrayProto = Array.prototype, ObjProto = Object.prototype;\nexport var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nexport var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n// Modern feature detection.\nexport var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n supportsDataView = typeof DataView !== 'undefined';\n\n// All **ECMAScript 5+** native function implementations that we hope to use\n// are declared here.\nexport var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create,\n nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n// Create references to these builtin functions because we override them.\nexport var _isNaN = isNaN,\n _isFinite = isFinite;\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nexport var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nexport var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n// The largest integer that can be represented exactly.\nexport var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n","// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nexport default function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n}\n","// Is a given variable an object?\nexport default function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n}\n","// Is a given variable undefined?\nexport default function isUndefined(obj) {\n return obj === void 0;\n}\n","import { toString } from './_setup.js';\n\n// Is a given value a boolean?\nexport default function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n}\n","import { toString } from './_setup.js';\n\n// Internal function for creating a `toString`-based type tester.\nexport default function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n}\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('String');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Number');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Date');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('RegExp');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Error');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Symbol');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('ArrayBuffer');\n","import tagTester from './_tagTester.js';\nimport { root } from './_setup.js';\n\nvar isFunction = tagTester('Function');\n\n// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = root.document && root.document.childNodes;\nif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n}\n\nexport default isFunction;\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n","import { supportsDataView } from './_setup.js';\nimport hasObjectTag from './_hasObjectTag.js';\n\n// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n// In IE 11, the most common among them, this problem also applies to\n// `Map`, `WeakMap` and `Set`.\nexport var hasStringTagBug = (\n supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))\n ),\n isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n","import tagTester from './_tagTester.js';\nimport isFunction from './isFunction.js';\nimport isArrayBuffer from './isArrayBuffer.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\n\nvar isDataView = tagTester('DataView');\n\n// In IE 10 - Edge 13, we need a different heuristic\n// to determine whether an object is a `DataView`.\nfunction ie10IsDataView(obj) {\n return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);\n}\n\nexport default (hasStringTagBug ? ie10IsDataView : isDataView);\n","import { nativeIsArray } from './_setup.js';\nimport tagTester from './_tagTester.js';\n\n// Is a given value an array?\n// Delegates to ECMA5's native `Array.isArray`.\nexport default nativeIsArray || tagTester('Array');\n","import { hasOwnProperty } from './_setup.js';\n\n// Internal function to check whether `key` is an own property name of `obj`.\nexport default function has(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n}\n","import tagTester from './_tagTester.js';\nimport has from './_has.js';\n\nvar isArguments = tagTester('Arguments');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n}());\n\nexport default isArguments;\n","import { _isNaN } from './_setup.js';\nimport isNumber from './isNumber.js';\n\n// Is the given value `NaN`?\nexport default function isNaN(obj) {\n return isNumber(obj) && _isNaN(obj);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function constant(value) {\n return function() {\n return value;\n };\n}\n","import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n","// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `byteLength` property of an object.\nexport default shallowProperty('byteLength');\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getByteLength from './_getByteLength.js';\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\nexport default createSizePropertyCheck(getByteLength);\n","import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';\nimport isDataView from './isDataView.js';\nimport constant from './constant.js';\nimport isBufferLike from './_isBufferLike.js';\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n}\n\nexport default supportsArrayBuffer ? isTypedArray : constant(false);\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `length` property of an object.\nexport default shallowProperty('length');\n","import { nonEnumerableProps, ObjProto } from './_setup.js';\nimport isFunction from './isFunction.js';\nimport has from './_has.js';\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nexport default function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n}\n","import isObject from './isObject.js';\nimport { nativeKeys, hasEnumBug } from './_setup.js';\nimport has from './_has.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport default function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import keys from './keys.js';\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport default function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n","import { VERSION } from './_setup.js';\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n_.VERSION = VERSION;\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import getByteLength from './_getByteLength.js';\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nexport default function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n}\n","import _ from './underscore.js';\nimport { toString, SymbolProto } from './_setup.js';\nimport getByteLength from './_getByteLength.js';\nimport isTypedArray from './isTypedArray.js';\nimport isFunction from './isFunction.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\nimport isDataView from './isDataView.js';\nimport keys from './keys.js';\nimport has from './_has.js';\nimport toBufferView from './_toBufferView.js';\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {\n if (!isDataView(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport default function isEqual(a, b) {\n return eq(a, b);\n}\n","import isObject from './isObject.js';\nimport { hasEnumBug } from './_setup.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve all the enumerable property names of an object.\nexport default function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isFunction from './isFunction.js';\nimport allKeys from './allKeys.js';\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nexport function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction(obj[forEachName]);\n };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nexport var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, mapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, setMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('WeakSet');\n","import keys from './keys.js';\n\n// Retrieve the values of an object's properties.\nexport default function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n","import keys from './keys.js';\n\n// Invert the keys and values of an object. The values must be serializable.\nexport default function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n","import isFunction from './isFunction.js';\n\n// Return a sorted list of the function names available on the object.\nexport default function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\n","// An internal function for creating assigner functions.\nexport default function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Extend a given object with all the properties in passed-in object(s).\nexport default createAssigner(allKeys);\n","import createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport default createAssigner(keys);\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Fill in a given object with default properties.\nexport default createAssigner(allKeys, true);\n","import isObject from './isObject.js';\nimport { nativeCreate } from './_setup.js';\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nexport default function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n","import _ from './underscore.js';\nimport isArray from './isArray.js';\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nexport default function toPath(path) {\n return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n","import _ from './underscore.js';\nimport './toPath.js';\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nexport default function toPath(path) {\n return _.toPath(path);\n}\n","// Internal function to obtain a nested property in `obj` along `path`.\nexport default function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n","import toPath from './_toPath.js';\nimport deepGet from './_deepGet.js';\nimport isUndefined from './isUndefined.js';\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nexport default function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n}\n","// Keep the identity function around for default iteratees.\nexport default function identity(value) {\n return value;\n}\n","import extendOwn from './extendOwn.js';\nimport isMatch from './isMatch.js';\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport default function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\n","import deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nexport default function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n","// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nexport default function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n","import identity from './identity.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport matcher from './matcher.js';\nimport property from './property.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nexport default function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nexport default function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee;\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\nimport iteratee from './iteratee.js';\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nexport default function cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function noop(){}\n","// Return a random integer between `min` and `max` (inclusive).\nexport default function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n","// A (possibly faster) way to get the current timestamp as an integer.\nexport default Date.now || function() {\n return new Date().getTime();\n};\n","import keys from './keys.js';\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nexport default function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\n","// Internal list of HTML entities for escaping.\nexport default {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n","import createEscaper from './_createEscaper.js';\nimport escapeMap from './_escapeMap.js';\n\n// Function for escaping strings to HTML interpolation.\nexport default createEscaper(escapeMap);\n","import createEscaper from './_createEscaper.js';\nimport unescapeMap from './_unescapeMap.js';\n\n// Function for unescaping strings from HTML interpolation.\nexport default createEscaper(unescapeMap);\n","import invert from './invert.js';\nimport escapeMap from './_escapeMap.js';\n\n// Internal list of HTML entities for unescaping.\nexport default invert(escapeMap);\n","import _ from './underscore.js';\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\nexport default _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n","import defaults from './defaults.js';\nimport _ from './underscore.js';\nimport './templateSettings.js';\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport default function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n","// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport default function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n","import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nexport default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n","import restArguments from './restArguments.js';\nimport executeBound from './_executeBound.js';\nimport _ from './underscore.js';\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\nexport default partial;\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport executeBound from './_executeBound.js';\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\nexport default restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getLength from './_getLength.js';\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nexport default createSizePropertyCheck(getLength);\n","import getLength from './_getLength.js';\nimport isArrayLike from './_isArrayLike.js';\nimport isArray from './isArray.js';\nimport isArguments from './isArguments.js';\n\n// Internal implementation of a recursive `flatten` function.\nexport default function flatten(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport bind from './bind.js';\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport default restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n});\n","import restArguments from './restArguments.js';\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport default restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n","import partial from './partial.js';\nimport delay from './delay.js';\nimport _ from './underscore.js';\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport default partial(delay, _, 1);\n","// Returns a negated version of the passed-in predicate.\nexport default function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n","// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nexport default function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n","import partial from './partial.js';\nimport before from './before.js';\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport default partial(before, 2);\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the first key on an object that passes a truth test.\nexport default function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nexport default function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the first index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(1);\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the last index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(-1);\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport default function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n","import getLength from './_getLength.js';\nimport { slice } from './_setup.js';\nimport isNaN from './isNaN.js';\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nexport default function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n","import sortedIndex from './sortedIndex.js';\nimport findIndex from './findIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport default createIndexFinder(1, findIndex, sortedIndex);\n","import findLastIndex from './findLastIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\nexport default createIndexFinder(-1, findLastIndex);\n","import isArrayLike from './_isArrayLike.js';\nimport findIndex from './findIndex.js';\nimport findKey from './findKey.js';\n\n// Return the first value which passes a truth test.\nexport default function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\n","import optimizeCb from './_optimizeCb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport default function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the results of applying the iteratee to each element.\nexport default function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// Internal helper to create a reducing function, iterating left or right.\nexport default function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n","import createReduce from './_createReduce.js';\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport default createReduce(1);\n","import createReduce from './_createReduce.js';\n\n// The right-associative version of reduce, also known as `foldr`.\nexport default createReduce(-1);\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// Return all the elements that pass a truth test.\nexport default function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine whether all of the elements pass a truth test.\nexport default function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine if at least one element in the object passes a truth test.\nexport default function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport indexOf from './indexOf.js';\n\n// Determine if the array or object contains a given item (using `===`).\nexport default function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport map from './map.js';\nimport deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Invoke a method (with arguments) on every item in a collection.\nexport default restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n","import map from './map.js';\nimport property from './property.js';\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nexport default function pluck(obj, key) {\n return map(obj, property(key));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the maximum element (or element-based computation).\nexport default function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArray from './isArray.js';\nimport { slice } from './_setup.js';\nimport isString from './isString.js';\nimport isArrayLike from './_isArrayLike.js';\nimport map from './map.js';\nimport identity from './identity.js';\nimport values from './values.js';\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nexport default function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport getLength from './_getLength.js';\nimport random from './random.js';\nimport toArray from './toArray.js';\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nexport default function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// An internal function used for aggregate \"group by\" operations.\nexport default function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n});\n","import group from './_group.js';\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\nexport default group(function(result, value, key) {\n result[key] = value;\n});\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n});\n","import group from './_group.js';\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\nexport default group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n","// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport optimizeCb from './_optimizeCb.js';\nimport allKeys from './allKeys.js';\nimport keyInObj from './_keyInObj.js';\nimport flatten from './_flatten.js';\n\n// Return a copy of the object only containing the allowed properties.\nexport default restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport negate from './negate.js';\nimport map from './map.js';\nimport flatten from './_flatten.js';\nimport contains from './contains.js';\nimport pick from './pick.js';\n\n// Return a copy of the object without the disallowed properties.\nexport default restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n","import { slice } from './_setup.js';\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport default function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n","import initial from './initial.js';\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nexport default function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\n","import { slice } from './_setup.js';\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nexport default function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport filter from './filter.js';\nimport contains from './contains.js';\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport default restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n","import restArguments from './restArguments.js';\nimport difference from './difference.js';\n\n// Return a version of the array that does not contain the specified value(s).\nexport default restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n","import isBoolean from './isBoolean.js';\nimport cb from './_cb.js';\nimport getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport default function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport uniq from './uniq.js';\nimport flatten from './_flatten.js';\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport default restArguments(function(arrays) {\n return uniq(flatten(arrays, true, true));\n});\n","import max from './max.js';\nimport getLength from './_getLength.js';\nimport pluck from './pluck.js';\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport default function unzip(array) {\n var length = array && max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport unzip from './unzip.js';\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport default restArguments(unzip);\n","import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport functions from './functions.js';\nimport { push } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add your own custom functions to the Underscore object.\nexport default function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport { ArrayProto } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n});\n\nexport default _;\n","// Is a given value equal to null?\nexport default function isNull(obj) {\n return obj === null;\n}\n","// Is a given value a DOM element?\nexport default function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n","import { _isFinite } from './_setup.js';\nimport isSymbol from './isSymbol.js';\n\n// Is a given object a finite number?\nexport default function isFinite(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n}\n","import getLength from './_getLength.js';\nimport isArray from './isArray.js';\nimport isString from './isString.js';\nimport isArguments from './isArguments.js';\nimport keys from './keys.js';\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport default function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n}\n","import keys from './keys.js';\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nexport default function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n","import baseCreate from './_baseCreate.js';\nimport extendOwn from './extendOwn.js';\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport default function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n","import isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport extend from './extend.js';\n\n// Create a (shallow-cloned) duplicate of an object.\nexport default function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n","// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport default function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n","import _has from './_has.js';\nimport toPath from './_toPath.js';\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nexport default function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!_has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n}\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nexport default function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import noop from './noop.js';\nimport get from './get.js';\n\n// Generates a function for a given object that returns a given property.\nexport default function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n}\n","import optimizeCb from './_optimizeCb.js';\n\n// Run a function **n** times.\nexport default function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n","import isFunction from './isFunction.js';\nimport toPath from './_toPath.js';\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport default function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n","import _ from './underscore.js';\n\n// Start chaining a wrapped Underscore object.\nexport default function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n","import has from './_has.js';\n\n// Memoize an expensive function by storing its results.\nexport default function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n","import now from './now.js';\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport default function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import restArguments from './restArguments.js';\nimport now from './now.js';\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nexport default function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n}\n","import partial from './partial.js';\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport default function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n","// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport default function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n","// Returns a function that will only be executed on and after the Nth call.\nexport default function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n","import find from './find.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nexport default function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n","import filter from './filter.js';\nimport negate from './negate.js';\nimport cb from './_cb.js';\n\n// Return all the elements for which a truth test fails.\nexport default function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n","import filter from './filter.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nexport default function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the minimum element (or element-based computation).\nexport default function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import sample from './sample.js';\n\n// Shuffle a collection.\nexport default function shuffle(obj) {\n return sample(obj, Infinity);\n}\n","import cb from './_cb.js';\nimport pluck from './pluck.js';\nimport map from './map.js';\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport default function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the number of elements in a collection.\nexport default function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n","import rest from './rest.js';\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport default function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n","import filter from './filter.js';\n\n// Trim out all falsy values from an array.\nexport default function compact(array) {\n return filter(array, Boolean);\n}\n","import _flatten from './_flatten.js';\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nexport default function flatten(array, depth) {\n return _flatten(array, depth, false);\n}\n","import getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport default function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n","import getLength from './_getLength.js';\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nexport default function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n","// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport default function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n","import { slice } from './_setup.js';\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport default function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n","// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\nimport * as allExports from './index.js';\nimport { mixin } from './index.js';\n\n// Add all of the Underscore functions to the wrapper object.\nvar _ = mixin(allExports);\n// Legacy Node.js API.\n_._ = _;\n// Export the Underscore API.\nexport default _;\n","'use strict'\n\n/**\n * @desc Helper class for drawing rooms when generating dungeons\n * @constructor\n *\n * @param {Number} x - The x coordinate of the top side of the room\n * @param {Number} y - The y coordinate of the left hand side of the room\n * @param {Number} width - The width of the room\n * @param {Number} height - The height of the room\n */\nconst Room = function Room (x, y, width, height) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n}\n\n/**\n * @desc Returns the bounding box for this room\n * @function\n *\n * @returns {Object} - Bounding box object containing a top, right, bottom and\n * left value.\n */\nRoom.prototype.getBoundingBox = function getBoundingBox () {\n return {\n top: this.y,\n right: this.x + this.width - 1,\n bottom: this.y + this.height - 1,\n left: this.x\n }\n}\n\nRoom.prototype.containsTile = function containsPoint (x, y) {\n const boundingBox = this.getBoundingBox()\n return !(\n x < boundingBox.left ||\n x > boundingBox.right ||\n y < boundingBox.top ||\n y > boundingBox.bottom\n )\n}\n\n/**\n * @desc Compares this room with an entity that has a bounding box method to see\n * if they intersect.\n *\n * @param {Object} other - An object with a getBoundingBox() method\n *\n * @returns {Boolean} - true if there is an intersection\n */\nRoom.prototype.intersects = function intersects (other) {\n if (!other.getBoundingBox) {\n throw new Error('Given entity has no method getBoundingBox')\n }\n var r1 = this.getBoundingBox()\n var r2 = other.getBoundingBox()\n\n return !(r2.left > r1.right ||\n r2.right < r1.left ||\n r2.top > r1.bottom ||\n r2.bottom < r1.top)\n}\n\n/**\n * @desc Returns a simple POJO representing this room\n *\n * @returns {Object} - A POJO\n */\nRoom.prototype.toJS = function toJS () {\n return {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n }\n}\n\nmodule.exports = Room\n","'use strict'\n\n/**\n * @desc Class for a single tilein a dungeon\n * @constructor\n *\n * @param {String} type - The type of tile, e.g. 'wall', 'floor'\n */\nconst Tile = function Tile (type, x, y) {\n this.type = type\n this.neighbours = []\n this.x = x\n this.y = y\n}\n\n/**\n * @desc Sets an array containing this tiles immediate neighbours\n *\n * @param {Object[]} neighbours - An array of neighbouring Tiles\n *\n * @return {Object} - returns the Tile object, useful for chaining\n */\nTile.prototype.setNeighbours = function (neighbours) {\n this.neighbours = neighbours\n return this\n}\n\n/**\n * @desc Returns a simple POJO representing this tile\n *\n * @returns {Object} - A POJO\n */\nTile.prototype.toJS = function toJS () {\n return {\n x: this.x,\n y: this.y,\n type: this.type\n }\n}\n\nmodule.exports = Tile\n","/**\n * Based on Bob Nystrom's procedural dungeon generation logic that he wrote for Hauberk\n * http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/\n */\n\n'use strict'\n\nconst Chance = require('chance')\nconst Victor = require('victor')\nconst _ = require('underscore')\n\nconst Room = require('./room')\nconst Tile = require('./tile')\n\nconst getTileNESW = (tile) => {\n const tiles = []\n if (tile.neighbours.n) {\n tiles.push(tile.neighbours.n)\n }\n if (tile.neighbours.e) {\n tiles.push(tile.neighbours.e)\n }\n if (tile.neighbours.s) {\n tiles.push(tile.neighbours.s)\n }\n if (tile.neighbours.w) {\n tiles.push(tile.neighbours.w)\n }\n\n return tiles\n}\n\nconst nameChance = new Chance()\n\n/**\n * @desc The random dungeon generator.\n *\n * Starting with a stage of solid walls, it works like so:\n *\n * 1. Place a number of randomly sized and positioned rooms. If a room\n * overlaps an existing room, it is discarded. Any remaining rooms are\n * carved out.\n * 2. Any remaining solid areas are filled in with mazes. The maze generator\n * will grow and fill in even odd-shaped areas, but will not touch any\n * rooms.\n * 3. The result of the previous two steps is a series of unconnected rooms\n * and mazes. We walk the stage and find every tile that can be a\n * \"connector\". This is a solid tile that is adjacent to two unconnected\n * regions.\n * 4. We randomly choose connectors and open them or place a door there until\n * all of the unconnected regions have been joined. There is also a slight\n * chance to carve a connector between two already-joined regions, so that\n * the dungeon isn't single connected.\n * 5. The mazes will have a lot of dead ends. Finally, we remove those by\n * repeatedly filling in any open tile that's closed on three sides. When\n * this is done, every corridor in a maze actually leads somewhere.\n *\n * The end result of this is a multiply-connected dungeon with rooms and lots\n * of winding corridors.\n *\n * @constructor\n */\nconst Dungeon = function Dungeon () {\n var numRoomTries = 50\n\n // The inverse chance of adding a connector between two regions that have\n // already been joined. Increasing this leads to more loosely connected\n // dungeons.\n var extraConnectorChance = 50\n\n // Increasing this allows rooms to be larger.\n var roomExtraSize = 0\n\n var windingPercent = 50\n\n var _rooms = []\n\n // The index of the current region being carved.\n var _currentRegion = -1\n\n var stage\n var rng\n\n const n = new Victor(0, 1)\n const e = new Victor(1, 0)\n const s = new Victor(0, -1)\n const w = new Victor(-1, 0)\n\n // The four cardinal directions: north, south, east, and west.\n const cardinalDirections = [n, e, s, w]\n\n const bindStage = (givenStage) => {\n stage = givenStage\n }\n\n let _tiles = []\n let _seed\n\n const randBetween = (min, max) => {\n return rng.integer({ min, max })\n }\n\n /**\n * @desc returns a tile at the provided coordinates\n *\n * @param {Number} x - The x coordinate to retrieve\n * @param {Number} y - The y coordinate to retrieve\n *\n * @returns {Object} - A Tile object\n */\n const getTile = (x, y) => {\n return _tiles[x][y]\n }\n\n /**\n * @desc Sets a tile's type and region. This function will thrown an error if\n * the tile doesn't exist.\n *\n * @param {Number} x - The x coordinate of the tile to set\n * @param {Number} y - The y coordinate of the tile to set\n * @param {String} type - The type to set on the tile\n *\n * @returns {Object} - The Tile object or null if the tile was not found\n *\n */\n const setTile = (x, y, type) => {\n if (_tiles[x] && _tiles[x][y]) {\n _tiles[x][y].type = type\n _tiles[x][y].region = _currentRegion\n\n return _tiles[x][y]\n }\n\n throw new RangeError(`tile at ${x}, ${y} is unreachable`)\n }\n\n /**\n * @desc Generates tile data to the dimension of the stage.\n *\n * @param {String} type - The tile type to set on newly created tiles\n *\n * @returns {Array} - The _tiles array\n */\n const fill = (type) => {\n let neighbours = {}\n var x\n var y\n\n for (x = 0; x < stage.width; x++) {\n _tiles.push([])\n for (y = 0; y < stage.height; y++) {\n _tiles[x].push(new Tile(type, x, y))\n }\n }\n\n for (x = 0; x < stage.width; x++) {\n for (y = 0; y < stage.height; y++) {\n neighbours = {}\n if (_tiles[x][y - 1]) {\n neighbours.n = _tiles[x][y - 1]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y - 1]) {\n neighbours.ne = _tiles[x + 1][y - 1]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y]) {\n neighbours.e = _tiles[x + 1][y]\n }\n if (_tiles[x + 1] && _tiles[x + 1][y + 1]) {\n neighbours.se = _tiles[x + 1][y + 1]\n }\n if (_tiles[x] && _tiles[x][y + 1]) {\n neighbours.s = _tiles[x][y + 1]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y + 1]) {\n neighbours.sw = _tiles[x - 1][y + 1]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y]) {\n neighbours.w = _tiles[x - 1][y]\n }\n if (_tiles[x - 1] && _tiles[x - 1][y - 1]) {\n neighbours.nw = _tiles[x - 1][y - 1]\n }\n _tiles[x][y].setNeighbours(neighbours)\n }\n }\n\n return _tiles\n }\n\n /**\n * @desc Master function for generating a dungeon\n *\n * @param {Object} stage - An object with a width key and a height key. Used\n * to determine the size of the dungeon. Must be odd with and height.\n *\n * @returns {Object} - Tile information for the dungeon\n */\n const build = (stage) => {\n if (stage.width < 5) {\n throw new RangeError(`DungeoneerError: options.width must not be less than 5, received ${stage.width}`)\n }\n\n if (stage.height < 5) {\n throw new RangeError(`DungeoneerError: options.height must not be less than 5, received ${stage.height}`)\n }\n\n if (stage.width % 2 === 0) {\n stage.width += 1\n }\n\n if (stage.height % 2 === 0) {\n stage.height += 1\n }\n\n const seed = stage.seed || `${nameChance.word({ length: 7 })}-${nameChance.word({ length: 7 })}`\n\n rng = new Chance(seed)\n\n _seed = seed\n\n bindStage(stage)\n\n fill('wall')\n\n _addRooms()\n\n // Fill in all of the empty space with mazes.\n for (var y = 1; y < stage.height; y += 2) {\n for (var x = 1; x < stage.width; x += 2) {\n // Skip the maze generation if the tile is already carved\n if (getTile(x, y).type === 'floor') {\n continue\n }\n _growMaze(x, y)\n }\n }\n\n _connectRegions()\n\n _removeDeadEnds()\n\n return {\n rooms: _rooms,\n tiles: _tiles,\n seed,\n toJS: _toJS\n }\n }\n\n const _toJS = () => {\n const rooms = []\n const tiles = []\n\n for (const room of _rooms) {\n rooms.push(room.toJS())\n }\n\n for (let x = 0; x < _tiles.length; x++) {\n if (!tiles[x]) {\n tiles.push([])\n }\n for (let y = 0; y < _tiles[x].length; y++) {\n const tile = _tiles[x][y]\n tiles[x].push(tile.toJS())\n }\n }\n\n return {\n tiles,\n rooms,\n seed: _seed\n }\n }\n\n /**\n * @desc Implementation of the \"growing tree\" algorithm from here:\n * http://www.astrolog.org/labyrnth/algrithm.htm.\n *\n * @param {Number} startX - The x coordinate to start at\n * @param {Number} startY - The y coordinate to start at\n *\n * @returns {void}\n */\n const _growMaze = (startX, startY) => {\n var cells = []\n var lastDir\n\n if (Object.keys(_tiles[startX][startY].neighbours).filter(x => x.type === 'floor').length > 0) {\n return\n }\n\n _startRegion()\n\n _carve(startX, startY)\n\n cells.push(new Victor(startX, startY))\n\n let count = 0\n\n while (cells.length && count < 500) {\n count++\n var cell = cells[cells.length - 1]\n\n // See which adjacent cells are open.\n var unmadeCells = []\n\n for (let dir of cardinalDirections) {\n if (_canCarve(cell, dir)) {\n unmadeCells.push(dir)\n }\n }\n\n if (unmadeCells.length) {\n // Based on how \"windy\" passages are, try to prefer carving in the\n // same direction.\n var dir\n var stringifiedCells = unmadeCells.map(v => v.toString())\n if (lastDir && stringifiedCells.indexOf(lastDir.toString()) > -1 && randBetween(1, 100) > windingPercent) {\n dir = lastDir.clone()\n } else {\n let rand = randBetween(0, unmadeCells.length - 1)\n dir = unmadeCells[rand].clone()\n }\n\n let carveLoc1 = cell.clone().add(dir).toObject()\n _carve(carveLoc1.x, carveLoc1.y)\n\n let carveLoc2 = cell.clone().add(dir).add(dir).toObject()\n _carve(carveLoc2.x, carveLoc2.y)\n\n cells.push(cell.clone().add(dir).add(dir))\n\n lastDir = dir.clone()\n } else {\n // No adjacent uncarved cells.\n cells.pop()\n\n // This path has ended.\n lastDir = null\n }\n }\n }\n\n /**\n * @desc Creates rooms in the dungeon by repeatedly creating random rooms and\n * seeing if they overlap. Rooms that overlap are discarded. This process is\n * repeated until it hits the maximum tries determined by the 'numRoomTries'\n * variable.\n *\n * @returns {void}\n */\n const _addRooms = () => {\n for (var i = 0; i < numRoomTries; i++) {\n // Pick a random room size. The funny math here does two things:\n // - It makes sure rooms are odd-sized to line up with maze.\n // - It avoids creating rooms that are too rectangular: too tall and\n // narrow or too wide and flat.\n var size = randBetween(1, 3 + roomExtraSize) * 2 + 1\n var rectangularity = randBetween(0, 1 + Math.floor(size / 2)) * 2\n var width = size\n var height = size\n if (_oneIn(2)) {\n width += rectangularity\n } else {\n height += rectangularity\n }\n\n // Restrict the size of rooms relative to the stage size\n width = Math.min(width, stage.width - 4)\n height = Math.min(width, stage.height - 4)\n\n var x = randBetween(0, Math.floor((stage.width - width) / 2)) * 2 + 1\n var y = randBetween(0, Math.floor((stage.height - height) / 2)) * 2 + 1\n\n // Make sure X dimension doesn't overflow\n if (x + width > stage.width) {\n x = Math.max(1, stage.width - width - 1)\n }\n\n // Make sure Y dimension doesn't overflow\n if (y + height > stage.height) {\n y = Math.max(1, stage.height - height - 1)\n }\n\n var room = new Room(x, y, width, height)\n\n var overlaps = false\n\n for (var other of _rooms) {\n if (room.intersects(other)) {\n overlaps = true\n break\n }\n }\n\n if (overlaps) {\n continue\n }\n\n _rooms.push(room)\n\n _startRegion()\n\n // Convert room tiles to floor\n carveArea(x, y, width, height)\n }\n }\n\n /**\n * @desc converts an area of tiles to floor type\n *\n * @param {Number} x - The starting x coordinate\n * @param {Number} y - The starting y coordinate\n * @param {Number} width - The width of the area to carve\n * @param {Number} height - The height of the area to carve\n *\n * @returns {void}\n */\n const carveArea = (x, y, width, height) => {\n for (var i = x; i < x + width; i++) {\n for (var j = y; j < y + height; j++) {\n _carve(i, j)\n }\n }\n }\n\n /**\n * @desc Creates doorways between each generated region of tiles\n *\n * @return {void}\n */\n const _connectRegions = () => {\n let regionConnections = {}\n _tiles.forEach(row => {\n row.forEach(tile => {\n if (tile.type === 'floor') {\n return\n }\n\n let tileRegions = _.unique(\n getTileNESW(tile).map(x => x.region)\n .filter(x => !_.isUndefined(x))\n )\n if (tileRegions.length <= 1) {\n return\n }\n\n let key = tileRegions.join('-')\n if (!regionConnections[key]) {\n regionConnections[key] = []\n }\n regionConnections[key].push(tile)\n })\n })\n\n _.each(regionConnections, (connections) => {\n let index = randBetween(0, connections.length - 1)\n connections[index].type = 'door'\n connections.splice(index, 1)\n\n // Occasional open up additional connections\n connections.forEach(conn => {\n if (_oneIn(extraConnectorChance)) {\n conn.type = 'door'\n }\n })\n })\n }\n\n /**\n * @desc Helper function for calculating random chance. The higher the number\n * provided the less likely this value is to return true.\n *\n * @param {Number} num - The ceiling number that could be calculated\n *\n * @returns {Boolean} - True if the function rolled a one\n *\n * @example\n * _oneIn(50); // - Has a 1 in 50 chance of returning true\n */\n const _oneIn = (num) => {\n return randBetween(1, num) === 1\n }\n\n /**\n * @desc Fills in dead ends in the dungeon with wall tiles\n *\n * @returns {void}\n */\n const _removeDeadEnds = () => {\n var done = false\n\n const cycle = () => {\n let done = true\n _tiles.forEach((row) => {\n row.forEach((tile) => {\n // If it only has one exit, it's a dead end --> fill it in!\n if (tile.type === 'wall') {\n return\n }\n if (\n getTileNESW(tile).filter(t => t.type !== 'wall').length <= 1 &&\n !_rooms.find((room) => room.containsTile(tile.x, tile.y))\n ) {\n tile.type = 'wall'\n done = false\n }\n })\n })\n\n return done\n }\n\n while (!done) {\n done = true\n done = cycle()\n }\n }\n\n /**\n * @desc Gets whether or not an opening can be carved from the given starting\n * [Cell] at [pos] to the adjacent Cell facing [direction]. Returns `true`\n * if the starting Cell is in bounds and the destination Cell is filled\n * (or out of bounds).\n *\n * @param {Victor} cell - Victor JS vector object\n * @param {Victor} direction - Victor JS vector object indicating direction\n *\n * @return {Boolean} - true if the path can be carved\n */\n const _canCarve = (cell, direction) => {\n // Must end in bounds.\n let end = cell.clone().add(direction).add(direction).add(direction).toObject()\n\n if (!_tiles[end.x] || !_tiles[end.x][end.y]) {\n return false\n }\n\n if (getTile(end.x, end.y).type !== 'wall') {\n return false\n }\n\n // Destination must not be open.\n let dest = cell.clone().add(direction).add(direction).toObject()\n return getTile(dest.x, dest.y).type !== 'floor'\n }\n\n /**\n * @desc Increments the current region. Typically called every time a new area\n * starts being carved\n *\n * @returns {Number} - The current region number\n */\n const _startRegion = () => {\n _currentRegion++\n return _currentRegion\n }\n\n /**\n * @desc Changes the Tile at a given coordinate to a provided type. Typically\n * used to change the type to 'floor'\n *\n * @param {Number} x - The x coordinate to change\n * @param {Number} y - The y coordinate to change\n * @param {String} type - The type to change the tile to. Defaults to 'floor'\n *\n * @returns {void}\n */\n const _carve = (x, y, type = 'floor') => {\n setTile(x, y, type)\n }\n\n return {\n build\n }\n}\n\nconst build = (options) => {\n return new Dungeon().build(options)\n}\n\nmodule.exports = {\n build\n}\n","/**\n * This code is an implementation of Alea algorithm; (C) 2010 Johannes Baagøe.\n * Alea is licensed according to the http://en.wikipedia.org/wiki/MIT_License.\n */\nconst FRAC = 2.3283064365386963e-10; /* 2^-32 */\nclass RNG {\n constructor() {\n this._seed = 0;\n this._s0 = 0;\n this._s1 = 0;\n this._s2 = 0;\n this._c = 0;\n }\n getSeed() { return this._seed; }\n /**\n * Seed the number generator\n */\n setSeed(seed) {\n seed = (seed < 1 ? 1 / seed : seed);\n this._seed = seed;\n this._s0 = (seed >>> 0) * FRAC;\n seed = (seed * 69069 + 1) >>> 0;\n this._s1 = seed * FRAC;\n seed = (seed * 69069 + 1) >>> 0;\n this._s2 = seed * FRAC;\n this._c = 1;\n return this;\n }\n /**\n * @returns Pseudorandom value [0,1), uniformly distributed\n */\n getUniform() {\n let t = 2091639 * this._s0 + this._c * FRAC;\n this._s0 = this._s1;\n this._s1 = this._s2;\n this._c = t | 0;\n this._s2 = t - this._c;\n return this._s2;\n }\n /**\n * @param lowerBound The lower end of the range to return a value from, inclusive\n * @param upperBound The upper end of the range to return a value from, inclusive\n * @returns Pseudorandom value [lowerBound, upperBound], using ROT.RNG.getUniform() to distribute the value\n */\n getUniformInt(lowerBound, upperBound) {\n let max = Math.max(lowerBound, upperBound);\n let min = Math.min(lowerBound, upperBound);\n return Math.floor(this.getUniform() * (max - min + 1)) + min;\n }\n /**\n * @param mean Mean value\n * @param stddev Standard deviation. ~95% of the absolute values will be lower than 2*stddev.\n * @returns A normally distributed pseudorandom value\n */\n getNormal(mean = 0, stddev = 1) {\n let u, v, r;\n do {\n u = 2 * this.getUniform() - 1;\n v = 2 * this.getUniform() - 1;\n r = u * u + v * v;\n } while (r > 1 || r == 0);\n let gauss = u * Math.sqrt(-2 * Math.log(r) / r);\n return mean + gauss * stddev;\n }\n /**\n * @returns Pseudorandom value [1,100] inclusive, uniformly distributed\n */\n getPercentage() {\n return 1 + Math.floor(this.getUniform() * 100);\n }\n /**\n * @returns Randomly picked item, null when length=0\n */\n getItem(array) {\n if (!array.length) {\n return null;\n }\n return array[Math.floor(this.getUniform() * array.length)];\n }\n /**\n * @returns New array with randomized items\n */\n shuffle(array) {\n let result = [];\n let clone = array.slice();\n while (clone.length) {\n let index = clone.indexOf(this.getItem(clone));\n result.push(clone.splice(index, 1)[0]);\n }\n return result;\n }\n /**\n * @param data key=whatever, value=weight (relative probability)\n * @returns whatever\n */\n getWeightedValue(data) {\n let total = 0;\n for (let id in data) {\n total += data[id];\n }\n let random = this.getUniform() * total;\n let id, part = 0;\n for (id in data) {\n part += data[id];\n if (random < part) {\n return id;\n }\n }\n // If by some floating-point annoyance we have\n // random >= total, just return the last id.\n return id;\n }\n /**\n * Get RNG state. Useful for storing the state and re-setting it via setState.\n * @returns Internal state\n */\n getState() { return [this._s0, this._s1, this._s2, this._c]; }\n /**\n * Set a previously retrieved state.\n */\n setState(state) {\n this._s0 = state[0];\n this._s1 = state[1];\n this._s2 = state[2];\n this._c = state[3];\n return this;\n }\n /**\n * Returns a cloned RNG\n */\n clone() {\n let clone = new RNG();\n return clone.setState(this.getState());\n }\n}\nexport default new RNG().setSeed(Date.now());\n","import Canvas from \"./canvas.js\";\n/**\n * @class Rectangular backend\n * @private\n */\nlet Rect = /** @class */ (() => {\n class Rect extends Canvas {\n constructor() {\n super();\n this._spacingX = 0;\n this._spacingY = 0;\n this._canvasCache = {};\n }\n setOptions(options) {\n super.setOptions(options);\n this._canvasCache = {};\n }\n draw(data, clearBefore) {\n if (Rect.cache) {\n this._drawWithCache(data);\n }\n else {\n this._drawNoCache(data, clearBefore);\n }\n }\n _drawWithCache(data) {\n let [x, y, ch, fg, bg] = data;\n let hash = \"\" + ch + fg + bg;\n let canvas;\n if (hash in this._canvasCache) {\n canvas = this._canvasCache[hash];\n }\n else {\n let b = this._options.border;\n canvas = document.createElement(\"canvas\");\n let ctx = canvas.getContext(\"2d\");\n canvas.width = this._spacingX;\n canvas.height = this._spacingY;\n ctx.fillStyle = bg;\n ctx.fillRect(b, b, canvas.width - b, canvas.height - b);\n if (ch) {\n ctx.fillStyle = fg;\n ctx.font = this._ctx.font;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n let chars = [].concat(ch);\n for (let i = 0; i < chars.length; i++) {\n ctx.fillText(chars[i], this._spacingX / 2, Math.ceil(this._spacingY / 2));\n }\n }\n this._canvasCache[hash] = canvas;\n }\n this._ctx.drawImage(canvas, x * this._spacingX, y * this._spacingY);\n }\n _drawNoCache(data, clearBefore) {\n let [x, y, ch, fg, bg] = data;\n if (clearBefore) {\n let b = this._options.border;\n this._ctx.fillStyle = bg;\n this._ctx.fillRect(x * this._spacingX + b, y * this._spacingY + b, this._spacingX - b, this._spacingY - b);\n }\n if (!ch) {\n return;\n }\n this._ctx.fillStyle = fg;\n let chars = [].concat(ch);\n for (let i = 0; i < chars.length; i++) {\n this._ctx.fillText(chars[i], (x + 0.5) * this._spacingX, Math.ceil((y + 0.5) * this._spacingY));\n }\n }\n computeSize(availWidth, availHeight) {\n let width = Math.floor(availWidth / this._spacingX);\n let height = Math.floor(availHeight / this._spacingY);\n return [width, height];\n }\n computeFontSize(availWidth, availHeight) {\n let boxWidth = Math.floor(availWidth / this._options.width);\n let boxHeight = Math.floor(availHeight / this._options.height);\n /* compute char ratio */\n let oldFont = this._ctx.font;\n this._ctx.font = \"100px \" + this._options.fontFamily;\n let width = Math.ceil(this._ctx.measureText(\"W\").width);\n this._ctx.font = oldFont;\n let ratio = width / 100;\n let widthFraction = ratio * boxHeight / boxWidth;\n if (widthFraction > 1) { /* too wide with current aspect ratio */\n boxHeight = Math.floor(boxHeight / widthFraction);\n }\n return Math.floor(boxHeight / this._options.spacing);\n }\n _normalizedEventToPosition(x, y) {\n return [Math.floor(x / this._spacingX), Math.floor(y / this._spacingY)];\n }\n _updateSize() {\n const opts = this._options;\n const charWidth = Math.ceil(this._ctx.measureText(\"W\").width);\n this._spacingX = Math.ceil(opts.spacing * charWidth);\n this._spacingY = Math.ceil(opts.spacing * opts.fontSize);\n if (opts.forceSquareRatio) {\n this._spacingX = this._spacingY = Math.max(this._spacingX, this._spacingY);\n }\n this._ctx.canvas.width = opts.width * this._spacingX;\n this._ctx.canvas.height = opts.height * this._spacingY;\n }\n }\n Rect.cache = false;\n return Rect;\n})();\nexport default Rect;\n","import Backend from \"./backend.js\";\nexport default class Canvas extends Backend {\n constructor() {\n super();\n this._ctx = document.createElement(\"canvas\").getContext(\"2d\");\n }\n schedule(cb) { requestAnimationFrame(cb); }\n getContainer() { return this._ctx.canvas; }\n setOptions(opts) {\n super.setOptions(opts);\n const style = (opts.fontStyle ? `${opts.fontStyle} ` : ``);\n const font = `${style} ${opts.fontSize}px ${opts.fontFamily}`;\n this._ctx.font = font;\n this._updateSize();\n this._ctx.font = font;\n this._ctx.textAlign = \"center\";\n this._ctx.textBaseline = \"middle\";\n }\n clear() {\n this._ctx.fillStyle = this._options.bg;\n this._ctx.fillRect(0, 0, this._ctx.canvas.width, this._ctx.canvas.height);\n }\n eventToPosition(x, y) {\n let canvas = this._ctx.canvas;\n let rect = canvas.getBoundingClientRect();\n x -= rect.left;\n y -= rect.top;\n x *= canvas.width / rect.width;\n y *= canvas.height / rect.height;\n if (x < 0 || y < 0 || x >= canvas.width || y >= canvas.height) {\n return [-1, -1];\n }\n return this._normalizedEventToPosition(x, y);\n }\n}\n","/**\n * @class Abstract display backend module\n * @private\n */\nexport default class Backend {\n getContainer() { return null; }\n setOptions(options) { this._options = options; }\n}\n","/** Default with for display and map generators */\nexport let DEFAULT_WIDTH = 80;\n/** Default height for display and map generators */\nexport let DEFAULT_HEIGHT = 25;\nexport const DIRS = {\n 4: [[0, -1], [1, 0], [0, 1], [-1, 0]],\n 8: [[0, -1], [1, -1], [1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1]],\n 6: [[-1, -1], [1, -1], [2, 0], [1, 1], [-1, 1], [-2, 0]]\n};\nexport const KEYS = {\n /** Cancel key. */\n VK_CANCEL: 3,\n /** Help key. */\n VK_HELP: 6,\n /** Backspace key. */\n VK_BACK_SPACE: 8,\n /** Tab key. */\n VK_TAB: 9,\n /** 5 key on Numpad when NumLock is unlocked. Or on Mac, clear key which is positioned at NumLock key. */\n VK_CLEAR: 12,\n /** Return/enter key on the main keyboard. */\n VK_RETURN: 13,\n /** Reserved, but not used. */\n VK_ENTER: 14,\n /** Shift key. */\n VK_SHIFT: 16,\n /** Control key. */\n VK_CONTROL: 17,\n /** Alt (Option on Mac) key. */\n VK_ALT: 18,\n /** Pause key. */\n VK_PAUSE: 19,\n /** Caps lock. */\n VK_CAPS_LOCK: 20,\n /** Escape key. */\n VK_ESCAPE: 27,\n /** Space bar. */\n VK_SPACE: 32,\n /** Page Up key. */\n VK_PAGE_UP: 33,\n /** Page Down key. */\n VK_PAGE_DOWN: 34,\n /** End key. */\n VK_END: 35,\n /** Home key. */\n VK_HOME: 36,\n /** Left arrow. */\n VK_LEFT: 37,\n /** Up arrow. */\n VK_UP: 38,\n /** Right arrow. */\n VK_RIGHT: 39,\n /** Down arrow. */\n VK_DOWN: 40,\n /** Print Screen key. */\n VK_PRINTSCREEN: 44,\n /** Ins(ert) key. */\n VK_INSERT: 45,\n /** Del(ete) key. */\n VK_DELETE: 46,\n /***/\n VK_0: 48,\n /***/\n VK_1: 49,\n /***/\n VK_2: 50,\n /***/\n VK_3: 51,\n /***/\n VK_4: 52,\n /***/\n VK_5: 53,\n /***/\n VK_6: 54,\n /***/\n VK_7: 55,\n /***/\n VK_8: 56,\n /***/\n VK_9: 57,\n /** Colon (:) key. Requires Gecko 15.0 */\n VK_COLON: 58,\n /** Semicolon (;) key. */\n VK_SEMICOLON: 59,\n /** Less-than (<) key. Requires Gecko 15.0 */\n VK_LESS_THAN: 60,\n /** Equals (=) key. */\n VK_EQUALS: 61,\n /** Greater-than (>) key. Requires Gecko 15.0 */\n VK_GREATER_THAN: 62,\n /** Question mark (?) key. Requires Gecko 15.0 */\n VK_QUESTION_MARK: 63,\n /** Atmark (@) key. Requires Gecko 15.0 */\n VK_AT: 64,\n /***/\n VK_A: 65,\n /***/\n VK_B: 66,\n /***/\n VK_C: 67,\n /***/\n VK_D: 68,\n /***/\n VK_E: 69,\n /***/\n VK_F: 70,\n /***/\n VK_G: 71,\n /***/\n VK_H: 72,\n /***/\n VK_I: 73,\n /***/\n VK_J: 74,\n /***/\n VK_K: 75,\n /***/\n VK_L: 76,\n /***/\n VK_M: 77,\n /***/\n VK_N: 78,\n /***/\n VK_O: 79,\n /***/\n VK_P: 80,\n /***/\n VK_Q: 81,\n /***/\n VK_R: 82,\n /***/\n VK_S: 83,\n /***/\n VK_T: 84,\n /***/\n VK_U: 85,\n /***/\n VK_V: 86,\n /***/\n VK_W: 87,\n /***/\n VK_X: 88,\n /***/\n VK_Y: 89,\n /***/\n VK_Z: 90,\n /***/\n VK_CONTEXT_MENU: 93,\n /** 0 on the numeric keypad. */\n VK_NUMPAD0: 96,\n /** 1 on the numeric keypad. */\n VK_NUMPAD1: 97,\n /** 2 on the numeric keypad. */\n VK_NUMPAD2: 98,\n /** 3 on the numeric keypad. */\n VK_NUMPAD3: 99,\n /** 4 on the numeric keypad. */\n VK_NUMPAD4: 100,\n /** 5 on the numeric keypad. */\n VK_NUMPAD5: 101,\n /** 6 on the numeric keypad. */\n VK_NUMPAD6: 102,\n /** 7 on the numeric keypad. */\n VK_NUMPAD7: 103,\n /** 8 on the numeric keypad. */\n VK_NUMPAD8: 104,\n /** 9 on the numeric keypad. */\n VK_NUMPAD9: 105,\n /** * on the numeric keypad. */\n VK_MULTIPLY: 106,\n /** + on the numeric keypad. */\n VK_ADD: 107,\n /***/\n VK_SEPARATOR: 108,\n /** - on the numeric keypad. */\n VK_SUBTRACT: 109,\n /** Decimal point on the numeric keypad. */\n VK_DECIMAL: 110,\n /** / on the numeric keypad. */\n VK_DIVIDE: 111,\n /** F1 key. */\n VK_F1: 112,\n /** F2 key. */\n VK_F2: 113,\n /** F3 key. */\n VK_F3: 114,\n /** F4 key. */\n VK_F4: 115,\n /** F5 key. */\n VK_F5: 116,\n /** F6 key. */\n VK_F6: 117,\n /** F7 key. */\n VK_F7: 118,\n /** F8 key. */\n VK_F8: 119,\n /** F9 key. */\n VK_F9: 120,\n /** F10 key. */\n VK_F10: 121,\n /** F11 key. */\n VK_F11: 122,\n /** F12 key. */\n VK_F12: 123,\n /** F13 key. */\n VK_F13: 124,\n /** F14 key. */\n VK_F14: 125,\n /** F15 key. */\n VK_F15: 126,\n /** F16 key. */\n VK_F16: 127,\n /** F17 key. */\n VK_F17: 128,\n /** F18 key. */\n VK_F18: 129,\n /** F19 key. */\n VK_F19: 130,\n /** F20 key. */\n VK_F20: 131,\n /** F21 key. */\n VK_F21: 132,\n /** F22 key. */\n VK_F22: 133,\n /** F23 key. */\n VK_F23: 134,\n /** F24 key. */\n VK_F24: 135,\n /** Num Lock key. */\n VK_NUM_LOCK: 144,\n /** Scroll Lock key. */\n VK_SCROLL_LOCK: 145,\n /** Circumflex (^) key. Requires Gecko 15.0 */\n VK_CIRCUMFLEX: 160,\n /** Exclamation (!) key. Requires Gecko 15.0 */\n VK_EXCLAMATION: 161,\n /** Double quote () key. Requires Gecko 15.0 */\n VK_DOUBLE_QUOTE: 162,\n /** Hash (#) key. Requires Gecko 15.0 */\n VK_HASH: 163,\n /** Dollar sign ($) key. Requires Gecko 15.0 */\n VK_DOLLAR: 164,\n /** Percent (%) key. Requires Gecko 15.0 */\n VK_PERCENT: 165,\n /** Ampersand (&) key. Requires Gecko 15.0 */\n VK_AMPERSAND: 166,\n /** Underscore (_) key. Requires Gecko 15.0 */\n VK_UNDERSCORE: 167,\n /** Open parenthesis (() key. Requires Gecko 15.0 */\n VK_OPEN_PAREN: 168,\n /** Close parenthesis ()) key. Requires Gecko 15.0 */\n VK_CLOSE_PAREN: 169,\n /* Asterisk (*) key. Requires Gecko 15.0 */\n VK_ASTERISK: 170,\n /** Plus (+) key. Requires Gecko 15.0 */\n VK_PLUS: 171,\n /** Pipe (|) key. Requires Gecko 15.0 */\n VK_PIPE: 172,\n /** Hyphen-US/docs/Minus (-) key. Requires Gecko 15.0 */\n VK_HYPHEN_MINUS: 173,\n /** Open curly bracket ({) key. Requires Gecko 15.0 */\n VK_OPEN_CURLY_BRACKET: 174,\n /** Close curly bracket (}) key. Requires Gecko 15.0 */\n VK_CLOSE_CURLY_BRACKET: 175,\n /** Tilde (~) key. Requires Gecko 15.0 */\n VK_TILDE: 176,\n /** Comma (,) key. */\n VK_COMMA: 188,\n /** Period (.) key. */\n VK_PERIOD: 190,\n /** Slash (/) key. */\n VK_SLASH: 191,\n /** Back tick (`) key. */\n VK_BACK_QUOTE: 192,\n /** Open square bracket ([) key. */\n VK_OPEN_BRACKET: 219,\n /** Back slash (\\) key. */\n VK_BACK_SLASH: 220,\n /** Close square bracket (]) key. */\n VK_CLOSE_BRACKET: 221,\n /** Quote (''') key. */\n VK_QUOTE: 222,\n /** Meta key on Linux, Command key on Mac. */\n VK_META: 224,\n /** AltGr key on Linux. Requires Gecko 15.0 */\n VK_ALTGR: 225,\n /** Windows logo key on Windows. Or Super or Hyper key on Linux. Requires Gecko 15.0 */\n VK_WIN: 91,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_KANA: 21,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_HANGUL: 21,\n /** 英数 key on Japanese Mac keyboard. Requires Gecko 15.0 */\n VK_EISU: 22,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_JUNJA: 23,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_FINAL: 24,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_HANJA: 25,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_KANJI: 25,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_CONVERT: 28,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_NONCONVERT: 29,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_ACCEPT: 30,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_MODECHANGE: 31,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_SELECT: 41,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_PRINT: 42,\n /** Linux support for this keycode was added in Gecko 4.0. */\n VK_EXECUTE: 43,\n /** Linux support for this keycode was added in Gecko 4.0.\t */\n VK_SLEEP: 95\n};\n","import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from \"../constants.js\";\n;\nexport default class Map {\n /**\n * @class Base map generator\n * @param {int} [width=ROT.DEFAULT_WIDTH]\n * @param {int} [height=ROT.DEFAULT_HEIGHT]\n */\n constructor(width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\n this._width = width;\n this._height = height;\n }\n ;\n _fillMap(value) {\n let map = [];\n for (let i = 0; i < this._width; i++) {\n map.push([]);\n for (let j = 0; j < this._height; j++) {\n map[i].push(value);\n }\n }\n return map;\n }\n}\n","import Map from \"./map.js\";\n/**\n * @class Dungeon map: has rooms and corridors\n * @augments ROT.Map\n */\nexport default class Dungeon extends Map {\n constructor(width, height) {\n super(width, height);\n this._rooms = [];\n this._corridors = [];\n }\n /**\n * Get all generated rooms\n * @returns {ROT.Map.Feature.Room[]}\n */\n getRooms() { return this._rooms; }\n /**\n * Get all generated corridors\n * @returns {ROT.Map.Feature.Corridor[]}\n */\n getCorridors() { return this._corridors; }\n}\n","import RNG from \"../rng.js\";\n;\n/**\n * @class Dungeon feature; has own .create() method\n */\nclass Feature {\n}\n/**\n * @class Room\n * @augments ROT.Map.Feature\n * @param {int} x1\n * @param {int} y1\n * @param {int} x2\n * @param {int} y2\n * @param {int} [doorX]\n * @param {int} [doorY]\n */\nexport class Room extends Feature {\n constructor(x1, y1, x2, y2, doorX, doorY) {\n super();\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n this._doors = {};\n if (doorX !== undefined && doorY !== undefined) {\n this.addDoor(doorX, doorY);\n }\n }\n ;\n /**\n * Room of random size, with a given doors and direction\n */\n static createRandomAt(x, y, dx, dy, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n if (dx == 1) { /* to the right */\n let y2 = y - Math.floor(RNG.getUniform() * height);\n return new this(x + 1, y2, x + width, y2 + height - 1, x, y);\n }\n if (dx == -1) { /* to the left */\n let y2 = y - Math.floor(RNG.getUniform() * height);\n return new this(x - width, y2, x - 1, y2 + height - 1, x, y);\n }\n if (dy == 1) { /* to the bottom */\n let x2 = x - Math.floor(RNG.getUniform() * width);\n return new this(x2, y + 1, x2 + width - 1, y + height, x, y);\n }\n if (dy == -1) { /* to the top */\n let x2 = x - Math.floor(RNG.getUniform() * width);\n return new this(x2, y - height, x2 + width - 1, y - 1, x, y);\n }\n throw new Error(\"dx or dy must be 1 or -1\");\n }\n /**\n * Room of random size, positioned around center coords\n */\n static createRandomCenter(cx, cy, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n let x1 = cx - Math.floor(RNG.getUniform() * width);\n let y1 = cy - Math.floor(RNG.getUniform() * height);\n let x2 = x1 + width - 1;\n let y2 = y1 + height - 1;\n return new this(x1, y1, x2, y2);\n }\n /**\n * Room of random size within a given dimensions\n */\n static createRandom(availWidth, availHeight, options) {\n let min = options.roomWidth[0];\n let max = options.roomWidth[1];\n let width = RNG.getUniformInt(min, max);\n min = options.roomHeight[0];\n max = options.roomHeight[1];\n let height = RNG.getUniformInt(min, max);\n let left = availWidth - width - 1;\n let top = availHeight - height - 1;\n let x1 = 1 + Math.floor(RNG.getUniform() * left);\n let y1 = 1 + Math.floor(RNG.getUniform() * top);\n let x2 = x1 + width - 1;\n let y2 = y1 + height - 1;\n return new this(x1, y1, x2, y2);\n }\n addDoor(x, y) {\n this._doors[x + \",\" + y] = 1;\n return this;\n }\n /**\n * @param {function}\n */\n getDoors(cb) {\n for (let key in this._doors) {\n let parts = key.split(\",\");\n cb(parseInt(parts[0]), parseInt(parts[1]));\n }\n return this;\n }\n clearDoors() {\n this._doors = {};\n return this;\n }\n addDoors(isWallCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x != left && x != right && y != top && y != bottom) {\n continue;\n }\n if (isWallCallback(x, y)) {\n continue;\n }\n this.addDoor(x, y);\n }\n }\n return this;\n }\n debug() {\n console.log(\"room\", this._x1, this._y1, this._x2, this._y2);\n }\n isValid(isWallCallback, canBeDugCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x == left || x == right || y == top || y == bottom) {\n if (!isWallCallback(x, y)) {\n return false;\n }\n }\n else {\n if (!canBeDugCallback(x, y)) {\n return false;\n }\n }\n }\n }\n return true;\n }\n /**\n * @param {function} digCallback Dig callback with a signature (x, y, value). Values: 0 = empty, 1 = wall, 2 = door. Multiple doors are allowed.\n */\n create(digCallback) {\n let left = this._x1 - 1;\n let right = this._x2 + 1;\n let top = this._y1 - 1;\n let bottom = this._y2 + 1;\n let value = 0;\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n if (x + \",\" + y in this._doors) {\n value = 2;\n }\n else if (x == left || x == right || y == top || y == bottom) {\n value = 1;\n }\n else {\n value = 0;\n }\n digCallback(x, y, value);\n }\n }\n }\n getCenter() {\n return [Math.round((this._x1 + this._x2) / 2), Math.round((this._y1 + this._y2) / 2)];\n }\n getLeft() { return this._x1; }\n getRight() { return this._x2; }\n getTop() { return this._y1; }\n getBottom() { return this._y2; }\n}\n/**\n * @class Corridor\n * @augments ROT.Map.Feature\n * @param {int} startX\n * @param {int} startY\n * @param {int} endX\n * @param {int} endY\n */\nexport class Corridor extends Feature {\n constructor(startX, startY, endX, endY) {\n super();\n this._startX = startX;\n this._startY = startY;\n this._endX = endX;\n this._endY = endY;\n this._endsWithAWall = true;\n }\n static createRandomAt(x, y, dx, dy, options) {\n let min = options.corridorLength[0];\n let max = options.corridorLength[1];\n let length = RNG.getUniformInt(min, max);\n return new this(x, y, x + dx * length, y + dy * length);\n }\n debug() {\n console.log(\"corridor\", this._startX, this._startY, this._endX, this._endY);\n }\n isValid(isWallCallback, canBeDugCallback) {\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n let length = 1 + Math.max(Math.abs(dx), Math.abs(dy));\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n let nx = dy;\n let ny = -dx;\n let ok = true;\n for (let i = 0; i < length; i++) {\n let x = sx + i * dx;\n let y = sy + i * dy;\n if (!canBeDugCallback(x, y)) {\n ok = false;\n }\n if (!isWallCallback(x + nx, y + ny)) {\n ok = false;\n }\n if (!isWallCallback(x - nx, y - ny)) {\n ok = false;\n }\n if (!ok) {\n length = i;\n this._endX = x - dx;\n this._endY = y - dy;\n break;\n }\n }\n /**\n * If the length degenerated, this corridor might be invalid\n */\n /* not supported */\n if (length == 0) {\n return false;\n }\n /* length 1 allowed only if the next space is empty */\n if (length == 1 && isWallCallback(this._endX + dx, this._endY + dy)) {\n return false;\n }\n /**\n * We do not want the corridor to crash into a corner of a room;\n * if any of the ending corners is empty, the N+1th cell of this corridor must be empty too.\n *\n * Situation:\n * #######1\n * .......?\n * #######2\n *\n * The corridor was dug from left to right.\n * 1, 2 - problematic corners, ? = N+1th cell (not dug)\n */\n let firstCornerBad = !isWallCallback(this._endX + dx + nx, this._endY + dy + ny);\n let secondCornerBad = !isWallCallback(this._endX + dx - nx, this._endY + dy - ny);\n this._endsWithAWall = isWallCallback(this._endX + dx, this._endY + dy);\n if ((firstCornerBad || secondCornerBad) && this._endsWithAWall) {\n return false;\n }\n return true;\n }\n /**\n * @param {function} digCallback Dig callback with a signature (x, y, value). Values: 0 = empty.\n */\n create(digCallback) {\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n let length = 1 + Math.max(Math.abs(dx), Math.abs(dy));\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n for (let i = 0; i < length; i++) {\n let x = sx + i * dx;\n let y = sy + i * dy;\n digCallback(x, y, 0);\n }\n return true;\n }\n createPriorityWalls(priorityWallCallback) {\n if (!this._endsWithAWall) {\n return;\n }\n let sx = this._startX;\n let sy = this._startY;\n let dx = this._endX - sx;\n let dy = this._endY - sy;\n if (dx) {\n dx = dx / Math.abs(dx);\n }\n if (dy) {\n dy = dy / Math.abs(dy);\n }\n let nx = dy;\n let ny = -dx;\n priorityWallCallback(this._endX + dx, this._endY + dy);\n priorityWallCallback(this._endX + nx, this._endY + ny);\n priorityWallCallback(this._endX - nx, this._endY - ny);\n }\n}\n","import Dungeon from \"./dungeon.js\";\nimport { Room, Corridor } from \"./features.js\";\nimport RNG from \"../rng.js\";\nimport { DIRS } from \"../constants.js\";\nconst FEATURES = {\n \"room\": Room,\n \"corridor\": Corridor\n};\n/**\n * Random dungeon generator using human-like digging patterns.\n * Heavily based on Mike Anderson's ideas from the \"Tyrant\" algo, mentioned at\n * http://www.roguebasin.roguelikedevelopment.org/index.php?title=Dungeon-Building_Algorithm.\n */\nexport default class Digger extends Dungeon {\n constructor(width, height, options = {}) {\n super(width, height);\n this._options = Object.assign({\n roomWidth: [3, 9],\n roomHeight: [3, 5],\n corridorLength: [3, 10],\n dugPercentage: 0.2,\n timeLimit: 1000 /* we stop after this much time has passed (msec) */\n }, options);\n this._features = {\n \"room\": 4,\n \"corridor\": 4\n };\n this._map = [];\n this._featureAttempts = 20; /* how many times do we try to create a feature on a suitable wall */\n this._walls = {}; /* these are available for digging */\n this._dug = 0;\n this._digCallback = this._digCallback.bind(this);\n this._canBeDugCallback = this._canBeDugCallback.bind(this);\n this._isWallCallback = this._isWallCallback.bind(this);\n this._priorityWallCallback = this._priorityWallCallback.bind(this);\n }\n create(callback) {\n this._rooms = [];\n this._corridors = [];\n this._map = this._fillMap(1);\n this._walls = {};\n this._dug = 0;\n let area = (this._width - 2) * (this._height - 2);\n this._firstRoom();\n let t1 = Date.now();\n let priorityWalls;\n do {\n priorityWalls = 0;\n let t2 = Date.now();\n if (t2 - t1 > this._options.timeLimit) {\n break;\n }\n /* find a good wall */\n let wall = this._findWall();\n if (!wall) {\n break;\n } /* no more walls */\n let parts = wall.split(\",\");\n let x = parseInt(parts[0]);\n let y = parseInt(parts[1]);\n let dir = this._getDiggingDirection(x, y);\n if (!dir) {\n continue;\n } /* this wall is not suitable */\n //\t\tconsole.log(\"wall\", x, y);\n /* try adding a feature */\n let featureAttempts = 0;\n do {\n featureAttempts++;\n if (this._tryFeature(x, y, dir[0], dir[1])) { /* feature added */\n //if (this._rooms.length + this._corridors.length == 2) { this._rooms[0].addDoor(x, y); } /* first room oficially has doors */\n this._removeSurroundingWalls(x, y);\n this._removeSurroundingWalls(x - dir[0], y - dir[1]);\n break;\n }\n } while (featureAttempts < this._featureAttempts);\n for (let id in this._walls) {\n if (this._walls[id] > 1) {\n priorityWalls++;\n }\n }\n } while (this._dug / area < this._options.dugPercentage || priorityWalls); /* fixme number of priority walls */\n this._addDoors();\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n this._walls = {};\n this._map = [];\n return this;\n }\n _digCallback(x, y, value) {\n if (value == 0 || value == 2) { /* empty */\n this._map[x][y] = 0;\n this._dug++;\n }\n else { /* wall */\n this._walls[x + \",\" + y] = 1;\n }\n }\n _isWallCallback(x, y) {\n if (x < 0 || y < 0 || x >= this._width || y >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _canBeDugCallback(x, y) {\n if (x < 1 || y < 1 || x + 1 >= this._width || y + 1 >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _priorityWallCallback(x, y) { this._walls[x + \",\" + y] = 2; }\n ;\n _firstRoom() {\n let cx = Math.floor(this._width / 2);\n let cy = Math.floor(this._height / 2);\n let room = Room.createRandomCenter(cx, cy, this._options);\n this._rooms.push(room);\n room.create(this._digCallback);\n }\n /**\n * Get a suitable wall\n */\n _findWall() {\n let prio1 = [];\n let prio2 = [];\n for (let id in this._walls) {\n let prio = this._walls[id];\n if (prio == 2) {\n prio2.push(id);\n }\n else {\n prio1.push(id);\n }\n }\n let arr = (prio2.length ? prio2 : prio1);\n if (!arr.length) {\n return null;\n } /* no walls :/ */\n let id = RNG.getItem(arr.sort()); // sort to make the order deterministic\n delete this._walls[id];\n return id;\n }\n /**\n * Tries adding a feature\n * @returns {bool} was this a successful try?\n */\n _tryFeature(x, y, dx, dy) {\n let featureName = RNG.getWeightedValue(this._features);\n let ctor = FEATURES[featureName];\n let feature = ctor.createRandomAt(x, y, dx, dy, this._options);\n if (!feature.isValid(this._isWallCallback, this._canBeDugCallback)) {\n //\t\tconsole.log(\"not valid\");\n //\t\tfeature.debug();\n return false;\n }\n feature.create(this._digCallback);\n //\tfeature.debug();\n if (feature instanceof Room) {\n this._rooms.push(feature);\n }\n if (feature instanceof Corridor) {\n feature.createPriorityWalls(this._priorityWallCallback);\n this._corridors.push(feature);\n }\n return true;\n }\n _removeSurroundingWalls(cx, cy) {\n let deltas = DIRS[4];\n for (let i = 0; i < deltas.length; i++) {\n let delta = deltas[i];\n let x = cx + delta[0];\n let y = cy + delta[1];\n delete this._walls[x + \",\" + y];\n x = cx + 2 * delta[0];\n y = cy + 2 * delta[1];\n delete this._walls[x + \",\" + y];\n }\n }\n /**\n * Returns vector in \"digging\" direction, or false, if this does not exist (or is not unique)\n */\n _getDiggingDirection(cx, cy) {\n if (cx <= 0 || cy <= 0 || cx >= this._width - 1 || cy >= this._height - 1) {\n return null;\n }\n let result = null;\n let deltas = DIRS[4];\n for (let i = 0; i < deltas.length; i++) {\n let delta = deltas[i];\n let x = cx + delta[0];\n let y = cy + delta[1];\n if (!this._map[x][y]) { /* there already is another empty neighbor! */\n if (result) {\n return null;\n }\n result = delta;\n }\n }\n /* no empty neighbor */\n if (!result) {\n return null;\n }\n return [-result[0], -result[1]];\n }\n /**\n * Find empty spaces surrounding rooms, and apply doors.\n */\n _addDoors() {\n let data = this._map;\n function isWallCallback(x, y) {\n return (data[x][y] == 1);\n }\n ;\n for (let i = 0; i < this._rooms.length; i++) {\n let room = this._rooms[i];\n room.clearDoors();\n room.addDoors(isWallCallback);\n }\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * Join lists with \"i\" and \"i+1\"\n */\nfunction addToList(i, L, R) {\n R[L[i + 1]] = R[i];\n L[R[i]] = L[i + 1];\n R[i] = i + 1;\n L[i + 1] = i;\n}\n/**\n * Remove \"i\" from its list\n */\nfunction removeFromList(i, L, R) {\n R[L[i]] = R[i];\n L[R[i]] = L[i];\n R[i] = i;\n L[i] = i;\n}\n/**\n * Maze generator - Eller's algorithm\n * See http://homepages.cwi.nl/~tromp/maze.html for explanation\n */\nexport default class EllerMaze extends Map {\n create(callback) {\n let map = this._fillMap(1);\n let w = Math.ceil((this._width - 2) / 2);\n let rand = 9 / 24;\n let L = [];\n let R = [];\n for (let i = 0; i < w; i++) {\n L.push(i);\n R.push(i);\n }\n L.push(w - 1); /* fake stop-block at the right side */\n let j;\n for (j = 1; j + 3 < this._height; j += 2) {\n /* one row */\n for (let i = 0; i < w; i++) {\n /* cell coords (will be always empty) */\n let x = 2 * i + 1;\n let y = j;\n map[x][y] = 0;\n /* right connection */\n if (i != L[i + 1] && RNG.getUniform() > rand) {\n addToList(i, L, R);\n map[x + 1][y] = 0;\n }\n /* bottom connection */\n if (i != L[i] && RNG.getUniform() > rand) {\n /* remove connection */\n removeFromList(i, L, R);\n }\n else {\n /* create connection */\n map[x][y + 1] = 0;\n }\n }\n }\n /* last row */\n for (let i = 0; i < w; i++) {\n /* cell coords (will be always empty) */\n let x = 2 * i + 1;\n let y = j;\n map[x][y] = 0;\n /* right connection */\n if (i != L[i + 1] && (i == L[i] || RNG.getUniform() > rand)) {\n /* dig right also if the cell is separated, so it gets connected to the rest of maze */\n addToList(i, L, R);\n map[x + 1][y] = 0;\n }\n removeFromList(i, L, R);\n }\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, map[i][j]);\n }\n }\n return this;\n }\n}\n","import Arena from \"./arena.js\";\nimport Uniform from \"./uniform.js\";\nimport Cellular from \"./cellular.js\";\nimport Digger from \"./digger.js\";\nimport EllerMaze from \"./ellermaze.js\";\nimport DividedMaze from \"./dividedmaze.js\";\nimport IceyMaze from \"./iceymaze.js\";\nimport Rogue from \"./rogue.js\";\nexport default { Arena, Uniform, Cellular, Digger, EllerMaze, DividedMaze, IceyMaze, Rogue };\n","import Map from \"./map.js\";\n/**\n * @class Simple empty rectangular room\n * @augments ROT.Map\n */\nexport default class Arena extends Map {\n create(callback) {\n let w = this._width - 1;\n let h = this._height - 1;\n for (let i = 0; i <= w; i++) {\n for (let j = 0; j <= h; j++) {\n let empty = (i && j && i < w && j < h);\n callback(i, j, empty ? 0 : 1);\n }\n }\n return this;\n }\n}\n","import Dungeon from \"./dungeon.js\";\nimport { Room, Corridor } from \"./features.js\";\nimport RNG from \"../rng.js\";\n;\n/**\n * @class Dungeon generator which tries to fill the space evenly. Generates independent rooms and tries to connect them.\n * @augments ROT.Map.Dungeon\n */\nexport default class Uniform extends Dungeon {\n constructor(width, height, options) {\n super(width, height);\n this._options = {\n roomWidth: [3, 9],\n roomHeight: [3, 5],\n roomDugPercentage: 0.1,\n timeLimit: 1000 /* we stop after this much time has passed (msec) */\n };\n Object.assign(this._options, options);\n this._map = [];\n this._dug = 0;\n this._roomAttempts = 20; /* new room is created N-times until is considered as impossible to generate */\n this._corridorAttempts = 20; /* corridors are tried N-times until the level is considered as impossible to connect */\n this._connected = []; /* list of already connected rooms */\n this._unconnected = []; /* list of remaining unconnected rooms */\n this._digCallback = this._digCallback.bind(this);\n this._canBeDugCallback = this._canBeDugCallback.bind(this);\n this._isWallCallback = this._isWallCallback.bind(this);\n }\n /**\n * Create a map. If the time limit has been hit, returns null.\n * @see ROT.Map#create\n */\n create(callback) {\n let t1 = Date.now();\n while (1) {\n let t2 = Date.now();\n if (t2 - t1 > this._options.timeLimit) {\n return null;\n } /* time limit! */\n this._map = this._fillMap(1);\n this._dug = 0;\n this._rooms = [];\n this._unconnected = [];\n this._generateRooms();\n if (this._rooms.length < 2) {\n continue;\n }\n if (this._generateCorridors()) {\n break;\n }\n }\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n return this;\n }\n /**\n * Generates a suitable amount of rooms\n */\n _generateRooms() {\n let w = this._width - 2;\n let h = this._height - 2;\n let room;\n do {\n room = this._generateRoom();\n if (this._dug / (w * h) > this._options.roomDugPercentage) {\n break;\n } /* achieved requested amount of free space */\n } while (room);\n /* either enough rooms, or not able to generate more of them :) */\n }\n /**\n * Try to generate one room\n */\n _generateRoom() {\n let count = 0;\n while (count < this._roomAttempts) {\n count++;\n let room = Room.createRandom(this._width, this._height, this._options);\n if (!room.isValid(this._isWallCallback, this._canBeDugCallback)) {\n continue;\n }\n room.create(this._digCallback);\n this._rooms.push(room);\n return room;\n }\n /* no room was generated in a given number of attempts */\n return null;\n }\n /**\n * Generates connectors beween rooms\n * @returns {bool} success Was this attempt successfull?\n */\n _generateCorridors() {\n let cnt = 0;\n while (cnt < this._corridorAttempts) {\n cnt++;\n this._corridors = [];\n /* dig rooms into a clear map */\n this._map = this._fillMap(1);\n for (let i = 0; i < this._rooms.length; i++) {\n let room = this._rooms[i];\n room.clearDoors();\n room.create(this._digCallback);\n }\n this._unconnected = RNG.shuffle(this._rooms.slice());\n this._connected = [];\n if (this._unconnected.length) {\n this._connected.push(this._unconnected.pop());\n } /* first one is always connected */\n while (1) {\n /* 1. pick random connected room */\n let connected = RNG.getItem(this._connected);\n if (!connected) {\n break;\n }\n /* 2. find closest unconnected */\n let room1 = this._closestRoom(this._unconnected, connected);\n if (!room1) {\n break;\n }\n /* 3. connect it to closest connected */\n let room2 = this._closestRoom(this._connected, room1);\n if (!room2) {\n break;\n }\n let ok = this._connectRooms(room1, room2);\n if (!ok) {\n break;\n } /* stop connecting, re-shuffle */\n if (!this._unconnected.length) {\n return true;\n } /* done; no rooms remain */\n }\n }\n return false;\n }\n ;\n /**\n * For a given room, find the closest one from the list\n */\n _closestRoom(rooms, room) {\n let dist = Infinity;\n let center = room.getCenter();\n let result = null;\n for (let i = 0; i < rooms.length; i++) {\n let r = rooms[i];\n let c = r.getCenter();\n let dx = c[0] - center[0];\n let dy = c[1] - center[1];\n let d = dx * dx + dy * dy;\n if (d < dist) {\n dist = d;\n result = r;\n }\n }\n return result;\n }\n _connectRooms(room1, room2) {\n /*\n room1.debug();\n room2.debug();\n */\n let center1 = room1.getCenter();\n let center2 = room2.getCenter();\n let diffX = center2[0] - center1[0];\n let diffY = center2[1] - center1[1];\n let start;\n let end;\n let dirIndex1, dirIndex2, min, max, index;\n if (Math.abs(diffX) < Math.abs(diffY)) { /* first try connecting north-south walls */\n dirIndex1 = (diffY > 0 ? 2 : 0);\n dirIndex2 = (dirIndex1 + 2) % 4;\n min = room2.getLeft();\n max = room2.getRight();\n index = 0;\n }\n else { /* first try connecting east-west walls */\n dirIndex1 = (diffX > 0 ? 1 : 3);\n dirIndex2 = (dirIndex1 + 2) % 4;\n min = room2.getTop();\n max = room2.getBottom();\n index = 1;\n }\n start = this._placeInWall(room1, dirIndex1); /* corridor will start here */\n if (!start) {\n return false;\n }\n if (start[index] >= min && start[index] <= max) { /* possible to connect with straight line (I-like) */\n end = start.slice();\n let value = 0;\n switch (dirIndex2) {\n case 0:\n value = room2.getTop() - 1;\n break;\n case 1:\n value = room2.getRight() + 1;\n break;\n case 2:\n value = room2.getBottom() + 1;\n break;\n case 3:\n value = room2.getLeft() - 1;\n break;\n }\n end[(index + 1) % 2] = value;\n this._digLine([start, end]);\n }\n else if (start[index] < min - 1 || start[index] > max + 1) { /* need to switch target wall (L-like) */\n let diff = start[index] - center2[index];\n let rotation = 0;\n switch (dirIndex2) {\n case 0:\n case 1:\n rotation = (diff < 0 ? 3 : 1);\n break;\n case 2:\n case 3:\n rotation = (diff < 0 ? 1 : 3);\n break;\n }\n dirIndex2 = (dirIndex2 + rotation) % 4;\n end = this._placeInWall(room2, dirIndex2);\n if (!end) {\n return false;\n }\n let mid = [0, 0];\n mid[index] = start[index];\n let index2 = (index + 1) % 2;\n mid[index2] = end[index2];\n this._digLine([start, mid, end]);\n }\n else { /* use current wall pair, but adjust the line in the middle (S-like) */\n let index2 = (index + 1) % 2;\n end = this._placeInWall(room2, dirIndex2);\n if (!end) {\n return false;\n }\n let mid = Math.round((end[index2] + start[index2]) / 2);\n let mid1 = [0, 0];\n let mid2 = [0, 0];\n mid1[index] = start[index];\n mid1[index2] = mid;\n mid2[index] = end[index];\n mid2[index2] = mid;\n this._digLine([start, mid1, mid2, end]);\n }\n room1.addDoor(start[0], start[1]);\n room2.addDoor(end[0], end[1]);\n index = this._unconnected.indexOf(room1);\n if (index != -1) {\n this._unconnected.splice(index, 1);\n this._connected.push(room1);\n }\n index = this._unconnected.indexOf(room2);\n if (index != -1) {\n this._unconnected.splice(index, 1);\n this._connected.push(room2);\n }\n return true;\n }\n _placeInWall(room, dirIndex) {\n let start = [0, 0];\n let dir = [0, 0];\n let length = 0;\n switch (dirIndex) {\n case 0:\n dir = [1, 0];\n start = [room.getLeft(), room.getTop() - 1];\n length = room.getRight() - room.getLeft() + 1;\n break;\n case 1:\n dir = [0, 1];\n start = [room.getRight() + 1, room.getTop()];\n length = room.getBottom() - room.getTop() + 1;\n break;\n case 2:\n dir = [1, 0];\n start = [room.getLeft(), room.getBottom() + 1];\n length = room.getRight() - room.getLeft() + 1;\n break;\n case 3:\n dir = [0, 1];\n start = [room.getLeft() - 1, room.getTop()];\n length = room.getBottom() - room.getTop() + 1;\n break;\n }\n let avail = [];\n let lastBadIndex = -2;\n for (let i = 0; i < length; i++) {\n let x = start[0] + i * dir[0];\n let y = start[1] + i * dir[1];\n avail.push(null);\n let isWall = (this._map[x][y] == 1);\n if (isWall) {\n if (lastBadIndex != i - 1) {\n avail[i] = [x, y];\n }\n }\n else {\n lastBadIndex = i;\n if (i) {\n avail[i - 1] = null;\n }\n }\n }\n for (let i = avail.length - 1; i >= 0; i--) {\n if (!avail[i]) {\n avail.splice(i, 1);\n }\n }\n return (avail.length ? RNG.getItem(avail) : null);\n }\n /**\n * Dig a polyline.\n */\n _digLine(points) {\n for (let i = 1; i < points.length; i++) {\n let start = points[i - 1];\n let end = points[i];\n let corridor = new Corridor(start[0], start[1], end[0], end[1]);\n corridor.create(this._digCallback);\n this._corridors.push(corridor);\n }\n }\n _digCallback(x, y, value) {\n this._map[x][y] = value;\n if (value == 0) {\n this._dug++;\n }\n }\n _isWallCallback(x, y) {\n if (x < 0 || y < 0 || x >= this._width || y >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n _canBeDugCallback(x, y) {\n if (x < 1 || y < 1 || x + 1 >= this._width || y + 1 >= this._height) {\n return false;\n }\n return (this._map[x][y] == 1);\n }\n}\n","import Map from \"./map.js\";\nimport { DIRS } from \"../constants.js\";\nimport RNG from \"../rng.js\";\n;\n/**\n * @class Cellular automaton map generator\n * @augments ROT.Map\n * @param {int} [width=ROT.DEFAULT_WIDTH]\n * @param {int} [height=ROT.DEFAULT_HEIGHT]\n * @param {object} [options] Options\n * @param {int[]} [options.born] List of neighbor counts for a new cell to be born in empty space\n * @param {int[]} [options.survive] List of neighbor counts for an existing cell to survive\n * @param {int} [options.topology] Topology 4 or 6 or 8\n */\nexport default class Cellular extends Map {\n constructor(width, height, options = {}) {\n super(width, height);\n this._options = {\n born: [5, 6, 7, 8],\n survive: [4, 5, 6, 7, 8],\n topology: 8\n };\n this.setOptions(options);\n this._dirs = DIRS[this._options.topology];\n this._map = this._fillMap(0);\n }\n /**\n * Fill the map with random values\n * @param {float} probability Probability for a cell to become alive; 0 = all empty, 1 = all full\n */\n randomize(probability) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n this._map[i][j] = (RNG.getUniform() < probability ? 1 : 0);\n }\n }\n return this;\n }\n /**\n * Change options.\n * @see ROT.Map.Cellular\n */\n setOptions(options) { Object.assign(this._options, options); }\n set(x, y, value) { this._map[x][y] = value; }\n create(callback) {\n let newMap = this._fillMap(0);\n let born = this._options.born;\n let survive = this._options.survive;\n for (let j = 0; j < this._height; j++) {\n let widthStep = 1;\n let widthStart = 0;\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStart = j % 2;\n }\n for (let i = widthStart; i < this._width; i += widthStep) {\n let cur = this._map[i][j];\n let ncount = this._getNeighbors(i, j);\n if (cur && survive.indexOf(ncount) != -1) { /* survive */\n newMap[i][j] = 1;\n }\n else if (!cur && born.indexOf(ncount) != -1) { /* born */\n newMap[i][j] = 1;\n }\n }\n }\n this._map = newMap;\n callback && this._serviceCallback(callback);\n }\n _serviceCallback(callback) {\n for (let j = 0; j < this._height; j++) {\n let widthStep = 1;\n let widthStart = 0;\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStart = j % 2;\n }\n for (let i = widthStart; i < this._width; i += widthStep) {\n callback(i, j, this._map[i][j]);\n }\n }\n }\n /**\n * Get neighbor count at [i,j] in this._map\n */\n _getNeighbors(cx, cy) {\n let result = 0;\n for (let i = 0; i < this._dirs.length; i++) {\n let dir = this._dirs[i];\n let x = cx + dir[0];\n let y = cy + dir[1];\n if (x < 0 || x >= this._width || y < 0 || y >= this._height) {\n continue;\n }\n result += (this._map[x][y] == 1 ? 1 : 0);\n }\n return result;\n }\n /**\n * Make sure every non-wall space is accessible.\n * @param {function} callback to call to display map when do\n * @param {int} value to consider empty space - defaults to 0\n * @param {function} callback to call when a new connection is made\n */\n connect(callback, value, connectionCallback) {\n if (!value)\n value = 0;\n let allFreeSpace = [];\n let notConnected = {};\n // find all free space\n let widthStep = 1;\n let widthStarts = [0, 0];\n if (this._options.topology == 6) {\n widthStep = 2;\n widthStarts = [0, 1];\n }\n for (let y = 0; y < this._height; y++) {\n for (let x = widthStarts[y % 2]; x < this._width; x += widthStep) {\n if (this._freeSpace(x, y, value)) {\n let p = [x, y];\n notConnected[this._pointKey(p)] = p;\n allFreeSpace.push([x, y]);\n }\n }\n }\n let start = allFreeSpace[RNG.getUniformInt(0, allFreeSpace.length - 1)];\n let key = this._pointKey(start);\n let connected = {};\n connected[key] = start;\n delete notConnected[key];\n // find what's connected to the starting point\n this._findConnected(connected, notConnected, [start], false, value);\n while (Object.keys(notConnected).length > 0) {\n // find two points from notConnected to connected\n let p = this._getFromTo(connected, notConnected);\n let from = p[0]; // notConnected\n let to = p[1]; // connected\n // find everything connected to the starting point\n let local = {};\n local[this._pointKey(from)] = from;\n this._findConnected(local, notConnected, [from], true, value);\n // connect to a connected cell\n let tunnelFn = (this._options.topology == 6 ? this._tunnelToConnected6 : this._tunnelToConnected);\n tunnelFn.call(this, to, from, connected, notConnected, value, connectionCallback);\n // now all of local is connected\n for (let k in local) {\n let pp = local[k];\n this._map[pp[0]][pp[1]] = value;\n connected[k] = pp;\n delete notConnected[k];\n }\n }\n callback && this._serviceCallback(callback);\n }\n /**\n * Find random points to connect. Search for the closest point in the larger space.\n * This is to minimize the length of the passage while maintaining good performance.\n */\n _getFromTo(connected, notConnected) {\n let from = [0, 0], to = [0, 0], d;\n let connectedKeys = Object.keys(connected);\n let notConnectedKeys = Object.keys(notConnected);\n for (let i = 0; i < 5; i++) {\n if (connectedKeys.length < notConnectedKeys.length) {\n let keys = connectedKeys;\n to = connected[keys[RNG.getUniformInt(0, keys.length - 1)]];\n from = this._getClosest(to, notConnected);\n }\n else {\n let keys = notConnectedKeys;\n from = notConnected[keys[RNG.getUniformInt(0, keys.length - 1)]];\n to = this._getClosest(from, connected);\n }\n d = (from[0] - to[0]) * (from[0] - to[0]) + (from[1] - to[1]) * (from[1] - to[1]);\n if (d < 64) {\n break;\n }\n }\n // console.log(\">>> connected=\" + to + \" notConnected=\" + from + \" dist=\" + d);\n return [from, to];\n }\n _getClosest(point, space) {\n let minPoint = null;\n let minDist = null;\n for (let k in space) {\n let p = space[k];\n let d = (p[0] - point[0]) * (p[0] - point[0]) + (p[1] - point[1]) * (p[1] - point[1]);\n if (minDist == null || d < minDist) {\n minDist = d;\n minPoint = p;\n }\n }\n return minPoint;\n }\n _findConnected(connected, notConnected, stack, keepNotConnected, value) {\n while (stack.length > 0) {\n let p = stack.splice(0, 1)[0];\n let tests;\n if (this._options.topology == 6) {\n tests = [\n [p[0] + 2, p[1]],\n [p[0] + 1, p[1] - 1],\n [p[0] - 1, p[1] - 1],\n [p[0] - 2, p[1]],\n [p[0] - 1, p[1] + 1],\n [p[0] + 1, p[1] + 1],\n ];\n }\n else {\n tests = [\n [p[0] + 1, p[1]],\n [p[0] - 1, p[1]],\n [p[0], p[1] + 1],\n [p[0], p[1] - 1]\n ];\n }\n for (let i = 0; i < tests.length; i++) {\n let key = this._pointKey(tests[i]);\n if (connected[key] == null && this._freeSpace(tests[i][0], tests[i][1], value)) {\n connected[key] = tests[i];\n if (!keepNotConnected) {\n delete notConnected[key];\n }\n stack.push(tests[i]);\n }\n }\n }\n }\n _tunnelToConnected(to, from, connected, notConnected, value, connectionCallback) {\n let a, b;\n if (from[0] < to[0]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n for (let xx = a[0]; xx <= b[0]; xx++) {\n this._map[xx][a[1]] = value;\n let p = [xx, a[1]];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback && a[0] < b[0]) {\n connectionCallback(a, [b[0], a[1]]);\n }\n // x is now fixed\n let x = b[0];\n if (from[1] < to[1]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n for (let yy = a[1]; yy < b[1]; yy++) {\n this._map[x][yy] = value;\n let p = [x, yy];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback && a[1] < b[1]) {\n connectionCallback([b[0], a[1]], [b[0], b[1]]);\n }\n }\n _tunnelToConnected6(to, from, connected, notConnected, value, connectionCallback) {\n let a, b;\n if (from[0] < to[0]) {\n a = from;\n b = to;\n }\n else {\n a = to;\n b = from;\n }\n // tunnel diagonally until horizontally level\n let xx = a[0];\n let yy = a[1];\n while (!(xx == b[0] && yy == b[1])) {\n let stepWidth = 2;\n if (yy < b[1]) {\n yy++;\n stepWidth = 1;\n }\n else if (yy > b[1]) {\n yy--;\n stepWidth = 1;\n }\n if (xx < b[0]) {\n xx += stepWidth;\n }\n else if (xx > b[0]) {\n xx -= stepWidth;\n }\n else if (b[1] % 2) {\n // Won't step outside map if destination on is map's right edge\n xx -= stepWidth;\n }\n else {\n // ditto for left edge\n xx += stepWidth;\n }\n this._map[xx][yy] = value;\n let p = [xx, yy];\n let pkey = this._pointKey(p);\n connected[pkey] = p;\n delete notConnected[pkey];\n }\n if (connectionCallback) {\n connectionCallback(from, to);\n }\n }\n _freeSpace(x, y, value) {\n return x >= 0 && x < this._width && y >= 0 && y < this._height && this._map[x][y] == value;\n }\n _pointKey(p) { return p[0] + \".\" + p[1]; }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * @class Recursively divided maze, http://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_division_method\n * @augments ROT.Map\n */\nexport default class DividedMaze extends Map {\n constructor() {\n super(...arguments);\n this._stack = [];\n this._map = [];\n }\n create(callback) {\n let w = this._width;\n let h = this._height;\n this._map = [];\n for (let i = 0; i < w; i++) {\n this._map.push([]);\n for (let j = 0; j < h; j++) {\n let border = (i == 0 || j == 0 || i + 1 == w || j + 1 == h);\n this._map[i].push(border ? 1 : 0);\n }\n }\n this._stack = [\n [1, 1, w - 2, h - 2]\n ];\n this._process();\n for (let i = 0; i < w; i++) {\n for (let j = 0; j < h; j++) {\n callback(i, j, this._map[i][j]);\n }\n }\n this._map = [];\n return this;\n }\n _process() {\n while (this._stack.length) {\n let room = this._stack.shift(); /* [left, top, right, bottom] */\n this._partitionRoom(room);\n }\n }\n _partitionRoom(room) {\n let availX = [];\n let availY = [];\n for (let i = room[0] + 1; i < room[2]; i++) {\n let top = this._map[i][room[1] - 1];\n let bottom = this._map[i][room[3] + 1];\n if (top && bottom && !(i % 2)) {\n availX.push(i);\n }\n }\n for (let j = room[1] + 1; j < room[3]; j++) {\n let left = this._map[room[0] - 1][j];\n let right = this._map[room[2] + 1][j];\n if (left && right && !(j % 2)) {\n availY.push(j);\n }\n }\n if (!availX.length || !availY.length) {\n return;\n }\n let x = RNG.getItem(availX);\n let y = RNG.getItem(availY);\n this._map[x][y] = 1;\n let walls = [];\n let w = [];\n walls.push(w); /* left part */\n for (let i = room[0]; i < x; i++) {\n this._map[i][y] = 1;\n if (i % 2)\n w.push([i, y]);\n }\n w = [];\n walls.push(w); /* right part */\n for (let i = x + 1; i <= room[2]; i++) {\n this._map[i][y] = 1;\n if (i % 2)\n w.push([i, y]);\n }\n w = [];\n walls.push(w); /* top part */\n for (let j = room[1]; j < y; j++) {\n this._map[x][j] = 1;\n if (j % 2)\n w.push([x, j]);\n }\n w = [];\n walls.push(w); /* bottom part */\n for (let j = y + 1; j <= room[3]; j++) {\n this._map[x][j] = 1;\n if (j % 2)\n w.push([x, j]);\n }\n let solid = RNG.getItem(walls);\n for (let i = 0; i < walls.length; i++) {\n let w = walls[i];\n if (w == solid) {\n continue;\n }\n let hole = RNG.getItem(w);\n this._map[hole[0]][hole[1]] = 0;\n }\n this._stack.push([room[0], room[1], x - 1, y - 1]); /* left top */\n this._stack.push([x + 1, room[1], room[2], y - 1]); /* right top */\n this._stack.push([room[0], y + 1, x - 1, room[3]]); /* left bottom */\n this._stack.push([x + 1, y + 1, room[2], room[3]]); /* right bottom */\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\n/**\n * Icey's Maze generator\n * See http://www.roguebasin.roguelikedevelopment.org/index.php?title=Simple_maze for explanation\n */\nexport default class IceyMaze extends Map {\n constructor(width, height, regularity = 0) {\n super(width, height);\n this._regularity = regularity;\n this._map = [];\n }\n create(callback) {\n let width = this._width;\n let height = this._height;\n let map = this._fillMap(1);\n width -= (width % 2 ? 1 : 2);\n height -= (height % 2 ? 1 : 2);\n let cx = 0;\n let cy = 0;\n let nx = 0;\n let ny = 0;\n let done = 0;\n let blocked = false;\n let dirs = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ];\n do {\n cx = 1 + 2 * Math.floor(RNG.getUniform() * (width - 1) / 2);\n cy = 1 + 2 * Math.floor(RNG.getUniform() * (height - 1) / 2);\n if (!done) {\n map[cx][cy] = 0;\n }\n if (!map[cx][cy]) {\n this._randomize(dirs);\n do {\n if (Math.floor(RNG.getUniform() * (this._regularity + 1)) == 0) {\n this._randomize(dirs);\n }\n blocked = true;\n for (let i = 0; i < 4; i++) {\n nx = cx + dirs[i][0] * 2;\n ny = cy + dirs[i][1] * 2;\n if (this._isFree(map, nx, ny, width, height)) {\n map[nx][ny] = 0;\n map[cx + dirs[i][0]][cy + dirs[i][1]] = 0;\n cx = nx;\n cy = ny;\n blocked = false;\n done++;\n break;\n }\n }\n } while (!blocked);\n }\n } while (done + 1 < width * height / 4);\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, map[i][j]);\n }\n }\n this._map = [];\n return this;\n }\n _randomize(dirs) {\n for (let i = 0; i < 4; i++) {\n dirs[i][0] = 0;\n dirs[i][1] = 0;\n }\n switch (Math.floor(RNG.getUniform() * 4)) {\n case 0:\n dirs[0][0] = -1;\n dirs[1][0] = 1;\n dirs[2][1] = -1;\n dirs[3][1] = 1;\n break;\n case 1:\n dirs[3][0] = -1;\n dirs[2][0] = 1;\n dirs[1][1] = -1;\n dirs[0][1] = 1;\n break;\n case 2:\n dirs[2][0] = -1;\n dirs[3][0] = 1;\n dirs[0][1] = -1;\n dirs[1][1] = 1;\n break;\n case 3:\n dirs[1][0] = -1;\n dirs[0][0] = 1;\n dirs[3][1] = -1;\n dirs[2][1] = 1;\n break;\n }\n }\n _isFree(map, x, y, width, height) {\n if (x < 1 || y < 1 || x >= width || y >= height) {\n return false;\n }\n return map[x][y];\n }\n}\n","import Map from \"./map.js\";\nimport RNG from \"../rng.js\";\nimport { DIRS } from \"../constants.js\";\n/**\n * Dungeon generator which uses the \"orginal\" Rogue dungeon generation algorithm. See http://kuoi.com/~kamikaze/GameDesign/art07_rogue_dungeon.php\n * @author hyakugei\n */\nexport default class Rogue extends Map {\n constructor(width, height, options) {\n super(width, height);\n this.map = [];\n this.rooms = [];\n this.connectedCells = [];\n options = Object.assign({\n cellWidth: 3,\n cellHeight: 3 // ie. as an array with min-max values for each direction....\n }, options);\n /*\n Set the room sizes according to the over-all width of the map,\n and the cell sizes.\n */\n if (!options.hasOwnProperty(\"roomWidth\")) {\n options[\"roomWidth\"] = this._calculateRoomSize(this._width, options[\"cellWidth\"]);\n }\n if (!options.hasOwnProperty(\"roomHeight\")) {\n options[\"roomHeight\"] = this._calculateRoomSize(this._height, options[\"cellHeight\"]);\n }\n this._options = options;\n }\n create(callback) {\n this.map = this._fillMap(1);\n this.rooms = [];\n this.connectedCells = [];\n this._initRooms();\n this._connectRooms();\n this._connectUnconnectedRooms();\n this._createRandomRoomConnections();\n this._createRooms();\n this._createCorridors();\n if (callback) {\n for (let i = 0; i < this._width; i++) {\n for (let j = 0; j < this._height; j++) {\n callback(i, j, this.map[i][j]);\n }\n }\n }\n return this;\n }\n _calculateRoomSize(size, cell) {\n let max = Math.floor((size / cell) * 0.8);\n let min = Math.floor((size / cell) * 0.25);\n if (min < 2) {\n min = 2;\n }\n if (max < 2) {\n max = 2;\n }\n return [min, max];\n }\n _initRooms() {\n // create rooms array. This is the \"grid\" list from the algo.\n for (let i = 0; i < this._options.cellWidth; i++) {\n this.rooms.push([]);\n for (let j = 0; j < this._options.cellHeight; j++) {\n this.rooms[i].push({ \"x\": 0, \"y\": 0, \"width\": 0, \"height\": 0, \"connections\": [], \"cellx\": i, \"celly\": j });\n }\n }\n }\n _connectRooms() {\n //pick random starting grid\n let cgx = RNG.getUniformInt(0, this._options.cellWidth - 1);\n let cgy = RNG.getUniformInt(0, this._options.cellHeight - 1);\n let idx;\n let ncgx;\n let ncgy;\n let found = false;\n let room;\n let otherRoom;\n let dirToCheck;\n // find unconnected neighbour cells\n do {\n //dirToCheck = [0, 1, 2, 3, 4, 5, 6, 7];\n dirToCheck = [0, 2, 4, 6];\n dirToCheck = RNG.shuffle(dirToCheck);\n do {\n found = false;\n idx = dirToCheck.pop();\n ncgx = cgx + DIRS[8][idx][0];\n ncgy = cgy + DIRS[8][idx][1];\n if (ncgx < 0 || ncgx >= this._options.cellWidth) {\n continue;\n }\n if (ncgy < 0 || ncgy >= this._options.cellHeight) {\n continue;\n }\n room = this.rooms[cgx][cgy];\n if (room[\"connections\"].length > 0) {\n // as long as this room doesn't already coonect to me, we are ok with it.\n if (room[\"connections\"][0][0] == ncgx && room[\"connections\"][0][1] == ncgy) {\n break;\n }\n }\n otherRoom = this.rooms[ncgx][ncgy];\n if (otherRoom[\"connections\"].length == 0) {\n otherRoom[\"connections\"].push([cgx, cgy]);\n this.connectedCells.push([ncgx, ncgy]);\n cgx = ncgx;\n cgy = ncgy;\n found = true;\n }\n } while (dirToCheck.length > 0 && found == false);\n } while (dirToCheck.length > 0);\n }\n _connectUnconnectedRooms() {\n //While there are unconnected rooms, try to connect them to a random connected neighbor\n //(if a room has no connected neighbors yet, just keep cycling, you'll fill out to it eventually).\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n this.connectedCells = RNG.shuffle(this.connectedCells);\n let room;\n let otherRoom;\n let validRoom;\n for (let i = 0; i < this._options.cellWidth; i++) {\n for (let j = 0; j < this._options.cellHeight; j++) {\n room = this.rooms[i][j];\n if (room[\"connections\"].length == 0) {\n let directions = [0, 2, 4, 6];\n directions = RNG.shuffle(directions);\n validRoom = false;\n do {\n let dirIdx = directions.pop();\n let newI = i + DIRS[8][dirIdx][0];\n let newJ = j + DIRS[8][dirIdx][1];\n if (newI < 0 || newI >= cw || newJ < 0 || newJ >= ch) {\n continue;\n }\n otherRoom = this.rooms[newI][newJ];\n validRoom = true;\n if (otherRoom[\"connections\"].length == 0) {\n break;\n }\n for (let k = 0; k < otherRoom[\"connections\"].length; k++) {\n if (otherRoom[\"connections\"][k][0] == i && otherRoom[\"connections\"][k][1] == j) {\n validRoom = false;\n break;\n }\n }\n if (validRoom) {\n break;\n }\n } while (directions.length);\n if (validRoom) {\n room[\"connections\"].push([otherRoom[\"cellx\"], otherRoom[\"celly\"]]);\n }\n else {\n console.log(\"-- Unable to connect room.\");\n }\n }\n }\n }\n }\n _createRandomRoomConnections() {\n // Empty for now.\n }\n _createRooms() {\n let w = this._width;\n let h = this._height;\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n let cwp = Math.floor(this._width / cw);\n let chp = Math.floor(this._height / ch);\n let roomw;\n let roomh;\n let roomWidth = this._options[\"roomWidth\"];\n let roomHeight = this._options[\"roomHeight\"];\n let sx;\n let sy;\n let otherRoom;\n for (let i = 0; i < cw; i++) {\n for (let j = 0; j < ch; j++) {\n sx = cwp * i;\n sy = chp * j;\n if (sx == 0) {\n sx = 1;\n }\n if (sy == 0) {\n sy = 1;\n }\n roomw = RNG.getUniformInt(roomWidth[0], roomWidth[1]);\n roomh = RNG.getUniformInt(roomHeight[0], roomHeight[1]);\n if (j > 0) {\n otherRoom = this.rooms[i][j - 1];\n while (sy - (otherRoom[\"y\"] + otherRoom[\"height\"]) < 3) {\n sy++;\n }\n }\n if (i > 0) {\n otherRoom = this.rooms[i - 1][j];\n while (sx - (otherRoom[\"x\"] + otherRoom[\"width\"]) < 3) {\n sx++;\n }\n }\n let sxOffset = Math.round(RNG.getUniformInt(0, cwp - roomw) / 2);\n let syOffset = Math.round(RNG.getUniformInt(0, chp - roomh) / 2);\n while (sx + sxOffset + roomw >= w) {\n if (sxOffset) {\n sxOffset--;\n }\n else {\n roomw--;\n }\n }\n while (sy + syOffset + roomh >= h) {\n if (syOffset) {\n syOffset--;\n }\n else {\n roomh--;\n }\n }\n sx = sx + sxOffset;\n sy = sy + syOffset;\n this.rooms[i][j][\"x\"] = sx;\n this.rooms[i][j][\"y\"] = sy;\n this.rooms[i][j][\"width\"] = roomw;\n this.rooms[i][j][\"height\"] = roomh;\n for (let ii = sx; ii < sx + roomw; ii++) {\n for (let jj = sy; jj < sy + roomh; jj++) {\n this.map[ii][jj] = 0;\n }\n }\n }\n }\n }\n _getWallPosition(aRoom, aDirection) {\n let rx;\n let ry;\n let door;\n if (aDirection == 1 || aDirection == 3) {\n rx = RNG.getUniformInt(aRoom[\"x\"] + 1, aRoom[\"x\"] + aRoom[\"width\"] - 2);\n if (aDirection == 1) {\n ry = aRoom[\"y\"] - 2;\n door = ry + 1;\n }\n else {\n ry = aRoom[\"y\"] + aRoom[\"height\"] + 1;\n door = ry - 1;\n }\n this.map[rx][door] = 0; // i'm not setting a specific 'door' tile value right now, just empty space.\n }\n else {\n ry = RNG.getUniformInt(aRoom[\"y\"] + 1, aRoom[\"y\"] + aRoom[\"height\"] - 2);\n if (aDirection == 2) {\n rx = aRoom[\"x\"] + aRoom[\"width\"] + 1;\n door = rx - 1;\n }\n else {\n rx = aRoom[\"x\"] - 2;\n door = rx + 1;\n }\n this.map[door][ry] = 0; // i'm not setting a specific 'door' tile value right now, just empty space.\n }\n return [rx, ry];\n }\n _drawCorridor(startPosition, endPosition) {\n let xOffset = endPosition[0] - startPosition[0];\n let yOffset = endPosition[1] - startPosition[1];\n let xpos = startPosition[0];\n let ypos = startPosition[1];\n let tempDist;\n let xDir;\n let yDir;\n let move; // 2 element array, element 0 is the direction, element 1 is the total value to move.\n let moves = []; // a list of 2 element arrays\n let xAbs = Math.abs(xOffset);\n let yAbs = Math.abs(yOffset);\n let percent = RNG.getUniform(); // used to split the move at different places along the long axis\n let firstHalf = percent;\n let secondHalf = 1 - percent;\n xDir = xOffset > 0 ? 2 : 6;\n yDir = yOffset > 0 ? 4 : 0;\n if (xAbs < yAbs) {\n // move firstHalf of the y offset\n tempDist = Math.ceil(yAbs * firstHalf);\n moves.push([yDir, tempDist]);\n // move all the x offset\n moves.push([xDir, xAbs]);\n // move sendHalf of the y offset\n tempDist = Math.floor(yAbs * secondHalf);\n moves.push([yDir, tempDist]);\n }\n else {\n // move firstHalf of the x offset\n tempDist = Math.ceil(xAbs * firstHalf);\n moves.push([xDir, tempDist]);\n // move all the y offset\n moves.push([yDir, yAbs]);\n // move secondHalf of the x offset.\n tempDist = Math.floor(xAbs * secondHalf);\n moves.push([xDir, tempDist]);\n }\n this.map[xpos][ypos] = 0;\n while (moves.length > 0) {\n move = moves.pop();\n while (move[1] > 0) {\n xpos += DIRS[8][move[0]][0];\n ypos += DIRS[8][move[0]][1];\n this.map[xpos][ypos] = 0;\n move[1] = move[1] - 1;\n }\n }\n }\n _createCorridors() {\n // Draw Corridors between connected rooms\n let cw = this._options.cellWidth;\n let ch = this._options.cellHeight;\n let room;\n let connection;\n let otherRoom;\n let wall;\n let otherWall;\n for (let i = 0; i < cw; i++) {\n for (let j = 0; j < ch; j++) {\n room = this.rooms[i][j];\n for (let k = 0; k < room[\"connections\"].length; k++) {\n connection = room[\"connections\"][k];\n otherRoom = this.rooms[connection[0]][connection[1]];\n // figure out what wall our corridor will start one.\n // figure out what wall our corridor will end on.\n if (otherRoom[\"cellx\"] > room[\"cellx\"]) {\n wall = 2;\n otherWall = 4;\n }\n else if (otherRoom[\"cellx\"] < room[\"cellx\"]) {\n wall = 4;\n otherWall = 2;\n }\n else if (otherRoom[\"celly\"] > room[\"celly\"]) {\n wall = 3;\n otherWall = 1;\n }\n else {\n wall = 1;\n otherWall = 3;\n }\n this._drawCorridor(this._getWallPosition(room, wall), this._getWallPosition(otherRoom, otherWall));\n }\n }\n }\n }\n}\n","import TwoDDungeon from \"2d-dungeon\";\nimport * as dungeoneer from \"dungeoneer\";\nimport * as geo from \"./geo-utils.js\";\nimport * as ROT from \"rot-js\";\n\nexport const regenerate = async (dungeon, config = {}) => {\n try {\n switch (config.algorithm) {\n case \"2d-dungeon\":\n await generate2DDungeon(dungeon, config);\n break;\n case \"rot-js-cellular\":\n await generateRotJsCellular(dungeon, config);\n break;\n case \"dungeoneer\":\n await generateDungeoneer(dungeon, config);\n break;\n }\n } catch (err) {\n console.error(err);\n ui.notifications.error(\"Error generating dungeon... please try again.\");\n }\n};\n\nconst xOffset = () => {\n return (\n Math.ceil(\n (canvas.scene.width * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size\n );\n};\n\nconst yOffset = () => {\n return (\n Math.ceil(\n (canvas.scene.height * canvas.scene.padding) / canvas.scene.grid.size\n ) * canvas.scene.grid.size\n );\n};\n\n/**\n * rot.js Cellular Automata - http://ondras.github.io/rot.js/manual/#map/cellular\n */\nexport const generateRotJsCellular = async (dungeon, config) => {\n const scalingFactor = 1.0;\n const height = config.height * scalingFactor;\n const width = config.width * scalingFactor;\n const map = new ROT.Map.Cellular(width, height);\n map.randomize(0.5); // cells with 1/2 probability\n for (let i = 0; i < 4; i++) {\n map.create();\n }\n if (config.connectCaves) {\n map.connect(null, 1);\n }\n\n const gridSize = canvas.scene.grid.size / scalingFactor;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n if (map._map[y][x]) {\n const oneSquare = {\n x: xOff + x * gridSize,\n y: yOff + y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n if (config.smoothing) {\n for (let i = 0; i < config.smoothing; i++) {\n geometry = geo.smooth(geometry);\n }\n }\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n await dungeon.pushState(newState);\n};\n\n/**\n * 2D Dungeon - https://github.com/Prozi/dungeon-generator\n */\nexport const generate2DDungeon = async (dungeon, config) => {\n const height = config.height;\n const width = config.width;\n const map = new TwoDDungeon({\n max_iterations: 50,\n size: [width, height],\n rooms: {\n any: {\n min_size: [config.minRoomSize, config.minRoomSize],\n max_size: [config.maxRoomSize, config.maxRoomSize],\n max_exits: 4,\n },\n },\n min_corridor_length: 2,\n max_corridor_length: 8,\n corridor_density: 0.5, // corridors per room\n symmetric_rooms: config.centerExits, // exits must be in the center of a wall if true\n interconnects: config.circularPaths ? 1 : 0, //extra corridors to connect rooms and make circular paths. not 100% guaranteed\n max_interconnect_length: 10,\n room_count: config.roomCount,\n });\n map.generate();\n\n const gridSize = canvas.scene.grid.size;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n // TODO: is this flipped / rotated, and we're iterating wrong?\n const isWall = map.walls.get([x, y]);\n if (isWall === false) {\n const oneSquare = {\n x: xOff + x * gridSize,\n y: yOff + y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n\n const doors = [];\n for (const piece of map.children) {\n if (piece.room_size[0] === 1 || piece.room_size[1] === 1) {\n // skip doors in corridors\n continue;\n }\n for (const exit of piece.exits) {\n const [[doorX, doorY], direction] = exit;\n const x = piece.position[0] + doorX;\n const y = piece.position[1] + doorY;\n if (direction === 90) {\n // vertical, east side\n doors.push([\n xOff + (x + 1) * gridSize,\n yOff + y * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n } else if (direction === 270) {\n // vertical, west side\n doors.push([\n xOff + x * gridSize,\n yOff + y * gridSize,\n xOff + x * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n } else if (direction === 0) {\n // horizontal, north side\n doors.push([\n xOff + x * gridSize,\n yOff + y * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + y * gridSize,\n ]);\n } else if (direction === 180) {\n // horizontal, south side\n doors.push([\n xOff + x * gridSize,\n yOff + (y + 1) * gridSize,\n xOff + (x + 1) * gridSize,\n yOff + (y + 1) * gridSize,\n ]);\n }\n }\n }\n\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n newState.doors = config.generate2DDungeonDoors ? doors : [];\n await dungeon.pushState(newState);\n};\n\n/**\n * Dungeoneer - https://github.com/LucianBuzzo/dungeoneer\n */\nexport const generateDungeoneer = async (dungeon, config) => {\n const map = dungeoneer.build({\n width: config.width,\n height: config.height,\n });\n const gridSize = canvas.scene.grid.size;\n const xOff = xOffset();\n const yOff = yOffset();\n let geometry;\n const doors = [];\n for (const row of map.tiles) {\n for (const cell of row) {\n if (cell.type === \"floor\" || cell.type === \"door\") {\n const oneSquare = {\n x: xOff + cell.x * gridSize,\n y: yOff + cell.y * gridSize,\n height: gridSize,\n width: gridSize,\n };\n const poly = geo.rectToPolygon(oneSquare);\n if (!geometry) {\n geometry = poly;\n } else {\n geometry = geo.union(geometry, poly);\n }\n }\n if (cell.type === \"door\") {\n if (cell.neighbours.w?.type === \"floor\") {\n // east-west passage, thus vertical door\n doors.push([\n xOff + (cell.x + 0.5) * gridSize,\n yOff + cell.y * gridSize,\n xOff + (cell.x + 0.5) * gridSize,\n yOff + (cell.y + 1) * gridSize,\n ]);\n } else {\n // horizontal door\n doors.push([\n xOff + cell.x * gridSize,\n yOff + (cell.y + 0.5) * gridSize,\n xOff + (cell.x + 1) * gridSize,\n yOff + (cell.y + 0.5) * gridSize,\n ]);\n }\n }\n }\n }\n geometry = geo.simplify(geometry);\n const newState = dungeon.state().clone();\n newState.geometry = geometry;\n newState.doors = config.generateDungeoneerDoors ? doors : [];\n await dungeon.pushState(newState);\n};\n","import * as constants from \"./constants.js\";\nimport { Dungeon } from \"./dungeon.js\";\nimport { regenerate } from \"./generator.js\";\nimport { Settings } from \"./settings.js\";\n\nconst FOLDER_NAME = \"Dungeon Draw\";\n\n/** Handle both v8 and v9 styles of detecting shift */\nconst shiftPressed = () => {\n if (KeyboardManager.MODIFIER_KEYS?.SHIFT) {\n return game.keyboard.isModifierActive(KeyboardManager.MODIFIER_KEYS.SHIFT);\n }\n return game.keyboard.isDown(\"SHIFT\");\n};\n\nconst findDungeonEntryAndNote = () => {\n for (const note of canvas.scene.notes) {\n const journalEntry = game.journal.get(note.entryId);\n if (journalEntry) {\n const flag = journalEntry.getFlag(\n constants.MODULE_NAME,\n \"dungeonVersion\"\n );\n if (flag) {\n return { journalEntry, note };\n }\n }\n }\n return { journalEntry: null, note: null };\n};\n\nconst createDungeonEntryAndNote = async () => {\n const journalEntry = await createDungeonEntry();\n const note = await createDungeonNote(journalEntry);\n return { journalEntry, note };\n};\n\nconst createDungeonEntry = async () => {\n let folder = game.folders\n .filter((f) => f.type === \"JournalEntry\" && f.name === FOLDER_NAME)\n .pop();\n if (!folder) {\n folder = await Folder.create({\n name: FOLDER_NAME,\n type: \"JournalEntry\",\n });\n }\n\n const journalEntry = await JournalEntry.create({\n name: canvas.scene.name,\n folder: folder.id,\n flags: {\n \"dungeon-draw\": {\n // extract string constant somewhere\n dungeonVersion: \"1.0\",\n },\n },\n });\n return journalEntry;\n};\n\nconst createDungeonNote = async (journalEntry) => {\n await canvas.scene.createEmbeddedDocuments(\"Note\", [\n {\n entryId: journalEntry.id,\n fontSize: 20,\n icon: \"icons/svg/cave.svg\",\n iconSize: 32,\n textAnchor: 1,\n textColor: \"#FFFFFF\",\n x: 50,\n y: 50,\n iconTint: \"\",\n text: \"Dungeon Draw\",\n flags: {},\n },\n ]);\n};\n\nconst onFreeHandMouseDraw = (preview, event) => {\n const { destination } = event.data;\n const position = destination;\n const now = Date.now();\n const temporary =\n now - preview._drawTime < preview.constructor.FREEHAND_SAMPLE_RATE;\n const snap = false;\n preview._addPoint(position, { snap, temporary });\n preview.refresh();\n};\n\nconst createDataOffsetPoints = (createData) => {\n const offsetPoints = [];\n for (let i = 0; i <= createData.shape.points.length - 2; i += 2) {\n offsetPoints.push([\n createData.shape.points[i] + createData.x,\n createData.shape.points[i + 1] + createData.y,\n ]);\n }\n return offsetPoints;\n};\n\n/**\n *\n * @extends {PlaceablesLayer}\n */\nexport class DungeonLayer extends PlaceablesLayer {\n static LAYER_NAME = \"dungeon\";\n\n constructor() {\n super();\n this.dungeon = null;\n }\n\n /** @inheritdoc */\n static get layerOptions() {\n return foundry.utils.mergeObject(super.layerOptions, {\n name: DungeonLayer.LAYER_NAME,\n canDragCreate: true,\n // we use our own snapToGrid setting to control snap\n snapToGrid: Settings.snapToGrid(),\n zIndex: -1, // under tiles and background image\n quadtree: true,\n });\n }\n\n /**\n * Use an adaptive precision depending on the size of the grid\n * @type {number}\n */\n // get gridPrecision() {\n // if ( canvas.scene.data.gridType === CONST.GRID_TYPES.GRIDLESS ) return 0;\n // return canvas.dimensions.size >= 128 ? 16 : 8;\n // }\n\n // TODO: figure out what documentName / embeddedName / type we should be using\n /** @inheritdoc */\n static documentName = \"Drawing\";\n\n /**\n * Get initial data for a new drawing.\n * Start with some global defaults, apply user default config, then apply mandatory overrides per tool.\n * @param {Object} origin The initial coordinate\n * @return {Object} The new drawing data\n */\n _getNewDrawingData(origin) {\n const data = {\n fillColor: game.user.color,\n strokeColor: game.user.color,\n strokeWidth: 8,\n };\n // Mandatory additions\n data.x = origin.x;\n data.y = origin.y;\n data.author = game.user.id;\n data.shape = {};\n\n if (game.activeDungeonDrawMode === \"add\") {\n switch (game.activeDungeonDrawTool) {\n case \"rectangle\":\n data.shape.type = CONST.DRAWING_TYPES.RECTANGLE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n case \"polygon\":\n case \"interiorwall\":\n case \"door\":\n case \"secretdoor\":\n case \"invisiblewall\":\n case \"themepainter\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = 0;\n break;\n case \"freehand\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = data.bezierFactor ?? 0.5;\n break;\n case \"ellipse\":\n data.type = CONST.DRAWING_TYPES.ELLIPSE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n }\n } else if (game.activeDungeonDrawMode === \"remove\") {\n switch (game.activeDungeonDrawTool) {\n case \"rectangle\":\n case \"interiorwall\":\n case \"door\":\n case \"secretdoor\":\n case \"invisiblewall\":\n case \"themepainter\":\n data.type = CONST.DRAWING_TYPES.RECTANGLE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n case \"polygon\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = 0;\n break;\n case \"freehand\":\n data.type = CONST.DRAWING_TYPES.POLYGON;\n data.points = [0, 0];\n data.bezierFactor = data.bezierFactor ?? 0.5;\n break;\n case \"ellipse\":\n data.type = CONST.DRAWING_TYPES.ELLIPSE;\n data.shape.width = 1;\n data.shape.height = 1;\n break;\n }\n }\n return data;\n }\n\n /** @override */\n async undoHistory() {\n return super.undoHistory();\n }\n\n /** @override */\n async deleteAll() {\n if (!game.user.isGM) {\n throw new Error(`You do not have permission to clear all.`);\n }\n return Dialog.confirm({\n title: game.i18n.localize(\"DD.ButtonTitleClearAll\"),\n content: `

${game.i18n.localize(\"DD.ClearAllDialogContent\")}

`,\n yes: () => this.dungeon?.deleteAll(),\n });\n }\n\n async generate(config) {\n if (this.dungeon) {\n await this.dungeon.deleteAll();\n } else {\n await this.createNewDungeon();\n }\n await regenerate(this.dungeon, config);\n }\n\n /* -------------------------------------------- */\n\n async loadDungeon() {\n const { journalEntry, note } = await findDungeonEntryAndNote();\n if (journalEntry) {\n this.dungeon = new Dungeon(journalEntry, note);\n await this.dungeon.loadFromJournalEntry();\n // add dungeon underneath any placeables or drawing preview\n this.addChildAt(this.dungeon, 0);\n } else {\n // no journal entry and note found, so make sure dungeon is nulled on this layer\n this.dungeon = null;\n }\n }\n\n async createNewDungeon() {\n await createDungeonEntryAndNote();\n await this.loadDungeon();\n }\n\n /* -------------------------------------------- */\n /* Rendering */\n /* -------------------------------------------- */\n\n /** @inheritdoc */\n async draw() {\n await super.draw();\n return this;\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n _onClickLeft(event) {\n const { preview, createState, originalEvent } = event.data;\n\n // Continue polygon point placement\n if (createState >= 1 && preview.isPolygon) {\n let point = event.data.destination;\n if (!originalEvent.shiftKey)\n point = canvas.grid.getSnappedPosition(\n point.x,\n point.y,\n this.gridPrecision\n );\n preview._addPoint(point, false);\n preview._chain = true; // Note that we are now in chain mode\n return preview.refresh();\n }\n super._onClickLeft(event);\n }\n\n /** @override */\n _onClickLeft2(event) {\n const { createState, preview } = event.data;\n\n // Conclude polygon placement with double-click\n if (createState >= 1 && preview.isPolygon) {\n event.data.createState = 2;\n return this._onDragLeftDrop(event);\n }\n\n super._onClickLeft2(event);\n }\n\n /** @override */\n async _onDragLeftStart(event) {\n // TODO: DrawingsLayer _onDragLeftStart isn't seeing the shift key press,\n // so set it for them ourselves :P\n event.data.originalEvent.isShift = shiftPressed();\n\n // superclass will handle layerOptions.snapToGrid\n await super._onDragLeftStart(event);\n\n // TODO: why is super._onDragleftStart() not setting createState?\n event.data.createState = 1;\n\n // we use a Drawing as our preview, but then on end-drag/completion,\n // update our single Dungeon instance.\n const data = this._getNewDrawingData(event.data.origin);\n const document = new DrawingDocument(data, { parent: canvas.scene });\n const drawing = new Drawing(document);\n event.data.preview = this.preview.addChild(drawing);\n return drawing.draw();\n }\n\n /** @override */\n _onDragLeftMove(event) {\n const { preview, createState } = event.data;\n if (!preview || preview._destroyed) {\n return;\n }\n if (preview.parent === null) {\n // In theory this should never happen, but rarely does\n this.preview.addChild(preview);\n }\n if (createState >= 1) {\n // TODO: deal with v10 having freehand-tool specific handling in DrawingShape :P\n if (game.activeDungeonDrawTool === \"freehand\") {\n onFreeHandMouseDraw(preview, event);\n } else {\n preview._onMouseDraw(event);\n }\n // easy single opcode\n const opcode = game.activeDungeonDrawMode + game.activeDungeonDrawTool;\n if (\n preview.document.shape.type !== CONST.DRAWING_TYPES.POLYGON ||\n opcode === \"adddoor\" ||\n opcode === \"addinteriorwall\" ||\n opcode === \"addsecretdoor\" ||\n opcode === \"addinvisiblewall\"\n ) {\n event.data.createState = 2;\n }\n }\n }\n\n _maybeSnappedRect(createData) {\n if (Settings.snapToGrid() && !shiftPressed()) {\n const snapPos = canvas.grid.getSnappedPosition(\n createData.x + createData.shape.width,\n createData.y + createData.shape.height,\n this.gridPrecision\n );\n createData.shape.height = snapPos.y - createData.y;\n createData.shape.width = snapPos.x - createData.x;\n }\n const rect = {\n x: createData.x,\n y: createData.y,\n height: createData.shape.height,\n width: createData.shape.width,\n };\n return rect;\n }\n\n _maybeSnapLastPoint(createData) {\n const length = createData.shape.points.length;\n if (length === 0) {\n return;\n }\n if (Settings.snapToGrid() && !shiftPressed()) {\n const snapPos = canvas.grid.getSnappedPosition(\n createData.shape.points[length - 2],\n createData.shape.points[length - 1],\n this.gridPrecision\n );\n createData.shape.points[length - 2] = snapPos.x;\n createData.shape.points[length - 1] = snapPos.y;\n }\n }\n\n _autoClosePolygon(createData) {\n const length = createData.shape.points.length;\n if (\n length > 4 &&\n (createData.shape.points[0] !== createData.shape.points[length - 2] ||\n createData.shape.points[1] !== createData.shape.points[length - 1])\n ) {\n // auto-close the polygon\n createData.shape.points.push(\n createData.shape.points[0],\n createData.shape.points[1]\n );\n }\n }\n\n /** @override */\n async _onDragLeftDrop(event) {\n // preview is of type Drawing.\n // Drawing.DrawingDocument.shape is shape data\n const { createState, destination, origin, preview } = event.data;\n // easy single opcode\n const opcode = game.activeDungeonDrawMode + game.activeDungeonDrawTool;\n\n // Successful drawing completion\n // TODO: why is freehand not properly advancing createState?\n if (createState === 2 || game.activeDungeonDrawTool === \"freehand\") {\n // if (createState === 2) {\n // create a new dungeon if we don't already have one\n if (!this.dungeon) {\n await this.createNewDungeon();\n }\n\n // TODO: v9 calculate distance vs origin, v10 vs preview?\n // Worse, preview.x / y don't exist when starting a new scene/first drawing,\n // which causes an error.\n // preview.document.shape.x / y do, tho\n // const distance = Math.hypot(\n // destination.x - preview.x,\n // destination.y - preview.y\n // );\n const distance = Math.hypot(\n destination.x - origin.x,\n destination.y - origin.y\n );\n const minDistance = distance >= canvas.dimensions.size / 8;\n\n // preview.isPolygon && preview.data.points.length > 2;\n // XXXX\n // in foundry v10, drawing.document.shape.points is a flat array\n const completePolygon =\n preview.isPolygon && preview.document.shape.points.length > 4;\n\n // Clean up and DRY up these if/else blocks\n if (opcode === \"adddoor\") {\n event.data.createState = 0;\n // clone the shape data\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addDoor(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addsecretdoor\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addSecretDoor(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addinteriorwall\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addInteriorWall(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (opcode === \"addinvisiblewall\") {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n this._maybeSnapLastPoint(data);\n await this.dungeon.addInvisibleWall(\n data.x,\n data.y,\n data.x + data.shape.points[2],\n data.y + data.shape.points[3]\n );\n } else if (minDistance || completePolygon) {\n event.data.createState = 0;\n const data = preview.document.toObject(false);\n preview._chain = false;\n // TODO: do we care about normalizing the shape? maybe for freehand curves/lines?\n const createData = this.constructor.placeableClass.normalizeShape(data);\n if (opcode === \"addellipse\") {\n const x = createData.x + createData.shape.width / 2;\n const y = createData.y + createData.shape.height / 2;\n await this.dungeon.addEllipse(\n x,\n y,\n createData.shape.width,\n createData.shape.height\n );\n } else if (opcode === \"addfreehand\") {\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addPolygon(offsetPoints);\n } else if (opcode === \"addpolygon\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addPolygon(offsetPoints);\n } else if (opcode === \"addrectangle\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.addRectangle(rect);\n } else if (opcode === \"addthemepainter\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.addThemeArea(offsetPoints);\n } else if (opcode === \"removedoor\") {\n const rect = this._maybeSnappedRect(createData);\n // TODO: need to spam out methods to various different flavor deletions\n await this.dungeon.removeDoors(rect);\n } else if (opcode === \"removeellipse\") {\n const x = createData.x + createData.shape.width / 2;\n const y = createData.y + createData.shape.height / 2;\n await this.dungeon.removeEllipse(\n x,\n y,\n createData.shape.width,\n createData.shape.height\n );\n } else if (opcode === \"removefreehand\") {\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.removePolygon(offsetPoints);\n } else if (opcode === \"removesecretdoor\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeSecretDoors(rect);\n } else if (opcode === \"removeinteriorwall\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeInteriorWalls(rect);\n } else if (opcode === \"removeinvisiblewall\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeInvisibleWalls(rect);\n } else if (opcode === \"removepolygon\") {\n this._maybeSnapLastPoint(createData);\n this._autoClosePolygon(createData);\n const offsetPoints = createDataOffsetPoints(createData);\n await this.dungeon.removePolygon(offsetPoints);\n } else if (opcode === \"removerectangle\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeRectangle(rect);\n } else if (opcode === \"removethemepainter\") {\n const rect = this._maybeSnappedRect(createData);\n await this.dungeon.removeThemeAreas(rect);\n }\n }\n\n // Cancel the preview\n return this._onDragLeftCancel(event);\n }\n\n // In-progress polygon\n if (createState === 1 && preview.isPolygon) {\n event.data.originalEvent.preventDefault();\n if (preview._chain) {\n return;\n }\n return this._onClickLeft(event);\n }\n\n // Incomplete drawing\n return this._onDragLeftCancel(event);\n }\n}\n","/**\n * Sheet for dungeon generation ettings.\n *\n * @extends {FormApplication}\n */\nexport class GeneratorSheet extends FormApplication {\n constructor(activeTab = \"settings\") {\n super();\n this._tabs[0].active = activeTab;\n }\n\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-generator-sheet\",\n classes: [\"sheet\"],\n template: \"modules/dungeon-draw/templates/generator-sheet.html\",\n width: 480,\n height: 800,\n tabs: [\n { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n ],\n });\n }\n\n /** @override */\n get title() {\n return game.i18n.localize(\"DD.GeneratorSheetTitle\");\n }\n\n /** @override */\n getData() {\n return {\n height: 30,\n width: 30,\n\n // 2d-dungeon\n centerExits: false,\n circularPaths: false,\n generate2DDungeonDoors: true,\n maxRoomSize: 7,\n minRoomSize: 3,\n roomCount: 15,\n\n // dungeoneer\n generateDungeoneerDoors: true,\n\n // rot-js-cellular\n connectCaves: true,\n smoothing: 0,\n };\n }\n\n /* -------------------------------------------- */\n /* Event Listeners and Handlers */\n /* -------------------------------------------- */\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html.find('button[name=\"generate\"]').click(this.generate.bind(this));\n html\n .find('select[name=\"algorithm\"]')\n .change(this.changeAlgorithm.bind(this));\n this.changeAlgorithm();\n }\n\n async changeAlgorithm(event) {\n event?.preventDefault();\n const formData = this._getSubmitData();\n const algClass = `.${formData.algorithm}`;\n $(\".alg-fields\").filter(algClass).show();\n $(\".alg-fields\").not(algClass).hide();\n }\n\n async generate(event) {\n event.preventDefault();\n const formData = this._getSubmitData();\n await canvas.dungeon.generate(formData);\n }\n}\n","import * as constants from \"./constants.js\";\nimport { DungeonLayer } from \"./dungeonlayer.js\";\n\nexport class Keybindings {\n static register() {\n game.keybindings.register(constants.MODULE_NAME, \"redo\", {\n name: \"DD.ButtonTitleRedo\",\n uneditable: [\n { key: \"KeyY\", modifiers: [KeyboardManager.MODIFIER_KEYS.CONTROL] },\n ],\n onDown: Keybindings.onRedo,\n });\n\n game.keybindings.register(constants.MODULE_NAME, \"undo\", {\n name: \"DD.ButtonTitleUndo\",\n uneditable: [\n { key: \"KeyZ\", modifiers: [KeyboardManager.MODIFIER_KEYS.CONTROL] },\n ],\n onDown: Keybindings.onUndo,\n });\n }\n\n static onRedo() {\n if (!canvas.ready) {\n return false;\n }\n const layer = canvas.activeLayer;\n if (!(layer instanceof DungeonLayer)) {\n return false;\n }\n\n layer.dungeon?.redo();\n return true;\n }\n\n static onUndo() {\n if (!canvas.ready) {\n return false;\n }\n const layer = canvas.activeLayer;\n if (!(layer instanceof DungeonLayer)) {\n return false;\n }\n\n layer.dungeon?.undo();\n return true;\n }\n}\n","import {\n getCustomThemes,\n getThemePainterThemeKey,\n setThemePainterThemeKey,\n themes,\n} from \"./themes.js\";\n\nexport class Toolbar extends Application {\n static get defaultOptions() {\n return foundry.utils.mergeObject(super.defaultOptions, {\n id: \"dd-toolbar\",\n // classes: [\"sheet\"],\n popOut: false,\n template: \"modules/dungeon-draw/templates/toolbar.html\",\n // width: 480,\n // height: 500,\n // tabs: [\n // { navSelector: \".tabs\", contentSelector: \"form\", initial: \"position\" },\n // ],\n });\n }\n\n constructor() {\n super();\n }\n\n /** @override */\n activateListeners(html) {\n super.activateListeners(html);\n html.find(\".addremove-toggle\").click(this.addRemoveClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this.themeSelectChange.bind(this));\n html.find(\".control-tool\").click(this.controlToolClick.bind(this));\n html\n .find('select[name=\"themePainterThemeKey\"]')\n .change(this.themeSelectChange.bind(this));\n }\n\n /** @override */\n getData() {\n const customThemes = getCustomThemes();\n const customThemeKeys = Object.keys(customThemes).sort();\n const themeKeys = Object.keys(themes).sort();\n const themePainterThemeKey = getThemePainterThemeKey();\n const toggleAddClass =\n game.activeDungeonDrawMode === \"add\" ? \"toggle-on\" : \"\";\n const toggleRemoveClass =\n game.activeDungeonDrawMode === \"remove\" ? \"toggle-on\" : \"\";\n\n const data = {\n customThemes,\n customThemeKeys,\n row1: [\n {\n name: \"rectangle\",\n title: \"DD.ButtonTitleRectangle\",\n icon: \"fas fa-square\",\n class: \"add\",\n isActive: game.activeDungeonDrawTool === \"rectangle\",\n },\n {\n name: \"polygon\",\n title: \"DD.ButtonTitlePolygon\",\n icon: \"fas fa-draw-polygon\",\n isActive: game.activeDungeonDrawTool === \"polygon\",\n },\n {\n name: \"ellipse\",\n title: \"DD.ButtonTitleEllipse\",\n icon: \"fas fa-circle\",\n isActive: game.activeDungeonDrawTool === \"ellipse\",\n },\n {\n name: \"freehand\",\n title: \"DD.ButtonTitleFreehand\",\n icon: \"fas fa-signature\",\n isActive: game.activeDungeonDrawTool === \"freehand\",\n },\n ],\n row2: [\n {\n name: \"interiorwall\",\n title: \"DD.ButtonTitleInteriorWall\",\n icon: \"fas fa-bars\",\n isActive: game.activeDungeonDrawTool === \"interiorwall\",\n },\n {\n name: \"door\",\n title: \"DD.ButtonTitleDoor\",\n icon: \"fas fa-door-open\",\n isActive: game.activeDungeonDrawTool === \"door\",\n },\n {\n name: \"secretdoor\",\n title: \"DD.ButtonTitleSecretDoor\",\n icon: \"fas fa-user-secret\",\n isActive: game.activeDungeonDrawTool === \"secretdoor\",\n },\n {\n name: \"invisiblewall\",\n title: \"DD.ButtonTitleInvisibleWall\",\n icon: \"fas fa-eye-slash\",\n isActive: game.activeDungeonDrawTool === \"invisiblewall\",\n },\n ],\n row3: [\n {\n name: \"themepainter\",\n title: \"DD.ButtonTitleThemePainter\",\n icon: \"fas fa-brush\",\n isActive: game.activeDungeonDrawTool === \"themepainter\",\n },\n ],\n themeKeys,\n themePainterThemeKey,\n themes,\n toggleAddClass,\n toggleRemoveClass,\n };\n return data;\n }\n\n render(force = false, options = {}) {\n super.render(force, options);\n }\n\n updateActiveCss() {\n this._element.find(\".control-tool\").removeClass(\"active\");\n this._element\n .find(`[data-tool='${game.activeDungeonDrawTool}']`)\n .addClass(\"active\");\n }\n\n addRemoveClick(event) {\n game.activeDungeonDrawMode = $(event.target).data(\"addremove\");\n this._element.find(\".addremove-toggle\").removeClass(\"toggle-on\");\n $(event.currentTarget).addClass(\"toggle-on\");\n }\n\n controlToolClick(event) {\n const activeTool = $(event.currentTarget).data(\"tool\");\n game.activeDungeonDrawTool = activeTool;\n this.updateActiveCss();\n }\n\n themeSelectChange(event) {\n const themeKey = $(event.currentTarget).val();\n setThemePainterThemeKey(themeKey);\n }\n}\n","import { ConfigSheet } from \"./configsheet.js\";\nimport { DungeonLayer } from \"./dungeonlayer.js\";\nimport * as constants from \"./constants.js\";\nimport { GeneratorSheet } from \"./generatorsheet.js\";\nimport { Keybindings } from \"./keybindings\";\nimport { Settings } from \"./settings\";\nimport { Toolbar } from \"./toolbar\";\n\nconst toolbar = new Toolbar();\n\nexport class DungeonDraw {\n static init() {\n Settings.register();\n Keybindings.register();\n\n game.activeDungeonDrawTool = \"rectangle\";\n game.activeDungeonDrawMode = \"add\";\n }\n\n static ready() {}\n\n static controlsVisible() {\n if (game.user.isGM) {\n return true;\n }\n const allowTrustedPlayer = game.settings.get(\n constants.MODULE_NAME,\n constants.SETTING_ALLOW_TRUSTED_PLAYER\n );\n return allowTrustedPlayer && game.user.isTrusted;\n }\n\n static getSceneControlButtons(controls) {\n CONFIG.Canvas.layers.dungeon = {\n layerClass: DungeonLayer,\n group: \"primary\",\n };\n CONFIG.Dungeon = {\n layerClass: DungeonLayer,\n };\n\n controls.push({\n name: \"dungeondraw\",\n title: \"DD.SceneControlTitle\",\n layer: DungeonLayer.LAYER_NAME,\n icon: \"fas fa-dungeon\",\n visible: DungeonDraw.controlsVisible(),\n tools: [\n {\n name: \"drawmap\",\n title: \"DD.ButtonTitleDrawMap\",\n icon: \"fas fa-dungeon\",\n },\n {\n name: \"undo\",\n title: \"DD.ButtonTitleUndo\",\n icon: \"fas fa-undo\",\n onClick: async () => {\n await canvas.dungeon.dungeon.undo();\n },\n button: true,\n },\n {\n name: \"redo\",\n title: \"DD.ButtonTitleRedo\",\n icon: \"fas fa-redo\",\n onClick: async () => {\n await canvas.dungeon.dungeon.redo();\n },\n button: true,\n },\n {\n name: \"generate\",\n title: \"DD.ButtonTitleGenerate\",\n icon: \"fas fa-magic\",\n onClick: async () => new GeneratorSheet().render(true),\n button: true,\n },\n {\n name: \"config\",\n title: \"DD.ButtonTitleConfig\",\n icon: \"fas fa-cog\",\n onClick: () => new ConfigSheet().render(true),\n button: true,\n },\n {\n name: \"savetoscene\",\n title: \"DD.ButtonTitleSaveToSceneBackground\",\n icon: \"fas fa-sign-out-alt\",\n visible: game.user.isGM,\n onClick: async () => {\n await canvas.dungeon.dungeon.saveToSceneBackground();\n },\n button: true,\n },\n {\n name: \"clear\",\n title: \"DD.ButtonTitleClearAll\",\n icon: \"fas fa-trash\",\n visible: game.user.isGM,\n onClick: () => canvas.dungeon.deleteAll(),\n button: true,\n },\n ],\n activeTool: \"drawmap\",\n });\n }\n\n static async canvasReady(canvas) {\n await canvas.dungeon.loadDungeon();\n }\n\n static async updateJournalEntry(document, change, options, userId) {\n if (game.user.id !== userId) {\n // if somebody else changed the backing JournalEntry, we need to refresh\n await canvas.dungeon.dungeon?.maybeRefresh(document);\n }\n }\n\n static async renderSceneControls(controls) {\n if (controls.activeControl !== \"dungeondraw\") {\n // TODO: not found?\n await toolbar.close();\n return;\n }\n toolbar.render(true);\n }\n}\n\nHooks.on(\"init\", DungeonDraw.init);\nHooks.on(\"ready\", DungeonDraw.ready);\nHooks.on(\"getSceneControlButtons\", DungeonDraw.getSceneControlButtons);\nHooks.on(\"canvasReady\", DungeonDraw.canvasReady);\nHooks.on(\"updateJournalEntry\", DungeonDraw.updateJournalEntry);\nHooks.on(\"renderSceneControls\", DungeonDraw.renderSceneControls);\n"],"names":["MODULE_NAME","Settings","static","game","settings","register","constants.MODULE_NAME","name","i18n","localize","scope","default","type","Boolean","config","onChange","value","canvas","dungeon","options","snapToGrid","String","get","getCustomThemes","customThemesString","themeObj","JSON","parse","Object","keys","forEach","key","foundry","utils","mergeObject","doorColor","doorFillColor","doorFillOpacity","doorLineThickness","doorThickness","exteriorShadowColor","exteriorShadowThickness","exteriorShadowOpacity","floorColor","floorOpacity","floorTexture","floorTextureRotation","floorTextureTint","interiorShadowColor","interiorShadowThickness","interiorShadowOpacity","invisibleWallColor","invisibleWallFillColor","invisibleWallLineThickness","invisibleWallFillOpacity","invisibleWallThickness","matchBaseWalls","sceneBackgroundColor","sceneGridColor","sceneGridOpacity","secretDoorSColor","secretDoorStyleGM","secretDoorStylePlayer","threeDDoorTexture","threeDDoorTextureTint","threeDWallTexture","threeDWallTextureTint","threeDWallSidesTexture","threeDWallSidesTextureTint","wallColor","wallTexture","wallTextureTint","wallThickness","e","console","log","setCustomThemes","customThemes","themesString","stringify","set","getThemePainterThemeKey","setThemePainterThemeKey","themeKey","themes","arcPavement","basicBlack","cavern","checkerboard","cobblestone","dirt","dungeonSquares","grass","groovyCarpet","hexagon","marble","metalGrid","metalSquares","moldvayBlue","neonBlueprint","ruddyPaper","water","woodPlanks","xenomorph","ThemeSheet","FormApplication","constructor","super","this","defaultOptions","id","classes","template","width","height","threeDCanvasEnabled","tabs","navSelector","contentSelector","initial","title","getData","theme","themeName","async","event","formData","refresh","ConfigSheet","activeTab","_tabs","active","state","customThemeKeys","sort","themeKeys","themePainterThemeKey","customThemeName","themePainterTheme","setConfig","user","isGM","scene","update","backgroundColor","gridAlpha","sceneGridAlpha","gridColor","close","preview","removeChildren","activateListeners","html","find","click","_onResetDefaults","bind","_onThemeNameClick","_onSaveAsThemeClick","_onEditThemeClick","_onCopyThemeClick","_onDeleteThemeClick","change","_onThemePainterThemeSelect","_onExportThemesClick","_onImportThemesClick","preventDefault","render","themeRow","$","currentTarget","parent","data","newConfig","saveAsThemeName","closest","children","val","_getSubmitData","oldTheme","newTheme","newName","num","done","saveDataToFile","Dialog","content","renderTemplate","hint","buttons","import","icon","label","callback","form","files","length","ui","notifications","error","readTextFromFile","then","text","newJson","wipe","checked","oldJson","mergedJson","no","Exception","Error","message","toString","IllegalArgumentException","GeometryComponentFilter","filter","geom","Comparable","Clonable","Serializable","NumberUtil","x1","x2","tolerance","Math","abs","Long","high","low","i","mask","result","Double","Comparator","NaN","isNaN","n","Number","isInfinite","isFinite","MAX_VALUE","POSITIVE_INFINITY","NEGATIVE_INFINITY","Float64Array","Int32Array","EXP_BIT_MASK","f64buf","i32buf","buffer","doubleToLongBits","longBitsToDouble","bits","BIAS","log2","floor","pow","MAX_REL_BITS_INTEGER","x","y","f","skip","sign","exp","Infinity","fract","RuntimeException","AssertionFailedException","constructor_","apply","arguments","call","Assert","shouldNeverReachHere","assertion","isTrue","expectedValue","actualValue","equals","kBuf","ArrayBuffer","kBufAsF64","kBufAsI32","Coordinate","z","c","getZ","NULL_ORDINATE","getM","setOrdinate","ordinateIndex","X","Y","Z","setZ","equals2D","other","equalsWithTolerance","setM","m","M","getOrdinate","equals3D","equalInZ","setX","compareTo","o","getX","clone","CloneNotSupportedException","copy","distance3D","dx","dy","dz","sqrt","getY","setY","distance","hashCode","setCoordinate","interfaces_","Cloneable","DimensionalComparator","_dimensionsToTest","dimensionsToTest","a","b","compare","c1","c2","compX","compY","Envelope","_minx","_maxx","_miny","_maxy","init","p","env","p1","p2","y1","y2","q","q1","q2","minq","min","maxq","max","minp","maxp","getArea","getWidth","getHeight","otherEnvelope","isNull","getMaxX","getMaxY","getMinX","getMinY","intersection","intersects","intMinX","intMinY","intMaxX","intMaxY","covers","getDiameter","w","h","expandToInclude","minExtent","translate","transX","transY","setToNull","disjoint","maxExtent","expandBy","deltaX","deltaY","contains","centre","Geometry","isGeometryCollection","getTypeCode","TYPECODE_GEOMETRYCOLLECTION","getFactory","_factory","getGeometryN","isRectangle","equalsExact","geometryChanged","geometryChangedFilter","geometryChangedAction","_envelope","equalsNorm","g","norm","getLength","getNumGeometries","isEmpty","compareToSameClass","comp","getUserData","_userData","getSRID","_SRID","getEnvelope","toGeometry","getEnvelopeInternal","checkNotGeometryCollection","equal","normalize","reverse","res","reverseInternal","envelope","setSRID","copyInternal","getPrecisionModel","computeEnvelopeInternal","SRID","setUserData","userData","iterator","j","hasNext","aElement","next","bElement","comparison","isEquivalentClass","getClass","isGeometryCollectionOrDerived","TYPECODE_MULTIPOINT","TYPECODE_MULTILINESTRING","TYPECODE_MULTIPOLYGON","geometries","array","factory","TYPECODE_POINT","TYPECODE_LINESTRING","TYPECODE_LINEARRING","TYPECODE_POLYGON","TYPENAME_POINT","TYPENAME_MULTIPOINT","TYPENAME_LINESTRING","TYPENAME_LINEARRING","TYPENAME_MULTILINESTRING","TYPENAME_POLYGON","TYPENAME_MULTIPOLYGON","TYPENAME_GEOMETRYCOLLECTION","CoordinateFilter","coord","hasInterface","indexOf","Lineal","CoordinateSequence","index","hasM","mIndex","getDimension","getMeasures","hasZ","size","getCoordinate","getCoordinateCopy","createCoordinate","expandEnvelope","toCoordinateArray","CoordinateSequences","src","srcPos","dest","destPos","minDim","dim","seq","isInteger","indexOfFirstCoordinate","scroll","isRing","firstCoordinate","ensureRing","last","k","cs1","cs2","cs1Size","d","v1","v2","minCoordinateIndex","to","minCoordIndex","minCoord","testCoord","fact","newseq","create","mid","trunc","swap","tmp","copyCoord","createClosedRing","coordinate","UnsupportedOperationException","Character","toUpperCase","Dimension","dimensionValue","FALSE","SYM_FALSE","TRUE","SYM_TRUE","DONTCARE","SYM_DONTCARE","P","SYM_P","L","SYM_L","A","SYM_A","dimensionSymbol","GeometryFilter","CoordinateSequenceFilter","isDone","isGeometryChanged","LineString","_points","points","isClosed","isSimple","getCoordinates","otherLineString","getBoundaryDimension","getCoordinateN","getNumPoints","createLineString","getEndPoint","getPointN","pts","len","x0","y0","ofLine","line","getBoundary","getGeometryType","getCoordinateSequence","getCoordinateSequenceFactory","isCoordinate","pt","getStartPoint","createPoint","Collection","add","addAll","toArray","remove","IndexOutOfBoundsException","List","NoSuchElementException","ArrayList","ensureCapacity","push","splice","clear","element","oldElement","Iterator","comparator","slice","Symbol","values","arrayList","position","CoordinateList","allowRepeated","isChanged","coordArrayType","Array","fill","obj","start","end","inc","closeRing","duplicate","CoordinateSequenceFactory","dimension","Puntal","Point","_coordinates","coordinates","IllegalStateException","point","createGeometryCollection","Area","ring","ofRingSigned","sum","p0","Arrays","t","r","concat","original","newLength","StringBuffer","str","append","setCharAt","substr","Integer","intValue","DD","_hi","_lo","dd","hi","lo","determinant","valueOf","multiply","selfSubtract","selfMultiply","strlen","isWhitespace","charAt","isNegative","signCh","numDigits","numBeforeDec","hasDecimalChar","ch","isDigit","TEN","selfAdd","expStr","substring","parseInt","ex","NumberFormatException","val2","numDecPlaces","scale","divide","negate","xAbs","xLog10","xMag","buf","le","extractSignificantDigits","insertDecimalPoint","magnitude","mag","gt","lt","ONE","decimalPointPos","MAX_PRINT_DIGITS","digit","rebiasBy10","digitChar","subtract","continueExtractingDigits","remMag","sqr","doubleValue","isZero","getSpecialNumberString","selfDivide","yhi","ylo","hc","tc","hy","ty","C","U","u","SPLIT","dump","createNaN","ge","s","reciprocal","ceil","fhi","flo","rint","setValue","ax","axdd","d2","H","S","T","zhi","zlo","hx","tx","selfSqr","toStandardNotation","toSciNotation","specialStr","sigDigits","stringOfChar","numZeroes","SCI_NOT_ZERO","digits","SCI_NOT_EXPONENT_CHAR","trailingDigits","digitsWithDecimal","isPositive","signum","PI","TWO_PI","PI_2","E","EPS","CGAlgorithmsDD","orientationIndexFilter","dx1","dy1","dx2","dy2","px","py","pw","qx","qy","qw","xInt","yInt","pa","pb","pc","detsum","detleft","detright","det","errbound","DP_SAFE_EPSILON","Orientation","orientationIndex","nPts","hiPt","hiIndex","iPrev","iNext","prev","disc","isCCW","CLOCKWISE","RIGHT","COUNTERCLOCKWISE","LEFT","COLLINEAR","STRAIGHT","Polygonal","Polygon","_shell","_holes","shell","holes","createLinearRing","hasNullElements","hasNonEmptyElements","shellCoordinates","childCoordinates","area","ofRing","shellCopy","holeCopies","getNumInteriorRing","prevX","prevY","otherPolygon","thisShell","otherPolygonShell","normalized","clockwise","getExteriorRing","getInteriorRingN","createPolygon","numPoints","convexHull","otherShell","poly","shellComp","nHole1","nHole2","thisHole","otherHole","holeComp","createMultiLineString","rings","Set","SortedSet","TreeSet","GeometryCollection","_geometries","otherCollection","numGeometries","reversed","buildGeometry","theseElements","asList","otherElements","gc","n1","n2","thisGeom","otherGeom","MultiPoint","isValid","LinearRing","validateConstruction","MINIMUM_VALID_SIZE","CoordinateXY","CoordinateXYM","_m","CoordinateXYZM","Coordinates","measures","MathUtil","ln","LOG_10","v3","v4","System","CoordinateArrays","testPts","testPt","newCoordinates","arraycopy","coord1","coord2","coordinateComparator","coordList","hasRepeatedPoints","nonNull","newCoord","srcStart","destStart","pts1","pts2","clamp","npts","extractPts","iPts","ForwardComparator","o1","o2","BidirectionalComparator","forwardComp","isEqualReversed","OLDcompare","dir1","increasingDirection","dir2","i1","i2","comparePt","StringBuilder","CoordinateArraySequence","_dimension","_measures","coordSeq","cloneCoordinates","strBuilder","CoordinateArraySequenceFactory","instanceObject","readResolve","instance","spatial","MultiPolygon","polygons","allRings","allRingsArray","Map","put","entrySet","HashSet","map","has","from","current","HashMap","MapInterface","it","hashSet","entries","entry","PrecisionModel","_modelType","_scale","FLOATING","Type","modelType","FIXED","setScale","pm","pm1","pm2","otherPrecisionModel","getMaximumSignificantDigits","otherSigDigits","getScale","isFloating","FLOATING_SINGLE","getType","description","makePrecise","round","maxSigDigits","_name","nameToTypeMap","maximumPreciseValue","MultiLineString","lineStrings","GeometryFactory","_precisionModel","_coordinateSequenceFactory","coordinateSequenceFactory","precisionModel","getDefaultCoordinateSequenceFactory","multiPolygons","multiPolygonArray","geometryArray","multiLineStrings","multiLineStringArray","lineStringArray","multiPoints","multiPointArray","linearRings","linearRingArray","pointArray","polygonArray","exemplar","createEmpty","geomList","geomType","isHeterogeneous","hasGeometryCollection","partType","toGeometryArray","geom0","createMultiPolygon","toPolygonArray","toLineStringArray","createMultiPoint","toPointArray","createMultiPointFromCoords","ptSeq","GeometryTransformer","_inputGeom","_pruneEmptyGeometry","_preserveGeometryCollectionType","_preserveCollections","_preserveType","transformPoint","transformCoordinates","transformPolygon","isAllValidLinearRings","transformLinearRing","hole","components","createCoordinateSequence","coords","getInputGeometry","transformMultiLineString","transGeomList","transformGeom","transformLineString","transformMultiPoint","transformMultiPolygon","transformGeometryCollection","transform","inputGeom","seqSize","Intersection","minX0","minY0","maxX0","maxY0","minX1","minY1","maxX1","maxY1","midx","midy","p1x","p1y","p2x","p2y","q1x","q1y","q2x","q2y","Distance","B","D","pointToSegment","noIntersection","denom","r_num","len2","minDistance","dist","GeometryLayout","GeometryType","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","TokenType","Lexer","wkt","index_","isAlpha_","isNumeric_","opt_decimal","undefined","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","decimal","scientificNotation","parseFloat","Parser","lexer","lexer_","token_","layout_","consume_","isTokenType","match","isMatch","parseGeometry_","parseGeometryLayout_","layout","dimToken","dimInfo","parseGeometryCollectionText_","isEmptyGeometry_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","dimensions","token","o2c","ordinates","ca2p","encodePointGeometry","cs","join","encodeLineStringGeometry","ii","encodePolygonGeometry","GeometryEncoder","encode","geometryEncoder","encodeGeometryLayout","WKTParser","geometryFactory","read","write","geometry","WKTWriter","parser","LineIntersector","_result","_inputLines","_intPt","_intLineIndex","_isProper","_pa","_pb","pdx","pdy","getIndexAlongSegment","segmentIndex","intIndex","computeIntLineIndex","getTopologySummary","catBuilder","isEndPoint","isCollinear","computeIntersection","p3","p4","computeIntersect","getIntersectionNum","getEdgeDistance","isProper","hasIntersection","setPrecisionModel","isInteriorIntersection","inputLineIndex","getIntersection","NO_INTERSECTION","computeEdgeDistance","COLLINEAR_INTERSECTION","toLineString","getEndpoint","ptIndex","isIntersection","getIntersectionAlongSegment","DONT_INTERSECT","DO_INTERSECT","POINT_INTERSECTION","RobustLineIntersector","nearestPt","minDist","isInSegmentEnvelopes","intPt","env0","env1","intersectionSafe","nearestEndpoint","checkDD","intPtDD","isIn","out","println","computeCollinearIntersection","p1q1p2","p1q2p2","q1p1q2","q1p2q2","Pq1","Pq2","Qp1","Qp2","LineSegment","ls","minX","seg","orient0","orient1","geomFactory","isVertical","li","project","projectionFactor","pf0","pf1","newp0","newp1","angle","atan2","distancePerpendicular","pointToLinePerpendicular","minY","midPoint","closestPoints","closestPt","close00","closestPoint","close01","close10","close11","factor","maxX","comp0","temp","equalsTopo","lineIntersection","maxY","pointAlongOffset","segmentLengthFraction","offsetDistance","segx","segy","ux","uy","setCoordinates","segmentFraction","inputPt","segFrac","isHorizontal","reflect","A2plusB2","A2subB2","segmentToSegment","pointAlong","bits0","hash0","bits1","WKTReader","BufferParameters","_quadrantSegments","DEFAULT_QUADRANT_SEGMENTS","_endCapStyle","CAP_ROUND","_joinStyle","JOIN_ROUND","_mitreLimit","DEFAULT_MITRE_LIMIT","_isSingleSided","_simplifyFactor","DEFAULT_SIMPLIFY_FACTOR","quadrantSegments","setQuadrantSegments","endCapStyle","setEndCapStyle","joinStyle","mitreLimit","setJoinStyle","setMitreLimit","quadSegs","alpha","cos","getEndCapStyle","isSingleSided","JOIN_BEVEL","JOIN_MITRE","getJoinStyle","setSimplifyFactor","simplifyFactor","getSimplifyFactor","getQuadrantSegments","getMitreLimit","setSingleSided","CAP_FLAT","CAP_SQUARE","Location","locationValue","EXTERIOR","BOUNDARY","INTERIOR","NONE","Position","ON","EmptyStackException","Stack","pop","peek","empty","search","RightmostEdgeFinder","_minIndex","_minCoord","_minDe","_orientedDe","getRightmostSide","de","side","getRightmostSideOfSegment","checkForRightmostCoordinate","findRightmostEdgeAtVertex","getEdge","pPrev","pNext","orientation","usePrev","pos","findRightmostEdgeAtNode","star","getNode","getEdges","getRightmostEdge","isForward","getSym","findEdge","dirEdgeList","TopologyException","msg","LinkedList","addLast","removeFirst","shift","BufferSubgraph","_finder","_dirEdgeList","_nodes","_rightMostCoord","_env","clearVisitedEdges","setVisited","getRightmostCoordinate","computeNodeDepth","startEdge","isVisited","computeDepths","copySymDepths","computeDepth","outsideDepth","getLabel","setEdgeDepths","node","addReachable","findResultEdges","getDepth","isInteriorAreaEdge","setInResult","nodesVisited","nodeQueue","startNode","sym","adjNode","graph","edgeEnv","nodeStack","setDepth","symNode","getNodes","getDirectedEdges","RayCrossingCounter","_p","_crossingCount","_isPointOnSegment","counter","countSegment","isOnSegment","getLocation","minx","maxx","orient","isPointInPolygon","PointLocation","lineIntersector","locatePointInRing","locateInRing","TopologyLocation","location","on","gl","left","right","setAllLocations","locValue","setAllLocationsIfNull","isLine","merge","newLoc","getLocations","flip","toLocationSymbol","setLocations","posIndex","isArea","isAnyNull","setLocation","locIndex","isEqualOnSide","allPositionsEqual","loc","Label","elt","onLoc","lbl","geomIndex","leftLoc","rightLoc","lineLabel","getGeometryCount","count","toLine","EdgeRing","_startDe","_maxNodeDegree","_edges","_pts","_label","_ring","_isHole","_geometryFactory","computePoints","computeRing","isIsolated","isFirstEdge","getEdgeRing","mergeLabel","addPoints","setEdgeRing","getNext","getLinearRing","computeMaxNodeDegree","degree","getOutgoingDegree","edge","edgePts","startIndex","isHole","containsPoint","isInRing","addHole","isShell","getMaxNodeDegree","getShell","deLabel","setShell","toPolygon","holeLR","MinimalEdgeRing","er","setMinEdgeRing","getNextMin","MaximalEdgeRing","buildMinimalRings","minEdgeRings","getMinEdgeRing","minEr","linkDirectedEdgesForMinimalEdgeRings","linkMinimalDirectedEdges","GraphComponent","_isInResult","_isCovered","_isCoveredSet","_isVisited","isInResult","isCovered","isCoveredSet","setLabel","setCovered","updateIM","im","computeIM","Node","_coord","edges","isIncidentEdgeInResult","print","computeMergedLocation","label2","eltIndex","nLoc","argIndex","onLocation","insert","setNode","setLabelBoundary","SortedMap","colorOf","color","parentOf","setColor","leftOf","rightOf","TreeMap","root_","size_","cmp","getValue","getKey","oldValue","fixAfterInsertion","rotateLeft","rotateRight","getFirstEntry","successor","l","containsKey","NodeMap","nodeMap","nodeFact","addNode","createNode","getBoundaryNodes","bdyNodes","Quadrant","quad","NE","NW","quad1","quad2","halfPlane","SE","SW","EdgeEnd","_edge","_node","_p0","_p1","_dx","_dy","_quadrant","compareDirection","getDy","className","getName","lastDotPos","lastIndexOf","getDirectedCoordinate","getDx","getQuadrant","computeLabel","boundaryNodeRule","quadrant","DirectedEdge","_isForward","_sym","_next","_nextMin","_edgeRing","_minEdgeRing","_depth","computeDirectedLabel","currLocation","nextLocation","depthVal","setNextMin","nextMin","getDepthDelta","minEdgeRing","isLineEdge","isExteriorIfArea0","isExteriorIfArea1","edgeRing","depthDelta","printEdge","printReverse","setSym","setVisitedEdge","depth","directionFactor","oppositePos","opposite","oppositeDepth","setNext","NodeFactory","PlanarGraph","_edgeEndList","nodes","nodeit","linkResultDirectedEdges","printEdges","eiList","getNodeIterator","debugPrintln","isBoundaryNode","linkAllDirectedEdges","matchInSameDirection","ep0","ep1","getEdgeEnds","debugPrint","getEdgeIterator","findEdgeInSameDirection","eCoord","insertEdge","findEdgeEnd","ee","addEdges","edgesToAdd","de1","de2","PolygonBuilder","_shellList","testEr","shellList","testRing","testEnv","minShell","minShellEnv","tryShell","tryShellRing","tryShellEnv","ptNotInList","isContained","sortShellsAndHoles","edgeRings","freeHoleList","computePolygons","resultPolyList","placeFreeHoles","findEdgeRingContaining","buildMinimalEdgeRings","maxEdgeRings","findShell","placePolygonHoles","buildMaximalEdgeRings","dirEdges","getPolygons","shellCount","Boundable","getBounds","ItemBoundable","_bounds","_item","bounds","item","getItem","PriorityQueue","_size","_items","poll","minItem","reorder","child","SpatialIndex","itemEnv","query","AbstractNode","_childBoundables","_level","level","getLevel","getChildBoundables","addChildBoundable","childBoundable","computeBounds","Collections","reverseOrder","alen","singletonList","EnvelopeDistance","ax1","ay1","ax2","ay2","bx1","by1","bx2","by2","env2","miny","maxy","aminx","aminy","amaxx","amaxy","bminx","bminy","bmaxx","bmaxy","maxDistance","BoundablePair","_boundable1","_boundable2","_distance","_itemDistance","boundable1","boundable2","itemDistance","maximumDistance","expandToQueue","priQ","isComp1","isComposite","isComp2","expand","isLeaves","nd","bndComposite","bndOther","isFlipped","bp","getDistance","getBoundable","ItemVisitor","visitItem","AbstractSTRtree","_root","_built","_itemBoundables","_nodeCapacity","DEFAULT_NODE_CAPACITY","nodeCapacity","queryInternal","searchBounds","visitor","childBoundables","getIntersectsOp","matches","getNodeCapacity","lastNode","build","removeItem","childToRemove","itemsTree","valuesTree","valuesTreeForNode","valuesTreeForChild","boundablesAtLevel","boundables","top","boundable","createHigherLevels","getRoot","found","childToPrune","boundablesOfALevel","parentBoundables","createParentBoundables","maxChildDepth","childDepth","newLevel","sortedChildBoundables","getComparator","IntersectsOp","ItemDistance","item1","item2","STRtree","avg","kNearestNeighbors","items","createParentBoundablesFromVerticalSlices","verticalSlices","createParentBoundablesFromVerticalSlice","nearestNeighbourK","initBndPair","distanceLowerBound","bndPair","pairDistance","getItems","STRtreeNode","intersectsOp","sliceCount","sliceCapacity","slices","boundablesAddedToSlice","searchEnv","yComparator","minLeafCount","xComparator","nearestNeighbour","itemDist","minPair","tree","bnd","isWithinDistance","distanceUpperBound","compareDoubles","centreX","centreY","aBounds","bBounds","SegmentPointComparator","octant","xSign","relativeSign","ySign","compareValue","compareSign0","compareSign1","SegmentNode","_segString","_segmentOctant","_isInterior","segString","segmentOctant","maxSegmentIndex","isInterior","SegmentNodeList","_nodeMap","getSplitCoordinates","addEndpoints","eiPrev","ei","addEdgeCoordinates","addCollapsedNodes","collapsedVertexIndexes","findCollapsesFromInsertedNodes","findCollapsesFromExistingVertices","vertexIndex","createSplitEdgePts","ei0","ei1","lastSegStartPt","useIntPt1","ipt","addSplitEdges","edgeList","newEdge","createSplitEdge","findCollapseIndex","collapsedVertexIndex","numVerticesBetween","maxSegIndex","NodedSegmentString","eiNew","getSegmentOctant","checkSplitEdgesCorrectness","splitEdges","pt0","splitnPts","ptn","Octant","adx","ady","SegmentString","setData","NodableSegmentString","addIntersection","_nodeList","_data","segStrings","resultEdgelist","getNodedSubstrings","getNodeList","safeOctant","addIntersectionNode","normalizedSegmentIndex","nextSegIndex","nextPt","addIntersections","MonotoneChainOverlapAction","_overlapSeg1","_overlapSeg2","overlap","start1","mc2","start2","getLineSegment","MonotoneChain","_start","_end","_context","_id","context","computeSelect","start0","end0","mcs","select","computeOverlaps","mc","mco","end1","overlaps","mid0","mid1","setId","getEndIndex","getStartIndex","getContext","getId","MonotoneChainBuilder","safeStart","chainQuad","getChains","mcList","chainStart","chainEnd","findChainEnd","Noder","computeNodes","SinglePassNoder","_segInt","segInt","setSegmentIntersector","MCIndexNoder","_monoChains","_index","_idCounter","_nodedSegStrings","_nOverlaps","si","getMonotoneChains","getIndex","segStr","inputSegStrings","intersectChains","overlapAction","SegmentOverlapAction","queryChain","testChain","_si","ss1","ss2","processIntersections","BufferInputLineSimplifier","_inputLine","_distanceTol","_isDeleted","_angleOrientation","inputLine","distanceTol","simplify","isDeletable","i0","isConcave","isShallow","isShallowSampled","deleteShallowConcavities","midIndex","findNextNonDeletedIndex","lastIndex","isMiddleVertexDeleted","DELETE","isShallowConcavity","NUM_PTS_TO_CHECK","collapseLine","INIT","KEEP","OffsetSegmentString","_ptList","_minimimVertexDistance","COORDINATE_ARRAY_TYPE","addPt","bufPt","isRedundant","addPts","lastPt","startPt","setMinimumVertexDistance","minimimVertexDistance","Angle","radians","PI_TIMES_2","dx0","dy0","anglePrev","angleNext","tip1","tail","tip2","a1","a2","diff","ang1","ang2","delAngle","angleDegrees","crossproduct","sin","angDel","PI_OVER_2","PI_OVER_4","OffsetSegmentGenerator","_maxCurveSegmentError","_filletAngleQuantum","_closingSegLengthFactor","_segList","_bufParams","_li","_s0","_s1","_s2","_seg0","_seg1","_offset0","_offset1","_side","_hasNarrowConcaveAngle","bufParams","MAX_CLOSING_SEG_LEN_FACTOR","addNextSegment","addStartPoint","computeOffsetSegment","outsideTurn","addCollinear","addOutsideTurn","addInsideTurn","addLineEndCap","offsetL","offsetR","addDirectedFillet","squareCapSideOffset","squareCapLOffset","squareCapROffset","addMitreJoin","offset0","offset1","addLimitedMitreJoin","OFFSET_SEGMENT_SEPARATION_FACTOR","addBevelJoin","addCornerFillet","createSquare","addSegments","addFirstSegment","direction","radius","startAngle","endAngle","addLastSegment","initSideSegments","s1","s2","basePt","ang0","angDiffHalf","angleBetweenOriented","midAng","mitreMidAng","mitreDist","bevelHalfLen","bevelMidX","bevelMidY","bevelMidPt","mitreMidLine","bevelEndLeft","bevelEndRight","totalAngle","nSegs","angleInc","offset","sideSign","INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR","createCircle","CURVE_VERTEX_SNAP_DISTANCE_FACTOR","hasNarrowConcaveAngle","OffsetCurveBuilder","getOffsetCurve","inputPts","isRightSide","posDistance","segGen","getSegGen","computePointCurve","computeOffsetCurve","curvePts","computeSingleSidedBufferCurve","distTol","simplifyTolerance","simp2","simp1","computeRingBufferCurve","simp","computeLineBufferCurve","getLineCurve","isLineOffsetEmpty","getBufferParameters","bufDistance","getRingCurve","copyCoordinates","SubgraphDepthLocater","_subgraphs","_seg","subgraphs","findStabbedSegments","stabbingRayLeftPt","stabbedSegments","bsg","dirEdge","ds","DepthSegment","_leftDepth","_upwardSeg","orientIndex","compareX","seg0","seg1","compare0","NotRepresentableException","HCoordinate","_x","_y","_w","Triangle","m00","m01","m10","m11","v0","lenAB","lenBC","lenCA","maxLen","ay","bx","by","asqr","bsqr","numx","numy","ccx","ccy","isAcute","cx","cy","l1","l2","len0","frac","uz","vx","vy","vz","crossx","crossy","crossz","absSq","len1","circum","inCentreX","inCentreY","signedArea","interpolateZ","longestSideLength","circumcentre","area3D","centroid","inCentre","OffsetCurveSetBuilder","_curveBuilder","_curveList","curveBuilder","addRingSide","cwLeftLoc","cwRightLoc","curve","addCurve","addRingBothSides","addPoint","addPolygon","offsetSide","shellCoord","removeRepeatedPoints","isErodedCompletely","holeCoord","isTriangleErodedCompletely","triangleCoord","bufferDistance","tri","addLineString","getCurves","addCollection","ringCoord","envMinDimension","PointOnGeometryLocator","locate","GeometryCollectionIterator","_parent","_atStart","_max","_subcollectionIterator","isAtomic","SimplePointInAreaLocator","_geom","shellLoc","holeLoc","locatePointInPolygon","geomi","g2","locateInGeometry","EdgeEndStar","_edgeMap","_edgeList","_ptInAreaLocation","getNextCW","iNextCW","propagateSideLabels","startLoc","currLoc","isAreaLabelsConsistent","geomGraph","computeEdgeEndLabels","getBoundaryNodeRule","checkAreaLabelsConsistent","lastEdgeIndex","findIndex","eSearch","getGeometry","computeLabelling","hasDimensionalCollapseEdge","getDegree","insertEdgeEnd","DirectedEdgeStar","_resultAreaEdgeList","_SCANNING_FOR_INCOMING","_LINKING_TO_OUTGOING","getResultAreaEdges","firstOut","incoming","nextOut","nextIn","de0","deLast","quad0","isNorthern","updateLabelling","nodeLabel","prevOut","firstIn","edgeIndex","startDepth","targetLastDepth","nextDepth","endIndex","currDepth","nextDe","mergeSymLabels","findCoveredLineEdges","eLabel","eLoc","OverlayNodeFactory","OrientedCoordinateArray","_orientation","orientation1","orientation2","limit1","limit2","compPt","done1","done2","oca","compareOriented","EdgeList","_ocaMap","edgeColl","findEdgeIndex","findEqualEdge","SegmentIntersector","e0","segIndex0","e1","segIndex1","IntersectionAdder","_hasIntersection","_hasProper","_hasProperInterior","_hasInterior","_properIntersectionPoint","_isSelfIntersection","numIntersections","numInteriorIntersections","numProperIntersections","numTests","isTrivialIntersection","isAdjacentSegments","getProperIntersectionPoint","hasProperInteriorIntersection","getLineIntersector","hasProperIntersection","p00","p01","p10","p11","hasInteriorIntersection","EdgeIntersection","getSegmentIndex","EdgeIntersectionList","Edge","IntersectionMatrix","_matrix","setAll","elements","actualDimensionValue","requiredDimensionSymbol","requiredDimensionSymbols","isIntersects","isDisjoint","isCovers","isCoveredBy","dimensionSymbols","row","col","toDimensionValue","column","isContains","setAtLeast","minimumDimensionSymbols","minimumDimensionValue","setAtLeastIfValid","isWithin","isTouches","dimensionOfGeometryA","dimensionOfGeometryB","isOverlaps","isEquals","builder","ai","bi","toDimensionSymbol","transpose","isCrosses","IntArrayList","initialCapacity","capacity","copyOf","MonotoneChainIndexer","list","getChainStartIndices","startIndexList","OLDgetChainStartIndices","toIntArray","MonotoneChainEdge","mcb","chainIndex","computeIntersectsForChain","chainIndex0","mce","chainIndex1","getStartIndexes","computeIntersects","Depth","NULL_VALUE","depthValue","minDepth","newValue","getDelta","depthAtLocation","_mce","_isIsolated","_depthDelta","getCollapsedEdge","newPts","toLineLabel","setIsolated","setName","isEqualForward","isEqualReverse","iRev","isCollapsed","getMaximumSegmentIndex","getMonotoneChainEdge","isPointwiseEqual","setDepthDelta","getEdgeIntersectionList","BufferBuilder","_workingPrecisionModel","_workingNoder","_geomFact","_graph","lLoc","rLoc","lines","ss","setWorkingPrecisionModel","insertUniqueEdge","existingEdge","existingLabel","labelToMerge","mergeDelta","newDelta","buildSubgraphs","subgraphList","polyBuilder","processedGraphs","subgraph","createSubgraphs","createEmptyResultGeometry","getNoder","noder","bufferSegStrList","computeNodedEdges","oldLabel","setNoder","ScaledNoder","_noder","_scaleFactor","_offsetX","_offsetY","_isScaled","scaleFactor","isIntegerPrecision","rescale","nodedSegmentStrings","roundPts","splitSS","intSegStrings","NodingValidator","_segStrings","checkEndPtVertexIntersections","checkInteriorIntersections","ss0","pts0","checkValid","checkCollapses","checkCollapse","HotPixel","_pt","_originalPt","_ptScaled","_p0Scaled","_p1Scaled","_corner","_safeEnv","initCorners","intersectsScaled","segMinx","segMaxx","segMiny","segMaxy","isOutsidePixelEnv","intersectsToleranceSquare","copyScaled","pScaled","getSafeEnvelope","safeTolerance","SAFE_ENV_EXPANSION_FACTOR","intersectsPixelClosure","intersectsLeft","intersectsBottom","addSnappedNode","segIndex","MonotoneChainSelectAction","selectedSegment","MCIndexPointSnapper","snap","hotPixel","parentEdge","hotPixelVertexIndex","pixelEnv","hotPixelSnapAction","HotPixelSnapAction","isNodeAdded","_hotPixel","_parentEdge","_hotPixelVertexIndex","_isNodeAdded","InteriorIntersectionFinderAdder","_interiorIntersections","getInteriorIntersections","MCIndexSnapRounder","_pm","_pointSnapper","checkCorrectness","inputSegmentStrings","resultSegStrings","nv","printStackTrace","snapRound","intersections","findInteriorIntersections","computeIntersectionSnaps","computeVertexSnaps","intFinderAdder","edge0","snapPts","snapPt","BufferOp","_argGeom","_resultGeometry","_saveException","getResultGeometry","bufOp","maxPrecisionDigits","bufEnvMax","minUnitLog10","bufferFixedPrecision","fixedPM","bufBuilder","bufferReducedPrecision","precDigits","MAX_PRECISION_DIGITS","precisionDigits","sizeBasedScaleFactor","precisionScaleFactor","computeGeometry","bufferOriginalPrecision","argPM","CAP_BUTT","BoundaryNodeRule","isInBoundary","boundaryCount","Mod2BoundaryNodeRule","EndPointBoundaryNodeRule","MultiValentEndPointBoundaryNodeRule","MonoValentEndPointBoundaryNodeRule","MOD2_BOUNDARY_RULE","ENDPOINT_BOUNDARY_RULE","MULTIVALENT_ENDPOINT_BOUNDARY_RULE","MONOVALENT_ENDPOINT_BOUNDARY_RULE","OGC_SFS_BOUNDARY_RULE","PointLocator","_boundaryRule","_isIn","_numBoundaries","boundaryRule","locateInPolygonRing","updateLocationInfo","computeLocation","locateOnPoint","locateOnLineString","locateInPolygon","ml","mpoly","isOnLine","BasicSegmentString","NodingIntersectionFinder","_findAllIntersections","_isCheckEndSegmentsOnly","_keepIntersections","_isInteriorIntersectionsOnly","_interiorIntersection","_intSegments","_intersections","_intersectionCount","finder","setFindAllIntersections","isEnd1","isEnd00","isEnd01","isEnd10","isEnd11","isInteriorVertexIntersection","setInteriorIntersectionsOnly","setKeepIntersections","setCheckEndSegmentsOnly","isCheckEndSegmentsOnly","getIntersectionSegments","getIntersections","findAllIntersections","keepIntersections","isSameSegString","isEndSegment","isInteriorInt","isInteriorVertexInt","isInteriorIntersectionsOnly","FastNodingValidator","_isValid","execute","getErrorMessage","intSegs","EdgeNodingValidator","_nv","toSegmentStrings","GeometryCollectionMapper","_mapOp","mapOp","op","mapped","LineBuilder","_op","_ptLocator","_lineEdgesList","_resultLineList","ptLocator","collectLines","opCode","getGraph","collectLineEdge","collectBoundaryTouchEdge","labelIsolatedLine","targetIndex","getArgGeometry","buildLines","OverlayOp","isResultOfOp","isCoveredByA","labelIsolatedLines","edgesList","INTERSECTION","PointBuilder","_resultPointList","filterCoveredNodeToPoint","isCoveredByLA","extractNonCoveredResultNodes","LineStringSnapper","_snapTolerance","_srcPts","_allowSnappingToSourceVertices","_isClosed","srcLine","snapTolerance","srcPts","snapVertices","srcCoords","srcPt","snapVert","findSnapForVertex","snapTo","snapSegments","distinctPtCount","findSegmentIndexToSnap","snapIndex","setAllowSnappingToSourceVertices","allowSnappingToSourceVertices","GeometrySnapper","_srcGeom","srcGeom","g0","g1","snapGeom","snapper0","snapper1","computeSizeBasedSnapTolerance","fixedSnapTol","computeOverlaySnapTolerance","SNAP_PRECISION_FACTOR","cleanResult","snapToSelf","extractTargetCoordinates","SnapTransformer","snappedGeom","computeSnapTolerance","ringPts","computeMinimumSegmentLength","ptSet","minSegLen","segLen","_snapPts","_isSelfSnap","isSelfSnap","snapLine","snapper","CommonBits","_isFirst","_commonMantissaBitsCount","_commonBits","_commonSignExp","getCommon","numBits","signExpBits","numCommonMostSigMantissaBits","zeroLowerBits","padStr","toBinaryString","bitStr","nBits","prop","num1","num2","getBit","CommonBitsRemover","_commonCoord","_ccFilter","CommonCoordinateFilter","addCommonBits","trans","Translater","removeCommonBits","invCoord","getCommonCoordinate","_commonBitsX","_commonBitsY","xp","yp","SnapOverlayOp","_cbr","overlayOp","UNION","SYMDIFFERENCE","DIFFERENCE","selfSnap","remGeom","prepareResult","prepGeom","SnapIfNeededOverlayOp","isSuccess","savedException","computeIntersections","SweepLineEvent","_xValue","_eventType","_insertEvent","_deleteEventIndex","_obj","insertEvent","INSERT","isDelete","setDeleteEventIndex","deleteEventIndex","getObject","pe","getInsertEvent","isInsert","isSameLabel","ev","getDeleteEventIndex","_includeProper","_recordIsolated","_numIntersections","_bdyNodes","_isDone","_isDoneWhenProperInt","includeProper","recordIsolated","setIsDoneIfProperInt","isDoneWhenProperInt","isBoundaryPointInternal","isBoundaryPoint","setBoundaryNodes","bdyNodes0","bdyNodes1","SimpleMCSweepLineIntersector","events","nOverlaps","prepareEvents","processOverlaps","edges0","edges1","addEdge","edgeSet","ev0","mc0","ev1","mc1","IntervalRTreeNode","_min","getMin","queryMin","queryMax","getMax","NodeComparator","mid2","IntervalRTreeLeafNode","IntervalRTreeBranchNode","_node1","_node2","buildExtent","SortedPackedIntervalRTree","_leaves","buildTree","buildLevel","buildRoot","printNode","LinearComponentExtracter","_lines","_isForcedToLineString","isForcedToLineString","getLines","forceToLineString","setForceToLineString","ArrayListVisitor","IndexedPointInAreaLocator","IntervalIndexedGeometry","rcc","SegmentVisitor","_counter","_isEmpty","addLine","GeometryGraph","_parentGeom","_lineEdgeMap","_boundaryNodeRule","_useBoundaryDeterminationRule","_argIndex","_boundaryNodes","_hasTooFewPoints","_invalidPoint","_areaPtLocator","parentGeom","insertBoundaryPoint","determineBoundary","computeSelfNodes","computeRingSelfNodes","isDoneIfProperInt","esi","createEdgeSetIntersector","isRings","computeAllSegments","addSelfIntersectionNodes","computeSplitEdges","edgelist","computeEdgeIntersections","hasTooFewPoints","insertPoint","addPolygonRing","getInvalidPoint","getBoundaryPoints","coll","addSelfIntersectionNode","lr","cwLeft","cwRight","eiIt","GeometryGraphOperation","_resultPrecisionModel","_arg","setComputationPrecision","_resultGeom","_resultPolyList","geom1","createEmptyResult","MapOp","dim0","dim1","resultDimension","overlayOpCode","geomFact","resultDim","loc0","loc1","cancelDuplicateResultEdges","resultPointList","resultLineList","opcode","replaceCollapsedEdges","newEdges","updateNodeLabelling","computeOverlay","insertUniqueEdges","copyPoints","baseSplitEdges","computeLabelsFromDepths","labelIncompleteNodes","findResultAreaEdges","lineBuilder","pointBuilder","labelIncompleteNode","graphNode","ni","EdgeEndBuilder","createEdgeEndForNext","eiCurr","eiNext","createEdgeEndForPrev","computeEdgeEnds","EdgeEndBundle","_edgeEnds","computeLabelOn","foundInterior","computeLabelSide","computeLabelSides","EdgeEndBundleStar","eb","RelateNode","updateIMFromEdges","RelateNodeFactory","RelateComputer","_im","_isolatedEdges","arg","insertEdgeEnds","computeProperIntersectionIM","intersector","dimA","dimB","hasProper","hasProperInterior","labelIsolatedEdges","thisIndex","labelIsolatedEdge","target","computeDisjointIM","computeIntersectionNodes","copyNodesAndLabels","labelIsolatedNodes","eeBuilder","ee0","ee1","labelNodeEdges","labelIntersectionNodes","labelIsolatedNode","ga","gb","RectangleContains","_rectEnv","rectangle","isContainedInBoundary","isPointContainedInBoundary","isLineStringContainedInBoundary","isLineSegmentContainedInBoundary","RectangleLineIntersector","_diagUp0","_diagUp1","_diagDown0","_diagDown1","rectEnv","segEnv","isSegUpwards","ShortCircuitedGeometryVisitor","applyTo","visit","RectangleIntersects","_rectangle","EnvelopeIntersectsVisitor","ecpVisitor","GeometryContainsPointVisitor","riVisitor","RectangleIntersectsSegmentVisitor","_intersects","elementEnv","_rectSeq","_containsPoint","rectPt","containsPointInPolygon","_rectIntersector","checkIntersectionWithLineStrings","testLine","checkIntersectionWithSegments","seq1","RelateOp","_relate","getIntersectionMatrix","relate","UnionOp","ConnectedInteriorTester","_geomGraph","_disconnectedRingcoord","visitInteriorRing","pt1","findDifferentPoint","intDe","visitLinkedDirectedEdges","visitShellInteriors","mp","setInteriorEdgesInResult","startDe","buildEdgeRings","hasUnvisitedShellEdge","isInteriorsConnected","RelateNodeGraph","nodeIt","eeList","edgeIt","ConsistentAreaTester","_nodeGraph","isNodeEdgeAreaLabelsConsistent","hasDuplicateRings","eeb","isNodeConsistentArea","IndexedNestedRingTester","_rings","_totalEnv","_nestedPt","buildIndex","getNestedPoint","isNonNested","innerRing","innerRingPts","results","searchRing","searchRingPts","innerRingPt","IsValidOp","findPtNotNode","TopologyValidationError","_errorType","errorType","getErrorType","getMessage","errMsg","locStr","ERROR","REPEATED_POINT","HOLE_OUTSIDE_SHELL","NESTED_HOLES","DISCONNECTED_INTERIOR","SELF_INTERSECTION","RING_SELF_INTERSECTION","NESTED_SHELLS","DUPLICATE_RINGS","TOO_FEW_POINTS","INVALID_COORDINATE","RING_NOT_CLOSED","_parentGeometry","_isSelfTouchingRingFormingHoleValid","_validErr","parentGeometry","testCoords","checkInvalidCoordinates","checkHolesNotNested","nestedTester","innerHole","checkConsistentArea","cat","checkShellInsideHole","shellPts","holePts","shellPt","holePt","checkNoSelfIntersectingRings","checkNoSelfIntersectingRing","checkConnectedInteriors","cit","nodeSet","isFirst","checkHolesInShell","isShellEmpty","pir","checkTooFewPoints","getValidationError","checkClosedRing","checkClosedRings","checkShellsNotNested","setSelfTouchingRingFormingHoleValid","checkShellNotNested","polyShell","polyPts","badNestedPt","NodeBase","_subnode","centrex","centrey","subnodeIndex","hasChildren","isPrunable","hasItems","addAllItems","resultItems","getNodeCount","subSize","addAllItemsFromOverlapping","isSearchMatch","visitItems","maxSubDepth","sqd","DoubleBits","exponent","NumW","Qty","Sign","Expo","Mant","Bin","Inf","ExW","CVTFWD","powerOf2","Key","computeKey","dMax","computeQuadLevel","quadSize","getCentre","getPoint","_centrex","_centrey","addEnv","expandEnv","largerNode","insertNode","getSubnodeIndex","getSubnode","createSubnode","sqEnv","childNode","IntervalSize","scaledInterval","MIN_BINARY_EXPONENT","Root","origin","createExpanded","insertContained","isZeroX","isZeroWidth","isZeroY","Quadtree","_minExtent","collectStats","insertEnv","ensureExtent","queryAll","foundItems","posEnv","delX","delY","TaggedLineSegment","getParent","TaggedLineString","_parentLine","_segs","_resultSegs","_minimumSize","parentLine","minimumSize","segs","addToResult","asLineString","extractCoordinates","getResultSize","resultSegsSize","getSegment","getParentCoordinates","getMinimumSize","asLinearRing","getSegments","getResultCoordinates","LineSegmentIndex","querySeg","LineSegmentVisitor","_querySeg","TaggedLineStringSimplifier","_inputIndex","_outputIndex","_line","_linePts","_distanceTolerance","inputIndex","outputIndex","sectionIndex","flatten","newSeg","hasBadIntersection","candidateSeg","hasBadOutputIntersection","hasBadInputIntersection","setDistanceTolerance","distanceTolerance","simplifySection","isValidToSimplify","furthestPtIndex","findFurthestPoint","maxDist","maxIndex","midPt","isInLineSection","TaggedLinesSimplifier","taggedLines","tlss","TopologyPreservingSimplifier","_lineSimplifier","_linestringMap","tss","LineStringMapBuilderFilter","LineStringTransformer","linestringMap","taggedLine","tps","minSize","NoninvertibleTransformationException","AffineTransformation","_m00","_m01","_m02","_m10","_m11","_m12","setToIdentity","matrix","setTransformation","m02","m12","setToTranslation","xShear","yShear","setToShear","setToReflection","theta","rotationInstance","sinTheta","cosTheta","setToRotation","xScale","yScale","setToScale","setToReflectionBasic","c2s2","getInverse","getDeterminant","im00","im10","im01","im11","im02","im12","compose","mp00","mp01","mp02","mp10","mp11","mp12","isIdentity","scaleInstance","getMatrixEntries","rotate","composeBefore","translationInstance","shear","shearInstance","reflectionInstance","GeometricShapeFactory","_precModel","_dim","Dimensions","_nPts","_rotationAngle","createSupercircle","power","recipPow","getMinSize","r4","xyInt","nSegsInOct","xInc","x4","coordTrans","setNumPoints","setBase","base","setRotation","setWidth","createEllipse","xRadius","yRadius","iPt","ang","createSquircle","setEnvelope","setCentre","createArc","startAng","angExtent","angSize","angInc","createArcPolygon","createRectangle","nSide","XsegLen","YsegLen","setHeight","setSize","getBase","union","expandGeometry","bufferOp","geometryToWkt","rectToPolygon","rect","reader","polyString","rectToWKTPolygonString","twoPointsToLineString","pointsToPolygon","ellipse","gsf","distanceBetweenPoints","comparePoints","lesserPoint","greaterPoint","rectangleForSegment","thickness","slope","rectDelta","atan","smooth","smoothed","smoothPoly","oldCoords","newCoords","c0","maybeSplitWall","doors","wallPoly","door","doorPoly","w1","w2","d1","wallDataEqual","flags","dungeonDrawWallDocuments","walls","getEmbeddedCollection","ddWalls","wall","getFlag","makeWallsFromMulti","multi","makeWallsFromPoly","allWalls","splits","geo.maybeSplitWall","split","wallData","numHoles","makeInteriorWalls","makeInvisibleWalls","invisibleWallData","makeDoors","allDoors","doorData","makeSecretDoors","secretDoorData","joinWall","wallDepth","wallSidesTexture","wallSidesTint","wallTint","light","sight","DungeonState","themeAreas","secretDoors","interiorWalls","invisibleWalls","geo.geometryToWkt","startState","journalEntry","serialized","simplified","geo.simplify","wallBreaks","wallDocs","wallDocsStillNeeded","wallsToCreate","foundDoc","wallDoc","idsStillNeeded","idsToDelete","includes","createEmbeddedDocuments","deleteEmbeddedDocuments","makeWalls","setFlag","maybeMigrateJournalEntry","fromString","pages","page","dungeonState","saveToJournalEntry","delete","__filters","setPrototypeOf","__proto__","prototype","hasOwnProperty","assign","gamma","saturation","contrast","brightness","red","green","blue","uniforms","applyFilter","Filter","threshold","defineProperty","enumerable","configurable","_kernels","_blur","_quality","uOffset","Float32Array","_pixelSize","pixelSize","_clamp","isArray","kernels","quality","_frame","getFilterTexture","returnFilterTexture","_updatePadding","padding","reduce","_generateKernels","bloomScale","_resolution","FILTER_RESOLUTION","defaults","blur","resolution","_extractFilter","_blurFilter","bloomTexture","v","_thickness","_angle","lightColor","shadowColor","rotation","lightAlpha","shadowAlpha","_updateTransform","transformX","transformY","DEG_TO_RAD","rgb2hex","hex2rgb","blurXFilter","BlurFilterPass","blurYFilter","blendMode","BLEND_MODES","SCREEN","defaultFilter","AlphaFilter","filterFrame","strength","center","mix","_sliceSize","_slicePixelSize","_sliceInnerSize","_nearest","_scaleMode","_colorMap","nearest","colorMap","_mix","Texture","baseTexture","scaleMode","mipmap","MIPMAP_MODES","OFF","SCALE_MODES","NEAREST","LINEAR","_glTextures","_updateID","emit","updateColorMap","destroy","_","_color","_alpha","_originalColor","_newColor","originalColor","newColor","epsilon","texelSize","F","time","seed","curvature","lineWidth","lineContrast","verticalLine","noise","noiseSize","vignetting","vignettingAlpha","vignettingBlur","O","_tintFilter","shadowOnly","_updateShift","fillMode","TRANSPARENT","average","sampleSize","_slices","_offsets","_sizes","_direction","_canvas","document","createElement","texture","aspect","_randomizeSizes","random","shuffle","_randomizeOffsets","redraw","clearRect","fillStyle","fillRect","displacementMap","slicesWidth","slicesOffset","sinDir","cosDir","ORIGINAL","LOOP","CLAMP","MIRROR","outerStrength","innerStrength","knockout","replace","toFixed","glowColor","parallel","_angleLight","gain","lacunarity","kernelSize","uVelocity","_velocity","ObservablePoint","velocityChanged","setVelocity","velocity","uKernelSize","copyFrom","_replacements","_maxColors","originalColors","targetColors","replacements","R","sepia","scratch","scratchDensity","scratchWidth","getAngleStep","outlineColor","MAX_SAMPLES","MIN_SAMPLES","I","uRadian","uCenter","uRadius","amplitude","waveLength","mirror","boundary","N","wavelength","speed","ambientColor","uLightmap","G","gradientBlur","window","innerHeight","delta","texSize","innerWidth","updateDelta","K","W","tiltShiftXFilter","tiltShiftYFilter","maxKernelSize","getOwnPropertySymbols","propertyIsEnumerable","uStrength","uInnerRadius","innerRadius","AdjustmentFilter","AdvancedBloomFilter","AsciiFilter","BevelFilter","BloomFilter","BulgePinchFilter","CRTFilter","ColorMapFilter","ColorOverlayFilter","ColorReplaceFilter","ConvolutionFilter","CrossHatchFilter","DotFilter","DropShadowFilter","EmbossFilter","GlitchFilter","GlowFilter","GodrayFilter","KawaseBlurFilter","MotionBlurFilter","MultiColorReplaceFilter","OldFilmFilter","OutlineFilter","PixelateFilter","RGBSplitFilter","RadialBlurFilter","ReflectionFilter","ShockwaveFilter","SimpleLightmapFilter","TiltShiftAxisFilter","TiltShiftFilter","TiltShiftXFilter","TiltShiftYFilter","TwistFilter","ZoomBlurFilter","PIXI","filters","maybeStartTextureVideo","source","resource","tagName","loop","muted","video","play","renderPass","container","floorGfx","Graphics","interiorShadowGfx","wallGfx","doorGfx","addExteriorShadow","clipMask","drawMultiPolygonMask","addChild","alphaFilter","blurFilter","BlurFilter","drawMultiPolygonRoom","wallMask","maskConfig","drawInteriorWallShadow","drawInteriorWall","drawInvisibleWallShadow","drawInvisibleWall","drawDoorShadow","drawDoor","secretDoor","drawSecretDoor","drawMultiPolygonWallMask","expandedGeometry","geo.expandGeometry","getTexture","valid","wallTextureRotation","Matrix","IDENTITY","beginTextureFill","flatCoords","flat","drawPolygon","endFill","tint","string2hex","drawThemeAreas","areaState","areaContainer","Container","areaMask","beginFill","geo.pointsToPolygon","path","loadTexture","exteriorShadowGfx","lineStyle","alignment","addExteriorShadowForPoly","exterior","drawPolygonMask","gfx","beginHole","endHole","drawPolygonWallMask","drawPolygonRoom","cap","moveTo","lineTo","doorConfig","totalLength","geo.distanceBetweenPoints","jambFraction","rectEndFraction","jamb1End","rectEnd","doorRect","geo.rectangleForSegment","middle","midRect","midRect2","bezierCurveTo","Dungeon","PlaceableObject","note","history","historyIndex","lastState","resetState","tempContainer","xOffset","grid","yOffset","maskCoords","sizeForcer","Sprite","filename","base64","app","renderer","extract","fetch","blob","file","File","FilePicker","upload","img","draw","savedState","loadFromJournalEntry","pushState","newState","_addDoor","doorProperty","geo.twoPointsToLineString","wallsToDelete","wallsToAdd","geo.contains","geo.lesserPoint","geo.greaterPoint","rectPoly","geo.rectToPolygon","wallsToKeep","geo.intersects","oldState","doorsToKeep","secretDoorsToKeep","geo.union","touches","geo.intersection","_addPoly","_removePoly","difference","geo.isValid","geo.ellipse","getTheme","newArea","areasToKeep","areaPoly","serializer","replacer","cycleReplacer","stack","thisPos","module","exports","spaces","getSerialize","Mash","charCodeAt","uheprng","mash","rawprng","range","string","fromCharCode","hash","args","cleanString","inStr","hashString","initState","addEntropy","Date","getTime","floatBetween","intBetween","randomSeed","_createClass","defineProperties","props","descriptor","writable","Constructor","protoProps","staticProps","_randomSeed2","_randomSeed","__esModule","Random","TypeError","_classCallCheck","rng","int","idx","probability","float","_slicedToArray","arr","_arr","_n","_d","_e","_s","_i","err","sliceIterator","Array2d","default_value","rows","_ref","_ref2","_ref3","_ref4","_ref5","delta_x","_ref6","start_x","start_y","mod","_ref7","delta_y","_ref8","_ref9","_ref10","_ref12","_ref11","size_x","size_y","retv","_ref13","_ref14","_ref16","_ref15","line_h","line_v","Rectangle","_y2","_x2","setValues","extend","pad","bottom","_FACING_TO_STRING","_FACING_TO_MOD","_FACING_INVERSE","_FACING_MOD_RIGHT","_FACING_MOD_LEFT","_defineProperty","TOP","BOTTOM","FACING","FACING_TO_STRING","FACING_TO_MOD","FACING_INVERSE","FACING_MOD_RIGHT","FACING_MOD_LEFT","facing","_const","iter_adjacent","cb","iter_2d","iter_range","fx","fy","pos_1","size_1","pos_2","size_2","array_test","test","shift_left","shift_right","_array2d2","_interopRequireDefault","_array2d","_rectangle2","next_piece_id","Piece","max_exits","tag","perimeter","exits","exit_x","exit_y","iter","is_wall","_ref6$","_this","haswall","exit_adjacent","is_exit","_utils","parent_pos","global_pos","p_from","p_to","_this2","piece","paste_in","_this3","exit","room","start_pos","_get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","getter","_random2","_random","_piece2","_piece","Generator","_Piece","self","ReferenceError","_possibleConstructorReturn","subClass","superClass","_inherits","get_square","piece1","piece1_exit","piece2","piece2_exit","add_exit","ic","remove_perimeter","local_pos","choose","get_perimeter_by_facing","piece2_exit_pos","piece2_pos","fits","join_exits","add_piece","pieces","Room","room_size","symmetric","set_square","_this$get_center_pos","get_center_pos","_this$get_center_pos2","add_perimeter","Corridor","_Room","_room","_generator2","_generator","_corridor2","_corridor","_room2","_Generator","max_iterations","rooms","min_size","max_size","any","max_corridor_length","min_corridor_length","corridor_density","symmetric_rooms","interconnects","max_interconnect_length","room_count","room_tags","corridors","add_to_room","choices","old_room","get_open_pieces","perim","perims","corridor","room2","opts","vec","initial_room","no_rooms","new_room","no_corridors","iterations","new_corridor","added","add_room","add_interconnect","trim","_2dDungeon","require$$0","MAX_INT","NUMBERS","CHARS_LOWER","CHARS_UPPER","HEX_POOL","UnsupportedError","Chance","seedling","mt","mersenne_twister","bimd5","blueimp_md5","initOptions","testRange","errorMessage","RangeError","VERSION","CopyToken","EscapeToken","ReplaceToken","diceFn","natural","btoa","Buffer","input","bool","likelihood","falsy","pool","integer","animal","toLowerCase","pick","character","letters","symbols","casing","numeric","floating","fixed","precision","num_fixed","numerals","exclude","exclusionIndex","sortedExclusions","sortedExclusionIndex","prime","lastPrime","primes","is_prime","targetPrimes","hex","letter","substitute","replacers","chance","tokens","mode","parseTemplate","capitalize","word","mixin","func_name","unique","fn","MAX_DUPLICATES","params","clonedParams","number","pickone","pickset","selected_source_index","new_array","source_indexes","last_source_index","weighted","weights","weightIndex","chosenIdx","selected","total","lastGoodIdx","chosen","paragraph","sentences","sentence_array","sentence","separator","linebreak","words","punctuation","syllable","chr","consonants","vowels","syllables","age","ageRange","birthday","currentYear","getFullYear","setFullYear","year","date","cpf","formatted","cnpj","first","gender","nationality","profession","rank","company","extraGenders","allLastNames","lastNames","israelId","thisDigit","mrz","checkDigit","multipliers","runningTotal","that","passportNumber","dob","getMonth","getDate","expiry","issuer","middle_initial","prefix","suffix","name_prefixes","prefixes","abbreviation","name_prefix","full","HIDN","idn","ssn","ssn_pool","dash","ssnFour","dashes","aadhar","aadhar_pool","whiteSpace","onlyLastFour","separatedByWhiteSpace","name_suffixes","name_suffix","nationalities","android_id","apple_token","wp8_anid2","wp7_anid","guid","bb_pin","avatar","protocol","email","fileExtension","fallback","rating","http","https","pg","mm","identicon","monsterid","wavatar","retro","blank","bmp","gif","jpg","png","md5","gray","delimiter","rgb","hasAlpha","rgbValue","alphaChannel","min_alpha","max_alpha","min_rgb","max_rgb","min_green","max_green","min_blue","max_blue","withHash","symbol","hexstring","isGrayscale","format","min_red","max_red","colorValue","grayscale","domain","tld","fbid","google_analytics","hashtag","ip","ipv6","klout","mac","semver","include_prerelease","prerelease","rpg","tlds","twitter","url","extension","domain_prefix","extensions","port","locale","region","locales","loremPicsum","greyscale","blurred","address","street","altitude","areacode","parens","exampleNumber","city","latitude","longitude","countries","country","raw","geohash","geojson","DDM","DMS","phone","numPick","ukNum","parts","section","sections","mobile","exchange","subscriber","areaCode","mcdu","postal","postcode","code","counties","county","provinces","province","states","us_states_and_dc","territories","armed_forces","short_suffix","street_suffix","street_suffixes","zip","plusfour","ampm","date_string","american","month","daysInMonth","days","day","hour","twentyfour","minute","second","millisecond","hammertime","months","timestamp","weekday","weekdays","weekday_only","cc","to_generate","cc_type","luhn_calculate","cc_types","types","short_name","currency_types","currency","timezones","timezone","currency_pair","returnAsString","currencies","acc","dollar","cents","euro","toLocaleString","exp_year","exp_month","future","month_int","curMonth","curYear","vat","it_vat","iban","cf","name_generator","isLast","return_value","date_generator","range1","range2","evens","checkdigit_generator","pl_pesel","controlNumber","pl_nip","pl_regon","notes","scales","naturals","flats","sharps","all","flatKey","sharpKey","midi_note","chord_quality","chord_qualities","jazz","chord","tempo","coin","d4","d6","d8","d10","d12","d20","d30","d100","thrown","rolls","version","guid_pool","luhn_check","fileName","fileOptions","poolCollectionKey","typeRange","extensionObjectCollection","fileType","firstNames","male","en","nl","fr","female","uk","jp","es","postcodeAreas","ca","locale_languages","locale_regions","country_regions","mx","us","colorNames","raster","vector","abbr","isdst","utc","animals","ocean","desert","grassland","forest","farm","pet","zoo","emotions","o_hasOwnProperty","o_keys","copyObject","_target","_copyArray","_copyObject","mac_address","networkVersion","mac_pool","normal","mean","dev","normal_pool","performanceCounter","radio","fl","tv","emotion","MersenneTwister","BlueImpMD5","MATRIX_A","UPPER_MASK","LOWER_MASK","mti","init_genrand","init_by_array","init_key","key_length","genrand_int32","mag01","kk","genrand_int31","genrand_real1","genrand_real3","genrand_res53","safe_add","lsw","bit_roll","cnt","md5_cmn","md5_ff","md5_gg","md5_hh","md5_ii","binl_md5","olda","oldb","oldc","oldd","binl2rstr","output","rstr2binl","rstr_md5","rstr_hmac_md5","bkey","ipad","opad","rstr2hex","hex_tab","str2rstr_utf8","unescape","encodeURIComponent","raw_md5","hex_md5","raw_hmac_md5","hex_hmac_md5","importScripts","Victor","fromArray","fromObject","addX","addY","addScalar","scalar","addScalarX","addScalarY","subtractX","subtractY","subtractScalar","subtractScalarX","subtractScalarY","divideX","divideY","divideScalar","divideScalarX","divideScalarY","invertX","invertY","invert","multiplyX","multiplyY","multiplyScalar","multiplyScalarX","multiplyScalarY","limit","randomize","topLeft","bottomRight","randomizeX","randomizeY","randomizeAny","unfloat","mixX","amount","mixY","copyX","copyY","zero","dot","vec2","cross","projectOnto","coeff","horizontalAngle","horizontalAngleDeg","radian2degrees","verticalAngle","verticalAngleDeg","angleDeg","nx","ny","rotateDeg","degrees2radian","rotateTo","rotateToDeg","rotateBy","rotateByDeg","distanceX","absDistanceX","distanceY","absDistanceY","distanceSq","lengthSq","isEqualTo","toObject","degrees","rad","deg","root","global","ArrayProto","ObjProto","SymbolProto","supportsArrayBuffer","supportsDataView","DataView","nativeIsArray","nativeKeys","nativeCreate","nativeIsView","isView","_isNaN","_isFinite","hasEnumBug","nonEnumerableProps","MAX_ARRAY_INDEX","restArguments","func","rest","isObject","isUndefined","isBoolean","tagTester","isString","isNumber","isDate","isRegExp","isError","isSymbol","isArrayBuffer","isFunction","nodelist","childNodes","Int8Array","isFunction$1","hasObjectTag","hasStringTagBug","isIE11","isDataView","isDataView$1","getInt8","isArguments","isArguments$1","constant","createSizePropertyCheck","getSizeProperty","collection","sizeProperty","shallowProperty","getByteLength","isBufferLike","typedArrayPattern","isTypedArray$1","collectNonEnumProps","emulatedSet","nonEnumIdx","proto","attrs","_keys","_wrapped","toBufferView","bufferSource","Uint8Array","byteOffset","toJSON","eq","aStack","bStack","deepEq","areArrays","isTypedArray","aCtor","bCtor","allKeys","ie11fingerprint","methods","weakMapMethods","forEachName","commonInit","mapTail","mapMethods","setMethods","isMap","isWeakMap","isSet","isWeakSet","functions","names","createAssigner","keysFunc","extendOwn","baseCreate","Ctor","toPath","deepGet","defaultValue","identity","matcher","optimizeCb","argCount","accumulator","baseIteratee","iteratee","noop","now","createEscaper","escaper","testRegexp","RegExp","replaceRegexp","escapeMap","escape","unescape$1","templateSettings","evaluate","interpolate","noMatch","escapes","escapeRegExp","escapeChar","bareIdentifier","idCounter","executeBound","sourceFunc","boundFunc","callingContext","partial","boundArgs","placeholder","bound","callArgs","isArrayLike","strict","bindAll","delay","wait","setTimeout","defer","predicate","before","times","memo","once","findKey","createPredicateIndexFinder","dir","findLastIndex","sortedIndex","createIndexFinder","predicateFind","each","currentKey","createReduce","reducer","reduceRight","every","some","fromIndex","guard","invoke","contextPath","method","pluck","computed","lastComputed","reStrSymbol","sample","rand","group","behavior","partition","groupBy","indexBy","countBy","pass","keyInObj","omit","without","otherArrays","uniq","isSorted","seen","arrays","unzip","chainResult","_chain","chain","nodeType","pairs","interceptor","_has","accum","oldSettings","argument","variable","hasher","memoize","cache","timeout","previous","later","leading","throttled","_now","remaining","clearTimeout","trailing","cancel","immediate","passed","debounced","_args","wrapper","criteria","_flatten","argsLength","stop","step","allExports","getBoundingBox","containsTile","boundingBox","r1","r2","toJS","Tile","neighbours","setNeighbours","tile","getTileNESW","tiles","nameChance","stage","_rooms","_currentRegion","cardinalDirections","bindStage","givenStage","_seed","_tiles","randBetween","getTile","ne","se","sw","nw","_toJS","_growMaze","startX","startY","lastDir","cells","_startRegion","_carve","cell","unmadeCells","_canCarve","stringifiedCells","carveLoc1","carveLoc2","_addRooms","rectangularity","_oneIn","carveArea","_connectRegions","regionConnections","tileRegions","connections","conn","_removeDeadEnds","cycle","setTile","FRAC","RNG","_c","getSeed","setSeed","getUniform","getUniformInt","lowerBound","upperBound","getNormal","stddev","getPercentage","getWeightedValue","part","getState","setState","RNG$1","Rect","getContainer","setOptions","_options","_ctx","schedule","requestAnimationFrame","font","fontStyle","fontSize","fontFamily","_updateSize","textAlign","textBaseline","bg","eventToPosition","getBoundingClientRect","_normalizedEventToPosition","_spacingX","_spacingY","_canvasCache","clearBefore","_drawWithCache","_drawNoCache","fg","border","ctx","chars","fillText","drawImage","computeSize","availWidth","availHeight","computeFontSize","boxWidth","boxHeight","oldFont","measureText","widthFraction","spacing","charWidth","forceSquareRatio","DIRS","_width","_height","_fillMap","_corridors","getRooms","getCorridors","Feature","doorX","doorY","_x1","_y1","_doors","addDoor","roomWidth","roomHeight","getDoors","clearDoors","addDoors","isWallCallback","debug","canBeDugCallback","digCallback","getCenter","getLeft","getRight","getTop","getBottom","endX","endY","_startX","_startY","_endX","_endY","_endsWithAWall","corridorLength","sx","sy","ok","firstCornerBad","secondCornerBad","createPriorityWalls","priorityWallCallback","FEATURES","addToList","removeFromList","Arena","Uniform","roomDugPercentage","timeLimit","_map","_dug","_roomAttempts","_corridorAttempts","_connected","_unconnected","_digCallback","_canBeDugCallback","_isWallCallback","t1","_generateRooms","_generateCorridors","_generateRoom","createRandom","connected","room1","_closestRoom","_connectRooms","dirIndex1","dirIndex2","center1","center2","diffX","diffY","_placeInWall","_digLine","index2","dirIndex","avail","lastBadIndex","Cellular","born","survive","topology","_dirs","newMap","widthStep","widthStart","cur","ncount","_getNeighbors","_serviceCallback","connect","connectionCallback","allFreeSpace","notConnected","widthStarts","_freeSpace","_pointKey","_findConnected","_getFromTo","local","_tunnelToConnected6","_tunnelToConnected","pp","connectedKeys","notConnectedKeys","_getClosest","space","minPoint","keepNotConnected","tests","xx","pkey","yy","stepWidth","Digger","dugPercentage","_features","_featureAttempts","_walls","_priorityWallCallback","_firstRoom","priorityWalls","_findWall","_getDiggingDirection","featureAttempts","_tryFeature","_removeSurroundingWalls","_addDoors","createRandomCenter","prio1","prio2","featureName","feature","createRandomAt","deltas","EllerMaze","DividedMaze","_stack","_process","_partitionRoom","availX","availY","solid","IceyMaze","regularity","_regularity","blocked","dirs","_randomize","_isFree","Rogue","connectedCells","cellWidth","cellHeight","_calculateRoomSize","_initRooms","_connectUnconnectedRooms","_createRandomRoomConnections","_createRooms","_createCorridors","cellx","celly","ncgx","ncgy","otherRoom","dirToCheck","cgx","cgy","validRoom","cw","directions","dirIdx","newI","newJ","roomw","roomh","cwp","chp","sxOffset","syOffset","jj","_getWallPosition","aRoom","aDirection","rx","ry","_drawCorridor","startPosition","endPosition","tempDist","xDir","yDir","move","xpos","ypos","moves","yAbs","percent","firstHalf","secondHalf","connection","otherWall","generateRotJsCellular","ROT.Map","connectCaves","gridSize","xOff","yOff","smoothing","geo.smooth","generate2DDungeon","TwoDDungeon","minRoomSize","maxRoomSize","centerExits","circularPaths","roomCount","generate","generate2DDungeonDoors","generateDungeoneer","dungeoneer.build","oneSquare","generateDungeoneerDoors","shiftPressed","KeyboardManager","MODIFIER_KEYS","SHIFT","keyboard","isModifierActive","isDown","createDungeonEntry","folder","folders","Folder","JournalEntry","dungeonVersion","createDungeonNote","entryId","iconSize","textAnchor","textColor","iconTint","createDataOffsetPoints","createData","offsetPoints","shape","DungeonLayer","PlaceablesLayer","layerOptions","LAYER_NAME","canDragCreate","zIndex","quadtree","_getNewDrawingData","fillColor","strokeColor","strokeWidth","author","activeDungeonDrawMode","activeDungeonDrawTool","CONST","DRAWING_TYPES","RECTANGLE","bezierFactor","ELLIPSE","undoHistory","confirm","yes","deleteAll","createNewDungeon","algorithm","regenerate","journal","findDungeonEntryAndNote","addChildAt","createDungeonEntryAndNote","loadDungeon","_onClickLeft","createState","originalEvent","isPolygon","destination","shiftKey","getSnappedPosition","gridPrecision","_addPoint","_onClickLeft2","_onDragLeftDrop","isShift","_onDragLeftStart","DrawingDocument","drawing","Drawing","_onDragLeftMove","_destroyed","temporary","_drawTime","FREEHAND_SAMPLE_RATE","onFreeHandMouseDraw","_onMouseDraw","_maybeSnappedRect","snapPos","_maybeSnapLastPoint","_autoClosePolygon","hypot","completePolygon","addSecretDoor","addInteriorWall","addInvisibleWall","placeableClass","normalizeShape","addEllipse","addRectangle","addThemeArea","removeDoors","removeEllipse","removePolygon","removeSecretDoors","removeInteriorWalls","removeInvisibleWalls","removeRectangle","removeThemeAreas","_onDragLeftCancel","GeneratorSheet","changeAlgorithm","algClass","show","not","hide","Keybindings","keybindings","uneditable","modifiers","CONTROL","onDown","onRedo","onUndo","ready","layer","activeLayer","redo","undo","Toolbar","Application","popOut","addRemoveClick","themeSelectChange","controlToolClick","toggleAddClass","toggleRemoveClass","row1","class","isActive","row2","row3","force","updateActiveCss","_element","removeClass","addClass","activeTool","toolbar","DungeonDraw","isTrusted","controls","CONFIG","Canvas","layers","layerClass","visible","controlsVisible","tools","onClick","button","saveToSceneBackground","userId","maybeRefresh","activeControl","Hooks","getSceneControlButtons","canvasReady","updateJournalEntry","renderSceneControls"],"mappings":"AACO,MAAMA,EAAc,eCCpB,MAAMC,EACXC,kBACEC,KAAKC,SAASC,SACZC,EDIsC,qBCFtC,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,iCACzBC,MAAO,QACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDNkC,kBCQlC,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,6BACzBC,MAAO,QACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDd8B,aCgB9B,CACEC,KAAMJ,KAAKK,KAAKC,SAAS,wBACzBC,MAAO,SACPC,SAAS,EACTC,KAAMC,QACNC,QAAQ,EACRC,SAAWC,IAETC,OAAOC,QAAQC,QAAQC,WAAaJ,CAAK,IAI/Cb,KAAKC,SAASC,SACZC,ED9BuC,sBCgCvC,CACEC,KAAM,wCACNG,MAAO,SACPC,QAAS,GACTC,KAAMS,OACNP,QAAQ,IAGZX,KAAKC,SAASC,SACZC,ED1C+B,eC4C/B,CACEC,KAAM,sBACNG,MAAO,SACPC,QAAS,KACTC,KAAMS,OACNP,QAAQ,IAGZX,KAAKC,SAASC,SACZC,EDlDqC,oBCoDrC,CACEC,KAAM,2BACNG,MAAO,SACPC,QAAS,gBACTC,KAAMS,OACNP,QAAQ,GAGb,CAEDZ,6BACE,OAAOC,KAAKC,SAASkB,IACnBhB,EDpEkC,kBCuErC,CAEDJ,oBACE,OAAOC,KAAKC,SAASkB,IACnBhB,EDxE8B,aC2EjC,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iBACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,gBACP,CAACA,KAAM,SACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,yBACP,CAACA,KAAM,UACP,CAACA,KAAM,gBACP,CAACA,KAAM,4BACP,CAACA,KAAM,eACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,QACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,kBACP,CAACA,KAAM,sBACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,aACP,CAACA,KAAM,QACP,CAACA,KAAM,iBACP,CAACA,KAAM,mBACP,CAACA,KAAM,QACP,CAACA,KAAM,cACP,CAACA,KAAM,aACP,CAACA,KAAM,kBACP,CAACA,KAAM,gBACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,iBACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,2BACP,CAACA,KAAM,sBACP,CAACA,KAAM,kBACP,CAACA,KAAM,mBACP,CAACA,KAAM,oBACP,CAACA,KAAM,kBACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,eACP,CAACA,KAAM,iBACP,CAACA,KAAM,qBACP,CAACA,KAAM,gBACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,wBACP,CAACA,KAAM,WACP,CAACA,KAAM,oBACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,mBACP,CAACA,KAAM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AACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,iBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,sBACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,YACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,mBACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,iBACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,aACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,eACP,CAACA,KAAM,UACP,CAACA,KAAM,wBACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,mBACP,CAACA,KAAM,cACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,iBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,YACP,CAACA,KAAM,gBACP,CAACA,KAAM,kBACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,qBACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,UACP,CAACA,KAAM,WACP,CAACA,KAAM,WACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,UACP,CAACA,KAAM,gBACP,CAACA,KAAM,cACP,CAACA,KAAM,SACP,CAACA,KAAM,YACP,CAACA,KAAM,cACP,CAACA,KAAM,WACP,CAACA,KAAM,eACP,CAACA,KAAM,kBACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,aACP,CAACA,KAAM,oBACP,CAACA,KAAM,UACP,CAACA,KAAM,iBACP,CAACA,KAAM,gBACP,CAACA,KAAM,WACP,CAACA,KAAM,cACP,CAACA,KAAM,YACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,WACP,CAACA,KAAM,SACP,CAACA,KAAM,UACP,CAACA,KAAM,aACP,CAACA,KAAM,SACP,CAACA,KAAM,aACP,CAACA,KAAM,QACP,CAACA,KAAM,YACP,CAACA,KAAM,UACP,CAACA,KAAM,6BACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,YACP,CAACA,KAAM,WACP,CAACA,KAAM,aACP,CAACA,KAAM,YACP,CAACA,KAAM,eACP,CAACA,KAAM,aACP,CAACA,KAAM,cACP,CAACA,KAAM,QACP,CAACA,KAAM,WACP,CAACA,KAAM,UACP,CAACA,KAAM,aAGVwtI,iBAAkB,CAChB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAIFC,eAAgB,CACd,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,WACA,cACA,WACA,cACA,SACA,SACA,SACA,SACA,WACA,cACA,WACA,cACA,WACA,cACA,SACA,SACA,SACA,SACA,SACA,QACA,QACA,QACA,QACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,iBACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,cACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,UACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,aACA,aACA,aACA,UACA,aACA,aACA,aACA,aACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,UACA,aACA,QACA,QACA,QACA,UACA,aACA,UACA,aACA,UACA,aACA,QACA,SACA,QACA,QACA,UACA,aACA,aACA,aACA,aACA,UACA,aACA,aACA,aACA,SAGFjH,iBAAkB,CACd,CAACxmI,KAAM,UAAWw+H,aAAc,MAChC,CAACx+H,KAAM,SAAUw+H,aAAc,MAC/B,CAACx+H,KAAM,UAAWw+H,aAAc,MAChC,CAACx+H,KAAM,WAAYw+H,aAAc,MACjC,CAACx+H,KAAM,aAA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,qBACA,eACA,gCACA,aACA,oBACA,2BACA,uBACA,gBACA,kCACA,mBACA,iBACA,aACA,6BACA,qBACA,cACA,sBACA,4BACA,mBACA,8BACA,qCACA,uBACA,wBACA,oBACA,uBACA,6BACA,4BACA,mBACA,kCACA,yBACA,wBACA,gCACA,yBACA,aACA,0BACA,wBACA,aACA,sBACA,8BACA,0BACA,qBACA,8BACA,4BACA,iBACA,sBACA,4BACA,iCACA,0BACA,qBACA,qBACA,4BACA,sBACA,kBACA,gCACA,uBACA,gCACA,oBACA,8BACA,+BACA,kBACA,2BACA,2BACA,wBACA,qBACA,gDACA,8BACA,2CACA,4BACA,gCACA,2BACA,aACA,+BACA,gBACA,oBACA,8BACA,uBACA,mBACA,qBACA,6BACA,8BACA,mBACA,kBACA,YACA,4BACA,iBACA,eACA,oCACA,eACA,kBACA,iBACA,sBACA,4BACA,uBACA,wBACA,8BACA,6BACA,sBACA,qCACA,aACA,cACA,aACA,6BACA,gBACA,eACA,2BACA,qBACA,iBACA,8BACA,uBACA,oCACA,iBACA,YACA,mBACA,WACA,gBACA,6BACA,wBACA,yBACA,gBACA,gBACA,gBACA,2BACA,wBACA,gCACA,yBACA,yCACA,0BACA,kBACA,2BACA,qBACA,mBACA,gBACA,aACA,eACA,iCACA,2BACA,4BACA,kCACA,4BACA,kBACA,uBACA,yBACA,2BACA,mCACA,eACA,yBACA,qCACA,4BACA,0BACA,YACA,iBACA,6BACA,iBACA,YACA,eACA,YACA,wBACA,iCACA,mBACA,mBACA,sBACA,0BACA,cACA,qBACA,kBACA,qBACA,4BACA,eACA,uBACA,qBACA,2BACA,yBACA,mBACA,uBACA,iBACA,qBACA,0BACA,6BACA,2BACA,2BACA,qBACA,0BACA,uBACA,4BACA,WACA,WACA,iCACA,oBACA,iBACA,sCACA,mBACA,wBACA,+BACA,UACA,cACA,sBACA,uBACA,kBACA,2BACA,wBACA,oBACA,sCACA,cACA,uBACA,WACA,sBACA,uBACA,gCACA,wBACA,kBACA,mBACA,uBACA,iCACA,0BACA,0BACA,wBACA,cACA,sBACA,oCACA,sBACA,eACA,2BACA,iCACA,sCACA,8BACA,qBACA,qBACA,8CACA,uBACA,yBACA,6CACA,4BACA,2BACA,sBACA,mCACA,wBACA,4BACA,cACA,mCACA,sBACA,iCACA,mBACA,kCACA,iCACA,oBACA,cACA,uCACA,4BACA,6BACA,yBACA,qBACA,gBACA,aACA,WACA,2BACA,kBACA,gBACA,gBACA,2BACA,sBACA,sBACA,iBACA,0BACA,sCACA,oBACA,sCACA,oBACA,WACA,eACA,mBACA,sCACA,eACA,4BACA,+BACA,2BACA,oBACA,6BACA,+BACA,cACA,+BACA,wBACA,eACA,sBACA,2BACA,8BACA,mBACA,iBACA,4BACA,oCACA,2BACA,uBACA,qCACA,oCACA,gCACA,mCACA,2BACA,6BACA,0BACA,yBACA,0BACA,sBACA,iBACA,sBACA,qBACA,kBACA,uBACA,uCACA,8BACA,eACA,eACA,yCACA,cACA,oCACA,WACA,oCACA,kBACA,mBACA,oBACA,gBACA,qBACA,sBACA,0BACA,iBACA,8BACA,sBACA,gCACA,kBACA,sBACA,+BACA,qBACA,sBACA,gCACA,6BACA,iBACA,eACA,qBACA,cACA,6BACA,eACA,kBACA,6BACA,2BACA,kBACA,yBACA,kBACA,oBACA,oBACA,2BACA,sCACA,oBACA,0BACA,sCACA,kCACA,wCACA,0CACA,uCACA,cACA,gBACA,sBACA,aACA,oCACA,iBACA,0BACA,qBACA,uBACA,gCACA,qBACA,sBACA,uCACA,oBACA,wBACA,2BACA,UACA,kBACA,mBACA,sBACA,cACA,kBACA,yBACA,UACA,gBACA,6BACA,6BACA,0BACA,yBACA,eACA,qBACA,eACA,uBACA,aACA,mCACA,6CACA,2BACA,mCACA,kBACA,uBACA,gBACA,mBACA,kBACA,uBACA,gCACA,qBACA,4BACA,8BACA,qBACA,6BACA,eACA,+BACA,wBACA,qBACA,qBACA,8BACA,oBACA,gCACA,gCACA,wBACA,wBACA,sBACA,2BACA,2BACA,4BACA,yBACA,gCACA,iBACA,wBACA,kBACA,gBACA,2BACA,2BACA,qBACA,8BACA,kCACA,0BACA,gCACA,iCACA,oBACA,wBACA,cACA,cACA,iCACA,qBACA,cACA,oCACA,qBACA,mBACA,mCACA,yBACA,iCACA,uBACA,yBACA,uBACA,2BACA,2BACA,iBACA,+BACA,2BACA,oBACA,8BACA,2BACA,wBACA,kBACA,eACA,uBACA,8BACA,aACA,uBACA,yBACA,wBACA,gBACA,4BACA,qBACA,yBACA,qBACA,sBACA,mCACA,gBACA,iBACA,yBACA,wBACA,uBACA,qBACA,sBACA,0CACA,4BACA,uBACA,2DACA,qCACA,kCACA,qCACA,kBACA,+BACA,mCACA,yBACA,wBACA,6BACA,4BACA,YACA,WACA,eACA,mBACA,gBACA,+BACA,aACA,gCACA,6BACA,6BACA,+BACA,2BACA,uBACA,QACA,mBACA,aACA,cACA,UACA,0BACA,4BACA,mBACA,oBACA,gBACA,kBACA,yBACA,sBACA,mCACA,aACA,eACA,eACA,gBACA,wBACA,YACA,cACA,qBACA,0BACA,qBACA,gBACA,qBACA,0BACA,aACA,gCACA,6BACA,cACA,YACA,aACA,gCACA,wBACA,uBACA,cACA,yBACA,mBACA,gCACA,cACA,uBACA,iBACA,6BACA,6BACA,4BACA,qBACA,eACA,6BACA,cACA,kBACA,qBACA,6BACA,2BACA,eACA,aACA,+BACA,iBACA,gBACA,qBACA,+BACA,wBACA,4BACA,wBACA,sBACA,8BACA,6BACA,oCACA,oBACA,wBACA,kCACA,oCACA,oBACA,0BACA,yBACA,eACA,cACA,gBACA,qBACA,WACA,cACA,2BACA,eACA,0BACA,eACA,iCACA,uBACA,2BACA,sBACA,0BACA,uBACA,4BACA,4BACA,4BACA,wBACA,uCACA,4BACA,oBACA,kBACA,eACA,uBACA,eACA,yBACA,eACA,0BACA,gCACA,gCACA,gCACA,0BACA,+BACA,mBACA,mCACA,4BACA,0BACA,oBACA,gCACA,sBACA,oBACA,wBACA,aACA,uBACA,gBACA,yBACA,cACA,iCACA,eACA,0BACA,uBACA,kBACA,kBACA,WACA,eACA,mBACA,mBACA,oBACA,sBACA,cACA,6BACA,cACA,WACA,kBACA,gBACA,yBACA,cACA,uBACA,kBACA,mBACA,kCACA,yBACA,iBACA,gBACA,kBACA,qBACA,gBACA,aACA,8BACA,mBACA,iBACA,2BACA,oBACA,qBACA,6BACA,2BACA,uBACA,uBACA,2BACA,kBACA,0BACA,uBACA,+BACA,cACA,iBACA,cACA,wBACA,sBACA,mBACA,yBACA,mBACA,wBACA,qBACA,yBACA,qBACA,gBACA,uBACA,eACA,WACA,uBACA,gBACA,qBACA,+BACA,yBACA,gBACA,cACA,iBACA,0CACA,qBACA,6BACA,gBACA,iBACA,mCACA,oCACA,yBACA,iCACA,eACA,4BACA,wBACA,4BACA,cACA,qBACA,gBACA,iCACA,0BACA,0BACA,aACA,gBACA,eACA,wBACA,kBACA,4BACA,gBACA,wBACA,+BACA,eACA,oBACA,+BACA,0BACA,eACA,aACA,yBACA,wBACA,iCACA,cACA,8BACA,6BACA,eACA,iBACA,oBACA,oBACA,oBACA,wBACA,eACA,wBACA,kBACA,kCACA,qBACA,iBACA,gCACA,sBACA,kBACA,yBACA,yBACA,qCACA,sBACA,UACA,WACA,kBACA,eACA,uBACA,kBACA,kBACA,8BACA,4BACA,sBACA,wBACA,qBACA,wBACA,iCACA,4BACA,qBACA,wBACA,kCACA,kCACA,cACA,wBACA,gCACA,gCACA,qBACA,YACA,4BACA,kBACA,uBACA,kBACA,kBACA,2BACA,kBACA,UACA,4BACA,sBACA,mCACA,0BACA,sBACA,+BACA,6BACA,iBACA,aACA,YACA,uBACA,6BACA,sBACA,gCACA,2BACA,2BACA,kBACA,oBACA,uBACA,uBACA,cACA,gCACA,sBACA,iBACA,wBACA,wBACA,sBACA,uBACA,aACA,gCACA,oBACA,gCACA,wBACA,4BACA,yBACA,0BACA,sBACA,4BACA,wBACA,sBACA,mBACA,wBACA,yBACA,6BACA,yBACA,sBACA,wBACA,+BACA,wBACA,kCACA,eACA,6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BACA,yBACA,yBACA,iBACA,iBACA,YACA,YACA,eACA,SACA,aACA,iBACA,UACA,SACA,QACA,SACA,sBACA,mBACA,YACA,0BACA,sBACA,0BACA,cACA,SACA,mBACA,sBACA,qBACA,mBACA,mBACA,mBACA,QACA,sBACA,mBACA,eACA,mBACA,0BACA,0BACA,OACA,oBACA,UACA,qBACA,wBACA,eACA,kBACA,uBACA,eACA,iBACA,iBACA,8BACA,sBACA,qBACA,cACA,mBACA,oBACA,kCACA,0BACA,0BACA,uBACA,sBACA,wBACA,oBACA,oBACA,+BACA,wBACA,uBACA,aACA,6BACA,yBACA,qBACA,aACA,oBACA,sBACA,gBACA,iBACA,kBACA,4BACA,2BACA,2BACA,eACA,SACA,wBACA,mBACA,sBACA,UACA,WACA,kBACA,oBACA,YACA,sBACA,mBACA,YACA,kBACA,WACA,uBACA,oBACA,YACA,yBACA,SACA,sBACA,sBACA,2BACA,uBACA,qBACA,mBACA,sBACA,eACA,wBACA,yBACA,yBACA,2BACA,iBACA,YACA,sBACA,qBACA,sBACA,qBACA,mBACA,yBACA,uBACA,oBACA,gBACA,4BACA,oBACA,oBACA,YACA,cACA,sBACA,qBACA,mBACA,kBACA,kBACA,2BACA,uBACA,sBACA,uBACA,kBACA,qBACA,mBACA,cACA,kBACA,YACA,kBACA,uBACA,gBACA,uBACA,oBACA,eACA,mBACA,iBACA,0BACA,sBACA,mBACA,+BACA,kBACA,iBACA,iBACA,yBACA,gBACA,0BACA,WACA,sBACA,sBACA,uBACA,eACA,qBACA,qBACA,6BACA,sBACA,wBACA,uBACA,cACA,eACA,oBACA,qBACA,eACA,qBACA,qBACA,UACA,wBACA,aACA,mBACA,kBACA,0BACA,wBACA,iBACA,iBACA,sBACA,0BACA,SACA,yBACA,8BACA,kBACA,kBACA,kBACA,sBACA,eACA,WACA,oBACA,sBACA,wBACA,wBACA,mBACA,yBACA,mBACA,mBACA,sBACA,qBACA,oBACA,gBACA,sBACA,WACA,sBACA,cACA,mBACA,oBACA,qBACA,0BACA,eACA,4BACA,gBACA,iBACA,cACA,0BACA,sBACA,WACA,wBACA,qBACA,mBACA,sBACA,WACA,mBACA,qBACA,eACA,wBACA,yBACA,gBACA,iBACA,qBACA,+BACA,qBACA,cACA,qCACA,0BACA,YACA,cACA,kBACA,qBACA,uBACA,qBACA,aACA,eACA,qBACA,YACA,sBACA,YACA,oBACA,aACA,oBACA,sBACA,aACA,oBACA,uBACA,oBACA,YACA,iBACA,uBACA,oBACA,mBACA,WACA,kBACA,mBACA,sBACA,qBACA,uBACA,qBACA,YACA,mBACA,kBACA,kBACA,mBACA,uBACA,yBACA,gBACA,YACA,mBACA,sBACA,+BACA,2BACA,4BACA,oBACA,oBACA,qBACA,wBACA,YACA,2BACA,6BACA,mBACA,2BACA,qBACA,WACA,sBACA,qBACA,uBACA,eACA,kBACA,iBACA,gBACA,0BACA,uBACA,gBACA,kBACA,sBACA,wBACA,oBACA,qBACA,sBACA,oBACA,oBACA,iBACA,SACA,kBACA,yBACA,kBACA,mBACA,gBACA,cACA,qBACA,oBACA,yBACA,iBACA,yBACA,4BACA,4BACA,qBACA,gBACA,uBACA,eACA,gBACA,8BACA,8BACA,8BACA,cACA,WACA,sBACA,iBACA,wBACA,kBACA,kBACA,qBACA,uBACA,iBACA,UACA,+BACA,wBACA,mBACA,sBACA,kBACA,eACA,sBACA,iBACA,cACA,sBACA,kBACA,qBACA,yBACA,eACA,YACA,gBACA,cACA,uBACA,2BACA,kBACA,gBACA,eACA,4BACA,gBACA,qBAEJmR,QAAU,CAERC,MAAU,CAAC,aAAa,UAAU,iBAAiB,WAAW,WAAW,kBAAkB,UAAU,gBAAgB,cAAc,wBAAwB,eAAe,2BAA2B,uBAAuB,oBAAoB,eAAe,uBAAuB,sBAAsB,mBAAmB,WAAW,iBAAiB,YAAY,gBAAgB,OAAO,eAAe,kBAAkB,kBAAkB,WAAW,4BAA4B,cAAc,aAAa,qBAAqB,YAAY,aAAa,uBAAuB,aAAa,qBAAqB,sBAAsB,wBAAw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eACNi4J,QAASp8J,UAAY,IAAIm5J,IAAiBx2J,QAAO,GACjD05J,QAAQ,GAEV,CACE1jK,KAAM,SACNiH,MAAO,uBACPuE,KAAM,aACNi4J,QAAS,KAAM,IAAIh8J,GAAcuC,QAAO,GACxC05J,QAAQ,GAEV,CACE1jK,KAAM,cACNiH,MAAO,sCACPuE,KAAM,sBACN83J,QAAS1jK,KAAKyI,KAAKC,KACnBm7J,QAASp8J,gBACD3G,OAAOC,QAAQA,QAAQgjK,uBAAuB,EAEtDD,QAAQ,GAEV,CACE1jK,KAAM,QACNiH,MAAO,yBACPuE,KAAM,eACN83J,QAAS1jK,KAAKyI,KAAKC,KACnBm7J,QAAS,IAAM/iK,OAAOC,QAAQs8J,YAC9ByG,QAAQ,IAGZb,WAAY,WAEf,CAEDljK,yBAAyBe,SACjBA,EAAOC,QAAQ88J,aACtB,CAED99J,gCAAgCw2G,EAAUxsG,EAAQ/I,EAASgjK,GACrDhkK,KAAKyI,KAAK9B,KAAOq9J,SAEbljK,OAAOC,QAAQA,SAASkjK,aAAa1tD,GAE9C,CAEDx2G,iCAAiCsjK,GACA,gBAA3BA,EAASa,cAKbhB,GAAQ94J,QAAO,SAHP84J,GAAQj6J,OAIjB,EAGHk7J,MAAMhwH,GAAG,OAAQgvH,GAAYruJ,MAC7BqvJ,MAAMhwH,GAAG,QAASgvH,GAAYzB,OAC9ByC,MAAMhwH,GAAG,yBAA0BgvH,GAAYiB,wBAC/CD,MAAMhwH,GAAG,cAAegvH,GAAYkB,aACpCF,MAAMhwH,GAAG,qBAAsBgvH,GAAYmB,oBAC3CH,MAAMhwH,GAAG,sBAAuBgvH,GAAYoB"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 74ebbd0..53ac46d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,6 @@ "packages": { "": { "name": "dungeon-draw", - "version": "1.0.0", "license": "MIT", "dependencies": { "2d-dungeon": "0.0.7", @@ -21,7 +20,7 @@ "husky": "^7.0.4", "npm-run-all": "^4.1.5", "prettier": "^2.5.1", - "rollup": "^2.78.1", + "rollup": "^2.60.2", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-terser": "^7.0.2" } @@ -1471,9 +1470,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -3464,9 +3463,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7"