Herramientas Personales
Usted está aquí: Inicio materias FGII--INICIO EXTRAS ondas.html

ondas.html

ondas.html — HTML, 953Kb

Contenido del Archivo

<!DOCTYPE HTML>
<!-- saved from url=(0025)http://phet.colorado.edu/ -->
<html>
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="phet-sim-level" content="production">

  <!-- metadata for Open Graph protocol -->
  <meta property="og:title" content="&#8234;Wave on a String&#8236; 1.1.5"/>
  <meta property="og:type" content="phet:simulation"/>
  <meta property="og:url" content="http://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string_en.html"/>
  <meta property="og:image" content="http://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string-600.png"/>

  <title>&#8234;Wave on a String&#8236; 1.1.5</title>
</head>
<!--
‪Wave on a String‬ 1.1.5
Copyright 2002-2016, Regents of the University of Colorado
PhET Interactive Simulations, University of Colorado Boulder

This file is licensed under Creative Commons Attribution 4.0
For alternate source code licensing, see https://github.com/phetsims
For licenses for third-party software used by this simulation, see below
For more information, see http://phet.colorado.edu/en/licensing/html

The PhET name and PhET logo are registered trademarks of The Regents of the
University of Colorado. Permission is granted to use the PhET name and PhET logo
only for attribution purposes. Use of the PhET name and/or PhET logo for promotional,
marketing, or advertising purposes requires a separate license agreement from the
University of Colorado. Contact phethelp@colorado.edu regarding licensing.
-->
<body bgcolor="black">
<script type="text/javascript">
  window.phet = {};
  window.phet.chipper = {};
  window.phet.chipper.project = 'wave-on-a-string';
  window.phet.chipper.version = '1.1.5';
  window.phet.chipper.buildTimestamp = '2016-10-09 18:55:06 UTC';
  window.phet.chipper.brand = 'phet';
  window.phet.chipper.locale = 'en';

  // This simulation uses following third-party resources.  The following code block describes each resource
  // and provides its licensing information.  The START and END tags make it easy to automatically parse
  // and the entries are in JSON.  See getLicenseEntry.js for information about the attributes in each entry.
  // ### START THIRD PARTY LICENSE ENTRIES ###
  window.phet.chipper.thirdPartyLicenseEntries = {
  "lib": {
    "almond-0.2.9.js": {
      "text": [
        "Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved."
      ],
      "projectURL": "https://github.com/jrburke/almond",
      "license": "The MIT License",
      "notes": "Allows a RequireJS-based simulation to run in its compiled (smaller, faster) form",
      "licenseText": [
        "MIT License",
        "-----------",
        "",
        "Copyright (c) 2010-2011, The Dojo Foundation",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining a copy",
        "of this software and associated documentation files (the \"Software\"), to deal",
        "in the Software without restriction, including without limitation the rights",
        "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
        "copies of the Software, and to permit persons to whom the Software is",
        "furnished to do so, subject to the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be included in",
        "all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
        "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
        "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
        "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
        "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
        "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
        "THE SOFTWARE."
      ]
    },
    "FileSaver-b8054a2.js": {
      "text": [
        "Copyright (c) 2015 Eli Grey. (http://eligrey.com)"
      ],
      "license": "The MIT License",
      "projectURL": "https://github.com/eligrey/FileSaver.js",
      "notes": "Used for saving screenshot images",
      "licenseText": [
        "Copyright © 2014 Eli Grey.",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
        ""
      ]
    },
    "fontawesome-webfont-3.0.2.svg": {
      "text": [
        "by Dave Gandy"
      ],
      "license": "SIL Open Font License, Version 1.1",
      "projectURL": "https://github.com/FortAwesome/Font-Awesome/tree/v3.0.2",
      "notes": "Provides shapes like the home icon and check box icons, used in FontAwesomeNode",
      "licenseText": [
        "Copyright (c) 2013, Dave Gandy - http://fontawesome.io",
        "with Reserved Font Name Font Awesome.",
        "",
        "This Font Software is licensed under the SIL Open Font License, Version 1.1.",
        "This license is copied below, and is also available with a FAQ at:",
        "http://scripts.sil.org/OFL",
        "",
        "",
        "-----------------------------------------------------------",
        "SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007",
        "-----------------------------------------------------------",
        "",
        "PREAMBLE",
        "The goals of the Open Font License (OFL) are to stimulate worldwide",
        "development of collaborative font projects, to support the font creation",
        "efforts of academic and linguistic communities, and to provide a free and",
        "open framework in which fonts may be shared and improved in partnership",
        "with others.",
        "",
        "The OFL allows the licensed fonts to be used, studied, modified and",
        "redistributed freely as long as they are not sold by themselves. The",
        "fonts, including any derivative works, can be bundled, embedded,",
        "redistributed and/or sold with any software provided that any reserved",
        "names are not used by derivative works. The fonts and derivatives,",
        "however, cannot be released under any other type of license. The",
        "requirement for fonts to remain under this license does not apply",
        "to any document created using the fonts or their derivatives.",
        "",
        "DEFINITIONS",
        "\"Font Software\" refers to the set of files released by the Copyright",
        "Holder(s) under this license and clearly marked as such. This may",
        "include source files, build scripts and documentation.",
        "",
        "\"Reserved Font Name\" refers to any names specified as such after the",
        "copyright statement(s).",
        "",
        "\"Original Version\" refers to the collection of Font Software components as",
        "distributed by the Copyright Holder(s).",
        "",
        "\"Modified Version\" refers to any derivative made by adding to, deleting,",
        "or substituting -- in part or in whole -- any of the components of the",
        "Original Version, by changing formats or by porting the Font Software to a",
        "new environment.",
        "",
        "\"Author\" refers to any designer, engineer, programmer, technical",
        "writer or other person who contributed to the Font Software.",
        "",
        "PERMISSION & CONDITIONS",
        "Permission is hereby granted, free of charge, to any person obtaining",
        "a copy of the Font Software, to use, study, copy, merge, embed, modify,",
        "redistribute, and sell modified and unmodified copies of the Font",
        "Software, subject to the following conditions:",
        "",
        "1) Neither the Font Software nor any of its individual components,",
        "in Original or Modified Versions, may be sold by itself.",
        "",
        "2) Original or Modified Versions of the Font Software may be bundled,",
        "redistributed and/or sold with any software, provided that each copy",
        "contains the above copyright notice and this license. These can be",
        "included either as stand-alone text files, human-readable headers or",
        "in the appropriate machine-readable metadata fields within text or",
        "binary files as long as those fields can be easily viewed by the user.",
        "",
        "3) No Modified Version of the Font Software may use the Reserved Font",
        "Name(s) unless explicit written permission is granted by the corresponding",
        "Copyright Holder. This restriction only applies to the primary font name as",
        "presented to the users.",
        "",
        "4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font",
        "Software shall not be used to promote, endorse or advertise any",
        "Modified Version, except to acknowledge the contribution(s) of the",
        "Copyright Holder(s) and the Author(s) or with their explicit written",
        "permission.",
        "",
        "5) The Font Software, modified or unmodified, in part or in whole,",
        "must be distributed entirely under this license, and must not be",
        "distributed under any other license. The requirement for fonts to",
        "remain under this license does not apply to any document created",
        "using the Font Software.",
        "",
        "TERMINATION",
        "This license becomes null and void if any of the above conditions are",
        "not met.",
        "",
        "DISCLAIMER",
        "THE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
        "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF",
        "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT",
        "OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE",
        "COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,",
        "INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL",
        "DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
        "FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM",
        "OTHER DEALINGS IN THE FONT SOFTWARE.",
        ""
      ]
    },
    "game-up-camera-1.0.0.js": {
      "text": [
        "Copyright (c) BrainPOP"
      ],
      "license": "MIT",
      "projectURL": "https://github.com/phetsims/sherpa/blob/master/lib/game-up-camera-1.0.0.js",
      "notes": "Allows a simulation to return a snapshot to BrainPOP/GameUp/SnapThought",
      "licenseText": [
        "The MIT License (MIT) Copyright (c) 2016 BrainPOP",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
      ]
    },
    "jama-1.0.2": {
      "text": [
        "a basic linear algebra package for Java."
      ],
      "license": "Public Domain",
      "projectURL": "http://math.nist.gov/javanumerics/jama/",
      "notes": "A derived work (certain ported and modified files) is used in Dot, mainly for matrix decompositions. Used in assorted simulations.",
      "licenseText": [
        "Public Domain",
        "",
        "Copyright Notice This software is a cooperative product of The MathWorks and the National Institute of Standards and Technology (NIST) which has been released to the public domain. ",
        "Neither The MathWorks nor NIST assumes any responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic."
      ]
    },
    "jquery-2.1.0.js": {
      "text": [
        "Copyright (c) 2005, 2014 jQuery Foundation, Inc. and other contributors",
        "(includes Sizzle.js, http://sizzlejs.com)"
      ],
      "license": "The MIT License",
      "projectURL": "http://jquery.com",
      "notes": "Facilitates interaction with browser DOM elements, mainly used in Scenery",
      "licenseText": [
        "Copyright 2013 jQuery Foundation and other contributors",
        "http://jquery.com/",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining",
        "a copy of this software and associated documentation files (the",
        "\"Software\"), to deal in the Software without restriction, including",
        "without limitation the rights to use, copy, modify, merge, publish,",
        "distribute, sublicense, and/or sell copies of the Software, and to",
        "permit persons to whom the Software is furnished to do so, subject to",
        "the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be",
        "included in all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
        "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",
        "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
        "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE",
        "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION",
        "OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION",
        "WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
      ]
    },
    "lodash-2.4.1.js": {
      "text": [
        "Copyright (c) 2012-2013 The Dojo Foundation, http://dojofoundation.org>",
        "Based on Underscore.js 1.5.2, http://underscorejs.org/LICENSE",
        "Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors"
      ],
      "license": "The MIT License",
      "projectURL": "http://lodash.com",
      "notes": "Adds common data structure operations such as sorting, grouping, etc.",
      "licenseText": [
        "Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>",
        "Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,",
        "DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining",
        "a copy of this software and associated documentation files (the",
        "\"Software\"), to deal in the Software without restriction, including",
        "without limitation the rights to use, copy, modify, merge, publish,",
        "distribute, sublicense, and/or sell copies of the Software, and to",
        "permit persons to whom the Software is furnished to do so, subject to",
        "the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be",
        "included in all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
        "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",
        "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
        "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE",
        "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION",
        "OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION",
        "WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
      ]
    },
    "pegjs-0.7.0.js": {
      "text": [
        "Copyright (c) 2010-2012 David Majda"
      ],
      "license": "The MIT License",
      "projectURL": "http://pegjs.majda.cz",
      "notes": "Parser Generator for JavaScript. SVG path parsing in Kite",
      "licenseText": [
        "Copyright (c) 2010-2012 David Majda",
        "",
        "Permission is hereby granted, free of charge, to any person",
        "obtaining a copy of this software and associated documentation",
        "files (the \"Software\"), to deal in the Software without",
        "restriction, including without limitation the rights to use,",
        "copy, modify, merge, publish, distribute, sublicense, and/or sell",
        "copies of the Software, and to permit persons to whom the",
        "Software is furnished to do so, subject to the following",
        "conditions:",
        "",
        "The above copyright notice and this permission notice shall be",
        "included in all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
        "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES",
        "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
        "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT",
        "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,",
        "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
        "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR",
        "OTHER DEALINGS IN THE SOFTWARE."
      ]
    },
    "seedrandom-2.4.2.js": {
      "text": [
        "Copyright 2015 David Bau."
      ],
      "license": "MIT",
      "projectURL": "https://github.com/davidbau/seedrandom",
      "notes": "seeded random number generator for Javascript",
      "licenseText": [
        "Copyright 2015 David Bau.",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated",
        "documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the",
        "rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit",
        "persons to whom the Software is furnished to do so, subject to the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the",
        "Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE",
        "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR",
        "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR",
        "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
      ]
    },
    "text-2.0.12.js": {
      "text": [
        "Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved."
      ],
      "license": "The MIT License",
      "projectURL": "http://github.com/requirejs/text",
      "notes": "Loads strings to be displayed in the sim, including internationalized strings.",
      "licenseText": [
        "MIT License",
        "-----------",
        "",
        "Copyright (c) 2010-2011, The Dojo Foundation",
        "",
        "Permission is hereby granted, free of charge, to any person obtaining a copy",
        "of this software and associated documentation files (the \"Software\"), to deal",
        "in the Software without restriction, including without limitation the rights",
        "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
        "copies of the Software, and to permit persons to whom the Software is",
        "furnished to do so, subject to the following conditions:",
        "",
        "The above copyright notice and this permission notice shall be included in",
        "all copies or substantial portions of the Software.",
        "",
        "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
        "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
        "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
        "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
        "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
        "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN",
        "THE SOFTWARE."
      ]
    }
  }
};
  // ### END THIRD PARTY LICENSE ENTRIES ###
  window.phet.chipper.dependencies = {
  "comment": "# wave-on-a-string 1.1.5 Sun Oct 09 2016 12:55:05 GMT-0600 (MDT)",
  "assert": {
    "sha": "7d27130a4d27da15aa7f8a21bbfb9245288c1b44",
    "branch": "HEAD"
  },
  "axon": {
    "sha": "9457f36aec22935c7b5f41a9d0777255dd5d9884",
    "branch": "HEAD"
  },
  "babel": {
    "sha": "30baf37af133e03c510ac3ef56765b4ac0a58dbe",
    "branch": "master"
  },
  "brand": {
    "sha": "d9e64f424ae3ca05f3d10964f5845460a6ccbce6",
    "branch": "HEAD"
  },
  "chipper": {
    "sha": "23ec53efca30d05cabd088a16e25aba17bab9b29",
    "branch": "HEAD"
  },
  "dot": {
    "sha": "da78031b6f080d20bc8346beaa1d37148188371e",
    "branch": "HEAD"
  },
  "joist": {
    "sha": "03847a9af26c31122c6fb38df01fe187b2652856",
    "branch": "HEAD"
  },
  "kite": {
    "sha": "10ca8bf2b2712307ff528352de8451c0c8afe093",
    "branch": "HEAD"
  },
  "phet-core": {
    "sha": "c48bf32035dc5a4ed092ad611012fcbdeb5c6351",
    "branch": "HEAD"
  },
  "phetcommon": {
    "sha": "cf2e05290172e2b192b11f59c805168278373ee1",
    "branch": "HEAD"
  },
  "scenery": {
    "sha": "b34b4fea76b01c9b36a07c83ed6655930143f054",
    "branch": "HEAD"
  },
  "scenery-phet": {
    "sha": "71a9c7634c1c59de38afc9e277154126fbd83256",
    "branch": "HEAD"
  },
  "sherpa": {
    "sha": "b999987ecbc9d23c011e8114f41ea486397c9f1c",
    "branch": "HEAD"
  },
  "sun": {
    "sha": "2b83e994039b2d33845d5e51d7735d144c188d97",
    "branch": "HEAD"
  },
  "tandem": {
    "sha": "2441eec6b422cb20e08682da02ab2bf7bf73250c",
    "branch": "HEAD"
  },
  "wave-on-a-string": {
    "sha": "20c2fc5c2ca2820c9019f7b3a5d3aebb1294b98b",
    "branch": "HEAD"
  }
};
  window.phet.chipper.strings = {"JOIST/HomeButton.name":"‪Home‬","JOIST/adaptedFrom":"‪adapted\nfrom‬","JOIST/termsPrivacyAndLicensing":"‪Terms, Privacy & Licensing‬","JOIST/translation.credits.link":"‪Translation Credits‬","JOIST/thirdParty.credits.link":"‪Third-party Credits‬","JOIST/credits.title":"‪Credits‬","JOIST/credits.leadDesign":"‪Lead Design: {0}‬","JOIST/credits.softwareDevelopment":"‪Software Development: {0}‬","JOIST/credits.team":"‪Team: {0}‬","JOIST/credits.qualityAssurance":"‪Quality Assurance: {0}‬","JOIST/credits.graphicArts":"‪Graphic Arts: {0}‬","JOIST/credits.translation":"‪Translation‬","JOIST/credits.thanks":"‪Thanks‬","JOIST/updates.upToDate":"‪This simulation is up to date.‬","JOIST/updates.outOfDate":"‪New version available‬","JOIST/updates.checking":"‪Checking for updates…‬","JOIST/updates.offline":"‪Unable to check for updates.‬","JOIST/updates.newVersionAvailable":"‪There is a new version available: {0}.‬","JOIST/updates.yourCurrentVersion":"‪Your current version is: {0}.‬","JOIST/updates.getUpdate":"‪Get Update…‬","JOIST/updates.noThanks":"‪No Thanks‬","JOIST/versionPattern":"‪version {0}‬","JOIST/options.title":"‪Options‬","JOIST/showPointers":"‪Show Pointers‬","JOIST/done":"‪Done‬","JOIST/title.settings":"‪Settings‬","JOIST/menuItem.options":"‪Options…‬","JOIST/menuItem.about":"‪About…‬","JOIST/menuItem.mailInputEventsLog":"‪Mail Input Events Log‬","JOIST/menuItem.outputInputEventsLog":"‪Output Input Events Log‬","JOIST/menuItem.phetWebsite":"‪PhET Website…‬","JOIST/menuItem.reportAProblem":"‪Report a Problem…‬","JOIST/menuItem.screenshot":"‪Screenshot‬","JOIST/menuItem.fullscreen":"‪Full Screen‬","JOIST/menuItem.settings":"‪Settings…‬","JOIST/menuItem.getUpdate":"‪Check for Updates…‬","JOIST/menuItem.submitInputEventsLog":"‪Submit Input Events Log‬","JOIST/PhetButton.name":"‪PhET Menu Button‬","JOIST/titlePattern":"‪{0} {1}‬","SCENERY_PHET/ResetAllButton.name":"‪Reset All‬","WAVE_ON_A_STRING/rulers":"‪Rulers‬","WAVE_ON_A_STRING/timer":"‪Timer‬","WAVE_ON_A_STRING/referenceLine":"‪Reference Line‬","WAVE_ON_A_STRING/tension":"‪Tension‬","WAVE_ON_A_STRING/damping":"‪Damping‬","WAVE_ON_A_STRING/low":"‪Low‬","WAVE_ON_A_STRING/high":"‪High‬","WAVE_ON_A_STRING/none":"‪None‬","WAVE_ON_A_STRING/lots":"‪Lots‬","WAVE_ON_A_STRING/frequency":"‪Frequency‬","WAVE_ON_A_STRING/patternValueUnitHz":"‪{0} Hz‬","WAVE_ON_A_STRING/pulseWidth":"‪Pulse Width‬","WAVE_ON_A_STRING/patternValueUnitS":"‪{0} s‬","WAVE_ON_A_STRING/amplitude":"‪Amplitude‬","WAVE_ON_A_STRING/patternValueUnitCm":"‪{0} cm‬","WAVE_ON_A_STRING/restart":"‪Restart‬","WAVE_ON_A_STRING/speedSlow":"‪Slow Motion‬","WAVE_ON_A_STRING/speedNormal":"‪Normal‬","WAVE_ON_A_STRING/manual":"‪Manual‬","WAVE_ON_A_STRING/oscillate":"‪Oscillate‬","WAVE_ON_A_STRING/pulse":"‪Pulse‬","WAVE_ON_A_STRING/fixedEnd":"‪Fixed End‬","WAVE_ON_A_STRING/looseEnd":"‪Loose End‬","WAVE_ON_A_STRING/noEnd":"‪No End‬","WAVE_ON_A_STRING/unitCm":"‪cm‬","WAVE_ON_A_STRING/wave-on-a-string.title":"‪Wave on a String‬"};
</script>
<img id="splash" style="position: absolute;top: 50%;left: 50%;margin-top: -210px;margin-left: -252px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIEls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KDEgMCAwIDEgMTg4LjcwOSAyOTcuODc2KSIgZmlsbD0iI0ZGRkZGRiIgZm9udC1mYW1pbHk9IidUYWhvbWEnIiBmb250LXNpemU9IjI5Ij5Mb2FkaW5nLi4uPC90ZXh0Pgo8L2c+Cjwvc3ZnPgo=">
<script type="text/javascript">window.phet.chipper.mipmaps = {"BRAND/logo-on-white.png":[{width:273,height:108,url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAREAAABsCAYAAABNX4YlAAAAAklEQVR4AewaftIAAAoUSURBVO3BzXWjWBqA4bfugdVdDBMBTATN3ASaiqBVEZS0ZWMpAlkRWLW5W6kjsByBqQRoKoKGDJgFK85hpuq4+1hjWyUk6wek73kQQgghTqIp3KAp3AVCrHEQYoumcANgCgyBHCHWOAixQVO4IXADDHmWIcQaByFeaAo3AqZAxGvfEGKNgxB/aQo3AqZAxGYZQqxxEFevKdwhcAOEbJchxBoHcbWawh0CUyCgJeXXOUKscRBXpyncITAFAnaTIMQLDuIqNIXrAWPgBvDYT4YQLziIi9YUrgeMgRvAo50cCHitQIgXHMRFago3AG6AIeDRTgksgTFvyxDiBQdxUZrCDYApMGQ3GTADFmyWIcQLDuIiNIUbAFNgyO5WwAT4A/B4W678ukSIFxxErzWFGwFTIGI/c2AGPAIem+UI8QYH0UtN4UbAFIjY30j59bIp3Hsg5Oe+IsQbHESvNIU7BD4DEfsrgY/Kr7OmcO+AAdtlCPEGB9EbTeGGwG9AxP4y4JPy67wp3CEwpp0cId7wAdE7TeF6wAD4DES0twJGyq/LpnAj4JGWlF9/QIg3OIjeUX5dAktg2RRuAAyAGyBgs7ny6wnfNYUbAve0lyHEBg6i15Rf58AcmDeFGwKfgSHg8Wyk/HrJd03hesAC8GgvQ4gNHMTFUH6dARkwaQp3APwGfFF+nfHsEQjZTYEQGziInTWFeweMOZyR8uslB6T8egWsWNMU7h0QsrsEITZQiH2MOawFpzEDRsCK3WQIsYFCXA3l1yUwBb4B/wYmQMbPlcqvS4TYwOGF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WNS42/SzQi2T8+ijjz4uh4XEjFbjwHa4rerop/25Ga1iSWyMh3VLKzHCUPJ0bdAdkL1Knq8v9Ja0GgfOFY+TfJ4/9uyNVtQGToVFrSqTmMW0QzQOvFZWqursVOf+rhhV5R4mitJKjPABE/7qXNvcuarVSN5XbK0Pek/WBt1v+BpeNrP5ibfho2S72JOcwZw/4l34gpNavwE4bW7vety1xQAAAABJRU5ErkJggg=="}],"BRAND/logo.png":[{width:273,height:108,url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAREAAABsCAYAAABNX4YlAAAAAklEQVR4AewaftIAAAoUSURBVO3BzXWjWBqA4bfugdVdDBMBTATN3ASaiqBVEZS0ZWMpAlkRWLW5W6kjsByBqQRoKoKGDJgFK85hpuq4+1hjWyUk6wek73kQQgghTqIp3KAp3AVCrHEQYoumcANgCgyBHCHWOAixQVO4IXADDHmWIcQaByFeaAo3AqZAxGvfEGKNgxB/aQo3AqZAxGYZQqxxEFevKdwhcAOEbJchxBoHcbWawh0CUyCgJeXXOUKscRBXpyncITAFAnaTIMQLDuIqNIXrAWPgBvDYT4YQLziIi9YUrgeMgRvAo50cCHitQIgXHMRFago3AG6AIeDRTgksgTFvyxDiBQdxUZrCDYApMGQ3GTADFmyWIcQLDuIiNIUbAFNgyO5WwAT4A/B4W678ukSIFxxErzWFGwFTIGI/c2AGPAIem+UI8QYH0UtN4UbAFIjY30j59bIp3Hsg5Oe+IsQbHESvNIU7BD4DEfsrgY/Kr7OmcO+AAdtlCPEGB9EbTeGGwG9AxP4y4JPy67wp3CEwpp0cId7wAdE7TeF6wAD4DES0twJGyq/LpnAj4JGWlF9/QIg3OIjeUX5dAktg2RRuAAyAGyBgs7ny6wnfNYUbAve0lyHEBg6i15Rf58AcmDeFGwKfgSHg8Wyk/HrJd03hesAC8GgvQ4gNHMTFUH6dARkwaQp3APwGfFF+nfHsEQjZTYEQGziInTWFeweMOZyR8uslB6T8egWsWNMU7h0QsrsEITZQiH2MOawFpzEDRsCK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E6vGLijHb3wfdaiuQ2V3bdC70lCXIheTzBerW78eLWCQWNS42/SzQi2T8+ijjz4uh4XEjFbjwHa4rerop/25Ga1iSWyMh3VLKzHCUPJ0bdAdkL1Knq8v9Ja0GgfOFY+TfJ4/9uyNVtQGToVFrSqTmMW0QzQOvFZWqursVOf+rhhV5R4mitJKjPABE/7qXNvcuarVSN5XbK0Pek/WBt1v+BpeNrP5ibfho2S72JOcwZw/4l34gpNavwE4bW7vety1xQAAAABJRU5ErkJggg=="}]};</script>
<script type="text/javascript">
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ee.type(e);return"function"===n||ee.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(ee.isFunction(t))return ee.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ee.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return ee.filter(t,e,n);t=ee.filter(t,e)}return ee.grep(e,function(e){return U.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=he[e]={};return ee.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){K.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),ee.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=ee.expando+Math.random()}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(be,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:xe.test(n)?ee.parseJSON(n):n}catch(i){}ye.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return K.activeElement}catch(e){}}function p(e,t){return ee.nodeName(e,"table")&&ee.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function m(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),s=ve.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)ee.event.add(t,i,l[i][n])}ye.hasData(e)&&(a=ye.access(e),u=ee.extend({},a),ye.set(t,u))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ee.nodeName(e,t)?ee.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ne.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function x(t,n){var r=ee(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:ee.css(r[0],"display");return r.detach(),i}function b(e){var t=K,n=$e[e];return n||(n=x(e,t),"none"!==n&&n||(We=(We||ee("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=We[0].contentDocument,t.write(),t.close(),n=x(e,t),We.detach()),$e[e]=n),n}function w(e,t,n){var r,i,o,s,a=e.style;return n=n||_e(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||ee.contains(e.ownerDocument,e)||(s=ee.style(e,t)),Ie.test(s)&&Be.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ge.length;i--;)if(t=Ge[i]+n,t in e)return t;return r}function N(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=ee.css(e,n+Te[o],!0,i)),r?("content"===n&&(s-=ee.css(e,"padding"+Te[o],!0,i)),"margin"!==n&&(s-=ee.css(e,"border"+Te[o]+"Width",!0,i))):(s+=ee.css(e,"padding"+Te[o],!0,i),"padding"!==n&&(s+=ee.css(e,"border"+Te[o]+"Width",!0,i)));return s}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=_e(e),s="border-box"===ee.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=w(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ie.test(i))return i;r=s&&(J.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(s?"border":"content"),r,o)+"px"}function D(e,t){for(var n,r,i,o=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(o[s]=ve.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Ce(r)&&(o[s]=ve.access(r,"olddisplay",b(r.nodeName)))):o[s]||(i=Ce(r),(n&&"none"!==n||!i)&&ve.set(r,"olddisplay",i?n:ee.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function j(e,t,n,r,i){return new j.prototype.init(e,t,n,r,i)}function S(){return setTimeout(function(){Qe=void 0}),Qe=ee.now()}function A(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=Te[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function L(e,t,n){for(var r,i=(nt[t]||[]).concat(nt["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,t,e))return r}function q(e,t,n){var r,i,o,s,a,u,l,c=this,f={},p=e.style,d=e.nodeType&&Ce(e),h=ve.get(e,"fxshow");n.queue||(a=ee._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,ee.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=ee.css(e,"display"),"none"===l&&(l=b(e.nodeName)),"inline"===l&&"none"===ee.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Ke.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(d?"hide":"show")){if("show"!==i||!h||void 0===h[r])continue;d=!0}f[r]=h&&h[r]||ee.style(e,r)}if(!ee.isEmptyObject(f)){h?"hidden"in h&&(d=h.hidden):h=ve.access(e,"fxshow",{}),o&&(h.hidden=!d),d?ee(e).show():c.done(function(){ee(e).hide()}),c.done(function(){var t;ve.remove(e,"fxshow");for(t in f)ee.style(e,t,f[t])});for(r in f)s=L(d?h[r]:0,r,c),r in h||(h[r]=s.start,d&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function H(e,t){var n,r,i,o,s;for(n in e)if(r=ee.camelCase(n),i=t[r],o=e[n],ee.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=ee.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,o=0,s=tt.length,a=ee.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qe||S(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:ee.extend({},t),opts:ee.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qe||S(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ee.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(H(c,l.opts.specialEasing);s>o;o++)if(r=tt[o].call(l,e,c,l.opts))return r;return ee.map(c,L,l),ee.isFunction(l.opts.start)&&l.opts.start.call(e,l),ee.fx.timer(ee.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function F(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(de)||[];if(ee.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function P(e,t,n,r){function i(a){var u;return o[a]=!0,ee.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||o[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},s=e===wt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function M(e,t){var n,r,i=ee.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ee.extend(!0,e,r),e}function R(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function W(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function $(e,t,n,r){var i;if(ee.isArray(t))ee.each(t,function(t,i){n||kt.test(e)?r(e,i):$(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ee.type(t))r(e,t);else for(i in t)$(e+"["+i+"]",t[i],n,r)}function B(e){return ee.isWindow(e)?e:9===e.nodeType&&e.defaultView}var I=[],_=I.slice,X=I.concat,z=I.push,U=I.indexOf,V={},Y=V.toString,G=V.hasOwnProperty,Q="".trim,J={},K=e.document,Z="2.1.0",ee=function(e,t){return new ee.fn.init(e,t)},te=/^-ms-/,ne=/-([\da-z])/gi,re=function(e,t){return t.toUpperCase()};ee.fn=ee.prototype={jquery:Z,constructor:ee,selector:"",length:0,toArray:function(){return _.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:_.call(this)},pushStack:function(e){var t=ee.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ee.each(this,e,t)},map:function(e){return this.pushStack(ee.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(_.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:z,sort:I.sort,splice:I.splice},ee.extend=ee.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||ee.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(ee.isPlainObject(r)||(i=ee.isArray(r)))?(i?(i=!1,o=n&&ee.isArray(n)?n:[]):o=n&&ee.isPlainObject(n)?n:{},s[t]=ee.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},ee.extend({expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ee.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isPlainObject:function(e){if("object"!==ee.type(e)||e.nodeType||ee.isWindow(e))return!1;try{if(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?V[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ee.trim(e),e&&(1===e.indexOf("use strict")?(t=K.createElement("script"),t.text=e,K.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,re)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,s=e.length,a=n(e);if(r){if(a)for(;s>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(a)for(;s>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:function(e){return null==e?"":Q.call(e)},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?ee.merge(r,"string"==typeof e?[e]:e):z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:U.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;s>o;o++)r=!t(e[o],o),r!==a&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,s=e.length,a=n(e),u=[];if(a)for(;s>o;o++)i=t(e[o],o,r),null!=i&&u.push(i);else for(o in e)i=t(e[o],o,r),null!=i&&u.push(i);return X.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),ee.isFunction(e)?(r=_.call(arguments,2),i=function(){return e.apply(t||this,r.concat(_.call(arguments)))},i.guid=e.guid=e.guid||ee.guid++,i):void 0},now:Date.now,support:J}),ee.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){V["[object "+t+"]"]=t.toLowerCase()});var ie=function(e){function t(e,t,n,r){var i,o,s,a,u,l,f,h,g,m;if((t?t.ownerDocument||t:$)!==q&&L(t),t=t||q,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(O&&!r){if(i=ye.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&R(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&C.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(s)),n}if(C.qsa&&(!F||!F.test(e))){if(h=f=W,g=t,m=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(l=p(e),(f=t.getAttribute("id"))?h=f.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",u=l.length;u--;)l[u]=h+d(l[u]);g=xe.test(e)&&c(t.parentNode)||t,m=l.join(",")}if(m)try{return Z.apply(n,g.querySelectorAll(m)),n}catch(v){}finally{f||t.removeAttribute("id")}}}return w(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>N.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[W]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)N.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&typeof e.getElementsByTagName!==V&&e}function f(){}function p(e,n){var r,i,o,s,a,u,l,c=X[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=N.preFilter;a;){(!r||(i=le.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=ce.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ue," ")}),a=a.slice(r.length));for(s in N.filter)!(i=he[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):X(e,u).slice(0)}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,u,l=[B,o];if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[W]||(t[W]={}),(a=u[r])&&a[0]===B&&a[1]===o)return l[2]=a[2];if(u[r]=l,l[2]=e(t,n,s))return!0}}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function v(e,t,n,i,o,s){return i&&!i[W]&&(i=v(i)),o&&!o[W]&&(o=v(o,s)),r(function(r,s,a,u){var l,c,f,p=[],d=[],h=s.length,g=r||b(t||"*",a.nodeType?[a]:a,[]),v=!e||!r&&t?g:m(g,p,e,a,u),y=n?o||(r?e:h||i)?[]:s:v;if(n&&n(v,y,a,u),i)for(l=m(y,d),i(l,[],a,u),c=l.length;c--;)(f=l[c])&&(y[d[c]]=!(v[d[c]]=f));if(r){if(o||e){if(o){for(l=[],c=y.length;c--;)(f=y[c])&&l.push(v[c]=f);o(null,y=[],l,u)}for(c=y.length;c--;)(f=y[c])&&(l=o?te.call(r,f):p[c])>-1&&(r[l]=!(s[l]=f))}}else y=m(y===s?y.splice(h,y.length):y),o?o(null,s,y,u):Z.apply(s,y)})}function y(e){for(var t,n,r,i=e.length,o=N.relative[e[0].type],s=o||N.relative[" "],a=o?1:0,u=h(function(e){return e===t},s,!0),l=h(function(e){return te.call(t,e)>-1},s,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>a;a++)if(n=N.relative[e[a].type])c=[h(g(c),n)];else{if(n=N.filter[e[a].type].apply(null,e[a].matches),n[W]){for(r=++a;i>r&&!N.relative[e[r].type];r++);return v(a>1&&g(c),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ue,"$1"),n,r>a&&y(e.slice(a,r)),i>r&&y(e=e.slice(r)),i>r&&d(e))}c.push(n)}return g(c)}function x(e,n){var i=n.length>0,o=e.length>0,s=function(r,s,a,u,l){var c,f,p,d=0,h="0",g=r&&[],v=[],y=j,x=r||o&&N.find.TAG("*",l),b=B+=null==y?1:Math.random()||.1,w=x.length;for(l&&(j=s!==q&&s);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0;p=e[f++];)if(p(c,s,a)){u.push(c);break}l&&(B=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,v,s,a);if(r){if(d>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(u));v=m(v)}Z.apply(u,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&(B=b,j=y),g};return i?r(s):s}function b(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function w(e,t,n,r){var i,o,s,a,u,l=p(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&C.getById&&9===t.nodeType&&O&&N.relative[o[1].type]){if(t=(N.find.ID(s.matches[0].replace(we,Te),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(s=o[i],!N.relative[a=s.type]);)if((u=N.find[a])&&(r=u(s.matches[0].replace(we,Te),xe.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Z.apply(n,r),n;break}}return D(e,l)(r,t,!O,n,xe.test(e)&&c(t.parentNode)||t),n}var T,C,N,k,E,D,j,S,A,L,q,H,O,F,P,M,R,W="sizzle"+-new Date,$=e.document,B=0,I=0,_=n(),X=n(),z=n(),U=function(e,t){return e===t&&(A=!0),0},V="undefined",Y=1<<31,G={}.hasOwnProperty,Q=[],J=Q.pop,K=Q.push,Z=Q.push,ee=Q.slice,te=Q.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=ie.replace("w","w#"),se="\\["+re+"*("+ie+")"+re+"*(?:([*^$|!~]?=)"+re+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+oe+")|)|)"+re+"*\\]",ae=":("+ie+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+se.replace(3,8)+")*)|.*)\\)|)",ue=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),fe=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),pe=new RegExp(ae),de=new RegExp("^"+oe+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+se),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),Te=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(Q=ee.call($.childNodes),$.childNodes),Q[$.childNodes.length].nodeType}catch(Ce){Z={apply:Q.length?function(e,t){K.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:$,r=n.defaultView;return n!==q&&9===n.nodeType&&n.documentElement?(q=n,H=n.documentElement,O=!E(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){L()},!1):r.attachEvent&&r.attachEvent("onunload",function(){L()})),C.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=ve.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),C.getById=i(function(e){return H.appendChild(e).id=W,!n.getElementsByName||!n.getElementsByName(W).length}),C.getById?(N.find.ID=function(e,t){if(typeof t.getElementById!==V&&O){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},N.filter.ID=function(e){var t=e.replace(we,Te);return function(e){return e.getAttribute("id")===t}}):(delete N.find.ID,N.filter.ID=function(e){var t=e.replace(we,Te);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),N.find.TAG=C.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==V?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},N.find.CLASS=C.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==V&&O?t.getElementsByClassName(e):void 0},P=[],F=[],(C.qsa=ve.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&F.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||F.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(C.matchesSelector=ve.test(M=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&i(function(e){C.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),P.push("!=",ae)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(H.compareDocumentPosition),R=t||ve.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return A=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!C.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===$&&R($,e)?-1:t===n||t.ownerDocument===$&&R($,t)?1:S?te.call(S,e)-te.call(S,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var r,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:S?te.call(S,e)-te.call(S,t):0;if(o===a)return s(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)l.unshift(r);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===$?-1:l[i]===$?1:0},n):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&L(e),n=n.replace(fe,"='$1']"),C.matchesSelector&&O&&(!P||!P.test(n))&&(!F||!F.test(n)))try{var r=M.call(e,n);if(r||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&L(e);var n=N.attrHandle[t.toLowerCase()],r=n&&G.call(N.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==r?r:C.attributes||!O?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!C.detectDuplicates,S=!C.sortStable&&e.slice(0),e.sort(U),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},k=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=k(t);return n},N=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,Te),e[3]=(e[4]||e[5]||"").replace(we,Te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return he.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&pe.test(n)&&(t=p(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,Te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&_(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(c=m[W]||(m[W]={}),l=c[e]||[],d=l[0]===B&&l[1],p=l[0]===B&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[B,d,p];break}}else if(y&&(l=(t[W]||(t[W]={}))[e])&&l[0]===B)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++p||(y&&((f[W]||(f[W]={}))[e]=[B,p]),f!==t)););return p-=i,p===r||p%r===0&&p/r>=0}}},PSEUDO:function(e,n){var i,o=N.pseudos[e]||N.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[W]?o(n):o.length>1?(i=[e,e,"",n],N.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=te.call(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=D(e.replace(ue,"$1"));return i[W]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,Te).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return ge.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},N.pseudos.nth=N.pseudos.eq;for(T in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[T]=a(T);for(T in{submit:!0,reset:!0})N.pseudos[T]=u(T);return f.prototype=N.filters=N.pseudos,N.setFilters=new f,D=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=p(e)),n=t.length;n--;)o=y(t[n]),o[W]?r.push(o):i.push(o);o=z(e,x(i,r))}return o},C.sortStable=W.split("").sort(U).join("")===W,C.detectDuplicates=!!A,L(),C.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ee.find=ie,ee.expr=ie.selectors,ee.expr[":"]=ee.expr.pseudos,ee.unique=ie.uniqueSort,ee.text=ie.getText,ee.isXMLDoc=ie.isXML,ee.contains=ie.contains;var oe=ee.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;ee.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ee.find.matchesSelector(r,e)?[r]:[]:ee.find.matches(e,ee.grep(t,function(e){return 1===e.nodeType}))},ee.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(ee(e).filter(function(){for(t=0;n>t;t++)if(ee.contains(i[t],this))return!0}));for(t=0;n>t;t++)ee.find(e,i[t],r);return r=this.pushStack(n>1?ee.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,
r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&oe.test(e)?ee(e):e||[],!1).length}});var ue,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=ee.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ue).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof ee?t[0]:t,ee.merge(this,ee.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),se.test(n[1])&&ee.isPlainObject(t))for(n in t)ee.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=K.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=K,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ee.isFunction(e)?"undefined"!=typeof ue.ready?ue.ready(e):e(ee):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ee.makeArray(e,this))};ce.prototype=ee.fn,ue=ee(K);var fe=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};ee.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ee(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),ee.fn.extend({has:function(e){var t=ee(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(ee.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=oe.test(e)||"string"!=typeof e?ee(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&ee.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ee.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(ee(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ee.unique(ee.merge(this.get(),ee(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ee.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ee.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ee.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ee.dir(e,"nextSibling")},prevAll:function(e){return ee.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ee.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ee.dir(e,"previousSibling",n)},siblings:function(e){return ee.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ee.sibling(e.firstChild)},contents:function(e){return e.contentDocument||ee.merge([],e.childNodes)}},function(e,t){ee.fn[e]=function(n,r){var i=ee.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ee.filter(r,i)),this.length>1&&(pe[e]||ee.unique(i),fe.test(e)&&i.reverse()),this.pushStack(i)}});var de=/\S+/g,he={};ee.Callbacks=function(e){e="string"==typeof e?he[e]||o(e):ee.extend({},e);var t,n,r,i,s,a,u=[],l=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,a=i||0,i=0,s=u.length,r=!0;u&&s>a;a++)if(u[a].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;!function o(t){ee.each(t,function(t,n){var r=ee.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&o(n)})}(arguments),r?s=u.length:t&&(i=n,c(t))}return this},remove:function(){return u&&ee.each(arguments,function(e,t){for(var n;(n=ee.inArray(t,u,n))>-1;)u.splice(n,1),r&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?ee.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},ee.extend({Deferred:function(e){var t=[["resolve","done",ee.Callbacks("once memory"),"resolved"],["reject","fail",ee.Callbacks("once memory"),"rejected"],["notify","progress",ee.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ee.Deferred(function(n){ee.each(t,function(t,o){var s=ee.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ee.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ee.extend(e,r):r}},i={};return r.pipe=r.then,ee.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=_.call(arguments),s=o.length,a=1!==s||e&&ee.isFunction(e.promise)?s:0,u=1===a?e:ee.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?_.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);s>i;i++)o[i]&&ee.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--a;return a||u.resolveWith(r,o),u.promise()}});var ge;ee.fn.ready=function(e){return ee.ready.promise().done(e),this},ee.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ee.readyWait++:ee.ready(!0)},ready:function(e){(e===!0?--ee.readyWait:ee.isReady)||(ee.isReady=!0,e!==!0&&--ee.readyWait>0||(ge.resolveWith(K,[ee]),ee.fn.trigger&&ee(K).trigger("ready").off("ready")))}}),ee.ready.promise=function(t){return ge||(ge=ee.Deferred(),"complete"===K.readyState?setTimeout(ee.ready):(K.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),ge.promise(t)},ee.ready.promise();var me=ee.access=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===ee.type(n)){i=!0;for(a in n)ee.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,ee.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ee(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o};ee.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=ee.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=a.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,ee.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(ee.isEmptyObject(o))ee.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,ee.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(void 0===t)this.cache[o]={};else{ee.isArray(t)?r=t.concat(t.map(ee.camelCase)):(i=ee.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(de)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!ee.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new a,ye=new a,xe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,be=/([A-Z])/g;ee.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),ee.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=ye.get(o),1===o.nodeType&&!ve.get(o,"hasDataAttrs"))){for(n=s.length;n--;)r=s[n].name,0===r.indexOf("data-")&&(r=ee.camelCase(r.slice(5)),u(o,r,i[r]));ve.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){ye.set(this,e)}):me(this,function(t){var n,r=ee.camelCase(e);if(o&&void 0===t){if(n=ye.get(o,e),void 0!==n)return n;if(n=ye.get(o,r),void 0!==n)return n;if(n=u(o,r,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,r);ye.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),ee.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=ve.get(e,t),n&&(!r||ee.isArray(n)?r=ve.access(e,t,ee.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=ee.queue(e,t),r=n.length,i=n.shift(),o=ee._queueHooks(e,t),s=function(){ee.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:ee.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),ee.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ee.queue(this[0],e):void 0===t?this:this.each(function(){var n=ee.queue(this,e,t);ee._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ee.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ee.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ee.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=ve.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var we=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Te=["Top","Right","Bottom","Left"],Ce=function(e,t){return e=t||e,"none"===ee.css(e,"display")||!ee.contains(e.ownerDocument,e)},Ne=/^(?:checkbox|radio)$/i;!function(){var e=K.createDocumentFragment(),t=e.appendChild(K.createElement("div"));t.innerHTML="<input type='radio' checked='checked' name='t'/>",J.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",J.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ke="undefined";J.focusinBubbles="onfocusin"in e;var Ee=/^key/,De=/^(?:mouse|contextmenu)|click/,je=/^(?:focusinfocus|focusoutblur)$/,Se=/^([^.]*)(?:\.(.+)|)$/;ee.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=ee.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return typeof ee!==ke&&ee.event.triggered!==t.type?ee.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],l=t.length;l--;)a=Se.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d&&(f=ee.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ee.event.special[d]||{},c=ee.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ee.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(d,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ee.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.hasData(e)&&ve.get(e);if(m&&(u=m.events)){for(t=(t||"").match(de)||[""],l=t.length;l--;)if(a=Se.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){for(f=ee.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||ee.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)ee.event.remove(e,d+t[l],n,r,!0);ee.isEmptyObject(u)&&(delete m.handle,ve.remove(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,u,l,c,f,p=[r||K],d=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||K,3!==r.nodeType&&8!==r.nodeType&&!je.test(d+ee.event.triggered)&&(d.indexOf(".")>=0&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,t=t[ee.expando]?t:new ee.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ee.makeArray(n,[t]),f=ee.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!ee.isWindow(r)){for(u=f.delegateType||d,je.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||K)&&p.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,c=(ve.get(s,"events")||{})[t.type]&&ve.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&ee.acceptData(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!ee.acceptData(r)||l&&ee.isFunction(r[d])&&!ee.isWindow(r)&&(a=r[l],a&&(r[l]=null),ee.event.triggered=d,r[d](),ee.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=ee.event.fix(e);var t,n,r,i,o,s=[],a=_.call(arguments),u=(ve.get(this,"events")||{})[e.type]||[],l=ee.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=ee.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((ee.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?ee(i,this).index(u)>=0:ee.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||K,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[ee.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=De.test(i)?this.mouseHooks:Ee.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new ee.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=K),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ee.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return ee.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ee.extend(new ee.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ee.event.trigger(i,null,t):ee.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},ee.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},ee.Event=function(e,t){return this instanceof ee.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.getPreventDefault&&e.getPreventDefault()?l:c):this.type=e,t&&ee.extend(this,t),this.timeStamp=e&&e.timeStamp||ee.now(),void(this[ee.expando]=!0)):new ee.Event(e,t)},ee.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},ee.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ee.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!ee.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),J.focusinBubbles||ee.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ee.event.simulate(t,e.target,ee.event.fix(e),!0)};ee.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=ve.access(r,t);i||r.addEventListener(e,n,!0),ve.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=ve.access(r,t)-1;i?ve.access(r,t,i):(r.removeEventListener(e,n,!0),ve.remove(r,t))}}}),ee.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=c;else if(!r)return this;return 1===i&&(o=r,r=function(e){return ee().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=ee.guid++)),this.each(function(){ee.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ee(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){ee.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){ee.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?ee.event.trigger(e,t,n,!0):void 0}});var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Le=/<([\w:]+)/,qe=/<|&#?\w+;/,He=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^$|\/(?:java|ecma)script/i,Pe=/^true\/(.*)/,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Re={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td,ee.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=ee.contains(e.ownerDocument,e);if(!(J.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ee.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;i>r;r++)y(o[r],s[r]);if(t)if(n)for(o=o||v(e),s=s||v(a),r=0,i=o.length;i>r;r++)m(o[r],s[r]);else m(e,a);return s=v(a,"script"),s.length>0&&g(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,l,c=t.createDocumentFragment(),f=[],p=0,d=e.length;d>p;p++)if(i=e[p],i||0===i)if("object"===ee.type(i))ee.merge(f,i.nodeType?[i]:i);else if(qe.test(i)){for(o=o||c.appendChild(t.createElement("div")),s=(Le.exec(i)||["",""])[1].toLowerCase(),a=Re[s]||Re._default,o.innerHTML=a[1]+i.replace(Ae,"<$1></$2>")+a[2],l=a[0];l--;)o=o.lastChild;ee.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(c.textContent="",p=0;i=f[p++];)if((!r||-1===ee.inArray(i,r))&&(u=ee.contains(i.ownerDocument,i),o=v(c.appendChild(i),"script"),u&&g(o),n))for(l=0;i=o[l++];)Fe.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,r,i,o,s,a=ee.event.special,u=0;void 0!==(n=e[u]);u++){if(ee.acceptData(n)&&(o=n[ve.expando],o&&(t=ve.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;void 0!==(i=r[s]);s++)a[i]?ee.event.remove(n,i):ee.removeEvent(n,i,t.handle);ve.cache[o]&&delete ve.cache[o]}delete ye.cache[n[ye.expando]]}}}),ee.fn.extend({text:function(e){return me(this,function(e){return void 0===e?ee.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ee.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ee.cleanData(v(n)),n.parentNode&&(t&&ee.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ee.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ee.clone(this,e,t)})},html:function(e){return me(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!He.test(e)&&!Re[(Le.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ae,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(ee.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,ee.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=X.apply([],e);var n,r,i,o,s,a,u=0,l=this.length,c=this,f=l-1,p=e[0],g=ee.isFunction(p);if(g||l>1&&"string"==typeof p&&!J.checkClone&&Oe.test(p))return this.each(function(n){var r=c.eq(n);g&&(e[0]=p.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=ee.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=ee.map(v(n,"script"),d),o=i.length;l>u;u++)s=n,u!==f&&(s=ee.clone(s,!0,!0),o&&ee.merge(i,v(s,"script"))),t.call(this[u],s,u);if(o)for(a=i[i.length-1].ownerDocument,ee.map(i,h),u=0;o>u;u++)s=i[u],Fe.test(s.type||"")&&!ve.access(s,"globalEval")&&ee.contains(a,s)&&(s.src?ee._evalUrl&&ee._evalUrl(s.src):ee.globalEval(s.textContent.replace(Me,"")))}return this}}),ee.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ee.fn[e]=function(e){for(var n,r=[],i=ee(e),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),ee(i[s])[t](n),z.apply(r,n.get());return this.pushStack(r)}});var We,$e={},Be=/^margin/,Ie=new RegExp("^("+we+")(?!px)[a-z%]+$","i"),_e=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",o.appendChild(s);var t=e.getComputedStyle(a,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(s)}var n,r,i="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",o=K.documentElement,s=K.createElement("div"),a=K.createElement("div");a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",J.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(a),e.getComputedStyle&&ee.extend(J,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=a.appendChild(K.createElement("div"));return n.style.cssText=a.style.cssText=i,n.style.marginRight=n.style.width="0",a.style.width="1px",o.appendChild(s),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(s),a.innerHTML="",t}})}(),ee.swap=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i};var Xe=/^(none|table(?!-c[ea]).+)/,ze=new RegExp("^("+we+")(.*)$","i"),Ue=new RegExp("^([+-])=("+we+")","i"),Ve={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:0,fontWeight:400},Ge=["Webkit","O","Moz","ms"];ee.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=ee.camelCase(t),u=e.style;return t=ee.cssProps[a]||(ee.cssProps[a]=C(u,a)),s=ee.cssHooks[t]||ee.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Ue.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(ee.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||ee.cssNumber[a]||(n+="px"),J.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]="",u[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,s,a=ee.camelCase(t);return t=ee.cssProps[a]||(ee.cssProps[a]=C(e.style,a)),s=ee.cssHooks[t]||ee.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=w(e,t,r)),"normal"===i&&t in Ye&&(i=Ye[t]),""===n||n?(o=parseFloat(i),n===!0||ee.isNumeric(o)?o||0:i):i}}),ee.each(["height","width"],function(e,t){ee.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&Xe.test(ee.css(e,"display"))?ee.swap(e,Ve,function(){return E(e,t,r)}):E(e,t,r):void 0},set:function(e,n,r){var i=r&&_e(e);return N(e,n,r?k(e,t,r,"border-box"===ee.css(e,"boxSizing",!1,i),i):0)}}}),ee.cssHooks.marginRight=T(J.reliableMarginRight,function(e,t){return t?ee.swap(e,{display:"inline-block"},w,[e,"marginRight"]):void 0}),ee.each({margin:"",padding:"",border:"Width"},function(e,t){ee.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Te[r]+t]=o[r]||o[r-2]||o[0];return i}},Be.test(e)||(ee.cssHooks[e+t].set=N)}),ee.fn.extend({css:function(e,t){return me(this,function(e,t,n){var r,i,o={},s=0;if(ee.isArray(t)){for(r=_e(e),i=t.length;i>s;s++)o[t[s]]=ee.css(e,t[s],!1,r);return o}return void 0!==n?ee.style(e,t,n):ee.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?ee(this).show():ee(this).hide()})}}),ee.Tween=j,j.prototype={constructor:j,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ee.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.options.duration?this.pos=t=ee.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ee.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ee.fx.step[e.prop]?ee.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ee.cssProps[e.prop]]||ee.cssHooks[e.prop])?ee.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ee.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ee.fx=j.prototype.init,ee.fx.step={};var Qe,Je,Ke=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+we+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[q],nt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Ze.exec(t),o=i&&i[3]||(ee.cssNumber[e]?"":"px"),s=(ee.cssNumber[e]||"px"!==o&&+r)&&Ze.exec(ee.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,ee.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};ee.Animation=ee.extend(O,{tweener:function(e,t){ee.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),ee.speed=function(e,t,n){var r=e&&"object"==typeof e?ee.extend({},e):{complete:n||!n&&t||ee.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ee.isFunction(t)&&t};return r.duration=ee.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ee.fx.speeds?ee.fx.speeds[r.duration]:ee.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ee.isFunction(r.old)&&r.old.call(this),r.queue&&ee.dequeue(this,r.queue)},r},ee.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ee.isEmptyObject(e),o=ee.speed(t,n,r),s=function(){var t=O(this,ee.extend({},e),o);(i||ve.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ee.timers,s=ve.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&et.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&ee.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ee.timers,s=r?r.length:0;for(n.finish=!0,ee.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ee.each(["toggle","show","hide"],function(e,t){var n=ee.fn[t];ee.fn[t]=function(e,r,i){
return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(A(t,!0),e,r,i)}}),ee.each({slideDown:A("show"),slideUp:A("hide"),slideToggle:A("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ee.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ee.timers=[],ee.fx.tick=function(){var e,t=0,n=ee.timers;for(Qe=ee.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ee.fx.stop(),Qe=void 0},ee.fx.timer=function(e){ee.timers.push(e),e()?ee.fx.start():ee.timers.pop()},ee.fx.interval=13,ee.fx.start=function(){Je||(Je=setInterval(ee.fx.tick,ee.fx.interval))},ee.fx.stop=function(){clearInterval(Je),Je=null},ee.fx.speeds={slow:600,fast:200,_default:400},ee.fn.delay=function(e,t){return e=ee.fx?ee.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=K.createElement("input"),t=K.createElement("select"),n=t.appendChild(K.createElement("option"));e.type="checkbox",J.checkOn=""!==e.value,J.optSelected=n.selected,t.disabled=!0,J.optDisabled=!n.disabled,e=K.createElement("input"),e.value="t",e.type="radio",J.radioValue="t"===e.value}();var rt,it,ot=ee.expr.attrHandle;ee.fn.extend({attr:function(e,t){return me(this,ee.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ee.removeAttr(this,e)})}}),ee.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===ke?ee.prop(e,t,n):(1===o&&ee.isXMLDoc(e)||(t=t.toLowerCase(),r=ee.attrHooks[t]||(ee.expr.match.bool.test(t)?it:rt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=ee.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void ee.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(de);if(o&&1===e.nodeType)for(;n=o[i++];)r=ee.propFix[n]||n,ee.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!J.radioValue&&"radio"===t&&ee.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),it={set:function(e,t,n){return t===!1?ee.removeAttr(e,n):e.setAttribute(n,n),n}},ee.each(ee.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||ee.find.attr;ot[t]=function(e,t,r){var i,o;return r||(o=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=o),i}});var st=/^(?:input|select|textarea|button)$/i;ee.fn.extend({prop:function(e,t){return me(this,ee.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ee.propFix[e]||e]})}}),ee.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!ee.isXMLDoc(e),o&&(t=ee.propFix[t]||t,i=ee.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||st.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),J.optSelected||(ee.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),ee.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ee.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;ee.fn.extend({addClass:function(e){var t,n,r,i,o,s,a="string"==typeof e&&e,u=0,l=this.length;if(ee.isFunction(e))return this.each(function(t){ee(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=ee.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,i,o,s,a=0===arguments.length||"string"==typeof e&&e,u=0,l=this.length;if(ee.isFunction(e))return this.each(function(t){ee(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");s=e?ee.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ee.isFunction(e)?this.each(function(n){ee(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=ee(this),o=e.match(de)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===ke||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(at," ").indexOf(t)>=0)return!0;return!1}});var ut=/\r/g;ee.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ee.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ee(this).val()):e,null==i?i="":"number"==typeof i?i+="":ee.isArray(i)&&(i=ee.map(i,function(e){return null==e?"":e+""})),t=ee.valHooks[this.type]||ee.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ee.valHooks[i.type]||ee.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(ut,""):null==n?"":n)}}}),ee.extend({valHooks:{select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],(n.selected||u===i)&&(J.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ee.nodeName(n.parentNode,"optgroup"))){if(t=ee(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=ee.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=ee.inArray(ee(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ee.each(["radio","checkbox"],function(){ee.valHooks[this]={set:function(e,t){return ee.isArray(t)?e.checked=ee.inArray(ee(e).val(),t)>=0:void 0}},J.checkOn||(ee.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ee.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ee.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ee.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var lt=ee.now(),ct=/\?/;ee.parseJSON=function(e){return JSON.parse(e+"")},ee.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&ee.error("Invalid XML: "+e),t};var ft,pt,dt=/#.*$/,ht=/([?&])_=[^&]*/,gt=/^(.*?):[ \t]*([^\r\n]*)$/gm,mt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,vt=/^(?:GET|HEAD)$/,yt=/^\/\//,xt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bt={},wt={},Tt="*/".concat("*");try{pt=location.href}catch(Ct){pt=K.createElement("a"),pt.href="",pt=pt.href}ft=xt.exec(pt.toLowerCase())||[],ee.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pt,type:"GET",isLocal:mt.test(ft[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ee.parseJSON,"text xml":ee.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?M(M(e,ee.ajaxSettings),t):M(ee.ajaxSettings,e)},ajaxPrefilter:F(bt),ajaxTransport:F(wt),ajax:function(e,t){function n(e,t,n,s){var u,c,v,y,b,T=t;2!==x&&(x=2,a&&clearTimeout(a),r=void 0,o=s||"",w.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=R(f,w,n)),y=W(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(ee.lastModified[i]=b),b=w.getResponseHeader("etag"),b&&(ee.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,v=y.error,u=!v)):(v=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?h.resolveWith(p,[c,T,w]):h.rejectWith(p,[w,T,v]),w.statusCode(m),m=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:v]),g.fireWith(p,[w,T]),l&&(d.trigger("ajaxComplete",[w,f]),--ee.active||ee.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,u,l,c,f=ee.ajaxSetup({},t),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?ee(p):ee.event,h=ee.Deferred(),g=ee.Callbacks("once memory"),m=f.statusCode||{},v={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=gt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||pt)+"").replace(dt,"").replace(yt,ft[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=ee.trim(f.dataType||"*").toLowerCase().match(de)||[""],null==f.crossDomain&&(u=xt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===ft[1]&&u[2]===ft[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(ft[3]||("http:"===ft[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=ee.param(f.data,f.traditional)),P(bt,f,t,w),2===x)return w;l=f.global,l&&0===ee.active++&&ee.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!vt.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(ct.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=ht.test(i)?i.replace(ht,"$1_="+lt++):i+(ct.test(i)?"&":"?")+"_="+lt++)),f.ifModified&&(ee.lastModified[i]&&w.setRequestHeader("If-Modified-Since",ee.lastModified[i]),ee.etag[i]&&w.setRequestHeader("If-None-Match",ee.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Tt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(p,w,f)===!1||2===x))return w.abort();b="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(r=P(wt,f,t,w)){w.readyState=1,l&&d.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(v,n)}catch(T){if(!(2>x))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return ee.get(e,t,n,"json")},getScript:function(e,t){return ee.get(e,void 0,t,"script")}}),ee.each(["get","post"],function(e,t){ee[t]=function(e,n,r,i){return ee.isFunction(n)&&(i=i||r,r=n,n=void 0),ee.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),ee.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ee.fn[t]=function(e){return this.on(t,e)}}),ee._evalUrl=function(e){return ee.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ee.fn.extend({wrapAll:function(e){var t;return ee.isFunction(e)?this.each(function(t){ee(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ee(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ee.isFunction(e)?this.each(function(t){ee(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ee(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ee.isFunction(e);return this.each(function(n){ee(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ee.nodeName(this,"body")||ee(this).replaceWith(this.childNodes)}).end()}}),ee.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},ee.expr.filters.visible=function(e){return!ee.expr.filters.hidden(e)};var Nt=/%20/g,kt=/\[\]$/,Et=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;ee.param=function(e,t){var n,r=[],i=function(e,t){t=ee.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ee.ajaxSettings&&ee.ajaxSettings.traditional),ee.isArray(e)||e.jquery&&!ee.isPlainObject(e))ee.each(e,function(){i(this.name,this.value)});else for(n in e)$(n,e[n],t,i);return r.join("&").replace(Nt,"+")},ee.fn.extend({serialize:function(){return ee.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ee.prop(this,"elements");return e?ee.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ee(this).is(":disabled")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=ee(this).val();return null==n?null:ee.isArray(n)?ee.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}}),ee.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var St=0,At={},Lt={0:200,1223:204},qt=ee.ajaxSettings.xhr();e.ActiveXObject&&ee(e).on("unload",function(){for(var e in At)At[e]()}),J.cors=!!qt&&"withCredentials"in qt,J.ajax=qt=!!qt,ee.ajaxTransport(function(e){var t;return J.cors||qt&&!e.crossDomain?{send:function(n,r){var i,o=e.xhr(),s=++St;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete At[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(Lt[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=At[s]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:void 0}),ee.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ee.globalEval(e),e}}}),ee.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ee.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ee("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),K.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Ht=[],Ot=/(=)\?(?=&|$)|\?\?/;ee.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ht.pop()||ee.expando+"_"+lt++;return this[e]=!0,e}}),ee.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(Ot.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ot.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=ee.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ot,"$1"+i):t.jsonp!==!1&&(t.url+=(ct.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||ee.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ht.push(i)),s&&ee.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),ee.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||K;var r=se.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ee.buildFragment([e],t,i),i&&i.length&&ee(i).remove(),ee.merge([],r.childNodes))};var Ft=ee.fn.load;ee.fn.load=function(e,t,n){if("string"!=typeof e&&Ft)return Ft.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),ee.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&ee.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?ee("<div>").append(ee.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},ee.expr.filters.animated=function(e){return ee.grep(ee.timers,function(t){return e===t.elem}).length};var Pt=e.document.documentElement;ee.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=ee.css(e,"position"),f=ee(e),p={};"static"===c&&(e.style.position="relative"),a=f.offset(),o=ee.css(e,"top"),u=ee.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),ee.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):f.css(p)}},ee.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ee.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;if(o)return t=o.documentElement,ee.contains(t,r)?(typeof r.getBoundingClientRect!==ke&&(i=r.getBoundingClientRect()),n=B(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===ee.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ee.nodeName(e[0],"html")||(r=e.offset()),r.top+=ee.css(e[0],"borderTopWidth",!0),r.left+=ee.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-ee.css(n,"marginTop",!0),left:t.left-r.left-ee.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Pt;e&&!ee.nodeName(e,"html")&&"static"===ee.css(e,"position");)e=e.offsetParent;return e||Pt})}}),ee.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;ee.fn[t]=function(i){return me(this,function(t,i,o){var s=B(t);return void 0===o?s?s[n]:t[i]:void(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o)},t,i,arguments.length,null)}}),ee.each(["top","left"],function(e,t){ee.cssHooks[t]=T(J.pixelPosition,function(e,n){return n?(n=w(e,t),Ie.test(n)?ee(e).position()[t]+"px":n):void 0})}),ee.each({Height:"height",Width:"width"},function(e,t){ee.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ee.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return me(this,function(t,n,r){var i;return ee.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?ee.css(t,n,s):ee.style(t,n,r,s)},t,o?r:void 0,o,null)}})}),ee.fn.size=function(){return this.length},ee.fn.andSelf=ee.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ee});var Mt=e.jQuery,Rt=e.$;return ee.noConflict=function(t){return e.$===ee&&(e.$=Rt),t&&e.jQuery===ee&&(e.jQuery=Mt),ee},typeof t===ke&&(e.jQuery=e.$=ee),ee});
</script>

<script type="text/javascript">
(function(){function n(n,r,t){for(var e=(t||0)-1,u=n?n.length:0;++e<u;)if(n[e]===r)return e;return-1}function r(r,t){var e=typeof t;if(r=r.cache,"boolean"==e||null==t)return r[t]?0:-1;"number"!=e&&"string"!=e&&(e="object");var u="number"==e?t:m+t;return r=(r=r[e])&&r[u],"object"==e?r&&n(r,t)>-1?0:-1:r?0:-1}function t(n){var r=this.cache,t=typeof n;if("boolean"==t||null==n)r[n]=!0;else{"number"!=t&&"string"!=t&&(t="object");var e="number"==t?n:m+n,u=r[t]||(r[t]={});"object"==t?(u[e]||(u[e]=[])).push(n):u[e]=!0}}function e(n){return n.charCodeAt(0)}function u(n,r){for(var t=n.criteria,e=r.criteria,u=-1,o=t.length;++u<o;){var a=t[u],i=e[u];if(a!==i){if(a>i||"undefined"==typeof a)return 1;if(i>a||"undefined"==typeof i)return-1}}return n.index-r.index}function o(n){var r=-1,e=n.length,u=n[0],o=n[e/2|0],a=n[e-1];if(u&&"object"==typeof u&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var i=f();i["false"]=i["null"]=i["true"]=i.undefined=!1;var l=f();for(l.array=n,l.cache=i,l.push=t;++r<e;)l.push(n[r]);return l}function a(n){return"\\"+G[n]}function i(){return h.pop()||[]}function f(){return g.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function l(n){n.length=0,h.length<d&&h.push(n)}function c(n){var r=n.cache;r&&c(r),n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null,g.length<d&&g.push(n)}function p(n,r,t){r||(r=0),"undefined"==typeof t&&(t=n?n.length:0);for(var e=-1,u=t-r||0,o=Array(0>u?0:u);++e<u;)o[e]=n[r+e];return o}function s(t){function h(n){return n&&"object"==typeof n&&!Yt(n)&&Tt.call(n,"__wrapped__")?n:new g(n)}function g(n,r){this.__chain__=!!r,this.__wrapped__=n}function d(n){function r(){if(e){var n=p(e);$t.apply(n,arguments)}if(this instanceof r){var o=J(t.prototype),a=t.apply(o,n||arguments);return Sn(a)?a:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return Xt(r,n),r}function G(n,r,t,e,u){if(t){var o=t(n);if("undefined"!=typeof o)return o}var a=Sn(n);if(!a)return n;var f=Nt.call(n);if(!K[f])return n;var c=Jt[f];switch(f){case F:case B:return new c(+n);case q:case P:return new c(n);case L:return o=c(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o}var s=Yt(n);if(r){var v=!e;e||(e=i()),u||(u=i());for(var h=e.length;h--;)if(e[h]==n)return u[h];o=s?c(n.length):{}}else o=s?p(n):oe({},n);return s&&(Tt.call(n,"index")&&(o.index=n.index),Tt.call(n,"input")&&(o.input=n.input)),r?(e.push(n),u.push(o),(s?Xn:fe)(n,function(n,a){o[a]=G(n,r,t,e,u)}),v&&(l(e),l(u)),o):o}function J(n,r){return Sn(n)?zt(n):{}}function Q(n,r,t){if("function"!=typeof n)return Yr;if("undefined"==typeof r||!("prototype"in n))return n;var e=n.__bindData__;if("undefined"==typeof e&&(Qt.funcNames&&(e=!n.name),e=e||!Qt.funcDecomp,!e)){var u=At.call(n);Qt.funcNames||(e=!O.test(u)),e||(e=I.test(u),Xt(n,e))}if(e===!1||e!==!0&&1&e[1])return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return $r(n,r)}function X(n){function r(){var n=f?a:this;if(u){var h=p(u);$t.apply(h,arguments)}if((o||c)&&(h||(h=p(arguments)),o&&$t.apply(h,o),c&&h.length<i))return e|=16,X([t,s?e:-4&e,h,null,a,i]);if(h||(h=arguments),l&&(t=n[v]),this instanceof r){n=J(t.prototype);var g=t.apply(n,h);return Sn(g)?g:n}return t.apply(n,h)}var t=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],f=1&e,l=2&e,c=4&e,s=8&e,v=t;return Xt(r,n),r}function Y(t,e){var u=-1,a=ln(),i=t?t.length:0,f=i>=b&&a===n,l=[];if(f){var p=o(e);p?(a=r,e=p):f=!1}for(;++u<i;){var s=t[u];a(e,s)<0&&l.push(s)}return f&&c(e),l}function nn(n,r,t,e){for(var u=(e||0)-1,o=n?n.length:0,a=[];++u<o;){var i=n[u];if(i&&"object"==typeof i&&"number"==typeof i.length&&(Yt(i)||vn(i))){r||(i=nn(i,r,t));var f=-1,l=i.length,c=a.length;for(a.length+=l;++f<l;)a[c++]=i[f]}else t||a.push(i)}return a}function rn(n,r,t,e,u,o){if(t){var a=t(n,r);if("undefined"!=typeof a)return!!a}if(n===r)return 0!==n||1/n==1/r;var f=typeof n,c=typeof r;if(!(n!==n||n&&V[f]||r&&V[c]))return!1;if(null==n||null==r)return n===r;var p=Nt.call(n),s=Nt.call(r);if(p==T&&(p=z),s==T&&(s=z),p!=s)return!1;switch(p){case F:case B:return+n==+r;case q:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case L:case P:return n==jt(r)}var v=p==$;if(!v){var h=Tt.call(n,"__wrapped__"),g=Tt.call(r,"__wrapped__");if(h||g)return rn(h?n.__wrapped__:n,g?r.__wrapped__:r,t,e,u,o);if(p!=z)return!1;var y=n.constructor,m=r.constructor;if(y!=m&&!(In(y)&&y instanceof y&&In(m)&&m instanceof m)&&"constructor"in n&&"constructor"in r)return!1}var b=!u;u||(u=i()),o||(o=i());for(var d=u.length;d--;)if(u[d]==n)return o[d]==r;var _=0;if(a=!0,u.push(n),o.push(r),v){if(d=n.length,_=r.length,a=_==d,a||e)for(;_--;){var w=d,j=r[_];if(e)for(;w--&&!(a=rn(n[w],j,t,e,u,o)););else if(!(a=rn(n[_],j,t,e,u,o)))break}}else ie(r,function(r,i,f){return Tt.call(f,i)?(_++,a=Tt.call(n,i)&&rn(n[i],r,t,e,u,o)):void 0}),a&&!e&&ie(n,function(n,r,t){return Tt.call(t,r)?a=--_>-1:void 0});return u.pop(),o.pop(),b&&(l(u),l(o)),a}function tn(n,r,t,e,u){(Yt(r)?Xn:fe)(r,function(r,o){var a,i,f=r,l=n[o];if(r&&((i=Yt(r))||le(r))){for(var c=e.length;c--;)if(a=e[c]==r){l=u[c];break}if(!a){var p;t&&(f=t(l,r),(p="undefined"!=typeof f)&&(l=f)),p||(l=i?Yt(l)?l:[]:le(l)?l:{}),e.push(r),u.push(l),p||tn(l,r,t,e,u)}}else t&&(f=t(l,r),"undefined"==typeof f&&(f=r)),"undefined"!=typeof f&&(l=f);n[o]=l})}function en(n,r){return n+St(Ht()*(r-n+1))}function un(t,e,u){var a=-1,f=ln(),p=t?t.length:0,s=[],v=!e&&p>=b&&f===n,h=u||v?i():s;if(v){var g=o(h);f=r,h=g}for(;++a<p;){var y=t[a],m=u?u(y,a,t):y;(e?!a||h[h.length-1]!==m:f(h,m)<0)&&((u||v)&&h.push(m),s.push(y))}return v?(l(h.array),c(h)):u&&l(h),s}function on(n){return function(r,t,e){var u={};t=h.createCallback(t,e,3);var o=-1,a=r?r.length:0;if("number"==typeof a)for(;++o<a;){var i=r[o];n(u,i,t(i,o,r),r)}else fe(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function an(n,r,t,e,u,o){var a=1&r,i=2&r,f=4&r,l=16&r,c=32&r;if(!i&&!In(n))throw new kt;l&&!t.length&&(r&=-17,l=t=!1),c&&!e.length&&(r&=-33,c=e=!1);var s=n&&n.__bindData__;if(s&&s!==!0)return s=p(s),s[2]&&(s[2]=p(s[2])),s[3]&&(s[3]=p(s[3])),!a||1&s[1]||(s[4]=u),!a&&1&s[1]&&(r|=8),!f||4&s[1]||(s[5]=o),l&&$t.apply(s[2]||(s[2]=[]),t),c&&Wt.apply(s[3]||(s[3]=[]),e),s[1]|=r,an.apply(null,s);var v=1==r||17===r?d:X;return v([n,r,t,e,u,o])}function fn(n){return re[n]}function ln(){var r=(r=h.indexOf)===br?n:r;return r}function cn(n){return"function"==typeof n&&Rt.test(n)}function pn(n){var r,t;return n&&Nt.call(n)==z&&(r=n.constructor,!In(r)||r instanceof r)?(ie(n,function(n,r){t=r}),"undefined"==typeof t||Tt.call(n,t)):!1}function sn(n){return te[n]}function vn(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Nt.call(n)==T||!1}function hn(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t=r,r=!1),G(n,r,"function"==typeof t&&Q(t,e,1))}function gn(n,r,t){return G(n,!0,"function"==typeof r&&Q(r,t,1))}function yn(n,r){var t=J(n);return r?oe(t,r):t}function mn(n,r,t){var e;return r=h.createCallback(r,t,3),fe(n,function(n,t,u){return r(n,t,u)?(e=t,!1):void 0}),e}function bn(n,r,t){var e;return r=h.createCallback(r,t,3),_n(n,function(n,t,u){return r(n,t,u)?(e=t,!1):void 0}),e}function dn(n,r,t){var e=[];ie(n,function(n,r){e.push(r,n)});var u=e.length;for(r=Q(r,t,3);u--&&r(e[u--],e[u],n)!==!1;);return n}function _n(n,r,t){var e=ne(n),u=e.length;for(r=Q(r,t,3);u--;){var o=e[u];if(r(n[o],o,n)===!1)break}return n}function wn(n){var r=[];return ie(n,function(n,t){In(n)&&r.push(t)}),r.sort()}function jn(n,r){return n?Tt.call(n,r):!1}function kn(n){for(var r=-1,t=ne(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function xn(n){return n===!0||n===!1||n&&"object"==typeof n&&Nt.call(n)==F||!1}function Cn(n){return n&&"object"==typeof n&&Nt.call(n)==B||!1}function On(n){return n&&1===n.nodeType||!1}function Nn(n){var r=!0;if(!n)return r;var t=Nt.call(n),e=n.length;return t==$||t==P||t==T||t==z&&"number"==typeof e&&In(n.splice)?!e:(fe(n,function(){return r=!1}),r)}function Rn(n,r,t,e){return rn(n,r,"function"==typeof t&&Q(t,e,2))}function En(n){return Pt(n)&&!Kt(parseFloat(n))}function In(n){return"function"==typeof n}function Sn(n){return!(!n||!V[typeof n])}function An(n){return Tn(n)&&n!=+n}function Dn(n){return null===n}function Tn(n){return"number"==typeof n||n&&"object"==typeof n&&Nt.call(n)==q||!1}function $n(n){return n&&"object"==typeof n&&Nt.call(n)==L||!1}function Fn(n){return"string"==typeof n||n&&"object"==typeof n&&Nt.call(n)==P||!1}function Bn(n){return"undefined"==typeof n}function Wn(n,r,t){var e={};return r=h.createCallback(r,t,3),fe(n,function(n,t,u){e[t]=r(n,t,u)}),e}function qn(n){var r=arguments,t=2;if(!Sn(n))return n;if("number"!=typeof r[2]&&(t=r.length),t>3&&"function"==typeof r[t-2])var e=Q(r[--t-1],r[t--],2);else t>2&&"function"==typeof r[t-1]&&(e=r[--t]);for(var u=p(arguments,1,t),o=-1,a=i(),f=i();++o<t;)tn(n,u[o],e,a,f);return l(a),l(f),n}function zn(n,r,t){var e={};if("function"!=typeof r){var u=[];ie(n,function(n,r){u.push(r)}),u=Y(u,nn(arguments,!0,!1,1));for(var o=-1,a=u.length;++o<a;){var i=u[o];e[i]=n[i]}}else r=h.createCallback(r,t,3),ie(n,function(n,t,u){r(n,t,u)||(e[t]=n)});return e}function Ln(n){for(var r=-1,t=ne(n),e=t.length,u=ht(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u}function Pn(n,r,t){var e={};if("function"!=typeof r)for(var u=-1,o=nn(arguments,!0,!1,1),a=Sn(n)?o.length:0;++u<a;){var i=o[u];i in n&&(e[i]=n[i])}else r=h.createCallback(r,t,3),ie(n,function(n,t,u){r(n,t,u)&&(e[t]=n)});return e}function Kn(n,r,t,e){var u=Yt(n);if(null==t)if(u)t=[];else{var o=n&&n.constructor,a=o&&o.prototype;t=J(a)}return r&&(r=h.createCallback(r,e,4),(u?Xn:fe)(n,function(n,e,u){return r(t,n,e,u)})),t}function Un(n){for(var r=-1,t=ne(n),e=t.length,u=ht(e);++r<e;)u[r]=n[t[r]];return u}function Mn(n){for(var r=arguments,t=-1,e=nn(r,!0,!1,1),u=r[2]&&r[2][r[1]]===n?1:e.length,o=ht(u);++t<u;)o[t]=n[e[t]];return o}function Vn(n,r,t){var e=-1,u=ln(),o=n?n.length:0,a=!1;return t=(0>t?Mt(0,o+t):t)||0,Yt(n)?a=u(n,r,t)>-1:"number"==typeof o?a=(Fn(n)?n.indexOf(r,t):u(n,r,t))>-1:fe(n,function(n){return++e>=t?!(a=n===r):void 0}),a}function Gn(n,r,t){var e=!0;r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o&&(e=!!r(n[u],u,n)););else fe(n,function(n,t,u){return e=!!r(n,t,u)});return e}function Hn(n,r,t){var e=[];r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o;){var a=n[u];r(a,u,n)&&e.push(a)}else fe(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function Jn(n,r,t){r=h.createCallback(r,t,3);var e=-1,u=n?n.length:0;if("number"!=typeof u){var o;return fe(n,function(n,t,e){return r(n,t,e)?(o=n,!1):void 0}),o}for(;++e<u;){var a=n[e];if(r(a,e,n))return a}}function Qn(n,r,t){var e;return r=h.createCallback(r,t,3),Yn(n,function(n,t,u){return r(n,t,u)?(e=n,!1):void 0}),e}function Xn(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&"undefined"==typeof t?r:Q(r,t,3),"number"==typeof u)for(;++e<u&&r(n[e],e,n)!==!1;);else fe(n,r);return n}function Yn(n,r,t){var e=n?n.length:0;if(r=r&&"undefined"==typeof t?r:Q(r,t,3),"number"==typeof e)for(;e--&&r(n[e],e,n)!==!1;);else{var u=ne(n);e=u.length,fe(n,function(n,t,o){return t=u?u[--e]:--e,r(o[t],t,o)})}return n}function Zn(n,r){var t=p(arguments,2),e=-1,u="function"==typeof r,o=n?n.length:0,a=ht("number"==typeof o?o:0);return Xn(n,function(n){a[++e]=(u?r:n[r]).apply(n,t)}),a}function nr(n,r,t){var e=-1,u=n?n.length:0;if(r=h.createCallback(r,t,3),"number"==typeof u)for(var o=ht(u);++e<u;)o[e]=r(n[e],e,n);else o=[],fe(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function rr(n,r,t){var u=-(1/0),o=u;if("function"!=typeof r&&t&&t[r]===n&&(r=null),null==r&&Yt(n))for(var a=-1,i=n.length;++a<i;){var f=n[a];f>o&&(o=f)}else r=null==r&&Fn(n)?e:h.createCallback(r,t,3),Xn(n,function(n,t,e){var a=r(n,t,e);a>u&&(u=a,o=n)});return o}function tr(n,r,t){var u=1/0,o=u;if("function"!=typeof r&&t&&t[r]===n&&(r=null),null==r&&Yt(n))for(var a=-1,i=n.length;++a<i;){var f=n[a];o>f&&(o=f)}else r=null==r&&Fn(n)?e:h.createCallback(r,t,3),Xn(n,function(n,t,e){var a=r(n,t,e);u>a&&(u=a,o=n)});return o}function er(n,r,t,e){if(!n)return t;var u=arguments.length<3;r=h.createCallback(r,e,4);var o=-1,a=n.length;if("number"==typeof a)for(u&&(t=n[++o]);++o<a;)t=r(t,n[o],o,n);else fe(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)});return t}function ur(n,r,t,e){var u=arguments.length<3;return r=h.createCallback(r,e,4),Yn(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)}),t}function or(n,r,t){return r=h.createCallback(r,t,3),Hn(n,function(n,t,e){return!r(n,t,e)})}function ar(n,r,t){if(n&&"number"!=typeof n.length&&(n=Un(n)),null==r||t)return n?n[en(0,n.length-1)]:v;var e=ir(n);return e.length=Vt(Mt(0,r),e.length),e}function ir(n){var r=-1,t=n?n.length:0,e=ht("number"==typeof t?t:0);return Xn(n,function(n){var t=en(0,++r);e[r]=e[t],e[t]=n}),e}function fr(n){var r=n?n.length:0;return"number"==typeof r?r:ne(n).length}function lr(n,r,t){var e;r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o&&!(e=r(n[u],u,n)););else fe(n,function(n,t,u){return!(e=r(n,t,u))});return!!e}function cr(n,r,t){var e=-1,o=Yt(r),a=n?n.length:0,p=ht("number"==typeof a?a:0);for(o||(r=h.createCallback(r,t,3)),Xn(n,function(n,t,u){var a=p[++e]=f();o?a.criteria=nr(r,function(r){return n[r]}):(a.criteria=i())[0]=r(n,t,u),a.index=e,a.value=n}),a=p.length,p.sort(u);a--;){var s=p[a];p[a]=s.value,o||l(s.criteria),c(s)}return p}function pr(n){return n&&"number"==typeof n.length?p(n):Un(n)}function sr(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e}function vr(n){return Y(n,nn(arguments,!0,!0,1))}function hr(n,r,t){var e=-1,u=n?n.length:0;for(r=h.createCallback(r,t,3);++e<u;)if(r(n[e],e,n))return e;return-1}function gr(n,r,t){var e=n?n.length:0;for(r=h.createCallback(r,t,3);e--;)if(r(n[e],e,n))return e;return-1}function yr(n,r,t){var e=0,u=n?n.length:0;if("number"!=typeof r&&null!=r){var o=-1;for(r=h.createCallback(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:v;return p(n,0,Vt(Mt(0,e),u))}function mr(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t="function"!=typeof r&&e&&e[r]===n?null:r,r=!1),null!=t&&(n=nr(n,t,e)),nn(n,r)}function br(r,t,e){if("number"==typeof e){var u=r?r.length:0;e=0>e?Mt(0,u+e):e||0}else if(e){var o=Nr(r,t);return r[o]===t?o:-1}return n(r,t,e)}function dr(n,r,t){var e=0,u=n?n.length:0;if("number"!=typeof r&&null!=r){var o=u;for(r=h.createCallback(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return p(n,0,Vt(Mt(0,u-e),u))}function _r(){for(var t=[],e=-1,u=arguments.length,a=i(),f=ln(),p=f===n,s=i();++e<u;){var v=arguments[e];(Yt(v)||vn(v))&&(t.push(v),a.push(p&&v.length>=b&&o(e?t[e]:s)))}var h=t[0],g=-1,y=h?h.length:0,m=[];n:for(;++g<y;){var d=a[0];if(v=h[g],(d?r(d,v):f(s,v))<0){for(e=u,(d||s).push(v);--e;)if(d=a[e],(d?r(d,v):f(t[e],v))<0)continue n;m.push(v)}}for(;u--;)d=a[u],d&&c(d);return l(a),l(s),m}function wr(n,r,t){var e=0,u=n?n.length:0;if("number"!=typeof r&&null!=r){var o=u;for(r=h.createCallback(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:v;return p(n,Mt(0,u-e))}function jr(n,r,t){var e=n?n.length:0;for("number"==typeof t&&(e=(0>t?Mt(0,e+t):Vt(t,e-1))+1);e--;)if(n[e]===r)return e;return-1}function kr(n){for(var r=arguments,t=0,e=r.length,u=n?n.length:0;++t<e;)for(var o=-1,a=r[t];++o<u;)n[o]===a&&(Bt.call(n,o--,1),u--);return n}function xr(n,r,t){n=+n||0,t="number"==typeof t?t:+t||1,null==r&&(r=n,n=0);for(var e=-1,u=Mt(0,Et((r-n)/(t||1))),o=ht(u);++e<u;)o[e]=n,n+=t;return o}function Cr(n,r,t){var e=-1,u=n?n.length:0,o=[];for(r=h.createCallback(r,t,3);++e<u;){var a=n[e];r(a,e,n)&&(o.push(a),Bt.call(n,e--,1),u--)}return o}function Or(n,r,t){if("number"!=typeof r&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=h.createCallback(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:Mt(0,r);return p(n,e)}function Nr(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?h.createCallback(t,e,1):Yr,r=t(r);o>u;){var a=u+o>>>1;t(n[a])<r?u=a+1:o=a}return u}function Rr(){return un(nn(arguments,!0,!0))}function Er(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t="function"!=typeof r&&e&&e[r]===n?null:r,r=!1),null!=t&&(t=h.createCallback(t,e,3)),un(n,r,t)}function Ir(n){return Y(n,p(arguments,1))}function Sr(){for(var n=-1,r=arguments.length;++n<r;){var t=arguments[n];if(Yt(t)||vn(t))var e=e?un(Y(e,t).concat(Y(t,e))):t}return e||[]}function Ar(){for(var n=arguments.length>1?arguments:arguments[0],r=-1,t=n?rr(ve(n,"length")):0,e=ht(0>t?0:t);++r<t;)e[r]=ve(n,r);return e}function Dr(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||Yt(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u}function Tr(n,r){if(!In(r))throw new kt;return function(){return--n<1?r.apply(this,arguments):void 0}}function $r(n,r){return arguments.length>2?an(n,17,p(arguments,2),null,r):an(n,1,null,null,r)}function Fr(n){for(var r=arguments.length>1?nn(arguments,!0,!1,1):wn(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=an(n[u],1,null,null,n)}return n}function Br(n,r){return arguments.length>2?an(r,19,p(arguments,2),null,n):an(r,3,null,null,n)}function Wr(){for(var n=arguments,r=n.length;r--;)if(!In(n[r]))throw new kt;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}}function qr(n,r){return r="number"==typeof r?r:+r||n.length,an(n,4,null,null,null,r)}function zr(n,r,t){var e,u,o,a,i,f,l,c=0,p=!1,s=!0;if(!In(n))throw new kt;if(r=Mt(0,r)||0,t===!0){var h=!0;s=!1}else Sn(t)&&(h=t.leading,p="maxWait"in t&&(Mt(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var g=function(){var t=r-(ge()-a);if(0>=t){u&&It(u);var p=l;u=f=l=v,p&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))}else f=Ft(g,t)},y=function(){f&&It(f),u=f=l=v,(s||p!==r)&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))};return function(){if(e=arguments,a=ge(),i=this,l=s&&(f||!h),p===!1)var t=h&&!f;else{u||h||(c=a);var v=p-(a-c),m=0>=v;m?(u&&(u=It(u)),c=a,o=n.apply(i,e)):u||(u=Ft(y,v))}return m&&f?f=It(f):f||r===p||(f=Ft(g,r)),t&&(m=!0,o=n.apply(i,e)),!m||f||u||(e=i=null),o}}function Lr(n){if(!In(n))throw new kt;var r=p(arguments,1);return Ft(function(){n.apply(v,r)},1)}function Pr(n,r){if(!In(n))throw new kt;var t=p(arguments,2);return Ft(function(){n.apply(v,t)},r)}function Kr(n,r){if(!In(n))throw new kt;var t=function(){var e=t.cache,u=r?r.apply(this,arguments):m+arguments[0];return Tt.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return t.cache={},t}function Ur(n){var r,t;if(!In(n))throw new kt;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}}function Mr(n){return an(n,16,p(arguments,1))}function Vr(n){return an(n,32,null,p(arguments,1))}function Gr(n,r,t){var e=!0,u=!0;if(!In(n))throw new kt;return t===!1?e=!1:Sn(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),U.leading=e,U.maxWait=r,U.trailing=u,zr(n,r,U)}function Hr(n,r){return an(r,16,[n])}function Jr(n){return function(){return n}}function Qr(n,r,t){var e=typeof n;if(null==n||"function"==e)return Q(n,r,t);if("object"!=e)return tt(n);var u=ne(n),o=u[0],a=n[o];return 1!=u.length||a!==a||Sn(a)?function(r){for(var t=u.length,e=!1;t--&&(e=rn(r[u[t]],n[u[t]],null,!0)););return e}:function(n){var r=n[o];return a===r&&(0!==a||1/a==1/r)}}function Xr(n){return null==n?"":jt(n).replace(ue,fn)}function Yr(n){return n}function Zr(n,r,t){var e=!0,u=r&&wn(r);r&&(t||u.length)||(null==t&&(t=r),o=g,r=n,n=h,u=wn(r)),t===!1?e=!1:Sn(t)&&"chain"in t&&(e=t.chain);var o=n,a=In(o);Xn(u,function(t){var u=n[t]=r[t];a&&(o.prototype[t]=function(){var r=this.__chain__,t=this.__wrapped__,a=[t];$t.apply(a,arguments);var i=u.apply(n,a);if(e||r){if(t===i&&Sn(i))return this;i=new o(i),i.__chain__=r}return i})})}function nt(){return t._=Ot,this}function rt(){}function tt(n){return function(r){return r[n]}}function et(n,r,t){var e=null==n,u=null==r;if(null==t&&("boolean"==typeof n&&u?(t=n,n=1):u||"boolean"!=typeof r||(t=r,u=!0)),e&&u&&(r=1),n=+n||0,u?(r=n,n=0):r=+r||0,t||n%1||r%1){var o=Ht();return Vt(n+o*(r-n+parseFloat("1e-"+((o+"").length-1))),r)}return en(n,r)}function ut(n,r){if(n){var t=n[r];return In(t)?n[r]():t}}function ot(n,r,t){var e=h.templateSettings;n=jt(n||""),t=ae({},t,e);var u,o=ae({},t.imports,e.imports),i=ne(o),f=Un(o),l=0,c=t.interpolate||E,p="__p += '",s=wt((t.escape||E).source+"|"+c.source+"|"+(c===N?x:E).source+"|"+(t.evaluate||E).source+"|$","g");n.replace(s,function(r,t,e,o,i,f){return e||(e=o),p+=n.slice(l,f).replace(S,a),t&&(p+="' +\n__e("+t+") +\n'"),i&&(u=!0,p+="';\n"+i+";\n__p += '"),e&&(p+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=f+r.length,r}),p+="';\n";var g=t.variable,y=g;y||(g="obj",p="with ("+g+") {\n"+p+"\n}\n"),p=(u?p.replace(w,""):p).replace(j,"$1").replace(k,"$1;"),p="function("+g+") {\n"+(y?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m="\n/*\n//# sourceURL="+(t.sourceURL||"/lodash/template/source["+D++ +"]")+"\n*/";try{var b=mt(i,"return "+p+m).apply(v,f)}catch(d){throw d.source=p,d}return r?b(r):(b.source=p,b)}function at(n,r,t){n=(n=+n)>-1?n:0;var e=-1,u=ht(n);for(r=Q(r,t,1);++e<n;)u[e]=r(e);return u}function it(n){return null==n?"":jt(n).replace(ee,sn)}function ft(n){var r=++y;return jt(null==n?"":n)+r}function lt(n){return n=new g(n),n.__chain__=!0,n}function ct(n,r){return r(n),n}function pt(){return this.__chain__=!0,this}function st(){return jt(this.__wrapped__)}function vt(){return this.__wrapped__}t=t?Z.defaults(H.Object(),t,Z.pick(H,A)):H;var ht=t.Array,gt=t.Boolean,yt=t.Date,mt=t.Function,bt=t.Math,dt=t.Number,_t=t.Object,wt=t.RegExp,jt=t.String,kt=t.TypeError,xt=[],Ct=_t.prototype,Ot=t._,Nt=Ct.toString,Rt=wt("^"+jt(Nt).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Et=bt.ceil,It=t.clearTimeout,St=bt.floor,At=mt.prototype.toString,Dt=cn(Dt=_t.getPrototypeOf)&&Dt,Tt=Ct.hasOwnProperty,$t=xt.push,Ft=t.setTimeout,Bt=xt.splice,Wt=xt.unshift,qt=function(){try{var n={},r=cn(r=_t.defineProperty)&&r,t=r(n,n,n)&&r}catch(e){}return t}(),zt=cn(zt=_t.create)&&zt,Lt=cn(Lt=ht.isArray)&&Lt,Pt=t.isFinite,Kt=t.isNaN,Ut=cn(Ut=_t.keys)&&Ut,Mt=bt.max,Vt=bt.min,Gt=t.parseInt,Ht=bt.random,Jt={};Jt[$]=ht,Jt[F]=gt,Jt[B]=yt,Jt[W]=mt,Jt[z]=_t,Jt[q]=dt,Jt[L]=wt,Jt[P]=jt,g.prototype=h.prototype;var Qt=h.support={};Qt.funcDecomp=!cn(t.WinRTError)&&I.test(s),Qt.funcNames="string"==typeof mt.name,h.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:h}},zt||(J=function(){function n(){}return function(r){if(Sn(r)){n.prototype=r;var e=new n;n.prototype=null}return e||t.Object()}}());var Xt=qt?function(n,r){M.value=r,qt(n,"__bindData__",M)}:rt,Yt=Lt||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Nt.call(n)==$||!1},Zt=function(n){var r,t=n,e=[];if(!t)return e;if(!V[typeof n])return e;for(r in t)Tt.call(t,r)&&e.push(r);return e},ne=Ut?function(n){return Sn(n)?Ut(n):[]}:Zt,re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},te=kn(re),ee=wt("("+ne(te).join("|")+")","g"),ue=wt("["+ne(re).join("")+"]","g"),oe=function(n,r,t){var e,u=n,o=u;if(!u)return o;var a=arguments,i=0,f="number"==typeof t?2:a.length;if(f>3&&"function"==typeof a[f-2])var l=Q(a[--f-1],a[f--],2);else f>2&&"function"==typeof a[f-1]&&(l=a[--f]);for(;++i<f;)if(u=a[i],u&&V[typeof u])for(var c=-1,p=V[typeof u]&&ne(u),s=p?p.length:0;++c<s;)e=p[c],o[e]=l?l(o[e],u[e]):u[e];return o},ae=function(n,r,t){var e,u=n,o=u;if(!u)return o;for(var a=arguments,i=0,f="number"==typeof t?2:a.length;++i<f;)if(u=a[i],u&&V[typeof u])for(var l=-1,c=V[typeof u]&&ne(u),p=c?c.length:0;++l<p;)e=c[l],"undefined"==typeof o[e]&&(o[e]=u[e]);return o},ie=function(n,r,t){var e,u=n,o=u;if(!u)return o;if(!V[typeof u])return o;r=r&&"undefined"==typeof t?r:Q(r,t,3);for(e in u)if(r(u[e],e,n)===!1)return o;return o},fe=function(n,r,t){var e,u=n,o=u;if(!u)return o;if(!V[typeof u])return o;r=r&&"undefined"==typeof t?r:Q(r,t,3);for(var a=-1,i=V[typeof u]&&ne(u),f=i?i.length:0;++a<f;)if(e=i[a],r(u[e],e,n)===!1)return o;return o},le=Dt?function(n){if(!n||Nt.call(n)!=z)return!1;var r=n.valueOf,t=cn(r)&&(t=Dt(r))&&Dt(t);return t?n==t||Dt(n)==t:pn(n)}:pn,ce=on(function(n,r,t){Tt.call(n,t)?n[t]++:n[t]=1}),pe=on(function(n,r,t){(Tt.call(n,t)?n[t]:n[t]=[]).push(r)}),se=on(function(n,r,t){n[t]=r}),ve=nr,he=Hn,ge=cn(ge=yt.now)&&ge||function(){return(new yt).getTime()},ye=8==Gt(_+"08")?Gt:function(n,r){return Gt(Fn(n)?n.replace(R,""):n,r||0)};return h.after=Tr,h.assign=oe,h.at=Mn,h.bind=$r,h.bindAll=Fr,h.bindKey=Br,h.chain=lt,h.compact=sr,h.compose=Wr,h.constant=Jr,h.countBy=ce,h.create=yn,h.createCallback=Qr,h.curry=qr,h.debounce=zr,h.defaults=ae,h.defer=Lr,h.delay=Pr,h.difference=vr,h.filter=Hn,h.flatten=mr,h.forEach=Xn,h.forEachRight=Yn,h.forIn=ie,h.forInRight=dn,h.forOwn=fe,h.forOwnRight=_n,h.functions=wn,h.groupBy=pe,h.indexBy=se,h.initial=dr,h.intersection=_r,h.invert=kn,h.invoke=Zn,h.keys=ne,h.map=nr,h.mapValues=Wn,h.max=rr,h.memoize=Kr,h.merge=qn,h.min=tr,h.omit=zn,h.once=Ur,h.pairs=Ln,h.partial=Mr,h.partialRight=Vr,h.pick=Pn,h.pluck=ve,h.property=tt,h.pull=kr,h.range=xr,h.reject=or,h.remove=Cr,h.rest=Or,h.shuffle=ir,h.sortBy=cr,h.tap=ct,h.throttle=Gr,h.times=at,h.toArray=pr,h.transform=Kn,h.union=Rr,h.uniq=Er,h.values=Un,h.where=he,h.without=Ir,h.wrap=Hr,h.xor=Sr,h.zip=Ar,h.zipObject=Dr,h.collect=nr,h.drop=Or,h.each=Xn,h.eachRight=Yn,h.extend=oe,h.methods=wn,h.object=Dr,h.select=Hn,h.tail=Or,h.unique=Er,h.unzip=Ar,Zr(h),h.clone=hn,h.cloneDeep=gn,h.contains=Vn,h.escape=Xr,h.every=Gn,h.find=Jn,h.findIndex=hr,h.findKey=mn,h.findLast=Qn,h.findLastIndex=gr,h.findLastKey=bn,h.has=jn,h.identity=Yr,h.indexOf=br,h.isArguments=vn,h.isArray=Yt,h.isBoolean=xn,h.isDate=Cn,h.isElement=On,h.isEmpty=Nn,h.isEqual=Rn,h.isFinite=En,h.isFunction=In,h.isNaN=An,h.isNull=Dn,h.isNumber=Tn,h.isObject=Sn,h.isPlainObject=le,h.isRegExp=$n,h.isString=Fn,h.isUndefined=Bn,h.lastIndexOf=jr,h.mixin=Zr,h.noConflict=nt,h.noop=rt,h.now=ge,h.parseInt=ye,h.random=et,h.reduce=er,h.reduceRight=ur,h.result=ut,h.runInContext=s,h.size=fr,h.some=lr,h.sortedIndex=Nr,h.template=ot,h.unescape=it,h.uniqueId=ft,h.all=Gn,h.any=lr,h.detect=Jn,h.findWhere=Jn,h.foldl=er,h.foldr=ur,h.include=Vn,h.inject=er,Zr(function(){var n={};return fe(h,function(r,t){h.prototype[t]||(n[t]=r)}),n}(),!1),h.first=yr,h.last=wr,h.sample=ar,h.take=yr,h.head=yr,fe(h,function(n,r){var t="sample"!==r;h.prototype[r]||(h.prototype[r]=function(r,e){var u=this.__chain__,o=n(this.__wrapped__,r,e);return u||null!=r&&(!e||t&&"function"==typeof r)?new g(o,u):o})}),h.VERSION="2.4.1",h.prototype.chain=pt,h.prototype.toString=st,h.prototype.value=vt,h.prototype.valueOf=vt,Xn(["join","pop","shift"],function(n){var r=xt[n];h.prototype[n]=function(){var n=this.__chain__,t=r.apply(this.__wrapped__,arguments);return n?new g(t,n):t}}),Xn(["push","reverse","sort","unshift"],function(n){var r=xt[n];h.prototype[n]=function(){return r.apply(this.__wrapped__,arguments),this}}),Xn(["concat","slice","splice"],function(n){var r=xt[n];h.prototype[n]=function(){return new g(r.apply(this.__wrapped__,arguments),this.__chain__)}}),h}var v,h=[],g=[],y=0,m=+new Date+"",b=75,d=40,_=" 	\x0B\f \ufeff\n\r\u2028\u2029 ᠎              ",w=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,R=RegExp("^["+_+"]*0+(?=.$)"),E=/($^)/,I=/\bthis\b/,S=/['\n\r\t\u2028\u2029\\]/g,A=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=0,T="[object Arguments]",$="[object Array]",F="[object Boolean]",B="[object Date]",W="[object Function]",q="[object Number]",z="[object Object]",L="[object RegExp]",P="[object String]",K={};K[W]=!1,K[T]=K[$]=K[F]=K[B]=K[q]=K[z]=K[L]=K[P]=!0;var U={leading:!1,maxWait:0,trailing:!1},M={configurable:!1,enumerable:!1,value:null,writable:!1},V={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},H=V[typeof window]&&window||this,J=V[typeof exports]&&exports&&!exports.nodeType&&exports,Q=V[typeof module]&&module&&!module.nodeType&&module,X=Q&&Q.exports===J&&J,Y=V[typeof global]&&global;!Y||Y.global!==Y&&Y.window!==Y||(H=Y);var Z=s();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(H._=Z,define(function(){return Z})):J&&Q?X?(Q.exports=Z)._=Z:J._=Z:H._=Z}).call(this);
</script>

<script type="text/javascript">
var saveAs=saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=!e.externalHost&&"download"in o,i=function(n){var o=t.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,e,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)},a=e.webkitRequestFileSystem,u=e.requestFileSystem||a||e.mozRequestFileSystem,d=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},c="application/octet-stream",f=0,s=[],l=function(){for(var e=s.length;e--;){var t=s[e];"string"==typeof t?n().revokeObjectURL(t):t.remove()}s.length=0},v=function(e,t,n){t=[].concat(t);for(var o=t.length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(i){d(i)}}},w=function(t,d){var l,w,p,y=this,m=t.type,g=!1,h=function(){var e=n().createObjectURL(t);return s.push(e),e},E=function(){v(y,"writestart progress write writeend".split(" "))},O=function(){(g||!l)&&(l=h(t)),w?w.location.href=l:window.open(l,"_blank"),y.readyState=y.DONE,E()},S=function(e){return function(){return y.readyState!==y.DONE?e.apply(this,arguments):void 0}},R={create:!0,exclusive:!1};return y.readyState=y.INIT,d||(d="download"),r?(l=h(t),o.href=l,o.download=d,i(o),y.readyState=y.DONE,void E()):(e.chrome&&m&&m!==c&&(p=t.slice||t.webkitSlice,t=p.call(t,0,t.size,c),g=!0),a&&"download"!==d&&(d+=".download"),(m===c||a)&&(w=e),u?(f+=t.size,void u(e.TEMPORARY,f,S(function(e){e.root.getDirectory("saved",R,S(function(e){var n=function(){e.getFile(d,R,S(function(e){e.createWriter(S(function(n){n.onwriteend=function(t){w.location.href=e.toURL(),s.push(e),y.readyState=y.DONE,v(y,"writeend",t)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&O()},"writestart progress write abort".split(" ").forEach(function(e){n["on"+e]=y["on"+e]}),n.write(t),y.abort=function(){n.abort(),y.readyState=y.DONE},y.readyState=y.WRITING}),O)}),O)};e.getFile(d,{create:!1},S(function(e){e.remove(),n()}),S(function(e){e.code===e.NOT_FOUND_ERR?n():O()}))}),O)}),O)):void O())},p=w.prototype,y=function(e,t){return new w(e,t)};return p.abort=function(){var e=this;e.readyState=e.DONE,v(e,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,e.addEventListener("unload",l,!1),y.unload=function(){l(),e.removeEventListener("unload",l,!1)},y}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&null!==module?module.exports=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
</script>

<script type="text/javascript">
!function(){"use strict";window.assertions=window.assertions||{},window.assertions.assertFunction=window.assertions.assertFunction||function(o,n){var s="function"==typeof o?o():o;if(!s){if(window.navigator&&"Microsoft Internet Explorer"===window.navigator.appName)try{throw new Error}catch(w){n=n+", stack=\n"+w.stack}throw console&&console.log&&console.log("Assertion failed: "+n),new Error("Assertion failed: "+n)}},window.assert=window.assert||null,window.assertSlow=window.assertSlow||null,window.assertions.enableAssert=function(){window.assert=window.assertions.assertFunction,window.console&&window.console.log&&window.console.log("enabling assert")},window.assertions.disableAssert=function(){window.assert=null,window.console&&window.console.log&&window.console.log("disabling assert")},window.assertions.enableAssertSlow=function(){window.assertSlow=window.assertions.assertFunction,window.console&&window.console.log&&window.console.log("enabling assertSlow")},window.assertions.disableAssertSlow=function(){window.assertSlow=null,window.console&&window.console.log&&window.console.log("disabling assertSlow")}}();
</script>

<script type="text/javascript">
!function(){"use strict";window.phetio=window.phetio||null,function(){window.phet=window.phet||{},window.phet.chipper=window.phet.chipper||{},window.phet.chipper.randomSeed=Math.random();var e={};if("undefined"!=typeof window&&window.location.search)for(var r=window.location.search.slice(1).split("&"),t=0;t<r.length;t++){var n=r[t].split("=");e[n[0]]=decodeURIComponent(n[1])}window.phet.chipper.getQueryParameter=function(r){return e[r]},window.phet.chipper.getQueryParameters=function(){return e},window.phet.chipper.getCacheBusterArgs=function(){return"false"!==phet.chipper.getQueryParameter("cacheBuster")?"bust="+Date.now():""},window.phet.chipper.brand=window.phet.chipper.brand||phet.chipper.getQueryParameter("brand")||"adapted-from-phet",window.phet.chipper.mapString=function(e,r){return null===r?e:"double"===r?e+":"+e:"long"===r?"12345678901234567890123456789012345678901234567890":"rtl"===r?"‫تست (زبان)‬":"xss"===r?'<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NkYGD4DwABCQEBtxmN7wAAAABJRU5ErkJggg==" onload="window.location.href=atob(\'aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kUXc0dzlXZ1hjUQ==\')" />':"none"===r?e:r}}(),function(){var e="production"===$("meta[name=phet-sim-level]").attr("content"),r=!e&&!!phet.chipper.getQueryParameter("eall"),t=r||!e&&!!phet.chipper.getQueryParameter("ea");t&&window.assertions.enableAssert(),r&&window.assertions.enableAssertSlow(),phet.chipper.getQueryParameter("postMessageOnError")&&window.addEventListener("error",function(e,r,t,n,o){var i="",a="";e&&e.message&&(i=e.message),e&&e.error&&e.error.stack&&(a=e.error.stack),window.parent&&window.parent.postMessage(JSON.stringify({type:"error",url:window.location.href,message:i,stack:a}),"*")})}()}();
</script>

<script type="text/javascript">
!function(){"use strict";var e=navigator.userAgent,o=!!(e.match(/MSIE/)||e.match(/Trident\//)||e.match(/Edge\//));if(!("file:"===window.location.protocol&&o||"phet"!==phet.chipper.brand&&"phet-io"!==phet.chipper.brand)){!function(e,o,i,t,n,c,a){e.GoogleAnalyticsObject=n,e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},e[n].l=1*new Date,c=o.createElement(i),a=o.getElementsByTagName(i)[0],c.async=1,c.src=t,a.parentNode.insertBefore(c,a)}(window,document,"script",("https:"===document.location.protocol?"https:":"http:")+"//www.google-analytics.com/analytics.js","googleAnalytics");var i={};phet.chipper&&(assert&&assert(!phet.chipper.buildTimestamp||!!phet.chipper.project&&!!phet.chipper.version&&!!phet.chipper.locale,"Missing Google Analytics variable in"),phet.chipper.project&&(i.dimension1=phet.chipper.project),phet.chipper.version&&(i.dimension2=phet.chipper.version),phet.chipper.locale&&(i.dimension3=phet.chipper.locale),phet.chipper.buildTimestamp&&(i.dimension4=phet.chipper.buildTimestamp),phet.chipper.getQueryParameter("phet-app")?i.dimension5="phet-app":phet.chipper.getQueryParameter("chrome-webstore")?i.dimension5="chrome-webstore":top!==self?i.dimension5="embedded":i.dimension5="default",i.dimension6=document.referrer);var t="offline/html/"+phet.chipper.project+"_"+phet.chipper.locale;window.googleAnalytics("create",{trackingId:"UA-5033201-1",cookieDomain:"none"}),"file:"===window.location.protocol&&(window.googleAnalytics("set","checkProtocolTask",null),window.googleAnalytics("set","checkStorageTask",null),window.googleAnalytics("set","location",t)),window.googleAnalytics("send","pageview",i),"phet-io"===phet.chipper.brand&&(window.googleAnalytics("create",{trackingId:"UA-37615182-3",cookieDomain:"none",name:"io"}),"file:"===window.location.protocol&&(window.googleAnalytics("io.set","checkProtocolTask",null),window.googleAnalytics("io.set","checkStorageTask",null),window.googleAnalytics("io.set","location",t)),window.googleAnalytics("io.send","pageview",i)),"file:"===window.location.protocol||document.domain.match(/(.*\.colorado\.edu\.?$)|(^localhost$)|(^127\.0\.0\.1$)/)||(window.googleAnalytics("create",{trackingId:"UA-37615182-2",cookieDomain:"none",name:"thirdParty"}),window.googleAnalytics("thirdParty.send","pageview",i)),window.googleAnalytics("create",{trackingId:"UA-5033010-35",cookieDomain:"phet.colorado.edu",name:"hewlett"}),window.googleAnalytics("hewlett.send","pageview")}}();
</script>

<script type="text/javascript">
!function(n,r){function t(t,c,s){var d=[];c=1==c?{entropy:!0}:c||{};var m=u(i(c.entropy?[t,a(n)]:null==t?f():t,3),d),j=new e(d),S=function(){for(var n=j.g(p),r=y,t=0;h>n;)n=(n+t)*l,r*=l,t=j.g(1);for(;n>=v;)n/=2,r/=2,t>>>=1;return(n+t)/r};return S.int32=function(){return 0|j.g(4)},S.quick=function(){return j.g(4)/4294967296},S["double"]=S,u(a(j.S),n),(c.pass||s||function(n,t,e,i){return i&&(i.S&&o(i,j),n.state=function(){return o(j,{})}),e?(r[g]=n,t):n})(S,m,"global"in c?c.global:this==r,c.state)}function e(n){var r,t=n.length,e=this,o=0,i=e.i=e.j=0,u=e.S=[];for(t||(n=[t++]);l>o;)u[o]=o++;for(o=0;l>o;o++)u[o]=u[i=m&i+n[o%t]+(r=u[o])],u[i]=r;(e.g=function(n){for(var r,t=0,o=e.i,i=e.j,u=e.S;n--;)r=u[o=m&o+1],t=t*l+u[m&(u[o]=u[i=m&i+r])+(u[i]=r)];return e.i=o,e.j=i,t})(l)}function o(n,r){return r.i=n.i,r.j=n.j,r.S=n.S.slice(),r}function i(n,r){var t,e=[],o=typeof n;if(r&&"object"==o)for(t in n)try{e.push(i(n[t],r-1))}catch(u){}return e.length?e:"string"==o?n:n+"\x00"}function u(n,r){for(var t,e=n+"",o=0;o<e.length;)r[m&o]=m&(t^=19*r[m&o])+e.charCodeAt(o++);return a(r)}function f(){try{if(c)return a(c.randomBytes(l));var r=new Uint8Array(l);return(s.crypto||s.msCrypto).getRandomValues(r),a(r)}catch(t){var e=s.navigator,o=e&&e.plugins;return[+new Date,s,o,s.screen,a(n)]}}function a(n){return String.fromCharCode.apply(0,n)}var c,s=this,l=256,p=6,d=52,g="random",y=r.pow(l,p),h=r.pow(2,d),v=2*h,m=l-1;if(r["seed"+g]=t,u(r.random(),n),"object"==typeof module&&module.exports){module.exports=t;try{c=require("crypto")}catch(j){}}else"function"==typeof define&&define.amd&&define(function(){return t})}([],Math);
</script>

<script type="text/javascript">
!function(){"use strict";var e=window.phet.chipper.getQueryParameter("gameUpLogging"),a=window.phet.chipper.getQueryParameter("gameUp"),t=function(a){e&&console.log(a)};if(a){t("Enabled Game Up Camera");var n=".brainpop.com",i=!1,o=0,r=function(){!i&&10>o&&(parent.postMessage("captureReady","*"),o++,t("Posted captureReady, number of checks: "+o),setTimeout(r,1e3))},p=function(e){if(-1!==e.origin.indexOf(n,e.origin.length-n.length))if("captureImage"===e.data){var a=window.phet.joist.ScreenshotGenerator.generateScreenshot(window.phet.joist.sim,"image/jpeg");s(a,e.origin,e.source),t("Sent image")}else"GameUpCaptureReady"===e.data&&(t("GameUpCaptureReady"),i=!0)},s=function(e,a,t){e=e.replace("data:image/jpeg;base64,",""),t.postMessage(e,a)};window.addEventListener?window.addEventListener("message",p,!1):window.attachEvent&&window.attachEvent("onmessage",p),r()}}();
</script>

<script type="text/javascript">
  (function() {
    var stringOverrides = JSON.parse( decodeURIComponent( phet.chipper.getQueryParameter( 'strings' ) || '{}' ) );

    var stringTest = ( typeof window !== 'undefined' && window.phet.chipper.getQueryParameter( 'stringTest' ) ) ?
                     window.phet.chipper.getQueryParameter( 'stringTest' ) :
                     null;

    window.phet.chipper.strings.get = function( key ) {
      // override strings via the 'strings' query parameter
      return stringOverrides[ key ] || window.phet.chipper.mapString( window.phet.chipper.strings[ key ], stringTest );
    };
  })();
</script>
<script type="text/javascript">!function(){var t,e,i;!function(n){function r(t,e){return S.call(t,e)}function s(t,e){var i,n,r,s,a,o,h,l,u,c,d,m=e&&e.split("/"),f=v.map,p=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(m=m.slice(0,m.length-1),t=t.split("/"),a=t.length-1,v.nodeIdCompat&&C.test(t[a])&&(t[a]=t[a].replace(C,"")),t=m.concat(t),u=0;u<t.length;u+=1)if(d=t[u],"."===d)t.splice(u,1),u-=1;else if(".."===d){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((m||p)&&f){for(i=t.split("/"),u=i.length;u>0;u-=1){if(n=i.slice(0,u).join("/"),m)for(c=m.length;c>0;c-=1)if(r=f[m.slice(0,c).join("/")],r&&(r=r[n])){s=r,o=u;break}if(s)break;!h&&p&&p[n]&&(h=p[n],l=u)}!s&&h&&(s=h,o=l),s&&(i.splice(0,o,s),t=i.join("/"))}return t}function a(t,e){return function(){return m.apply(n,y.call(arguments,0).concat([t,e]))}}function o(t){return function(e){return s(e,t)}}function h(t){return function(e){g[t]=e}}function l(t){if(r(b,t)){var e=b[t];delete b[t],E[t]=!0,d.apply(n,e)}if(!r(g,t)&&!r(E,t))throw new Error("No "+t);return g[t]}function u(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function c(t){return function(){return v&&v.config&&v.config[t]||{}}}var d,m,f,p,g={},b={},v={},E={},S=Object.prototype.hasOwnProperty,y=[].slice,C=/\.js$/;f=function(t,e){var i,n=u(t),r=n[0];return t=n[1],r&&(r=s(r,e),i=l(r)),r?t=i&&i.normalize?i.normalize(t,o(e)):s(t,e):(t=s(t,e),n=u(t),r=n[0],t=n[1],r&&(i=l(r))),{f:r?r+"!"+t:t,n:t,pr:r,p:i}},p={require:function(t){return a(t)},exports:function(t){var e=g[t];return"undefined"!=typeof e?e:g[t]={}},module:function(t){return{id:t,uri:"",exports:g[t],config:c(t)}}},d=function(t,e,i,s){var o,u,c,d,m,v,S=[],y=typeof i;if(s=s||t,"undefined"===y||"function"===y){for(e=!e.length&&i.length?["require","exports","module"]:e,m=0;m<e.length;m+=1)if(d=f(e[m],s),u=d.f,"require"===u)S[m]=p.require(t);else if("exports"===u)S[m]=p.exports(t),v=!0;else if("module"===u)o=S[m]=p.module(t);else if(r(g,u)||r(b,u)||r(E,u))S[m]=l(u);else{if(!d.p)throw new Error(t+" missing "+u);d.p.load(d.n,a(s,!0),h(u),{}),S[m]=g[u]}c=i?i.apply(g[t],S):void 0,t&&(o&&o.exports!==n&&o.exports!==g[t]?g[t]=o.exports:c===n&&v||(g[t]=c))}else t&&(g[t]=i)},t=e=m=function(t,e,i,r,s){if("string"==typeof t)return p[t]?p[t](e):l(f(t,e).f);if(!t.splice){if(v=t,v.deps&&m(v.deps,v.callback),!e)return;e.splice?(t=e,e=i,i=null):t=n}return e=e||function(){},"function"==typeof i&&(i=r,r=s),r?d(n,t,e,i):setTimeout(function(){d(n,t,e,i)},4),m},m.config=function(t){return m(t)},t._defined=g,i=function(t,e,i){e.splice||(i=e,e=[]),r(g,t)||r(b,t)||(b[t]=[t,e,i])},i.amd={jQuery:!0}}(),i("almond",function(){}),i("PHET_CORE/Namespace",["require"],function(t){"use strict";function e(t){this.name=t,window.phet&&(window.phet[t]=this)}return e.prototype={constructor:e,register:function(t,e){if(t.indexOf(".")<0)this[t]=e;else{for(var i=t.split("."),n=this,r=0;r<i.length-1;r++)n=n[i[r]];var s=i[i.length-1];n[s]=e}return e}},e}),i("JOIST/joist",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("joist")}),i("JOIST/checkNamespaces",["require","JOIST/joist"],function(t){"use strict";var e=t("JOIST/joist"),i=function(){return};return e.register("checkNamespaces",i),i}),i("JOIST/SimLauncher",["require","JOIST/checkNamespaces","JOIST/joist"],function(t){"use strict";var e=t("JOIST/checkNamespaces"),i=t("JOIST/joist"),n={launch:function(t){function i(){$("#splash").remove(),t()}window.phet.joist=window.phet.joist||{},window.phet.joist.launchCalled=!0;var n=[],r=0;if(window.phetImages)for(var s=0;s<window.phetImages.length;s++){var a=window.phetImages[s];a.onload=function(){r++,r===window.phetImages.length&&i()}}else i();$(window).load(function(){_.each(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})}),phet.chipper.getQueryParameter("checkNamespaces")&&e()}};return i.register("SimLauncher",n),n}),i("PHET_CORE/phetCore",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace"),i=new e("phetCore");return i.register("Namespace",e),i}),i("PHET_CORE/extend",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t){return _.each(Array.prototype.slice.call(arguments,1),function(e){if(e)for(var i in e)Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}var i=t("PHET_CORE/phetCore");return i.register("extend",e),e}),i("PHET_CORE/inherit",["require","PHET_CORE/phetCore","PHET_CORE/extend"],function(t){"use strict";function e(t,e,i,r){function s(){}return s.prototype=t.prototype,e.prototype=n(new s,{constructor:e},i),n(e,r),e}var i=t("PHET_CORE/phetCore"),n=t("PHET_CORE/extend");return i.register("inherit",e),e}),i("PHET_CORE/phetAllocation",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t){if(window.alloc){var e;try{throw new Error}catch(i){e=i.stack}window.alloc[t]||(window.alloc[t]={count:0,stacks:{}});var n=window.alloc[t];n.count++,n.stacks[e]?n.stacks[e]+=1:n.stacks[e]=1,n.report=function(){var t=Object.keys(n.stacks);t=_.sortBy(t,function(t){return n.stacks[t]}),_.each(t,function(t){console.log(n.stacks[t]+": "+t)})}}}var i=t("PHET_CORE/phetCore");return i.register("phetAllocation",e),e}),i("DOT/dot",["require","PHET_CORE/Namespace","PHET_CORE/phetAllocation"],function(t){"use strict";var e=t("PHET_CORE/Namespace");window.phetAllocation=t("PHET_CORE/phetAllocation");var i=new e("dot");return i.register("v2",function(t,e){return new i.Vector2(t,e)}),i.register("v3",function(t,e,n){return new i.Vector3(t,e,n)}),i.register("v4",function(t,e,n,r){return new i.Vector4(t,e,n,r)}),i.register("FastArray",window.Float64Array?window.Float64Array:window.Array),i}),i("PHET_CORE/Poolable",["require","PHET_CORE/phetCore","PHET_CORE/extend"],function(t){"use strict";var e=t("PHET_CORE/phetCore"),i=t("PHET_CORE/extend"),n={mixin:function(t,e){var n=t.prototype;e=i({maxPoolSize:50,initialSize:0},e);var r=t.pool=[];e.defaultFactory&&(t.dirtyFromPool=function(){return r.length?r.pop():e.defaultFactory()},t.fillPool=function(t){for(;r.length<t;)r.push(e.defaultFactory())},t.fillPool(e.initialSize)),e.constructorDuplicateFactory&&(t.createFromPool=e.constructorDuplicateFactory(r)),n.freeToPool=function(){r.length<e.maxPoolSize&&r.push(this)}}};return e.register("Poolable",n),n}),i("DOT/Util",["require","DOT/dot"],function(t){"use strict";var e,i,n,r=t("DOT/dot"),s=Number.MIN_VALUE,a=2*Math.PI,o={clamp:function(t,e,i){return e>t?e:t>i?i:t},moduloBetweenDown:function(t,e,i){var n=i-e,r=(t-e)%n;return 0>r&&(r+=n),r+e},moduloBetweenUp:function(t,e,i){return-o.moduloBetweenDown(-t,-i,-e)},rangeInclusive:function(t,e){if(t>e)return[];for(var i=new Array(e-t+1),n=t;e>=n;n++)i[n-t]=n;return i},rangeExclusive:function(t,e){return o.rangeInclusive(t+1,e-1)},toRadians:function(t){return Math.PI*t/180},toDegrees:function(t){return 180*t/Math.PI},gcd:function(t,e){return 0===e?t:this.gcd(e,t%e)},lineLineIntersection:function(t,e,i,n){var s=t.x-e.x,a=i.x-n.x,o=t.y-e.y,h=i.y-n.y,l=s*h-o*a,u=t.x*e.y-t.y*e.x,c=i.x*n.y-i.y*n.x;return new r.Vector2((u*a-s*c)/l,(u*h-o*c)/l)},sphereRayIntersection:function(t,e,i){i=void 0===i?1e-5:i;var n=new r.Vector3,s=e.direction,a=e.position,o=a.minus(n),h=s.dot(o),l=o.magnitudeSquared(),u=4*h*h-4*(l-t*t);if(i>u)return null;var c=s.dot(n)-s.dot(a),d=Math.sqrt(u)/2,m=c-d,f=c+d;if(i>f)return null;var p=e.pointAtDistance(f),g=p.minus(n).normalized();if(i>m)return{distance:f,hitPoint:p,normal:g.negated(),fromOutside:!1};var b=e.pointAtDistance(m),v=b.minus(n).normalized();return{distance:m,hitPoint:b,normal:v,fromOutside:!0}},solveQuadraticRootsReal:function(t,e,i){var n=1e7;if(0===t||Math.abs(e/t)>n||Math.abs(i/t)>n)return[-i/e];var r=e*e-4*t*i;if(0>r)return[];var s=Math.sqrt(r);return[(-e-s)/(2*t),(-e+s)/(2*t)]},solveCubicRootsReal:function(t,e,i,n){var r=1e7;if(0===t||Math.abs(e/t)>r||Math.abs(i/t)>r||Math.abs(n/t)>r)return o.solveQuadraticRootsReal(e,i,n);if(0===n||Math.abs(t/n)>r||Math.abs(e/n)>r||Math.abs(i/n)>r)return o.solveQuadraticRootsReal(t,e,i);e/=t,i/=t,n/=t;var s=(3*i-e*e)/9,a=(-(27*n)+e*(9*i-2*(e*e)))/54,h=s*s*s+a*a,l=e/3;if(h>0){var u=Math.sqrt(h);return[o.cubeRoot(a+u)+o.cubeRoot(a-u)-l]}if(0===h){var c=o.cubeRoot(a),d=l-c;return[-l+2*c,d,d]}var m=-s*s*s;m=Math.acos(a/Math.sqrt(m));var f=2*Math.sqrt(-s);return[-l+f*Math.cos(m/3),-l+f*Math.cos((m+2*Math.PI)/3),-l+f*Math.cos((m+4*Math.PI)/3)]},cubeRoot:function(t){return t>=0?Math.pow(t,1/3):-Math.pow(-t,1/3)},linear:function(t,e,i,n,r){return(n-i)/(e-t)*(r-t)+i},roundSymmetric:function(t){return(0>t?-1:1)*Math.round(Math.abs(t))},toFixed:function(t,e){var i=Math.pow(10,e),n=o.roundSymmetric(t*i)/i;return n.toFixed(e)},toFixedNumber:function(t,e){return parseFloat(o.toFixed(t,e))},isInteger:function(t){return"number"==typeof t&&t%1===0},lineSegmentIntersection:function(t,e,i,n,s,a,o,h){var l=(o-s)*(e-a)-(h-a)*(t-s),u=(i-t)*(e-a)-(n-e)*(t-s),c=(h-a)*(i-t)-(o-s)*(n-e);if(0===c)return null;var d=l/c,m=u/c;if(d>=0&&1>=d&&m>=0&&1>=m){var f=t+d*(i-t),p=e+d*(n-e);return new r.Vector2(f,p)}return null},distToSegmentSquared:function(t,e,i){var n=e.distanceSquared(i);if(0===n)return t.distanceSquared(e);var s=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/n;return 0>s?t.distanceSquared(e):s>1?t.distanceSquared(i):t.distanceSquared(new r.Vector2(e.x+s*(i.x-e.x),e.y+s*(i.y-e.y)))},distToSegment:function(t,e,i){return Math.sqrt(this.distToSegmentSquared(t,e,i))},arePointsCollinear:function(t,e,i,n){return void 0===n&&(n=0),o.triangleArea(t,e,i)<=n},triangleArea:function(t,e,i){return Math.abs(o.triangleAreaSigned(t,e,i))},triangleAreaSigned:function(t,e,i){return t.x*(e.y-i.y)+e.x*(i.y-t.y)+i.x*(t.y-e.y)},log10:function(t){return Math.log(t)/Math.LN10},boxMullerTransform:function(t,r){if(e=!e,!e)return n*r+t;var o,h;do o=Math.random(),h=Math.random();while(s>=o);return i=Math.sqrt(-2*Math.log(o))*Math.cos(a*h),n=Math.sqrt(-2*Math.log(o))*Math.sin(a*h),i*r+t}};return r.register("Util",o),r.clamp=o.clamp,r.moduloBetweenDown=o.moduloBetweenDown,r.moduloBetweenUp=o.moduloBetweenUp,r.rangeInclusive=o.rangeInclusive,r.rangeExclusive=o.rangeExclusive,r.toRadians=o.toRadians,r.toDegrees=o.toDegrees,r.lineLineIntersection=o.lineLineIntersection,r.sphereRayIntersection=o.sphereRayIntersection,r.solveQuadraticRootsReal=o.solveQuadraticRootsReal,r.solveCubicRootsReal=o.solveCubicRootsReal,r.cubeRoot=o.cubeRoot,r.linear=o.linear,r.boxMullerTransform=o.boxMullerTransform,o}),i("DOT/Vector2",["require","DOT/dot","PHET_CORE/inherit","PHET_CORE/Poolable","DOT/Util"],function(t){"use strict";function e(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}var i=t("DOT/dot"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable");t("DOT/Util"),i.register("Vector2",e),n(Object,e,{isVector2:!0,dimension:2,magnitude:function(){return Math.sqrt(this.magnitudeSquared())},magnitudeSquared:function(){return this.x*this.x+this.y*this.y},distance:function(t){return Math.sqrt(this.distanceSquared(t))},distanceXY:function(t,e){var i=this.x-t,n=this.y-e;return Math.sqrt(i*i+n*n)},distanceSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},distanceSquaredXY:function(t,e){var i=this.x-t,n=this.y-e;return i*i+n*n},dot:function(t){return this.x*t.x+this.y*t.y},dotXY:function(t,e){return this.x*t+this.y*e},angle:function(){return Math.atan2(this.y,this.x)},angleBetween:function(t){var e=this.magnitude(),n=t.magnitude();return Math.acos(i.clamp((this.x*t.x+this.y*t.y)/(e*n),-1,1))},equals:function(t){return this.x===t.x&&this.y===t.y},equalsEpsilon:function(t,e){return e||(e=0),Math.max(Math.abs(this.x-t.x),Math.abs(this.y-t.y))<=e},isFinite:function(){return isFinite(this.x)&&isFinite(this.y)},copy:function(t){return t?t.set(this):new e(this.x,this.y)},crossScalar:function(t){return this.x*t.y-this.y*t.x},normalized:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return new e(this.x/t,this.y/t)},withMagnitude:function(t){return this.copy().setMagnitude(t)},timesScalar:function(t){return new e(this.x*t,this.y*t)},times:function(t){return this.timesScalar(t)},componentTimes:function(t){return new e(this.x*t.x,this.y*t.y)},plus:function(t){return new e(this.x+t.x,this.y+t.y)},plusXY:function(t,i){return new e(this.x+t,this.y+i)},plusScalar:function(t){return new e(this.x+t,this.y+t)},minus:function(t){return new e(this.x-t.x,this.y-t.y)},minusXY:function(t,i){return new e(this.x-t,this.y-i)},minusScalar:function(t){return new e(this.x-t,this.y-t)},dividedScalar:function(t){return new e(this.x/t,this.y/t)},negated:function(){return new e(-this.x,-this.y)},perpendicular:function(){return new e(this.y,-this.x)},rotated:function(t){var i=this.angle()+t,n=this.magnitude();return new e(n*Math.cos(i),n*Math.sin(i))},blend:function(t,i){return new e(this.x+(t.x-this.x)*i,this.y+(t.y-this.y)*i)},average:function(t){return this.blend(t,.5)},toString:function(){return"Vector2("+this.x+", "+this.y+")"},toVector3:function(){return new i.Vector3(this.x,this.y,0)},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},set:function(t){return this.setXY(t.x,t.y)},setMagnitude:function(t){var e=t/this.magnitude();return this.multiplyScalar(e)},add:function(t){return this.setXY(this.x+t.x,this.y+t.y)},addXY:function(t,e){return this.setXY(this.x+t,this.y+e)},addScalar:function(t){return this.setXY(this.x+t,this.y+t)},subtract:function(t){return this.setXY(this.x-t.x,this.y-t.y)},subtractXY:function(t,e){return this.setXY(this.x-t,this.y-e)},subtractScalar:function(t){return this.setXY(this.x-t,this.y-t)},multiplyScalar:function(t){return this.setXY(this.x*t,this.y*t)},multiply:function(t){return this.multiplyScalar(t)},componentMultiply:function(t){return this.setXY(this.x*t.x,this.y*t.y)},divideScalar:function(t){return this.setXY(this.x/t,this.y/t)},negate:function(){return this.setXY(-this.x,-this.y)},normalize:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return this.divideScalar(t)},rotate:function(t){var e=this.angle()+t,i=this.magnitude();return this.setXY(i*Math.cos(e),i*Math.sin(e))},setPolar:function(t,e){return this.setXY(t*Math.cos(e),t*Math.sin(e))},toStateObject:function(){return{x:this.x,y:this.y}}},{createPolar:function(t,i){return(new e).setPolar(t,i)},fromStateObject:function(t){return new e(t.x,t.y)}}),r.mixin(e,{defaultFactory:function(){return new e},constructorDuplicateFactory:function(t){return function(i,n){return t.length?t.pop().setXY(i,n):new e(i,n)}}}),e.Immutable=function(t,i){e.call(this,t,i)};var s=e.Immutable;return n(e,s),s.mutableOverrideHelper=function(t){s.prototype[t]=function(){throw new Error("Cannot call mutable method '"+t+"' on immutable Vector2")}},s.mutableOverrideHelper("setXY"),s.mutableOverrideHelper("setX"),s.mutableOverrideHelper("setY"),e.ZERO=new e(0,0),e.X_UNIT=new e(1,0),e.Y_UNIT=new e(0,1),e}),i("DOT/Bounds2",["require","DOT/dot","DOT/Vector2","PHET_CORE/inherit","PHET_CORE/Poolable"],function(t){"use strict";function e(t,e,i,n){this.minX=t,this.minY=e,this.maxX=i,this.maxY=n}var i=t("DOT/dot"),n=t("DOT/Vector2"),r=t("PHET_CORE/inherit"),s=t("PHET_CORE/Poolable"),a=new i.Vector2;return i.register("Bounds2",e),r(Object,e,{isBounds:!0,dimension:2,getWidth:function(){return this.maxX-this.minX},get width(){return this.getWidth()},getHeight:function(){return this.maxY-this.minY},get height(){return this.getHeight()},getX:function(){return this.minX},get x(){return this.getX()},getY:function(){return this.minY},get y(){return this.getY()},getMinX:function(){return this.minX},getMinY:function(){return this.minY},getMaxX:function(){return this.maxX},getMaxY:function(){return this.maxY},getLeft:function(){return this.minX},get left(){return this.minX},getTop:function(){return this.minY},get top(){return this.minY},getRight:function(){return this.maxX},get right(){return this.maxX},getBottom:function(){return this.maxY},get bottom(){return this.maxY},getCenterX:function(){return(this.maxX+this.minX)/2},get centerX(){return this.getCenterX()},getCenterY:function(){return(this.maxY+this.minY)/2},get centerY(){return this.getCenterY()},getLeftTop:function(){return new i.Vector2(this.minX,this.minY)},get leftTop(){return this.getLeftTop()},getCenterTop:function(){return new i.Vector2(this.getCenterX(),this.minY)},get centerTop(){return this.getCenterTop()},getRightTop:function(){return new i.Vector2(this.maxX,this.minY)},get rightTop(){return this.getRightTop()},getLeftCenter:function(){return new i.Vector2(this.minX,this.getCenterY())},get leftCenter(){return this.getLeftCenter()},getCenter:function(){return new i.Vector2(this.getCenterX(),this.getCenterY())},get center(){return this.getCenter()},getRightCenter:function(){return new i.Vector2(this.maxX,this.getCenterY())},get rightCenter(){return this.getRightCenter()},getLeftBottom:function(){return new i.Vector2(this.minX,this.maxY)},get leftBottom(){return this.getLeftBottom()},getCenterBottom:function(){return new i.Vector2(this.getCenterX(),this.maxY)},get centerBottom(){return this.getCenterBottom()},getRightBottom:function(){return new i.Vector2(this.maxX,this.maxY)},get rightBottom(){return this.getRightBottom()},isEmpty:function(){return this.getWidth()<0||this.getHeight()<0},isFinite:function(){return isFinite(this.minX)&&isFinite(this.minY)&&isFinite(this.maxX)&&isFinite(this.maxY)},hasNonzeroArea:function(){return this.getWidth()>0&&this.getHeight()>0},isValid:function(){return!this.isEmpty()&&this.isFinite()},closestPointTo:function(t){if(this.containsCoordinates(t.x,t.y))return t;var e=Math.max(Math.min(t.x,this.maxX),this.x),i=Math.max(Math.min(t.y,this.maxY),this.y);return new n(e,i)},containsCoordinates:function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},containsPoint:function(t){return this.containsCoordinates(t.x,t.y)},containsBounds:function(t){return this.minX<=t.minX&&this.maxX>=t.maxX&&this.minY<=t.minY&&this.maxY>=t.maxY},intersectsBounds:function(t){var e=Math.max(this.minX,t.minX),i=Math.max(this.minY,t.minY),n=Math.min(this.maxX,t.maxX),r=Math.min(this.maxY,t.maxY);return n-e>=0&&r-i>=0},minimumDistanceToPointSquared:function(t){var e,i=t.x<this.minX?this.minX:t.x>this.maxX?this.maxX:null,n=t.y<this.minY?this.minY:t.y>this.maxY?this.maxY:null;if(null===i&&null===n)return 0;if(null===i)return e=n-t.y,e*e;if(null===n)return e=i-t.x,e*e;var r=i-t.x,s=n-t.y;return r*r+s*s},maximumDistanceToPointSquared:function(t){var e=t.x>this.getCenterX()?this.minX:this.maxX,i=t.y>this.getCenterY()?this.minY:this.maxY;return e-=t.x,i-=t.y,e*e+i*i},toString:function(){return"[x:("+this.minX+","+this.maxX+"),y:("+this.minY+","+this.maxY+")]"},equals:function(t){return this.minX===t.minX&&this.minY===t.minY&&this.maxX===t.maxX&&this.maxY===t.maxY},equalsEpsilon:function(t,e){e=void 0!==e?e:0;var i=this.isFinite(),n=t.isFinite();return i&&n?Math.abs(this.minX-t.minX)<e&&Math.abs(this.minY-t.minY)<e&&Math.abs(this.maxX-t.maxX)<e&&Math.abs(this.maxY-t.maxY)<e:i!==n?!1:this===t?!0:(isFinite(this.minX+t.minX)?Math.abs(this.minX-t.minX)<e:this.minX===t.minX)&&(isFinite(this.minY+t.minY)?Math.abs(this.minY-t.minY)<e:this.minY===t.minY)&&(isFinite(this.maxX+t.maxX)?Math.abs(this.maxX-t.maxX)<e:this.maxX===t.maxX)&&(isFinite(this.maxY+t.maxY)?Math.abs(this.maxY-t.maxY)<e:this.maxY===t.maxY)},copy:function(t){return t?t.set(this):new e(this.minX,this.minY,this.maxX,this.maxY)},union:function(t){return new e(Math.min(this.minX,t.minX),Math.min(this.minY,t.minY),Math.max(this.maxX,t.maxX),Math.max(this.maxY,t.maxY))},intersection:function(t){return new e(Math.max(this.minX,t.minX),Math.max(this.minY,t.minY),Math.min(this.maxX,t.maxX),Math.min(this.maxY,t.maxY))},withCoordinates:function(t,i){return new e(Math.min(this.minX,t),Math.min(this.minY,i),Math.max(this.maxX,t),Math.max(this.maxY,i))},withPoint:function(t){return this.withCoordinates(t.x,t.y)},withMinX:function(t){return new e(t,this.minY,this.maxX,this.maxY)},withMinY:function(t){return new e(this.minX,t,this.maxX,this.maxY)},withMaxX:function(t){return new e(this.minX,this.minY,t,this.maxY)},withMaxY:function(t){return new e(this.minX,this.minY,this.maxX,t)},roundedOut:function(){return new e(Math.floor(this.minX),Math.floor(this.minY),Math.ceil(this.maxX),Math.ceil(this.maxY))},roundedIn:function(){return new e(Math.ceil(this.minX),Math.ceil(this.minY),Math.floor(this.maxX),Math.floor(this.maxY))},transformed:function(t){return this.copy().transform(t)},dilated:function(t){return new e(this.minX-t,this.minY-t,this.maxX+t,this.maxY+t)},dilatedX:function(t){return new e(this.minX-t,this.minY,this.maxX+t,this.maxY)},dilatedY:function(t){return new e(this.minX,this.minY-t,this.maxX,this.maxY+t)},dilatedXY:function(t,i){return new e(this.minX-t,this.minY-i,this.maxX+t,this.maxY+i)},eroded:function(t){return this.dilated(-t)},erodedX:function(t){return this.dilatedX(-t)},erodedY:function(t){return this.dilatedY(-t)},erodedXY:function(t,e){return this.dilatedXY(-t,-e)},withOffsets:function(t,i,n,r){return new e(this.minX-t,this.minY-i,this.maxX+n,this.maxY+r)},shiftedX:function(t){return new e(this.minX+t,this.minY,this.maxX+t,this.maxY)},shiftedY:function(t){return new e(this.minX,this.minY+t,this.maxX,this.maxY+t)},shifted:function(t,i){return new e(this.minX+t,this.minY+i,this.maxX+t,this.maxY+i)},setMinMax:function(t,e,i,n){return this.minX=t,this.minY=e,this.maxX=i,this.maxY=n,this},setMinX:function(t){return this.minX=t,this},setMinY:function(t){return this.minY=t,this},setMaxX:function(t){return this.maxX=t,this},setMaxY:function(t){return this.maxY=t,this},set:function(t){return this.setMinMax(t.minX,t.minY,t.maxX,t.maxY)},includeBounds:function(t){return this.setMinMax(Math.min(this.minX,t.minX),Math.min(this.minY,t.minY),Math.max(this.maxX,t.maxX),Math.max(this.maxY,t.maxY))},constrainBounds:function(t){return this.setMinMax(Math.max(this.minX,t.minX),Math.max(this.minY,t.minY),Math.min(this.maxX,t.maxX),Math.min(this.maxY,t.maxY))},addCoordinates:function(t,e){return this.setMinMax(Math.min(this.minX,t),Math.min(this.minY,e),Math.max(this.maxX,t),Math.max(this.maxY,e))},addPoint:function(t){return this.addCoordinates(t.x,t.y)},roundOut:function(){return this.setMinMax(Math.floor(this.minX),Math.floor(this.minY),Math.ceil(this.maxX),Math.ceil(this.maxY))},roundIn:function(){return this.setMinMax(Math.ceil(this.minX),Math.ceil(this.minY),Math.floor(this.maxX),Math.floor(this.maxY))},transform:function(t){if(this.isEmpty())return this;if(t.isIdentity())return this;var e=this.minX,n=this.minY,r=this.maxX,s=this.maxY;return this.set(i.Bounds2.NOTHING),this.addPoint(t.multiplyVector2(a.setXY(e,n))),this.addPoint(t.multiplyVector2(a.setXY(e,s))),this.addPoint(t.multiplyVector2(a.setXY(r,n))),this.addPoint(t.multiplyVector2(a.setXY(r,s))),this},dilate:function(t){return this.setMinMax(this.minX-t,this.minY-t,this.maxX+t,this.maxY+t)},dilateX:function(t){return this.setMinMax(this.minX-t,this.minY,this.maxX+t,this.maxY)},dilateY:function(t){return this.setMinMax(this.minX,this.minY-t,this.maxX,this.maxY+t)},dilateXY:function(t,e){return this.setMinMax(this.minX-t,this.minY-e,this.maxX+t,this.maxY+e)},erode:function(t){return this.dilate(-t)},erodeX:function(t){return this.dilateX(-t)},erodeY:function(t){return this.dilateY(-t)},erodeXY:function(t,e){return this.dilateXY(-t,-e)},offset:function(t,i,n,r){return new e(this.minX-t,this.minY-i,this.maxX+n,this.maxY+r)},shiftX:function(t){return this.setMinMax(this.minX+t,this.minY,this.maxX+t,this.maxY)},shiftY:function(t){return this.setMinMax(this.minX,this.minY+t,this.maxX,this.maxY+t)},shift:function(t,e){return this.setMinMax(this.minX+t,this.minY+e,this.maxX+t,this.maxY+e)},getClosestPoint:function(t,e,n){return n?n.setXY(t,e):n=new i.Vector2(t,e),n.x<this.minX&&(n.x=this.minX),n.x>this.maxX&&(n.x=this.maxX),n.y<this.minY&&(n.y=this.minY),n.y>this.maxY&&(n.y=this.maxY),n}},{rect:function(t,i,n,r){return new e(t,i,t+n,i+r)},point:function(t,n){if(t instanceof i.Vector2){var r=t;return new e(r.x,r.y,r.x,r.y)}return new e(t,n,t,n)}}),s.mixin(e,{defaultFactory:function(){return e.NOTHING.copy()},constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().setMinMax(i,n,r,s):new e(i,n,r,s)}}}),e.NOTHING=new e(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),e.EVERYTHING=new e(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),e}),i("DOT/Dimension2",["require","DOT/dot","PHET_CORE/inherit","DOT/Bounds2"],function(t){"use strict";function e(t,e){this.width=t,this.height=e}var i=t("DOT/dot"),n=t("PHET_CORE/inherit");return t("DOT/Bounds2"),i.register("Dimension2",e),n(Object,e,{toString:function(){return"["+this.width+"w, "+this.height+"h]"},set:function(t){return this.width=t.width,this.height=t.height,this},setWidth:function(t){return this.width=t,this},setHeight:function(t){return this.height=t,this},copy:function(t){return t?t.set(this):new e(this.width,this.height)},toBounds:function(t,e){return t=void 0!==t?t:0,e=void 0!==e?e:0,new i.Bounds2(t,e,this.width+t,this.height+e)},equals:function(t){return this.width===t.width&&this.height===t.height}}),e}),i("DOT/Vector4",["require","DOT/dot","PHET_CORE/inherit","PHET_CORE/Poolable","DOT/Util"],function(t){"use strict";function e(t,e,i,n){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0,this.w=void 0!==n?n:1}var i=t("DOT/dot"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable");t("DOT/Util"),i.register("Vector4",e),n(Object,e,{isVector4:!0,dimension:4,magnitude:function(){return Math.sqrt(this.magnitudeSquared())},magnitudeSquared:function(){this.dot(this)},distance:function(t){return this.minus(t).magnitude()},distanceXYZW:function(t,e,i,n){var r=this.x-t,s=this.y-e,a=this.z-i,o=this.w-n;return Math.sqrt(r*r+s*s+a*a+o*o)},distanceSquared:function(t){return this.minus(t).magnitudeSquared()},distanceSquaredXYZW:function(t,e,i,n){var r=this.x-t,s=this.y-e,a=this.z-i,o=this.w-n;return r*r+s*s+a*a+o*o},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},dotXYZW:function(t,e,i,n){return this.x*t+this.y*e+this.z*i+this.w*n},angleBetween:function(t){return Math.acos(i.clamp(this.normalized().dot(t.normalized()),-1,1))},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},equalsEpsilon:function(t,e){return e||(e=0),Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)+Math.abs(this.w-t.w)<=e},isFinite:function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.z)&&isFinite(this.w)},copy:function(t){return t?t.set(this):new e(this.x,this.y,this.z,this.w)},normalized:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return new e(this.x/t,this.y/t,this.z/t,this.w/t)},withMagnitude:function(t){return this.copy().setMagnitude(t)},timesScalar:function(t){return new e(this.x*t,this.y*t,this.z*t,this.w*t)},times:function(t){return this.timesScalar(t)},componentTimes:function(t){return new e(this.x*t.x,this.y*t.y,this.z*t.z,this.w*t.w)},plus:function(t){return new e(this.x+t.x,this.y+t.y,this.z+t.z,this.w+t.w)},plusXYZW:function(t,i,n,r){return new e(this.x+t,this.y+i,this.z+n,this.w+r)},plusScalar:function(t){return new e(this.x+t,this.y+t,this.z+t,this.w+t)},minus:function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z,this.w-t.w)},minusXYZW:function(t,i,n,r){return new e(this.x-t,this.y-i,this.z-n,this.w-r)},minusScalar:function(t){return new e(this.x-t,this.y-t,this.z-t,this.w-t)},dividedScalar:function(t){return new e(this.x/t,this.y/t,this.z/t,this.w/t)},negated:function(){return new e(-this.x,-this.y,-this.z,-this.w)},blend:function(t,e){return this.plus(t.minus(this).times(e))},average:function(t){return this.blend(t,.5)},toString:function(){return"Vector4("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},toVector3:function(){return new i.Vector3(this.x,this.y,this.z)},setXYZW:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},set:function(t){return this.setXYZW(t.x,t.y,t.z,t.w)},setMagnitude:function(t){var e=t/this.magnitude();return this.multiplyScalar(e)},add:function(t){return this.setXYZW(this.x+t.x,this.y+t.y,this.z+t.z,this.w+t.w)},addXYZW:function(t,e,i,n){return this.setXYZW(this.x+t,this.y+e,this.z+i,this.w+n)},addScalar:function(t){return this.setXYZW(this.x+t,this.y+t,this.z+t,this.w+t)},subtract:function(t){return this.setXYZW(this.x-t.x,this.y-t.y,this.z-t.z,this.w-t.w)},subtractXYZW:function(t,e,i,n){return this.setXYZW(this.x-t,this.y-e,this.z-i,this.w-n)},subtractScalar:function(t){return this.setXYZW(this.x-t,this.y-t,this.z-t,this.w-t)},multiplyScalar:function(t){return this.setXYZW(this.x*t,this.y*t,this.z*t,this.w*t)},multiply:function(t){return this.multiplyScalar(t)},componentMultiply:function(t){return this.setXYZW(this.x*t.x,this.y*t.y,this.z*t.z,this.w*t.w)},divideScalar:function(t){return this.setXYZW(this.x/t,this.y/t,this.z/t,this.w/t)},negate:function(){return this.setXYZW(-this.x,-this.y,-this.z,-this.w)},normalize:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return this.divideScalar(t)}}),r.mixin(e,{defaultFactory:function(){return new e},constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().setXY(i,n,r,s):new e(i,n,r,s)}}}),e.Immutable=function(t,e,i,n){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0,this.w=void 0!==n?n:1};var s=e.Immutable;return n(e,s),s.mutableOverrideHelper=function(t){s.prototype[t]=function(){throw new Error("Cannot call mutable method '"+t+"' on immutable Vector4")}},s.mutableOverrideHelper("setXYZW"),s.mutableOverrideHelper("setX"),s.mutableOverrideHelper("setY"),s.mutableOverrideHelper("setZ"),s.mutableOverrideHelper("setW"),e.ZERO=new e(0,0,0,0),e.X_UNIT=new e(1,0,0,0),e.Y_UNIT=new e(0,1,0,0),e.Z_UNIT=new e(0,0,1,0),e.W_UNIT=new e(0,0,0,1),e}),i("DOT/Vector3",["require","DOT/dot","PHET_CORE/inherit","PHET_CORE/Poolable","DOT/Util","DOT/Vector2","DOT/Vector4"],function(t){"use strict";function e(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}var i=t("DOT/dot"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable");t("DOT/Util"),t("DOT/Vector2"),t("DOT/Vector4"),i.register("Vector3",e),n(Object,e,{isVector3:!0,dimension:3,magnitude:function(){return Math.sqrt(this.magnitudeSquared())},magnitudeSquared:function(){return this.dot(this)},distance:function(t){return Math.sqrt(this.distanceSquared(t))},distanceXYZ:function(t,e,i){var n=this.x-t,r=this.y-e,s=this.z-i;return Math.sqrt(n*n+r*r+s*s)},distanceSquared:function(t){var e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n},distanceSquaredXYZ:function(t,e,i){var n=this.x-t,r=this.y-e,s=this.z-i;return n*n+r*r+s*s},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},dotXYZ:function(t,e,i){return this.x*t+this.y*e+this.z*i},angleBetween:function(t){return Math.acos(i.clamp(this.normalized().dot(t.normalized()),-1,1))},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},equalsEpsilon:function(t,e){return e||(e=0),Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)<=e},isFinite:function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.z)},copy:function(t){return t?t.set(this):new e(this.x,this.y,this.z)},cross:function(t){return new e(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},normalized:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return new e(this.x/t,this.y/t,this.z/t)},withMagnitude:function(t){return this.copy().setMagnitude(t)},timesScalar:function(t){return new e(this.x*t,this.y*t,this.z*t);
},times:function(t){return this.timesScalar(t)},componentTimes:function(t){return new e(this.x*t.x,this.y*t.y,this.z*t.z)},plus:function(t){return new e(this.x+t.x,this.y+t.y,this.z+t.z)},plusXYZ:function(t,i,n){return new e(this.x+t,this.y+i,this.z+n)},plusScalar:function(t){return new e(this.x+t,this.y+t,this.z+t)},minus:function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z)},minusXYZ:function(t,i,n){return new e(this.x-t,this.y-i,this.z-n)},minusScalar:function(t){return new e(this.x-t,this.y-t,this.z-t)},dividedScalar:function(t){return new e(this.x/t,this.y/t,this.z/t)},negated:function(){return new e(-this.x,-this.y,-this.z)},blend:function(t,e){return this.plus(t.minus(this).times(e))},average:function(t){return this.blend(t,.5)},toString:function(){return"Vector3("+this.x+", "+this.y+", "+this.z+")"},toVector2:function(){return new i.Vector2(this.x,this.y)},toVector4:function(){return new i.Vector4(this.x,this.y,this.z,1)},setXYZ:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},set:function(t){return this.setXYZ(t.x,t.y,t.z)},setMagnitude:function(t){var e=t/this.magnitude();return this.multiplyScalar(e)},add:function(t){return this.setXYZ(this.x+t.x,this.y+t.y,this.z+t.z)},addXYZ:function(t,e,i){return this.setXYZ(this.x+t,this.y+e,this.z+i)},addScalar:function(t){return this.setXYZ(this.x+t,this.y+t,this.z+t)},subtract:function(t){return this.setXYZ(this.x-t.x,this.y-t.y,this.z-t.z)},subtractXYZ:function(t,e,i){return this.setXYZ(this.x-t,this.y-e,this.z-i)},subtractScalar:function(t){return this.setXYZ(this.x-t,this.y-t,this.z-t)},multiplyScalar:function(t){return this.setXYZ(this.x*t,this.y*t,this.z*t)},multiply:function(t){return this.multiplyScalar(t)},componentMultiply:function(t){return this.setXYZ(this.x*t.x,this.y*t.y,this.z*t.z)},divideScalar:function(t){return this.setXYZ(this.x/t,this.y/t,this.z/t)},negate:function(){return this.setXYZ(-this.x,-this.y,-this.z)},normalize:function(){var t=this.magnitude();if(0===t)throw new Error("Cannot normalize a zero-magnitude vector");return this.divideScalar(t)}},{slerp:function(t,e,n){return i.Quaternion.slerp(new i.Quaternion,i.Quaternion.getRotationQuaternion(t,e),n).timesVector3(t)}}),r.mixin(e,{defaultFactory:function(){return new e},constructorDuplicateFactory:function(t){return function(i,n,r){return t.length?t.pop().setXY(i,n,r):new e(i,n,r)}}}),e.Immutable=function(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0};var s=e.Immutable;return n(e,s),s.mutableOverrideHelper=function(t){s.prototype[t]=function(){throw new Error("Cannot call mutable method '"+t+"' on immutable Vector3")}},s.mutableOverrideHelper("setXYZ"),s.mutableOverrideHelper("setX"),s.mutableOverrideHelper("setY"),s.mutableOverrideHelper("setZ"),e.ZERO=new e(0,0,0),e.X_UNIT=new e(1,0,0),e.Y_UNIT=new e(0,1,0),e.Z_UNIT=new e(0,0,1),e}),i("DOT/Matrix4",["require","DOT/dot","DOT/Vector3","DOT/Vector4"],function(t){"use strict";function e(t,e,i,r,s,a,o,h,l,u,c,d,m,f,p,g,b){this.entries=new n(16),this.rowMajor(void 0!==t?t:1,void 0!==e?e:0,void 0!==i?i:0,void 0!==r?r:0,void 0!==s?s:0,void 0!==a?a:1,void 0!==o?o:0,void 0!==h?h:0,void 0!==l?l:0,void 0!==u?u:0,void 0!==c?c:1,void 0!==d?d:0,void 0!==m?m:0,void 0!==f?f:0,void 0!==p?p:0,void 0!==g?g:1,b)}var i=t("DOT/dot");t("DOT/Vector3"),t("DOT/Vector4");var n=window.Float32Array||Array;i.register("Matrix4",e),e.Types={OTHER:0,IDENTITY:1,TRANSLATION_3D:2,SCALING:3,AFFINE:4};var r=e.Types;return e.identity=function(){return new e(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,r.IDENTITY)},e.translation=function(t,i,n){return new e(1,0,0,t,0,1,0,i,0,0,1,n,0,0,0,1,r.TRANSLATION_3D)},e.translationFromVector=function(t){return e.translation(t.x,t.y,t.z)},e.scaling=function(t,i,n){return i=void 0===i?t:i,n=void 0===n?t:n,new e(t,0,0,0,0,i,0,0,0,0,n,0,0,0,0,1,r.SCALING)},e.rotationAxisAngle=function(t,i){var n=Math.cos(i),s=Math.sin(i),a=1-n;return new e(t.x*t.x*a+n,t.x*t.y*a-t.z*s,t.x*t.z*a+t.y*s,0,t.y*t.x*a+t.z*s,t.y*t.y*a+n,t.y*t.z*a-t.x*s,0,t.z*t.x*a-t.y*s,t.z*t.y*a+t.x*s,t.z*t.z*a+n,0,0,0,0,1,r.AFFINE)},e.rotationX=function(t){var i=Math.cos(t),n=Math.sin(t);return new e(1,0,0,0,0,i,-n,0,0,n,i,0,0,0,0,1,r.AFFINE)},e.rotationY=function(t){var i=Math.cos(t),n=Math.sin(t);return new e(i,0,n,0,0,1,0,0,-n,0,i,0,0,0,0,1,r.AFFINE)},e.rotationZ=function(t){var i=Math.cos(t),n=Math.sin(t);return new e(i,-n,0,0,n,i,0,0,0,0,1,0,0,0,0,1,r.AFFINE)},e.gluPerspective=function(t,i,n,r){var s=Math.cos(t)/Math.sin(t);return new e(s/i,0,0,0,0,s,0,0,0,0,(r+n)/(n-r),2*r*n/(n-r),0,0,-1,0)},e.prototype={constructor:e,rowMajor:function(t,e,i,n,s,a,o,h,l,u,c,d,m,f,p,g,b){return this.entries[0]=t,this.entries[1]=s,this.entries[2]=l,this.entries[3]=m,this.entries[4]=e,this.entries[5]=a,this.entries[6]=u,this.entries[7]=f,this.entries[8]=i,this.entries[9]=o,this.entries[10]=c,this.entries[11]=p,this.entries[12]=n,this.entries[13]=h,this.entries[14]=d,this.entries[15]=g,this.type=void 0===b?0===m&&0===f&&0===p&&1===g?r.AFFINE:r.OTHER:b,this},columnMajor:function(t,e,i,n,r,s,a,o,h,l,u,c,d,m,f,p,g){return this.rowMajor(t,r,h,d,e,s,l,m,i,a,u,f,n,o,c,p,g)},set:function(t){return this.rowMajor(t.m00(),t.m01(),t.m02(),t.m03(),t.m10(),t.m11(),t.m12(),t.m13(),t.m20(),t.m21(),t.m22(),t.m23(),t.m30(),t.m31(),t.m32(),t.m33(),t.type)},m00:function(){return this.entries[0]},m01:function(){return this.entries[4]},m02:function(){return this.entries[8]},m03:function(){return this.entries[12]},m10:function(){return this.entries[1]},m11:function(){return this.entries[5]},m12:function(){return this.entries[9]},m13:function(){return this.entries[13]},m20:function(){return this.entries[2]},m21:function(){return this.entries[6]},m22:function(){return this.entries[10]},m23:function(){return this.entries[14]},m30:function(){return this.entries[3]},m31:function(){return this.entries[7]},m32:function(){return this.entries[11]},m33:function(){return this.entries[15]},isFinite:function(){return isFinite(this.m00())&&isFinite(this.m01())&&isFinite(this.m02())&&isFinite(this.m03())&&isFinite(this.m10())&&isFinite(this.m11())&&isFinite(this.m12())&&isFinite(this.m13())&&isFinite(this.m20())&&isFinite(this.m21())&&isFinite(this.m22())&&isFinite(this.m23())&&isFinite(this.m30())&&isFinite(this.m31())&&isFinite(this.m32())&&isFinite(this.m33())},getTranslation:function(){return new i.Vector3(this.m03(),this.m13(),this.m23())},get translation(){return this.getTranslation()},getScaleVector:function(){var t=this.m00()+this.m03(),e=this.m10()+this.m13(),n=this.m20()+this.m23(),r=this.m30()+this.m33(),s=this.m01()+this.m03(),a=this.m11()+this.m13(),o=this.m21()+this.m23(),h=this.m31()+this.m33(),l=this.m02()+this.m03(),u=this.m12()+this.m13(),c=this.m22()+this.m23(),d=this.m32()+this.m33();return new i.Vector3(Math.sqrt(t*t+e*e+n*n+r*r),Math.sqrt(s*s+a*a+o*o+h*h),Math.sqrt(l*l+u*u+c*c+d*d))},get scaleVector(){return this.getScaleVector()},getCSSTransform:function(){return"matrix3d("+this.entries[0].toFixed(20)+","+this.entries[1].toFixed(20)+","+this.entries[2].toFixed(20)+","+this.entries[3].toFixed(20)+","+this.entries[4].toFixed(20)+","+this.entries[5].toFixed(20)+","+this.entries[6].toFixed(20)+","+this.entries[7].toFixed(20)+","+this.entries[8].toFixed(20)+","+this.entries[9].toFixed(20)+","+this.entries[10].toFixed(20)+","+this.entries[11].toFixed(20)+","+this.entries[12].toFixed(20)+","+this.entries[13].toFixed(20)+","+this.entries[14].toFixed(20)+","+this.entries[15].toFixed(20)+")"},get cssTransform(){return this.getCSSTransform()},equals:function(t){return this.m00()===t.m00()&&this.m01()===t.m01()&&this.m02()===t.m02()&&this.m03()===t.m03()&&this.m10()===t.m10()&&this.m11()===t.m11()&&this.m12()===t.m12()&&this.m13()===t.m13()&&this.m20()===t.m20()&&this.m21()===t.m21()&&this.m22()===t.m22()&&this.m23()===t.m23()&&this.m30()===t.m30()&&this.m31()===t.m31()&&this.m32()===t.m32()&&this.m33()===t.m33()},equalsEpsilon:function(t,e){return Math.abs(this.m00()-t.m00())<e&&Math.abs(this.m01()-t.m01())<e&&Math.abs(this.m02()-t.m02())<e&&Math.abs(this.m03()-t.m03())<e&&Math.abs(this.m10()-t.m10())<e&&Math.abs(this.m11()-t.m11())<e&&Math.abs(this.m12()-t.m12())<e&&Math.abs(this.m13()-t.m13())<e&&Math.abs(this.m20()-t.m20())<e&&Math.abs(this.m21()-t.m21())<e&&Math.abs(this.m22()-t.m22())<e&&Math.abs(this.m23()-t.m23())<e&&Math.abs(this.m30()-t.m30())<e&&Math.abs(this.m31()-t.m31())<e&&Math.abs(this.m32()-t.m32())<e&&Math.abs(this.m33()-t.m33())<e},copy:function(){return new e(this.m00(),this.m01(),this.m02(),this.m03(),this.m10(),this.m11(),this.m12(),this.m13(),this.m20(),this.m21(),this.m22(),this.m23(),this.m30(),this.m31(),this.m32(),this.m33(),this.type)},plus:function(t){return new e(this.m00()+t.m00(),this.m01()+t.m01(),this.m02()+t.m02(),this.m03()+t.m03(),this.m10()+t.m10(),this.m11()+t.m11(),this.m12()+t.m12(),this.m13()+t.m13(),this.m20()+t.m20(),this.m21()+t.m21(),this.m22()+t.m22(),this.m23()+t.m23(),this.m30()+t.m30(),this.m31()+t.m31(),this.m32()+t.m32(),this.m33()+t.m33())},minus:function(t){return new e(this.m00()-t.m00(),this.m01()-t.m01(),this.m02()-t.m02(),this.m03()-t.m03(),this.m10()-t.m10(),this.m11()-t.m11(),this.m12()-t.m12(),this.m13()-t.m13(),this.m20()-t.m20(),this.m21()-t.m21(),this.m22()-t.m22(),this.m23()-t.m23(),this.m30()-t.m30(),this.m31()-t.m31(),this.m32()-t.m32(),this.m33()-t.m33())},transposed:function(){return new e(this.m00(),this.m10(),this.m20(),this.m30(),this.m01(),this.m11(),this.m21(),this.m31(),this.m02(),this.m12(),this.m22(),this.m32(),this.m03(),this.m13(),this.m23(),this.m33())},negated:function(){return new e(-this.m00(),-this.m01(),-this.m02(),-this.m03(),-this.m10(),-this.m11(),-this.m12(),-this.m13(),-this.m20(),-this.m21(),-this.m22(),-this.m23(),-this.m30(),-this.m31(),-this.m32(),-this.m33())},inverted:function(){switch(this.type){case r.IDENTITY:return this;case r.TRANSLATION_3D:return new e(1,0,0,-this.m03(),0,1,0,-this.m13(),0,0,1,-this.m23(),0,0,0,1,r.TRANSLATION_3D);case r.SCALING:return new e(1/this.m00(),0,0,0,0,1/this.m11(),0,0,0,0,1/this.m22(),0,0,0,0,1/this.m33(),r.SCALING);case r.AFFINE:case r.OTHER:var t=this.getDeterminant();if(0!==t)return new e((-this.m31()*this.m22()*this.m13()+this.m21()*this.m32()*this.m13()+this.m31()*this.m12()*this.m23()-this.m11()*this.m32()*this.m23()-this.m21()*this.m12()*this.m33()+this.m11()*this.m22()*this.m33())/t,(this.m31()*this.m22()*this.m03()-this.m21()*this.m32()*this.m03()-this.m31()*this.m02()*this.m23()+this.m01()*this.m32()*this.m23()+this.m21()*this.m02()*this.m33()-this.m01()*this.m22()*this.m33())/t,(-this.m31()*this.m12()*this.m03()+this.m11()*this.m32()*this.m03()+this.m31()*this.m02()*this.m13()-this.m01()*this.m32()*this.m13()-this.m11()*this.m02()*this.m33()+this.m01()*this.m12()*this.m33())/t,(this.m21()*this.m12()*this.m03()-this.m11()*this.m22()*this.m03()-this.m21()*this.m02()*this.m13()+this.m01()*this.m22()*this.m13()+this.m11()*this.m02()*this.m23()-this.m01()*this.m12()*this.m23())/t,(this.m30()*this.m22()*this.m13()-this.m20()*this.m32()*this.m13()-this.m30()*this.m12()*this.m23()+this.m10()*this.m32()*this.m23()+this.m20()*this.m12()*this.m33()-this.m10()*this.m22()*this.m33())/t,(-this.m30()*this.m22()*this.m03()+this.m20()*this.m32()*this.m03()+this.m30()*this.m02()*this.m23()-this.m00()*this.m32()*this.m23()-this.m20()*this.m02()*this.m33()+this.m00()*this.m22()*this.m33())/t,(this.m30()*this.m12()*this.m03()-this.m10()*this.m32()*this.m03()-this.m30()*this.m02()*this.m13()+this.m00()*this.m32()*this.m13()+this.m10()*this.m02()*this.m33()-this.m00()*this.m12()*this.m33())/t,(-this.m20()*this.m12()*this.m03()+this.m10()*this.m22()*this.m03()+this.m20()*this.m02()*this.m13()-this.m00()*this.m22()*this.m13()-this.m10()*this.m02()*this.m23()+this.m00()*this.m12()*this.m23())/t,(-this.m30()*this.m21()*this.m13()+this.m20()*this.m31()*this.m13()+this.m30()*this.m11()*this.m23()-this.m10()*this.m31()*this.m23()-this.m20()*this.m11()*this.m33()+this.m10()*this.m21()*this.m33())/t,(this.m30()*this.m21()*this.m03()-this.m20()*this.m31()*this.m03()-this.m30()*this.m01()*this.m23()+this.m00()*this.m31()*this.m23()+this.m20()*this.m01()*this.m33()-this.m00()*this.m21()*this.m33())/t,(-this.m30()*this.m11()*this.m03()+this.m10()*this.m31()*this.m03()+this.m30()*this.m01()*this.m13()-this.m00()*this.m31()*this.m13()-this.m10()*this.m01()*this.m33()+this.m00()*this.m11()*this.m33())/t,(this.m20()*this.m11()*this.m03()-this.m10()*this.m21()*this.m03()-this.m20()*this.m01()*this.m13()+this.m00()*this.m21()*this.m13()+this.m10()*this.m01()*this.m23()-this.m00()*this.m11()*this.m23())/t,(this.m30()*this.m21()*this.m12()-this.m20()*this.m31()*this.m12()-this.m30()*this.m11()*this.m22()+this.m10()*this.m31()*this.m22()+this.m20()*this.m11()*this.m32()-this.m10()*this.m21()*this.m32())/t,(-this.m30()*this.m21()*this.m02()+this.m20()*this.m31()*this.m02()+this.m30()*this.m01()*this.m22()-this.m00()*this.m31()*this.m22()-this.m20()*this.m01()*this.m32()+this.m00()*this.m21()*this.m32())/t,(this.m30()*this.m11()*this.m02()-this.m10()*this.m31()*this.m02()-this.m30()*this.m01()*this.m12()+this.m00()*this.m31()*this.m12()+this.m10()*this.m01()*this.m32()-this.m00()*this.m11()*this.m32())/t,(-this.m20()*this.m11()*this.m02()+this.m10()*this.m21()*this.m02()+this.m20()*this.m01()*this.m12()-this.m00()*this.m21()*this.m12()-this.m10()*this.m01()*this.m22()+this.m00()*this.m11()*this.m22())/t);throw new Error("Matrix could not be inverted, determinant === 0");default:throw new Error("Matrix3.inverted with unknown type: "+this.type)}},timesMatrix:function(t){if(this.type===r.IDENTITY||t.type===r.IDENTITY)return this.type===r.IDENTITY?t:this;if(this.type===t.type){if(this.type===r.TRANSLATION_3D)return new e(1,0,0,this.m03()+t.m02(),0,1,0,this.m13()+t.m12(),0,0,1,this.m23()+t.m23(),0,0,0,1,r.TRANSLATION_3D);if(this.type===r.SCALING)return new e(this.m00()*t.m00(),0,0,0,0,this.m11()*t.m11(),0,0,0,0,this.m22()*t.m22(),0,0,0,0,1,r.SCALING)}return this.type!==r.OTHER&&t.type!==r.OTHER?new e(this.m00()*t.m00()+this.m01()*t.m10()+this.m02()*t.m20(),this.m00()*t.m01()+this.m01()*t.m11()+this.m02()*t.m21(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02()*t.m22(),this.m00()*t.m03()+this.m01()*t.m13()+this.m02()*t.m23()+this.m03(),this.m10()*t.m00()+this.m11()*t.m10()+this.m12()*t.m20(),this.m10()*t.m01()+this.m11()*t.m11()+this.m12()*t.m21(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12()*t.m22(),this.m10()*t.m03()+this.m11()*t.m13()+this.m12()*t.m23()+this.m13(),this.m20()*t.m00()+this.m21()*t.m10()+this.m22()*t.m20(),this.m20()*t.m01()+this.m21()*t.m11()+this.m22()*t.m21(),this.m20()*t.m02()+this.m21()*t.m12()+this.m22()*t.m22(),this.m20()*t.m03()+this.m21()*t.m13()+this.m22()*t.m23()+this.m23(),0,0,0,1,r.AFFINE):new e(this.m00()*t.m00()+this.m01()*t.m10()+this.m02()*t.m20()+this.m03()*t.m30(),this.m00()*t.m01()+this.m01()*t.m11()+this.m02()*t.m21()+this.m03()*t.m31(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02()*t.m22()+this.m03()*t.m32(),this.m00()*t.m03()+this.m01()*t.m13()+this.m02()*t.m23()+this.m03()*t.m33(),this.m10()*t.m00()+this.m11()*t.m10()+this.m12()*t.m20()+this.m13()*t.m30(),this.m10()*t.m01()+this.m11()*t.m11()+this.m12()*t.m21()+this.m13()*t.m31(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12()*t.m22()+this.m13()*t.m32(),this.m10()*t.m03()+this.m11()*t.m13()+this.m12()*t.m23()+this.m13()*t.m33(),this.m20()*t.m00()+this.m21()*t.m10()+this.m22()*t.m20()+this.m23()*t.m30(),this.m20()*t.m01()+this.m21()*t.m11()+this.m22()*t.m21()+this.m23()*t.m31(),this.m20()*t.m02()+this.m21()*t.m12()+this.m22()*t.m22()+this.m23()*t.m32(),this.m20()*t.m03()+this.m21()*t.m13()+this.m22()*t.m23()+this.m23()*t.m33(),this.m30()*t.m00()+this.m31()*t.m10()+this.m32()*t.m20()+this.m33()*t.m30(),this.m30()*t.m01()+this.m31()*t.m11()+this.m32()*t.m21()+this.m33()*t.m31(),this.m30()*t.m02()+this.m31()*t.m12()+this.m32()*t.m22()+this.m33()*t.m32(),this.m30()*t.m03()+this.m31()*t.m13()+this.m32()*t.m23()+this.m33()*t.m33())},timesVector4:function(t){var e=this.m00()*t.x+this.m01()*t.y+this.m02()*t.z+this.m03()*t.w,n=this.m10()*t.x+this.m11()*t.y+this.m12()*t.z+this.m13()*t.w,r=this.m20()*t.x+this.m21()*t.y+this.m22()*t.z+this.m23()*t.w,s=this.m30()*t.x+this.m31()*t.y+this.m32()*t.z+this.m33()*t.w;return new i.Vector4(e,n,r,s)},timesVector3:function(t){return this.timesVector4(t.toVector4()).toVector3()},timesTransposeVector4:function(t){var e=this.m00()*t.x+this.m10()*t.y+this.m20()*t.z+this.m30()*t.w,n=this.m01()*t.x+this.m11()*t.y+this.m21()*t.z+this.m31()*t.w,r=this.m02()*t.x+this.m12()*t.y+this.m22()*t.z+this.m32()*t.w,s=this.m03()*t.x+this.m13()*t.y+this.m23()*t.z+this.m33()*t.w;return new i.Vector4(e,n,r,s)},timesTransposeVector3:function(t){return this.timesTransposeVector4(t.toVector4()).toVector3()},timesRelativeVector3:function(t){var e=this.m00()*t.x+this.m10()*t.y+this.m20()*t.z,n=this.m01()*t.y+this.m11()*t.y+this.m21()*t.z,r=this.m02()*t.z+this.m12()*t.y+this.m22()*t.z;return new i.Vector3(e,n,r)},getDeterminant:function(){return this.m03()*this.m12()*this.m21()*this.m30()-this.m02()*this.m13()*this.m21()*this.m30()-this.m03()*this.m11()*this.m22()*this.m30()+this.m01()*this.m13()*this.m22()*this.m30()+this.m02()*this.m11()*this.m23()*this.m30()-this.m01()*this.m12()*this.m23()*this.m30()-this.m03()*this.m12()*this.m20()*this.m31()+this.m02()*this.m13()*this.m20()*this.m31()+this.m03()*this.m10()*this.m22()*this.m31()-this.m00()*this.m13()*this.m22()*this.m31()-this.m02()*this.m10()*this.m23()*this.m31()+this.m00()*this.m12()*this.m23()*this.m31()+this.m03()*this.m11()*this.m20()*this.m32()-this.m01()*this.m13()*this.m20()*this.m32()-this.m03()*this.m10()*this.m21()*this.m32()+this.m00()*this.m13()*this.m21()*this.m32()+this.m01()*this.m10()*this.m23()*this.m32()-this.m00()*this.m11()*this.m23()*this.m32()-this.m02()*this.m11()*this.m20()*this.m33()+this.m01()*this.m12()*this.m20()*this.m33()+this.m02()*this.m10()*this.m21()*this.m33()-this.m00()*this.m12()*this.m21()*this.m33()-this.m01()*this.m10()*this.m22()*this.m33()+this.m00()*this.m11()*this.m22()*this.m33()},get determinant(){return this.getDeterminant()},toString:function(){return this.m00()+" "+this.m01()+" "+this.m02()+" "+this.m03()+"\n"+this.m10()+" "+this.m11()+" "+this.m12()+" "+this.m13()+"\n"+this.m20()+" "+this.m21()+" "+this.m22()+" "+this.m23()+"\n"+this.m30()+" "+this.m31()+" "+this.m32()+" "+this.m33()},makeImmutable:function(){this.rowMajor=function(){throw new Error("Cannot modify immutable matrix")}}},e.IDENTITY=new e,e.IDENTITY.makeImmutable(),e}),i("DOT/Matrix3",["require","DOT/dot","PHET_CORE/Poolable","DOT/Vector2","DOT/Vector3","DOT/Matrix4"],function(t){"use strict";function e(t){this.entries=a(),this.type=o.IDENTITY}var i=t("DOT/dot"),n=t("PHET_CORE/Poolable"),r=i.FastArray;t("DOT/Vector2"),t("DOT/Vector3"),t("DOT/Matrix4");var s=new r(9);s[0]=1,s[4]=1,s[8]=1;var a=r===Array?function(){return[1,0,0,0,1,0,0,0,1]}:function(){return new r(s)};i.register("Matrix3",e),e.Types={OTHER:0,IDENTITY:1,TRANSLATION_2D:2,SCALING:3,AFFINE:4};var o=e.Types;return e.identity=function(){return e.dirtyFromPool().setToIdentity()},e.translation=function(t,i){return e.dirtyFromPool().setToTranslation(t,i)},e.translationFromVector=function(t){return e.translation(t.x,t.y)},e.scaling=function(t,i){return e.dirtyFromPool().setToScale(t,i)},e.scale=e.scaling,e.affine=function(t,i,n,r,s,a){return e.dirtyFromPool().setToAffine(t,n,s,i,r,a)},e.rowMajor=function(t,i,n,r,s,a,o,h,l,u){return e.dirtyFromPool().rowMajor(t,i,n,r,s,a,o,h,l,u)},e.rotationAxisAngle=function(t,i){return e.dirtyFromPool().setToRotationAxisAngle(t,i)},e.rotationX=function(t){return e.dirtyFromPool().setToRotationX(t)},e.rotationY=function(t){return e.dirtyFromPool().setToRotationY(t)},e.rotationZ=function(t){return e.dirtyFromPool().setToRotationZ(t)},e.rotation2=e.rotationZ,e.rotationAround=function(t,i,n){return e.translation(i,n).timesMatrix(e.rotation2(t)).timesMatrix(e.translation(-i,-n))},e.rotationAroundPoint=function(t,i){return e.rotationAround(t,i.x,i.y)},e.fromSVGMatrix=function(t){return e.dirtyFromPool().setToSVGMatrix(t)},e.rotateAToB=function(t,i){return e.dirtyFromPool().setRotationAToB(t,i)},e.prototype={constructor:e,m00:function(){return this.entries[0]},m01:function(){return this.entries[3]},m02:function(){return this.entries[6]},m10:function(){return this.entries[1]},m11:function(){return this.entries[4]},m12:function(){return this.entries[7]},m20:function(){return this.entries[2]},m21:function(){return this.entries[5]},m22:function(){return this.entries[8]},isIdentity:function(){return this.type===o.IDENTITY||this.equals(e.IDENTITY)},isFastIdentity:function(){return this.type===o.IDENTITY},isAffine:function(){return this.type===o.AFFINE||0===this.m20()&&0===this.m21()&&1===this.m22()},isAligned:function(){return this.isAffine()&&0===this.m01()&&0===this.m10()},isAxisAligned:function(){return this.isAffine()&&(0===this.m01()&&0===this.m10()||0===this.m00()&&0===this.m11())},isFinite:function(){return isFinite(this.m00())&&isFinite(this.m01())&&isFinite(this.m02())&&isFinite(this.m10())&&isFinite(this.m11())&&isFinite(this.m12())&&isFinite(this.m20())&&isFinite(this.m21())&&isFinite(this.m22())},getDeterminant:function(){return this.m00()*this.m11()*this.m22()+this.m01()*this.m12()*this.m20()+this.m02()*this.m10()*this.m21()-this.m02()*this.m11()*this.m20()-this.m01()*this.m10()*this.m22()-this.m00()*this.m12()*this.m21()},get determinant(){return this.getDeterminant()},getTranslation:function(){return new i.Vector2(this.m02(),this.m12())},get translation(){return this.getTranslation()},getScaleVector:function(){return new i.Vector2(Math.sqrt(this.m00()*this.m00()+this.m10()*this.m10()),Math.sqrt(this.m01()*this.m01()+this.m11()*this.m11()))},get scaleVector(){return this.getScaleVector()},getRotation:function(){return Math.atan2(this.m10(),this.m00())},get rotation(){return this.getRotation()},toMatrix4:function(){return new i.Matrix4(this.m00(),this.m01(),this.m02(),0,this.m10(),this.m11(),this.m12(),0,this.m20(),this.m21(),this.m22(),0,0,0,0,1)},toAffineMatrix4:function(){return new i.Matrix4(this.m00(),this.m01(),0,this.m02(),this.m10(),this.m11(),0,this.m12(),0,0,1,0,0,0,0,1)},toString:function(){return this.m00()+" "+this.m01()+" "+this.m02()+"\n"+this.m10()+" "+this.m11()+" "+this.m12()+"\n"+this.m20()+" "+this.m21()+" "+this.m22()},toSVGMatrix:function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix();return t.a=this.m00(),t.b=this.m10(),t.c=this.m01(),t.d=this.m11(),t.e=this.m02(),t.f=this.m12(),t},getCSSTransform:function(){return"matrix("+this.entries[0].toFixed(20)+","+this.entries[1].toFixed(20)+","+this.entries[3].toFixed(20)+","+this.entries[4].toFixed(20)+","+this.entries[6].toFixed(20)+","+this.entries[7].toFixed(20)+")"},get cssTransform(){return this.getCSSTransform()},getSVGTransform:function(){function t(t){return t.toFixed(20)}switch(this.type){case o.IDENTITY:return"";case o.TRANSLATION_2D:return"translate("+t(this.entries[6])+","+t(this.entries[7])+")";case o.SCALING:return"scale("+t(this.entries[0])+(this.entries[0]===this.entries[4]?"":","+t(this.entries[4]))+")";default:return"matrix("+t(this.entries[0])+","+t(this.entries[1])+","+t(this.entries[3])+","+t(this.entries[4])+","+t(this.entries[6])+","+t(this.entries[7])+")"}},get svgTransform(){return this.getSVGTransform()},getCSSTransformStyles:function(){var t=this.getCSSTransform();return{"-webkit-perspective":1e3,"-webkit-backface-visibility":"hidden","-webkit-transform":t+" translateZ(0)","-moz-transform":t+" translateZ(0)","-ms-transform":t,"-o-transform":t,transform:t,"transform-origin":"top left","-ms-transform-origin":"top left"}},get cssTransformStyles(){return this.getCSSTransformStyles()},equals:function(t){return this.m00()===t.m00()&&this.m01()===t.m01()&&this.m02()===t.m02()&&this.m10()===t.m10()&&this.m11()===t.m11()&&this.m12()===t.m12()&&this.m20()===t.m20()&&this.m21()===t.m21()&&this.m22()===t.m22()},equalsEpsilon:function(t,e){return Math.abs(this.m00()-t.m00())<e&&Math.abs(this.m01()-t.m01())<e&&Math.abs(this.m02()-t.m02())<e&&Math.abs(this.m10()-t.m10())<e&&Math.abs(this.m11()-t.m11())<e&&Math.abs(this.m12()-t.m12())<e&&Math.abs(this.m20()-t.m20())<e&&Math.abs(this.m21()-t.m21())<e&&Math.abs(this.m22()-t.m22())<e},copy:function(){return e.createFromPool(this.m00(),this.m01(),this.m02(),this.m10(),this.m11(),this.m12(),this.m20(),this.m21(),this.m22(),this.type)},plus:function(t){return e.createFromPool(this.m00()+t.m00(),this.m01()+t.m01(),this.m02()+t.m02(),this.m10()+t.m10(),this.m11()+t.m11(),this.m12()+t.m12(),this.m20()+t.m20(),this.m21()+t.m21(),this.m22()+t.m22())},minus:function(t){return e.createFromPool(this.m00()-t.m00(),this.m01()-t.m01(),this.m02()-t.m02(),this.m10()-t.m10(),this.m11()-t.m11(),this.m12()-t.m12(),this.m20()-t.m20(),this.m21()-t.m21(),this.m22()-t.m22())},transposed:function(){return e.createFromPool(this.m00(),this.m10(),this.m20(),this.m01(),this.m11(),this.m21(),this.m02(),this.m12(),this.m22(),this.type===o.IDENTITY||this.type===o.SCALING?this.type:void 0)},negated:function(){return e.createFromPool(-this.m00(),-this.m01(),-this.m02(),-this.m10(),-this.m11(),-this.m12(),-this.m20(),-this.m21(),-this.m22())},inverted:function(){var t;switch(this.type){case o.IDENTITY:return this;case o.TRANSLATION_2D:return e.createFromPool(1,0,-this.m02(),0,1,-this.m12(),0,0,1,o.TRANSLATION_2D);case o.SCALING:return e.createFromPool(1/this.m00(),0,0,0,1/this.m11(),0,0,0,1/this.m22(),o.SCALING);case o.AFFINE:if(t=this.getDeterminant(),0!==t)return e.createFromPool((-this.m12()*this.m21()+this.m11()*this.m22())/t,(this.m02()*this.m21()-this.m01()*this.m22())/t,(-this.m02()*this.m11()+this.m01()*this.m12())/t,(this.m12()*this.m20()-this.m10()*this.m22())/t,(-this.m02()*this.m20()+this.m00()*this.m22())/t,(this.m02()*this.m10()-this.m00()*this.m12())/t,0,0,1,o.AFFINE);throw new Error("Matrix could not be inverted, determinant === 0");case o.OTHER:if(t=this.getDeterminant(),0!==t)return e.createFromPool((-this.m12()*this.m21()+this.m11()*this.m22())/t,(this.m02()*this.m21()-this.m01()*this.m22())/t,(-this.m02()*this.m11()+this.m01()*this.m12())/t,(this.m12()*this.m20()-this.m10()*this.m22())/t,(-this.m02()*this.m20()+this.m00()*this.m22())/t,(this.m02()*this.m10()-this.m00()*this.m12())/t,(-this.m11()*this.m20()+this.m10()*this.m21())/t,(this.m01()*this.m20()-this.m00()*this.m21())/t,(-this.m01()*this.m10()+this.m00()*this.m11())/t,o.OTHER);throw new Error("Matrix could not be inverted, determinant === 0");default:throw new Error("Matrix3.inverted with unknown type: "+this.type)}},timesMatrix:function(t){if(this.type===o.IDENTITY||t.type===o.IDENTITY)return this.type===o.IDENTITY?t:this;if(this.type===t.type){if(this.type===o.TRANSLATION_2D)return e.createFromPool(1,0,this.m02()+t.m02(),0,1,this.m12()+t.m12(),0,0,1,o.TRANSLATION_2D);if(this.type===o.SCALING)return e.createFromPool(this.m00()*t.m00(),0,0,0,this.m11()*t.m11(),0,0,0,1,o.SCALING)}return this.type!==o.OTHER&&t.type!==o.OTHER?e.createFromPool(this.m00()*t.m00()+this.m01()*t.m10(),this.m00()*t.m01()+this.m01()*t.m11(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02(),this.m10()*t.m00()+this.m11()*t.m10(),this.m10()*t.m01()+this.m11()*t.m11(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12(),0,0,1,o.AFFINE):e.createFromPool(this.m00()*t.m00()+this.m01()*t.m10()+this.m02()*t.m20(),this.m00()*t.m01()+this.m01()*t.m11()+this.m02()*t.m21(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02()*t.m22(),this.m10()*t.m00()+this.m11()*t.m10()+this.m12()*t.m20(),this.m10()*t.m01()+this.m11()*t.m11()+this.m12()*t.m21(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12()*t.m22(),this.m20()*t.m00()+this.m21()*t.m10()+this.m22()*t.m20(),this.m20()*t.m01()+this.m21()*t.m11()+this.m22()*t.m21(),this.m20()*t.m02()+this.m21()*t.m12()+this.m22()*t.m22())},timesVector2:function(t){var e=this.m00()*t.x+this.m01()*t.y+this.m02(),n=this.m10()*t.x+this.m11()*t.y+this.m12();return new i.Vector2(e,n)},timesVector3:function(t){var e=this.m00()*t.x+this.m01()*t.y+this.m02()*t.z,n=this.m10()*t.x+this.m11()*t.y+this.m12()*t.z,r=this.m20()*t.x+this.m21()*t.y+this.m22()*t.z;return new i.Vector3(e,n,r)},timesTransposeVector2:function(t){var e=this.m00()*t.x+this.m10()*t.y,n=this.m01()*t.x+this.m11()*t.y;return new i.Vector2(e,n)},timesRelativeVector2:function(t){var e=this.m00()*t.x+this.m01()*t.y,n=this.m10()*t.y+this.m11()*t.y;return new i.Vector2(e,n)},rowMajor:function(t,e,i,n,r,s,a,h,l,u){return this.entries[0]=t,this.entries[1]=n,this.entries[2]=a,this.entries[3]=e,this.entries[4]=r,this.entries[5]=h,this.entries[6]=i,this.entries[7]=s,this.entries[8]=l,this.type=void 0===u?0===a&&0===h&&1===l?o.AFFINE:o.OTHER:u,this},set:function(t){return this.rowMajor(t.m00(),t.m01(),t.m02(),t.m10(),t.m11(),t.m12(),t.m20(),t.m21(),t.m22(),t.type)},setArray:function(t){return this.rowMajor(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},set00:function(t){return this.entries[0]=t,this},set01:function(t){return this.entries[3]=t,this},set02:function(t){return this.entries[6]=t,this},set10:function(t){return this.entries[1]=t,this},set11:function(t){return this.entries[4]=t,this},set12:function(t){return this.entries[7]=t,this},set20:function(t){return this.entries[2]=t,this},set21:function(t){return this.entries[5]=t,this},set22:function(t){return this.entries[8]=t,this},makeImmutable:function(){return this.rowMajor=function(){throw new Error("Cannot modify immutable matrix")},this},columnMajor:function(t,e,i,n,r,s,a,o,h,l){return this.rowMajor(t,n,a,e,r,o,i,s,h,l)},add:function(t){return this.rowMajor(this.m00()+t.m00(),this.m01()+t.m01(),this.m02()+t.m02(),this.m10()+t.m10(),this.m11()+t.m11(),this.m12()+t.m12(),this.m20()+t.m20(),this.m21()+t.m21(),this.m22()+t.m22())},subtract:function(t){return this.rowMajor(this.m00()-t.m00(),this.m01()-t.m01(),this.m02()-t.m02(),this.m10()-t.m10(),this.m11()-t.m11(),this.m12()-t.m12(),this.m20()-t.m20(),this.m21()-t.m21(),this.m22()-t.m22())},transpose:function(){return this.rowMajor(this.m00(),this.m10(),this.m20(),this.m01(),this.m11(),this.m21(),this.m02(),this.m12(),this.m22(),this.type===o.IDENTITY||this.type===o.SCALING?this.type:void 0)},negate:function(){return this.rowMajor(-this.m00(),-this.m01(),-this.m02(),-this.m10(),-this.m11(),-this.m12(),-this.m20(),-this.m21(),-this.m22())},invert:function(){var t;switch(this.type){case o.IDENTITY:return this;case o.TRANSLATION_2D:return this.rowMajor(1,0,-this.m02(),0,1,-this.m12(),0,0,1,o.TRANSLATION_2D);case o.SCALING:return this.rowMajor(1/this.m00(),0,0,0,1/this.m11(),0,0,0,1/this.m22(),o.SCALING);case o.AFFINE:if(t=this.getDeterminant(),0!==t)return this.rowMajor((-this.m12()*this.m21()+this.m11()*this.m22())/t,(this.m02()*this.m21()-this.m01()*this.m22())/t,(-this.m02()*this.m11()+this.m01()*this.m12())/t,(this.m12()*this.m20()-this.m10()*this.m22())/t,(-this.m02()*this.m20()+this.m00()*this.m22())/t,(this.m02()*this.m10()-this.m00()*this.m12())/t,0,0,1,o.AFFINE);throw new Error("Matrix could not be inverted, determinant === 0");case o.OTHER:if(t=this.getDeterminant(),0!==t)return this.rowMajor((-this.m12()*this.m21()+this.m11()*this.m22())/t,(this.m02()*this.m21()-this.m01()*this.m22())/t,(-this.m02()*this.m11()+this.m01()*this.m12())/t,(this.m12()*this.m20()-this.m10()*this.m22())/t,(-this.m02()*this.m20()+this.m00()*this.m22())/t,(this.m02()*this.m10()-this.m00()*this.m12())/t,(-this.m11()*this.m20()+this.m10()*this.m21())/t,(this.m01()*this.m20()-this.m00()*this.m21())/t,(-this.m01()*this.m10()+this.m00()*this.m11())/t,o.OTHER);throw new Error("Matrix could not be inverted, determinant === 0");default:throw new Error("Matrix3.inverted with unknown type: "+this.type)}},multiplyMatrix:function(t){if(t.type===o.IDENTITY)return this;if(this.type===o.IDENTITY)return this.set(t);if(this.type===t.type){if(this.type===o.TRANSLATION_2D)return this.rowMajor(1,0,this.m02()+t.m02(),0,1,this.m12()+t.m12(),0,0,1,o.TRANSLATION_2D);
if(this.type===o.SCALING)return this.rowMajor(this.m00()*t.m00(),0,0,0,this.m11()*t.m11(),0,0,0,1,o.SCALING)}return this.type!==o.OTHER&&t.type!==o.OTHER?this.rowMajor(this.m00()*t.m00()+this.m01()*t.m10(),this.m00()*t.m01()+this.m01()*t.m11(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02(),this.m10()*t.m00()+this.m11()*t.m10(),this.m10()*t.m01()+this.m11()*t.m11(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12(),0,0,1,o.AFFINE):this.rowMajor(this.m00()*t.m00()+this.m01()*t.m10()+this.m02()*t.m20(),this.m00()*t.m01()+this.m01()*t.m11()+this.m02()*t.m21(),this.m00()*t.m02()+this.m01()*t.m12()+this.m02()*t.m22(),this.m10()*t.m00()+this.m11()*t.m10()+this.m12()*t.m20(),this.m10()*t.m01()+this.m11()*t.m11()+this.m12()*t.m21(),this.m10()*t.m02()+this.m11()*t.m12()+this.m12()*t.m22(),this.m20()*t.m00()+this.m21()*t.m10()+this.m22()*t.m20(),this.m20()*t.m01()+this.m21()*t.m11()+this.m22()*t.m21(),this.m20()*t.m02()+this.m21()*t.m12()+this.m22()*t.m22())},prependTranslation:function(t,e){return this.set02(this.m02()+t),this.set12(this.m12()+e),this.type===o.IDENTITY||this.type===o.TRANSLATION_2D?this.type=o.TRANSLATION_2D:this.type===o.OTHER?this.type=o.OTHER:this.type=o.AFFINE,this},setToIdentity:function(){return this.rowMajor(1,0,0,0,1,0,0,0,1,o.IDENTITY)},setToTranslation:function(t,e){return this.rowMajor(1,0,t,0,1,e,0,0,1,o.TRANSLATION_2D)},setToScale:function(t,e){return e=void 0===e?t:e,this.rowMajor(t,0,0,0,e,0,0,0,1,o.SCALING)},setToAffine:function(t,e,i,n,r,s){return this.rowMajor(t,e,i,n,r,s,0,0,1,o.AFFINE)},setToRotationAxisAngle:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i;return this.rowMajor(t.x*t.x*r+i,t.x*t.y*r-t.z*n,t.x*t.z*r+t.y*n,t.y*t.x*r+t.z*n,t.y*t.y*r+i,t.y*t.z*r-t.x*n,t.z*t.x*r-t.y*n,t.z*t.y*r+t.x*n,t.z*t.z*r+i,o.OTHER)},setToRotationX:function(t){var e=Math.cos(t),i=Math.sin(t);return this.rowMajor(1,0,0,0,e,-i,0,i,e,o.OTHER)},setToRotationY:function(t){var e=Math.cos(t),i=Math.sin(t);return this.rowMajor(e,0,i,0,1,0,-i,0,e,o.OTHER)},setToRotationZ:function(t){var e=Math.cos(t),i=Math.sin(t);return this.rowMajor(e,-i,0,i,e,0,0,0,1,o.AFFINE)},setToSVGMatrix:function(t){return this.rowMajor(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1,o.AFFINE)},setRotationAToB:function(t,e){var n,r,s,a=t,o=e,h=1e-4,l=a.cross(o);if(n=a.dot(o),s=0>n?-n:n,s>1-h){var u,c,d,m=new i.Vector3(a.x>0?a.x:-a.x,a.y>0?a.y:-a.y,a.z>0?a.z:-a.z);m=m.x<m.y?m.x<m.z?i.Vector3.X_UNIT:i.Vector3.Z_UNIT:m.y<m.z?i.Vector3.Y_UNIT:i.Vector3.Z_UNIT;var f=m.minus(a);return l=m.minus(o),u=2/f.dot(f),c=2/l.dot(l),d=u*c*f.dot(l),this.rowMajor(-u*f.x*f.x-c*l.x*l.x+d*l.x*f.x+1,-u*f.x*f.y-c*l.x*l.y+d*l.x*f.y,-u*f.x*f.z-c*l.x*l.z+d*l.x*f.z,-u*f.y*f.x-c*l.y*l.x+d*l.y*f.x,-u*f.y*f.y-c*l.y*l.y+d*l.y*f.y+1,-u*f.y*f.z-c*l.y*l.z+d*l.y*f.z,-u*f.z*f.x-c*l.z*l.x+d*l.z*f.x,-u*f.z*f.y-c*l.z*l.y+d*l.z*f.y,-u*f.z*f.z-c*l.z*l.z+d*l.z*f.z+1)}var p,g,b,v,E;return r=1/(1+n),p=r*l.x,g=r*l.z,b=p*l.y,v=p*l.z,E=g*l.y,this.rowMajor(n+p*l.x,b-l.z,v+l.y,b+l.z,n+r*l.y*l.y,E-l.x,v-l.y,E+l.x,n+g*l.z)},setTo32Bit:function(){return window.Float32Array&&(this.entries=new window.Float32Array(this.entries)),this},setTo64Bit:function(){return window.Float64Array&&(this.entries=new window.Float64Array(this.entries)),this},multiplyVector2:function(t){return t.setXY(this.m00()*t.x+this.m01()*t.y+this.m02(),this.m10()*t.x+this.m11()*t.y+this.m12())},multiplyVector3:function(t){return t.setXYZ(this.m00()*t.x+this.m01()*t.y+this.m02()*t.z,this.m10()*t.x+this.m11()*t.y+this.m12()*t.z,this.m20()*t.x+this.m21()*t.y+this.m22()*t.z)},multiplyTransposeVector2:function(t){return t.setXY(this.m00()*t.x+this.m10()*t.y,this.m01()*t.x+this.m11()*t.y)},multiplyRelativeVector2:function(t){return t.setXY(this.m00()*t.x+this.m01()*t.y,this.m10()*t.y+this.m11()*t.y)},canvasSetTransform:function(t){t.setTransform(this.entries[0],this.entries[1],this.entries[3],this.entries[4],this.entries[6],this.entries[7])},canvasAppendTransform:function(t){this.type!==o.IDENTITY&&t.transform(this.entries[0],this.entries[1],this.entries[3],this.entries[4],this.entries[6],this.entries[7])}},n.mixin(e,{defaultFactory:function(){return new e},constructorDuplicateFactory:function(t){return function(i,n,r,s,a,o,h,l,u,c){var d=t.length?t.pop():new e;return d.rowMajor(i,n,r,s,a,o,h,l,u,c)}}}),e.IDENTITY=e.identity(),e.IDENTITY.makeImmutable(),e.X_REFLECTION=e.createFromPool(-1,0,0,0,1,0,0,0,1,o.AFFINE),e.X_REFLECTION.makeImmutable(),e.Y_REFLECTION=e.createFromPool(1,0,0,0,-1,0,0,0,1,o.AFFINE),e.Y_REFLECTION.makeImmutable(),e.translationTimesMatrix=function(t,i,n){var r;return n.type===o.IDENTITY||n.type===o.TRANSLATION_2D?e.createFromPool(1,0,n.m02()+t,0,1,n.m12()+i,0,0,1,o.TRANSLATION_2D):(r=n.type===o.OTHER?o.OTHER:o.AFFINE,e.createFromPool(n.m00(),n.m01(),n.m02()+t,n.m10(),n.m11(),n.m12()+i,n.m20(),n.m21(),n.m22(),r))},e.printer={print:function(t){console.log(t.toString())}},e}),i("KITE/kite",["require","PHET_CORE/Namespace","PHET_CORE/phetAllocation"],function(t){"use strict";var e=t("PHET_CORE/Namespace");window.phetAllocation=t("PHET_CORE/phetAllocation");var i=new e("kite");return i.register("svgNumber",function(t){return t.toFixed(20)}),i}),i("AXON/axon",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("axon")}),i("PHET_CORE/cleanArray",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t){if(t){for(;t.length;)t.pop();return t}return[]}var i=t("PHET_CORE/phetCore");return i.register("cleanArray",e),e}),i("AXON/Events",["require","AXON/axon","PHET_CORE/cleanArray"],function(t){"use strict";function e(t){this._eventListeners={},this._staticEventListeners={},t&&t.tandem&&t.tandem.addInstance(this),this.disposeEvents=function(){t&&t.tandem&&t.tandem.removeInstance(this)}}var i=t("AXON/axon"),n=t("PHET_CORE/cleanArray");return i.register("Events",e),e.prototype={dispose:function(){this.disposeEvents()},on:function(t,e){this._eventListeners[t]=this._eventListeners[t]||[],this._eventListeners[t].push(e)},onStatic:function(t,e){this._staticEventListeners[t]=this._staticEventListeners[t]||[],this._staticEventListeners[t].push(e)},once:function(t,e){var i=this,n=function(){i.off(t,n),0===arguments.length?e():e.apply(this,Array.prototype.slice.call(arguments,0))};return this.on(t,n),n},off:function(t,e){var i=-1;return this._eventListeners[t]&&(i=this._eventListeners[t].indexOf(e),-1!==i&&this._eventListeners[t].splice(i,1)),i},offStatic:function(t,e){var i=-1;return this._staticEventListeners[t]&&(i=this._staticEventListeners[t].indexOf(e),-1!==i&&this._staticEventListeners[t].splice(i,1)),i},hasListener:function(t,e){var i=this._eventListeners[t];return!!i&&i.indexOf(e)>=0},hasStaticListener:function(t,e){var i=this._staticEventListeners[t];return!!i&&i.indexOf(e)>=0},removeAllEventListeners:function(){var t;for(t in this._eventListeners)n(this._eventListeners[t]);for(t in this._staticEventListeners)n(this._staticEventListeners[t])},trigger:function(t){var e,i=this._eventListeners[t],n=this._staticEventListeners[t],r=i?i.length:0,s=n?n.length:0,a=1===arguments.length;!a&&(r>0||s>0)&&(e=Array.prototype.slice.call(arguments,1)),r>0&&(i=i.slice());var o;for(o=0;r>o;o++){var h=i[o];a?h():h.apply(this,e)}for(o=0;s>o;o++){var l=n[o];a?l(arguments):l.apply(this,e)}},trigger0:function(t){var e=this._eventListeners[t],i=this._staticEventListeners[t],n=e?e.length:0,r=i?i.length:0;n>0&&(e=e.slice());var s;for(s=0;n>s;s++)e[s]();for(s=0;r>s;s++)i[s]()},trigger1:function(t,e){var i=this._eventListeners[t],n=this._staticEventListeners[t],r=i?i.length:0,s=n?n.length:0;r>0&&(i=i.slice());var a;for(a=0;r>a;a++)i[a](e);for(a=0;s>a;a++)n[a](e)},trigger2:function(t,e,i){var n=this._eventListeners[t],r=this._staticEventListeners[t],s=n?n.length:0,a=r?r.length:0;s>0&&(n=n.slice());var o;for(o=0;s>o;o++)n[o](e,i);for(o=0;a>o;o++)r[o](e,i)}},e}),i("DOT/Ray2",["require","DOT/dot"],function(t){"use strict";function e(t,e){this.position=t,this.direction=e}var i=t("DOT/dot");return i.register("Ray2",e),e.prototype={constructor:e,shifted:function(t){return new e(this.pointAtDistance(t),this.direction)},pointAtDistance:function(t){return this.position.plus(this.direction.timesScalar(t))},toString:function(){return this.position.toString()+" => "+this.direction.toString()}},e}),i("KITE/segments/Segment",["require","KITE/kite","PHET_CORE/inherit","AXON/Events","DOT/Util","DOT/Bounds2"],function(t){"use strict";function e(){r.call(this)}var i=t("KITE/kite"),n=t("PHET_CORE/inherit"),r=t("AXON/Events"),s=t("DOT/Util"),a=t("DOT/Bounds2");i.register("Segment",e);var o=function(t){return t};return n(r,e,{areStrokedBoundsDilated:function(){var t=1e-7;return Math.abs(this.startTangent.x*this.startTangent.y)<t&&Math.abs(this.endTangent.x*this.endTangent.y)<t},getBoundsWithTransform:function(t){var e=this.transformed(t);return e.getBounds()},subdivisions:function(t){for(var e=this,i=[],n=0;n<t.length;n++){var r=t[n],a=e.subdivided(r);i.push(a[0]),e=a[1];for(var o=n+1;o<t.length;o++)t[o]=s.linear(r,1,0,1,t[o])}return i.push(e),i},subdividedIntoMonotone:function(){return this.subdivisions(this.getInteriorExtremaTs())},toPiecewiseLinearSegments:function(t,e,n,r,a,h){e=void 0===e?t.minLevels:e,n=void 0===n?t.maxLevels:n,r=r||[];var l=t.pointMap||o;a=a||l(this.start),h=h||l(this.end);var u=l(this.positionAt(.5)),c=0===n;if(!c&&0>=e&&(c=(null===t.curveEpsilon||s.distToSegmentSquared(u,a,h)/a.distanceSquared(h)<t.curveEpsilon)&&(null===t.distanceEpsilon||s.distToSegmentSquared(u,a,h)<t.distanceEpsilon)),c)r.push(new i.Line(a,h));else{var d=this.subdivided(.5);d[0].toPiecewiseLinearSegments(t,e-1,n-1,r,a,u),d[1].toPiecewiseLinearSegments(t,e-1,n-1,r,u,h)}return r}}),e.addInvalidatingGetterSetter=function(t,e){var i="_"+e,n=e.charAt(0).toUpperCase()+e.slice(1),r="get"+n,s="set"+n;t.prototype[r]=function(){return this[i]},t.prototype[s]=function(t){return this[i]!==t&&(this[i]=t,this.invalidate()),this},Object.defineProperty(t.prototype,e,{set:t.prototype[s],get:t.prototype[r]})},e.closestToPoint=function(t,e,i){var n=i*i,r=[],s=[],o=Number.POSITIVE_INFINITY,h=!1;for(_.each(t,function(t){if(t.explicitClosestToPoint){var i=t.explicitClosestToPoint(e);_.each(i,function(t){t.distanceSquared<o?(s=[t],o=t.distanceSquared):t.distanceSquared===o&&s.push(t)})}else for(var n=[0].concat(t.getInteriorExtremaTs()).concat([1]),h=0;h<n.length-1;h++){var l=n[h],u=n[h+1],c=t.positionAt(l),d=t.positionAt(u),m=a.point(c).addPoint(d),f=m.minimumDistanceToPointSquared(e);if(o>=f){var p=m.maximumDistanceToPointSquared(e);o>p&&(o=p,s=[]),r.push({ta:l,tb:u,pa:c,pb:d,segment:t,bounds:m,min:f,max:p})}}});r.length&&!h;){var l=r;r=[],h=!0,_.each(l,function(t){if(!(t.minDistanceSquared>o)){h&&t.pa.distanceSquared(t.pb)>n&&(h=!1);var i=(t.ta+t.tb)/2,l=t.segment.positionAt(i),u=a.point(t.pa).addPoint(l),c=a.point(t.pb).addPoint(l),d=u.minimumDistanceToPointSquared(e),m=c.minimumDistanceToPointSquared(e);if(o>=d){var f=u.maximumDistanceToPointSquared(e);o>f&&(o=f,s=[]),r.push({ta:t.ta,tb:i,pa:t.pa,pb:l,segment:t.segment,bounds:u,min:d,max:f})}if(o>=m){var p=c.maximumDistanceToPointSquared(e);o>p&&(o=p,s=[]),r.push({ta:i,tb:t.tb,pa:l,pb:t.pb,segment:t.segment,bounds:c,min:m,max:p})}}})}return _.each(r,function(t){var i=(t.ta+t.tb)/2,n=t.segment.positionAt(i);s.push({segment:t.segment,t:i,closestPoint:n,distanceSquared:e.distanceSquared(n)})}),s},e}),i("KITE/segments/Line",["require","PHET_CORE/inherit","DOT/Bounds2","DOT/Vector2","DOT/Util","KITE/kite","KITE/segments/Segment"],function(t){"use strict";function e(t,e){o.call(this),this._start=t,this._end=e,this.invalidate()}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("DOT/Vector2"),s=t("DOT/Util"),a=t("KITE/kite"),o=t("KITE/segments/Segment"),h=new r;return a.register("Line",e),i(o,e,{invalidate:function(){this._tangent=null,this._bounds=null,this.trigger0("invalidated")},getStartTangent:function(){return null===this._tangent&&(this._tangent=this._end.minus(this._start).normalized()),this._tangent},get startTangent(){return this.getStartTangent()},getEndTangent:function(){return this.getStartTangent()},get endTangent(){return this.getEndTangent()},getBounds:function(){return null===this._bounds&&(this._bounds=n.NOTHING.copy().addPoint(this._start).addPoint(this._end)),this._bounds},get bounds(){return this.getBounds()},getBoundsWithTransform:function(t){var e=n.NOTHING.copy();return e.addPoint(t.multiplyVector2(h.set(this._start))),e.addPoint(t.multiplyVector2(h.set(this._end))),e},getNondegenerateSegments:function(){return this._start.equals(this._end)?[]:[this]},positionAt:function(t){return this._start.plus(this._end.minus(this._start).times(t))},tangentAt:function(t){return this.getStartTangent()},curvatureAt:function(t){return 0},getSVGPathFragment:function(){return"L "+a.svgNumber(this._end.x)+" "+a.svgNumber(this._end.y)},strokeLeft:function(t){var e=this.getEndTangent().perpendicular().negated().times(t/2);return[new a.Line(this._start.plus(e),this._end.plus(e))]},strokeRight:function(t){var e=this.getStartTangent().perpendicular().times(t/2);return[new a.Line(this._end.plus(e),this._start.plus(e))]},getInteriorExtremaTs:function(){return[]},subdivided:function(t){var e=this.positionAt(t);return[new a.Line(this._start,e),new a.Line(e,this._end)]},intersection:function(t){var e=[],i=this._start,n=this._end,r=n.minus(i);if(0===r.magnitudeSquared())return e;var s=t.direction.y*r.x-t.direction.x*r.y;if(0===s)return e;var a=(t.direction.x*(i.y-t.position.y)-t.direction.y*(i.x-t.position.x))/s;if(0>a||a>=1)return e;var o=(r.x*(i.y-t.position.y)-r.y*(i.x-t.position.x))/s;if(1e-8>o)return e;var h=r.perpendicular();return e.push({distance:o,point:i.plus(r.times(a)),normal:h.dot(t.direction)>0?h.negated():h,wind:t.direction.perpendicular().dot(r)<0?1:-1,segment:this}),e},windingIntersection:function(t){var e=this.intersection(t);return e.length?e[0].wind:0},writeToContext:function(t){t.lineTo(this._end.x,this._end.y)},transformed:function(t){return new a.Line(t.timesVector2(this._start),t.timesVector2(this._end))},explicitClosestToPoint:function(t){var e=this._end.minus(this._start),i=t.minus(this._start).dot(e)/e.magnitudeSquared();i=s.clamp(i,0,1);var n=this.positionAt(i);return[{segment:this,t:i,closestPoint:n,distanceSquared:t.distanceSquared(n)}]},reparameterized:function(t,e){return new a.Line(this.positionAt(e),this.positionAt(t+e))},polarToCartesian:function(t){return this._start.x===this._end.x?[new a.Line(r.createPolar(this._start.y,this._start.x),r.createPolar(this._end.y,this._end.x))]:this._start.y===this._end.y?[new a.Arc(r.ZERO,this._start.y,this._start.x,this._end.x,this._start.x>this._end.x)]:this.toPiecewiseLinearSegments(t)}}),o.addInvalidatingGetterSetter(e,"start"),o.addInvalidatingGetterSetter(e,"end"),e}),i("KITE/segments/Arc",["require","PHET_CORE/inherit","DOT/Vector2","DOT/Bounds2","DOT/Util","KITE/kite","KITE/segments/Segment"],function(t){"use strict";function e(t,e,i,n,r){o.call(this),this._center=t,this._radius=e,this._startAngle=i,this._endAngle=n,this._anticlockwise=r,this.invalidate()}var i=t("PHET_CORE/inherit"),n=t("DOT/Vector2"),r=t("DOT/Bounds2"),s=t("DOT/Util"),a=t("KITE/kite"),o=t("KITE/segments/Segment");return a.register("Arc",e),i(o,e,{invalidate:function(){this._start=null,this._end=null,this._startTangent=null,this._endTangent=null,this._actualEndAngle=null,this._isFullPerimeter=null,this._angleDifference=null,this._bounds=null,this._radius<0&&(this._radius=-this._radius,this._startAngle+=Math.PI,this._endAngle+=Math.PI),this.trigger0("invalidated")},getStart:function(){return null===this._start&&(this._start=this.positionAtAngle(this._startAngle)),this._start},get start(){return this.getStart()},getEnd:function(){return null===this._end&&(this._end=this.positionAtAngle(this._endAngle)),this._end},get end(){return this.getEnd()},getStartTangent:function(){return null===this._startTangent&&(this._startTangent=this.tangentAtAngle(this._startAngle)),this._startTangent},get startTangent(){return this.getStartTangent()},getEndTangent:function(){return null===this._endTangent&&(this._endTangent=this.tangentAtAngle(this._endAngle)),this._endTangent},get endTangent(){return this.getEndTangent()},getActualEndAngle:function(){return null===this._actualEndAngle&&(this._anticlockwise?this._startAngle>this._endAngle?this._actualEndAngle=this._endAngle:this._startAngle<this._endAngle?this._actualEndAngle=this._endAngle-2*Math.PI:this._actualEndAngle=this._startAngle:this._startAngle<this._endAngle?this._actualEndAngle=this._endAngle:this._startAngle>this._endAngle?this._actualEndAngle=this._endAngle+2*Math.PI:this._actualEndAngle=this._startAngle),this._actualEndAngle},get actualEndAngle(){return this.getActualEndAngle()},getIsFullPerimeter:function(){return null===this._isFullPerimeter&&(this._isFullPerimeter=!this._anticlockwise&&this._endAngle-this._startAngle>=2*Math.PI||this._anticlockwise&&this._startAngle-this._endAngle>=2*Math.PI),this._isFullPerimeter},get isFullPerimeter(){return this.getIsFullPerimeter()},getAngleDifference:function(){return null===this._angleDifference&&(this._angleDifference=this._anticlockwise?this._startAngle-this._endAngle:this._endAngle-this._startAngle,this._angleDifference<0&&(this._angleDifference+=2*Math.PI)),this._angleDifference},get angleDifference(){return this.getAngleDifference()},getBounds:function(){return null===this._bounds&&(this._bounds=r.NOTHING.copy().withPoint(this.getStart()).withPoint(this.getEnd()),this._startAngle!==this._endAngle&&(this.includeBoundsAtAngle(0),this.includeBoundsAtAngle(Math.PI/2),this.includeBoundsAtAngle(Math.PI),this.includeBoundsAtAngle(3*Math.PI/2))),this._bounds},get bounds(){return this.getBounds()},getNondegenerateSegments:function(){return this._radius<=0||this._startAngle===this._endAngle?[]:[this]},includeBoundsAtAngle:function(t){this.containsAngle(t)&&(this._bounds=this._bounds.withPoint(this._center.plus(n.createPolar(this._radius,t))))},mapAngle:function(t){return this._startAngle>this.getActualEndAngle()?s.moduloBetweenUp(t,this._startAngle-2*Math.PI,this._startAngle):s.moduloBetweenDown(t,this._startAngle,this._startAngle+2*Math.PI)},tAtAngle:function(t){return(this.mapAngle(t)-this._startAngle)/(this.getActualEndAngle()-this._startAngle)},angleAt:function(t){return this._startAngle+(this.getActualEndAngle()-this._startAngle)*t},positionAt:function(t){return this.positionAtAngle(this.angleAt(t))},tangentAt:function(t){return this.tangentAtAngle(this.angleAt(t))},curvatureAt:function(t){return(this._anticlockwise?-1:1)/this._radius},positionAtAngle:function(t){return this._center.plus(n.createPolar(this._radius,t))},tangentAtAngle:function(t){var e=n.createPolar(1,t);return this._anticlockwise?e.perpendicular():e.perpendicular().negated()},containsAngle:function(t){var e=this._anticlockwise?t-this._endAngle:t-this._startAngle,i=s.moduloBetweenDown(e,0,2*Math.PI);return i<=this.angleDifference},getSVGPathFragment:function(){var t,e=.01,i=this._anticlockwise?"0":"1";if(this.angleDifference<2*Math.PI-e)return t=this.angleDifference<Math.PI?"0":"1","A "+a.svgNumber(this._radius)+" "+a.svgNumber(this._radius)+" 0 "+t+" "+i+" "+a.svgNumber(this.end.x)+" "+a.svgNumber(this.end.y);var r=(this._startAngle+this._endAngle)/2,s=this._center.plus(n.createPolar(this._radius,r));t="0";var o="A "+a.svgNumber(this._radius)+" "+a.svgNumber(this._radius)+" 0 "+t+" "+i+" "+a.svgNumber(s.x)+" "+a.svgNumber(s.y),h="A "+a.svgNumber(this._radius)+" "+a.svgNumber(this._radius)+" 0 "+t+" "+i+" "+a.svgNumber(this.end.x)+" "+a.svgNumber(this.end.y);return o+" "+h},strokeLeft:function(t){return[new a.Arc(this._center,this._radius+(this._anticlockwise?1:-1)*t/2,this._startAngle,this._endAngle,this._anticlockwise)]},strokeRight:function(t){return[new a.Arc(this._center,this._radius+(this._anticlockwise?-1:1)*t/2,this._endAngle,this._startAngle,!this._anticlockwise)]},getInteriorExtremaTs:function(){var t=this,e=[];return _.each([0,Math.PI/2,Math.PI,3*Math.PI/2],function(i){if(t.containsAngle(i)){var n=t.tAtAngle(i),r=1e-10;n>r&&1-r>n&&e.push(n)}}),e.sort()},subdivided:function(t){var e=this.angleAt(0),i=this.angleAt(t),n=this.angleAt(1);return[new a.Arc(this._center,this._radius,e,i,this._anticlockwise),new a.Arc(this._center,this._radius,i,n,this._anticlockwise)]},intersection:function(t){var e=[],i=0,n=t.position.minus(this._center),r=t.direction.dot(n),s=n.magnitudeSquared(),a=4*r*r-4*(s-this._radius*this._radius);if(i>a)return e;var o=t.direction.dot(this._center)-t.direction.dot(t.position),h=Math.sqrt(a)/2,l=o-h,u=o+h;if(i>u)return e;var c=t.pointAtDistance(u),d=c.minus(this._center).normalized();if(i>l)this.containsAngle(d.angle())&&e.push({distance:u,point:c,normal:d.negated(),wind:this._anticlockwise?-1:1});else{var m=t.pointAtDistance(l),f=m.minus(this._center).normalized();this.containsAngle(f.angle())&&e.push({distance:l,point:m,normal:f,wind:this._anticlockwise?1:-1}),this.containsAngle(d.angle())&&e.push({distance:u,point:c,normal:d.negated(),wind:this._anticlockwise?-1:1})}return e},windingIntersection:function(t){var e=0,i=this.intersection(t);return _.each(i,function(t){e+=t.wind}),e},writeToContext:function(t){t.arc(this._center.x,this._center.y,this._radius,this._startAngle,this._endAngle,this._anticlockwise)},transformed:function(t){var e=t.timesVector2(n.createPolar(1,this._startAngle)).minus(t.timesVector2(n.ZERO)).angle(),i=t.timesVector2(n.createPolar(1,this._endAngle)).minus(t.timesVector2(n.ZERO)).angle(),r=t.getDeterminant()>=0?this._anticlockwise:!this._anticlockwise;Math.abs(this._endAngle-this._startAngle)===2*Math.PI&&(i=r?e-2*Math.PI:e+2*Math.PI);var s=t.getScaleVector();if(s.x!==s.y){var o=s.x*this._radius,h=s.y*this._radius;return new a.EllipticalArc(t.timesVector2(this._center),o,h,0,e,i,r)}var l=s.x*this._radius;return new a.Arc(t.timesVector2(this._center),l,e,i,r)}}),o.addInvalidatingGetterSetter(e,"center"),o.addInvalidatingGetterSetter(e,"radius"),o.addInvalidatingGetterSetter(e,"startAngle"),o.addInvalidatingGetterSetter(e,"endAngle"),o.addInvalidatingGetterSetter(e,"anticlockwise"),e}),i("KITE/util/LineStyles",["require","KITE/kite","DOT/Util","PHET_CORE/inherit","KITE/segments/Arc","KITE/segments/Line"],function(t){"use strict";function e(t){void 0===t&&(t={}),this.lineWidth=void 0!==t.lineWidth?t.lineWidth:1,this.lineCap=void 0!==t.lineCap?t.lineCap:"butt",this.lineJoin=void 0!==t.lineJoin?t.lineJoin:"miter",this.lineDash=t.lineDash?t.lineDash:[],this.lineDashOffset=void 0!==t.lineDashOffset?t.lineDashOffset:0,this.miterLimit=void 0!==t.miterLimit?t.miterLimit:10}var i=t("KITE/kite"),n=t("DOT/Util").lineLineIntersection,r=t("PHET_CORE/inherit"),s=t("KITE/segments/Arc"),a=t("KITE/segments/Line");return i.register("LineStyles",e),r(Object,e,{equals:function(t){var e=this.lineWidth===t.lineWidth&&this.lineCap===t.lineCap&&this.lineJoin===t.lineJoin&&this.miterLimit===t.miterLimit&&this.lineDashOffset===t.lineDashOffset;if(!e)return!1;if(this.lineDash.length!==t.lineDash.length)return!1;for(var i=0;i<this.lineDash.length;i++)if(this.lineDash[i]!==t.lineDash[i])return!1;return!0},leftJoin:function(t,e,i){e=e.normalized(),i=i.normalized();var r=t.plus(e.perpendicular().negated().times(this.lineWidth/2)),o=t.plus(i.perpendicular().negated().times(this.lineWidth/2)),h=r.equals(o)?[]:[new a(r,o)];if(!(e.perpendicular().dot(i)>0))return h;switch(this.lineJoin){case"round":var l=e.angle()+Math.PI/2,u=i.angle()+Math.PI/2;return[new s(t,this.lineWidth/2,l,u,!0)];case"miter":var c=e.angleBetween(i.negated());if(1/Math.sin(c/2)<=this.miterLimit&&c<Math.PI-1e-5){var d=n(r,r.plus(e),o,o.plus(i));return[new a(r,d),new a(d,o)]}return h;case"bevel":return h}},rightJoin:function(t,e,i){return this.leftJoin(t,i.negated(),e.negated())},cap:function(t,e){e=e.normalized();var i=t.plus(e.perpendicular().times(-this.lineWidth/2)),n=t.plus(e.perpendicular().times(this.lineWidth/2));switch(this.lineCap){case"butt":return[new a(i,n)];case"round":var r=e.angle();return[new s(t,this.lineWidth/2,r+Math.PI/2,r-Math.PI/2,!0)];case"square":var o=e.perpendicular().negated().times(this.lineWidth/2),h=e.perpendicular().times(this.lineWidth/2),l=e.times(this.lineWidth/2),u=t.plus(o).plus(l),c=t.plus(h).plus(l);return[new a(i,u),new a(u,c),new a(c,n)]}}}),i.LineStyles}),i("KITE/util/Subpath",["require","DOT/Bounds2","PHET_CORE/inherit","AXON/Events","KITE/kite","KITE/segments/Line","KITE/segments/Arc","KITE/util/LineStyles"],function(t){"use strict";function e(t,e,i){r.call(this);var n=this;if(this.segments=[],this.points=e||(t&&t.length?_.map(t,function(t){return t.start}).concat(t[t.length-1].end):[]),this.closed=!!i,this._strokedSubpaths=null,this._strokedSubpathsComputed=!1,this._strokedStyles=null,this._bounds=null,this._invalidateListener=this.invalidate.bind(this),this._invalidatingPoints=!1,t)for(var s=0;s<t.length;s++)_.each(t[s].getNondegenerateSegments(),function(t){n.addSegmentDirectly(t)})}var i=t("DOT/Bounds2"),n=t("PHET_CORE/inherit"),r=t("AXON/Events"),s=t("KITE/kite"),a=t("KITE/segments/Line"),o=t("KITE/segments/Arc"),h=t("KITE/util/LineStyles");return s.register("Subpath",e),n(r,e,{getBounds:function(){if(null===this._bounds){var t=i.NOTHING.copy();_.each(this.segments,function(e){t.includeBounds(e.getBounds())}),this._bounds=t}return this._bounds},get bounds(){return this.getBounds()},copy:function(){return new e(this.segments.slice(0),this.points.slice(0),this.closed)},invalidatePoints:function(){this._invalidatingPoints=!0;for(var t=this.segments.length,e=0;t>e;e++)this.segments[e].invalidate();this._invalidatingPoints=!1,this.invalidate()},invalidate:function(){this._invalidatingPoints||(this._bounds=null,this._strokedSubpathsComputed=!1,this.trigger0("invalidated"))},addPoint:function(t){return this.points.push(t),this},addSegmentDirectly:function(t){return this.segments.push(t),t.onStatic("invalidated",this._invalidateListener),this},addSegment:function(t){for(var e=t.getNondegenerateSegments(),i=e.length,n=0;i>n;n++)this.addSegmentDirectly(t);return this.invalidate(),this},addClosingSegment:function(){if(this.hasClosingSegment()){var t=this.getClosingSegment();this.addSegmentDirectly(t),this.invalidate(),this.addPoint(this.getFirstPoint()),this.closed=!0}},close:function(){this.closed=!0},getLength:function(){return this.points.length},getFirstPoint:function(){return _.first(this.points)},getLastPoint:function(){return _.last(this.points)},getFirstSegment:function(){return _.first(this.segments)},getLastSegment:function(){return _.last(this.segments)},isDrawable:function(){return this.segments.length>0},isClosed:function(){return this.closed},hasClosingSegment:function(){return!this.getFirstPoint().equalsEpsilon(this.getLastPoint(),1e-9)},getClosingSegment:function(){return new a(this.getLastPoint(),this.getFirstPoint())},writeToContext:function(t){if(this.isDrawable()){var e=this.getFirstSegment().start;t.moveTo(e.x,e.y);for(var i=this.segments.length,n=0;i>n;n++)this.segments[n].writeToContext(t);this.closed&&t.closePath()}},toPiecewiseLinear:function(t){return new e(_.flatten(_.map(this.segments,function(e){return e.toPiecewiseLinearSegments(t)})),null,this.closed)},transformed:function(t){return new e(_.map(this.segments,function(e){return e.transformed(t)}),_.map(this.points,function(e){return t.timesVector2(e)}),this.closed)},nonlinearTransformed:function(t){return this.closed&&this.hasClosingSegment()&&this.addClosingSegment(),new e(_.flatten(_.map(this.segments,function(e){return t.methodName&&e[t.methodName]?e[t.methodName](t):e.toPiecewiseLinearSegments(t)})),null,this.closed)},getBoundsWithTransform:function(t){for(var e=i.NOTHING.copy(),n=this.segments.length,r=0;n>r;r++)e.includeBounds(this.segments[r].getBoundsWithTransform(t));return e},offset:function(t){if(!this.isDrawable())return new e([],null,this.closed);if(0===t)return new e(this.segments.slice(),null,this.closed);var i,n=this.segments.slice();this.closed&&this.hasClosingSegment()&&n.push(this.getClosingSegment());var r=[];for(i=0;i<n.length;i++)r.push(n[i].strokeLeft(2*t));var s=[];for(i=0;i<n.length;i++){if(this.closed||i>0){var a=(i>0?i:n.length)-1,h=n[i].start,l=n[a].endTangent,u=n[i].startTangent,c=l.perpendicular().negated().times(t).angle(),d=u.perpendicular().negated().times(t).angle(),m=l.perpendicular().dot(u)>0;s.push(new o(h,Math.abs(t),c,d,m))}s=s.concat(r[i])}return new e(s,null,this.closed)},stroked:function(t){function i(t){o=o.concat(t)}function n(t){l=l.concat(t)}if(!this.isDrawable())return[];if(void 0===t&&(t=new h),this._strokedSubpathsComputed&&this._strokedStyles.equals(t))return this._strokedSubpaths;var r,s=t.lineWidth,o=[],l=[],u=this.getFirstSegment(),c=this.getLastSegment(),d=c.end.equals(u.start),m=d?null:new a(this.segments[this.segments.length-1].end,this.segments[0].start);for(r=0;r<this.segments.length;r++)r>0&&i(t.leftJoin(this.segments[r].start,this.segments[r-1].endTangent,this.segments[r].startTangent)),i(this.segments[r].strokeLeft(s));for(r=this.segments.length-1;r>=0;r--)r<this.segments.length-1&&n(t.rightJoin(this.segments[r].end,this.segments[r].endTangent,this.segments[r+1].startTangent)),n(this.segments[r].strokeRight(s));var f;return this.closed?(d?(i(t.leftJoin(c.end,c.endTangent,u.startTangent)),n(t.rightJoin(c.end,c.endTangent,u.startTangent))):(i(t.leftJoin(m.start,c.endTangent,m.startTangent)),i(m.strokeLeft(s)),i(t.leftJoin(m.end,m.endTangent,u.startTangent)),n(t.rightJoin(m.end,m.endTangent,u.startTangent)),n(m.strokeRight(s)),n(t.rightJoin(m.start,c.endTangent,m.startTangent))),f=[new e(o,null,!0),new e(l,null,!0)]):f=[new e(o.concat(t.cap(c.end,c.endTangent)).concat(l).concat(t.cap(u.start,u.startTangent.negated())),null,!0)],this._strokedSubpaths=f,this._strokedSubpathsComputed=!0,this._strokedStyles=new h(t),f}}),s.Subpath}),i("KITE/parser/svgPath",["require","KITE/kite"],function(t){function e(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var i=t("KITE/kite"),n={parse:function(t,i){function n(t){Q>J||(J>Q&&(Q=J,Z=[]),Z.push(t))}function r(){var t,e,i,n,r,a;for(r=J,a=J,t=[],e=U();null!==e;)t.push(e),e=U();if(null!==t)if(e=s(),e=null!==e?e:"",null!==e){for(i=[],n=U();null!==n;)i.push(n),n=U();null!==i?t=[t,e,i]:(t=null,J=a)}else t=null,J=a;else t=null,J=a;return null!==t&&(t=function(t,e){return e?e:[]}(r,t[1])),null===t&&(J=r),t}function s(){var t,e,i,n,r;if(n=J,r=J,t=a(),null!==t){for(e=[],i=U();null!==i;)e.push(i),i=U();null!==e?(i=s(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)}else t=null,J=r;return null!==t&&(t=function(t,e,i){return e.concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=a(),null!==t&&(t=function(t,e){return e}(n,t)),null===t&&(J=n)),t}function a(){var t,e,i,n,r;if(n=J,r=J,t=l(),null!==t){for(e=[],i=U();null!==i;)e.push(i),i=U();null!==e?(i=o(),i=null!==i?i:"",null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)}else t=null,J=r;return null!==t&&(t=function(t,e,i){return i.length?e.concat(i):e}(n,t[0],t[2])),null===t&&(J=n),t}function o(){var t,e,i,n,r;if(n=J,r=J,t=h(),null!==t){for(e=[],i=U();null!==i;)e.push(i),i=U();null!==e?(i=o(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)}else t=null,J=r;return null!==t&&(t=function(t,e,i){return e.concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=h(),null!==t&&(t=function(t,e){return e}(n,t)),null===t&&(J=n)),t}function h(){var t;return t=c(),null===t&&(t=d(),null===t&&(t=f(),null===t&&(t=g(),null===t&&(t=v(),null===t&&(t=y(),null===t&&(t=T(),null===t&&(t=_(),null===t&&(t=P())))))))),t}function l(){var e,i,r,s,a;if(s=J,a=J,77===t.charCodeAt(J)?(e="M",J++):(e=null,0===K&&n('"M"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=u(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return W(e,!1)}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,109===t.charCodeAt(J)?(e="m",J++):(e=null,0===K&&n('"m"')),null!==e){for(i=[],
r=U();null!==r;)i.push(r),r=U();null!==i?(r=u(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return W(e,!0)}(s,e[2])),null===e&&(J=s)}return e}function u(){var t,e,i,n,r;return n=J,r=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=m(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=O(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function c(){var e,i;return i=J,90===t.charCodeAt(J)?(e="Z",J++):(e=null,0===K&&n('"Z"')),null===e&&(122===t.charCodeAt(J)?(e="z",J++):(e=null,0===K&&n('"z"'))),null!==e&&(e=function(t,e){return{cmd:"close"}}(i,e)),null===e&&(J=i),e}function d(){var e,i,r,s,a;if(s=J,a=J,76===t.charCodeAt(J)?(e="L",J++):(e=null,0===K&&n('"L"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=m(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"lineTo",args:[t.x,t.y]}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,108===t.charCodeAt(J)?(e="l",J++):(e=null,0===K&&n('"l"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=m(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"lineToRelative",args:[t.x,t.y]}})}(s,e[2])),null===e&&(J=s)}return e}function m(){var t,e,i,n,r;return n=J,r=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=m(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=O(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function f(){var e,i,r,s,a;if(s=J,a=J,72===t.charCodeAt(J)?(e="H",J++):(e=null,0===K&&n('"H"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=p(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"horizontalLineTo",args:[t]}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,104===t.charCodeAt(J)?(e="h",J++):(e=null,0===K&&n('"h"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=p(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"horizontalLineToRelative",args:[t]}})}(s,e[2])),null===e&&(J=s)}return e}function p(){var t,e,i,n,r;return n=J,r=J,t=I(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=p(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=I(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function g(){var e,i,r,s,a;if(s=J,a=J,86===t.charCodeAt(J)?(e="V",J++):(e=null,0===K&&n('"V"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=b(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"verticalLineTo",args:[t]}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,118===t.charCodeAt(J)?(e="v",J++):(e=null,0===K&&n('"v"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=b(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"verticalLineToRelative",args:[t]}})}(s,e[2])),null===e&&(J=s)}return e}function b(){var t,e,i,n,r;return n=J,r=J,t=I(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=b(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=I(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function v(){var e,i,r,s,a;if(s=J,a=J,67===t.charCodeAt(J)?(e="C",J++):(e=null,0===K&&n('"C"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=E(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"cubicCurveTo",args:t}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,99===t.charCodeAt(J)?(e="c",J++):(e=null,0===K&&n('"c"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=E(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"cubicCurveToRelative",args:t}})}(s,e[2])),null===e&&(J=s)}return e}function E(){var t,e,i,n,r;return n=J,r=J,t=S(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=E(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=S(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function S(){var t,e,i,n,r,s,a;return s=J,a=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=O(),null!==i?(n=Y(),n=null!==n?n:"",null!==n?(r=O(),null!==r?t=[t,e,i,n,r]:(t=null,J=a)):(t=null,J=a)):(t=null,J=a)):(t=null,J=a)):(t=null,J=a),null!==t&&(t=function(t,e,i,n){return[e.x,e.y,i.x,i.y,n.x,n.y]}(s,t[0],t[2],t[4])),null===t&&(J=s),t}function y(){var e,i,r,s,a;if(s=J,a=J,83===t.charCodeAt(J)?(e="S",J++):(e=null,0===K&&n('"S"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=C(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"smoothCubicCurveTo",args:t}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,115===t.charCodeAt(J)?(e="s",J++):(e=null,0===K&&n('"s"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=C(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"smoothCubicCurveToRelative",args:t}})}(s,e[2])),null===e&&(J=s)}return e}function C(){var t,e,i,n,r;return n=J,r=J,t=w(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=C(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=w(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function w(){var t,e,i,n,r;return n=J,r=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=O(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e.x,e.y,i.x,i.y]}(n,t[0],t[2])),null===t&&(J=n),t}function T(){var e,i,r,s,a;if(s=J,a=J,81===t.charCodeAt(J)?(e="Q",J++):(e=null,0===K&&n('"Q"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=R(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"quadraticCurveTo",args:t}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,113===t.charCodeAt(J)?(e="q",J++):(e=null,0===K&&n('"q"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=R(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"quadraticCurveToRelative",args:t}})}(s,e[2])),null===e&&(J=s)}return e}function R(){var t,e,i,n,r;return n=J,r=J,t=N(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=R(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=N(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function N(){var t,e,i,n,r;return n=J,r=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=O(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e.x,e.y,i.x,i.y]}(n,t[0],t[2])),null===t&&(J=n),t}function _(){var e,i,r,s,a;if(s=J,a=J,84===t.charCodeAt(J)?(e="T",J++):(e=null,0===K&&n('"T"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=A(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"smoothQuadraticCurveTo",args:[t.x,t.y]}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,116===t.charCodeAt(J)?(e="t",J++):(e=null,0===K&&n('"t"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=A(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"smoothQuadraticCurveToRelative",args:[t.x,t.y]}})}(s,e[2])),null===e&&(J=s)}return e}function A(){var t,e,i,n,r;return n=J,r=J,t=O(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=A(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=O(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function P(){var e,i,r,s,a;if(s=J,a=J,65===t.charCodeAt(J)?(e="A",J++):(e=null,0===K&&n('"A"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=x(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;if(null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"ellipticalArcTo",args:t}})}(s,e[2])),null===e&&(J=s),null===e){if(s=J,a=J,97===t.charCodeAt(J)?(e="a",J++):(e=null,0===K&&n('"a"')),null!==e){for(i=[],r=U();null!==r;)i.push(r),r=U();null!==i?(r=x(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)}else e=null,J=a;null!==e&&(e=function(t,e){return e.map(function(t){return{cmd:"ellipticalArcToRelative",args:t}})}(s,e[2])),null===e&&(J=s)}return e}function x(){var t,e,i,n,r;return n=J,r=J,t=k(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=x(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return[e].concat(i)}(n,t[0],t[2])),null===t&&(J=n),null===t&&(n=J,t=k(),null!==t&&(t=function(t,e){return[e]}(n,t)),null===t&&(J=n)),t}function k(){var t,e,i,n,r,s,a,o,h,l,u,c,d;return c=J,d=J,t=D(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=D(),null!==i?(n=Y(),n=null!==n?n:"",null!==n?(r=I(),null!==r?(s=Y(),null!==s?(a=B(),null!==a?(o=Y(),o=null!==o?o:"",null!==o?(h=B(),null!==h?(l=Y(),l=null!==l?l:"",null!==l?(u=O(),null!==u?t=[t,e,i,n,r,s,a,o,h,l,u]:(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d)):(t=null,J=d),null!==t&&(t=function(t,e,i,n,r,s,a){return[e,i,n,r,s,a.x,a.y]}(c,t[0],t[2],t[4],t[6],t[8],t[10])),null===t&&(J=c),t}function O(){var t,e,i,n,r;return n=J,r=J,t=I(),null!==t?(e=Y(),e=null!==e?e:"",null!==e?(i=I(),null!==i?t=[t,e,i]:(t=null,J=r)):(t=null,J=r)):(t=null,J=r),null!==t&&(t=function(t,e,i){return{x:e,y:i}}(n,t[0],t[2])),null===t&&(J=n),t}function D(){var t,e;return e=J,t=M(),null!==t&&(t=function(t,e){return parseFloat(e,10)}(e,t)),null===t&&(J=e),null===t&&(e=J,t=j(),null!==t&&(t=function(t,e){return parseInt(e,10)}(e,t)),null===t&&(J=e)),t}function I(){var t,e,i,n;return i=J,n=J,t=H(),t=null!==t?t:"",null!==t?(e=M(),null!==e?t=[t,e]:(t=null,J=n)):(t=null,J=n),null!==t&&(t=function(t,e,i){return parseFloat(e+i,10)}(i,t[0],t[1])),null===t&&(J=i),null===t&&(i=J,n=J,t=H(),t=null!==t?t:"",null!==t?(e=j(),null!==e?t=[t,e]:(t=null,J=n)):(t=null,J=n),null!==t&&(t=function(t,e,i){return parseInt(e+i,10)}(i,t[0],t[1])),null===t&&(J=i)),t}function B(){var e,i;return i=J,48===t.charCodeAt(J)?(e="0",J++):(e=null,0===K&&n('"0"')),null!==e&&(e=function(t){return!1}(i)),null===e&&(J=i),null===e&&(i=J,49===t.charCodeAt(J)?(e="1",J++):(e=null,0===K&&n('"1"')),null!==e&&(e=function(t){return!0}(i)),null===e&&(J=i)),e}function Y(){var t,e,i,n,r;if(r=J,e=U(),null!==e)for(t=[];null!==e;)t.push(e),e=U();else t=null;if(null!==t)if(e=L(),e=null!==e?e:"",null!==e){for(i=[],n=U();null!==n;)i.push(n),n=U();null!==i?t=[t,e,i]:(t=null,J=r)}else t=null,J=r;else t=null,J=r;if(null===t)if(r=J,t=L(),null!==t){for(e=[],i=U();null!==i;)e.push(i),i=U();null!==e?t=[t,e]:(t=null,J=r)}else t=null,J=r;return t}function L(){var e;return 44===t.charCodeAt(J)?(e=",",J++):(e=null,0===K&&n('","')),e}function M(){var t,e,i,n;return i=J,n=J,t=F(),null!==t?(e=V(),e=null!==e?e:"",null!==e?t=[t,e]:(t=null,J=n)):(t=null,J=n),null!==t&&(t=function(t,e,i){return e+i}(i,t[0],t[1])),null===t&&(J=i),null===t&&(i=J,n=J,t=j(),null!==t?(e=V(),null!==e?t=[t,e]:(t=null,J=n)):(t=null,J=n),null!==t&&(t=function(t,e,i){return e+i}(i,t[0],t[1])),null===t&&(J=i)),t}function F(){var e,i,r,s,a;return s=J,a=J,e=j(),e=null!==e?e:"",null!==e?(46===t.charCodeAt(J)?(i=".",J++):(i=null,0===K&&n('"."')),null!==i?(r=j(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)):(e=null,J=a),null!==e&&(e=function(t,e,i){return e+"."+i}(s,e[0],e[2])),null===e&&(J=s),null===e&&(s=J,a=J,e=j(),null!==e?(46===t.charCodeAt(J)?(i=".",J++):(i=null,0===K&&n('"."')),null!==i?e=[e,i]:(e=null,J=a)):(e=null,J=a),null!==e&&(e=function(t,e){return e}(s,e[0])),null===e&&(J=s)),e}function V(){var e,i,r,s,a;return s=J,a=J,101===t.charCodeAt(J)?(e="e",J++):(e=null,0===K&&n('"e"')),null===e&&(69===t.charCodeAt(J)?(e="E",J++):(e=null,0===K&&n('"E"'))),null!==e?(i=H(),i=null!==i?i:"",null!==i?(r=j(),null!==r?e=[e,i,r]:(e=null,J=a)):(e=null,J=a)):(e=null,J=a),null!==e&&(e=function(t,e,i,n){return e+i+n}(s,e[0],e[1],e[2])),null===e&&(J=s),e}function H(){var e;return 43===t.charCodeAt(J)?(e="+",J++):(e=null,0===K&&n('"+"')),null===e&&(45===t.charCodeAt(J)?(e="-",J++):(e=null,0===K&&n('"-"'))),e}function j(){var t,e,i,n;return i=J,n=J,t=z(),null!==t?(e=j(),null!==e?t=[t,e]:(t=null,J=n)):(t=null,J=n),null!==t&&(t=function(t,e,i){return e+i}(i,t[0],t[1])),null===t&&(J=i),null===t&&(t=z()),t}function z(){var e;return/^[0-9]/.test(t.charAt(J))?(e=t.charAt(J),J++):(e=null,0===K&&n("[0-9]")),e}function U(){var e;return 32===t.charCodeAt(J)?(e=" ",J++):(e=null,0===K&&n('" "')),null===e&&(9===t.charCodeAt(J)?(e="	",J++):(e=null,0===K&&n('"\\t"')),null===e&&(13===t.charCodeAt(J)?(e="\r",J++):(e=null,0===K&&n('"\\r"')),null===e&&(10===t.charCodeAt(J)?(e="\n",J++):(e=null,0===K&&n('"\\n"'))))),e}function G(t){t.sort();for(var e=null,i=[],n=0;n<t.length;n++)t[n]!==e&&(i.push(t[n]),e=t[n]);return i}function q(){for(var e=1,i=1,n=!1,r=0;r<Math.max(J,Q);r++){var s=t.charAt(r);"\n"===s?(n||e++,i=1,n=!1):"\r"===s||"\u2028"===s||"\u2029"===s?(e++,i=1,n=!0):(i++,n=!1)}return{line:e,column:i}}function W(t,e){var i=[{cmd:e?"moveToRelative":"moveTo",args:[t[0].x,t[0].y]}];if(t.length>1)for(var n=1;n<t.length;n++)i.push({cmd:e?"lineToRelative":"lineTo",args:[t[n].x,t[n].y]});return i}var X={svgPath:r,movetoDrawtoCommandGroups:s,movetoDrawtoCommandGroup:a,drawtoCommands:o,drawtoCommand:h,moveto:l,movetoArgumentSequence:u,closepath:c,lineto:d,linetoArgumentSequence:m,horizontalLineto:f,horizontalLinetoArgumentSequence:p,verticalLineto:g,verticalLinetoArgumentSequence:b,curveto:v,curvetoArgumentSequence:E,curvetoArgument:S,smoothCurveto:y,smoothCurvetoArgumentSequence:C,smoothCurvetoArgument:w,quadraticBezierCurveto:T,quadraticBezierCurvetoArgumentSequence:R,quadraticBezierCurvetoArgument:N,smoothQuadraticBezierCurveto:_,smoothQuadraticBezierCurvetoArgumentSequence:A,ellipticalArc:P,ellipticalArcArgumentSequence:x,ellipticalArcArgument:k,coordinatePair:O,nonnegativeNumber:D,number:I,flag:B,commaWsp:Y,comma:L,floatingPointConstant:M,fractionalConstant:F,exponent:V,sign:H,digitSequence:j,digit:z,wsp:U};if(void 0!==i){if(void 0===X[i])throw new Error("Invalid rule name: "+e(i)+".")}else i="svgPath";var J=0,K=0,Q=0,Z=[],$=X[i]();if(null===$||J!==t.length){var tt=Math.max(J,Q),et=tt<t.length?t.charAt(tt):null,it=q();throw new this.SyntaxError(G(Z),et,tt,it.line,it.column)}return $},toSource:function(){return this._source}};return n.SyntaxError=function(t,i,n,r,s){function a(t,i){var n,r;switch(t.length){case 0:n="end of input";break;case 1:n=t[0];break;default:n=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}return r=i?e(i):"end of input","Expected "+n+" but "+r+" found."}this.name="SyntaxError",this.expected=t,this.found=i,this.message=a(t,i),this.offset=n,this.line=r,this.column=s},n.SyntaxError.prototype=Error.prototype,i.register("svgPath",n),i.svgPath}),i("KITE/segments/Quadratic",["require","PHET_CORE/inherit","DOT/Bounds2","DOT/Matrix3","DOT/Util","DOT/Util","KITE/kite","KITE/segments/Segment"],function(t){"use strict";function e(t,e,i){h.call(this),this._start=t,this._control=e,this._end=i,this.invalidate()}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("DOT/Matrix3"),s=t("DOT/Util").solveQuadraticRootsReal,a=t("DOT/Util").arePointsCollinear,o=t("KITE/kite"),h=t("KITE/segments/Segment");return o.register("Quadratic",e),i(h,e,{degree:2,invalidate:function(){this._startTangent=null,this._endTangent=null,this._tCriticalX=null,this._tCriticalY=null,this._bounds=null,this.trigger0("invalidated")},getStartTangent:function(){if(null===this._startTangent){var t=this._start.equals(this._control);this._startTangent=t?this._end.minus(this._start).normalized():this._control.minus(this._start).normalized()}return this._startTangent},get startTangent(){return this.getStartTangent()},getEndTangent:function(){if(null===this._endTangent){var t=this._end.equals(this._control);this._endTangent=t?this._end.minus(this._start).normalized():this._end.minus(this._control).normalized()}return this._endTangent},get endTangent(){return this.getEndTangent()},getTCriticalX:function(){return null===this._tCriticalX&&(this._tCriticalX=e.extremaT(this._start.x,this._control.x,this._end.x)),this._tCriticalX},get tCriticalX(){return this.getTCriticalX()},getTCriticalY:function(){return null===this._tCriticalY&&(this._tCriticalY=e.extremaT(this._start.y,this._control.y,this._end.y)),this._tCriticalY},get tCriticalY(){return this.getTCriticalY()},getNondegenerateSegments:function(){var t=this._start,i=this._control,n=this._end,r=t.equals(n),s=t.equals(i),h=t.equals(i);if(r&&s)return[];if(r){var l=this.positionAt(.5);return[new o.Line(t,l),new o.Line(l,n)]}if(a(t,i,n)){if(s||h)return[new o.Line(t,n)];var u=n.minus(t),c=i.minus(t).dot(u.normalized)/u.magnitude(),d=e.extremaT(0,c,1);if(!isNaN(d)&&d>0&&1>d){var m=this.positionAt(d);return _.flatten([new o.Line(t,m).getNondegenerateSegments(),new o.Line(m,n).getNondegenerateSegments()])}return[new o.Line(t,n)]}return[this]},getBounds:function(){if(null===this._bounds){this._bounds=new n(Math.min(this._start.x,this._end.x),Math.min(this._start.y,this._end.y),Math.max(this._start.x,this._end.x),Math.max(this._start.y,this._end.y));var t=this.getTCriticalX(),e=this.getTCriticalY();!isNaN(t)&&t>0&&1>t&&(this._bounds=this._bounds.withPoint(this.positionAt(t))),!isNaN(e)&&e>0&&1>e&&(this._bounds=this._bounds.withPoint(this.positionAt(e)))}return this._bounds},get bounds(){return this.getBounds()},positionAt:function(t){var e=1-t;return this._start.times(e*e).plus(this._control.times(2*e*t)).plus(this._end.times(t*t))},tangentAt:function(t){return this._control.minus(this._start).times(2*(1-t)).plus(this._end.minus(this._control).times(2*t))},curvatureAt:function(t){var e=1e-7;if(Math.abs(t-.5)>.5-e){var i=.5>t,n=i?this._start:this._end,r=this._control,s=i?this._end:this._start,a=r.minus(n),o=a.magnitude(),h=(i?-1:1)*a.perpendicular().normalized().dot(s.minus(r));return h*(this.degree-1)/(this.degree*o*o)}return this.subdivided(t,!0)[0].curvatureAt(1)},offsetTo:function(t,e){for(var i=[this],n=5,r=0;n>r;r++)i=_.flatten(_.map(i,function(t){return t.subdivided(.5,!0)}));var s=_.map(i,function(e){return e.approximateOffset(t)});return e&&(s.reverse(),s=_.map(s,function(t){return t.reversed(!0)})),s},subdivided:function(t){var e=this._start.blend(this._control,t),i=this._control.blend(this._end,t),n=e.blend(i,t);return[new o.Quadratic(this._start,e,n),new o.Quadratic(n,i,this._end)]},degreeElevated:function(){return new o.Cubic(this._start,this._start.plus(this._control.timesScalar(2)).dividedScalar(3),this._end.plus(this._control.timesScalar(2)).dividedScalar(3),this._end)},reversed:function(){return new o.Quadratic(this._end,this._control,this._start)},approximateOffset:function(t){return new o.Quadratic(this._start.plus((this._start.equals(this._control)?this._end.minus(this._start):this._control.minus(this._start)).perpendicular().normalized().times(t)),this._control.plus(this._end.minus(this._start).perpendicular().normalized().times(t)),this._end.plus((this._end.equals(this._control)?this._end.minus(this._start):this._end.minus(this._control)).perpendicular().normalized().times(t)))},getSVGPathFragment:function(){return"Q "+o.svgNumber(this._control.x)+" "+o.svgNumber(this._control.y)+" "+o.svgNumber(this._end.x)+" "+o.svgNumber(this._end.y)},strokeLeft:function(t){return this.offsetTo(-t/2,!1)},strokeRight:function(t){return this.offsetTo(t/2,!0)},getInteriorExtremaTs:function(){var t=[],e=1e-10,i=this.getTCriticalX(),n=this.getTCriticalY();return!isNaN(i)&&i>e&&1-e>i&&t.push(this.tCriticalX),!isNaN(n)&&n>e&&1-e>n&&t.push(this.tCriticalY),t.sort()},intersection:function(t){var e=this,i=[],n=r.rotation2(-t.direction.angle()).timesMatrix(r.translation(-t.position.x,-t.position.y)),a=n.timesVector2(this._start),o=n.timesVector2(this._control),h=n.timesVector2(this._end),l=a.y-2*o.y+h.y,u=-2*a.y+2*o.y,c=a.y,d=s(l,u,c);return _.each(d,function(n){if(n>=0&&1>=n){var r=e.positionAt(n),s=e.tangentAt(n).normalized(),a=s.perpendicular(),o=r.minus(t.position);o.dot(t.direction)>0&&i.push({distance:o.magnitude(),point:r,normal:a.dot(t.direction)>0?a.negated():a,wind:t.direction.perpendicular().dot(s)<0?1:-1})}}),i},windingIntersection:function(t){var e=0,i=this.intersection(t);return _.each(i,function(t){e+=t.wind}),e},writeToContext:function(t){t.quadraticCurveTo(this._control.x,this._control.y,this._end.x,this._end.y)},transformed:function(t){return new o.Quadratic(t.timesVector2(this._start),t.timesVector2(this._control),t.timesVector2(this._end))},reparameterized:function(t,e){var i=this._start.plus(this._end.plus(this._control.timesScalar(-2))),n=this._control.minus(this._start).timesScalar(2),r=this._start,s=i.timesScalar(t*t),a=i.timesScalar(t*e).timesScalar(2).plus(n.timesScalar(t)),h=i.timesScalar(e*e).plus(n.timesScalar(e)).plus(r);return new o.Quadratic(h,a.timesScalar(.5).plus(h),s.plus(a).plus(h))}}),h.addInvalidatingGetterSetter(e,"start"),h.addInvalidatingGetterSetter(e,"control"),h.addInvalidatingGetterSetter(e,"end"),e.extremaT=function(t,e,i){var n=2*(i-2*e+t);return 0!==n?-2*(e-t)/n:NaN},e}),i("KITE/segments/Cubic",["require","PHET_CORE/inherit","DOT/Bounds2","DOT/Vector2","DOT/Matrix3","DOT/Util","DOT/Util","DOT/Util","KITE/kite","KITE/segments/Segment","KITE/segments/Quadratic"],function(t){"use strict";function e(t,e,i,n){u.call(this),this._start=t,this._control1=e,this._control2=i,this._end=n,this.invalidate()}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("DOT/Vector2"),s=t("DOT/Matrix3"),a=t("DOT/Util").solveQuadraticRootsReal,o=t("DOT/Util").solveCubicRootsReal,h=t("DOT/Util").arePointsCollinear,l=t("KITE/kite"),u=t("KITE/segments/Segment");t("KITE/segments/Quadratic");var c=new r,d=new r,m=new r;return l.register("Cubic",e),i(u,e,{degree:3,invalidate:function(){this._startTangent=null,this._endTangent=null,this._r=null,this._s=null,this._tCusp=null,this._tDeterminant=null,this._tInflection1=null,this._tInflection2=null,this._startQuadratic=null,this._endQuadratic=null,this._xExtremaT=null,this._yExtremaT=null,this._bounds=null,this.trigger0("invalidated")},getStartTangent:function(){return null===this._startTangent&&(this._startTangent=this.tangentAt(0).normalized()),this._startTangent},get startTangent(){return this.getStartTangent()},getEndTangent:function(){return null===this._endTangent&&(this._endTangent=this.tangentAt(1).normalized()),this._endTangent},get endTangent(){return this.getEndTangent()},getR:function(){return null===this._r&&(this._r=this._control1.minus(this._start).normalized()),this._r},get r(){return this.getR()},getS:function(){return null===this._s&&(this._s=this.getR().perpendicular()),this._s},get s(){return this.getS()},getTCusp:function(){return null===this._tCusp&&this.computeCuspInfo(),this._tCusp},get tCusp(){return this.getTCusp()},getTDeterminant:function(){return null===this._tDeterminant&&this.computeCuspInfo(),this._tDeterminant},get tDeterminant(){return this.getTDeterminant()},getTInflection1:function(){return null===this._tInflection1&&this.computeCuspInfo(),this._tInflection1},get tInflection1(){return this.getTInflection1()},getTInflection2:function(){return null===this._tInflection2&&this.computeCuspInfo(),this._tInflection2},get tInflection2(){return this.getTInflection2()},getStartQuadratic:function(){return null===this._startQuadratic&&this.computeCuspSegments(),this._startQuadratic},get startQuadratic(){return this.getStartQuadratic()},getEndQuadratic:function(){return null===this._endQuadratic&&this.computeCuspSegments(),this._endQuadratic},get endQuadratic(){return this.getEndQuadratic()},getXExtremaT:function(){return null===this._xExtremaT&&(this._xExtremaT=e.extremaT(this._start.x,this._control1.x,this._control2.x,this._end.x)),this._xExtremaT},get xExtremaT(){return this.getXExtremaT()},getYExtremaT:function(){return null===this._yExtremaT&&(this._yExtremaT=e.extremaT(this._start.y,this._control1.y,this._control2.y,this._end.y)),this._yExtremaT},get yExtremaT(){return this.getYExtremaT()},getBounds:function(){if(null===this._bounds){this._bounds=n.NOTHING,this._bounds=this._bounds.withPoint(this._start),this._bounds=this._bounds.withPoint(this._end);var t=this;_.each(this.getXExtremaT(),function(e){e>=0&&1>=e&&(t._bounds=t._bounds.withPoint(t.positionAt(e)))}),_.each(this.getYExtremaT(),function(e){e>=0&&1>=e&&(t._bounds=t._bounds.withPoint(t.positionAt(e)))}),this.hasCusp()&&(this._bounds=this._bounds.withPoint(this.positionAt(this.getTCusp())))}return this._bounds},get bounds(){return this.getBounds()},computeCuspInfo:function(){var t=this._start.times(-1).plus(this._control1.times(3)).plus(this._control2.times(-3)).plus(this._end),e=this._start.times(3).plus(this._control1.times(-6)).plus(this._control2.times(3)),i=this._start.times(-3).plus(this._control1.times(3)),n=t.perpendicular(),r=e.perpendicular(),s=n.dot(e);if(this._tCusp=-.5*(n.dot(i)/s),this._tDeterminant=this._tCusp*this._tCusp-1/3*(r.dot(i)/s),this._tDeterminant>=0){var a=Math.sqrt(this._tDeterminant);this._tInflection1=this._tCusp-a,this._tInflection2=this._tCusp+a}else this._tInflection1=NaN,this._tInflection2=NaN},computeCuspSegments:function(){if(this.hasCusp()){var t=this.subdivided(this.getTCusp);this._startQuadratic=new l.Quadratic(t[0].start,t[0].control1,t[0].end,!1),this._endQuadratic=new l.Quadratic(t[1].start,t[1].control2,t[1].end,!1)}else this._startQuadratic=null,this._endQuadratic=null},getNondegenerateSegments:function(){var t=this,e=this._start,i=this._control1,n=this._control2,r=this._end,s=this.degreeReduced(1e-9);if(e.equals(r)&&e.equals(i)&&e.equals(n))return[];if(this.hasCusp())return _.flatten([this._startQuadratic.getNondegenerateSegments(),this._endQuadratic.getNondegenerateSegments()]);if(s)return s.getNondegenerateSegments();if(h(e,i,r)&&h(e,n,r)){var a=this.getXExtremaT().concat(this.getYExtremaT()).sort().map(function(e){return t.positionAt(e)}),o=[],u=e;a.length&&(o.push(new l.Line(e,a[0])),u=a[0]);for(var c=1;c<a.length;c++)o.push(new l.Line(a[c-1],a[c])),u=a[c];return o.push(new l.Line(u,r)),_.flatten(o.map(function(t){return t.getNondegenerateSegments()}),!0)}return[this]},hasCusp:function(){var t=this.getTCusp(),e=1e-7;return this.tangentAt(t).magnitude()<e&&t>=0&&1>=t},positionAt:function(t){var e=1-t;return this._start.times(e*e*e).plus(this._control1.times(3*e*e*t)).plus(this._control2.times(3*e*t*t)).plus(this._end.times(t*t*t))},tangentAt:function(t){var e=1-t,i=new r;return i.set(this._start).multiplyScalar(-3*e*e).add(c.set(this._control1).multiplyScalar(3*e*e-6*e*t)).add(c.set(this._control2).multiplyScalar(6*e*t-3*t*t)).add(c.set(this._end).multiplyScalar(3*t*t))},curvatureAt:function(t){var e=1e-7;if(Math.abs(t-.5)>.5-e){var i=.5>t,n=i?this._start:this._end,r=i?this._control1:this._control2,s=i?this._control2:this._control1,a=r.minus(n),o=a.magnitude(),h=(i?-1:1)*a.perpendicular().normalized().dot(s.minus(r));return h*(this.degree-1)/(this.degree*o*o)}return this.subdivided(t)[0].curvatureAt(1)},toRS:function(t){var e=t.minus(this._start);return new r(e.dot(this.getR()),e.dot(this.getS()))},subdivided:function(t){var e=this._start.blend(this._control1,t),i=this._control2.blend(this._end,t),n=this._control1.blend(this._control2,t),r=e.blend(n,t),s=n.blend(i,t),a=r.blend(s,t);return[new l.Cubic(this._start,e,r,a),new l.Cubic(a,s,i,this._end)]},offsetTo:function(t,e){for(var i=32,n=[],r=[],s=0;i>s;s++){var a=s/(i-1);e&&(a=1-a),n.push(this.positionAt(a).plus(this.tangentAt(a).perpendicular().normalized().times(t))),s>0&&r.push(new l.Line(n[s-1],n[s]))}return r},getSVGPathFragment:function(){return"C "+l.svgNumber(this._control1.x)+" "+l.svgNumber(this._control1.y)+" "+l.svgNumber(this._control2.x)+" "+l.svgNumber(this._control2.y)+" "+l.svgNumber(this._end.x)+" "+l.svgNumber(this._end.y)},strokeLeft:function(t){return this.offsetTo(-t/2,!1)},strokeRight:function(t){return this.offsetTo(t/2,!0)},getInteriorExtremaTs:function(){var t=this.getXExtremaT().concat(this.getYExtremaT()),e=[];return _.each(t,function(t){var i=1e-10;t>i&&1-i>t&&_.every(e,function(e){return Math.abs(t-e)>i})&&e.push(t)}),e.sort()},intersection:function(t){var e=this,i=[],n=s.rotation2(-t.direction.angle()).timesMatrix(s.translation(-t.position.x,-t.position.y)),r=n.timesVector2(this._start),a=n.timesVector2(this._control1),h=n.timesVector2(this._control2),l=n.timesVector2(this._end),u=-r.y+3*a.y-3*h.y+l.y,c=3*r.y-6*a.y+3*h.y,d=-3*r.y+3*a.y,m=r.y,f=o(u,c,d,m);return _.each(f,function(n){if(n>=0&&1>=n){var r=e.positionAt(n),s=e.tangentAt(n).normalized(),a=s.perpendicular(),o=r.minus(t.position);o.dot(t.direction)>0&&i.push({distance:o.magnitude(),point:r,normal:a.dot(t.direction)>0?a.negated():a,wind:t.direction.perpendicular().dot(s)<0?1:-1})}}),i},windingIntersection:function(t){var e=0,i=this.intersection(t);return _.each(i,function(t){e+=t.wind}),e},writeToContext:function(t){t.bezierCurveTo(this._control1.x,this._control1.y,this._control2.x,this._control2.y,this._end.x,this._end.y)},transformed:function(t){return new l.Cubic(t.timesVector2(this._start),t.timesVector2(this._control1),t.timesVector2(this._control2),t.timesVector2(this._end))},degreeReduced:function(t){t=t||0;var e=c.set(this._control1).multiplyScalar(3).subtract(this._start).divideScalar(2),i=d.set(this._control2).multiplyScalar(3).subtract(this._end).divideScalar(2),n=m.set(e).subtract(i);return n.magnitude()<=t?new l.Quadratic(this._start,e.average(i),this._end):null}}),u.addInvalidatingGetterSetter(e,"start"),u.addInvalidatingGetterSetter(e,"control1"),u.addInvalidatingGetterSetter(e,"control2"),u.addInvalidatingGetterSetter(e,"end"),e.extremaT=function(t,e,i,n){if(t===e&&t===i&&t===n)return[];var r=-3*t+9*e-9*i+3*n,s=6*t-12*e+6*i,o=-3*t+3*e;return a(r,s,o)},e}),i("DOT/Transform3",["require","PHET_CORE/inherit","AXON/Events","DOT/dot","DOT/Matrix3","DOT/Vector2","DOT/Ray2"],function(t){"use strict";function e(t){n.call(this),this.matrix=r.Matrix3.IDENTITY.copy(),this.inverse=r.Matrix3.IDENTITY.copy(),this.matrixTransposed=r.Matrix3.IDENTITY.copy(),this.inverseTransposed=r.Matrix3.IDENTITY.copy(),this.inverseValid=!0,this.transposeValid=!0,this.inverseTransposeValid=!0,t&&this.setMatrix(t)}var i=t("PHET_CORE/inherit"),n=t("AXON/Events"),r=t("DOT/dot");t("DOT/Matrix3"),t("DOT/Vector2"),t("DOT/Ray2");var s=new r.Matrix3;return r.register("Transform3",e),i(n,e,{setMatrix:function(t){this.matrix.set(t),this.invalidate()},invalidate:function(){this.inverseValid=!1,this.transposeValid=!1,this.inverseTransposeValid=!1,this.trigger0("change")},prepend:function(t){s.set(this.matrix),this.matrix.set(t),this.matrix.multiplyMatrix(s),this.invalidate()},prependTranslation:function(t,e){this.matrix.prependTranslation(t,e),this.invalidate()},append:function(t){this.matrix.multiplyMatrix(t),this.invalidate()},prependTransform:function(t){this.prepend(t.matrix)},appendTransform:function(t){this.append(t.matrix)},applyToCanvasContext:function(t){
t.setTransform(this.matrix.m00(),this.matrix.m10(),this.matrix.m01(),this.matrix.m11(),this.matrix.m02(),this.matrix.m12())},copy:function(){var t=new e(this.matrix);t.inverse=this.inverse,t.matrixTransposed=this.matrixTransposed,t.inverseTransposed=this.inverseTransposed,t.inverseValid=this.inverseValid,t.transposeValid=this.transposeValid,t.inverseTransposeValid=this.inverseTransposeValid},getMatrix:function(){return this.matrix},getInverse:function(){return this.inverseValid||(this.inverseValid=!0,this.inverse.set(this.matrix),this.inverse.invert()),this.inverse},getMatrixTransposed:function(){return this.transposeValid||(this.transposeValid=!0,this.matrixTransposed.set(this.matrix),this.matrixTransposed.transpose()),this.matrixTransposed},getInverseTransposed:function(){return this.inverseTransposeValid||(this.inverseTransposeValid=!0,this.inverseTransposed.set(this.getInverse()),this.inverseTransposed.transpose()),this.inverseTransposed},isIdentity:function(){return this.matrix.type===r.Matrix3.Types.IDENTITY},isFinite:function(){return this.matrix.isFinite()},transformPosition2:function(t){return this.matrix.timesVector2(t)},transformDelta2:function(t){var e=this.getMatrix();return new r.Vector2(e.m00()*t.x+e.m01()*t.y,e.m10()*t.x+e.m11()*t.y)},transformNormal2:function(t){return this.getInverse().timesTransposeVector2(t).normalize()},transformX:function(t){var e=this.getMatrix();return e.m00()*t+e.m02()},transformY:function(t){var e=this.getMatrix();return e.m11()*t+e.m12()},transformDeltaX:function(t){var e=this.getMatrix();return e.m00()*t},transformDeltaY:function(t){var e=this.getMatrix();return e.m11()*t},transformBounds2:function(t){return t.transformed(this.matrix)},transformShape:function(t){return t.transformed(this.matrix)},transformRay2:function(t){return new r.Ray2(this.transformPosition2(t.position),this.transformDelta2(t.direction).normalized())},inversePosition2:function(t){return this.getInverse().timesVector2(t)},inverseDelta2:function(t){var e=this.getInverse();return new r.Vector2(e.m00()*t.x+e.m01()*t.y,e.m10()*t.x+e.m11()*t.y)},inverseNormal2:function(t){return this.matrix.timesTransposeVector2(t).normalize()},inverseX:function(t){var e=this.getInverse();return e.m00()*t+e.m02()},inverseY:function(t){var e=this.getInverse();return e.m11()*t+e.m12()},inverseDeltaX:function(t){var e=this.getInverse();return e.m00()*t},inverseDeltaY:function(t){var e=this.getInverse();return e.m11()*t},inverseBounds2:function(t){return t.transformed(this.getInverse())},inverseShape:function(t){return t.transformed(this.getInverse())},inverseRay2:function(t){return new r.Ray2(this.inversePosition2(t.position),this.inverseDelta2(t.direction).normalized())}}),e}),i("KITE/segments/EllipticalArc",["require","PHET_CORE/inherit","DOT/Vector2","DOT/Bounds2","DOT/Matrix3","DOT/Transform3","DOT/Util","DOT/Util","KITE/kite","KITE/segments/Segment"],function(t){"use strict";function e(t,e,i,n,r,s,a){u.call(this),this._center=t,this._radiusX=e,this._radiusY=i,this._rotation=n,this._startAngle=r,this._endAngle=s,this._anticlockwise=a,this.invalidate()}var i=t("PHET_CORE/inherit"),n=t("DOT/Vector2"),r=t("DOT/Bounds2"),s=t("DOT/Matrix3"),a=t("DOT/Transform3"),o=t("DOT/Util").toDegrees,h=t("DOT/Util"),l=t("KITE/kite"),u=t("KITE/segments/Segment");return l.register("EllipticalArc",e),i(u,e,{invalidate:function(){if(this._unitTransform=null,this._start=null,this._end=null,this._startTangent=null,this._endTangent=null,this._actualEndAngle=null,this._isFullPerimeter=null,this._angleDifference=null,this._unitArcSegment=null,this._bounds=null,this._radiusX<0&&(this._radiusX=-this._radiusX,this._startAngle=Math.PI-this._startAngle,this._endAngle=Math.PI-this._endAngle,this._anticlockwise=!this._anticlockwise),this._radiusY<0&&(this._radiusY=-this._radiusY,this._startAngle=-this._startAngle,this._endAngle=-this._endAngle,this._anticlockwise=!this._anticlockwise),this._radiusX<this._radiusY){this._rotation+=Math.PI/2,this._startAngle-=Math.PI/2,this._endAngle-=Math.PI/2;var t=this._radiusX;this._radiusX=this._radiusY,this._radiusY=t}if(this._radiusX<this._radiusY)throw new Error("Not verified to work if radiusX < radiusY")},getUnitTransform:function(){return null===this._unitTransform&&(this._unitTransform=e.computeUnitTransform(this._center,this._radiusX,this._radiusY,this._rotation)),this._unitTransform},get unitTransform(){return this.getUnitTransform()},getStart:function(){return null===this._start&&(this._start=this.positionAtAngle(this._startAngle)),this._start},get start(){return this.getStart()},getEnd:function(){return null===this._end&&(this._end=this.positionAtAngle(this._endAngle)),this._end},get end(){return this.getEnd()},getStartTangent:function(){return null===this._startTangent&&(this._startTangent=this.tangentAtAngle(this._startAngle)),this._startTangent},get startTangent(){return this.getStartTangent()},getEndTangent:function(){return null===this._endTangent&&(this._endTangent=this.tangentAtAngle(this._endAngle)),this._endTangent},get endTangent(){return this.getEndTangent()},getActualEndAngle:function(){return null===this._actualEndAngle&&(this._anticlockwise?this._startAngle>this._endAngle?this._actualEndAngle=this._endAngle:this._startAngle<this._endAngle?this._actualEndAngle=this._endAngle-2*Math.PI:this._actualEndAngle=this._startAngle:this._startAngle<this._endAngle?this._actualEndAngle=this._endAngle:this._startAngle>this._endAngle?this._actualEndAngle=this._endAngle+2*Math.PI:this._actualEndAngle=this._startAngle),this._actualEndAngle},get actualEndAngle(){return this.getActualEndAngle()},getIsFullPerimeter:function(){return null===this._isFullPerimeter&&(this._isFullPerimeter=!this._anticlockwise&&this._endAngle-this._startAngle>=2*Math.PI||this._anticlockwise&&this._startAngle-this._endAngle>=2*Math.PI),this._isFullPerimeter},get isFullPerimeter(){return this.getIsFullPerimeter()},getAngleDifference:function(){return null===this._angleDifference&&(this._angleDifference=this._anticlockwise?this._startAngle-this._endAngle:this._endAngle-this._startAngle,this._angleDifference<0&&(this._angleDifference+=2*Math.PI)),this._angleDifference},get angleDifference(){return this.getAngleDifference()},getUnitArcSegment:function(){return null===this._unitArcSegment&&(this._unitArcSegment=new l.Arc(n.ZERO,1,this._startAngle,this._endAngle,this._anticlockwise)),this._unitArcSegment},getBounds:function(){if(null===this._bounds&&(this._bounds=r.NOTHING.withPoint(this.getStart()).withPoint(this.getEnd()),this._startAngle!==this._endAngle)){var t=Math.atan(-(this._radiusY/this._radiusX)*Math.tan(this._rotation)),e=Math.atan(this._radiusY/this._radiusX/Math.tan(this._rotation));this.possibleExtremaAngles=[t,t+Math.PI,e,e+Math.PI],_.each(this.possibleExtremaAngles,this.includeBoundsAtAngle.bind(this))}return this._bounds},get bounds(){return this.getBounds()},getNondegenerateSegments:function(){if(this._radiusX<=0||this._radiusY<=0||this._startAngle===this._endAngle)return[];if(this._radiusX===this._radiusY){var t=this._startAngle-this._rotation,e=this._endAngle-this._rotation;return Math.abs(this._endAngle-this._startAngle)===2*Math.PI&&(e=this._anticlockwise?t-2*Math.PI:t+2*Math.PI),[new l.Arc(this._center,this._radiusX,t,e,this._anticlockwise)]}return[this]},includeBoundsAtAngle:function(t){this.containsAngle(t)&&(this._bounds=this._bounds.withPoint(this.positionAtAngle(t)))},mapAngle:function(t){return this._startAngle>this.getActualEndAngle()?h.moduloBetweenUp(t,this._startAngle-2*Math.PI,this._startAngle):h.moduloBetweenDown(t,this._startAngle,this._startAngle+2*Math.PI)},tAtAngle:function(t){return(this.mapAngle(t)-this._startAngle)/(this.getActualEndAngle()-this._startAngle)},angleAt:function(t){return this._startAngle+(this.getActualEndAngle()-this._startAngle)*t},positionAt:function(t){return this.positionAtAngle(this.angleAt(t))},tangentAt:function(t){return this.tangentAtAngle(this.angleAt(t))},curvatureAt:function(t){var e=this.angleAt(t),i=this._radiusX*Math.sin(e),n=this._radiusY*Math.cos(e),r=Math.pow(n*n+i*i,1.5);return(this._anticlockwise?-1:1)*this._radiusX*this._radiusY/r},positionAtAngle:function(t){return this.getUnitTransform().transformPosition2(n.createPolar(1,t))},tangentAtAngle:function(t){var e=this.getUnitTransform().transformNormal2(n.createPolar(1,t));return this._anticlockwise?e.perpendicular():e.perpendicular().negated()},containsAngle:function(t){var e=this._anticlockwise?t-this._endAngle:t-this._startAngle,i=e%(2*Math.PI);return 0>i&&(i+=2*Math.PI),i<=this.getAngleDifference()},offsetTo:function(t,e){for(var i=32,n=[],r=[],s=0;i>s;s++){var a=s/(i-1);e&&(a=1-a);var o=this.angleAt(a);n.push(this.positionAtAngle(o).plus(this.tangentAtAngle(o).perpendicular().normalized().times(t))),s>0&&r.push(new l.Line(n[s-1],n[s]))}return r},getSVGPathFragment:function(){var t,e=.01,i=this._anticlockwise?"0":"1",n=o(this._rotation);if(this.getAngleDifference()<2*Math.PI-e)return t=this.getAngleDifference()<Math.PI?"0":"1","A "+l.svgNumber(this._radiusX)+" "+l.svgNumber(this._radiusY)+" "+n+" "+t+" "+i+" "+l.svgNumber(this.getEnd().x)+" "+l.svgNumber(this.getEnd().y);var r=(this._startAngle+this._endAngle)/2,s=this.positionAtAngle(r);t="0";var a="A "+l.svgNumber(this._radiusX)+" "+l.svgNumber(this._radiusY)+" "+n+" "+t+" "+i+" "+l.svgNumber(s.x)+" "+l.svgNumber(s.y),h="A "+l.svgNumber(this._radiusX)+" "+l.svgNumber(this._radiusY)+" "+n+" "+t+" "+i+" "+l.svgNumber(this.getEnd().x)+" "+l.svgNumber(this.getEnd().y);return a+" "+h},strokeLeft:function(t){return this.offsetTo(-t/2,!1)},strokeRight:function(t){return this.offsetTo(t/2,!0)},getInteriorExtremaTs:function(){var t=this,e=[];return _.each(this.possibleExtremaAngles,function(i){if(t.containsAngle(i)){var n=t.tAtAngle(i),r=1e-10;n>r&&1-r>n&&e.push(n)}}),e.sort()},subdivided:function(t){var e=this.angleAt(0),i=this.angleAt(t),n=this.angleAt(1);return[new l.EllipticalArc(this._center,this._radiusX,this._radiusY,this._rotation,e,i,this._anticlockwise),new l.EllipticalArc(this._center,this._radiusX,this._radiusY,this._rotation,i,n,this._anticlockwise)]},intersection:function(t){var e=this.getUnitTransform(),i=e.inverseRay2(t),n=this.getUnitArcSegment().intersection(i);return _.map(n,function(i){var n=e.transformPosition2(i.point);return{distance:t.position.distance(n),point:n,normal:e.inverseNormal2(i.normal),wind:i.wind}})},windingIntersection:function(t){var e=this.getUnitTransform().inverseRay2(t);return this.getUnitArcSegment().windingIntersection(e)},writeToContext:function(t){t.ellipse?t.ellipse(this._center.x,this._center.y,this._radiusX,this._radiusY,this._rotation,this._startAngle,this._endAngle,this._anticlockwise):(this.getUnitTransform().getMatrix().canvasAppendTransform(t),t.arc(0,0,1,this._startAngle,this._endAngle,this._anticlockwise),this.getUnitTransform().getInverse().canvasAppendTransform(t))},transformed:function(t){var e=t.timesVector2(n.createPolar(this._radiusX,this._rotation)).minus(t.timesVector2(n.ZERO)),i=t.timesVector2(n.createPolar(this._radiusY,this._rotation+Math.PI/2)).minus(t.timesVector2(n.ZERO)),r=e.angle(),s=e.magnitude(),a=i.magnitude(),o=t.getDeterminant()<0,h=o?!this._anticlockwise:this._anticlockwise,u=o?-this._startAngle:this._startAngle,c=o?-this._endAngle:this._endAngle;return Math.abs(this._endAngle-this._startAngle)===2*Math.PI&&(c=h?u-2*Math.PI:u+2*Math.PI),new l.EllipticalArc(t.timesVector2(this._center),s,a,r,u,c,h)}}),u.addInvalidatingGetterSetter(e,"center"),u.addInvalidatingGetterSetter(e,"radiusX"),u.addInvalidatingGetterSetter(e,"radiusY"),u.addInvalidatingGetterSetter(e,"rotation"),u.addInvalidatingGetterSetter(e,"startAngle"),u.addInvalidatingGetterSetter(e,"endAngle"),u.addInvalidatingGetterSetter(e,"anticlockwise"),e.computeUnitTransform=function(t,e,i,n){return new a(s.translation(t.x,t.y).timesMatrix(s.rotation2(n)).timesMatrix(s.scaling(e,i)))},e}),i("KITE/Shape",["require","KITE/kite","PHET_CORE/inherit","AXON/Events","DOT/Vector2","DOT/Bounds2","DOT/Ray2","KITE/util/Subpath","KITE/parser/svgPath","KITE/segments/Arc","KITE/segments/Cubic","KITE/segments/EllipticalArc","KITE/segments/Line","KITE/segments/Quadratic"],function(t){"use strict";function e(t,e){return new h(t,e)}function i(t,e){return new h(t,e)}function n(t,e,i,n){return i.copy().subtract(t).multiplyScalar((1-n)/6).add(e)}function r(t,e){var i=this;if(o.call(this),this.subpaths=[],this._bounds=e?e.copy():null,this.resetControlPoints(),this._invalidateListener=this.invalidate.bind(this),this._invalidatingPoints=!1,"object"==typeof t)for(var n=0;n<t.length;n++)this.addSubpath(t[n]);t&&"object"!=typeof t&&_.each(d.parse(t),function(t){i[t.cmd].apply(i,t.args)}),this.invalidate()}var s=t("KITE/kite"),a=t("PHET_CORE/inherit"),o=t("AXON/Events"),h=t("DOT/Vector2"),l=t("DOT/Bounds2"),u=t("DOT/Ray2"),c=t("KITE/util/Subpath"),d=t("KITE/parser/svgPath"),m=t("KITE/segments/Arc"),f=t("KITE/segments/Cubic"),p=t("KITE/segments/EllipticalArc"),g=t("KITE/segments/Line"),b=t("KITE/segments/Quadratic");return s.register("Shape",r),a(o,r,{resetControlPoints:function(){this.lastQuadraticControlPoint=null,this.lastCubicControlPoint=null},setQuadraticControlPoint:function(t){this.lastQuadraticControlPoint=t,this.lastCubicControlPoint=null},setCubicControlPoint:function(t){this.lastQuadraticControlPoint=null,this.lastCubicControlPoint=t},subpath:function(){return this.hasSubpaths()&&this.addSubpath(new c),this},moveTo:function(t,e){return this.moveToPoint(i(t,e))},moveToRelative:function(t,e){return this.moveToPointRelative(i(t,e))},moveToPointRelative:function(t){return this.moveToPoint(this.getRelativePoint().plus(t))},moveToPoint:function(t){return this.addSubpath((new c).addPoint(t)),this.resetControlPoints(),this},lineTo:function(t,e){return this.lineToPoint(i(t,e))},lineToRelative:function(t,e){return this.lineToPointRelative(i(t,e))},lineToPointRelative:function(t){return this.lineToPoint(this.getRelativePoint().plus(t))},lineToPoint:function(t){if(this.hasSubpaths()){var e=this.getLastSubpath().getLastPoint(),i=t,n=new g(e,i);this.getLastSubpath().addPoint(i),this.addSegmentAndBounds(n)}else this.ensure(t);return this.resetControlPoints(),this},horizontalLineTo:function(t){return this.lineTo(t,this.getRelativePoint().y)},horizontalLineToRelative:function(t){return this.lineToRelative(t,0)},verticalLineTo:function(t){return this.lineTo(this.getRelativePoint().x,t)},verticalLineToRelative:function(t){return this.lineToRelative(0,t)},quadraticCurveTo:function(t,e,n,r){return this.quadraticCurveToPoint(i(t,e),i(n,r))},quadraticCurveToRelative:function(t,e,n,r){return this.quadraticCurveToPointRelative(i(t,e),i(n,r))},quadraticCurveToPointRelative:function(t,e){var i=this.getRelativePoint();return this.quadraticCurveToPoint(i.plus(t),i.plus(e))},smoothQuadraticCurveTo:function(t,e){return this.quadraticCurveToPoint(this.getSmoothQuadraticControlPoint(),i(t,e))},smoothQuadraticCurveToRelative:function(t,e){return this.quadraticCurveToPoint(this.getSmoothQuadraticControlPoint(),i(t,e).plus(this.getRelativePoint()))},quadraticCurveToPoint:function(t,e){var i=this;this.ensure(t);var n=this.getLastSubpath().getLastPoint(),r=new b(n,t,e);this.getLastSubpath().addPoint(e);var s=r.getNondegenerateSegments();return _.each(s,function(t){i.addSegmentAndBounds(t)}),this.setQuadraticControlPoint(t),this},cubicCurveTo:function(t,e,n,r,s,a){return this.cubicCurveToPoint(i(t,e),i(n,r),i(s,a))},cubicCurveToRelative:function(t,e,n,r,s,a){return this.cubicCurveToPointRelative(i(t,e),i(n,r),i(s,a))},cubicCurveToPointRelative:function(t,e,i){var n=this.getRelativePoint();return this.cubicCurveToPoint(n.plus(t),n.plus(e),n.plus(i))},smoothCubicCurveTo:function(t,e,n,r){return this.cubicCurveToPoint(this.getSmoothCubicControlPoint(),i(t,e),i(n,r))},smoothCubicCurveToRelative:function(t,e,n,r){return this.cubicCurveToPoint(this.getSmoothCubicControlPoint(),i(t,e).plus(this.getRelativePoint()),i(n,r).plus(this.getRelativePoint()))},cubicCurveToPoint:function(t,e,i){var n=this;this.ensure(t);var r=this.getLastSubpath().getLastPoint(),s=new f(r,t,e,i),a=s.getNondegenerateSegments();return _.each(a,function(t){n.addSegmentAndBounds(t)}),this.getLastSubpath().addPoint(i),this.setCubicControlPoint(e),this},arc:function(t,e,n,r,s,a){return this.arcPoint(i(t,e),n,r,s,a)},arcPoint:function(t,e,i,n,r){var s=new m(t,e,i,n,r),a=s.getStart(),o=s.getEnd();return this.hasSubpaths()&&this.getLastSubpath().getLength()>0&&!a.equals(this.getLastSubpath().getLastPoint(),0)&&this.addSegmentAndBounds(new g(this.getLastSubpath().getLastPoint(),a)),this.hasSubpaths()||this.addSubpath(new c),this.getLastSubpath().addPoint(a),this.getLastSubpath().addPoint(o),this.addSegmentAndBounds(s),this.resetControlPoints(),this},ellipticalArc:function(t,e,n,r,s,a,o,h){return this.ellipticalArcPoint(i(t,e),n,r,s,a,o,h)},ellipticalArcPoint:function(t,e,i,n,r,s,a){var o=new p(t,e,i,n,r,s,a),h=o.start,l=o.end;return this.hasSubpaths()&&this.getLastSubpath().getLength()>0&&!h.equals(this.getLastSubpath().getLastPoint(),0)&&this.addSegmentAndBounds(new g(this.getLastSubpath().getLastPoint(),h)),this.hasSubpaths()||this.addSubpath(new c),this.getLastSubpath().addPoint(h),this.getLastSubpath().addPoint(l),this.addSegmentAndBounds(o),this.resetControlPoints(),this},close:function(){if(this.hasSubpaths()){var t=this.getLastSubpath(),e=new c;t.close(),this.addSubpath(e),e.addPoint(t.getFirstPoint())}return this.resetControlPoints(),this},ellipticalArcToRelative:function(t,e,i,n,r,s,a){var o=this.getRelativePoint();return this.ellipticalArcTo(t,e,i,n,r,s+o.x,a+o.y)},ellipticalArcTo:function(t,e,i,n,r,s,a){throw new Error("ellipticalArcTo unimplemented")},circle:function(t,i,n){if("object"==typeof t){var r=t;return n=i,this.arcPoint(r,n,0,2*Math.PI,!1)}return this.arcPoint(e(t,i),n,0,2*Math.PI,!1)},ellipse:function(t,e,n,r,s){if("object"==typeof t){var a=t;return s=r,r=n,n=e,this.ellipticalArcPoint(a,n,r,s||0,0,2*Math.PI,!1)}return this.ellipticalArcPoint(i(t,e),n,r,s||0,0,2*Math.PI,!1)},rect:function(t,e,n,r){var s=new c;return this.addSubpath(s),s.addPoint(i(t,e)),s.addPoint(i(t+n,e)),s.addPoint(i(t+n,e+r)),s.addPoint(i(t,e+r)),this.addSegmentAndBounds(new g(s.points[0],s.points[1])),this.addSegmentAndBounds(new g(s.points[1],s.points[2])),this.addSegmentAndBounds(new g(s.points[2],s.points[3])),s.close(),this.addSubpath(new c),this.getLastSubpath().addPoint(i(t,e)),this.resetControlPoints(),this},roundRect:function(t,e,i,n,r,s){var a=t+r,o=t+i-r,h=e+s,l=e+n-s;return r===s?this.arc(o,h,r,-Math.PI/2,0,!1).arc(o,l,r,0,Math.PI/2,!1).arc(a,l,r,Math.PI/2,Math.PI,!1).arc(a,h,r,Math.PI,3*Math.PI/2,!1).close():this.ellipticalArc(o,h,r,s,0,-Math.PI/2,0,!1).ellipticalArc(o,l,r,s,0,0,Math.PI/2,!1).ellipticalArc(a,l,r,s,0,Math.PI/2,Math.PI,!1).ellipticalArc(a,h,r,s,0,Math.PI,3*Math.PI/2,!1).close(),this},polygon:function(t){var e=t.length;if(e>0){this.moveToPoint(t[0]);for(var i=1;e>i;i++)this.lineToPoint(t[i])}return this.close()},cardinalSpline:function(t,e){e=_.extend({tension:0,isClosedLineSegments:!1},e);for(var i=t.length,r=e.isClosedLineSegments?i:i-1,s=0;r>s;s++){var a;a=0!==s||e.isClosedLineSegments?s!==r-1||e.isClosedLineSegments?[t[(s-1+i)%i],t[s%i],t[(s+1)%i],t[(s+2)%i]]:[t[s-1],t[s],t[s+1],t[s+1]]:[t[0],t[0],t[1],t[2]];var o=[a[1],n(a[0],a[1],a[2],e.tension),n(a[3],a[2],a[1],e.tension),a[2]];0===s&&(this.ensure(o[0]),this.getLastSubpath().addPoint(o[0])),this.cubicCurveToPoint(o[1],o[2],o[3])}return this},copy:function(){return new r(_.map(this.subpaths,function(t){return t.copy()}),this.bounds)},writeToContext:function(t){for(var e=this.subpaths.length,i=0;e>i;i++)this.subpaths[i].writeToContext(t)},getSVGPath:function(){for(var t="",e=this.subpaths.length,i=0;e>i;i++){var n=this.subpaths[i];if(n.isDrawable()){var r=n.segments[0].start;t+="M "+s.svgNumber(r.x)+" "+s.svgNumber(r.y)+" ";for(var a=0;a<n.segments.length;a++)t+=n.segments[a].getSVGPathFragment()+" ";n.isClosed()&&(t+="Z ")}}return t},transformed:function(t){var e=_.map(this.subpaths,function(e){return e.transformed(t)}),i=_.reduce(e,function(t,e){return t.union(e.bounds)},l.NOTHING);return new r(e,i)},nonlinearTransformed:function(t){t=_.extend({minLevels:0,maxLevels:7,distanceEpsilon:.16,curveEpsilon:t&&t.includeCurvature?.002:null},t);var e=_.map(this.subpaths,function(e){return e.nonlinearTransformed(t)}),i=_.reduce(e,function(t,e){return t.union(e.bounds)},l.NOTHING);return new r(e,i)},polarToCartesian:function(t){return this.nonlinearTransformed(_.extend({pointMap:function(t){return h.createPolar(t.y,t.x)},methodName:"polarToCartesian"},t))},toPiecewiseLinear:function(t){return this.nonlinearTransformed(t)},containsPoint:function(t){var e=new u(t,h.X_UNIT);return 0!==this.windingIntersection(e)},intersection:function(t){for(var e=[],i=this.subpaths.length,n=0;i>n;n++){var r=this.subpaths[n];if(r.isDrawable()){for(var s=r.segments.length,a=0;s>a;a++){var o=r.segments[a];e=e.concat(o.intersection(t))}r.hasClosingSegment()&&(e=e.concat(r.getClosingSegment().intersection(t)))}}return _.sortBy(e,function(t){return t.distance})},windingIntersection:function(t){for(var e=0,i=this.subpaths.length,n=0;i>n;n++){var r=this.subpaths[n];if(r.isDrawable()){for(var s=r.segments.length,a=0;s>a;a++)e+=r.segments[a].windingIntersection(t);r.hasClosingSegment()&&(e+=r.getClosingSegment().windingIntersection(t))}}return e},intersectsBounds:function(t){if(this.bounds.intersection(t).equals(this.bounds))return!0;var e,i,n=new u(new h(t.minX,t.minY),new h(1,0)),r=new u(new h(t.minX,t.minY),new h(0,1)),s=new u(new h(t.maxX,t.maxY),new h(-1,0)),a=new u(new h(t.maxX,t.maxY),new h(0,-1)),o=this.intersection(n).concat(this.intersection(s));for(i=0;i<o.length;i++)if(e=o[i].point,e.x>=t.minX&&e.x<=t.maxX)return!0;var l=this.intersection(r).concat(this.intersection(a));for(i=0;i<l.length;i++)if(e=l[i].point,e.y>=t.minY&&e.y<=t.maxY)return!0;return!1},getStrokedShape:function(t){for(var e=[],i=l.NOTHING.copy(),n=this.subpaths.length,s=0;n>s;s++){var a=this.subpaths[s],o=a.stroked(t);e=e.concat(o)}for(n=e.length,s=0;n>s;s++)i.includeBounds(e[s].bounds);return new r(e,i)},getOffsetShape:function(t){for(var e=[],i=l.NOTHING.copy(),n=this.subpaths.length,s=0;n>s;s++)e.push(this.subpaths[s].offset(t));for(n=e.length,s=0;n>s;s++)i.includeBounds(e[s].bounds);return new r(e,i)},getBounds:function(){if(null===this._bounds){var t=l.NOTHING.copy();_.each(this.subpaths,function(e){t.includeBounds(e.getBounds())}),this._bounds=t}return this._bounds},get bounds(){return this.getBounds()},getStrokedBounds:function(t){for(var e=!0,i=0;i<this.subpaths.length;i++){var n=this.subpaths[i];if(n.isDrawable()&&!n.isClosed()){e=!1;break}for(var r=0;r<n.segments.length;r++){var s=n.segments[r];if(!s.areStrokedBoundsDilated()){e=!1;break}}}return e?this.bounds.dilated(t.lineWidth/2):this.bounds.union(this.getStrokedShape(t).bounds)},getBoundsWithTransform:function(t,e){if(t.isAxisAligned())return this.getStrokedBounds(e);for(var i=l.NOTHING.copy(),n=this.subpaths.length,r=0;n>r;r++){var s=this.subpaths[r];i.includeBounds(s.getBoundsWithTransform(t))}return e&&i.includeBounds(this.getStrokedShape(e).getBoundsWithTransform(t)),i},invalidatePoints:function(){this._invalidatingPoints=!0;for(var t=this.subpaths.length,e=0;t>e;e++)this.subpaths[e].invalidatePoints();this._invalidatingPoints=!1,this.invalidate()},toString:function(){return"new kite.Shape( '"+this.getSVGPath()+"' )"},invalidate:function(){this._invalidatingPoints||(this._bounds=null,this.trigger0("invalidated"))},addSegmentAndBounds:function(t){this.getLastSubpath().addSegment(t),this.invalidate()},ensure:function(t){this.hasSubpaths()||(this.addSubpath(new c),this.getLastSubpath().addPoint(t))},addSubpath:function(t){return this.subpaths.push(t),t.onStatic("invalidated",this._invalidateListener),this.invalidate(),this},hasSubpaths:function(){return this.subpaths.length>0},getLastSubpath:function(){return _.last(this.subpaths)},getLastPoint:function(){return this.hasSubpaths()?this.getLastSubpath().getLastPoint():null},getLastSegment:function(){if(!this.hasSubpaths())return null;var t=this.getLastSubpath();return t.isDrawable()?t.getLastSegment():null},getSmoothQuadraticControlPoint:function(){var t=this.getLastPoint();return this.lastQuadraticControlPoint?t.plus(t.minus(this.lastQuadraticControlPoint)):t},getSmoothCubicControlPoint:function(){var t=this.getLastPoint();return this.lastCubicControlPoint?t.plus(t.minus(this.lastCubicControlPoint)):t},getRelativePoint:function(){var t=this.getLastPoint();return t?t:h.ZERO}}),r.rectangle=function(t,e,i,n){return(new r).rect(t,e,i,n)},r.rect=r.rectangle,r.roundRect=function(t,e,i,n,s,a){return(new r).roundRect(t,e,i,n,s,a)},r.roundRectangle=r.roundRect,r.roundedRectangleWithRadii=function(t,e,i,n,r){var a=r&&r.topLeft||0,o=r&&r.topRight||0,h=r&&r.bottomLeft||0,l=r&&r.bottomRight||0,u=new s.Shape,c=t+i,d=e+n;return l>0?u.arc(c-l,d-l,l,0,Math.PI/2,!1):u.moveTo(c,d),h>0?u.arc(t+h,d-h,h,Math.PI/2,Math.PI,!1):u.lineTo(t,d),a>0?u.arc(t+a,e+a,a,Math.PI,3*Math.PI/2,!1):u.lineTo(t,e),o>0?u.arc(c-o,e+o,o,3*Math.PI/2,2*Math.PI,!1):u.lineTo(c,e),u.close(),u},r.polygon=function(t){return(new r).polygon(t)},r.bounds=function(t){return(new r).rect(t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY)},r.lineSegment=function(t,e,i,n){return"number"==typeof t?(new r).moveTo(t,e).lineTo(i,n):(new r).moveToPoint(t).lineToPoint(e)},r.regularPolygon=function(t,e){var i=new r;return _.each(_.range(t),function(n){var r=h.createPolar(e,2*Math.PI*n/t);0===n?i.moveToPoint(r):i.lineToPoint(r)}),i.close()},r.circle=function(t,e,i){return void 0===e?(new r).circle(0,0,t):(new r).circle(t,e,i).close()},r.ellipse=function(t,e,i,n,s){return void 0===n?(new r).ellipse(0,0,t,e,i):(new r).ellipse(t,e,i,n,s).close()},r.arc=function(t,e,i,n,s,a){return(new r).arc(t,e,i,n,s,a)},r}),i("SCENERY/scenery",["require","PHET_CORE/Namespace","PHET_CORE/extend","PHET_CORE/phetAllocation"],function(t){"use strict";function e(t){h.logString+=t.replace(/%c/g,"")+"\n"}function i(){window.console&&window.console.log&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments,0))}var n=t("PHET_CORE/Namespace"),r=t("PHET_CORE/extend");window.sceneryLog=null,window.sceneryAccessibilityLog=null,window.phetAllocation=t("PHET_CORE/phetAllocation");var s=document.createElement("canvas"),a=s.getContext("2d"),o="",h=new n("scenery");h.register("scratchCanvas",s),h.register("scratchContext",a),h.register("svgns","http://www.w3.org/2000/svg"),h.register("xlinkns","http://www.w3.org/1999/xlink");var l={dirty:{name:"dirty",style:"color: #aaa;"},bounds:{name:"bounds",style:"color: #aaa;"},hitTest:{name:"hitTest",style:"color: #aaa;"},PerfCritical:{name:"Perf",style:"color: #f00;"},PerfMajor:{name:"Perf",style:"color: #aa0;"},PerfMinor:{name:"Perf",style:"color: #088;"},PerfVerbose:{name:"Perf",style:"color: #888;"},Cursor:{name:"Cursor",style:"color: #000;"},Stitch:{name:"Stitch",style:"color: #000;"},StitchDrawables:{name:"Stitch",style:"color: #000;"},GreedyStitcher:{name:"Greedy",style:"color: #088;"},GreedyVerbose:{name:"Greedy",style:"color: #888;"},RelativeTransform:{name:"RelativeTransform",style:"color: #606;"},BackboneDrawable:{name:"Backbone",style:"color: #a00;"},CanvasBlock:{name:"Canvas",style:"color: #000;"},WebGLBlock:{name:"WebGL",style:"color: #000;"},Display:{name:"Display",style:"color: #000;"},DOMBlock:{name:"DOM",style:"color: #000;"},Drawable:{name:"",style:"color: #000;"},FittedBlock:{name:"FittedBlock",style:"color: #000;"},Input:{name:"Input",style:"color: #000;"},InputEvent:{name:"InputEvent",style:"color: #000;"},Instance:{name:"Instance",style:"color: #000;"},InstanceTree:{name:"InstanceTree",style:"color: #000;"},ChangeInterval:{name:"ChangeInterval",style:"color: #0a0;"},SVGBlock:{name:"SVG",style:"color: #000;"},SVGGroup:{name:"SVGGroup",style:"color: #000;"},ImageSVGDrawable:{name:"ImageSVGDrawable",style:"color: #000;"},Paints:{name:"Paints",style:"color: #000;"},Accessibility:{name:"Accessibility",style:"color: #000;"},AccessibleInstance:{name:"AccessibleInstance",style:"color: #000;"}};return r(h,{logString:"",logFunction:function(){window.console&&window.console.log&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments,0))},switchLogToConsole:function(){h.logFunction=i},switchLogToString:function(){window.console&&window.console.log("switching to string log"),h.logFunction=e},enableIndividualLog:function(t){return"stitch"===t?(this.enableIndividualLog("Stitch"),this.enableIndividualLog("StitchDrawables"),this.enableIndividualLog("GreedyStitcher"),void this.enableIndividualLog("GreedyVerbose")):"perf"===t?(this.enableIndividualLog("PerfCritical"),this.enableIndividualLog("PerfMajor"),this.enableIndividualLog("PerfMinor"),void this.enableIndividualLog("PerfVerbose")):void(t&&(window.sceneryLog[t]=window.sceneryLog[t]||function(e,i){var n=l[t],r=n.name?"["+n.name+"] ":"",s="color: #ddd;";h.logFunction("%c"+o+"%c"+r+e,s,i?i:n.style)}))},disableIndividualLog:function(t){t&&delete window.sceneryLog[t]},enableLogging:function(t){t||(t=["stitch"]),window.sceneryLog=function(t){h.logFunction(t)},window.sceneryLog.push=function(){o+="| "},window.sceneryLog.pop=function(){o=o.slice(0,-2)};for(var e=0;e<t.length;e++)this.enableIndividualLog(t[e])},disableLogging:function(){window.sceneryLog=null},isLoggingPerformance:function(){return window.sceneryLog.PerfCritical||window.sceneryLog.PerfMajor||window.sceneryLog.PerfMinor||window.sceneryLog.PerfVerbose}}),h}),i("SCENERY/display/Renderer",["require","SCENERY/scenery"],function(t){"use strict";var e=t("SCENERY/scenery"),i={};e.register("Renderer",i),i.numActiveRenderers=4,i.bitsPerRenderer=5,i.bitmaskRendererArea=255,i.bitmaskCurrentRendererArea=15,i.bitmaskLacksOffset=65536,i.bitmaskLacksShift=16,i.bitmaskNodeDefault=i.bitmaskRendererArea,i.bitmaskCanvas=1,i.bitmaskSVG=2,i.bitmaskDOM=4,i.bitmaskWebGL=8,i.bitmaskSingleCanvas=256,i.bitmaskSingleSVG=512,i.bitmaskNotPainted=4096,i.bitmaskBoundsValid=8192,i.bitmaskNotAccessible=16384,i.bitmaskLacksCanvas=i.bitmaskCanvas<<i.bitmaskLacksShift,i.bitmaskLacksSVG=i.bitmaskSVG<<i.bitmaskLacksShift,i.bitmaskLacksDOM=i.bitmaskDOM<<i.bitmaskLacksShift,i.bitmaskLacksWebGL=i.bitmaskWebGL<<i.bitmaskLacksShift,i.isCanvas=function(t){return 0!==(t&i.bitmaskCanvas)},i.isSVG=function(t){return 0!==(t&i.bitmaskSVG)},i.isDOM=function(t){return 0!==(t&i.bitmaskDOM)},i.isWebGL=function(t){return 0!==(t&i.bitmaskWebGL)};var n={canvas:i.bitmaskCanvas,svg:i.bitmaskSVG,dom:i.bitmaskDOM,webgl:i.bitmaskWebGL};return i.fromName=function(t){return n[t]},i.stripBitmask=function(t){return t&i.bitmaskRendererArea},i.createOrderBitmask=function(t,e,i,n){return t=t||0,e=e||0,i=i||0,n=n||0,t|e<<5|i<<10|n<<15},i.bitmaskOrder=function(t,e){return e>0&&(t>>=5*e),t&i.bitmaskCurrentRendererArea},i.bitmaskOrderFirst=function(t){return t&i.bitmaskCurrentRendererArea},i.bitmaskOrderSecond=function(t){return t>>5&i.bitmaskCurrentRendererArea},i.bitmaskOrderThird=function(t){return t>>10&i.bitmaskCurrentRendererArea},i.bitmaskOrderFourth=function(t){return t>>15&i.bitmaskCurrentRendererArea},i.pushOrderBitmask=function(t,e){for(var n=e,r=i.bitsPerRenderer*i.numActiveRenderers,s=0;r>=s;s+=i.bitsPerRenderer){var a=t>>s&i.bitmaskCurrentRendererArea;if(a===n)return t;if(0===a)return t|=n<<s;if(t&=~(i.bitmaskCurrentRendererArea<<s),t|=n<<s,n=a,n===e)return t}throw new Error("pushOrderBitmask overflow")},i.createSelfDrawable=function(t,e,n,r){var s;if(i.isCanvas(n))s=e.createCanvasDrawable(n,t);else if(i.isSVG(n))s=e.createSVGDrawable(n,t);else if(i.isDOM(n))s=e.createDOMDrawable(n,t);else{if(!i.isWebGL(n))throw new Error("Unrecognized renderer: "+n);s=e.createWebGLDrawable(n,t)}return s.setFittable(r),s},i.webglCustom=1,i.webglTexturedTriangles=2,i}),i("SCENERY/util/RendererSummary",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/Renderer"],function(t){"use strict";function e(t){this.node=t,this._counts={};for(var i=0;a>i;i++)this._counts[s[i]]=0;
this.bitmask=o,this.selfBitmask=e.summaryBitmaskForNodeSelf(t),this.summaryChange(this.bitmask,this.selfBitmask);var n=this.selfChange.bind(this);this.node.onStatic("opacity",n),this.node.onStatic("hint",n),this.node.onStatic("clip",n),this.node.onStatic("selfBoundsValid",n),this.node.onStatic("accessibleContent",n)}for(var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/Renderer"),s=[r.bitmaskCanvas,r.bitmaskSVG,r.bitmaskDOM,r.bitmaskWebGL,r.bitmaskSingleCanvas,r.bitmaskSingleSVG,r.bitmaskNotPainted,r.bitmaskBoundsValid,r.bitmaskNotAccessible,r.bitmaskLacksCanvas,r.bitmaskLacksSVG,r.bitmaskLacksDOM,r.bitmaskLacksWebGL],a=s.length,o=0,h=0;a>h;h++)o|=s[h];return n.register("RendererSummary",e),i(Object,e,{summaryChange:function(t,e){for(var i=t^e,n=0,r=0,o=0;a>o;o++){var h=s[o];h&i&&(h&e?(this._counts[h]--,0===this._counts[h]&&(r|=h)):(this._counts[h]++,1===this._counts[h]&&(n|=h)))}if(n||r){for(var l=0;a>l;l++){var u=s[l];r&u&&(this.bitmask|=u),n&u&&(this.bitmask^=u)}this.node.trigger0("rendererSummary");for(var c=this.node._parents.length,d=0;c>d;d++)this.node._parents[d]._rendererSummary.summaryChange(n,r)}},selfChange:function(){var t=this.selfBitmask,i=e.summaryBitmaskForNodeSelf(this.node);t!==i&&(this.summaryChange(t,i),this.selfBitmask=i)},computeBitmask:function(){for(var t=0,e=0;a>e;e++)0===this._counts[s[e]]&&(t|=s[e]);return t},isSubtreeFullyCompatible:function(t){return!!(t&this.bitmask)},isSubtreeContainingCompatible:function(t){return!(t<<r.bitmaskLacksShift&this.bitmask)},isSingleCanvasSupported:function(){return!!(r.bitmaskSingleCanvas&this.bitmask)},isSingleSVGSupported:function(){return!!(r.bitmaskSingleSVG&this.bitmask)},isNotPainted:function(){return!!(r.bitmaskNotPainted&this.bitmask)},isNotAccessible:function(){return!!(r.bitmaskNotAccessible&this.bitmask)},areBoundsValid:function(){return!!(r.bitmaskBoundsValid&this.bitmask)},isSubtreeRenderedExclusivelySVG:function(t){if(!this.isSingleSVGSupported())return!1;for(var e=0;e<r.numActiveRenderers;e++){var i=r.bitmaskOrder(t,e);if(r.bitmaskSVG&i)return!0;if(this.isSubtreeContainingCompatible(i))return!1}return!1},audit:function(){},toString:function(){for(var t=e.bitmaskToString(this.bitmask),i=0;a>i;i++){var n=s[i],r=this._counts[n];0!==r&&(t+=" "+e.bitToString(n)+":"+r)}return t}},{bitmaskAll:o,summaryBitmaskForNodeSelf:function(t){var e=t._rendererBitmask;e|=t.isPainted()?(t._rendererBitmask&r.bitmaskCurrentRendererArea^r.bitmaskCurrentRendererArea)<<r.bitmaskLacksShift:r.bitmaskCurrentRendererArea<<r.bitmaskLacksShift;var i=t._hints.requireElement||t._hints.cssTransform||t._hints.layerSplit,n=1!==t.opacity||t._hints.usesOpacity,s=null!==t.clipArea,a=t._hints.renderer;return i||!r.isSVG(t._rendererBitmask)||a&&!r.isSVG(a)||(e|=r.bitmaskSingleSVG),i||n||s||!r.isCanvas(t._rendererBitmask)||a&&!r.isCanvas(a)||(e|=r.bitmaskSingleCanvas),t.isPainted()||(e|=r.bitmaskNotPainted),t.areSelfBoundsValid()&&(e|=r.bitmaskBoundsValid),t.accessibleContent||(e|=r.bitmaskNotAccessible),e},bitToString:function(t){return t===r.bitmaskCanvas?"Canvas":t===r.bitmaskSVG?"SVG":t===r.bitmaskDOM?"DOM":t===r.bitmaskWebGL?"WebGL":t===r.bitmaskLacksCanvas?"(-Canvas)":t===r.bitmaskLacksSVG?"(-SVG)":t===r.bitmaskLacksDOM?"(-DOM)":t===r.bitmaskLacksWebGL?"(-WebGL)":t===r.bitmaskSingleCanvas?"SingleCanvas":t===r.bitmaskSingleSVG?"SingleSVG":t===r.bitmaskNotPainted?"NotPainted":t===r.bitmaskBoundsValid?"BoundsValid":t===r.bitmaskNotAccessible?"NotAccessible":"?"},bitmaskToString:function(t){for(var i="",n=0;a>n;n++){var r=s[n];t&r&&(i+=e.bitToString(r)+" ")}return i}}),e}),i("SCENERY/util/CanvasContextWrapper",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.canvas=t,this.context=e,this.resetStyles()}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return n.register("CanvasContextWrapper",e),i(Object,e,{resetStyles:function(){this.fillStyle=void 0,this.strokeStyle=void 0,this.lineWidth=void 0,this.lineCap=void 0,this.lineJoin=void 0,this.lineDash=void 0,this.lineDashOffset=void 0,this.miterLimit=void 0,this.font=void 0,this.direction=void 0},setDimensions:function(t,e){this.canvas.width=t,this.canvas.height=e,this.resetStyles()},setFillStyle:function(t){t&&t.getCanvasStyle&&(t=t.getCanvasStyle()),this.fillStyle!==t&&(this.fillStyle=t,this.context.fillStyle=t)},setStrokeStyle:function(t){t&&t.getCanvasStyle&&(t=t.getCanvasStyle()),this.strokeStyle!==t&&(this.strokeStyle=t,this.context.strokeStyle=t)},setLineWidth:function(t){this.lineWidth!==t&&(this.lineWidth=t,this.context.lineWidth=t)},setLineCap:function(t){this.lineCap!==t&&(this.lineCap=t,this.context.lineCap=t)},setLineJoin:function(t){this.lineJoin!==t&&(this.lineJoin=t,this.context.lineJoin=t)},setMiterLimit:function(t){this.miterLimit!==t&&(this.miterLimit=t,this.context.miterLimit=t)},setLineDash:function(t){this.lineDash!==t&&(this.lineDash=t,this.context.setLineDash?this.context.setLineDash(null===t?[]:t):void 0!==this.context.mozDash?this.context.mozDash=t:void 0!==this.context.webkitLineDash&&(this.context.webkitLineDash=t?t:[]))},setLineDashOffset:function(t){this.lineDashOffset!==t&&(this.lineDashOffset=t,void 0!==this.context.lineDashOffset?this.context.lineDashOffset=t:void 0!==this.context.webkitLineDashOffset&&(this.context.webkitLineDashOffset=t))},setFont:function(t){this.font!==t&&(this.font=t,this.context.font=t)},setDirection:function(t){this.direction!==t&&(this.direction=t,this.context.direction=t)}}),e}),i("SCENERY/nodes/Node",["require","PHET_CORE/inherit","PHET_CORE/extend","AXON/Events","DOT/Bounds2","DOT/Transform3","DOT/Matrix3","DOT/Vector2","DOT/Util","KITE/Shape","SCENERY/scenery","SCENERY/display/Renderer","SCENERY/util/RendererSummary","SCENERY/util/CanvasContextWrapper"],function(t){"use strict";function e(t){return 0===t._parents.length}function i(t){return 0===t._children.length}function n(t){return t._rootedDisplays.length>0}function r(t){h.call(this),this._id=b++,this._instances=[],this._accessibleInstances=[],this._rootedDisplays=[],this._drawables=[],this._visible=!0,this._opacity=1,this._pickable=null,this._clipArea=null,this._mouseArea=null,this._touchArea=null,this._cursor=null,this._focusable=!1,this._focusIndicator="rectangle",this._accessibleContent=null,this._accessibleOrder=null,this._children=[],this._parents=[],this._peers=[],this._liveRegions=[],this._transformBounds=!1,this._transform=new u,this._transformListener=this.onTransformChange.bind(this),this._transform.onStatic("change",this._transformListener),this._maxWidth=null,this._maxHeight=null,this._appliedScaleFactor=1,this._inputListeners=[],this._bounds=l.NOTHING.copy(),this._localBounds=l.NOTHING.copy(),this._selfBounds=l.NOTHING.copy(),this._childBounds=l.NOTHING.copy(),this._localBoundsOverridden=!1,this._boundsDirty=!0,this._localBoundsDirty=!0,this._selfBoundsDirty=!0,this._childBoundsDirty=!0,this._mouseBounds=l.NOTHING.copy(),this._touchBounds=l.NOTHING.copy(),this._mouseBoundsDirty=!0,this._touchBoundsDirty=!0,this._mouseBoundsHadListener=!1,this._touchBoundsHadListener=!1,this._hints={renderer:0,usesOpacity:!1,layerSplit:!1,cssTransform:!1,fullResolution:!1,excludeInvisible:!1,webglScale:null,preventFit:!1},this._subtreePickableCount=0,this._rendererBitmask=p.bitmaskNodeDefault,this._rendererSummary=new g(this),this._boundsEventCount=0,this._boundsEventSelfCount=0,t&&this.mutate(t)}function s(t,e,i){r.prototype[t]=function(){return this.getBounds()[t]()},r.prototype[e]=function(e){return this.translate(e.minus(this[t]()),!0),this},Object.defineProperty(r.prototype,i,{set:r.prototype[e],get:r.prototype[t]})}var a=t("PHET_CORE/inherit"),o=t("PHET_CORE/extend"),h=t("AXON/Events"),l=t("DOT/Bounds2"),u=t("DOT/Transform3"),c=t("DOT/Matrix3"),d=t("DOT/Vector2"),m=t("DOT/Util").clamp,f=(t("KITE/Shape"),t("SCENERY/scenery")),p=t("SCENERY/display/Renderer"),g=t("SCENERY/util/RendererSummary");t("SCENERY/util/CanvasContextWrapper");var b=1,v={childBounds:!0,localBounds:!0,bounds:!0},E={},S=l.NOTHING.copy(),y=new c;return f.register("Node",r),a(Object,r,o({insertChild:function(t,e){return this.changePickableCount(e._subtreePickableCount),this.changeBoundsEventCount(e._boundsEventCount>0?1:0),this._rendererSummary.summaryChange(g.bitmaskAll,e._rendererSummary.bitmask),e._parents.push(this),this._children.splice(t,0,e),e._rendererSummary.isNotAccessible()||this.onAccessibleAddChild(e),e.invalidateBounds(),this._boundsDirty=!0,this.trigger2("childInserted",e,t),this},addChild:function(t){return this.insertChild(this._children.length,t),this},removeChild:function(t){var e=_.indexOf(this._children,t);return this.removeChildWithIndex(t,e),this},removeChildAt:function(t){var e=this._children[t];return this.removeChildWithIndex(e,t),this},removeChildWithIndex:function(t,e){var i=_.indexOf(t._parents,this);t._rendererSummary.isNotAccessible()||this.onAccessibleRemoveChild(t),this.changePickableCount(-t._subtreePickableCount),this.changeBoundsEventCount(t._boundsEventCount>0?-1:0),this._rendererSummary.summaryChange(t._rendererSummary.bitmask,g.bitmaskAll),t._parents.splice(i,1),this._children.splice(e,1),this.invalidateBounds(),this._childBoundsDirty=!0,this.trigger2("childRemoved",t,e)},removeAllChildren:function(){return this.setChildren([]),this},setChildren:function(t){if(this._children!==t){for(;this._children.length;)this.removeChild(this._children[this._children.length-1]);for(var e=t.length,i=0;e>i;i++)this.addChild(t[i])}return this},set children(t){this.setChildren(t)},getChildren:function(){return this._children.slice(0)},get children(){return this.getChildren()},getChildrenCount:function(){return this._children.length},getParents:function(){return this._parents.slice(0)},get parents(){return this.getParents()},getParent:function(){return this._parents.length?this._parents[0]:null},getChildAt:function(t){return this._children[t]},indexOfParent:function(t){return _.indexOf(this._parents,t)},indexOfChild:function(t){return _.indexOf(this._children,t)},moveToFront:function(){var t=this;return _.each(this._parents.slice(0),function(e){e.moveChildToFront(t)}),this},moveChildToFront:function(t){return this.indexOfChild(t)!==this._children.length-1&&(this.removeChild(t),this.addChild(t)),this},moveToBack:function(){var t=this;return _.each(this._parents.slice(0),function(e){e.moveChildToBack(t)}),this},moveChildToBack:function(t){return 0!==this.indexOfChild(t)&&(this.removeChild(t),this.insertChild(0,t)),this},detach:function(){var t=this;return _.each(this._parents.slice(0),function(e){e.removeChild(t)}),this},changePickableCount:function(t){this._subtreePickableCount+=t;for(var e=this._parents.length,i=0;e>i;i++)this._parents[i].changePickableCount(t);this.invalidateMouseTouchBounds()},changeBoundsEventCount:function(t){if(0!==t){var e=0===this._boundsEventCount;this._boundsEventCount+=t;var i=0===this._boundsEventCount;if(e!==i)for(var n=e?1:-1,r=this._parents.length,s=0;r>s;s++)this._parents[s].changeBoundsEventCount(n)}},addPeer:function(t,e){this._peers.push({element:t,options:e})},addLiveRegion:function(t,e){this._liveRegions.push({property:t,options:e})},validateSelfBounds:function(){if(this._selfBoundsDirty){var t=this.updateSelfBounds();return this._selfBoundsDirty=!1,t&&this.trigger0("selfBounds"),!0}return!1},validateBounds:function(){var t,e=this.validateSelfBounds();if(this._childBoundsDirty){for(e=!0,t=this._children.length;t--;)this._children[t].validateBounds();var i=S.set(this._childBounds);for(this._childBounds.set(l.NOTHING),t=this._children.length;t--;)this._childBounds.includeBounds(this._children[t]._bounds);this._childBoundsDirty=!1,this._childBounds.equals(i)||this.trigger0("childBounds")}if(this._localBoundsDirty&&!this._localBoundsOverridden){e=!0,this._localBoundsDirty=!1;var n=S.set(this._localBounds);this._localBounds.set(this._selfBounds).includeBounds(this._childBounds),this.hasClipArea()&&this._localBounds.constrainBounds(this._clipArea.bounds),this._localBounds.equals(n)||(this.trigger0("localBounds"),this._boundsDirty=!0),(null!==this._maxWidth||null!==this._maxHeight)&&this.updateMaxDimension(this._localBounds)}if(this._boundsDirty){e=!0,this._boundsDirty=!1;var r=S.set(this._bounds);if(this._transformBounds&&!this._transform.getMatrix().isAxisAligned()){var s=y.set(this.getMatrix());this._bounds.set(l.NOTHING),this._includeTransformedSubtreeBounds(s,this._bounds),this.hasClipArea()&&this._bounds.constrainBounds(this._clipArea.getBoundsWithTransform(s))}else this._bounds.set(this._localBounds),this.transformBoundsFromLocalToParent(this._bounds);if(!this._bounds.equals(r)){for(t=this._parents.length;t--;)this._parents[t].invalidateBounds();this.trigger0("bounds")}}return(this._childBoundsDirty||this._boundsDirty)&&this.validateBounds(),e},_includeTransformedSubtreeBounds:function(t,e){this.selfBounds.isEmpty()||e.includeBounds(this.getTransformedSelfBounds(t));for(var i=this._children.length,n=0;i>n;n++){var r=this._children[n];t.multiplyMatrix(r._transform.getMatrix()),r._includeTransformedSubtreeBounds(t,e),t.multiplyMatrix(r._transform.getInverse())}return e},validateWatchedBounds:function(){for(;this.watchedBoundsScan(););},watchedBoundsScan:function(){if(0!==this._boundsEventSelfCount)return this.validateBounds();if(this._boundsEventCount>0&&this._childBoundsDirty){for(var t=!1,e=this._children.length,i=0;e>i;i++)t=this._children[i].watchedBoundsScan()||t;return t}return!1},validateMouseBounds:function(t){var e=this;if(t=t||this.hasInputListenerEquivalent(),this._mouseBoundsDirty||this._mouseBoundsHadListener!==t){if(this.isSubtreePickablePruned(t))this._mouseBounds.set(l.NOTHING);else{this._mouseBounds.set(this.selfBounds);for(var i=this._children.length;i--;){var n=this._children[i];n.validateMouseBounds(t),e._mouseBounds.includeBounds(n._mouseBounds)}this._mouseArea&&this._mouseBounds.includeBounds(this._mouseArea.isBounds?this._mouseArea:this._mouseArea.bounds),this.hasClipArea()&&this._mouseBounds.constrainBounds(this._clipArea.bounds),this.transformBoundsFromLocalToParent(this._mouseBounds)}this._mouseBoundsDirty=!1,this._mouseBoundsHadListener=t}},validateTouchBounds:function(t){var e=this;if(t=t||this.hasInputListenerEquivalent(),this._touchBoundsDirty||this._touchBoundsHadListener!==t){if(this.isSubtreePickablePruned(t))this._touchBounds.set(l.NOTHING);else{this._touchBounds.set(this.selfBounds);for(var i=this._children.length;i--;){var n=this._children[i];n.validateTouchBounds(t),e._touchBounds.includeBounds(n._touchBounds)}this._touchArea&&this._touchBounds.includeBounds(this._touchArea.isBounds?this._touchArea:this._touchArea.bounds),this.hasClipArea()&&this._touchBounds.constrainBounds(this._clipArea.bounds),this.transformBoundsFromLocalToParent(this._touchBounds)}this._touchBoundsDirty=!1,this._touchBoundsHadListener=t}},invalidateBounds:function(){this._boundsDirty=!0,this._localBoundsDirty=!0,this._mouseBoundsDirty=!0,this._touchBoundsDirty=!0;for(var t=this._parents.length;t--;)this._parents[t].invalidateChildBounds()},invalidateChildBounds:function(){if(!this._childBoundsDirty||!this._mouseBoundsDirty||!this._touchBoundsDirty){this._childBoundsDirty=!0,this._localBoundsDirty=!0,this._mouseBoundsDirty=!0,this._touchBoundsDirty=!0;for(var t=this._parents.length;t--;)this._parents[t].invalidateChildBounds()}},invalidateMouseTouchBounds:function(){if(!this._mouseBoundsDirty||!this._touchBoundsDirty){this._mouseBoundsDirty=!0,this._touchBoundsDirty=!0;for(var t=this._parents.length;t--;)this._parents[t].invalidateMouseTouchBounds()}},invalidateSelf:function(t){t?(this._selfBoundsDirty=!1,this._selfBounds.equals(t)||(this.invalidateBounds(),this._selfBounds.set(t),this.trigger0("selfBounds"))):(this._selfBoundsDirty=!0,this.invalidateBounds())},updateSelfBounds:function(){return!1},hasChild:function(t){var e=_.contains(this._children,t);_.contains(t._parents,this);return e},getSelfBounds:function(){return this.validateSelfBounds(),this._selfBounds},get selfBounds(){return this.getSelfBounds()},getSafeSelfBounds:function(){return this.validateSelfBounds(),this._selfBounds},getChildBounds:function(){return this.validateBounds(),this._childBounds},get childBounds(){return this.getChildBounds()},getLocalBounds:function(){return this.validateBounds(),this._localBounds},get localBounds(){return this.getLocalBounds()},setLocalBounds:function(t){if(null===t)this._localBoundsOverridden&&(this._localBoundsOverridden=!1,this.trigger1("localBoundsOverride",!1),this.invalidateBounds());else{var e=!t.equals(this._localBounds)||!this._localBoundsOverridden;e&&this._localBounds.set(t),this._localBoundsOverridden||(this._localBoundsOverridden=!0,this.trigger1("localBoundsOverride",!0)),e&&this.invalidateBounds()}return this},set localBounds(t){return this.setLocalBounds(t)},getTransformedSelfBounds:function(t){return this.validateBounds(),this._selfBounds.transformed(t)},setTransformBounds:function(t){return this._transformBounds!==t&&(this._transformBounds=t,this.invalidateBounds()),this},set transformBounds(t){return this.setTransformBounds(t)},getTransformBounds:function(){return this._transformBounds},get transformBounds(){return this.getTransformBounds()},getBounds:function(){return this.validateBounds(),this._bounds},get bounds(){return this.getBounds()},getVisibleLocalBounds:function(){for(var t=this.selfBounds.copy(),e=this._children.length;e--;){var i=this._children[e];i.isVisible()&&t.includeBounds(i.getVisibleBounds())}return t},get visibleLocalBounds(){return this.getVisibleLocalBounds()},getVisibleBounds:function(){return this.getVisibleLocalBounds().transform(this.getMatrix())},get visibleBounds(){return this.getVisibleBounds()},hasInputListenerEquivalent:function(){return this._inputListeners.length>0||this._pickable===!0},isSubtreePickablePruned:function(t){return!this.isVisible()||this._pickable===!1||this._pickable!==!0&&!t&&0===this._subtreePickableCount},trailUnderPointer:function(t){var e=E;return e.isMouse=!!t.isMouse,e.isTouch=!!t.isTouch,e.isPen=!!t.isPen,this.trailUnderPoint(t.point,e)},trailUnderPoint:function(t,e,i,n){if(n=n||this.hasInputListenerEquivalent(),this.isSubtreePickablePruned(n))return null;var r,s=e&&e.isMouse,a=e&&(e.isTouch||e.isPen);if(s?(!i&&this.validateMouseBounds(!1),r=this._mouseBounds):a?(!i&&this.validateTouchBounds(!1),r=this._touchBounds):(!i&&this.validateBounds(),r=this._bounds),!r.containsPoint(t))return null;var o=null,h=this._transform.getInverse().multiplyVector2(d.createFromPool(t.x,t.y));if(this.hasClipArea()&&!this._clipArea.containsPoint(h))return null;for(var l=this._children.length-1;l>=0;l--){var u=this._children[l],c=u.trailUnderPoint(h,e,!0,n);if(c)return c.addAncestor(this,l),h.freeToPool(),c}return s&&this._mouseArea?(o=this._mouseArea.containsPoint(h)?new f.Trail(this):null,h.freeToPool(),o):a&&this._touchArea?(o=this._touchArea.containsPoint(h)?new f.Trail(this):null,h.freeToPool(),o):this.selfBounds.containsPoint(h)&&this.containsPointSelf(h)?(h.freeToPool(),new f.Trail(this)):(h.freeToPool(),null)},containsPoint:function(t){return null!==this.trailUnderPoint(t)},containsPointSelf:function(t){return this.selfBounds.containsPoint(t)},intersectsBoundsSelf:function(t){return this.selfBounds.intersectsBounds(t)},isPainted:function(){return!1},areSelfBoundsValid:function(){return!0},hasParent:function(){return 0!==this._parents.length},hasChildren:function(){return this._children.length>0},walkDepthFirst:function(t){t(this);for(var e=this._children.length,i=0;e>i;i++)this._children[i].walkDepthFirst(t)},getChildrenWithinBounds:function(t){for(var e=[],i=this._children.length,n=0;i>n;n++){var r=this._children[n];r._bounds.intersection(t).isEmpty()||e.push(r)}return e},addInputListener:function(t){return-1===_.indexOf(this._inputListeners,t)&&(this._inputListeners.push(t),this.changePickableCount(1)),this},removeInputListener:function(t){return this._inputListeners.splice(_.indexOf(this._inputListeners,t),1),this.changePickableCount(-1),this},getInputListeners:function(){return this._inputListeners.slice(0)},onAccessibleAddChild:function(t){for(var e=t.getTrails(n),i=0;i<e.length;i++){var r=e[i];if(r.nodeFromTop(1)===this)for(var s=r.rootNode()._rootedDisplays,a=0;a<s.length;a++)s[a].addAccessibleTrail(r)}},onAccessibleRemoveChild:function(t){for(var e=t.getTrails(n),i=0;i<e.length;i++){var r=e[i];if(r.nodeFromTop(1)===this)for(var s=r.rootNode()._rootedDisplays,a=0;a<s.length;a++)s[a].removeAccessibleTrail(r)}},translate:function(t,e,i){if("number"==typeof t){if(!t&&!e)return;i?this.prependTranslation(t,e):this.appendMatrix(c.translation(t,e))}else{var n=t;if(!n.x&&!n.y)return;this.translate(n.x,n.y,e)}},scale:function(t,e,i){if("number"==typeof t)if(void 0===e){if(1===t)return;this.appendMatrix(c.scaling(t,t))}else{if(1===t&&1===e)return;i?this.prependMatrix(c.scaling(t,e)):this.appendMatrix(c.scaling(t,e))}else{var n=t;this.scale(n.x,n.y,e)}},rotate:function(t,e){t%(2*Math.PI)!==0&&(e?this.prependMatrix(c.rotation2(t)):this.appendMatrix(c.rotation2(t)))},rotateAround:function(t,e){var i=c.translation(-t.x,-t.y);i=c.rotation2(e).timesMatrix(i),i=c.translation(t.x,t.y).timesMatrix(i),this.prependMatrix(i)},setX:function(t){return this.translate(t-this.getX(),0,!0),this},set x(t){this.setX(t)},getX:function(){return this._transform.getMatrix().m02()},get x(){return this.getX()},setY:function(t){return this.translate(0,t-this.getY(),!0),this},set y(t){this.setY(t)},getY:function(){return this._transform.getMatrix().m12()},get y(){return this.getY()},setScaleMagnitude:function(t,e){var i=this.getScaleVector();return"number"==typeof t?(void 0===e&&(e=t),this.appendMatrix(c.scaling(t/i.x,e/i.y))):this.appendMatrix(c.scaling(t.x/i.x,t.y/i.y)),this},getScaleVector:function(){return this._transform.getMatrix().getScaleVector()},setRotation:function(t){return this.appendMatrix(y.setToRotationZ(t-this.getRotation())),this},set rotation(t){this.setRotation(t)},getRotation:function(){return this._transform.getMatrix().getRotation()},get rotation(){return this.getRotation()},setTranslation:function(t,e){var i,n,r=this._transform.getMatrix(),s=r.m02(),a=r.m12();return"number"==typeof t?(i=t-s,n=e-a):(i=t.x-s,n=t.y-a),this.translate(i,n,!0),this},set translation(t){this.setTranslation(t)},getTranslation:function(){var t=this._transform.getMatrix();return new d(t.m02(),t.m12())},get translation(){return this.getTranslation()},appendMatrix:function(t){this._transform.append(t)},prependMatrix:function(t){this._transform.prepend(t)},prependTranslation:function(t,e){(t||e)&&this._transform.prependTranslation(t,e)},setMatrix:function(t){this._transform.setMatrix(t)},set matrix(t){this.setMatrix(t)},getMatrix:function(){return this._transform.getMatrix()},get matrix(){return this.getMatrix()},getTransform:function(){return this._transform},get transform(){return this.getTransform()},resetTransform:function(){this.setMatrix(c.IDENTITY)},onTransformChange:function(){this.invalidateBounds(),this.trigger0("transform")},updateMaxDimension:function(t){var e=this._appliedScaleFactor,i=1;if(null!==this._maxWidth){var n=t.width;n>this._maxWidth&&(i=Math.min(i,this._maxWidth/n))}if(null!==this._maxHeight){var r=t.height;r>this._maxHeight&&(i=Math.min(i,this._maxHeight/r))}var s=i/e;1!==s&&(this.scale(s),this._appliedScaleFactor=i)},onMaxDimensionChange:function(t,e){null===t&&null!==e?(this.changeBoundsEventCount(1),this._boundsEventSelfCount++):null!==t&&null===e&&(this.changeBoundsEventCount(-1),this._boundsEventSelfCount--)},setMaxWidth:function(t){this._maxWidth!==t&&(this.onMaxDimensionChange(this._maxWidth,t),this._maxWidth=t,this.updateMaxDimension(this._localBounds))},set maxWidth(t){this.setMaxWidth(t)},getMaxWidth:function(){return this._maxWidth},get maxWidth(){return this.getMaxWidth()},setMaxHeight:function(t){this._maxHeight!==t&&(this.onMaxDimensionChange(this._maxHeight,t),this._maxHeight=t,this.updateMaxDimension(this._localBounds))},set maxHeight(t){this.setMaxHeight(t)},getMaxHeight:function(){return this._maxHeight},get maxHeight(){return this.getMaxHeight()},setLeft:function(t){return this.translate(t-this.getLeft(),0,!0),this},set left(t){this.setLeft(t)},getLeft:function(){return this.getBounds().minX},get left(){return this.getLeft()},setRight:function(t){return this.translate(t-this.getRight(),0,!0),this},set right(t){this.setRight(t)},getRight:function(){return this.getBounds().maxX},get right(){return this.getRight()},setCenterX:function(t){return this.translate(t-this.getCenterX(),0,!0),this},set centerX(t){this.setCenterX(t)},getCenterX:function(){return this.getBounds().getCenterX()},get centerX(){return this.getCenterX()},setCenterY:function(t){return this.translate(0,t-this.getCenterY(),!0),this},set centerY(t){this.setCenterY(t)},getCenterY:function(){return this.getBounds().getCenterY()},get centerY(){return this.getCenterY()},setTop:function(t){return this.translate(0,t-this.getTop(),!0),this},set top(t){this.setTop(t)},getTop:function(){return this.getBounds().minY},get top(){return this.getTop()},setBottom:function(t){return this.translate(0,t-this.getBottom(),!0),this},set bottom(t){this.setBottom(t)},getBottom:function(){return this.getBounds().maxY},get bottom(){return this.getBottom()},getWidth:function(){return this.getBounds().getWidth()},get width(){return this.getWidth()},getHeight:function(){return this.getBounds().getHeight()},get height(){return this.getHeight()},getId:function(){return this._id},get id(){return this.getId()},setVisible:function(t){return t!==this._visible&&(this.invalidateMouseTouchBounds(),this._visible=t,this.trigger0("visibility")),this},set visible(t){this.setVisible(t)},isVisible:function(){return this._visible},get visible(){return this.isVisible()},setOpacity:function(t){var e=m(t,0,1);e!==this._opacity&&(this._opacity=e,this.trigger0("opacity"))},set opacity(t){this.setOpacity(t)},getOpacity:function(){return this._opacity},get opacity(){return this.getOpacity()},setPickable:function(t){if(this._pickable!==t){var e=this._pickable===!0?-1:0;this._pickable=t,e+=this._pickable===!0?1:0,e&&this.changePickableCount(e)}},set pickable(t){this.setPickable(t)},isPickable:function(){return this._pickable},get pickable(){return this.isPickable()},setCursor:function(t){this._cursor="auto"===t?null:t},set cursor(t){this.setCursor(t)},getCursor:function(){return this._cursor},get cursor(){return this.getCursor()},setMouseArea:function(t){this._mouseArea!==t&&(this._mouseArea=t,this.invalidateMouseTouchBounds())},set mouseArea(t){this.setMouseArea(t)},getMouseArea:function(){return this._mouseArea},get mouseArea(){return this.getMouseArea()},setTouchArea:function(t){this._touchArea!==t&&(this._touchArea=t,this.invalidateMouseTouchBounds())},set touchArea(t){this.setTouchArea(t)},getTouchArea:function(){return this._touchArea},get touchArea(){return this.getTouchArea()},setClipArea:function(t){this._clipArea!==t&&(this._clipArea=t,this.trigger0("clip"),this.invalidateBounds())},set clipArea(t){this.setClipArea(t)},getClipArea:function(){return this._clipArea},get clipArea(){return this.getClipArea()},hasClipArea:function(){return null!==this._clipArea},setFocusable:function(t){this._focusable!==t&&(this._focusable=t,this.trigger0("focusable"))},set focusable(t){this.setFocusable(t)},getFocusable:function(){return this._focusable},get focusable(){return this.getFocusable()},setFocusIndicator:function(t){this._focusIndicator!==t&&(this._focusIndicator=t,this.trigger0("focusIndicator"))},set focusIndicator(t){this.setFocusIndicator(t)},getFocusIndicator:function(){return this._focusIndicator},get focusIndicator(){return this.getFocusIndicator()},setAccessibleOrder:function(t){if(this._accessibleOrder!==t){this._accessibleOrder=t;for(var e=this.getTrails(n),i=0;i<e.length;i++)for(var r=e[i],s=r.rootNode()._rootedDisplays,a=0;a<s.length;a++)s[a].changedAccessibleOrder(r);this.trigger0("accessibleOrder")}},set accessibleOrder(t){this.setAccessibleOrder(t)},getAccessibleOrder:function(){return this._accessibleOrder},get accessibleOrder(){return this.getAccessibleOrder()},setAccessibleContent:function(t){if(this._accessibleContent!==t){var e=this._accessibleContent;this._accessibleContent=t;for(var i=this.getTrails(n),r=0;r<i.length;r++)for(var s=i[r],a=s.rootNode()._rootedDisplays,o=0;o<a.length;o++)a[o].changedAccessibleContent(s,e,t);this.trigger0("accessibleContent")}},set accessibleContent(t){this.setAccessibleContent(t)},getAccessibleContent:function(){return this._accessibleContent},get accessibleContent(){return this.getAccessibleContent()},supportsCanvas:function(){return 0!==(this._rendererBitmask&p.bitmaskCanvas)},supportsSVG:function(){return 0!==(this._rendererBitmask&p.bitmaskSVG)},supportsDOM:function(){return 0!==(this._rendererBitmask&p.bitmaskDOM)},supportsWebGL:function(){return 0!==(this._rendererBitmask&p.bitmaskWebGL)},supportsRenderer:function(t){return 0!==(this._rendererBitmask&t.bitmask)},setRendererBitmask:function(t){t!==this._rendererBitmask&&(this._rendererBitmask=t,this._rendererSummary.selfChange(),this.trigger0("rendererBitmask"))},invalidateSupportedRenderers:function(){},setRenderer:function(t){var e=0;"canvas"===t?e=p.bitmaskCanvas:"svg"===t?e=p.bitmaskSVG:"dom"===t?e=p.bitmaskDOM:"webgl"===t&&(e=p.bitmaskWebGL),this._hints.renderer!==e&&(this._hints.renderer=e,this.trigger1("hint","renderer"))},set renderer(t){this.setRenderer(t)},getRenderer:function(){return 0===this._hints.renderer?null:this._hints.renderer===p.bitmaskCanvas?"canvas":this._hints.renderer===p.bitmaskSVG?"svg":this._hints.renderer===p.bitmaskDOM?"dom":this._hints.renderer===p.bitmaskWebGL?"webgl":this._hints.renderer},get renderer(){return this.getRenderer()},hasRenderer:function(){return!!this._hints.renderer},setRendererOptions:function(t){_.extend(this._hints,t),this.trigger0("hint")},set rendererOptions(t){this.setRendererOptions(t)},getRendererOptions:function(){return this._hints},get rendererOptions(){return this.getRendererOptions()},setLayerSplit:function(t){t!==this._hints.layerSplit&&(this._hints.layerSplit=t,this.trigger1("hint","layerSplit"))},set layerSplit(t){this.setLayerSplit(t)},isLayerSplit:function(){return this._hints.layerSplit},get layerSplit(){return this.isLayerSplit()},setUsesOpacity:function(t){t!==this._hints.usesOpacity&&(this._hints.usesOpacity=t,this.trigger1("hint","usesOpacity"))},set usesOpacity(t){this.setUsesOpacity(t)},getUsesOpacity:function(){return this._hints.usesOpacity},get usesOpacity(){return this.getUsesOpacity()},setCSSTransform:function(t){t!==this._hints.cssTransform&&(this._hints.cssTransform=t,this.trigger1("hint","cssTransform"))},set cssTransform(t){this.setCSSTransform(t)},isCSSTransformed:function(){return this._hints.cssTransform},get cssTransform(){return this._hints.cssTransform},setExcludeInvisible:function(t){t!==this._hints.excludeInvisible&&(this._hints.excludeInvisible=t,this.trigger1("hint","excludeInvisible"))},set excludeInvisible(t){this.setExcludeInvisible(t)},isExcludeInvisible:function(){return this._hints.excludeInvisible},get excludeInvisible(){return this.isExcludeInvisible()},setPreventFit:function(t){t!==this._hints.preventFit&&(this._hints.preventFit=t,this.trigger1("hint","preventFit"))},set preventFit(t){this.setPreventFit(t)},isPreventFit:function(){return this._hints.preventFit},get preventFit(){return this.isPreventFit()},setWebGLScale:function(t){t!==this._hints.webglScale&&(this._hints.webglScale=t,this.trigger1("hint","webglScale"))},set webglScale(t){this.setWebGLScale(t)},getWebGLScale:function(){return this._hints.webglScale},get webglScale(){return this.getWebGLScale()},getUniqueTrail:function(t){if(t){var e=this.getTrails(t);return e[0]}for(var i=new f.Trail,n=this;n;)i.addAncestor(n),n=n._parents[0];return i},getUniqueTrailTo:function(t){return this.getUniqueTrail(function(e){return t===e})},getTrails:function(t){t=t||e;var i=[],n=new f.Trail(this);return f.Trail.appendAncestorTrailsWithPredicate(i,n,t),i},getTrailsTo:function(t){
return this.getTrails(function(e){return e===t})},getLeafTrails:function(t){t=t||i;var e=[],n=new f.Trail(this);return f.Trail.appendDescendantTrailsWithPredicate(e,n,t),e},getLeafTrailsTo:function(t){return this.getLeafTrails(function(e){return e===t})},getUniqueLeafTrail:function(t){var e=this.getLeafTrails(t);return e[0]},getUniqueLeafTrailTo:function(t){return this.getUniqueLeafTrail(function(e){return e===t})},getConnectedNodes:function(){for(var t=[],e=this._children.concat(this._parents).concat(this);e.length;){var i=e.pop();_.contains(t,i)||(t.push(i),e=e.concat(i._children,i._parents))}return t},getNestedAccessibleOrder:function(){function t(n,s){var a=0;if(_.each(i,function(t){n===t&&a++}),!(a>1||1===a&&!s)){if(n.accessibleContent){var o={trail:e.copy(),children:[]};r[r.length-1].push(o),r.push(o.children)}n._accessibleOrder&&(i=i.concat(n._accessibleOrder),_.each(n._accessibleOrder,function(i){_.each(n.getLeafTrailsTo(i),function(n){n.removeAncestor(),e.addDescendantTrail(n),t(i,!0),e.removeDescendantTrail(n)})}));for(var h=n._children.length,l=0;h>l;l++){var u=n._children[l];e.addDescendant(u,l),t(u,!1),e.removeDescendant()}n._accessibleOrder&&_.each(n._accessibleOrder,function(t){i.pop()}),n.accessibleContent&&r.pop()}}var e=new f.Trail(this),i=[],n=[],r=[n];return t(this,!1),n},getTopologicallySortedNodes:function(){function t(t){delete i[e.id][t.id],_.every(i,function(e){return!e[t.id]})&&n.push(t)}var e,i={},n=[],r=[];for(_.each(this.getConnectedNodes(),function(t){i[t.id]={},_.each(t._children,function(e){i[t.id][e.id]=!0}),t.parents.length||n.push(t)});n.length;)e=n.pop(),r.push(e),_.each(e._children,t);return r},canAddChild:function(t){function e(t){delete n[i.id][t.id],_.every(n,function(e){return!e[t.id]})&&r.push(t)}if(this===t||_.contains(this._children,t))return!1;var i,n={},r=[],s=[];for(_.each(this.getConnectedNodes().concat(t.getConnectedNodes()),function(e){n[e.id]={},_.each(e._children,function(t){n[e.id][t.id]=!0}),e.parents.length||e===t||r.push(e)}),n[this.id][t.id]=!0;r.length;)i=r.pop(),s.push(i),_.each(i._children,e),i===this&&e(t);return _.every(n,function(t){return _.every(t,function(t){return!1})})},canvasPaintSelf:function(t){},renderToCanvasSelf:function(t){this.isPainted()&&this._rendererBitmask&p.bitmaskCanvas&&this.canvasPaintSelf(t)},renderToCanvasSubtree:function(t,e){e=e||c.identity(),t.resetStyles(),this.renderToCanvasSelf(t);for(var i=0;i<this._children.length;i++){var n=this._children[i];if(n.isVisible()){var r=1!==n._opacity||n._clipArea;if(t.context.save(),e.multiplyMatrix(n._transform.getMatrix()),e.canvasSetTransform(t.context),r){var s=document.createElement("canvas");s.width=t.canvas.width,s.height=t.canvas.height;var a=s.getContext("2d"),o=new f.CanvasContextWrapper(s,a);e.canvasSetTransform(a),n.renderToCanvasSubtree(o,e),t.context.save(),n._clipArea&&(t.context.beginPath(),n._clipArea.writeToContext(t.context),t.context.clip()),t.context.setTransform(1,0,0,1,0,0),t.context.globalAlpha=n._opacity,t.context.drawImage(s,0,0),t.context.restore()}else n.renderToCanvasSubtree(t,e);e.multiplyMatrix(n._transform.getInverse()),t.context.restore()}}},renderToCanvas:function(t,e,i,n){t.width=t.width,n&&(e.fillStyle=n,e.fillRect(0,0,t.width,t.height));var r=new f.CanvasContextWrapper(t,e);this.renderToCanvasSubtree(r,c.identity()),i&&i()},toCanvas:function(t,e,i,n,r){var s=2,a=this.getBounds().union(this.localToParentBounds(this.getSafeSelfBounds()));e=void 0!==e?e:Math.ceil(s-a.minX),i=void 0!==i?i:Math.ceil(s-a.minY),n=void 0!==n?n:Math.ceil(a.getWidth()+2*s),r=void 0!==r?r:Math.ceil(a.getHeight()+2*s);var o=document.createElement("canvas");o.width=n,o.height=r;var h=o.getContext("2d");h.translate(e,i),this._transform.getMatrix().canvasAppendTransform(h);var l=new f.CanvasContextWrapper(o,h);this.renderToCanvasSubtree(l,c.translation(e,i).timesMatrix(this._transform.getMatrix())),t(o,e,i)},toDataURL:function(t,e,i,n,r){this.toCanvas(function(e,i,n){t(e.toDataURL(),i,n)},e,i,n,r)},toImage:function(t,e,i,n,r){this.toDataURL(function(e,i,n){var r=document.createElement("img");r.onload=function(){t(r,i,n);try{delete r.onload}catch(e){}},r.src=e},e,i,n,r)},toImageNodeAsynchronous:function(t,e,i,n,r){this.toImage(function(e,i,n){t(new f.Node({children:[new f.Image(e,{x:-i,y:-n})]}))},e,i,n,r)},toCanvasNodeSynchronous:function(t,e,i,n){var r;return this.toCanvas(function(t,e,i){r=new f.Node({children:[new f.Image(t,{x:-e,y:-i})]})},t,e,i,n),r},toDataURLNodeSynchronous:function(t,e,i,n){var r;return this.toDataURL(function(t,e,i){r=new f.Node({children:[new f.Image(t,{x:-e,y:-i})]})},t,e,i,n),r},getInstances:function(){return this._instances},get instances(){return this.getInstances()},addInstance:function(t){this._instances.push(t)},removeInstance:function(t){var e=_.indexOf(this._instances,t);this._instances.splice(e,1)},getAccessibleInstances:function(){return this._accessibleInstances},get accessibleInstances(){return this.getAccessibleInstances()},addAccessibleInstance:function(t){this._accessibleInstances.push(t)},removeAccessibleInstance:function(t){var e=_.indexOf(this._accessibleInstances,t);this._accessibleInstances.splice(e,1)},getRootedDisplays:function(){return this._rootedDisplays},get rootedDisplays(){return this.getRootedDisplays()},addRootedDisplay:function(t){this._rootedDisplays.push(t)},removeRootedDisplay:function(t){var e=_.indexOf(this._rootedDisplays,t);this._rootedDisplays.splice(e,1)},localToParentPoint:function(t){return this._transform.transformPosition2(t)},localToParentBounds:function(t){return this._transform.transformBounds2(t)},parentToLocalPoint:function(t){return this._transform.inversePosition2(t)},parentToLocalBounds:function(t){return this._transform.inverseBounds2(t)},transformBoundsFromLocalToParent:function(t){return t.transform(this._transform.getMatrix())},transformBoundsFromParentToLocal:function(t){return t.transform(this._transform.getInverse())},getLocalToGlobalMatrix:function(){for(var t=this,e=[];t;)e.push(t._transform.getMatrix()),t=t._parents[0];for(var i=c.identity(),n=e.length-1;n>=0;n--)i.multiplyMatrix(e[n]);return i},getUniqueTransform:function(){return new u(this.getLocalToGlobalMatrix())},getGlobalToLocalMatrix:function(){return this.getLocalToGlobalMatrix().invert()},localToGlobalPoint:function(t){for(var e=this,i=t.copy();e;)e._transform.getMatrix().multiplyVector2(i),e=e._parents[0];return i},globalToLocalPoint:function(t){for(var e=this,i=[];e;)i.push(e._transform),e=e._parents[0];for(var n=t.copy(),r=i.length-1;r>=0;r--)i[r].getInverse().multiplyVector2(n);return n},localToGlobalBounds:function(t){return t.transformed(this.getLocalToGlobalMatrix())},globalToLocalBounds:function(t){return t.transformed(this.getGlobalToLocalMatrix())},parentToGlobalPoint:function(t){return this.parents.length?this.parents[0].localToGlobalPoint(t):t},parentToGlobalBounds:function(t){return this.parents.length?this.parents[0].localToGlobalBounds(t):t},globalToParentPoint:function(t){return this.parents.length?this.parents[0].globalToLocalPoint(t):t},globalToParentBounds:function(t){return this.parents.length?this.parents[0].globalToLocalBounds(t):t},getGlobalBounds:function(){return this.parentToGlobalBounds(this.getBounds())},get globalBounds(){return this.getGlobalBounds()},boundsOf:function(t){return this.globalToLocalBounds(t.getGlobalBounds())},boundsTo:function(t){return t.globalToLocalBounds(this.getGlobalBounds())},attachDrawable:function(t){return this._drawables.push(t),this},detachDrawable:function(t){var e=_.indexOf(this._drawables,t);return this._drawables.splice(e,1),this},mutate:function(t){if(!t)return this;var e=this;return _.each(this._mutatorKeys,function(i){if(void 0!==t[i]){var n=Object.getOwnPropertyDescriptor(r.prototype,i);n&&"function"==typeof n.value?e[i](t[i]):e[i]=t[i]}}),this},getDebugHTMLExtras:function(){return""},toString:function(t,e){t=t||"";var i=this.getPropString(t+"  ",void 0===e?!0:e);return t+this.getBasicConstructor(i?"\n"+i+"\n"+t:"")},getBasicConstructor:function(t){return"new scenery.Node( {"+t+"} )"},getPropString:function(t,e){function i(e,i,r){n&&(n+=",\n"),n+=r||"string"!=typeof i?t+e+": "+i:t+e+": '"+i+"'"}var n="";if(this._children.length&&e){var r="";_.each(this._children,function(e){r&&(r+=",\n"),r+=e.toString(t+"  ")}),i("children","[\n"+r+"\n"+t+"]",!0)}if(this.cursor&&i("cursor",this.cursor),this.visible||i("visible",this.visible),null!==this.pickable&&i("pickable",this.pickable),1!==this.opacity&&i("opacity",this.opacity),!this.transform.isIdentity()){var s=this.transform.getMatrix();i("matrix","dot.Matrix3.createFromPool("+s.m00()+", "+s.m01()+", "+s.m02()+", "+s.m10()+", "+s.m11()+", "+s.m12()+", "+s.m20()+", "+s.m21()+", "+s.m22()+" )",!0)}return this.renderer&&(i("renderer",this.renderer),this.rendererOptions),this._hints.layerSplit&&i("layerSplit",!0),n},auditInstanceSubtreeForDisplay:function(t){},addEventListener:function(t,e){return this.on(t,e)},removeEventListener:function(t,e){return this.off(t,e)},containsEventListener:function(t,e){return this.hasListener(t,e)},onEventListenerAdded:function(t,e){t in v&&(this.changeBoundsEventCount(1),this._boundsEventSelfCount++)},onEventListenerRemoved:function(t,e){t in v&&(this.changeBoundsEventCount(-1),this._boundsEventSelfCount--)}},h.prototype,{on:function(t,e){h.prototype.on.call(this,t,e),this.onEventListenerAdded(t,e)},onStatic:function(t,e){h.prototype.onStatic.call(this,t,e),this.onEventListenerAdded(t,e)},off:function(t,e){var i=h.prototype.off.call(this,t,e);return this.onEventListenerRemoved(t,e),i},offStatic:function(t,e){var i=h.prototype.offStatic.call(this,t,e);return this.onEventListenerRemoved(t,e),i}})),s("getLeftTop","setLeftTop","leftTop"),s("getCenterTop","setCenterTop","centerTop"),s("getRightTop","setRightTop","rightTop"),s("getLeftCenter","setLeftCenter","leftCenter"),s("getCenter","setCenter","center"),s("getRightCenter","setRightCenter","rightCenter"),s("getLeftBottom","setLeftBottom","leftBottom"),s("getCenterBottom","setCenterBottom","centerBottom"),s("getRightBottom","setRightBottom","rightBottom"),r.prototype._mutatorKeys=["children","cursor","visible","pickable","opacity","matrix","translation","x","y","rotation","scale","localBounds","maxWidth","maxHeight","leftTop","centerTop","rightTop","leftCenter","center","rightCenter","leftBottom","centerBottom","rightBottom","left","right","top","bottom","centerX","centerY","renderer","rendererOptions","layerSplit","usesOpacity","cssTransform","excludeInvisible","webglScale","preventFit","mouseArea","touchArea","clipArea","transformBounds","focusable","focusIndicator","accessibleContent","accessibleOrder","textDescription"],r}),i("SCENERY/util/Color",["require","PHET_CORE/inherit","SCENERY/scenery","DOT/Util","DOT/Util"],function(t){"use strict";function e(t,e,i,n){this.listeners=[],this.set(t,e,i,n)}function i(t){var e=1;return"%"===t.charAt(t.length-1)&&(e=2.55,t=t.slice(0,t.length-1)),Math.round(parseInt(t,10)*e)}var n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=t("DOT/Util").clamp,a=t("DOT/Util").linear;r.register("Color",e);var o="(-?\\d{1,3}%?)",h="(\\d+|\\d*\\.\\d+)",l="(\\d{1,3})";return e.formatParsers=[{regexp:/^transparent$/,apply:function(t,e){t.setRGBA(0,0,0,0)}},{regexp:/^#(\w{1})(\w{1})(\w{1})$/,apply:function(t,e){t.setRGBA(parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),1)}},{regexp:/^#(\w{2})(\w{2})(\w{2})$/,apply:function(t,e){t.setRGBA(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),1)}},{regexp:new RegExp("^rgb\\("+o+","+o+","+o+"\\)$"),apply:function(t,e){t.setRGBA(i(e[1]),i(e[2]),i(e[3]),1)}},{regexp:new RegExp("^rgba\\("+o+","+o+","+o+","+h+"\\)$"),apply:function(t,e){t.setRGBA(i(e[1]),i(e[2]),i(e[3]),parseFloat(e[4]))}},{regexp:new RegExp("^hsl\\("+l+","+l+"%,"+l+"%\\)$"),apply:function(t,e){t.setHSLA(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),1)}},{regexp:new RegExp("^hsla\\("+l+","+l+"%,"+l+"%,"+h+"\\)$"),apply:function(t,e){t.setHSLA(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4]))}}],e.hueToRGB=function(t,e,i){return 0>i&&(i+=1),i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t},e.toColor=function(t){return t instanceof e?t:new e(t)},n(Object,e,{copy:function(){return new e(this.r,this.g,this.b,this.a)},set:function(t,i,n,r){if("string"==typeof t)this.setCSS(t);else if(t instanceof e)this.setRGBA(t.r,t.g,t.b,t.a);else if(void 0===n){var s=t>>16&255,a=t>>8&255,o=t>>0&255,h=void 0===i?1:i;this.setRGBA(s,a,o,h)}else this.setRGBA(t,i,n,void 0===r?1:r);return this},getRed:function(){return this.r},setRed:function(t){return this.setRGBA(t,this.g,this.b,this.a)},get red(){return this.getRed()},set red(t){return this.setRed(t)},getGreen:function(){return this.g},setGreen:function(t){return this.setRGBA(this.r,t,this.b,this.a)},get green(){return this.getGreen()},set green(t){return this.setGreen(t)},getBlue:function(){return this.b},setBlue:function(t){return this.setRGBA(this.r,this.g,t,this.a)},get blue(){return this.getBlue()},set blue(t){return this.setBlue(t)},getAlpha:function(){return this.a},setAlpha:function(t){return this.setRGBA(this.r,this.g,this.b,t)},get alpha(){return this.getAlpha()},set alpha(t){return this.setAlpha(t)},setRGBA:function(t,e,i,n){return this.r=Math.round(s(t,0,255)),this.g=Math.round(s(e,0,255)),this.b=Math.round(s(i,0,255)),this.a=s(n,0,1),this.updateColor(),this},computeCSS:function(){if(1===this.a)return"rgb("+this.r+","+this.g+","+this.b+")";for(var t=this.a.toFixed(20);t.length>=2&&"0"===t[t.length-1]&&"."!==t[t.length-2];)t=t.slice(0,t.length-1);var e=0===this.a||1===this.a?this.a:t;return"rgba("+this.r+","+this.g+","+this.b+","+e+")"},toCSS:function(){return this._css},setCSS:function(t){var i=t.replace(/ /g,"").toLowerCase(),n=!1,r=e.colorKeywords[i];r&&(i="#"+r);for(var s=0;s<e.formatParsers.length;s++){var a=e.formatParsers[s],o=a.regexp.exec(i);if(o){a.apply(this,o),n=!0;break}}if(!n)throw new Error("scenery.Color unable to parse color string: "+t);this.updateColor()},toNumber:function(){return(this.r<<16)+(this.g<<8)+this.b},updateColor:function(){var t=this._css;if(this._css=this.computeCSS(),t!==this._css&&this.listeners.length)for(var e=this.listeners.slice(0),i=e.length,n=0;i>n;n++)e[n]()},setImmutable:function(){return this},getCanvasStyle:function(){return this.toCSS()},setHSLA:function(t,i,n,r){t=t%360/360,i=s(i/100,0,1),n=s(n/100,0,1);var a,o;return o=.5>n?n*(i+1):n+i-n*i,a=2*n-o,this.r=Math.round(255*e.hueToRGB(a,o,t+1/3)),this.g=Math.round(255*e.hueToRGB(a,o,t)),this.b=Math.round(255*e.hueToRGB(a,o,t-1/3)),this.a=s(r,0,1),this.updateColor(),this},equals:function(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a},withAlpha:function(t){return new e(this.r,this.g,this.b,t)},checkFactor:function(t){if(0>t||t>1)throw new Error("factor must be between 0 and 1: "+t);return void 0===t?.7:t},brighterColor:function(t){t=this.checkFactor(t);var i=Math.min(255,Math.floor(this.r/t)),n=Math.min(255,Math.floor(this.g/t)),r=Math.min(255,Math.floor(this.b/t));return new e(i,n,r,this.a)},colorUtilsBrighter:function(t){t=this.checkFactor(t);var i=Math.min(255,this.getRed()+Math.floor(t*(255-this.getRed()))),n=Math.min(255,this.getGreen()+Math.floor(t*(255-this.getGreen()))),r=Math.min(255,this.getBlue()+Math.floor(t*(255-this.getBlue())));return new e(i,n,r,this.getAlpha())},darkerColor:function(t){t=this.checkFactor(t);var i=Math.max(0,Math.floor(t*this.r)),n=Math.max(0,Math.floor(t*this.g)),r=Math.max(0,Math.floor(t*this.b));return new e(i,n,r,this.a)},colorUtilsDarker:function(t){t=this.checkFactor(t);var i=Math.max(0,this.getRed()-Math.floor(t*this.getRed())),n=Math.max(0,this.getGreen()-Math.floor(t*this.getGreen())),r=Math.max(0,this.getBlue()-Math.floor(t*this.getBlue()));return new e(i,n,r,this.getAlpha())},colorUtilsBrightness:function(t){return 0===t?this:t>0?this.colorUtilsBrighter(t):this.colorUtilsDarker(-t)},addChangeListener:function(t){this.listeners.push(t)},removeChangeListener:function(t){this.listeners.splice(_.indexOf(this.listeners,t),1)},getListenerCount:function(){return this.listeners.length},toString:function(){return this.constructor.name+"[r:"+this.r+" g:"+this.g+" b:"+this.b+" a:"+this.a+"]"},toStateObject:function(){return{r:this.r,g:this.g,b:this.b,a:this.a}}}),e.basicColorKeywords={aqua:"00ffff",black:"000000",blue:"0000ff",fuchsia:"ff00ff",gray:"808080",green:"008000",lime:"00ff00",maroon:"800000",navy:"000080",olive:"808000",purple:"800080",red:"ff0000",silver:"c0c0c0",teal:"008080",white:"ffffff",yellow:"ffff00"},e.colorKeywords={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},e.BLACK=e.black=new e(0,0,0).setImmutable(),e.BLUE=e.blue=new e(0,0,255).setImmutable(),e.CYAN=e.cyan=new e(0,255,255).setImmutable(),e.DARK_GRAY=e.darkGray=new e(64,64,64).setImmutable(),e.GRAY=e.gray=new e(128,128,128).setImmutable(),e.GREEN=e.green=new e(0,255,0).setImmutable(),e.LIGHT_GRAY=e.lightGray=new e(192,192,192).setImmutable(),e.MAGENTA=e.magenta=new e(255,0,255).setImmutable(),e.ORANGE=e.orange=new e(255,200,0).setImmutable(),e.PINK=e.pink=new e(255,175,175).setImmutable(),e.RED=e.red=new e(255,0,0).setImmutable(),e.WHITE=e.white=new e(255,255,255).setImmutable(),e.YELLOW=e.yellow=new e(255,255,0).setImmutable(),e.interpolateRGBA=function(t,i,n){if(0>n||n>1)throw new Error("distance must be between 0 and 1: "+n);var r=Math.floor(a(0,1,t.r,i.r,n)),s=Math.floor(a(0,1,t.g,i.g,n)),o=Math.floor(a(0,1,t.b,i.b,n)),h=a(0,1,t.a,i.a,n);return new e(r,s,o,h)},e.fromStateObject=function(t){return new e(t.r,t.g,t.b,t.a)},e}),i("PHET_CORE/platform",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t){return i()===t}function i(){var t=-1,e=null;return"Microsoft Internet Explorer"===navigator.appName?(e=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),null!==e.exec(r)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),null!==e.exec(r)&&(t=parseFloat(RegExp.$1))),t}var n=t("PHET_CORE/phetCore"),r=navigator.userAgent,s={firefox:r.toLowerCase().indexOf("firefox")>-1,mobileSafari:!(!r.match(/(iPod|iPhone|iPad)/)||!r.match(/AppleWebKit/)),safari5:!!(r.match(/Version\/5\./)&&r.match(/Safari\//)&&r.match(/AppleWebKit/)),safari6:!!(r.match(/Version\/6\./)&&r.match(/Safari\//)&&r.match(/AppleWebKit/)),safari7:!!(r.match(/Version\/7\./)&&r.match(/Safari\//)&&r.match(/AppleWebKit/)),ie:-1!==i(),ie9:e(9),ie10:e(10),ie11:e(11),android:r.indexOf("Android")>0,edge:!!r.match(/Edge\//),chromium:/chrom(e|ium)/.test(r.toLowerCase())&&!r.match(/Edge\//)};return n.register("platform",s),s}),i("PHET_CORE/arrayRemove",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t,e){var i=_.indexOf(t,e);t.splice(i,1)}var i=t("PHET_CORE/phetCore");return i.register("arrayRemove",e),e}),i("AXON/Emitter",["require","PHET_CORE/inherit","AXON/axon"],function(t){"use strict";function e(){this.listeners=[],this.listenersToEmitTo=[]}var i=t("PHET_CORE/inherit"),n=t("AXON/axon");return n.register("Emitter",e),i(Object,e,{addListener:function(t){this.defendCallbacks(),this.listeners.push(t)},removeListener:function(t){var e=this.listeners.indexOf(t);this.defendCallbacks(),this.listeners.splice(e,1)},removeAllListeners:function(){for(;this.listeners.length>0;)this.removeListener(this.listeners[0])},defendCallbacks:function(){for(var t=this.listenersToEmitTo.length-1;t>=0&&!this.listenersToEmitTo[t].defended;t--){var e=this.listeners.slice();e.defended=!0,this.listenersToEmitTo[t]=e}},emit:function(){this.listenersToEmitTo.push(this.listeners);for(var t=this.listenersToEmitTo.length-1,e=0;e<this.listenersToEmitTo[t].length;e++)this.listenersToEmitTo[t][e]();this.listenersToEmitTo.pop()},emit1:function(t){this.listenersToEmitTo.push(this.listeners);for(var e=this.listenersToEmitTo.length-1,i=0;i<this.listenersToEmitTo[e].length;i++)this.listenersToEmitTo[e][i](t);this.listenersToEmitTo.pop()},emit2:function(t,e){this.listenersToEmitTo.push(this.listeners);for(var i=this.listenersToEmitTo.length-1,n=0;n<this.listenersToEmitTo[i].length;n++)this.listenersToEmitTo[i][n](t,e);this.listenersToEmitTo.pop()},hasListener:function(t){return this.listeners.indexOf(t)>=0},hasListeners:function(){return this.listeners.length>0}})}),i("AXON/Multilink",["require","AXON/axon","PHET_CORE/inherit"],function(t){"use strict";function e(t,e,i){this.dependencies=t,this.dependencyValues=t.map(function(t){return t.get()});var n=this;this.dependencyListeners=[];for(var r=0;r<t.length;r++){var s=t[r];!function(t,i){var r=function(t){n.dependencyValues[i]=t,e.apply(null,n.dependencyValues)};n.dependencyListeners.push(r),t.lazyLink(r)}(s,r)}i||e.apply(null,this.dependencyValues)}var i=t("AXON/axon"),n=t("PHET_CORE/inherit");return i.register("Multilink",e),n(Object,e,{dispose:function(){for(var t=0;t<this.dependencies.length;t++){var e=this.dependencies[t];e.unlink(this.dependencyListeners[t])}this.dependencies=null,this.dependencyListeners=null,this.dependencyValues=null}})}),i("AXON/Property",["require","AXON/axon","PHET_CORE/inherit","AXON/Events","AXON/Emitter","AXON/Multilink"],function(t){"use strict";function e(t,e){e&&e.isTandem,e=_.extend({tandem:null},e),this.events=new r,this._value=t,this._initialValue=t,this.changedEmitter=new s,e.tandem&&e.tandem.addInstance(this),this.disposeProperty=function(){e.tandem&&e.tandem.removeInstance(this)}}var i=t("AXON/axon"),n=t("PHET_CORE/inherit"),r=t("AXON/Events"),s=t("AXON/Emitter"),a=t("AXON/Multilink");return i.register("Property",e),n(Object,e,{get:function(){return this._value},set:function(t){return this.equalsValue(t)||this._setAndNotifyObservers(t),this},equalsValue:function(t){return this.areValuesEqual(t,this._value)},areValuesEqual:function(t,e){return t===e},get initialValue(){return this._initialValue},_setAndNotifyObservers:function(t){var e=this.get();this._value=t,this._notifyObservers(e)},_notifyObservers:function(t){var e=this.get();this.events.trigger2("startedCallbacksForChanged",e,t),this.changedEmitter.emit2(e,t),this.events.trigger0("endedCallbacksForChanged")},notifyObserversStatic:function(){this.changedEmitter.emit1(this.get())},reset:function(){this.set(this._initialValue)},get value(){return this.get()},set value(t){this.set(t)},link:function(t){this.changedEmitter.hasListener(t)||(this.changedEmitter.addListener(t),t(this.get(),null))},lazyLink:function(t){this.changedEmitter.addListener(t)},unlink:function(t){this.changedEmitter.hasListener(t)&&this.changedEmitter.removeListener(t)},unlinkAll:function(){this.changedEmitter.removeAllListeners()},linkAttribute:function(t,e){var i=function(i){t[e]=i};return this.link(i),i},unlinkAttribute:function(t){this.unlink(t)},toString:function(){return"Property{"+this.get()+"}"},valueOf:function(){return this.toString()},once:function(t){var e=this,i=function(n,r){e.unlink(i),t(n,r)};return this.lazyLink(i),i},debug:function(t){var e=function(e){console.log(t,e)};return this.link(e),e},get toggleFunction(){return this.toggle.bind(this)},toggle:function(){this.value=!this.value},onValue:function(t,e){var i=this,n=function(n){i.areValuesEqual(n,t)&&e()};return this.link(n),n},dispose:function(){this.disposeProperty()}},{multilink:function(t,e){return new a(t,e,!1)},lazyMultilink:function(t,e){return new a(t,e,!0)},unmultilink:function(t){t.dispose()},addProperty:function(t,i,n){var r=t[i+"Property"]=new e(n);Object.defineProperty(t,i,{get:function(){return r.get()},set:function(t){r.set(t)},configurable:!0,enumerable:!0})}})}),i("SCENERY/nodes/Paintable",["require","SCENERY/scenery","SCENERY/util/Color","KITE/util/LineStyles","SCENERY/display/Renderer","PHET_CORE/inherit","PHET_CORE/extend","PHET_CORE/platform","PHET_CORE/arrayRemove","AXON/Property"],function(t){"use strict";function e(t,e){return t?t.toCSS?t.toCSS():t.isPaint?"url(#"+t.id+"-"+(e?e.id:"noblock")+")":t:"none"}var i=t("SCENERY/scenery"),n=t("SCENERY/util/Color"),r=t("KITE/util/LineStyles"),s=t("SCENERY/display/Renderer"),a=t("PHET_CORE/inherit"),o=t("PHET_CORE/extend"),h=t("PHET_CORE/platform"),l=t("PHET_CORE/arrayRemove"),u=t("AXON/Property"),c=h.safari5,d=h.ie9,m={mixin:function(t){function e(){this.invalidateSupportedRenderers();for(var t=this._drawables.length,e=0;t>e;e++)this._drawables[e].markDirtyFill()}function i(){this.invalidateSupportedRenderers();for(var t=this._drawables.length,e=0;t>e;e++)this._drawables[e].markDirtyStroke()}var n=t.prototype;if(o(n,{initializePaintable:function(){this._fill=null,this._fillPickable=!0,this._stroke=null,this._strokePickable=!1,this._cachedPaints=[],this._lineDrawingStyles=new r},hasFill:function(){return null!==this._fill},hasStroke:function(){return null!==this._stroke},getFill:function(){return this._fill},get fill(){return this.getFill()},setFill:function(t){return this._fill!==t&&(this._fill=t,this.invalidateFill()),this},set fill(t){this.setFill(t)},getStroke:function(){return this._stroke},get stroke(){return this.getStroke()},setStroke:function(t){return this._stroke!==t&&(this._stroke=t,this.invalidateStroke()),this},set stroke(t){this.setStroke(t)},getFillValue:function(){var t=this.getFill();return t instanceof u&&(t=t.get()),t},get fillValue(){return this.getFillValue()},getStrokeValue:function(){var t=this.getStroke();return t instanceof u&&(t=t.get()),t},get strokeValue(){return this.getStrokeValue()},isFillPickable:function(){return this._fillPickable},get fillPickable(){return this.isFillPickable()},setFillPickable:function(t){return this._fillPickable!==t&&(this._fillPickable=t,this.invalidateFill()),this},set fillPickable(t){this.setFillPickable(t)},isStrokePickable:function(){return this._strokePickable},get strokePickable(){return this.isStrokePickable()},setStrokePickable:function(t){return this._strokePickable!==t&&(this._strokePickable=t,this.invalidateStroke()),this},set strokePickable(t){this.setStrokePickable(t)},getLineWidth:function(){return this._lineDrawingStyles.lineWidth},get lineWidth(){return this.getLineWidth()},setLineWidth:function(t){if(this.getLineWidth()!==t){this._lineDrawingStyles.lineWidth=t,this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineWidth()}return this},set lineWidth(t){this.setLineWidth(t)},getLineCap:function(){return this._lineDrawingStyles.lineCap},get lineCap(){return this.getLineCap()},setLineCap:function(t){if(this._lineDrawingStyles.lineCap!==t){this._lineDrawingStyles.lineCap=t,this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineOptions()}return this},set lineCap(t){this.setLineCap(t)},getLineJoin:function(){return this._lineDrawingStyles.lineJoin},get lineJoin(){return this.getLineJoin()},setLineJoin:function(t){if(this._lineDrawingStyles.lineJoin!==t){this._lineDrawingStyles.lineJoin=t,this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineOptions()}return this},set lineJoin(t){this.setLineJoin(t)},getMiterLimit:function(){return this._lineDrawingStyles.miterLimit},get miterLimit(){return this.getMiterLimit()},setMiterLimit:function(t){if(this._lineDrawingStyles.miterLimit!==t){this._lineDrawingStyles.miterLimit=t,this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineOptions()}return this},set miterLimit(t){this.setMiterLimit(t)},hasLineDash:function(){return!!this._lineDrawingStyles.lineDash.length},getLineDash:function(){return this._lineDrawingStyles.lineDash},get lineDash(){return this.getLineDash()},setLineDash:function(t){if(this._lineDrawingStyles.lineDash!==t){this._lineDrawingStyles.lineDash=t||[],this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineOptions()}return this},set lineDash(t){this.setLineDash(t)},getLineDashOffset:function(){return this._lineDrawingStyles.lineDashOffset},get lineDashOffset(){return this.getLineDashOffset()},setLineDashOffset:function(t){if(this._lineDrawingStyles.lineDashOffset!==t){this._lineDrawingStyles.lineDashOffset=t,this.invalidateStroke();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyLineOptions()}return this},set lineDashOffset(t){this.setLineDashOffset(t)},getLineStyles:function(){return this._lineDrawingStyles},get lineStyles(){return this.getLineStyles()},setLineStyles:function(t){return this._lineDrawingStyles=t,this.invalidateStroke(),this},set lineStyles(t){this.setLineStyles(t)},getCachedPaints:function(){return this._cachedPaints},get cachedPaints(){return this.getCachedPaints()},setCachedPaints:function(t){this._cachedPaints=t.filter(function(t){return t&&t.isPaint});for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyCachedPaints();return this},set cachedPaints(t){this.setCachedPaints(t)},addCachedPaint:function(t){if(t&&t.isPaint){this._cachedPaints.push(t);for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyCachedPaints()}},removeCachedPaint:function(t){if(t&&t.isPaint){l(this._cachedPaints,t);for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyCachedPaints()}},beforeCanvasFill:function(t){var e=this.getFillValue();t.setFillStyle(e),e.transformMatrix&&(t.context.save(),e.transformMatrix.canvasAppendTransform(t.context));
},afterCanvasFill:function(t){var e=this.getFillValue();e.transformMatrix&&t.context.restore()},beforeCanvasStroke:function(t){var e=this.getStrokeValue();t.setStrokeStyle(this._stroke),t.setLineWidth(this.getLineWidth()),t.setLineCap(this.getLineCap()),t.setLineJoin(this.getLineJoin()),t.setMiterLimit(this.getMiterLimit()),t.setLineDash(this.getLineDash()),t.setLineDashOffset(this.getLineDashOffset()),e.transformMatrix&&(t.context.save(),e.transformMatrix.canvasAppendTransform(t.context))},afterCanvasStroke:function(t){var e=this.getStrokeValue();e.transformMatrix&&t.context.restore()},getCSSFill:function(){var t=this.getFillValue();return t?t.toCSS?t.toCSS():t:"transparent"},getSimpleCSSStroke:function(){var t=this.getStrokeValue();return t?t.toCSS?t.toCSS():t:"transparent"},appendFillablePropString:function(t,e){return this._fill&&(e&&(e+=",\n"),e+="string"==typeof this.getFillValue()?t+"fill: '"+this.getFillValue()+"'":t+"fill: "+this.getFillValue().toString()),e},appendStrokablePropString:function(t,e){function i(i,n,r){e&&(e+=",\n"),e+=r||"string"!=typeof n?t+i+": "+n:t+i+": '"+n+"'"}var n=this;if(this._stroke){var s=new r;"string"==typeof this.getStrokeValue()?i("stroke",this.getStrokeValue()):i("stroke",this.getStrokeValue().toString(),!0),_.each(["lineWidth","lineCap","miterLimit","lineJoin","lineDashOffset"],function(t){n[t]!==s[t]&&i(t,n[t])}),this.lineDash.length&&i("lineDash",JSON.stringify(this.lineDash),!0)}return e},getFillRendererBitmask:function(){var t=0;return c&&this._fill&&this._fill.isGradient||(t|=s.bitmaskSVG),t|=s.bitmaskCanvas,this.hasFill()?this._fill.isPattern||this._fill.isGradient||(t|=s.bitmaskDOM):(t|=s.bitmaskDOM,t|=s.bitmaskWebGL),t},getStrokeRendererBitmask:function(){var t=0;return d&&this.hasStroke()&&this.hasLineDash()||(t|=s.bitmaskCanvas),t|=s.bitmaskSVG,this.hasStroke()||(t|=s.bitmaskDOM),t}}),n._mutatorKeys=["fill","fillPickable","stroke","lineWidth","lineCap","lineJoin","miterLimit","lineDash","lineDashOffset","strokePickable","cachedPaints"].concat(n._mutatorKeys),n.invalidateFill){var a=n.invalidateFill;n.invalidateFill=function(){a.call(this),e.call(this)}}else n.invalidateFill=e;if(n.invalidateStroke){var h=n.invalidateStroke;n.invalidateStroke=function(){h.call(this),i.call(this)}}else n.invalidateStroke=i}};return i.register("Paintable",m),m.PaintObserver=function(t,e){this.type=t,this.name="_"+t,this.changeCallback=e,this.primary=null,this.secondary=null,this.updateListener=this.update.bind(this)},a(Object,m.PaintObserver,{initialize:function(t){this.node=t,this.update()},update:function(){var t=this.node[this.name];if(t!==this.primary)this.detachPrimary(this.primary),this.attachPrimary(t),this.changeCallback();else if(t instanceof u){var e=t.get();e!==this.secondary&&(this.detachSecondary(this.secondary),this.attachSecondary(e),this.changeCallback())}},attachPrimary:function(t){this.primary=t,t instanceof u?(t.lazyLink(this.updateListener),this.attachSecondary(t.get())):t instanceof n&&t.addChangeListener(this.changeCallback)},detachPrimary:function(t){t instanceof u?(t.unlink(this.updateListener),this.detachSecondary(t.get()),this.secondary=null):t instanceof n&&t.removeChangeListener(this.changeCallback),this.primary=null},attachSecondary:function(t){this.secondary=t,t instanceof n&&t.addChangeListener(this.changeCallback)},detachSecondary:function(t){t instanceof n&&t.removeChangeListener(this.changeCallback),this.secondary=null},clean:function(){this.detachPrimary(this.primary),this.node=null}}),m.PaintableStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializePaintableState=function(t,e){return this.lastFill=void 0,this.dirtyFill=!0,this.lastStroke=void 0,this.dirtyStroke=!0,this.dirtyLineWidth=!0,this.dirtyLineOptions=!0,this.dirtyCachedPaints=!0,this.lastCachedPaints=[],this.fillCallback=this.fillCallback||this.markDirtyFill.bind(this),this.strokeCallback=this.strokeCallback||this.markDirtyStroke.bind(this),this.fillObserver=this.fillObserver||new m.PaintObserver("fill",this.fillCallback),this.strokeObserver=this.strokeObserver||new m.PaintObserver("stroke",this.strokeCallback),this.fillObserver.initialize(e.node),this.strokeObserver.initialize(e.node),this},e.cleanPaintableState=function(){this.dirtyFill=!1,this.lastFill=this.node.getFill(),this.dirtyStroke=!1,this.dirtyLineWidth=!1,this.dirtyLineOptions=!1,this.dirtyCachedPaints=!1,this.lastStroke=this.node.getStroke()},e.disposePaintableState=function(){this.fillObserver.clean(),this.strokeObserver.clean()},e.markDirtyFill=function(){this.dirtyFill=!0,this.markPaintDirty(),this.fillObserver.update()},e.markDirtyStroke=function(){this.dirtyStroke=!0,this.markPaintDirty(),this.strokeObserver.update()},e.markDirtyLineWidth=function(){this.dirtyLineWidth=!0,this.markPaintDirty()},e.markDirtyLineOptions=function(){this.dirtyLineOptions=!0,this.markPaintDirty()},e.markDirtyCachedPaints=function(){this.dirtyCachedPaints=!0,this.markPaintDirty()}}},m.PaintableStatelessDrawable={mixin:function(t){var e=t.prototype;e.initializePaintableStateless=function(t,e){return this.fillCallback=this.fillCallback||this.markDirtyFill.bind(this),this.strokeCallback=this.strokeCallback||this.markDirtyStroke.bind(this),this.fillObserver=this.fillObserver||new m.PaintObserver("fill",this.fillCallback),this.strokeObserver=this.strokeObserver||new m.PaintObserver("stroke",this.strokeCallback),this.fillObserver.initialize(e.node),this.strokeObserver.initialize(e.node),this},e.disposePaintableStateless=function(){this.fillObserver.clean(),this.strokeObserver.clean()},e.markDirtyFill=function(){this.markPaintDirty(),this.fillObserver.update()},e.markDirtyStroke=function(){this.markPaintDirty(),this.strokeObserver.update()},e.markDirtyLineWidth=function(){this.markPaintDirty()},e.markDirtyLineOptions=function(){this.markPaintDirty()},e.markDirtyCachedPaints=function(){this.markPaintDirty()}}},m.PaintSVGState=function(){this.initialize()},a(Object,m.PaintSVGState,{initialize:function(){this.svgBlock=null,this.fillStyle="none",this.strokeStyle="none",this.fillPaint=null,this.strokePaint=null,this.updateBaseStyle(),this.strokeDetailStyle=""},dispose:function(){this.releaseFillPaint(),this.releaseStrokePaint()},releaseFillPaint:function(){this.fillPaint&&(this.svgBlock.decrementPaint(this.fillPaint),this.fillPaint=null)},releaseStrokePaint:function(){this.strokePaint&&(this.svgBlock.decrementPaint(this.strokePaint),this.strokePaint=null)},updateFill:function(t,i){var n=e(i,t);i!==this.fillPaint&&(this.releaseFillPaint(),i&&i.isPaint&&(this.fillPaint=i,t.incrementPaint(i))),n!==this.fillStyle&&(this.fillStyle=n,this.updateBaseStyle())},updateStroke:function(t,i){var n=e(i,t);i!==this.strokePaint&&(this.releaseStrokePaint(),i&&i.isPaint&&(this.strokePaint=i,t.incrementPaint(i))),n!==this.strokeStyle&&(this.strokeStyle=n,this.updateBaseStyle())},updateBaseStyle:function(){this.baseStyle="fill: "+this.fillStyle+"; stroke: "+this.strokeStyle+";"},updateStrokeDetailStyle:function(t){var e="",i=t.getLineWidth();1!==i&&(e+="stroke-width: "+i+";");var n=t.getLineCap();"butt"!==n&&(e+="stroke-linecap: "+n+";");var r=t.getLineJoin();"miter"!==r&&(e+="stroke-linejoin: "+r+";");var s=t.getMiterLimit();e+="stroke-miterlimit: "+s+";",t.hasLineDash()&&(e+="stroke-dasharray: "+t.getLineDash().join(",")+";",e+="stroke-dashoffset: "+t.getLineDashOffset()+";"),this.strokeDetailStyle=e},updateSVGBlock:function(t){var e=this.svgBlock;e&&(this.fillPaint&&e.decrementPaint(this.fillPaint),this.strokePaint&&e.decrementPaint(this.strokePaint)),this.svgBlock=t,this.fillPaint&&t.incrementPaint(this.fillPaint),this.strokePaint&&t.incrementPaint(this.strokePaint)}}),m}),i("SCENERY/display/Drawable",["require","PHET_CORE/inherit","AXON/Events","SCENERY/scenery","SCENERY/display/Renderer"],function(t){"use strict";function e(t){this.initializeDrawable(t)}var i=t("PHET_CORE/inherit"),n=t("AXON/Events"),r=t("SCENERY/scenery"),s=t("SCENERY/display/Renderer"),a=1;return r.register("Drawable",e),i(n,e,{initializeDrawable:function(t){return n.call(this),this.id=this.id||a++,this.cleanDrawable(),this.renderer=t,this.dirty=!0,this.disposed=!1,this.linksDirty=!1,this._visible=!0,this._fittable=!0,this},cleanDrawable:function(){this.parentDrawable=null,this.backbone=null,this.pendingParentDrawable=null,this.pendingBackbone=null,this.pendingAddition=!1,this.pendingRemoval=!1,this.previousDrawable=null,this.nextDrawable=null,this.oldPreviousDrawable=null,this.oldNextDrawable=null,this.removeAllEventListeners()},setVisible:function(t){this._visible!==t&&(this._visible=t,this.trigger0("visibility"))},set visible(t){this.setVisible(t)},isVisible:function(){return this._visible},get visible(){return this.isVisible()},setFittable:function(t){this._fittable!==t&&(this._fittable=t,this.trigger1("fittability",this))},set fittable(t){this.setFittable(t)},isFittable:function(){return this._fittable},get fittable(){return this.isFittable()},setBlockBackbone:function(t){this.parentDrawable=t,this.backbone=t,this.pendingParentDrawable=t,this.pendingBackbone=t,this.pendingAddition=!1,this.pendingRemoval=!1},notePendingAddition:function(t,e,i){this.pendingParentDrawable=e,this.pendingBackbone=i,this.pendingAddition=!0,this.pendingRemoval||t.markDrawableChangedBlock(this)},notePendingRemoval:function(t){this.pendingRemoval=!0,this.pendingAddition||t.markDrawableChangedBlock(this)},notePendingMove:function(t,e){this.pendingParentDrawable=e,this.pendingRemoval&&this.pendingAddition||t.markDrawableChangedBlock(this),this.pendingAddition=!0,this.pendingRemoval=!0},updateBlock:function(){var t=!1;return(this.pendingRemoval||this.pendingAddition)&&(t=!this.pendingRemoval||!this.pendingAddition||this.parentDrawable!==this.pendingParentDrawable||this.backbone!==this.pendingBackbone,t?(this.pendingRemoval&&(this.parentDrawable.removeDrawable(this),this.pendingAddition||(this.pendingParentDrawable=null,this.pendingBackbone=null)),this.parentDrawable=this.pendingParentDrawable,this.backbone=this.pendingBackbone,this.pendingAddition&&this.parentDrawable.addDrawable(this)):this.pendingAddition&&s.isCanvas(this.renderer)&&this.parentDrawable.onPotentiallyMovedDrawable(this),this.pendingAddition=!1,this.pendingRemoval=!1),t},updateLinks:function(){this.oldNextDrawable=this.nextDrawable,this.oldPreviousDrawable=this.previousDrawable,this.linksDirty=!1},markDirty:function(){this.dirty||(this.dirty=!0,this.parentDrawable&&this.parentDrawable.markDirtyDrawable(this))},markLinksDirty:function(t){this.linksDirty||(this.linksDirty=!0,t.markDrawableForLinksUpdate(this))},markForDisposal:function(t){e.disconnectBefore(this,t),e.disconnectAfter(this,t),t.markDrawableForDisposal(this)},disposeImmediately:function(t){e.disconnectBefore(this,t),e.disconnectAfter(this,t),this.dispose()},dispose:function(){this.cleanDrawable(),this.disposed=!0,this.freeToPool()},audit:function(t,e,i){},toString:function(){return this.constructor.name+"#"+this.id},toDetailedString:function(){return this.toString()}}),e.connectDrawables=function(t,e,i){t.nextDrawable!==e&&(t.nextDrawable&&(t.nextDrawable.markLinksDirty(i),t.nextDrawable.previousDrawable=null),e.previousDrawable&&(e.previousDrawable.markLinksDirty(i),e.previousDrawable.nextDrawable=null),t.nextDrawable=e,e.previousDrawable=t,t.markLinksDirty(i),e.markLinksDirty(i))},e.disconnectBefore=function(t,e){t.previousDrawable&&(t.markLinksDirty(e),t.previousDrawable.markLinksDirty(e),t.previousDrawable.nextDrawable=null,t.previousDrawable=null)},e.disconnectAfter=function(t,e){t.nextDrawable&&(t.markLinksDirty(e),t.nextDrawable.markLinksDirty(e),t.nextDrawable.previousDrawable=null,t.nextDrawable=null)},e.listToArray=function(t,e){for(var i=[],n=t;i.push(n),n!==e;n=n.nextDrawable);return i},e.oldListToArray=function(t,e){for(var i=[],n=t;i.push(n),n!==e;n=n.oldNextDrawable);return i},e}),i("SCENERY/display/SelfDrawable",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/Drawable"],function(t){"use strict";function e(t,e){this.initializeSelfDrawable(t,e)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/scenery"),s=t("SCENERY/display/Drawable");return r.register("SelfDrawable",e),i(r.Drawable,e,{initializeSelfDrawable:function(t,e){return this.drawableVisibilityListener=this.drawableVisibilityListener||this.updateSelfVisibility.bind(this),this.initializeDrawable(t),this.instance=e,this.node=e.trail.lastNode(),this.node.attachDrawable(this),this.instance.onStatic("selfVisibility",this.drawableVisibilityListener),this.updateSelfVisibility(),this},dispose:function(){this.instance.offStatic("selfVisibility",this.drawableVisibilityListener),this.node.detachDrawable(this),this.instance=null,this.node=null,s.prototype.dispose.call(this)},updateSelfVisibility:function(){this.visible=this.instance.selfVisible},toDetailedString:function(){return this.toString()+" ("+this.instance.trail.toPathString()+")"}}),e.Poolable={mixin:function(t){n.mixin(t,{defaultFactory:function(){return new t},constructorDuplicateFactory:function(e){return function(i,n){return e.length?e.pop().initialize(i,n):new t(i,n)}}})}},e}),i("SCENERY/display/SVGSelfDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/SelfDrawable","SCENERY/nodes/Paintable"],function(t){"use strict";function e(t,e){throw this.initializeSVGSelfDrawable(t,e),new Error("Should use initialization and pooling")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/SelfDrawable"),s=t("SCENERY/nodes/Paintable");return n.register("SVGSelfDrawable",e),i(r,e,{initializeSVGSelfDrawable:function(t,e,i,n){return this.initializeSelfDrawable(t,e),this.usesPaint=i,this.keepElements=n,this.svgElement=null,this.svgBlock=null,this.initializeState(t,e),this.usesPaint&&(this.paintState?this.paintState.initialize():this.paintState=new s.PaintSVGState),this},update:function(){this.dirty&&(this.dirty=!1,this.updateSVG())},updateSVG:function(){if(this.paintDirty&&this.updateSVGSelf(this.node,this.svgElement),this.usesPaint&&this.dirtyCachedPaints){var t,e,i=this.node._cachedPaints.slice();for(t=0;t<i.length;t++){var n=i[t],r=!0;for(e=0;e<this.lastCachedPaints.length;e++)if(n===this.lastCachedPaints[e]){r=!1;break}r&&this.svgBlock.incrementPaint(n)}for(t=0;t<this.lastCachedPaints.length;t++){var s=this.lastCachedPaints[t],a=!0;for(e=0;e<i.length;e++)if(s===i[e]){a=!1;break}a&&this.svgBlock.decrementPaint(s)}this.lastCachedPaints=i}this.setToClean()},updateFillStrokeStyle:function(t){if(this.usesPaint){this.dirtyFill&&this.paintState.updateFill(this.svgBlock,this.node.getFillValue()),this.dirtyStroke&&this.paintState.updateStroke(this.svgBlock,this.node.getStrokeValue());var e=this.dirtyLineWidth||this.dirtyLineOptions;e&&this.paintState.updateStrokeDetailStyle(this.node),(this.dirtyFill||this.dirtyStroke||e)&&t.setAttribute("style",this.paintState.baseStyle+this.paintState.strokeDetailStyle),this.cleanPaintableState()}},updateSVGBlock:function(t){var e=this.svgBlock;if(this.usesPaint&&e)for(var i=0;i<this.lastCachedPaints.length;i++)e.decrementPaint(this.lastCachedPaints[i]);if(this.svgBlock=t,this.usesPaint)for(var n=0;n<this.lastCachedPaints.length;n++)t.incrementPaint(this.lastCachedPaints[n]);this.updateDefsSelf&&this.updateDefsSelf(t),this.usesPaint&&this.paintState.updateSVGBlock(t),this.usesPaint&&this.markDirtyFill(),this.usesPaint&&this.markDirtyStroke()},dispose:function(){this.disposeState(),this.keepElements||(this.svgElement=null),this.updateDefsSelf&&this.updateDefsSelf(null),this.usesPaint&&this.paintState.dispose(),this.defs=null,this.svgBlock=null,r.prototype.dispose.call(this)},setToClean:function(){this.setToCleanState()}}),e}),i("SCENERY/display/CanvasSelfDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/SelfDrawable","SCENERY/nodes/Paintable"],function(t){"use strict";function e(t,e){throw this.initializeCanvasSelfDrawable(t,e),new Error("Should use initialization and pooling")}function i(){this.markDirty()}var n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=t("SCENERY/display/SelfDrawable"),a=t("SCENERY/nodes/Paintable");return r.register("CanvasSelfDrawable",e),n(s,e,{initializeCanvasSelfDrawable:function(t,e){return this.initializeSelfDrawable(t,e),this.transformListener=this.transformListener||this.markTransformDirty.bind(this),e.relativeTransform.addListener(this.transformListener),e.relativeTransform.addPrecompute(),this},markTransformDirty:function(){this.markDirty()},markPaintDirty:function(){this.markDirty()},update:function(){this.dirty=!1},updateSelfVisibility:function(){s.prototype.updateSelfVisibility.call(this),this.markDirty()},dispose:function(){this.instance.relativeTransform.removeListener(this.transformListener),this.instance.relativeTransform.removePrecompute(),s.prototype.dispose.call(this)}}),e.createDrawable=function(t){var r=t.type,o=t.paintCanvas,h=t.usesPaint;if(n(e,r,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),h&&this.initializePaintableStateless(t,e),this},paintCanvas:o,update:function(){this.dirty=!1},dispose:function(){e.prototype.dispose.call(this),h&&this.disposePaintableStateless()}}),h&&a.PaintableStatelessDrawable.mixin(r),s.Poolable.mixin(r),t.dirtyMethods)for(var l=0;l<t.dirtyMethods.length;l++)r.prototype[t.dirtyMethods[l]]=i;return r},e}),i("SCENERY/nodes/Path",["require","PHET_CORE/inherit","KITE/Shape","DOT/Bounds2","SCENERY/scenery","SCENERY/nodes/Node","SCENERY/display/Renderer","SCENERY/nodes/Paintable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable"],function(t){"use strict";function e(t,e){this._shape=null,this._strokedShape=null,this._boundsMethod="accurate",e=e||{},this._invalidShapeListener=this.invalidateShape.bind(this),this.initializePaintable(),a.call(this),this.invalidateSupportedRenderers(),e.boundsMethod&&this.setBoundsMethod(e.boundsMethod),this.setShape(t),this.mutate(e)}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("DOT/Bounds2"),s=t("SCENERY/scenery"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/display/Renderer"),h=t("SCENERY/nodes/Paintable"),l=t("SCENERY/display/SVGSelfDrawable"),u=t("SCENERY/display/CanvasSelfDrawable"),c=t("SCENERY/display/SelfDrawable"),d=!0;return s.register("Path",e),i(a,e,{getPathRendererBitmask:function(){return o.bitmaskCanvas|o.bitmaskSVG},invalidateSupportedRenderers:function(){this.setRendererBitmask(this.getFillRendererBitmask()&this.getStrokeRendererBitmask()&this.getPathRendererBitmask())},setShape:function(t){return this._shape!==t&&(this._shape&&this._shape.offStatic("invalidated",this._invalidShapeListener),"string"==typeof t&&(t=new n(t)),this._shape=t,this.invalidateShape(),this._shape&&this._shape.onStatic("invalidated",this._invalidShapeListener)),this},set shape(t){this.setShape(t)},getShape:function(){return this._shape},get shape(){return this.getShape()},getStrokedShape:function(){return this._strokedShape||(this._strokedShape=this.getShape().getStrokedShape(this._lineDrawingStyles)),this._strokedShape},invalidateShape:function(){this.invalidatePath();for(var t=this._drawables.length,e=0;t>e;e++)this._drawables[e].markDirtyShape()},invalidatePath:function(){this._strokedShape=null,this.invalidateSelf()},updateSelfBounds:function(){var t=this.hasShape()?this.computeShapeBounds():r.NOTHING,e=!t.equals(this._selfBounds);return e&&this._selfBounds.set(t),e},setBoundsMethod:function(t){return this._boundsMethod!==t&&(this._boundsMethod=t,this.invalidatePath(),this.trigger0("boundsMethod"),this.trigger0("selfBoundsValid")),this},set boundsMethod(t){return this.setBoundsMethod(t)},getBoundsMethod:function(){return this._boundsMethod},get boundsMethod(){return this.getBoundsMethod()},computeShapeBounds:function(){if("none"===this._boundsMethod)return r.NOTHING;if(this.hasStroke()&&0!==this.getLineWidth()&&"unstroked"!==this._boundsMethod){if("accurate"===this._boundsMethod)return this.getShape().getStrokedBounds(this.getLineStyles());var t;return t="safePadding"===this._boundsMethod&&"miter"===this.getLineJoin()?this.getMiterLimit():"square"===this.getLineCap()?Math.SQRT2:1,this.getShape().bounds.dilated(t*this.getLineWidth()/2)}return this.getShape().bounds},areSelfBoundsValid:function(){return"accurate"===this._boundsMethod||"safePadding"===this._boundsMethod?!0:"none"===this._boundsMethod?!1:!this.hasStroke()},getTransformedSelfBounds:function(t){return(this._stroke?this.getStrokedShape():this.getShape()).getBoundsWithTransform(t)},invalidateStroke:function(){this.invalidatePath(),this.trigger0("selfBoundsValid")},hasShape:function(){return this._shape},canvasPaintSelf:function(t){e.PathCanvasDrawable.prototype.paintCanvas(t,this)},createSVGDrawable:function(t,i){return e.PathSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.PathCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.PathWebGLDrawable.createFromPool(t,i)},isPainted:function(){return!0},containsPointSelf:function(t){var e=!1;return this.hasShape()?(this._fillPickable&&(e=this.getShape().containsPoint(t)),!e&&this._strokePickable&&(e=this.getStrokedShape().containsPoint(t)),e):e},intersectsBoundsSelf:function(t){return this.hasShape()?this._shape.intersectsBounds(t):!1},requiresSVGBoundsWorkaround:function(){if(!this._stroke||!this._stroke.getSVGDefinition||!this.hasShape())return!1;var t=this.computeShapeBounds(!1);return t.x*t.y===0},getDebugHTMLExtras:function(){return this._shape?" (<span style=\"color: #88f\" onclick=\"window.open( 'data:text/plain;charset=utf-8,' + encodeURIComponent( '"+this._shape.getSVGPath()+"' ) );\">path</span>)":""},getBasicConstructor:function(t){return"new scenery.Path( "+(this._shape?this._shape.toString():this._shape)+", {"+t+"} )"},getPropString:function(t,e){var i=a.prototype.getPropString.call(this,t,e);return i=this.appendFillablePropString(t,i),i=this.appendStrokablePropString(t,i)}}),e.prototype._mutatorKeys=["boundsMethod","shape"].concat(a.prototype._mutatorKeys),h.mixin(e),e.PathStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyShape=!0,this.initializePaintableState(t,e),this},e.disposeState=function(){this.disposePaintableState()},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyShape=function(){this.dirtyShape=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyShape=!1},h.PaintableStatefulDrawable.mixin(t)}},e.PathSVGDrawable=function(t,e){this.initialize(t,e)},i(l,e.PathSVGDrawable,{initialize:function(t,e){return this.initializeSVGSelfDrawable(t,e,!0,d),this.svgElement||(this.svgElement=document.createElementNS(s.svgns,"path")),this},updateSVGSelf:function(){var t=this.svgElement;if(this.dirtyShape){var e=this.node.hasShape()?this.node._shape.getSVGPath():"";e||(e="M0 0"),t.setAttribute("d",e)}this.updateFillStrokeStyle(t)}}),e.PathStatefulDrawable.mixin(e.PathSVGDrawable),c.Poolable.mixin(e.PathSVGDrawable),e.PathCanvasDrawable=function(t,e){this.initialize(t,e)},i(u,e.PathCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e),this},paintCanvas:function(t,e){var i=t.context;e.hasShape()&&(i.beginPath(),e._shape.writeToContext(i),e.hasFill()&&(e.beforeCanvasFill(t),i.fill(),e.afterCanvasFill(t)),e.hasStroke()&&(e.beforeCanvasStroke(t),i.stroke(),e.afterCanvasStroke(t)))},markDirtyShape:function(){this.markPaintDirty()},dispose:function(){u.prototype.dispose.call(this),this.disposePaintableStateless()}}),h.PaintableStatelessDrawable.mixin(e.PathCanvasDrawable),c.Poolable.mixin(e.PathCanvasDrawable),e}),i("SUN/sun",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("sun")}),i("SUN/FontAwesomeNode",["require","PHET_CORE/inherit","DOT/Matrix3","SCENERY/nodes/Path","KITE/Shape","SUN/sun"],function(t){"use strict";function e(t,i){i=_.extend({fill:"#000",pickable:!1},i),r.call(this,e.getShapeByName(t),i)}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("SCENERY/nodes/Path"),s=t("KITE/Shape"),a=t("SUN/sun"),o={fullscreen:"M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z",reorder:"M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z",home:"M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z",volume_off:"M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z",volume_up:"M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z",check:"M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z",check_empty:"M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z",undo:"M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-179 0 -336.5 76t-266 213t-147.5 312q-3 14 7 27q9 12 25 12h199q23 0 30 -23q50 -162 185 -261.5t304 -99.5q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5 t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z",cut:"M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z",trash:"M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z",ban_circle:"M1280 640q0 139 -71 260l-701 -701q121 -71 260 -71q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM327 380l701 701q-121 71 -260 71q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5q0 -139 71 -260zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z",times_circle:"M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z",eye_open:"M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z",eye_close:"M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z",warning_sign:"M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z"};o.check_without_box="M1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z";
var h=n.createFromPool(.025,0,0,0,-.025,0,0,0,1),l={};return a.register("FontAwesomeNode",e),i(r,e,{},{getShapeByName:function(t){var e=l[t];return e||(e=l[t]=new s(o[t]).transformed(h)),e}}),e}),i("SCENERY/nodes/LayoutBox",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/nodes/Node"],function(t){"use strict";function e(t){t&&t.spacing,t=_.extend({orientation:"vertical",spacing:s,align:"center",resize:!0},t),"vertical"===t.orientation,this.orientation=t.orientation,this.align=t.align,this.resize=t.resize,this._spacing=t.spacing,r.call(this),this.boundsListener=this.updateLayout.bind(this),this.updatingLayout=!1,this.inited=!1,this.mutate(t),this.inited=!0}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/nodes/Node"),s=0;return n.register("LayoutBox",e),i(r,e,{layout:function(){var t,e,i=this.getChildren(),n=this.childBounds;if("vertical"===this.orientation){var r=0;for(t=0;t<i.length;t++)e=i[t],e.bounds.isValid()&&(e.top=r,"left"===this.align?e.left=n.minX:"right"===this.align?e.right=n.maxX:e.centerX=n.centerX,r+=e.height+this._spacing)}else{var s=0;for(t=0;t<i.length;t++)e=i[t],e.bounds.isValid()&&(e.left=s,"top"===this.align?e.top=n.minY:"bottom"===this.align?e.bottom=n.maxY:e.centerY=n.centerY,s+=e.width+this._spacing)}},updateLayout:function(){this.updatingLayout||(this.updatingLayout=!0,this.layout(),this.updatingLayout=!1)},insertChild:function(t,e){r.prototype.insertChild.call(this,t,e),(this.resize||!this.inited)&&this.updateLayout(),this.resize&&e.onStatic("bounds",this.boundsListener)},removeChildWithIndex:function(t,e){this.resize&&t.offStatic("bounds",this.boundsListener),r.prototype.removeChildWithIndex.call(this,t,e),(this.resize||!this.inited)&&this.updateLayout()},setSpacing:function(t){this._spacing!==t&&(this._spacing=t,this.updateLayout())},set spacing(t){this.setSpacing(t)},getSpacing:function(){return this._spacing},get spacing(){return this.getSpacing()}})}),i("SCENERY/nodes/HBox",["require","PHET_CORE/inherit","SCENERY/nodes/LayoutBox","SCENERY/scenery"],function(t){"use strict";function e(t){n.call(this,_.extend({},t,{orientation:"horizontal"}))}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/LayoutBox"),r=t("SCENERY/scenery");return r.register("HBox",e),i(n,e)}),i("SCENERY/util/Paint",["require","SCENERY/util/Color","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(){this.id="paint"+r++,this.transformMatrix=null}t("SCENERY/util/Color");var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=1;return n.register("Paint",e),i(Object,e,{isPaint:!0,setTransformMatrix:function(t){return this.transformMatrix!==t&&(this.transformMatrix=t),this}}),e}),i("SCENERY/util/Gradient",["require","SCENERY/util/Color","PHET_CORE/inherit","SCENERY/scenery","SCENERY/util/Paint","SCENERY/util/Color"],function(t){"use strict";function e(t){r.call(this),this.stops=[],this.lastStopRatio=0,this.canvasGradient=t}t("SCENERY/util/Color");var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/util/Paint");t("SCENERY/util/Color");return n.register("Gradient",e),i(r,e,{isGradient:!0,addColorStop:function(t,e){if(this.lastStopRatio>t)throw new Error("Color stops not specified in the order of increasing ratios");return this.lastStopRatio=t,"string"==typeof e&&(e=new n.Color(e)),this.stops.push({ratio:t,color:e}),this.canvasGradient.addColorStop(t,e.toCSS()),this},getCanvasStyle:function(){return this.canvasGradient}}),e}),i("SCENERY/util/LinearGradient",["require","SCENERY/scenery","PHET_CORE/inherit","DOT/Vector2","SCENERY/util/Gradient"],function(t){"use strict";function e(t,e,n,a){var o=void 0===a;this.start=o?t:new r(t,e),this.end=o?e:new r(n,a),s.call(this,i.scratchContext.createLinearGradient(t,e,n,a))}var i=t("SCENERY/scenery"),n=t("PHET_CORE/inherit"),r=t("DOT/Vector2"),s=t("SCENERY/util/Gradient");return i.register("LinearGradient",e),n(s,e,{isLinearGradient:!0,getSVGDefinition:function(){var t=document.createElementNS(i.svgns,"linearGradient");return t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("x1",this.start.x),t.setAttribute("y1",this.start.y),t.setAttribute("x2",this.end.x),t.setAttribute("y2",this.end.y),this.transformMatrix&&t.setAttribute("gradientTransform",this.transformMatrix.getSVGTransform()),_.each(this.stops,function(e){var n=document.createElementNS(i.svgns,"stop");n.setAttribute("offset",e.ratio),n.setAttribute("style","stop-color: "+e.color.withAlpha(1).toCSS()+"; stop-opacity: "+e.color.a.toFixed(20)+";"),t.appendChild(n)}),t},toString:function(){var t="new scenery.LinearGradient( "+this.start.x+", "+this.start.y+", "+this.end.x+", "+this.end.y+" )";return _.each(this.stops,function(e){t+=".addColorStop( "+e.ratio+", '"+(e.color.toCSS?e.color.toCSS():e.color.toString())+"' )"}),t}}),e}),i("PHET_CORE/detectPrefix",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t,e){return void 0!==t[e]?e:(e=e.charAt(0).toUpperCase()+e.slice(1),void 0!==t["moz"+e]?"moz"+e:void 0!==t["Moz"+e]?"Moz"+e:void 0!==t["webkit"+e]?"webkit"+e:void 0!==t["ms"+e]?"ms"+e:void 0!==t["o"+e]?"o"+e:void 0)}var i=t("PHET_CORE/phetCore");return i.register("detectPrefix",e),e}),i("SCENERY/util/Features",["require","PHET_CORE/detectPrefix","SCENERY/scenery"],function(t){"use strict";function e(t){try{var e=document.createElement("canvas");e.width=1,e.height=1;var i=e.getContext("2d");i.fillStyle="black",i.fillRect(0,0,1,1);var n=e.toDataURL([t]),r="data:"+t;return n.slice(0,r.length)===r}catch(s){return!1}}function i(t,e){var i=document.createElement("canvas");i.width=1,i.height=1;var n=i.getContext("2d"),r=document.createElement("img");r.crossOrigin="Anonymous";var a=function(){try{n.drawImage(r,0,0),i.toDataURL(),s[t]=!0}catch(e){s[t]=!1}};r.onload=a;try{r.src=e,r.complete&&a()}catch(o){s[t]=!1}}var n=t("PHET_CORE/detectPrefix"),r=t("SCENERY/scenery"),s={};r.register("Features",s),s.canvasPNGOutput=e("image/png"),s.canvasJPEGOutput=e("image/jpeg"),s.canvasGIFOutput=e("image/gif"),s.canvasICONOutput=e("image/x-icon"),i("canvasPNGInput","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NkYGD4DwABCQEBtxmN7wAAAABJRU5ErkJggg=="),i("canvasJPEGInput","data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAABAAEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD8qqKKKAP/2Q=="),i("canvasSVGInput","data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3cG9ydD0iMCAwIDEgMSIgd2lkdGg9IjEiIGhlaWdodD0iMSIgPg0KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiByeD0iMCIgcnk9IjAiIHN0eWxlPSJmaWxsOiBibGFjazsgc3Ryb2tlOiBub25lOyI+PC9yZWN0Pg0KPC9zdmc+DQo="),i("canvasGIFInput","data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEAAAIALAAAAAABAAEAAAICRAEAOw==");var a=document.createElement("canvas"),o=a.getContext("2d");s.toDataURLHD=n(a,"toDataURLHD"),s.createImageDataHD=n(o,"createImageDataHD"),s.getImageDataHD=n(o,"getImageDataHD"),s.putImageDataHD=n(o,"putImageDataHD"),s.currentTransform=n(o,"currentTransform");var h=document.createElement("span"),l=document.createElement("div");return s.textStroke=n(h.style,"textStroke"),s.textStrokeColor=n(h.style,"textStrokeColor"),s.textStrokeWidth=n(h.style,"textStrokeWidth"),s.transform=n(l.style,"transform"),s.transformOrigin=n(l.style,"transformOrigin"),s.backfaceVisibility=n(l.style,"backfaceVisibility"),s.borderRadius=n(l.style,"borderRadius"),s.userSelect=n(l.style,"userSelect"),s.touchAction=n(l.style,"touchAction"),s.touchCallout=n(l.style,"touchCallout"),s.userDrag=n(l.style,"userDrag"),s.tapHighlightColor=n(l.style,"tapHighlightColor"),s.fontSmoothing=n(l.style,"fontSmoothing"),s.requestAnimationFrame=n(window,"requestAnimationFrame"),s.cancelAnimationFrame=n(window,"cancelAnimationFrame"),s.setStyle=function(t,e,i){void 0!==e&&(t.style[e]=i)},s}),i("SCENERY/display/DOMSelfDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/SelfDrawable","SCENERY/display/Renderer"],function(t){"use strict";function e(t,e){throw this.initializeDOMSelfDrawable(t,e),new Error("Should use initialization and pooling")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/SelfDrawable");return t("SCENERY/display/Renderer"),n.register("DOMSelfDrawable",e),i(r,e,{initializeDOMSelfDrawable:function(t,e){return this.transformListener=this.transformListener||this.markTransformDirty.bind(this),this.initializeSelfDrawable(t,e),this.forceAcceleration=!1,this.markTransformDirty(),this.visibilityDirty=!0,e.relativeTransform.addListener(this.transformListener),e.relativeTransform.addPrecompute(),this},markTransformDirty:function(){this.transformDirty=!0,this.markDirty()},getTransformMatrix:function(){return this.instance.relativeTransform.validate(),this.instance.relativeTransform.matrix},update:function(){this.dirty&&(this.dirty=!1,this.updateDOM(),this.visibilityDirty&&(this.visibilityDirty=!1,this.domElement.style.visibility=this.visible?"":"hidden"),this.cleanPaintableState&&this.cleanPaintableState())},updateDOM:function(){},updateSelfVisibility:function(){r.prototype.updateSelfVisibility.call(this),this.visibilityDirty||(this.visibilityDirty=!0,this.markDirty())},dispose:function(){this.instance.relativeTransform.removeListener(this.transformListener),this.instance.relativeTransform.removePrecompute(),r.prototype.dispose.call(this)}}),e}),i("SCENERY/nodes/Rectangle",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/nodes/Path","KITE/Shape","DOT/Bounds2","DOT/Dimension2","DOT/Matrix3","SCENERY/util/Features","SCENERY/nodes/Paintable","SCENERY/display/DOMSelfDrawable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable","SCENERY/display/Renderer"],function(t){"use strict";function e(t,e,i,n,r,a,h){"object"==typeof t?t instanceof o?(this._rectX=t.minX,this._rectY=t.minY,this._rectWidth=t.width,this._rectHeight=t.height,arguments.length<3?(h=e,this._cornerXRadius=0,this._cornerYRadius=0):(h=n,this._cornerXRadius=e,this._cornerYRadius=i)):(h=t,this._rectX=h.rectX||0,this._rectY=h.rectY||0,this._rectWidth=h.rectWidth,this._rectHeight=h.rectHeight,this._cornerXRadius=h.cornerXRadius||0,this._cornerYRadius=h.cornerYRadius||0):arguments.length<6?(this._rectX=t,this._rectY=e,this._rectWidth=i,this._rectHeight=n,this._cornerXRadius=0,this._cornerYRadius=0,h=r||{}):(this._rectX=t,this._rectY=e,this._rectWidth=i,this._rectHeight=n,this._cornerXRadius=r,this._cornerYRadius=a,h=h||{}),s.call(this,null,h)}function i(t,i,n){var r="get"+i,s="set"+i,a="_"+t,o="markDirty"+n;e.prototype[r]=function(){return this[a]},e.prototype[s]=function(t){if(this[a]!==t){this[a]=t;for(var e=this._drawables.length,i=0;e>i;i++){var n=this._drawables[i];n[o](),n.markPaintDirty()}this.invalidateRectangle()}return this},Object.defineProperty(e.prototype,t,{set:e.prototype[s],get:e.prototype[r]})}var n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=t("SCENERY/nodes/Path"),a=t("KITE/Shape"),o=t("DOT/Bounds2"),h=t("DOT/Dimension2"),l=t("DOT/Matrix3"),u=t("SCENERY/util/Features"),c=t("SCENERY/nodes/Paintable"),d=t("SCENERY/display/DOMSelfDrawable"),m=t("SCENERY/display/SVGSelfDrawable"),f=t("SCENERY/display/CanvasSelfDrawable"),p=t("SCENERY/display/SelfDrawable"),g=t("SCENERY/display/Renderer"),b=!0,v=!0,E=l.dirtyFromPool();r.register("Rectangle",e),n(s,e,{getMaximumArcSize:function(){return Math.min(this._rectWidth/2,this._rectHeight/2)},getStrokeRendererBitmask:function(){var t=s.prototype.getStrokeRendererBitmask.call(this);return!this.hasStroke()||this.getStroke().isGradient||this.getStroke().isPattern||this.hasLineDash()||("miter"===this.getLineJoin()||"round"===this.getLineJoin()&&u.borderRadius)&&(t|=g.bitmaskDOM),t},getPathRendererBitmask:function(){var t=g.bitmaskCanvas|g.bitmaskSVG,e=this.getMaximumArcSize();return(!this.hasStroke()||this.getLineWidth()<=this._rectHeight&&this.getLineWidth()<=this._rectWidth)&&(!this.isRounded()||u.borderRadius&&this._cornerXRadius===this._cornerYRadius)&&this._cornerYRadius<=e&&this._cornerXRadius<=e&&(t|=g.bitmaskDOM),t},setRect:function(t,e,i,n,r,s){if(this._rectX!==t||this._rectY!==e||this._rectWidth!==i||this._rectHeight!==n||this._cornerXRadius!==r||this._cornerYRadius!==s){this._rectX=t,this._rectY=e,this._rectWidth=i,this._rectHeight=n,this._cornerXRadius=r||0,this._cornerYRadius=s||0;for(var a=this._drawables.length,o=0;a>o;o++)this._drawables[o].markDirtyRectangle();this.invalidateRectangle()}},setRectBounds:function(t){this.setRect(t.x,t.y,t.width,t.height)},set rectBounds(t){this.setRectBounds(t)},getRectBounds:function(){return o.rect(this._rectX,this._rectY,this._rectWidth,this._rectHeight)},get rectBounds(){return this.getRectBounds()},setRectSize:function(t){this.setRectWidth(t.width),this.setRectHeight(t.height)},set rectSize(t){this.setRectSize(t)},getRectSize:function(){return new h(this._rectWidth,this._rectHeight)},get rectSize(){return this.getRectSize()},setRectWidthFromRight:function(t){if(this._rectWidth!==t){var e=this._rectX+this._rectWidth;this.setRectWidth(t),this.setRectX(e-t)}},set rectWidthFromRight(t){this.setRectWidthFromRight(t)},get rectWidthFromRight(){return this.getRectWidth()},setRectHeightFromBottom:function(t){if(this._rectHeight!==t){var e=this._rectY+this._rectHeight;this.setRectHeight(t),this.setRectY(e-t)}},set rectHeightFromBottom(t){this.setRectHeightFromBottom(t)},get rectHeightFromBottom(){return this.getRectHeight()},isRounded:function(){return 0!==this._cornerXRadius&&0!==this._cornerYRadius},computeShapeBounds:function(){var t=new o(this._rectX,this._rectY,this._rectX+this._rectWidth,this._rectY+this._rectHeight);return this._stroke&&(t=t.dilated(this.getLineWidth()/2)),t},getTransformedSelfBounds:function(t){return this.selfBounds.transformed(t)},createRectangleShape:function(){if(this.isRounded()){var t=Math.min(this._rectWidth/2,this._rectHeight/2);return a.roundRectangle(this._rectX,this._rectY,this._rectWidth,this._rectHeight,Math.min(t,this._cornerXRadius),Math.min(t,this._cornerYRadius))}return a.rectangle(this._rectX,this._rectY,this._rectWidth,this._rectHeight)},invalidateRectangle:function(){this._shape=null,this.invalidatePath(),this.invalidateSupportedRenderers()},containsPointSelf:function(t){var i=this._rectX,n=this._rectY,r=this._rectWidth,a=this._rectHeight,o=this._cornerXRadius,h=this._cornerYRadius,l=this.getLineWidth()/2,u=!0;if(this._strokePickable){var c=this.isRounded();if(!c&&"bevel"===this.getLineJoin())return s.prototype.containsPointSelf.call(this,t);var d="miter"===this.getLineJoin()&&!c;u=u&&e.intersects(i-l,n-l,r+2*l,a+2*l,d?0:o+l,d?0:h+l,t)}return this._fillPickable?this._strokePickable?u:e.intersects(i,n,r,a,o,h,t):this._strokePickable?u&&!e.intersects(i+l,n+l,r-2*l,a-2*l,o-l,h-l,t):!1},intersectsBoundsSelf:function(t){return!this.computeShapeBounds().intersection(t).isEmpty()},canvasPaintSelf:function(t){e.RectangleCanvasDrawable.prototype.paintCanvas(t,this)},createDOMDrawable:function(t,i){return e.RectangleDOMDrawable.createFromPool(t,i)},createSVGDrawable:function(t,i){return e.RectangleSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.RectangleCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.RectangleWebGLDrawable.createFromPool(t,i)},getBasicConstructor:function(t){return"new scenery.Rectangle( "+this._rectX+", "+this._rectY+", "+this._rectWidth+", "+this._rectHeight+", "+this._cornerXRadius+", "+this._cornerYRadius+", {"+t+"} )"},setShape:function(t){if(null!==t)throw new Error("Cannot set the shape of a scenery.Rectangle to something non-null");this.invalidatePath()},getShape:function(){return this._shape||(this._shape=this.createRectangleShape()),this._shape},hasShape:function(){return!0},getCornerRadius:function(){return this._cornerXRadius},get cornerRadius(){return this.getCornerRadius()},setCornerRadius:function(t){return this.setCornerXRadius(t),this.setCornerYRadius(t),this},set cornerRadius(t){this.setCornerRadius(t)}}),i("rectX","RectX","X"),i("rectY","RectY","Y"),i("rectWidth","RectWidth","Width"),i("rectHeight","RectHeight","Height"),i("cornerXRadius","CornerXRadius","CornerXRadius"),i("cornerYRadius","CornerYRadius","CornerYRadius"),e.prototype._mutatorKeys=["rectX","rectY","rectWidth","rectHeight","cornerRadius","cornerXRadius","cornerYRadius"].concat(s.prototype._mutatorKeys),e.intersects=function(t,e,i,n,r,s,a){var o=a.x>=t&&a.x<=t+i&&a.y>=e&&a.y<=e+n;if(!o||0>=r||0>=s)return o;var h=Math.min(i/2,n/2);r=Math.min(h,r),s=Math.min(h,s);var l,u,c=!1;if(a.x<t+i/2?(l=t+r,c=c||a.x>=l):(l=t+i-r,c=c||a.x<=l),c)return!0;if(a.y<e+n/2?(u=e+s,c=c||a.y>=u):(u=e+n-s,c=c||a.y<=u),c)return!0;var d=a.x-l,m=a.y-u;return d/=r,m/=s,d*=d,m*=m,1>=d+m},e.rect=function(t,i,n,r,s){return new e(t,i,n,r,0,0,s)},e.roundedRect=function(t,i,n,r,s,a,o){return new e(t,i,n,r,s,a,o)},e.bounds=function(t,i){return new e(t.minX,t.minY,t.width,t.height,0,0,i)},e.roundedBounds=function(t,i,n,r){return new e(t.minX,t.minY,t.width,t.height,i,n,r)},e.RectangleStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyX=!0,this.dirtyY=!0,this.dirtyWidth=!0,this.dirtyHeight=!0,this.dirtyCornerXRadius=!0,this.dirtyCornerYRadius=!0,this.initializePaintableState(t,e),this},e.disposeState=function(){this.disposePaintableState()},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyRectangle=function(){this.dirtyX=!0,this.dirtyY=!0,this.dirtyWidth=!0,this.dirtyHeight=!0,this.dirtyCornerXRadius=!0,this.dirtyCornerYRadius=!0,this.markPaintDirty()},e.markDirtyX=function(){this.dirtyX=!0,this.markPaintDirty()},e.markDirtyY=function(){this.dirtyY=!0,this.markPaintDirty()},e.markDirtyWidth=function(){this.dirtyWidth=!0,this.markPaintDirty()},e.markDirtyHeight=function(){this.dirtyHeight=!0,this.markPaintDirty()},e.markDirtyCornerXRadius=function(){this.dirtyCornerXRadius=!0,this.markPaintDirty()},e.markDirtyCornerYRadius=function(){this.dirtyCornerYRadius=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyX=!1,this.dirtyY=!1,this.dirtyWidth=!1,this.dirtyHeight=!1,this.dirtyCornerXRadius=!1,this.dirtyCornerYRadius=!1},c.PaintableStatefulDrawable.mixin(t)}};var S=e.RectangleDOMDrawable=n(d,function(t,e){this.initialize(t,e)},{initialize:function(t,e){if(this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),!this.fillElement||!this.strokeElement){var i=this.fillElement=document.createElement("div");i.style.display="block",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.pointerEvents="none";var n=this.strokeElement=document.createElement("div");n.style.display="block",n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.pointerEvents="none",i.appendChild(n)}return this.domElement=this.fillElement,r.Util.prepareForTransform(this.domElement,this.forceAcceleration),this},updateDOM:function(){var t=this.node,e=this.fillElement,i=this.strokeElement;if(this.paintDirty){var n=Math.min(t._cornerXRadius,t._cornerYRadius),s=this.dirtyCornerXRadius||this.dirtyCornerYRadius;if(this.dirtyWidth&&(e.style.width=t._rectWidth+"px"),this.dirtyHeight&&(e.style.height=t._rectHeight+"px"),s&&(e.style[u.borderRadius]=n+"px"),this.dirtyFill&&(e.style.backgroundColor=t.getCSSFill()),this.dirtyStroke&&(t.hasStroke()?i.style.borderStyle="solid":i.style.borderStyle="none"),t.hasStroke()){var a=null===this.lastStroke;(a||this.dirtyWidth||this.dirtyLineWidth)&&(i.style.width=t._rectWidth-t.getLineWidth()+"px"),(a||this.dirtyHeight||this.dirtyLineWidth)&&(i.style.height=t._rectHeight-t.getLineWidth()+"px"),(a||this.dirtyLineWidth)&&(i.style.left=-t.getLineWidth()/2+"px",i.style.top=-t.getLineWidth()/2+"px",i.style.borderWidth=t.getLineWidth()+"px"),(a||this.dirtyStroke)&&(i.style.borderColor=t.getSimpleCSSStroke()),(a||s||this.dirtyLineWidth||this.dirtyLineOptions)&&(i.style[u.borderRadius]=t.isRounded()||"round"===t.getLineJoin()?n+t.getLineWidth()/2+"px":"0")}}if(this.transformDirty||this.dirtyX||this.dirtyY){E.set(this.getTransformMatrix());var o=l.translation(t._rectX,t._rectY);E.multiplyMatrix(o),o.freeToPool(),r.Util.applyPreparedTransform(E,this.fillElement,this.forceAcceleration)}this.setToClean()},setToClean:function(){this.setToCleanState(),this.cleanPaintableState(),this.transformDirty=!1},dispose:function(){this.disposeState(),b||(this.fillElement=null,this.strokeElement=null,this.domElement=null),d.prototype.dispose.call(this)}});return e.RectangleStatefulDrawable.mixin(S),p.Poolable.mixin(S),e.RectangleSVGDrawable=function(t,e){this.initialize(t,e)},n(m,e.RectangleSVGDrawable,{initialize:function(t,e){return this.initializeSVGSelfDrawable(t,e,!0,v),this.lastArcW=-1,this.lastArcH=-1,this.svgElement||(this.svgElement=document.createElementNS(r.svgns,"rect")),this},updateSVGSelf:function(){var t=this.svgElement;if(this.dirtyX&&t.setAttribute("x",this.node._rectX),this.dirtyY&&t.setAttribute("y",this.node._rectY),this.dirtyWidth&&t.setAttribute("width",this.node._rectWidth),this.dirtyHeight&&t.setAttribute("height",this.node._rectHeight),this.dirtyCornerXRadius||this.dirtyCornerYRadius||this.dirtyWidth||this.dirtyHeight){var e=0,i=0;if(this.node.isRounded()){var n=this.node.getMaximumArcSize();e=Math.min(this.node._cornerXRadius,n),i=Math.min(this.node._cornerYRadius,n)}e!==this.lastArcW&&(this.lastArcW=e,t.setAttribute("rx",e)),i!==this.lastArcH&&(this.lastArcH=i,t.setAttribute("ry",i))}this.updateFillStrokeStyle(t)}}),e.RectangleStatefulDrawable.mixin(e.RectangleSVGDrawable),p.Poolable.mixin(e.RectangleSVGDrawable),e.RectangleCanvasDrawable=function(t,e){this.initialize(t,e)},n(f,e.RectangleCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e),this},paintCanvas:function(t,e){var i=t.context;if(e.isRounded()){i.beginPath();var n=e.getMaximumArcSize(),r=Math.min(e._cornerXRadius,n),s=Math.min(e._cornerYRadius,n),a=e._rectX+r,o=e._rectX+e._rectWidth-r,h=e._rectY+s,l=e._rectY+e._rectHeight-s;r===s?(i.arc(o,h,r,-Math.PI/2,0,!1),i.arc(o,l,r,0,Math.PI/2,!1),i.arc(a,l,r,Math.PI/2,Math.PI,!1),i.arc(a,h,r,Math.PI,3*Math.PI/2,!1)):(i.ellipse(o,h,r,s,0,-Math.PI/2,0,!1),i.ellipse(o,l,r,s,0,0,Math.PI/2,!1),i.ellipse(a,l,r,s,0,Math.PI/2,Math.PI,!1),i.ellipse(a,h,r,s,0,Math.PI,3*Math.PI/2,!1)),i.closePath(),e.hasFill()&&(e.beforeCanvasFill(t),i.fill(),e.afterCanvasFill(t)),e.hasStroke()&&(e.beforeCanvasStroke(t),i.stroke(),e.afterCanvasStroke(t))}else e.hasFill()&&(e.beforeCanvasFill(t),i.fillRect(e._rectX,e._rectY,e._rectWidth,e._rectHeight),e.afterCanvasFill(t)),e.hasStroke()&&(e.beforeCanvasStroke(t),i.strokeRect(e._rectX,e._rectY,e._rectWidth,e._rectHeight),e.afterCanvasStroke(t))},markDirtyRectangle:function(){this.markPaintDirty()},markDirtyX:function(){this.markDirtyRectangle()},markDirtyY:function(){this.markDirtyRectangle()},markDirtyWidth:function(){this.markDirtyRectangle()},markDirtyHeight:function(){this.markDirtyRectangle()},markDirtyCornerXRadius:function(){this.markDirtyRectangle()},markDirtyCornerYRadius:function(){this.markDirtyRectangle()},dispose:function(){f.prototype.dispose.call(this),this.disposePaintableStateless()}}),c.PaintableStatelessDrawable.mixin(e.RectangleCanvasDrawable),p.Poolable.mixin(e.RectangleCanvasDrawable),e}),i("JOIST/HighlightNode",["require","SCENERY/util/Color","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY/util/LinearGradient","SCENERY/nodes/Rectangle","JOIST/joist"],function(t){"use strict";function e(t,e,r){r=_.extend({fill:"white",highlightWidth:1,pickable:!1},r);var o=r.fill,h=i.toColor(o).withAlpha(0),l={fill:new s(0,0,0,e).addColorStop(0,h).addColorStop(.5,o).addColorStop(1,h)},u=new a(0,0,r.highlightWidth,e,l),c=new a(0,0,r.highlightWidth,e,l);r.children=[u,c],r.spacing=t,n.call(this,r)}var i=t("SCENERY/util/Color"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("SCENERY/util/LinearGradient"),a=t("SCENERY/nodes/Rectangle"),o=t("JOIST/joist");return o.register("HighlightNode",e),r(n,e)}),i("SCENERY/util/TrailPointer",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.trail=t,this.setBefore(e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return n.register("TrailPointer",e),i(Object,e,{copy:function(){return new e(this.trail.copy(),this.isBefore)},setBefore:function(t){this.isBefore=t,this.isAfter=!t},getRenderSwappedPointer:function(){var t=this.isBefore?this.trail.previous():this.trail.next();return null===t?null:new e(t,!this.isBefore)},getRenderBeforePointer:function(){return this.isBefore?this:this.getRenderSwappedPointer()},getRenderAfterPointer:function(){return this.isAfter?this:this.getRenderSwappedPointer()},compareRender:function(t){var e=this.getRenderBeforePointer(),i=t.getRenderBeforePointer();return null!==e&&null!==i?e.trail.compare(i.trail):e===i?0:null===e?1:-1},compareNested:function(t){var e=this.trail.compare(t.trail);return 0===e?this.isBefore===t.isBefore?0:this.isBefore?-1:1:this.trail.isExtensionOf(t.trail)?t.isBefore?1:-1:t.trail.isExtensionOf(this.trail)?this.isBefore?-1:1:e},equalsRender:function(t){return 0===this.compareRender(t)},equalsNested:function(t){return 0===this.compareNested(t)},hasTrail:function(){return!!this.trail},nestedForwards:function(){if(this.isBefore)this.trail.lastNode()._children.length>0?this.trail.addDescendant(this.trail.lastNode()._children[0],0):this.setBefore(!1);else{if(0===this.trail.indices.length)return this.trail=null,null;var t=this.trail.indices[this.trail.indices.length-1];this.trail.removeDescendant(),this.trail.lastNode()._children.length>t+1&&(this.trail.addDescendant(this.trail.lastNode()._children[t+1],t+1),this.setBefore(!0))}return this},nestedBackwards:function(){if(this.isBefore){if(0===this.trail.indices.length)return this.trail=null,null;var t=this.trail.indices[this.trail.indices.length-1];this.trail.removeDescendant(),t-1>=0&&(this.trail.addDescendant(this.trail.lastNode()._children[t-1],t-1),this.setBefore(!1))}else if(this.trail.lastNode()._children.length>0){var e=this.trail.lastNode()._children;this.trail.addDescendant(e[e.length-1],e.length-1)}else this.setBefore(!0);return this},eachNodeBetween:function(t,e){this.eachTrailBetween(t,function(t){return e(t.lastNode())})},eachTrailBetween:function(t,e){this.isBefore&&e(this.trail),this.depthFirstUntil(t,function(t){return t.isBefore?e(t.trail):void 0},!0)},depthFirstUntil:function(t,e,i){this.trail.reindex(),t.trail.reindex();var n=this.copy();n.trail.setMutable();for(var r=!0;!n.equalsNested(t);){var s=!1;if(r?(i||(s=e(n)),r=!1):s=e(n),s&&n.isBefore){if(n.setBefore(!1),1===n.compareNested(t))break}else n.nestedForwards()}i||e(n)},toString:function(){return"["+(this.isBefore?"before":"after")+" "+this.trail.toString().slice(1)}}),e.compareNested=function(t,e,i,n){var r=t.compare(i);return 0===r?e===n?0:e?-1:1:t.isExtensionOf(i)?n?1:-1:i.isExtensionOf(t)?e?-1:1:r},e}),i("SCENERY/util/Trail",["require","PHET_CORE/inherit","DOT/Matrix3","DOT/Transform3","SCENERY/scenery","SCENERY/util/TrailPointer","SCENERY/nodes/Node"],function(t){"use strict";function e(t){if(t instanceof e){var i=t;return this.nodes=i.nodes.slice(0),this.length=i.length,this.uniqueId=i.uniqueId,void(this.indices=i.indices.slice(0))}this.nodes=[],this.length=0,this.uniqueId="",this.indices=[];var n=this;if(t)if(t instanceof s.Node){var r=t;n.addDescendant(r)}else for(var a=t.length,o=0;a>o;o++)n.addDescendant(t[o])}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("DOT/Transform3"),s=t("SCENERY/scenery");return t("SCENERY/util/TrailPointer"),t("SCENERY/nodes/Node"),s.register("Trail",e),i(Object,e,{copy:function(){return new e(this)},isPainted:function(){return this.lastNode().isPainted()},isValid:function(){this.reindex();for(var t=this.indices.length,e=0;t>e;e++)if(this.indices[e]<0)return!1;return!0},isVisible:function(){for(var t=this.nodes.length;t--;)if(!this.nodes[t].isVisible())return!1;return!0},isFocusable:function(){return this.isVisible()&&this.lastNode().focusable===!0},getOpacity:function(){for(var t=1,e=this.nodes.length;e--;)t*=this.nodes[e].getOpacity();return t},isPickable:function(){return _.some(this.nodes,function(t){return t.pickable===!1||t.visible===!1})?!1:_.some(this.nodes,function(t){return t.hasInputListenerEquivalent()})?!0:this.lastNode()._subtreePickableCount>0?!0:!1},get:function(t){return t>=0?this.nodes[t]:this.nodes[this.nodes.length+t]},slice:function(t,i){return new e(this.nodes.slice(t,i))},subtrailTo:function(t,e){return this.slice(0,_.indexOf(this.nodes,t)+(e?0:1))},isEmpty:function(){return 0===this.nodes.length},getMatrix:function(){for(var t=n.identity(),e=this.nodes,i=e.length,r=0;i>r;r++)t.multiplyMatrix(e[r].getMatrix());return t},getAncestorMatrix:function(){for(var t=n.identity(),e=this.nodes,i=e.length,r=1;i>r;r++)t.multiplyMatrix(e[r].getMatrix());return t},getParentMatrix:function(){for(var t=n.identity(),e=this.nodes,i=e.length,r=0;i-1>r;r++)t.multiplyMatrix(e[r].getMatrix());return t},getTransform:function(){return new r(this.getMatrix())},getParentTransform:function(){return new r(this.getParentMatrix())},addAncestor:function(t,e){if(this.nodes.length){var i=this.nodes[0];this.indices.unshift(void 0===e?_.indexOf(t._children,i):e)}return this.nodes.unshift(t),this.length++,this.uniqueId=this.uniqueId?t.id+"-"+this.uniqueId:t.id+"",this},removeAncestor:function(){return this.nodes.shift(),this.indices.length&&this.indices.shift(),this.length--,this.updateUniqueId(),this},addDescendant:function(t,e){if(this.nodes.length){var i=this.lastNode();this.indices.push(void 0===e?_.indexOf(i._children,t):e)}return this.nodes.push(t),this.length++,this.uniqueId=this.uniqueId?this.uniqueId+"-"+t.id:t.id+"",this},removeDescendant:function(){return this.nodes.pop(),this.indices.length&&this.indices.pop(),this.length--,this.updateUniqueId(),this},addDescendantTrail:function(t){var e=t.length;e&&this.addDescendant(t.nodes[0]);for(var i=1;e>i;i++)this.addDescendant(t.nodes[i],this.indices[i-1])},removeDescendantTrail:function(t){for(var e=t.length,i=e-1;i>=0;i--)this.removeDescendant()},reindex:function(){for(var t=this.length,e=1;t>e;e++){var i=this.indices[e-1],n=this.nodes[e-1];n._children[i]!==this.nodes[e]&&(this.indices[e-1]=_.indexOf(n._children,this.nodes[e]))}},setImmutable:function(){return this},setMutable:function(){return this},areIndicesValid:function(){for(var t=1;t<this.length;t++){var e=this.indices[t-1];if(this.nodes[t-1]._children[e]!==this.nodes[t])return!1}return!0},equals:function(t){if(this.length!==t.length)return!1;for(var e=0;e<this.nodes.length;e++)if(this.nodes[e]!==t.nodes[e])return!1;return!0},upToNode:function(t){_.indexOf(this.nodes,t);return this.slice(0,_.indexOf(this.nodes,t)+1)},isExtensionOf:function(t,e){if(this.length<=t.length-(e?1:0))return!1;for(var i=0;i<t.nodes.length;i++)if(this.nodes[i]!==t.nodes[i])return!1;return!0},getTransformTo:function(t){return new r(this.getMatrixTo(t))},getMatrixTo:function(t){this.reindex(),t.reindex();var e,i=this.getBranchIndexTo(t),r=n.IDENTITY;for(e=this.length-1;e>=i;e--)r=this.nodes[e].getMatrix().timesMatrix(r);for(e=i;e<t.length;e++)r=t.nodes[e].getTransform().getInverse().timesMatrix(r);return r},getBranchIndexTo:function(t){
var e;for(e=0;e<Math.min(this.length,t.length)&&this.nodes[e]===t.nodes[e];e++);return e},nodeFromTop:function(t){return this.nodes[this.length-1-t]},lastNode:function(){return this.nodeFromTop(0)},rootNode:function(){return this.nodes[0]},previous:function(){if(this.nodes.length<=1)return null;var t=this.nodeFromTop(0),i=this.nodeFromTop(1),n=_.indexOf(i._children,t),r=this.nodes.slice(0,this.nodes.length-1);if(0===n)return new e(r);for(r.push(i._children[n-1]);0!==r[r.length-1]._children.length;){var s=r[r.length-1];r.push(s._children[s._children.length-1])}return new e(r)},previousPainted:function(){for(var t=this.previous();t&&!t.isPainted();)t=t.previous();return t},next:function(){var t=this.nodes.slice(0),i=this.nodeFromTop(0);if(i._children.length>0)return t.push(i._children[0]),new e(t);for(var n=this.nodes.length-1;n>0;){var r=this.nodes[n],s=this.nodes[n-1];t.pop();var a=_.indexOf(s._children,r);if(a!==s._children.length-1)return t.push(s._children[a+1]),new e(t);n--}return null},nextPainted:function(){for(var t=this.next();t&&!t.isPainted();)t=t.next();return t},eachTrailUnder:function(t){new s.TrailPointer(this,!0).eachTrailBetween(new s.TrailPointer(this,!1),t)},compare:function(t){for(var e=Math.min(this.indices.length,t.indices.length),i=0;e>i;i++)if(this.indices[i]!==t.indices[i])return this.indices[i]<t.indices[i]?-1:1;return this.nodes.length<t.nodes.length?-1:this.nodes.length>t.nodes.length?1:0},isBefore:function(t){return-1===this.compare(t)},isAfter:function(t){return 1===this.compare(t)},localToGlobalPoint:function(t){return this.getMatrix().timesVector2(t)},localToGlobalBounds:function(t){return t.transformed(this.getMatrix())},globalToLocalPoint:function(t){return this.getTransform().inversePosition2(t)},globalToLocalBounds:function(t){return this.getTransform().inverseBounds2(t)},parentToGlobalPoint:function(t){return this.getParentMatrix().timesVector2(t)},parentToGlobalBounds:function(t){return t.transformed(this.getParentMatrix())},globalToParentPoint:function(t){return this.getParentTransform().inversePosition2(t)},globalToParentBounds:function(t){return this.getParentTransform().inverseBounds2(t)},updateUniqueId:function(){var t="",e=this.nodes.length;e>0&&(t+=this.nodes[0]._id);for(var i=1;e>i;i++)t+="-"+this.nodes[i]._id;this.uniqueId=t},getUniqueId:function(){return this.uniqueId},toString:function(){return this.reindex(),this.length?"[Trail "+this.indices.join(".")+" "+this.getUniqueId()+"]":"Empty Trail"},toPathString:function(){var t=_.filter(this.nodes,function(t){return"Node"!==t.constructor.name});return _.map(t,function(t){return t.constructor.name}).join("/")}}),e.eachPaintedTrailBetween=function(t,i,n,r,s){e.eachTrailBetween(t,i,function(t){return t&&t.isPainted()?n(t):void 0},r,s)},e.eachTrailBetween=function(t,e,i,n,r){var a=t?new s.TrailPointer(t.copy(),!0):new s.TrailPointer(new s.Trail(r),!0),o=e?new s.TrailPointer(e.copy(),!0):new s.TrailPointer(new s.Trail(r),!1);n&&(a.nestedForwards(),o.nestedBackwards(),1===a.compareNested(o))||a.depthFirstUntil(o,function(t){return t.isBefore?i(t.trail):void 0},!1)},e.branchIndex=function(t,e){var i,n=Math.min(t.length,e.length);for(i=0;n>i&&t.nodes[i]===e.nodes[i];i++);return i},e.sharedTrail=function(t,i){return t.slice(0,e.branchIndex(t,i))},e.appendAncestorTrailsWithPredicate=function(t,i,n){var r=i.rootNode();n(r)&&t.push(i.copy());for(var s=r._parents.length,a=0;s>a;a++){var o=r._parents[a];i.addAncestor(o),e.appendAncestorTrailsWithPredicate(t,i,n),i.removeAncestor()}},e.appendDescendantTrailsWithPredicate=function(t,i,n){var r=i.lastNode();n(r)&&t.push(i.copy());for(var s=r._children.length,a=0;s>a;a++){var o=r._children[a];i.addDescendant(o,a),e.appendDescendantTrailsWithPredicate(t,i,n),i.removeDescendant()}},e.spannedSubtrees=function(t,e){},e}),i("SCENERY/input/Pointer",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(){this.listeners=[]}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return n.register("Pointer",e),i(Object,e,{firesGenericEvent:!0,addInputListener:function(t){this.listeners.push(t)},removeInputListener:function(t){var e=_.indexOf(this.listeners,t);this.listeners.splice(e,1)},hasPointChanged:function(t){return!(this.point===t||t&&this.point&&this.point.equals(t))}}),e}),i("SCENERY/input/Mouse",["require","PHET_CORE/inherit","SCENERY/scenery","DOT/Vector3","SCENERY/input/Pointer"],function(t){"use strict";function e(){s.call(this),this.point=null,this.leftDown=!1,this.middleDown=!1,this.rightDown=!1,this.isMouse=!0,this.trail=null,this.isDown=!1,this.wheelDelta=new r,this.wheelDeltaMode=0,this._cursor=null,this.type="mouse"}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("DOT/Vector3"),s=t("SCENERY/input/Pointer");return n.register("Mouse",e),i(s,e,{set cursor(t){return this.setCursor(t)},get cursor(){return this._cursor},setCursor:function(t){return this._cursor=t,this},clearCursor:function(){this.setCursor(null)},down:function(t,e){var i=this.hasPointChanged(t);switch(t&&!1&&(!1).InputEvent&&(!1).InputEvent("mouse down at "+t.toString()),this.point=t,this.isDown=!0,e.button){case 0:this.leftDown=!0;break;case 1:this.middleDown=!0;break;case 2:this.rightDown=!0}return i},up:function(t,e){var i=this.hasPointChanged(t);switch(t&&!1&&(!1).InputEvent&&(!1).InputEvent("mouse up at "+t.toString()),this.point=t,this.isDown=!1,e.button){case 0:this.leftDown=!1;break;case 1:this.middleDown=!1;break;case 2:this.rightDown=!1}return i},move:function(t,e){var i=this.hasPointChanged(t);return t&&!1&&(!1).InputEvent&&(!1).InputEvent("mouse move at "+t.toString()),this.point=t,i},over:function(t,e){var i=this.hasPointChanged(t);return t&&!1&&(!1).InputEvent&&(!1).InputEvent("mouse over at "+t.toString()),this.point=t,i},out:function(t,e){var i=this.hasPointChanged(t);return t&&!1&&(!1).InputEvent&&(!1).InputEvent("mouse out at "+t.toString()),this.point=null,i},wheel:function(t){this.wheelDelta.setXYZ(t.deltaX,t.deltaY,t.deltaZ),this.wheelDeltaMode=t.deltaMode},toString:function(){return"Mouse"}}),e}),i("SCENERY/input/Touch",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/input/Pointer"],function(t){"use strict";function e(t,e,i){r.call(this),this.id=t,this.point=e,this.isTouch=!0,this.trail=null,this.isDown=!0,this.type="touch"}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/input/Pointer");return n.register("Touch",e),i(r,e,{move:function(t,e){var i=this.hasPointChanged(t);return this.point=t,i},end:function(t,e){var i=this.hasPointChanged(t);return this.point=t,this.isDown=!1,i},cancel:function(t,e){var i=this.hasPointChanged(t);return this.point=t,this.isDown=!1,i},toString:function(){return"Touch#"+this.id}}),e}),i("SCENERY/input/Pen",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/input/Pointer"],function(t){"use strict";function e(t,e,i){r.call(this),this.id=t,this.point=e,this.isPen=!0,this.trail=null,this.isDown=!0,this.type="pen"}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/input/Pointer");return n.register("Pen",e),i(r,e,{move:function(t,e){var i=this.hasPointChanged(t);return this.point=t,i},end:function(t,e){var i=this.hasPointChanged(t);return this.point=t,this.isDown=!1,i},cancel:function(t,e){var i=this.hasPointChanged(t);return this.point=t,this.isDown=!1,i},toString:function(){return"Pen#"+this.id}}),e}),i("SCENERY/input/Event",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(t){this.handled=!1,this.aborted=!1,this.trail=t.trail,this.type=t.type,this.pointer=t.pointer,this.domEvent=t.domEvent,this.currentTarget=t.currentTarget,this.target=t.target}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return n.register("Event",e),i(Object,e,{handle:function(){this.handled=!0},abort:function(){this.handled=!0,this.aborted=!0}}),e}),i("SCENERY/input/Key",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/input/Pointer"],function(t){"use strict";function e(t){r.call(this),this.event=t,this.isKey=!0,this.trail=null,this.type="key"}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/input/Pointer");return n.register("Key",e),i(r,e,{firesGenericEvent:!1})}),i("SCENERY/input/BatchedDOMEvent",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery"],function(t){"use strict";function e(t,e,i){this.domEvent=t,this.type=e,this.callback=i}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/scenery");return r.register("BatchedDOMEvent",e),e.POINTER_TYPE=1,e.MS_POINTER_TYPE=2,e.TOUCH_TYPE=3,e.MOUSE_TYPE=4,e.KEY_TYPE=5,e.WHEEL_TYPE=6,i(Object,e,{run:function(t){var i=this.domEvent,n=this.callback;if(t.validatePointers(),t.logEvents&&t.emitter.emit1("validatePointers();"),this.type===e.POINTER_TYPE)n.call(t,i.pointerId,i.pointerType,t.pointFromEvent(i),i);else if(this.type===e.MS_POINTER_TYPE)n.call(t,i.pointerId,r.Input.msPointerType(i),t.pointFromEvent(i),i);else if(this.type===e.TOUCH_TYPE)for(var s=0;s<i.changedTouches.length;s++){var a=i.changedTouches.item(s);n.call(t,a.identifier,t.pointFromEvent(a),i)}else if(this.type===e.MOUSE_TYPE)n.call(t,t.pointFromEvent(i),i);else if(this.type===e.KEY_TYPE)n.call(t,i);else{if(this.type!==e.WHEEL_TYPE)throw new Error("bad type value: "+this.type);n.call(t,i)}},dispose:function(){this.domEvent=null,this.callback=null,this.freeToPool()}}),e.fromPointerEvent=function(t,i){return e.createFromPool(t,i(t),t.pointerId)},n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r){if(t.length){var s=t.pop();return e.call(s,i,n,r),s}return new e(i,n,r)}}}),e}),i("SCENERY/input/Input",["require","PHET_CORE/inherit","PHET_CORE/platform","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/util/Trail","SCENERY/input/Mouse","SCENERY/input/Touch","SCENERY/input/Pen","SCENERY/input/Event","SCENERY/input/Key","SCENERY/input/BatchedDOMEvent","AXON/Property","AXON/Emitter"],function(t){"use strict";function e(t,e,i,n,r){this.display=t,this.rootNode=t.rootNode,this.listenerTarget=e,this.batchDOMEvents=i,this.enablePointerEvents=n,this.pointFromEvent=r,this.displayUpdateOnEvent=!1,c=t,this.batchedEvents=[],this.mouse=null,this.pointers=[],this.emitter=new h,this.pointerAddedListeners=[];var s=this;this.onpointerdown=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerDown,!1)},this.onpointerup=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerUp,!0)},this.onpointermove=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerMove,!1)},this.onpointerover=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerOver,!1)},this.onpointerout=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerOut,!1)},this.onpointercancel=function(t){s.batchEvent(t,a.POINTER_TYPE,s.pointerCancel,!1)},this.onMSPointerDown=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerDown,!1)},this.onMSPointerUp=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerUp,!0)},this.onMSPointerMove=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerMove,!1)},this.onMSPointerOver=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerOver,!1)},this.onMSPointerOut=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerOut,!1)},this.onMSPointerCancel=function(t){s.batchEvent(t,a.MS_POINTER_TYPE,s.pointerCancel,!1)},this.ontouchstart=function(t){s.batchEvent(t,a.TOUCH_TYPE,s.touchStart,!1)},this.ontouchend=function(t){s.batchEvent(t,a.TOUCH_TYPE,s.touchEnd,!0)},this.ontouchmove=function(t){s.batchEvent(t,a.TOUCH_TYPE,s.touchMove,!1)},this.ontouchcancel=function(t){s.batchEvent(t,a.TOUCH_TYPE,s.touchCancel,!1)},this.onmousedown=function(t){s.batchEvent(t,a.MOUSE_TYPE,s.mouseDown,!1)},this.onmouseup=function(t){s.batchEvent(t,a.MOUSE_TYPE,s.mouseUp,!0)},this.onmousemove=function(t){s.batchEvent(t,a.MOUSE_TYPE,s.mouseMove,!1)},this.onmouseover=function(t){s.batchEvent(t,a.MOUSE_TYPE,s.mouseOver,!1)},this.onmouseout=function(t){s.batchEvent(t,a.MOUSE_TYPE,s.mouseOut,!1)},this.onkeydown=function(t){s.batchEvent(t,a.KEY_TYPE,s.keyDown,!1)},this.onkeyup=function(t){s.batchEvent(t,a.KEY_TYPE,s.keyUp,!1)},this.onwheel=function(t){s.batchEvent(t,a.WHEEL_TYPE,s.wheel,!1)},this.uselessListener=function(t){}}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/platform"),r=t("PHET_CORE/cleanArray"),s=t("SCENERY/scenery");t("SCENERY/util/Trail"),t("SCENERY/input/Mouse"),t("SCENERY/input/Touch"),t("SCENERY/input/Pen"),t("SCENERY/input/Event"),t("SCENERY/input/Key");var a=t("SCENERY/input/BatchedDOMEvent"),o=t("AXON/Property"),h=t("AXON/Emitter"),l={button:!0,keyCode:!0,deltaX:!0,deltaY:!0,deltaZ:!0,deltaMode:!0,pointerId:!0,pointerType:!0,charCode:!0,which:!0,clientX:!0,clientY:!0,changedTouches:!0},u=function(t,e){for(var i=0;i<t.length;i++){var n=t[i];if(n.equals(e))return i}return-1},c=null;return s.register("Input",e),i(Object,e,{batchEvent:function(t,e,i,r){this.display.interactive&&(this.batchedEvents.push(a.createFromPool(t,e,i)),(r||!this.batchDOMEvents)&&this.fireBatchedEvents(),this.displayUpdateOnEvent);var s=e===a.KEY_TYPE;s||(i!==this.mouseDown||n.ie||n.edge)&&t.preventDefault()},fireBatchedEvents:function(){if(this.batchedEvents.length){for(var t=this.batchedEvents.length,e=0;t>e;e++){var i=this.batchedEvents[e];i.run(this),i.dispose()}r(this.batchedEvents)}},clearBatchedEvents:function(){this.batchedEvents.length=0},pointerListenerTypes:["pointerdown","pointerup","pointermove","pointerover","pointerout","pointercancel"],msPointerListenerTypes:["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerCancel"],touchListenerTypes:["touchstart","touchend","touchmove","touchcancel"],mouseListenerTypes:["mousedown","mouseup","mousemove","mouseover","mouseout"],keyListenerTypes:["keydown","keyup"],wheelListenerTypes:["wheel"],canUsePointerEvents:function(){return window.navigator&&window.navigator.pointerEnabled&&this.enablePointerEvents},canUseMSPointerEvents:function(){return window.navigator&&window.navigator.msPointerEnabled&&this.enablePointerEvents},getUsedEventTypes:function(){var t;return t=this.canUsePointerEvents()?this.pointerListenerTypes:this.canUseMSPointerEvents()?this.msPointerListenerTypes:this.touchListenerTypes.concat(this.mouseListenerTypes),t=t.concat(this.keyListenerTypes),t=t.concat(this.wheelListenerTypes)},connectListeners:function(){this.processListeners(!0)},disconnectListeners:function(){this.processListeners(!1)},processListeners:function(t){for(var e=this.getUsedEventTypes(),i=0;i<e.length;i++){var n=e[i];this.listenerTarget===window&&(t?document.addEventListener(n,this.uselessListener):document.removeEventListener(n,this.uselessListener));var r=this["on"+n];t?this.listenerTarget.addEventListener(n,r,!1):this.listenerTarget.removeEventListener(n,r,!1)}},addPointer:function(t){if(this.pointers.push(t),this.pointerAddedListeners.length)for(var e=0;e<this.pointerAddedListeners.length;e++)this.pointerAddedListeners[e](t)},addPointerAddedListener:function(t){this.pointerAddedListeners.push(t)},removePointerAddedListener:function(t){var e=this.pointerAddedListeners.indexOf(t);-1!==e&&this.pointerAddedListeners.splice(e,e+1)},removePointer:function(t){for(var e=this.pointers.length-1;e>=0;e--)this.pointers[e]===t&&this.pointers.splice(e,1)},findTouchById:function(t){for(var e=this.pointers.length;e--;){var i=this.pointers[e];if(i.id===t)return i}},findKeyByEvent:function(t){var e=_.find(this.pointers,function(e){return e.event&&e.event.keyCode===t.keyCode&&e.event.charCode===t.charCode});return e},initMouse:function(){this.mouse=new s.Mouse,this.addPointer(this.mouse)},mouseDown:function(t,i){this.emitter.hasListeners()&&this.emitter.emit1("mouseDown("+e.serializeVector2(t)+","+e.serializeDomEvent(i)+");"),this.mouse||this.initMouse();var n=this.mouse.down(t,i);n&&this.moveEvent(this.mouse,i),this.downEvent(this.mouse,i)},mouseUp:function(t,i){this.emitter.hasListeners()&&this.emitter.emit1("mouseUp("+e.serializeVector2(t)+","+e.serializeDomEvent(i)+");"),this.mouse||this.initMouse();var n=this.mouse.up(t,i);n&&this.moveEvent(this.mouse,i),this.upEvent(this.mouse,i)},mouseMove:function(t,i){this.emitter.hasListeners()&&this.emitter.emit1("mouseMove("+e.serializeVector2(t)+","+e.serializeDomEvent(i)+");"),this.mouse||this.initMouse(),this.mouse.move(t,i),this.moveEvent(this.mouse,i)},mouseOver:function(t,i){this.emitter.hasListeners()&&this.emitter.emit1("mouseOver("+e.serializeVector2(t)+","+e.serializeDomEvent(i)+");"),this.mouse||this.initMouse(),this.mouse.over(t,i)},mouseOut:function(t,i){this.emitter.hasListeners()&&this.emitter.emit1("mouseOut("+e.serializeVector2(t)+","+e.serializeDomEvent(i)+");"),this.mouse||this.initMouse(),this.mouse.out(t,i)},keyDown:function(t){return void(this.emitter.hasListeners()&&this.emitter.emit1("keyDown("+e.serializeDomEvent(t)+");"))},keyUp:function(t){return void(this.emitter.hasListeners()&&this.emitter.emit1("keyUp("+e.serializeDomEvent(t)+");"))},wheel:function(t){if(this.emitter.hasListeners()&&this.emitter.emit1("wheel("+e.serializeDomEvent(t)+");"),this.mouse||this.initMouse(),this.mouse.wheel(t),this.mouse.point){var i=this.rootNode.trailUnderPointer(this.mouse)||new s.Trail(this.rootNode);this.dispatchEvent(i,"wheel",this.mouse,t,!0)}},touchStart:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("touchStart('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=new s.Touch(t,i,n);this.addPointer(r),this.downEvent(r,n)},touchEnd:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("touchEnd('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);if(r){var s=r.end(i,n);s&&this.moveEvent(r,n),this.removePointer(r),this.upEvent(r,n)}},touchMove:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("touchMove('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);r&&(r.move(i,n),this.moveEvent(r,n))},touchCancel:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("touchCancel('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);if(r){var s=r.cancel(i,n);s&&this.moveEvent(r,n),this.removePointer(r),this.cancelEvent(r,n)}},penStart:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("penStart('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=new s.Pen(t,i,n);this.addPointer(r),this.downEvent(r,n)},penEnd:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("penEnd('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);if(r){var s=r.end(i,n);s&&this.moveEvent(r,n),this.removePointer(r),this.upEvent(r,n)}},penMove:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("penMove('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);r&&(r.move(i,n),this.moveEvent(r,n))},penCancel:function(t,i,n){this.emitter.hasListeners()&&this.emitter.emit1("penCancel('"+t+"',"+e.serializeVector2(i)+","+e.serializeDomEvent(n)+");");var r=this.findTouchById(t);if(r){var s=r.cancel(i,n);s&&this.moveEvent(r,n),this.removePointer(r),this.cancelEvent(r,n)}},pointerDown:function(t,e,i,n){switch(e){case"mouse":var r=this.listenerTarget===window||this.listenerTarget===document?document.body:this.listenerTarget;r.setPointerCapture&&n.pointerId&&r.setPointerCapture(n.pointerId),this.mouseDown(i,n);break;case"touch":this.touchStart(t,i,n);break;case"pen":this.penStart(t,i,n);break;default:console.log&&console.log("Unknown pointer type: "+e)}},pointerUp:function(t,e,i,n){switch(e){case"mouse":this.mouseUp(i,n);break;case"touch":this.touchEnd(t,i,n);break;case"pen":this.penEnd(t,i,n);break;default:console.log&&console.log("Unknown pointer type: "+e)}},pointerCancel:function(t,e,i,n){switch(e){case"mouse":console&&console.log&&console.log("WARNING: Pointer mouse cancel was received");break;case"touch":this.touchCancel(t,i,n);break;case"pen":this.penCancel(t,i,n);break;default:console.log&&console.log("Unknown pointer type: "+e)}},pointerMove:function(t,e,i,n){switch(e){case"mouse":this.mouseMove(i,n);break;case"touch":this.touchMove(t,i,n);break;case"pen":this.penMove(t,i,n);break;default:console.log&&console.log("Unknown pointer type: "+e)}},pointerOver:function(t,e,i,n){},pointerOut:function(t,e,i,n){},pointerEnter:function(t,e,i,n){},pointerLeave:function(t,e,i,n){},upEvent:function(t,e){var i=this.rootNode.trailUnderPointer(t)||new s.Trail(this.rootNode);this.dispatchEvent(i,"up",t,e,!0),t.isTouch&&this.exitEvents(t,e,i,0,!0),t.trail=i},downEvent:function(t,e){var i=this.rootNode.trailUnderPointer(t)||new s.Trail(this.rootNode);t.isTouch&&this.enterEvents(t,e,i,0,!0),this.dispatchEvent(i,"down",t,e,!0),t.trail=i},moveEvent:function(t,e){this.branchChangeEvents(t,e,!0)},cancelEvent:function(t,e){var i=this.rootNode.trailUnderPointer(t)||new s.Trail(this.rootNode);this.dispatchEvent(i,"cancel",t,e,!0),t.isTouch&&this.exitEvents(t,e,i,0,!0),t.trail=i},branchChangeEvents:function(t,e,i){var n=this.rootNode.trailUnderPointer(t)||new s.Trail(this.rootNode),r=t.trail||new s.Trail(this.rootNode),a=r.lastNode()!==n.lastNode();if(!a&&!i)return!1;var o=s.Trail.branchIndex(n,r),h=o!==n.length||o!==r.length;return h&&!1&&(!1).InputEvent&&(!1).InputEvent("branch change from "+r.toString()+" to "+n.toString()),i&&this.dispatchEvent(n,"move",t,e,!0),this.exitEvents(t,e,r,o,a),this.enterEvents(t,e,n,o,a),t.trail=n,h},enterEvents:function(t,e,i,n,r){if(i.length>n)for(var s=i.length-1;s>=n;s--)this.dispatchEvent(i.slice(0,s+1),"enter",t,e,!1);r&&this.dispatchEvent(i,"over",t,e,!0)},exitEvents:function(t,e,i,n,r){if(r&&this.dispatchEvent(i,"out",t,e,!0),i.length>n)for(var s=n;s<i.length;s++)this.dispatchEvent(i.slice(0,s+1),"exit",t,e,!1)},validatePointers:function(){for(var t=this,e=this.pointers.length;e--;){var i=this.pointers[e];if(i.point){t.branchChangeEvents(i,null,!1)}}},dispatchEvent:function(t,e,i,n,r){var a=new s.Event({trail:t,type:e,pointer:i,domEvent:n,currentTarget:null,target:t.lastNode()});this.dispatchToPointer(e,i,a),this.dispatchToTargets(t,i,e,a,r)},dispatchToPointer:function(t,e,i){if(!i.aborted&&!i.handled)for(var n=e.type+t,r=e.listeners.slice(0),s=0;s<r.length;s++){var a=r[s],o=!1;if(!o&&a[n]&&(a[n](i),o=i.aborted),e.firesGenericEvent&&!o&&a[t]&&(a[t](i),o=i.aborted),o)return}},dispatchToTargets:function(t,e,i,n,r){if(!n.aborted&&!n.handled)for(var s=e.type+i,a=t.length-1;a>=0;r?a--:a=-1){var o=t.nodes[a];n.currentTarget=o;for(var h=o.getInputListeners(),l=0;l<h.length;l++){var u=h[l],c=!1;if(!c&&u[s]&&(u[s](n),c=n.aborted),e.firesGenericEvent&&!c&&u[i]&&(u[i](n),c=n.aborted),c)return}if(n.handled)return}}},{serializeDomEvent:function d(t){var e=[];for(var i in t)if(l[i])if("touches"===i||"targetTouches"===i||"changedTouches"===i){for(var n=[],r=0;r<t[i].length;r++){var s=t[i].item(r);n.push(d(s))}e.push(i+":["+n.join(",")+"]")}else e.push(i+":"+("object"==typeof t[i]&&null!==t[i]?"{}":JSON.stringify(t[i])));return"{"+e.join(",")+"}"},serializeVector2:function(t){return"new dot.Vector2("+t.x+","+t.y+")"},debugKeyEvent:function(t){return t.timeStamp+" "+t.type},debugText:function(t,e){return t.x+","+t.y+" "+e.timeStamp+" "+e.type},msPointerType:function(t){return t.pointerType===window.MSPointerEvent.MSPOINTER_TYPE_TOUCH?"touch":t.pointerType===window.MSPointerEvent.MSPOINTER_TYPE_PEN?"pen":t.pointerType===window.MSPointerEvent.MSPOINTER_TYPE_MOUSE?"mouse":t.pointerType},focusedTrailProperty:new o(null),get focusedTrail(){return e.focusedTrailProperty.get()},set focusedTrail(t){e.focusedTrailProperty.set(t)},flattenTrails:function(t,e,i,n){for(;null!==e;)n(e)&&e.isExtensionOf(t,!0)&&i.push(e),e=e.next()},getAllFocusableTrails:function(){var t=[],i=function(t){return t.isFocusable()&&t.isVisible()};if(e.focusContexts.length)e.flattenTrails(e.focusContexts[e.focusContexts.length-1].trail,e.focusContexts[e.focusContexts.length-1].trail,t,i);else for(var n=c,r=n.rootNode,s=r.getTrails(),a=0;a<s.length;a++){var o=s[a];e.flattenTrails(o,o,t,i)}return t},getNextFocusableTrail:function(t){var i=e.getAllFocusableTrails();if(null===e.focusedTrail)return i[0];for(var n=u(i,e.focusedTrail),r=n+t;0>r;)r+=i.length;for(;r>=i.length;)r-=i.length;return i[r]},moveFocus:function(t){e.focusedTrail=e.getNextFocusableTrail(t)},focusContexts:[],pushFocusContext:function(t){e.focusContexts.push({trail:t,previousFocusedNode:e.focusedTrail}),e.focusedTrail&&(e.focusedTrail=e.getAllFocusableTrails()[0])},popFocusContext:function(t){var i=e.focusContexts.pop();e.focusedTrail&&(e.focusedTrail=i.previousFocusedNode)},pressedKeys:[],KEY_SPACE:32,KEY_ENTER:13,KEY_TAB:9,KEY_RIGHT_ARROW:39,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_DOWN_ARROW:40,KEY_SHIFT:16,KEY_ESCAPE:27})}),i("SCENERY/input/DownUpListener",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/util/Trail","SCENERY/input/Input"],function(t){"use strict";function e(t){var e=this;t=_.extend({mouseButton:0},t),this.options=t,this.isDown=!1,this.downCurrentTarget=null,this.downTrail=null,this.pointer=null,this.downListener={up:function(t){t.pointer.isMouse&&t.domEvent.button!==e.options.mouseButton||e.buttonUp(t)},cancel:function(t){e.buttonUp(t)},keyup:function(t){var i=t.domEvent.keyCode;(i===r.KEY_ENTER||i===r.KEY_SPACE)&&e.buttonUp(t)}}}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");t("SCENERY/util/Trail");var r=t("SCENERY/input/Input");return n.register("DownUpListener",e),i(Object,e,{buttonDown:function(t){this.isDown||t.pointer.isMouse&&t.domEvent.button!==this.options.mouseButton||(t.pointer.addInputListener(this.downListener),this.isDown=!0,this.downCurrentTarget=t.currentTarget,this.downTrail=t.trail.subtrailTo(t.currentTarget,!1),this.pointer=t.pointer,this.options.down&&this.options.down(t,this.downTrail))},buttonUp:function(t){this.isDown=!1,this.pointer.removeInputListener(this.downListener);var e=t.currentTarget;if(t.currentTarget=this.downCurrentTarget,this.options.upInside||this.options.upOutside){var i=t.trail,n=i.isExtensionOf(this.downTrail,!0);n&&this.options.upInside?this.options.upInside(t,this.downTrail):!n&&this.options.upOutside&&this.options.upOutside(t,this.downTrail)}this.options.up&&this.options.up(t,this.downTrail),t.currentTarget=e},down:function(t){this.buttonDown(t)},keydown:function(t){var e=t.domEvent.keyCode;(e===r.KEY_ENTER||e===r.KEY_SPACE)&&this.buttonDown(t)}}),e}),i("SUN/buttons/ButtonListener",["require","SCENERY/input/DownUpListener","SCENERY/input/Input","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(t){this.buttonModel=t;var e=this;this.overPointer=null,this.downPointer=null,i.call(this,{down:function(i,n){null===e.downPointer&&(e.downPointer=i.pointer),i.pointer===e.downPointer&&(t.down=!0)},up:function(i,n){i.pointer===e.downPointer&&(e.downPointer=null,t.down=!1)}})}var i=t("SCENERY/input/DownUpListener"),n=t("SCENERY/input/Input"),r=t("PHET_CORE/inherit"),s=t("SUN/sun");return s.register("ButtonListener",e),r(i,e,{keydown:function(t,e){(t.domEvent.keyCode===n.KEY_ENTER||t.domEvent.keyCode===n.KEY_SPACE)&&(this.enter(t,e),this.buttonModel.down=!0)},keyup:function(t,e){(t.domEvent.keyCode===n.KEY_ENTER||t.domEvent.keyCode===n.KEY_SPACE)&&(this.buttonModel.down=!1,this.exit(t,e))},enter:function(t,e){null===this.overPointer&&(this.overPointer=t.pointer,this.buttonModel.over=!0)},exit:function(t,e){t.pointer===this.overPointer&&(this.overPointer=null,this.buttonModel.over=!1)}})}),i("AXON/DerivedProperty",["require","AXON/Property","AXON/axon","PHET_CORE/inherit"],function(t){"use strict";function e(t,e){return t===e}function i(t){return!t}function n(t,e){return t&&e.value}function r(t,e){return t||e.value}function s(t,e){return t+e.value}function a(t,e){return t*e.value}function o(t,e,i){this.dependencies=t,this.dependencyValues=t.map(function(t){return t.get()});var n=e.apply(null,this.dependencyValues);h.call(this,n,i);var r=this;this.dependencyListeners=[];for(var s=0;s<t.length;s++){var a=t[s];!function(t,i){var n=function(t){r.dependencyValues[i]=t,h.prototype.set.call(r,e.apply(null,r.dependencyValues))};r.dependencyListeners.push(n),t.lazyLink(n)}(a,s)}}var h=t("AXON/Property"),l=t("AXON/axon"),u=t("PHET_CORE/inherit");return l.register("DerivedProperty",o),u(h,o,{dispose:function(){h.prototype.dispose.call(this);for(var t=0;t<this.dependencies.length;t++){var e=this.dependencies[t];e.unlink(this.dependencyListeners[t])}this.dependencies=null,this.dependencyListeners=null,this.dependencyValues=null},set:function(t){throw new Error("Cannot set values directly to a derived property, tried to set: "+t)},set value(t){throw new Error("Cannot es5-set values directly to a derived property, tried to set: "+t)},get value(){return h.prototype.get.call(this)},reset:function(){throw new Error("Cannot reset a derived property directly")}},{valueEquals:function(t,i,n){return new o([t,i],e,n)},and:function(t,e){return new o(t,_.reduce.bind(null,t,n,!0),e)},or:function(t,e){return new o(t,_.reduce.bind(null,t,r,!1),e)},sum:function(t,e){return new o(t,_.reduce.bind(null,t,s,0),e)},plus:function(t,e,i){return o.sum([t,e],i)},product:function(t,e){return new o(t,_.reduce.bind(null,t,a,1),e)},times:function(t,e,i){return o.product([t,e],i)},lessThanNumber:function(t,e,i){return new o([t],function(t){return e>t},i)},lessThanEqualNumber:function(t,e,i){return new o([t],function(t){return e>=t},i)},greaterThanNumber:function(t,e,i){return new o([t],function(t){return t>e},i)},greaterThanEqualNumber:function(t,e,i){return new o([t],function(t){return t>=e},i)},derivedNot:function(t,e){return new o([t],i,e)},mapValues:function(t,e,i){return new o([t],function(t){return e[t]},i)}})}),i("SUN/buttons/PushButtonInteractionStateProperty",["require","PHET_CORE/inherit","AXON/DerivedProperty","SUN/sun"],function(t){"use strict";function e(t,e){n.call(this,[t.overProperty,t.downProperty,t.enabledProperty],function(t,e,i){return i?t&&!e?"over":t&&e?"pressed":"idle":"disabled"},e)}var i=t("PHET_CORE/inherit"),n=t("AXON/DerivedProperty"),r=t("SUN/sun");return r.register("PushButtonInteractionStateProperty",e),i(n,e)}),i("AXON/PropertySet",["require","AXON/Property","AXON/DerivedProperty","AXON/Multilink","AXON/Events","AXON/axon","PHET_CORE/inherit"],function(t){"use strict";function e(t,e){e=_.extend({tandemSet:{}},e);var i=this;s.call(this),this.keys=[],Object.getOwnPropertyNames(t).forEach(function(n){i.addProperty(n,t[n],e.tandemSet[n])})}var i=t("AXON/Property"),n=t("AXON/DerivedProperty"),r=t("AXON/Multilink"),s=t("AXON/Events"),a=t("AXON/axon"),o=t("PHET_CORE/inherit"),h="Property";return a.register("PropertySet",e),o(s,e,{addProperty:function(t,e,n){this[t+h]=new i(e,{tandem:n}),this.addGetterAndSetter(t),this.keys.push(t)},removeProperty:function(t){var e=this.keys.indexOf(t);-1!==e&&this.keys.splice(e,1),this[t+h].dispose(),delete this[t+h],delete this[t]},addGetterAndSetter:function(t){var e=this[t+h];Object.defineProperty(this,t,{get:function(){return e.get()},set:function(t){e.set(t)},configurable:!0,enumerable:!0})},addGetter:function(t){var e=this[t+h];Object.defineProperty(this,t,{get:function(){return e.get()},configurable:!0,enumerable:!0})},reset:function(){var t=this;this.keys.forEach(function(e){t[e+h].reset()})},toDerivedProperty:function(t,e,i){return new n(this.getProperties(t),e,{tandem:i})},addDerivedProperty:function(t,e,i,n){this[t+h]=this.toDerivedProperty(e,i,n),this.addGetter(t)},getProperties:function(t){var e=this;return t.map(function(t){var i=t+h;return e[i]})},setValues:function(t){var e=this;Object.getOwnPropertyNames(t).forEach(function(i){e[i+h].set(t[i])})},getValues:function(){for(var t={},e=0;e<this.keys.length;e++){var i=this.keys[e];t[i]=this.property(i).value}return t},link:function(t,e){this[t+h].link(e)},unlink:function(t,e){this[t+h].unlink(e)},linkAttribute:function(t,e,i){return this.property(t).linkAttribute(e,i)},unlinkAttribute:function(t,e){this.property(t).unlink(e)},multilink:function(t,e){return new r(this.getProperties(t),e,!1)},lazyMultilink:function(t,e){return new r(this.getProperties(t),e,!0)},unmultilink:function(t){t.dispose();
},toString:function(){for(var t="PropertySet{",e=this,i=0;i<this.keys.length;i++){var n=this.keys[i];t=t+n+":"+e[n].toString(),i<this.keys.length-1&&(t+=",")}return t+"}"},unlinkAll:function(){var t=this;this.keys.forEach(function(e){t[e+h].unlinkAll()})},property:function(t){return this[t+h]},dispose:function(){for(var t=0;t<this.keys.length;t++)this[this.keys[t]+h].dispose()}})}),i("SUN/buttons/ButtonModel",["require","PHET_CORE/inherit","AXON/PropertySet","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({startCallback:function(){},endCallback:function(t){}},t);var e=this;n.call(this,{over:!1,down:!1,enabled:!0},t),this.property("down").lazyLink(function(i){i?t.startCallback():t.endCallback(e.over)})}var i=t("PHET_CORE/inherit"),n=t("AXON/PropertySet"),r=t("SUN/sun");return r.register("ButtonModel",e),i(n,e)}),i("PHET_CORE/Timer",["require","PHET_CORE/cleanArray","PHET_CORE/phetCore"],function(t){"use strict";var e=t("PHET_CORE/cleanArray"),i=t("PHET_CORE/phetCore"),n=[],r=[],s={step:function(t){var i,s=n.length;for(i=0;s>i;i++)r[i]=n[i];for(i=0;s>i;i++)r[i](t);e(r)},setTimeout:function(t,e){var i=0,n=this,r=function(s){i+=s,1e3*i>=e&&(t(),n.removeStepListener(r))};return this.addStepListener(r),r},clearTimeout:function(t){this.hasStepListener(t)&&this.removeStepListener(t)},setInterval:function(t,e){var i=0,r=function(s){for(i+=s;1e3*i>=e&&-1!==n.indexOf(r);)t(),i-=e/1e3};return this.addStepListener(r),r},clearInterval:function(t){this.hasStepListener(t)&&this.removeStepListener(t)},addStepListener:function(t){n.push(t)},removeStepListener:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)},hasStepListener:function(t){return n.indexOf(t)>=0}};return i.register("Timer",s),s}),i("SUN/CallbackTimer",["require","PHET_CORE/inherit","PHET_CORE/Timer","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({callback:null,delay:400,interval:100},t),this.delay=t.delay,this.interval=t.interval,this.callbacks=[],t.callback&&this.callbacks.push(t.callback),this.delayID=null,this.intervalID=null,this.fired=!1}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Timer"),r=t("SUN/sun");return r.register("CallbackTimer",e),i(Object,e,{isRunning:function(){return null!==this.delayID||null!==this.intervalID},start:function(){var t=this;t.isRunning()||(t.fired=!1,t.delayID=n.setTimeout(function(){t.delayID=null,t.intervalID=n.setInterval(function(){t.fire()},t.interval),t.fire()},t.delay))},stop:function(t){this.isRunning()&&(this.delayID&&(n.clearTimeout(this.delayID),this.delayID=null),this.intervalID&&(n.clearInterval(this.intervalID),this.intervalID=null),t&&!this.fired&&this.fire())},addCallback:function(t){-1===this.callbacks.indexOf(t)&&this.callbacks.push(t)},removeCallback:function(t){var e=this.callbacks.indexOf(t);-1!==e&&this.callbacks.splice(e,1)},fire:function(){for(var t=this.callbacks.slice(0),e=0;e<t.length;e++)t[e]();this.fired=!0},dispose:function(){this.stop(),this.callbacks.length=0}})}),i("SUN/buttons/PushButtonModel",["require","SUN/buttons/ButtonModel","SUN/CallbackTimer","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({fireOnDown:!1,listener:null,fireOnHold:!1,fireOnHoldDelay:400,fireOnHoldInterval:100},t);var e=this;i.call(this,t),this.listeners=[],null!==t.listener&&this.listeners.push(t.listener),t.fireOnHold&&(this.timer=new n({callback:this.fire.bind(this),delay:t.fireOnHoldDelay,interval:t.fireOnHoldInterval})),this.property("down").onValue(!0,function(){e.enabled&&(t.fireOnDown&&e.fire(),e.timer&&e.timer.start())}),this.property("down").onValue(!1,function(){var i=!t.fireOnDown&&e.over&&e.enabled;e.timer?e.timer.stop(i):i&&e.fire()}),this.property("enabled").link(function(t){!t&&e.timer&&e.timer.stop(!1)})}var i=t("SUN/buttons/ButtonModel"),n=t("SUN/CallbackTimer"),r=t("PHET_CORE/inherit"),s=t("SUN/sun");return s.register("PushButtonModel",e),r(i,e,{dispose:function(){i.prototype.dispose.call(this),this.listeners.length=0,this.timer&&(this.timer.dispose(),this.timer=null)},addListener:function(t){-1===this.listeners.indexOf(t)&&this.listeners.push(t)},removeListener:function(t){var e=this.listeners.indexOf(t);-1!==e&&this.listeners.splice(e,1)},fire:function(){this.trigger0("startedCallbacksForFired");var t=this.listeners.slice(0);t.forEach(function(t){t()}),this.trigger0("endedCallbacksForFired")}})}),i("JOIST/JoistButton",["require","SCENERY/nodes/Node","PHET_CORE/inherit","KITE/Shape","JOIST/HighlightNode","SUN/buttons/ButtonListener","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","AXON/Property","JOIST/joist"],function(t){"use strict";function e(t,e,n){n=_.extend({cursor:"pointer",listener:null,highlightExtensionWidth:0,highlightExtensionHeight:0,highlightCenterOffsetX:0,highlightCenterOffsetY:0,focusable:!0,tandem:null},n),this.buttonModel=new h(n);var u=function(e){return new s(t.width+n.highlightExtensionWidth,t.height+n.highlightExtensionHeight,{centerX:t.centerX+n.highlightCenterOffsetX,centerY:t.centerY+n.highlightCenterOffsetY,fill:e,pickable:!1})},c=u("white"),d=u("black");i.call(this,{children:[t,c,d]});var m=new o(this.buttonModel);this.interactionStateProperty=m,l.multilink([m,e],function(t,e){var i="black"!==e;c.visible=!i&&("over"===t||"pressed"===t),d.visible=i&&("over"===t||"pressed"===t)}),this.addInputListener(new a(this.buttonModel)),this.mouseArea=this.touchArea=r.bounds(this.bounds),this.mutate(_.omit(n,"tandem")),n.tandem&&n.tandem.addInstance(this)}var i=t("SCENERY/nodes/Node"),n=t("PHET_CORE/inherit"),r=t("KITE/Shape"),s=t("JOIST/HighlightNode"),a=t("SUN/buttons/ButtonListener"),o=t("SUN/buttons/PushButtonInteractionStateProperty"),h=t("SUN/buttons/PushButtonModel"),l=t("AXON/Property"),u=t("JOIST/joist");return u.register("JoistButton",e),n(i,e)}),i("SCENERY/display/Block",["require","PHET_CORE/inherit","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/Drawable"],function(t){"use strict";function e(t,e){throw new Error("Should never be called")}var i=t("PHET_CORE/inherit"),n=(t("PHET_CORE/cleanArray"),t("SCENERY/scenery")),r=t("SCENERY/display/Drawable");return n.register("Block",e),i(r,e,{initializeBlock:function(t,e){return this.initializeDrawable(e),this.display=t,this.drawableCount=0,this.used=!0,this.firstDrawable=null,this.lastDrawable=null,this.pendingFirstDrawable=null,this.pendingLastDrawable=null,this.previousBlock=null,this.nextBlock=null,this.zIndex=0,this},dispose:function(){this.display=null,this.firstDrawable=null,this.lastDrawable=null,this.pendingFirstDrawable=null,this.pendingLastDrawable=null,this.previousBlock=null,this.nextBlock=null,r.prototype.dispose.call(this)},addDrawable:function(t){this.drawableCount++,this.markDirtyDrawable(t)},removeDrawable:function(t){this.drawableCount--},onIntervalChange:function(t,e){},updateInterval:function(){(this.pendingFirstDrawable!==this.firstDrawable||this.pendingLastDrawable!==this.lastDrawable)&&(this.onIntervalChange(this.pendingFirstDrawable,this.pendingLastDrawable),this.firstDrawable=this.pendingFirstDrawable,this.lastDrawable=this.pendingLastDrawable)},notifyInterval:function(t,e){this.pendingFirstDrawable=t,this.pendingLastDrawable=e,this.updateInterval()},audit:function(t,e,i){}}),e}),i("SCENERY/display/FittedBlock",["require","PHET_CORE/inherit","DOT/Bounds2","DOT/Vector2","SCENERY/scenery","SCENERY/display/Block"],function(t){"use strict";function e(t,e,i){this.initialize(t,e,i)}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("DOT/Vector2"),s=t("SCENERY/scenery"),a=t("SCENERY/display/Block"),o=n.NOTHING.copy();return s.register("FittedBlock",e),i(a,e,{initializeFittedBlock:function(t,e,i,s){return this.initializeBlock(t,e),this.transformRootInstance=i,this.canBeFullDisplay=i.isDisplayRoot,this.preferredFit=s,this.fit=s,this.dirtyFit=!0,this.dirtyFitListener=this.dirtyFitListener||this.markDirtyFit.bind(this),this.commonFitInstance=null,this.fitBounds=n.NOTHING.copy(),this.oldFitBounds=n.NOTHING.copy(),this.fitOffset=new r,this.unfittableDrawableCount=0,this.fittableListener=this.onFittabilityChange.bind(this),this.forceAcceleration=!1,this.display.onStatic("displaySize",this.dirtyFitListener),this},setFit:function(t){this.canBeFullDisplay||t!==e.FULL_DISPLAY||(t=e.COMMON_ANCESTOR),this.fit!==t&&(this.fit=t,this.markDirtyFit(),this.oldFitBounds.set(n.NOTHING),t===e.COMMON_ANCESTOR&&this.firstDrawable&&this.lastDrawable&&this.updateCommonAncestorInstance(this.firstDrawable,this.lastDrawable))},markDirtyFit:function(){this.dirtyFit=!0,this.markDirty()},updateFit:function(){if(this.dirtyFit||this.fit!==e.FULL_DISPLAY)if(this.dirtyFit=!1,this.fit===e.COMMON_ANCESTOR&&this.commonFitInstance.fittability.subtreeUnfittableCount>0&&this.canBeFullDisplay&&(this.oldFitBounds.set(n.NOTHING),this.fit=e.FULL_DISPLAY),this.fit===e.FULL_DISPLAY)this.setSizeFullDisplay();else{if(this.fit!==e.COMMON_ANCESTOR)throw new Error("unknown fit");this.fitBounds.set(this.commonFitInstance.node.getLocalBounds());for(var t=this.commonFitInstance;t!==this.transformRootInstance;)this.fitBounds.transform(t.node.getMatrix()),t=t.parent;this.fitBounds.roundOut(),this.fitBounds.dilate(4),this.transformRootInstance.isDisplayRoot&&(o.setMinMax(0,0,this.display.width,this.display.height),this.fitBounds.constrainBounds(o)),this.fitBounds.isValid()||this.fitBounds.setMinMax(0,0,0,0),this.fitBounds.equals(this.oldFitBounds)||(this.oldFitBounds.set(this.fitBounds),this.setSizeFitBounds())}},setSizeFullDisplay:function(){},setSizeFitBounds:function(){},setCommonFitInstance:function(t){t!==this.commonFitInstance&&(this.commonFitInstance&&this.commonFitInstance.fittability.subtreeFittabilityChange.removeListener(this.dirtyFitListener),this.commonFitInstance=t,this.commonFitInstance&&this.commonFitInstance.fittability.subtreeFittabilityChange.addListener(this.dirtyFitListener))},dispose:function(){this.display.offStatic("displaySize",this.dirtyFitListener),this.setCommonFitInstance(null),this.transformRootInstance=null,a.prototype.dispose.call(this)},addDrawable:function(t){a.prototype.addDrawable.call(this,t),t.onStatic("fittability",this.fittableListener),t.fittable||this.incrementUnfittable()},removeDrawable:function(t){a.prototype.removeDrawable.call(this,t),t.offStatic("fittability",this.fittableListener),t.fittable||this.decrementUnfittable()},onFittabilityChange:function(t){t.isFittable()?this.decrementUnfittable():this.incrementUnfittable()},incrementUnfittable:function(){this.unfittableDrawableCount++,1===this.unfittableDrawableCount&&this.checkFitConstraints()},decrementUnfittable:function(){this.unfittableDrawableCount--,0===this.unfittableDrawableCount&&this.checkFitConstraints()},checkFitConstraints:function(){this.unfittableDrawableCount>0&&this.canBeFullDisplay?this.setFit(e.FULL_DISPLAY):this.setFit(this.preferredFit)},updateCommonAncestorInstance:function(t,e){for(var i=t.instance,n=e.instance,r=Math.min(i.trail.length,n.trail.length);i.trail.length>r;)i=i.parent;for(;n.trail.length>r;)n=n.parent;for(;i!==n;)i=i.parent,n=n.parent;this.setCommonFitInstance(i)},onIntervalChange:function(t,i){a.prototype.onIntervalChange.call(this,t,i),this.fit===e.COMMON_ANCESTOR&&(this.updateCommonAncestorInstance(t,i),this.markDirtyFit())}}),e.FULL_DISPLAY=1,e.COMMON_ANCESTOR=2,e.fitString={1:"fullDisplay",2:"commonAncestor"},e}),i("SCENERY/util/Util",["require","SCENERY/scenery","DOT/Matrix3","DOT/Transform3","DOT/Bounds2","DOT/Vector2","SCENERY/util/Features"],function(t){"use strict";function e(t,e){return new a(t,e)}var i=t("SCENERY/scenery"),n=t("DOT/Matrix3"),r=t("DOT/Transform3"),s=t("DOT/Bounds2"),a=t("DOT/Vector2"),o=t("SCENERY/util/Features"),h=!1,l=o.transform,u=o.transformOrigin||"transformOrigin",c={applyCSSTransform:function(t,e,i){var n=t.getCSSTransform();i&&(e.style.webkitBackfaceVisibility="hidden",n+=" translateZ(0)"),e.style[l]=n,e.style[u]="top left"},prepareForTransform:function(t,e){t.style[u]="top left",e?i.Util.setTransformAcceleration(t):i.Util.unsetTransformAcceleration(t)},setTransformAcceleration:function(t){t.style.webkitBackfaceVisibility="hidden"},unsetTransformAcceleration:function(t){t.style.webkitBackfaceVisibility=""},applyPreparedTransform:function(t,e,i){e.style[l]=t.getCSSTransform()},setTransform:function(t,e,i){e.style[l]=t},unsetTransform:function(t){t.style[l]=""},polyfillRequestAnimationFrame:function(){window.requestAnimationFrame&&window.cancelAnimationFrame||(o.requestAnimationFrame&&o.cancelAnimationFrame?(window.requestAnimationFrame=window[o.requestAnimationFrame],window.cancelAnimationFrame=window[o.cancelAnimationFrame]):(window.requestAnimationFrame=function(t){var e=Date.now();return window.setTimeout(function(){t(Date.now()-e)},16)},window.cancelAnimationFrame=clearTimeout))},backingStorePixelRatio:function(t){return t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1},backingScale:function(t){if("devicePixelRatio"in window){var e=c.backingStorePixelRatio(t);return window.devicePixelRatio/e}return 1},scanBounds:function(t,i,n){for(var r=_.map(_.range(i),function(){return!1}),a=_.map(_.range(i),function(){return!1}),o=0;i>o;o++)for(var h=0;i>h;h++){var l=4*(h*i+o);(0!==t.data[l]||0!==t.data[l+1]||0!==t.data[l+2]||0!==t.data[l+3])&&(r[o]=!0,a[h]=!0)}var u=_.indexOf(r,!0),c=_.lastIndexOf(r,!0),d=_.indexOf(a,!0),m=_.lastIndexOf(a,!0),f=i/16;return{minBounds:new s(1>u||u>=i-1?Number.POSITIVE_INFINITY:n.inversePosition2(e(u+1+f,0)).x,1>d||d>=i-1?Number.POSITIVE_INFINITY:n.inversePosition2(e(0,d+1+f)).y,1>c||c>=i-1?Number.NEGATIVE_INFINITY:n.inversePosition2(e(c-f,0)).x,1>m||m>=i-1?Number.NEGATIVE_INFINITY:n.inversePosition2(e(0,m-f)).y),maxBounds:new s(1>u||u>=i-1?Number.NEGATIVE_INFINITY:n.inversePosition2(e(u-1-f,0)).x,1>d||d>=i-1?Number.NEGATIVE_INFINITY:n.inversePosition2(e(0,d-1-f)).y,1>c||c>=i-1?Number.POSITIVE_INFINITY:n.inversePosition2(e(c+2+f,0)).x,1>m||m>=i-1?Number.POSITIVE_INFINITY:n.inversePosition2(e(0,m+2+f)).y)}},canvasAccurateBounds:function(t,i){function a(e){function i(t){var e=document.createElement("canvas");e.width=u,e.height=u;var i=e.getContext("2d");i.putImageData(t,0,0),$(e).css("border","1px solid black"),$(window).ready(function(){$("#display").append(e)})}g.save(),e.matrix.canvasSetTransform(g),t(g),g.restore();var n=g.getImageData(0,0,u,u),r=c.scanBounds(n,u,e);return h&&i(n),g.clearRect(0,0,u,u),r}function o(t){var e=2,i=(u-2*e)/(t.maxX-t.minX),s=(u-2*e)/(t.maxY-t.minY),a=-i*t.minX+e,o=-s*t.minY+e;return new r(n.translation(a,o).timesMatrix(n.scaling(i,s)))}var l=i&&i.precision?i.precision:.001,u=i&&i.resolution?i.resolution:128,d=i&&i.initialScale?i.initialScale:1/16,m=s.NOTHING,f=s.EVERYTHING,p=document.createElement("canvas");p.width=u,p.height=u;var g=p.getContext("2d");h&&$(window).ready(function(){var t=document.createElement("h2");$(t).text("Bounds Scan"),$("#display").append(t)});var b=new r;b.append(n.translation(u/2,u/2)),b.append(n.scaling(d));var v=a(b);m=m.union(v.minBounds),f=f.intersection(v.maxBounds);var E,S,y;for(E=f.minY,S=f.maxY;isFinite(m.minX)&&isFinite(f.minX)&&Math.abs(m.minX-f.minX)>l;){if(y=a(o(new s(f.minX,E,m.minX,S))),m.minX<=y.minBounds.minX&&f.minX>=y.maxBounds.minX){h&&(console.log("warning, exiting infinite loop!"),console.log('transformed "min" minX: '+o(new s(f.minX,f.minY,m.minX,f.maxY)).transformPosition2(e(m.minX,0))),console.log('transformed "max" minX: '+o(new s(f.minX,f.minY,m.minX,f.maxY)).transformPosition2(e(f.minX,0))));break}m=m.withMinX(Math.min(m.minX,y.minBounds.minX)),f=f.withMinX(Math.max(f.minX,y.maxBounds.minX)),E=Math.max(E,y.maxBounds.minY),S=Math.min(S,y.maxBounds.maxY)}for(E=f.minY,S=f.maxY;isFinite(m.maxX)&&isFinite(f.maxX)&&Math.abs(m.maxX-f.maxX)>l;){if(y=a(o(new s(m.maxX,E,f.maxX,S))),m.maxX>=y.minBounds.maxX&&f.maxX<=y.maxBounds.maxX){h&&console.log("warning, exiting infinite loop!");break}m=m.withMaxX(Math.max(m.maxX,y.minBounds.maxX)),f=f.withMaxX(Math.min(f.maxX,y.maxBounds.maxX)),E=Math.max(E,y.maxBounds.minY),S=Math.min(S,y.maxBounds.maxY)}for(E=f.minX,S=f.maxX;isFinite(m.minY)&&isFinite(f.minY)&&Math.abs(m.minY-f.minY)>l;){if(y=a(o(new s(E,f.minY,S,m.minY))),m.minY<=y.minBounds.minY&&f.minY>=y.maxBounds.minY){h&&console.log("warning, exiting infinite loop!");break}m=m.withMinY(Math.min(m.minY,y.minBounds.minY)),f=f.withMinY(Math.max(f.minY,y.maxBounds.minY)),E=Math.max(E,y.maxBounds.minX),S=Math.min(S,y.maxBounds.maxX)}for(E=f.minX,S=f.maxX;isFinite(m.maxY)&&isFinite(f.maxY)&&Math.abs(m.maxY-f.maxY)>l;){if(y=a(o(new s(E,m.maxY,S,f.maxY))),m.maxY>=y.minBounds.maxY&&f.maxY<=y.maxBounds.maxY){h&&console.log("warning, exiting infinite loop!");break}m=m.withMaxY(Math.max(m.maxY,y.minBounds.maxY)),f=f.withMaxY(Math.min(f.maxY,y.maxBounds.maxY)),E=Math.max(E,y.maxBounds.minX),S=Math.min(S,y.maxBounds.maxX)}h&&(console.log("minBounds: "+m),console.log("maxBounds: "+f));var C=new s((m.minX+f.minX)/2,(m.minY+f.minY)/2,(m.maxX+f.maxX)/2,(m.maxY+f.maxY)/2);return C.minBounds=m,C.maxBounds=f,C.isConsistent=f.containsBounds(m),C.precision=Math.max(Math.abs(m.minX-f.minX),Math.abs(m.minY-f.minY),Math.abs(m.maxX-f.maxX),Math.abs(m.maxY-f.maxY)),C},toPowerOf2:function(t){for(var e=1;t>e;)e*=2;return e},createShader:function(t,e,i){var n=t.createShader(i);return t.shaderSource(n,e),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)||(console.log("GLSL compile error:"),console.log(t.getShaderInfoLog(n)),console.log(e)),n},checkWebGLSupport:function(t){var e=document.createElement("canvas"),i={failIfMajorPerformanceCaveat:!0};try{var n=!!window.WebGLRenderingContext&&(e.getContext("webgl",i)||e.getContext("experimental-webgl",i));if(!n)return!1;if(t)for(var r=0;r<t.length;r++)if(null===n.getExtension(t[r]))return!1;return!0}catch(s){return!1}},checkIE11StencilSupport:function(){var t=document.createElement("canvas");try{var e=!!window.WebGLRenderingContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"));return e?(e.clearStencil(0),0===e.getError()):!1}catch(i){return!1}},get isWebGLSupported(){return void 0===this._extensionlessWebGLSupport&&(this._extensionlessWebGLSupport=i.Util.checkWebGLSupport()),this._extensionlessWebGLSupport}};return i.register("Util",c),c}),i("SCENERY/display/CanvasBlock",["require","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","DOT/Vector2","SCENERY/scenery","SCENERY/display/FittedBlock","SCENERY/util/CanvasContextWrapper","SCENERY/display/Renderer","SCENERY/util/Util"],function(t){"use strict";function e(t,e,i,n){this.initialize(t,e,i,n)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("PHET_CORE/cleanArray"),s=t("DOT/Vector2"),a=t("SCENERY/scenery"),o=t("SCENERY/display/FittedBlock"),h=t("SCENERY/util/CanvasContextWrapper"),l=t("SCENERY/display/Renderer"),u=t("SCENERY/util/Util");return a.register("CanvasBlock",e),i(o,e,{initialize:function(t,e,i,n){return this.initializeFittedBlock(t,e,i,o.COMMON_ANCESTOR),this.filterRootInstance=n,this.dirtyDrawables=r(this.dirtyDrawables),this.domElement||(this.canvas=document.createElement("canvas"),this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none",this.canvasId=this.canvas.id="scenery-canvas"+this.id,this.context=this.canvas.getContext("2d"),this.context.miterLimit=20,this.context.miterLimit=10,this.wrapper=new h(this.canvas,this.context),this.domElement=this.canvas),u.prepareForTransform(this.canvas,this.forceAcceleration),u.unsetTransform(this.canvas),this.canvasDrawOffset=new s,this.backingScale=e&l.bitmaskCanvasLowResolution?1:a.Util.backingScale(this.context),this.clipDirtyListener=this.markDirty.bind(this),this.filterRootNode=this.filterRootInstance.node,this.filterRootNode.onStatic("clip",this.clipDirtyListener),this},setSizeFullDisplay:function(){var t=this.display.getSize();this.canvas.width=t.width*this.backingScale,this.canvas.height=t.height*this.backingScale,this.canvas.style.width=t.width+"px",this.canvas.style.height=t.height+"px",this.wrapper.resetStyles(),this.canvasDrawOffset.setXY(0,0),u.unsetTransform(this.canvas)},setSizeFitBounds:function(){var t=this.fitBounds.minX,e=this.fitBounds.minY;this.canvasDrawOffset.setXY(-t,-e),u.setTransform("matrix(1,0,0,1,"+t+","+e+")",this.canvas,this.forceAcceleration),this.canvas.width=this.fitBounds.width*this.backingScale,this.canvas.height=this.fitBounds.height*this.backingScale,this.canvas.style.width=this.fitBounds.width+"px",this.canvas.style.height=this.fitBounds.height+"px",this.wrapper.resetStyles()},update:function(){if(this.dirty&&!this.disposed){for(this.dirty=!1;this.dirtyDrawables.length;)this.dirtyDrawables.pop().update();this.updateFit(),this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.filterRootNode.clipArea&&(this.context.save(),this.temporaryRecursiveClip(this.filterRootInstance));for(var t=this.firstDrawable;null!==t&&(this.renderDrawable(t),t!==this.lastDrawable);t=t.nextDrawable);this.filterRootNode.clipArea&&(this.context.restore(),this.wrapper.resetStyles())}},temporaryRecursiveClip:function(t){t.parent&&this.temporaryRecursiveClip(t.parent),t.node.clipArea&&(this.context.setTransform(this.backingScale,0,0,this.backingScale,this.canvasDrawOffset.x*this.backingScale,this.canvasDrawOffset.y*this.backingScale),t.relativeTransform.matrix.canvasAppendTransform(this.context),this.context.beginPath(),t.node.clipArea.writeToContext(this.context),this.context.clip())},renderDrawable:function(t){if(t.visible){var e=t.instance.relativeTransform.matrix;this.context.setTransform(this.backingScale,0,0,this.backingScale,this.canvasDrawOffset.x*this.backingScale,this.canvasDrawOffset.y*this.backingScale),t.instance!==this.transformRootInstance&&e.canvasAppendTransform(this.context),t.paintCanvas(this.wrapper,t.instance.node)}},dispose:function(){this.filterRootNode.offStatic("clip",this.clipDirtyListener),this.filterRootNode=null,this.transformRootInstance=null,r(this.dirtyDrawables),this.canvas.width=0,this.canvas.height=0,o.prototype.dispose.call(this)},markDirtyDrawable:function(t){this.dirtyDrawables.push(t),this.markDirty()},addDrawable:function(t){o.prototype.addDrawable.call(this,t)},removeDrawable:function(t){o.prototype.removeDrawable.call(this,t)},onIntervalChange:function(t,e){o.prototype.onIntervalChange.call(this,t,e)},onPotentiallyMovedDrawable:function(t){t.markDirty()},toString:function(){return"CanvasBlock#"+this.id+"-"+o.fitString[this.fit]}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().initialize(i,n,r,s):new e(i,n,r,s)}}}),e}),i("SCENERY/display/SVGGroup",["require","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","PHET_CORE/platform","SCENERY/scenery"],function(t){"use strict";function e(t,e,i){this.initialize(t,e,i)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("PHET_CORE/cleanArray"),s=t("PHET_CORE/platform"),a=t("SCENERY/scenery");return a.register("SVGGroup",e),i(Object,e,{initialize:function(t,e,i){return this.block=t,this.instance=e,this.node=e.trail.lastNode(),this.parent=i,this.children=r(this.children),this.hasSelfDrawable=!1,this.selfDrawable=null,this.dirty=!0,this.willApplyTransforms=this.block.transformRootInstance.trail.nodes.length<this.instance.trail.nodes.length,this.willApplyFilters=this.block.filterRootInstance.trail.nodes.length<this.instance.trail.nodes.length,this.transformDirty=!0,this.hasTransform=void 0!==this.hasTransform?this.hasTransform:!1,this.transformDirtyListener=this.transformDirtyListener||this.markTransformDirty.bind(this),this.willApplyTransforms&&this.node.onStatic("transform",this.transformDirtyListener),this.opacityDirty=!0,this.visibilityDirty=!0,this.clipDirty=!0,this.hasOpacity=void 0!==this.hasOpacity?this.hasOpacity:!1,this.clipDefinition=void 0!==this.clipDefinition?this.clipDefinition:null,this.clipPath=void 0!==this.clipPath?this.clipPath:null,this.opacityDirtyListener=this.opacityDirtyListener||this.markOpacityDirty.bind(this),this.visibilityDirtyListener=this.visibilityDirtyListener||this.markVisibilityDirty.bind(this),this.clipDirtyListener=this.clipDirtyListener||this.markClipDirty.bind(this),this.node.onStatic("visibility",this.visibilityDirtyListener),this.willApplyFilters&&this.node.onStatic("opacity",this.opacityDirtyListener),this.node.onStatic("clip",this.clipDirtyListener),this.orderDirty=!0,this.orderDirtyListener=this.orderDirtyListener||this.markOrderDirty.bind(this),this.node.onStatic("childInserted",this.orderDirtyListener),this.node.onStatic("childRemoved",this.orderDirtyListener),this.svgGroup||(this.svgGroup=document.createElementNS(a.svgns,"g")),this.instance.addSVGGroup(this),this.block.markDirtyGroup(this),this},addSelfDrawable:function(t){this.selfDrawable=t,this.svgGroup.insertBefore(t.svgElement,this.children.length?this.children[0].svgGroup:null),this.hasSelfDrawable=!0},removeSelfDrawable:function(t){this.hasSelfDrawable=!1,this.svgGroup.removeChild(t.svgElement),this.selfDrawable=null},addChildGroup:function(t){this.markOrderDirty(),t.parent=this,this.children.push(t),this.svgGroup.appendChild(t.svgGroup)},removeChildGroup:function(t){this.markOrderDirty(),t.parent=null,this.children.splice(_.indexOf(this.children,t),1),this.svgGroup.removeChild(t.svgGroup)},markDirty:function(){this.dirty||(this.dirty=!0,this.block.markDirtyGroup(this))},markOrderDirty:function(){this.orderDirty||(this.orderDirty=!0,this.markDirty())},markTransformDirty:function(){this.transformDirty||(this.transformDirty=!0,this.markDirty())},markOpacityDirty:function(){this.opacityDirty||(this.opacityDirty=!0,this.markDirty())},markVisibilityDirty:function(){this.visibilityDirty||(this.visibilityDirty=!0,this.markDirty())},markClipDirty:function(){this.clipDirty||(this.clipDirty=!0,this.markDirty())},update:function(){if(this.block){var t=this.svgGroup;if(this.dirty=!1,this.transformDirty)if(this.transformDirty=!1,this.willApplyTransforms){var e=this.node.transform.isIdentity();e?this.hasTransform&&(this.hasTransform=!1,s.ie9||s.ie10?t.setAttribute("transform",""):t.removeAttribute("transform")):(this.hasTransform=!0,t.setAttribute("transform",this.node.transform.getMatrix().getSVGTransform()))}else this.hasTransform&&(this.hasTransform=!1,s.ie9||s.ie10?t.setAttribute("transform",""):t.removeAttribute("transform"));if(this.visibilityDirty&&(this.visibilityDirty=!1,t.style.display=this.node.isVisible()?"":"none"),this.opacityDirty&&(this.opacityDirty=!1,this.willApplyFilters&&1!==this.node.opacity?(this.hasOpacity=!0,t.setAttribute("opacity",this.node.opacity)):this.hasOpacity&&(this.hasOpacity=!1,t.removeAttribute("opacity"))),this.clipDirty)if(this.clipDirty=!1,this.node.clipArea){if(!this.clipDefinition){var i="clip"+this.node.getId();this.clipDefinition=document.createElementNS(a.svgns,"clipPath"),this.clipDefinition.setAttribute("id",i),this.clipDefinition.setAttribute("clipPathUnits","userSpaceOnUse"),this.block.defs.appendChild(this.clipDefinition),this.clipPath=document.createElementNS(a.svgns,"path"),this.clipDefinition.appendChild(this.clipPath),t.setAttribute("clip-path","url(#"+i+")")}this.clipPath.setAttribute("d",this.node.clipArea.getSVGPath())}else this.clipDefinition&&(t.removeAttribute("clip-path"),this.block.defs.removeChild(this.clipDefinition),this.clipDefinition=null,this.clipPath=null);if(this.orderDirty){this.orderDirty=!1;for(var n=this.children.length-1,r=this.instance.children,o=r.length-1;o>=0;o--){var h=r[o].lookupSVGGroup(this.block);if(h){if(this.children[n]!==h){t.insertBefore(h.svgGroup,n+1>=this.children.length?null:this.children[n+1].svgGroup);var l=_.indexOf(this.children,h);this.children.splice(l,1),this.children.splice(n,0,h)}n--}}}}},isReleasable:function(){return!this.hasSelfDrawable&&!this.children.length&&this.parent},dispose:function(){this.willApplyTransforms&&this.node.offStatic("transform",this.transformDirtyListener),this.node.offStatic("visibility",this.visibilityDirtyListener),this.willApplyFilters&&this.node.offStatic("opacity",this.opacityDirtyListener),this.node.offStatic("clip",this.clipDirtyListener),this.node.offStatic("childInserted",this.orderDirtyListener),this.node.offStatic("childRemoved",this.orderDirtyListener),this.instance.active&&this.instance.removeSVGGroup(this),this.clipDefinition&&(this.svgGroup.removeAttribute("clip-path"),this.block.defs.removeChild(this.clipDefinition),this.clipDefinition=null,this.clipPath=null),this.parent=null,this.block=null,this.instance=null,this.node=null,r(this.children),this.selfDrawable=null,this.freeToPool()},toString:function(){return"SVGGroup:"+this.block.toString()+"_"+this.instance.toString()}}),e.addDrawable=function(t,i){var n=e.ensureGroupsToInstance(t,i.instance);n.addSelfDrawable(i)},e.removeDrawable=function(t,i){i.instance.lookupSVGGroup(t).removeSelfDrawable(i),e.releaseGroupsToInstance(t,i.instance)},e.ensureGroupsToInstance=function(t,i){var n=i.lookupSVGGroup(t);if(!n){var r=e.ensureGroupsToInstance(t,i.parent);n=e.createFromPool(t,i,r),r.addChildGroup(n)}return n},e.releaseGroupsToInstance=function(t,i){var n=i.lookupSVGGroup(t);if(n.isReleasable()){var r=n.parent;r.removeChildGroup(n),e.releaseGroupsToInstance(t,r.instance),n.dispose()}},n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r){return t.length?t.pop().initialize(i,n,r):new e(i,n,r)}}}),e}),i("SCENERY/display/SVGBlock",["require","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/FittedBlock","SCENERY/display/SVGGroup","SCENERY/util/Util"],function(t){"use strict";function e(t,e,i,n){this.initialize(t,e,i,n)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("PHET_CORE/cleanArray"),s=t("SCENERY/scenery"),a=t("SCENERY/display/FittedBlock"),o=t("SCENERY/display/SVGGroup"),h=t("SCENERY/util/Util");return s.register("SVGBlock",e),i(a,e,{initialize:function(t,e,i,n){this.initializeFittedBlock(t,e,i,a.COMMON_ANCESTOR),this.filterRootInstance=n,this.dirtyGroups=r(this.dirtyGroups),this.dirtyDrawables=r(this.dirtyDrawables),this.paintMap={},this.domElement||(this.svg=document.createElementNS(s.svgns,"svg"),this.svg.style.position="absolute",this.svg.style.left="0",this.svg.style.top="0",this.svg.style["pointer-events"]="none",this.defs=document.createElementNS(s.svgns,"defs"),this.svg.appendChild(this.defs),this.baseTransformGroup=document.createElementNS(s.svgns,"g"),this.svg.appendChild(this.baseTransformGroup),this.domElement=this.svg),h.prepareForTransform(this.svg,this.forceAcceleration),h.unsetTransform(this.svg),this.baseTransformGroup.setAttribute("transform","");var l=i.trail.nodes.length>n.trail.nodes.length?n:i;return this.rootGroup=o.createFromPool(this,l,null),this.baseTransformGroup.appendChild(this.rootGroup.svgGroup),this},incrementPaint:function(t){if(this.paintMap.hasOwnProperty(t.id))this.paintMap[t.id].count++;else{var e=t.getSVGDefinition();e.setAttribute("id",t.id+"-"+this.id),this.paintMap[t.id]={count:1,paint:t,def:e},this.defs.appendChild(e)}},decrementPaint:function(t){if(this.paintMap.hasOwnProperty(t.id)){var e=this.paintMap[t.id];1===e.count?(this.defs.removeChild(e.def),delete this.paintMap[t.id]):e.count--}},markDirtyGroup:function(t){this.dirtyGroups.push(t),this.markDirty()},markDirtyDrawable:function(t){this.dirtyDrawables.push(t),this.markDirty()},setSizeFullDisplay:function(){var t=this.display.getSize();this.svg.setAttribute("width",t.width),this.svg.setAttribute("height",t.height)},setSizeFitBounds:function(){var t=this.fitBounds.minX,e=this.fitBounds.minY;this.baseTransformGroup.setAttribute("transform","translate("+-t+","+-e+")"),h.setTransform("matrix(1,0,0,1,"+t+","+e+")",this.svg,this.forceAcceleration),this.svg.setAttribute("width",this.fitBounds.width),this.svg.setAttribute("height",this.fitBounds.height)},update:function(){if(this.dirty&&!this.disposed){for(this.dirty=!1;this.dirtyGroups.length;){var t=this.dirtyGroups.pop();t.block===this&&t.update()}for(;this.dirtyDrawables.length;){
var e=this.dirtyDrawables.pop();e.parentDrawable===this&&e.update()}this.updateFit()}},dispose:function(){for(this.svg.setAttribute("width",0),this.svg.setAttribute("height",0),this.filterRootInstance=null,r(this.dirtyGroups),r(this.dirtyDrawables),this.paintMap={},this.baseTransformGroup.removeChild(this.rootGroup.svgGroup),this.rootGroup.dispose(),this.rootGroup=null;this.defs.childNodes.length;)this.defs.removeChild(this.defs.childNodes[0]);a.prototype.dispose.call(this)},addDrawable:function(t){a.prototype.addDrawable.call(this,t),o.addDrawable(this,t),t.updateSVGBlock(this)},removeDrawable:function(t){o.removeDrawable(this,t),a.prototype.removeDrawable.call(this,t)},onIntervalChange:function(t,e){a.prototype.onIntervalChange.call(this,t,e)},toString:function(){return"SVGBlock#"+this.id+"-"+a.fitString[this.fit]}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().initialize(i,n,r,s):new e(i,n,r,s)}}}),e}),i("SCENERY/display/DOMBlock",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/Block"],function(t){"use strict";function e(t,e){this.initialize(t,e)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/scenery"),s=t("SCENERY/display/Block");return r.register("DOMBlock",e),i(s,e,{initialize:function(t,e){return this.initializeBlock(t,e.renderer),this.domDrawable=e,this.domElement=e.domElement,this},dispose:function(){this.domDrawable=null,this.domElement=null,s.prototype.dispose.call(this)},update:function(){this.dirty&&!this.disposed&&(this.dirty=!1,this.domDrawable.update())},markDirtyDrawable:function(t){this.markDirty()},addDrawable:function(t){s.prototype.addDrawable.call(this,t)},removeDrawable:function(t){s.prototype.removeDrawable.call(this,t)}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n){return t.length?t.pop().initialize(i,n):new e(i,n)}}}),e}),i("DOT/BinPacker",["require","DOT/dot","PHET_CORE/inherit","DOT/Bounds2"],function(t){"use strict";function e(t){this.rootBin=new i.BinPacker.Bin(t,null)}var i=t("DOT/dot"),n=t("PHET_CORE/inherit"),r=t("DOT/Bounds2");return i.register("BinPacker",e),n(Object,e,{allocate:function(t,e){var i=this.rootBin.findAvailableBin(t,e);if(i){var n=i.split(t,e);return n.use(),n}return null},deallocate:function(t){t.unuse()},toString:function(){function t(n){e+=i+n.toString()+"\n",i+="  ",_.each(n.children,t),i=i.substring(2)}var e="",i="";return t(this.rootBin),e}}),e.Bin=function(t,e){this.bounds=t,this.parent=e,this.isSplit=!1,this.isUsed=!1,this.children=[]},n(Object,e.Bin,{findAvailableBin:function(t,e){if(this.isUsed)return null;if(this.bounds.width<t||this.bounds.height<e)return null;if(this.isSplit){for(var i=0;i<this.children.length;i++){var n=this.children[i].findAvailableBin(t,e);if(n)return n}return null}return this},split:function(t,e){if(t===this.bounds.width&&e===this.bounds.height)return this;this.isSplit=!0;var n=this.bounds.minX+t,s=this.bounds.minY+e,a=new r(this.bounds.minX,this.bounds.minY,n,s),o=new r(n,this.bounds.minY,this.bounds.maxX,s),h=new r(this.bounds.minX,s,this.bounds.maxX,this.bounds.maxY),l=new i.BinPacker.Bin(a,this);return this.children.push(l),o.hasNonzeroArea()&&this.children.push(new i.BinPacker.Bin(o,this)),h.hasNonzeroArea()&&this.children.push(new i.BinPacker.Bin(h,this)),l},use:function(){this.isUsed=!0},unuse:function(){this.isUsed=!1,this.parent&&this.parent.attemptToCollapse()},attemptToCollapse:function(){for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.isSplit||e.isUsed)return}this.children=[],this.isSplit=!1,this.parent&&this.parent.attemptToCollapse()},toString:function(){return this.bounds.toString()+(this.isUsed?" used":"")}}),e}),i("SCENERY/util/SpriteSheet",["require","SCENERY/scenery","PHET_CORE/inherit","DOT/BinPacker","DOT/Bounds2"],function(t){"use strict";function e(t){this.useMipmaps=t,this.gl=null,this.bounds=new s(0,0,2048,2048),this.width=this.bounds.width,this.height=this.bounds.height,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.context=this.canvas.getContext("2d"),this.binPacker=new r(this.bounds),this.dirty=!0,this.usedSprites=[],this.unusedSprites=[]}var i=t("SCENERY/scenery"),n=t("PHET_CORE/inherit"),r=t("DOT/BinPacker"),s=t("DOT/Bounds2");return i.register("SpriteSheet",e),n(Object,e,{initializeContext:function(t){this.gl=t,this.createTexture()},createTexture:function(){var t=this.gl;this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.useMipmaps?t.LINEAR_MIPMAP_LINEAR:t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!1),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.canvas),this.useMipmaps&&(t.hint(t.GENERATE_MIPMAP_HINT,t.NICEST),t.generateMipmap(t.TEXTURE_2D)),t.bindTexture(t.TEXTURE_2D,null),this.dirty=!1},updateTexture:function(){if(this.dirty){this.dirty=!1;var t=this.gl;t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.canvas),this.useMipmaps&&t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)}},addImage:function(t,i,n){var r;for(r=0;r<this.usedSprites.length;r++){var a=this.usedSprites[r];if(a.image===t)return a.count++,a}for(r=0;r<this.unusedSprites.length;r++){var o=this.unusedSprites[r];if(o.image===t)return o.count++,this.unusedSprites.splice(r,1),this.usedSprites.push(o),o}for(var h;!(h=this.binPacker.allocate(i,n))&&this.unusedSprites.length;){var l=this.unusedSprites.shift();this.dirty=!0;var u=l.bin.bounds;this.context.clearRect(u.x,u.y,u.width,u.height),this.binPacker.deallocate(l.bin)}if(h){var c=new s(h.bounds.minX/this.width,h.bounds.minY/this.height,h.bounds.maxX/this.width,h.bounds.maxY/this.height),d=new e.Sprite(this,h,c,t,1);return this.context.drawImage(t,h.bounds.x,h.bounds.y),this.dirty=!0,this.usedSprites.push(d),d}return null},removeImage:function(t){var e,i;for(i=0;i<this.usedSprites.length;i++)if(this.usedSprites[i].image===t){e=this.usedSprites[i];break}--e.count<=0&&(this.usedSprites.splice(i,1),this.unusedSprites.push(e))},containsImage:function(t){var e;for(e=0;e<this.usedSprites.length;e++)if(this.usedSprites[e].image===t)return!0;for(e=0;e<this.unusedSprites.length;e++)if(this.unusedSprites[e].image===t)return!0;return!1}}),e.Sprite=function(t,e,i,n,r){this.spriteSheet=t,this.bin=e,this.uvBounds=i,this.image=n,this.count=r},e}),i("SCENERY/util/ShaderProgram",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/util/Util"],function(t){"use strict";function e(t,e,i,n){n=_.extend({attributes:[],uniforms:[]},n),this.vertexSource=e,this.fragmentSource=i,this.attributeNames=n.attributes,this.uniformNames=n.uniforms,this.initialize(t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/util/Util");return n.register("ShaderProgram",e),i(Object,e,{initialize:function(t){var e=this;this.gl=t,this.used=!1,this.program=this.gl.createProgram(),this.vertexShader=r.createShader(this.gl,this.vertexSource,this.gl.VERTEX_SHADER),this.fragmentShader=r.createShader(this.gl,this.fragmentSource,this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vertexShader),this.gl.attachShader(this.program,this.fragmentShader),this.gl.linkProgram(this.program),this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS)||(console.log("GLSL link error:"),console.log(this.gl.getProgramInfoLog(this.program)),console.log("for vertex shader"),console.log(this.vertexSource),console.log("for fragment shader"),console.log(this.fragmentSource)),this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),this.uniformLocations={},this.attributeLocations={},this.activeAttributes={},_.each(this.attributeNames,function(t){e.attributeLocations[t]=e.gl.getAttribLocation(e.program,t),e.activeAttributes[t]=!0}),_.each(this.uniformNames,function(t){e.uniformLocations[t]=e.gl.getUniformLocation(e.program,t)}),this.isInitialized=!0},use:function(){if(!this.used){var t=this;this.used=!0,this.gl.useProgram(this.program),_.each(this.attributeNames,function(e){t.activeAttributes[e]&&t.enableVertexAttribArray(e)})}},activateAttribute:function(t){this.activeAttributes[t]||(this.activeAttributes[t]=!0,this.used&&this.enableVertexAttribArray(t))},enableVertexAttribArray:function(t){this.gl.enableVertexAttribArray(this.attributeLocations[t])},unuse:function(){if(this.used){var t=this;this.used=!1,_.each(this.attributeNames,function(e){t.activeAttributes[e]&&t.disableVertexAttribArray(e)})}},disableVertexAttribArray:function(t){this.gl.disableVertexAttribArray(this.attributeLocations[t])},deactivateAttribute:function(t){this.activeAttributes[t]&&(this.activeAttributes[t]=!1,this.used&&this.disableVertexAttribArray(t))},dispose:function(){this.gl.deleteProgram(this.program)}})}),i("SCENERY/display/WebGLBlock",["require","SCENERY/scenery","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","DOT/Matrix3","SCENERY/display/FittedBlock","SCENERY/display/Renderer","SCENERY/util/Util","SCENERY/util/SpriteSheet","SCENERY/util/ShaderProgram"],function(t){"use strict";function e(t,e,i,n){this.initialize(t,e,i,n)}var i=t("SCENERY/scenery"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable"),s=t("PHET_CORE/cleanArray"),a=t("DOT/Matrix3"),o=t("SCENERY/display/FittedBlock"),h=t("SCENERY/display/Renderer"),l=t("SCENERY/util/Util"),u=t("SCENERY/util/SpriteSheet"),c=t("SCENERY/util/ShaderProgram");return i.register("WebGLBlock",e),n(o,e,{initialize:function(t,i,n,r){if(this.initializeFittedBlock(t,i,n,o.FULL_DISPLAY),this.filterRootInstance=r,this.preserveDrawingBuffer=t.options.preserveDrawingBuffer,this.dirtyDrawables=s(this.dirtyDrawables),this.spriteSheets=this.spriteSheets||[],!this.domElement){this.canvas=document.createElement("canvas"),this.canvas.style.position="absolute",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none",this.canvasId=this.canvas.id="scenery-webgl"+this.id;var h={antialias:!0,preserveDrawingBuffer:this.preserveDrawingBuffer};this.gl=this.canvas.getContext("webgl",h)||this.canvas.getContext("experimental-webgl",h);var u=this.gl;this.backingScale=this.originalBackingScale=l.backingScale(u),u.clearColor(0,0,0,0),u.enable(u.BLEND),u.blendEquationSeparate(u.FUNC_ADD,u.FUNC_ADD),u.blendFuncSeparate(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA,u.ONE,u.ONE_MINUS_SRC_ALPHA),this.domElement=this.canvas,this.customProcessor=new e.CustomProcessor(this),this.texturedTrianglesProcessor=new e.TexturedTrianglesProcessor(this)}return this.gl.clear(this.gl.COLOR_BUFFER_BIT),l.prepareForTransform(this.canvas,!1),l.unsetTransform(this.canvas),this.projectionMatrix=this.projectionMatrix||(new a).setTo32Bit(),this.projectionMatrixArray=this.projectionMatrix.entries,this},setSizeFullDisplay:function(){var t=this.display.getSize();this.canvas.width=Math.ceil(t.width*this.backingScale),this.canvas.height=Math.ceil(t.height*this.backingScale),this.canvas.style.width=t.width+"px",this.canvas.style.height=t.height+"px"},setSizeFitBounds:function(){throw new Error("setSizeFitBounds unimplemented for WebGLBlock")},update:function(){var t=this.gl;if(this.dirty&&!this.disposed){for(this.dirty=!1;this.dirtyDrawables.length;)this.dirtyDrawables.pop().update();for(var e=this.spriteSheets.length,i=0;e>i;i++)this.spriteSheets[i].updateTexture();this.firstDrawable&&this.firstDrawable===this.lastDrawable&&this.firstDrawable.node&&null!==this.firstDrawable.node._hints.webglScale&&this.backingScale!==this.originalBackingScale*this.firstDrawable.node._hints.webglScale&&(this.backingScale=this.originalBackingScale*this.firstDrawable.node._hints.webglScale,this.dirtyFit=!0),this.updateFit(),this.projectionMatrix.rowMajor(2/this.display.width,0,-1,0,-2/this.display.height,1,0,0,1),this.preserveDrawingBuffer&&t.clear(t.COLOR_BUFFER_BIT),t.viewport(0,0,this.canvas.width,this.canvas.height);for(var n=null,r=0,s=this.firstDrawable;null!==s;s=s.nextDrawable){if(s.visible){var a=null;s.webglRenderer===h.webglTexturedTriangles?a=this.texturedTrianglesProcessor:s.webglRenderer===h.webglCustom&&(a=this.customProcessor),a!==n&&(n&&(r+=n.deactivate()),n=a,n.activate()),n.processDrawable(s)}if(s===this.lastDrawable)break}n&&(r+=n.deactivate()),0!==r||this.preserveDrawingBuffer||t.clear(t.COLOR_BUFFER_BIT),t.flush()}},dispose:function(){s(this.dirtyDrawables),o.prototype.dispose.call(this)},markDirtyDrawable:function(t){this.dirtyDrawables.push(t),this.markDirty()},addDrawable:function(t){o.prototype.addDrawable.call(this,t),t.onAddToBlock(this)},removeDrawable:function(t){t.onRemoveFromBlock(this),o.prototype.removeDrawable.call(this,t)},addSpriteSheetImage:function(t,e,i){for(var n=null,r=this.spriteSheets.length,s=0;r>s;s++){var a=this.spriteSheets[s];if(n=a.addImage(t,e,i))break}if(!n){var o=new u(!0);if(n=o.addImage(t,e,i),o.initializeContext(this.gl),o.createTexture(),this.spriteSheets.push(o),!n)throw new Error("Attempt to load image that is too large for sprite sheets")}return n},removeSpriteSheetImage:function(t){t.spriteSheet.removeImage(t.image)},onIntervalChange:function(t,e){o.prototype.onIntervalChange.call(this,t,e),this.markDirty()},onPotentiallyMovedDrawable:function(t){this.markDirty()},toString:function(){return"WebGLBlock#"+this.id+"-"+o.fitString[this.fit]}}),e.CustomProcessor=function(t){this.webglBlock=t,this.drawable=null},n(Object,e.CustomProcessor,{activate:function(){this.drawCount=0},processDrawable:function(t){this.drawable=t,this.draw()},deactivate:function(){return this.drawCount},draw:function(){this.drawable&&(this.drawable.draw(),this.drawCount++,this.drawable=null)}}),e.TexturedTrianglesProcessor=function(t){this.webglBlock=t;var e=this.gl=t.gl;this.shaderProgram=new c(e,["attribute vec4 aVertex;","varying vec2 vTextureCoord;","uniform mat3 uProjectionMatrix;","void main() {","  vTextureCoord = aVertex.zw;","  vec3 ndc = uProjectionMatrix * vec3( aVertex.xy, 1.0 );","  gl_Position = vec4( ndc.xy, 0.0, 1.0 );","}"].join("\n"),["precision mediump float;","varying vec2 vTextureCoord;","uniform sampler2D uTexture;","void main() {","  gl_FragColor = texture2D( uTexture, vTextureCoord, -0.7 );","}"].join("\n"),{attributes:["aVertex"],uniforms:["uTexture","uProjectionMatrix"]}),this.vertexBuffer=e.createBuffer(),this.lastArrayLength=128,this.vertexArray=new Float32Array(this.lastArrayLength),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertexArray,e.DYNAMIC_DRAW)},n(Object,e.TexturedTrianglesProcessor,{activate:function(){this.shaderProgram.use(),this.currentSpriteSheet=null,this.vertexArrayIndex=0,this.drawCount=0},processDrawable:function(t){if(t.sprite){this.currentSpriteSheet&&t.sprite.spriteSheet!==this.currentSpriteSheet&&this.draw(),this.currentSpriteSheet=t.sprite.spriteSheet;for(var e=t.vertexArray;e.length+this.vertexArrayIndex>this.vertexArray.length;){var i=new Float32Array(2*this.vertexArray.length);i.set(this.vertexArray),this.vertexArray=i}this.vertexArray.set(e,this.vertexArrayIndex),this.vertexArrayIndex+=e.length}},deactivate:function(){return this.currentSpriteSheet&&this.draw(),this.shaderProgram.unuse(),this.drawCount},draw:function(){var t=this.gl;t.uniformMatrix3fv(this.shaderProgram.uniformLocations.uProjectionMatrix,!1,this.webglBlock.projectionMatrixArray),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray.length>this.lastArrayLength?t.bufferData(t.ARRAY_BUFFER,this.vertexArray,t.DYNAMIC_DRAW):t.bufferSubData(t.ARRAY_BUFFER,0,this.vertexArray.subarray(0,this.vertexArrayIndex)),t.vertexAttribPointer(this.shaderProgram.attributeLocations.aVertex,4,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this.currentSpriteSheet.texture),t.uniform1i(this.shaderProgram.uniformLocations.uTexture,0),t.drawArrays(t.TRIANGLES,0,this.vertexArrayIndex/4),t.bindTexture(t.TEXTURE_2D,null),this.drawCount++,this.currentSpriteSheet=null,this.vertexArrayIndex=0}}),r.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().initialize(i,n,r,s):new e(i,n,r,s)}}}),e}),i("SCENERY/display/Stitcher",["require","PHET_CORE/inherit","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/Drawable","SCENERY/display/Renderer","SCENERY/display/CanvasBlock","SCENERY/display/SVGBlock","SCENERY/display/DOMBlock","SCENERY/display/WebGLBlock"],function(t){"use strict";function e(t,e){throw new Error("We are too abstract for that!")}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/cleanArray"),r=t("SCENERY/scenery"),s=(t("SCENERY/display/Drawable"),t("SCENERY/display/Renderer")),a=t("SCENERY/display/CanvasBlock"),o=t("SCENERY/display/SVGBlock"),h=t("SCENERY/display/DOMBlock"),l=t("SCENERY/display/WebGLBlock");return r.register("Stitcher",e),i(Object,e,{initialize:function(t,e,i,r,s,a,o){this.backbone=t,this.firstDrawable=e,this.lastDrawable=i,this.touchedBlocks=n(this.touchedBlocks)},clean:function(){this.backbone=null,this.firstDrawable=null,this.lastDrawable=null},recordBackboneBoundaries:function(){this.backbone.previousFirstDrawable=this.firstDrawable,this.backbone.previousLastDrawable=this.lastDrawable},notePendingAddition:function(t,e){t.notePendingAddition(this.backbone.display,e,this.backbone)},notePendingMove:function(t,e){t.notePendingMove(this.backbone.display,e)},notePendingRemoval:function(t){t.notePendingRemoval(this.backbone.display)},markBlockForDisposal:function(t){t.domElement.parentNode===this.backbone.domElement&&this.backbone.domElement.removeChild(t.domElement),t.markForDisposal(this.backbone.display)},removeAllBlocks:function(){for(;this.backbone.blocks.length;){var t=this.backbone.blocks[0];this.removeBlock(t),this.markBlockForDisposal(t)}},notifyInterval:function(t,e,i){t.notifyInterval(e,i),this.backbone.markDirtyDrawable(t)},markBeforeBlock:function(t,e){t.pendingFirstDrawable=e,this.touchedBlocks.push(t)},markAfterBlock:function(t,e){t.pendingLastDrawable=e,this.touchedBlocks.push(t)},updateBlockIntervals:function(){for(;this.touchedBlocks.length;){var t=this.touchedBlocks.pop();t.used&&(t.updateInterval(),this.backbone.markDirtyDrawable(t))}},createBlock:function(t,e){var i,n=this.backbone;if(s.isCanvas(t))i=a.createFromPool(n.display,t,n.transformRootInstance,n.backboneInstance);else if(s.isSVG(t))i=o.createFromPool(n.display,t,n.transformRootInstance,n.backboneInstance);else if(s.isDOM(t))i=h.createFromPool(n.display,e);else{if(!s.isWebGL(t))throw new Error("unsupported renderer for createBlock: "+t);i=l.createFromPool(n.display,t,n.transformRootInstance,n.backboneInstance)}return i.setBlockBackbone(n),n.domElement.appendChild(i.domElement),n.markDirtyDrawable(i),i},appendBlock:function(t){this.backbone.blocks.push(t)},removeBlock:function(t){var e=_.indexOf(this.backbone.blocks,t);this.backbone.blocks.splice(e,1)},useNoBlocks:function(){n(this.backbone.blocks)},reindex:function(){this.backbone.reindexBlocks()},auditStitch:function(){}}),e.debugIntervals=function(t){},e.debugDrawables=function(t,e,i,n,r){},e}),i("SCENERY/display/GreedyStitcher",["require","PHET_CORE/inherit","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/Renderer","SCENERY/display/Stitcher"],function(t){"use strict";function e(t,e){return t.renderer!==e.renderer||c.isDOM(t.renderer)||c.isDOM(e.renderer)}function i(t){return null!==t.previousDrawable&&!e(t.previousDrawable,t)}function n(t){return null!==t.nextDrawable&&!e(t,t.nextDrawable)}function r(t,e,i){return t.drawableBefore?t.drawableBefore.nextDrawable!==t.drawableAfter:t.drawableAfter?t.drawableAfter.previousDrawable!==t.drawableBefore:null!==e}function s(t,e,i){return t.drawableBefore?t.drawableBefore.oldNextDrawable!==t.drawableAfter:t.drawableAfter?t.drawableAfter.oldPreviousDrawable!==t.drawableBefore:null!==e}function a(t,e,i){var n=t.drawableBefore?t.drawableBefore.parentDrawable:null,r=t.drawableAfter?t.drawableAfter.parentDrawable:null;return n&&r&&n===r?!1:n?n.nextBlock!==r:r?r.previousBlock!==n:null!==e}function o(t){var e=t.drawableAfter;if(e){for(var i=e.renderer,n=t.nextChangeInterval?t.nextChangeInterval.drawableBefore.nextDrawable:null,r=e;;){var s=r.nextDrawable;if(s===n||s.renderer!==i)break;r=s}return r}return null}var h=t("PHET_CORE/inherit"),l=t("PHET_CORE/cleanArray"),u=t("SCENERY/scenery"),c=t("SCENERY/display/Renderer"),d=t("SCENERY/display/Stitcher"),m={stitch:function(t,e,i,n,r,o,h){this.initialize(t,e,i,n,r,o,h),this.blockOrderChanged=!1,this.reusableBlocks=l(this.reusableBlocks),this.blockWasAdded=!1;var u;if(this.recordBackboneBoundaries(),t.blocks.length){var c=t.blocks[0],d=t.blocks[t.blocks.length-1];for(u=o;null!==u;u=u.nextChangeInterval){if(s(u,n,r))for(var m=u.drawableBefore?u.drawableBefore.oldNextDrawable:n,f=u.drawableAfter?u.drawableAfter.oldPreviousDrawable:r,p=m;this.notePendingRemoval(p),p!==f;p=p.oldNextDrawable);if(a(u,c,d))for(var g=null===u.drawableBefore?t.blocks[0]:u.drawableBefore.parentDrawable.nextBlock,b=null===u.drawableAfter?t.blocks[t.blocks.length-1]:u.drawableAfter.parentDrawable.previousBlock,v=g;this.unuseBlock(v),v!==b;v=v.nextBlock);}}if(e)for(u=o;null!==u;u=u.nextChangeInterval)this.processInterval(t,u,e,i);this.removeUnusedBlocks(),this.updateBlockIntervals(),null===e?this.useNoBlocks():this.blockOrderChanged&&(this.processBlockLinkedList(t,e.pendingParentDrawable,i.pendingParentDrawable),this.reindex()),this.clean(),l(this.reusableBlocks)},processInterval:function(t,s,a,o){if(r(s,a,o))for(var h=s.drawableBefore?s.drawableBefore.nextDrawable:a,l=null,u=null,c=!0;;){var d=h.nextDrawable,m=d===s.drawableAfter;if(l||(l=h),null===u&&h.parentDrawable&&!h.parentDrawable.used&&h.backbone===t&&h.parentDrawable.parentDrawable===t&&(u=h.parentDrawable),(m||e(h,d))&&(c&&this.processEdgeCases(s,i(l),n(h)),this.processSubBlock(s,l,h,u,c,m),l=null,u=null,c=!1),m)break;h=d}else{if(s.drawableBefore&&s.drawableAfter){var f=!e(s.drawableBefore,s.drawableAfter);this.processEdgeCases(s,f,f)}s.drawableBefore&&!n(s.drawableBefore)?this.linkAfterDrawable(s.drawableBefore):s.drawableAfter&&!i(s.drawableAfter)&&this.linkBeforeDrawable(s.drawableAfter)}},processSubBlock:function(t,e,r,s,a,o){var h=i(e),l=n(r);h&&(s=e.previousDrawable.pendingParentDrawable),l&&(s=r.nextDrawable.pendingParentDrawable),s=this.ensureUsedBlock(s,e);for(var u=e;this.notePendingAddition(u,s),u!==r;u=u.nextDrawable);h||this.linkBeforeDrawable(e),o&&!l&&this.linkAfterDrawable(r)},processEdgeCases:function(t,e,i){if(null!==t.drawableBefore&&null!==t.drawableAfter){var n=t.drawableBefore.pendingParentDrawable,r=t.drawableAfter.pendingParentDrawable,s=t.nextChangeInterval&&t.nextChangeInterval.drawableAfter?t.nextChangeInterval.drawableAfter.pendingParentDrawable:null;n===r&&(this.blockWasAdded=!0);var a;e&&i?a=n:this.blockWasAdded||n===r?(a=this.createBlock(t.drawableAfter.renderer,t.drawableAfter),this.blockOrderChanged=!0):a=r,r===a?this.blockWasAdded=!0:this.changeExternals(t,a),s!==r&&(this.blockWasAdded||this.unuseBlock(r),this.blockWasAdded=!1)}},changeExternals:function(t,e){var i=o(t);this.notePendingMoves(e,t.drawableAfter,i),t.nextChangeInterval&&t.nextChangeInterval.drawableBefore===i||this.linkAfterDrawable(i)},notePendingMoves:function(t,e,i){for(var n=e;this.notePendingMove(n,t),n!==i;n=n.nextDrawable);},ensureUsedBlock:function(t,e){return t?t.used||this.useBlock(t):t=this.getBlockForRenderer(e.renderer,e),t},getBlockForRenderer:function(t,e){var i;if(!c.isDOM(t))for(var n=this.reusableBlocks.length-1;n>=0;n--){var r=this.reusableBlocks[n];if(r.renderer===t){this.useBlockAtIndex(r,n),i=r;break}}return i||(i=this.createBlock(t,e)),this.blockOrderChanged=!0,i},unuseBlock:function(t){t.used&&(t.used=!1,this.reusableBlocks.push(t))},useBlock:function(t){this.useBlockAtIndex(t,_.indexOf(this.reusableBlocks,t))},useBlockAtIndex:function(t,e){this.reusableBlocks.splice(e,1),t.used=!0},removeUnusedBlocks:function(){for(;this.reusableBlocks.length;){var t=this.reusableBlocks.pop();this.markBlockForDisposal(t),this.blockOrderChanged=!0}},linkBeforeDrawable:function(t){var e=t.previousDrawable;this.linkBlocks(e?e.pendingParentDrawable:null,t.pendingParentDrawable,e,t)},linkAfterDrawable:function(t){var e=t.nextDrawable;this.linkBlocks(t.pendingParentDrawable,e?e.pendingParentDrawable:null,t,e)},linkBlocks:function(t,e,i,n){t&&(t.nextBlock!==e&&(this.blockOrderChanged=!0,t.nextBlock&&(t.nextBlock.previousBlock=null),t.nextBlock=e),this.markAfterBlock(t,i)),e&&(e.previousBlock!==t&&(this.blockOrderChanged=!0,e.previousBlock&&(e.previousBlock.nextBlock=null),e.previousBlock=t),this.markBeforeBlock(e,n))},processBlockLinkedList:function(t,e,i){for(;t.blocks.length;)t.blocks.pop();if(e)for(var n=e;t.blocks.push(n),n!==i;n=n.nextBlock);}},f=h(d,function(){},m);return u.register("GreedyStitcher",f),f.stitchPrototype=m,f}),i("SCENERY/display/RebuildStitcher",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/Renderer","SCENERY/display/Stitcher"],function(t){"use strict";var e=t("PHET_CORE/inherit"),i=t("SCENERY/scenery"),n=t("SCENERY/display/Renderer"),r=t("SCENERY/display/Stitcher"),s={stitch:function(t,e,i,r,s,a,o){this.initialize(t,e,i,r,s,a,o);for(var h=t.previousFirstDrawable;null!==h&&(this.notePendingRemoval(h),h!==t.previousLastDrawable);h=h.oldNextDrawable);this.recordBackboneBoundaries(),this.removeAllBlocks();for(var l=null,u=0,c=null,d=e;null!==d&&(l&&d.renderer===u||(l&&this.notifyInterval(l,c,d.previousDrawable),u=d.renderer,l=this.createBlock(u,d),n.isDOM(u)&&(u=0),this.appendBlock(l),c=d),this.notePendingAddition(d,l),d!==i);d=d.nextDrawable);l&&this.notifyInterval(l,c,i),this.reindex(),this.clean()}},a=e(r,function(){},s);return i.register("RebuildStitcher",a),a.stitchPrototype=s,a}),i("SCENERY/display/BackboneDrawable",["require","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/Drawable","SCENERY/display/Stitcher","SCENERY/display/GreedyStitcher","SCENERY/display/RebuildStitcher","SCENERY/util/Util"],function(t){"use strict";function e(t,e,i,n,r){this.initialize(t,e,i,n,r)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("PHET_CORE/cleanArray"),s=t("SCENERY/scenery"),a=t("SCENERY/display/Drawable"),o=(t("SCENERY/display/Stitcher"),t("SCENERY/display/GreedyStitcher")),h=t("SCENERY/display/RebuildStitcher"),l=t("SCENERY/util/Util"),u=!0;return s.register("BackboneDrawable",e),i(a,e,{initialize:function(t,i,n,s,c){if(a.call(this,s),this.display=t,this.forceAcceleration=!1,this.backboneInstance=i,this.transformRootInstance=n,this.filterRootAncestorInstance=i.parent?i.parent.getFilterRootInstance():i,this.transformRootAncestorInstance=i.parent?i.parent.getTransformRootInstance():i,this.willApplyTransform=this.transformRootAncestorInstance!==this.transformRootInstance,this.willApplyFilters=this.filterRootAncestorInstance!==this.backboneInstance,this.transformListener=this.transformListener||this.markTransformDirty.bind(this),this.willApplyTransform&&(this.backboneInstance.relativeTransform.addListener(this.transformListener),this.backboneInstance.relativeTransform.addPrecompute()),this.backboneVisibilityListener=this.backboneVisibilityListener||this.updateBackboneVisibility.bind(this),this.backboneInstance.onStatic("relativeVisibility",this.backboneVisibilityListener),this.updateBackboneVisibility(),this.visibilityDirty=!0,this.renderer=s,this.domElement=c?t._domElement:e.createDivBackbone(),this.isDisplayRoot=c,this.dirtyDrawables=r(this.dirtyDrawables),l.prepareForTransform(this.domElement,this.forceAcceleration),this.watchedFilterNodes=r(this.watchedFilterNodes),this.opacityDirty=!0,this.clipDirty=!0,this.opacityDirtyListener=this.opacityDirtyListener||this.markOpacityDirty.bind(this),this.clipDirtyListener=this.clipDirtyListener||this.markClipDirty.bind(this),this.willApplyFilters)for(var d=this.backboneInstance;d!==this.filterRootAncestorInstance;d=d.parent){var m=d.node;this.watchedFilterNodes.push(m),m.onStatic("opacity",this.opacityDirtyListener),m.onStatic("clip",this.clipDirtyListener)}return this.lastZIndex=0,this.blocks=this.blocks||[],this.previousFirstDrawable=null,this.previousLastDrawable=null,this.removedDrawables=!1,this.stitcher=this.stitcher||(u?new o:new h),this},dispose:function(){for(;this.watchedFilterNodes.length;){var t=this.watchedFilterNodes.pop();t.offStatic("opacity",this.opacityDirtyListener),t.offStatic("clip",this.clipDirtyListener)}if(this.backboneInstance.offStatic("relativeVisibility",this.backboneVisibilityListener),!this.removedDrawables)for(var e=this.previousFirstDrawable;null!==e&&(e.parentDrawable.removeDrawable(e),e!==this.previousLastDrawable);e=e.nextDrawable);this.markBlocksForDisposal(),this.willApplyTransform&&(this.backboneInstance.relativeTransform.removeListener(this.transformListener),this.backboneInstance.relativeTransform.removePrecompute()),this.backboneInstance=null,this.transformRootInstance=null,this.filterRootAncestorInstance=null,this.transformRootAncestorInstance=null,r(this.dirtyDrawables),r(this.watchedFilterNodes),this.previousFirstDrawable=null,this.previousLastDrawable=null,a.prototype.dispose.call(this)},markBlocksForDisposal:function(){for(;this.blocks.length;){var t=this.blocks.pop();t.domElement.parentNode===this.domElement&&this.domElement.removeChild(t.domElement),t.markForDisposal(this.display)}},updateBackboneVisibility:function(){this.visible=this.backboneInstance.relativeVisible,this.visibilityDirty||(this.visibilityDirty=!0,this.markDirty())},markForDisposal:function(t){for(var e=this.previousFirstDrawable;null!==e&&(e.notePendingRemoval(this.display),e!==this.previousLastDrawable);e=e.oldNextDrawable);this.removedDrawables=!0,a.prototype.markForDisposal.call(this,t)},markDirtyDrawable:function(t){this.dirtyDrawables.push(t),this.markDirty()},markTransformDirty:function(){s.Util.applyPreparedTransform(this.backboneInstance.relativeTransform.matrix,this.domElement,this.forceAcceleration)},markOpacityDirty:function(){this.opacityDirty||(this.opacityDirty=!0,this.markDirty())},markClipDirty:function(){this.clipDirty||(this.clipDirty=!0,this.markDirty())},update:function(){if(this.dirty&&!this.disposed){for(this.dirty=!1;this.dirtyDrawables.length;)this.dirtyDrawables.pop().update();if(this.opacityDirty){this.opacityDirty=!1;var t=this.willApplyFilters?this.getFilterOpacity():1;this.domElement.style.opacity=1!==t?t:""}if(this.visibilityDirty&&(this.visibilityDirty=!1,this.domElement.style.display=this.visible?"":"none"),this.clipDirty){this.clipDirty=!1;var e=this.willApplyFilters?this.getFilterClip():"";this.domElement.style.clipPath=e}}},getFilterOpacity:function(){for(var t=1,e=this.watchedFilterNodes.length,i=0;e>i;i++)t*=this.watchedFilterNodes[i].getOpacity();return t},getFilterVisibility:function(){for(var t=this.watchedFilterNodes.length,e=0;t>e;e++)if(!this.watchedFilterNodes[e].isVisible())return!1;return!0},getFilterClip:function(){var t="";return t},reindexBlocks:function(){for(var t=0,e=0;e<this.blocks.length;e++){var i=this.blocks[e];if(i.zIndex<=t){var n=e+1<this.blocks.length&&this.blocks[e+1].zIndex-1>t?Math.ceil((t+this.blocks[e+1].zIndex)/2):t+20;i.domElement.style.zIndex=i.zIndex=n}t=i.zIndex}this.lastZIndex=t+1},stitch:function(t,e,i,n){if(null!==i&&null!==n){for(var r=null,s=i,a=!1;s;)a=s.constrict()||a,s.isEmpty()?r&&(r.nextChangeInterval=s.nextChangeInterval):(r||(i=s),r=s),s=s.nextChangeInterval;if(r){n=r,n.nextChangeInterval=null;this.stitcher.stitch(this,t,e,this.previousFirstDrawable,this.previousLastDrawable,i,n)}}},audit:function(t,e,i){}}),e.createDivBackbone=function(){var t=document.createElement("div");return t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.width="0",t.style.height="0",t},e.repurposeBackboneContainer=function(t){return("relative"!==t.style.position||"absolute"!==t.style.position)&&(t.style.position="relative"),
t.style.left="0",t.style.top="0",t},n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r,s,a){return t.length?t.pop().initialize(i,n,r,s,a):new e(i,n,r,s,a)}}}),e}),i("SCENERY/display/ChangeInterval",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/Drawable"],function(t){"use strict";function e(t,e){this.initialize(t,e)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/scenery");t("SCENERY/display/Drawable");return r.register("ChangeInterval",e),i(Object,e,{initialize:function(t,e){return this.nextChangeInterval=null,this.drawableBefore=t,this.drawableAfter=e,this.collapsedEmpty=!1,this},dispose:function(){this.nextChangeInterval=null,this.drawableBefore=null,this.drawableAfter=null,this.freeToPool()},constrict:function(){var t=!1;if(this.isEmpty())return!0;for(;this.drawableBefore&&this.drawableBefore.nextDrawable===this.drawableBefore.oldNextDrawable;)if(this.drawableBefore=this.drawableBefore.nextDrawable,t=!0,this.drawableBefore||(this.collapsedEmpty=!0),this.isEmpty())return!0;for(;this.drawableAfter&&this.drawableAfter.previousDrawable===this.drawableAfter.oldPreviousDrawable;)if(this.drawableAfter=this.drawableAfter.previousDrawable,t=!0,this.drawableAfter||(this.collapsedEmpty=!0),this.isEmpty())return!0;return t},isEmpty:function(){return this.collapsedEmpty||null!==this.drawableBefore&&this.drawableBefore===this.drawableAfter},getOldInternalDrawableCount:function(t,e){for(var i=this.drawableBefore?this.drawableBefore.oldNextDrawable:t,n=this.drawableAfter,r=0,s=i;s!==n;s=s.oldNextDrawable)r++;return r},getNewInternalDrawableCount:function(t,e){for(var i=this.drawableBefore?this.drawableBefore.nextDrawable:t,n=this.drawableAfter,r=0,s=i;s!==n;s=s.nextDrawable)r++;return r}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n){return t.length?t.pop().initialize(i,n):new e(i,n)}}}),e.newForDisplay=function(t,i,n){var r=e.createFromPool(t,i);return n.markChangeIntervalToDispose(r),r},e}),i("SCENERY/display/RelativeTransform",["require","PHET_CORE/inherit","PHET_CORE/cleanArray","DOT/Matrix3","SCENERY/scenery"],function(t){"use strict";function e(t){this.instance=t}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/cleanArray"),r=t("DOT/Matrix3"),s=t("SCENERY/scenery");return s.register("RelativeTransform",e),i(Object,e,{initialize:function(t,e){return this.display=t,this.trail=e,this.node=e&&e.lastNode(),this.transformDirty=!0,this.nodeTransformListener=this.nodeTransformListener||this.onNodeTransformDirty.bind(this),this.matrix=this.matrix||r.identity(),this.relativeSelfDirty=!0,this.relativeChildrenListenersCount=0,this.relativePrecomputeCount=0,this.relativeChildrenPrecomputeCount=0,this.relativeFrameId=-1,this.relativeChildDirtyFrame=t?t._frameId:0,this.relativeTransformListeners=n(this.relativeTransformListeners),this},get parent(){return this.instance.parent?this.instance.parent.relativeTransform:null},insertInstance:function(t,e){t.stateless||(t.relativeTransform.hasAncestorListenerNeed()&&this.incrementTransformListenerChildren(),t.relativeTransform.hasAncestorComputeNeed()&&this.incrementTransformPrecomputeChildren()),t.relativeTransform.forceMarkTransformDirty()},removeInstanceWithIndex:function(t,e){t.relativeTransform.hasAncestorListenerNeed()&&this.decrementTransformListenerChildren(),t.relativeTransform.hasAncestorComputeNeed()&&this.decrementTransformPrecomputeChildren()},attachNodeListeners:function(){this.node.onStatic("transform",this.nodeTransformListener)},detachNodeListeners:function(){this.node.offStatic("transform",this.nodeTransformListener)},hasDescendantListenerNeed:function(){return this.instance.isTransformed?this.relativeChildrenListenersCount>0:this.relativeChildrenListenersCount>0||this.relativeTransformListeners.length>0},hasAncestorListenerNeed:function(){return this.instance.isTransformed?this.relativeTransformListeners.length>0:this.relativeChildrenListenersCount>0||this.relativeTransformListeners.length>0},hasSelfListenerNeed:function(){return this.relativeTransformListeners.length>0},incrementTransformListenerChildren:function(){var t=this.hasAncestorListenerNeed();this.relativeChildrenListenersCount++,t!==this.hasAncestorListenerNeed()&&this.parent&&this.parent.incrementTransformListenerChildren()},decrementTransformListenerChildren:function(){var t=this.hasAncestorListenerNeed();this.relativeChildrenListenersCount--,t!==this.hasAncestorListenerNeed()&&this.parent&&this.parent.decrementTransformListenerChildren()},addListener:function(t){var e=this.hasAncestorListenerNeed();this.relativeTransformListeners.push(t),e!==this.hasAncestorListenerNeed()&&(this.parent&&this.parent.incrementTransformListenerChildren(),this.hasAncestorComputeNeed()||this.forceMarkTransformDirty())},removeListener:function(t){var e=this.hasAncestorListenerNeed();this.relativeTransformListeners.splice(_.indexOf(this.relativeTransformListeners,t),1),e!==this.hasAncestorListenerNeed()&&this.parent&&this.parent.decrementTransformListenerChildren()},hasDescendantComputeNeed:function(){return this.instance.isTransformed?this.relativeChildrenPrecomputeCount>0:this.relativeChildrenPrecomputeCount>0||this.relativePrecomputeCount>0},hasAncestorComputeNeed:function(){return this.instance.isTransformed?this.relativePrecomputeCount>0:this.relativeChildrenPrecomputeCount>0||this.relativePrecomputeCount>0},hasSelfComputeNeed:function(){return this.relativePrecomputeCount>0},incrementTransformPrecomputeChildren:function(){var t=this.hasAncestorComputeNeed();this.relativeChildrenPrecomputeCount++,t!==this.hasAncestorComputeNeed()&&this.parent&&this.parent.incrementTransformPrecomputeChildren()},decrementTransformPrecomputeChildren:function(){var t=this.hasAncestorComputeNeed();this.relativeChildrenPrecomputeCount--,t!==this.hasAncestorComputeNeed()&&this.parent&&this.parent.decrementTransformPrecomputeChildren()},addPrecompute:function(){var t=this.hasAncestorComputeNeed();this.relativePrecomputeCount++,t!==this.hasAncestorComputeNeed()&&(this.parent&&this.parent.incrementTransformPrecomputeChildren(),this.hasAncestorListenerNeed()||this.forceMarkTransformDirty())},removePrecompute:function(){var t=this.hasAncestorComputeNeed();this.relativePrecomputeCount--,t!==this.hasAncestorComputeNeed()&&this.parent&&this.parent.decrementTransformPrecomputeChildren()},onNodeTransformDirty:function(){this.transformDirty||this.forceMarkTransformDirty()},forceMarkTransformDirty:function(){this.transformDirty=!0,this.relativeSelfDirty=!0;for(var t=this.display._frameId,e=this.instance.parent;e&&e.relativeTransform.relativeChildDirtyFrame!==t;){var i=e.parent,n=e.isTransformed;if(e.relativeTransform.relativeChildDirtyFrame=t,null===i){this.display.markTransformRootDirty(e,n);break}if(n){this.display.markTransformRootDirty(e,!0);break}e=i}},computeRelativeTransform:function(){var t=this.node.getMatrix();this.instance.parent&&!this.instance.parent.isTransformed?(this.matrix.set(this.parent.matrix),this.matrix.multiplyMatrix(t)):this.matrix.set(t),this.relativeFrameId=this.display._frameId,this.relativeSelfDirty=!1},isValidationNotNeeded:function(){return this.hasAncestorComputeNeed()||this.relativeFrameId===this.display._frameId},validate:function(){if(!this.isValidationNotNeeded()&&(this.instance.parent&&!this.instance.parent.isTransformed&&this.parent.validate(),this.relativeSelfDirty)){this.computeRelativeTransform();for(var t=this.instance.children.length,e=0;t>e;e++)this.instance.children[e].relativeTransform.relativeSelfDirty=!0}},updateTransformListenersAndCompute:function(t,e,i,n){var r,s;if(n)for(r=this.instance.children.length,s=0;r>s;s++)this.instance.children[s].relativeTransform.updateTransformListenersAndCompute(!1,!1,i,!1);else{var a=t||this.relativeSelfDirty,o=a||this.relativeChildDirtyFrame===i,h=this.hasDescendantComputeNeed(),l=this.hasDescendantListenerNeed(),u=this.hasSelfComputeNeed(),c=this.hasSelfListenerNeed();if(h||!a||e||(this.relativeSelfDirty=!0),!o||!h&&!l&&!u&&!c)return;if(a&&(h||u)&&this.computeRelativeTransform(),this.transformDirty&&(this.transformDirty=!1),this.notifyRelativeTransformListeners(),!this.instance.isTransformed||n){var d=a&&!(h||u);for(r=this.instance.children.length,s=0;r>s;s++)this.instance.children[s].relativeTransform.updateTransformListenersAndCompute(a,d,i,!1)}}},notifyRelativeTransformListeners:function(){for(var t=this.relativeTransformListeners.length,e=0;t>e;e++)this.relativeTransformListeners[e]()},audit:function(t,e){}}),e}),i("SCENERY/display/Fittability",["require","PHET_CORE/inherit","AXON/Emitter","SCENERY/scenery"],function(t){"use strict";function e(t){this.instance=t}var i=t("PHET_CORE/inherit"),n=t("AXON/Emitter"),r=t("SCENERY/scenery");return r.register("Fittability",e),i(Object,e,{initialize:function(t,e){return this.display=t,this.trail=e,this.node=e&&e.lastNode(),this.selfFittable=!!e&&this.isSelfFitSupported(),this.ancestorsFittable=this.selfFittable,this.subtreeUnfittableCount=this.selfFittable?0:1,this.subtreeFittabilityChange=this.subtreeFittabilityChange||new n,this},get parent(){return this.instance.parent?this.instance.parent.fittability:null},checkSelfFittability:function(){var t=this.isSelfFitSupported();this.selfFittable!==t&&this.updateSelfFittable()},isSelfFitSupported:function(){return!this.node.isPreventFit()},markSubtreeFittable:function(){if(this.selfFittable){this.ancestorsFittable=!0;for(var t=this.instance.children,e=0;e<t.length;e++)t[e].fittability.markSubtreeFittable();this.instance.updateDrawableFittability(!0)}},markSubtreeUnfittable:function(){if(this.ancestorsFittable){this.ancestorsFittable=!1;for(var t=this.instance.children,e=0;e<t.length;e++)t[e].markSubtreeUnfittable();this.instance.updateDrawableFittability(!1)}},updateSelfFittable:function(){var t=this.isSelfFitSupported();this.selfFittable=t,!this.selfFittable||this.parent&&!this.parent.ancestorsFittable?this.selfFittable||this.markSubtreeUnfittable():this.markSubtreeFittable(),this.selfFittable?this.decrementSubtreeUnfittableCount():this.incrementSubtreeUnfittableCount()},incrementSubtreeUnfittableCount:function(){this.subtreeUnfittableCount++,1===this.subtreeUnfittableCount&&(this.parent&&this.parent.incrementSubtreeUnfittableCount(),this.subtreeFittabilityChange.emit())},decrementSubtreeUnfittableCount:function(){this.subtreeUnfittableCount--,0===this.subtreeUnfittableCount&&(this.parent&&this.parent.decrementSubtreeUnfittableCount(),this.subtreeFittabilityChange.emit())},onInsert:function(t){this.ancestorsFittable||t.markSubtreeUnfittable(),t.subtreeUnfittableCount>0&&this.incrementSubtreeUnfittableCount()},onRemove:function(t){this.ancestorsFittable||t.markSubtreeFittable(),t.subtreeUnfittableCount>0&&this.decrementSubtreeUnfittableCount()},audit:function(){}}),e}),i("SCENERY/display/Instance",["require","PHET_CORE/inherit","PHET_CORE/Poolable","PHET_CORE/cleanArray","SCENERY/scenery","SCENERY/display/ChangeInterval","SCENERY/display/Drawable","SCENERY/display/Renderer","SCENERY/display/RelativeTransform","SCENERY/display/Fittability","SCENERY/util/Util","AXON/Events"],function(t){"use strict";function e(t,e,i,n){d.call(this),this.active=!1,this.initialize(t,e,i,n)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("PHET_CORE/cleanArray"),s=t("SCENERY/scenery"),a=t("SCENERY/display/ChangeInterval"),o=t("SCENERY/display/Drawable"),h=t("SCENERY/display/Renderer"),l=t("SCENERY/display/RelativeTransform"),u=t("SCENERY/display/Fittability"),c=t("SCENERY/util/Util"),d=t("AXON/Events"),m=1,f=c.isWebGLSupported,p=h.createOrderBitmask(h.bitmaskSVG,h.bitmaskCanvas,h.bitmaskDOM,h.bitmaskWebGL);return s.register("Instance",e),i(d,e,{initialize:function(t,e,i,n){return e.setImmutable(),this.id=this.id||m++,this.relativeTransform=this.relativeTransform||new l(this),this.fittability=this.fittability||new u(this),this.visible=!0,this.relativeVisible=!0,this.selfVisible=!0,this.visibilityDirty=!0,this.childVisibilityDirty=!0,this.addRemoveCounter=0,this.stitchChangeFrame=t._frameId,this.stitchChangeBefore=0,this.stitchChangeAfter=0,this.stitchChangeOnChildren=0,this.stitchChangeIncluded=!1,this.childInsertedListener=this.childInsertedListener||this.onChildInserted.bind(this),this.childRemovedListener=this.childRemovedListener||this.onChildRemoved.bind(this),this.visibilityListener=this.visibilityListener||this.onVisibilityChange.bind(this),this.markRenderStateDirtyListener=this.markRenderStateDirtyListener||this.markRenderStateDirty.bind(this),this.cleanInstance(t,e),this.node.addInstance(this),this.externalReferenceCount=0,this.stateless=!0,this.isDisplayRoot=i,this.isSharedCanvasCacheRoot=n,this.preferredRenderers=0,this.isUnderCanvasCache=n,this.isBackbone=!1,this.isTransformed=!1,this.isVisibilityApplied=!1,this.isInstanceCanvasCache=!1,this.isSharedCanvasCachePlaceholder=!1,this.isSharedCanvasCacheSelf=n,this.selfRenderer=0,this.groupRenderer=0,this.sharedCacheRenderer=0,this.renderStateDirtyFrame=t._frameId,this.skipPruningFrame=t._frameId,this.active=!0,this},cleanInstance:function(t,e){this.display=t,this.trail=e,this.node=e?e.lastNode():null,this.parent=null,this.oldParent=null,this.children=r(this.children),this.sharedCacheInstance=null,this.relativeTransform.initialize(t,e),this.fittability.initialize(t,e),this.instanceRemovalCheckList=r(this.instanceRemovalCheckList),this.selfDrawable=null,this.groupDrawable=null,this.sharedCacheDrawable=null,this.firstDrawable=null,this.lastDrawable=null,this.firstInnerDrawable=null,this.lastInnerDrawable=null,this.svgGroups=r(this.svgGroups),this.cleanSyncTreeResults()},cleanSyncTreeResults:function(){this.beforeStableIndex=this.children.length,this.afterStableIndex=-1,this.firstChangeInterval=null,this.lastChangeInterval=null,this.incompatibleStateChange=!1,this.groupChanged=!1,this.cascadingStateChange=!1,this.anyStateChange=!1},updateRenderingState:function(){var t=this.isBackbone,e=this.isTransformed,i=this.isVisibilityApplied,n=this.isInstanceCanvasCache,r=this.isSharedCanvasCacheSelf,s=this.isSharedCanvasCachePlaceholder,a=this.isUnderCanvasCache,o=this.selfRenderer,l=this.groupRenderer,u=this.sharedCacheRenderer,c=this.preferredRenderers;this.isBackbone=!1,this.isTransformed=!1,this.isVisibilityApplied=!1,this.isInstanceCanvasCache=!1,this.isSharedCanvasCacheSelf=!1,this.isSharedCanvasCachePlaceholder=!1,this.selfRenderer=0,this.groupRenderer=0,this.sharedCacheRenderer=0;var d=this.node._hints;this.isUnderCanvasCache=this.isSharedCanvasCacheRoot||(this.parent?this.parent.isUnderCanvasCache||this.parent.isInstanceCanvasCache||this.parent.isSharedCanvasCacheSelf:!1),this.preferredRenderers=this.parent?this.parent.preferredRenderers:p,d.renderer&&(this.preferredRenderers=h.pushOrderBitmask(this.preferredRenderers,d.renderer));var m=this.node.hasClipArea(),g=1!==this.node.opacity||d.usesOpacity,b=d.requireElement||d.cssTransform||d.layerSplit,v=this.isDisplayRoot||!this.isUnderCanvasCache&&b,E=!v&&(g||m)&&this.node._rendererSummary.isSubtreeRenderedExclusivelySVG(this.preferredRenderers),S=E?!1:v||g||m;if(S?(this.isBackbone=!0,this.isVisibilityApplied=!0,this.isTransformed=this.isDisplayRoot||!!d.cssTransform,this.groupRenderer=h.bitmaskDOM):!E&&(g||m||d.canvasCache)&&(d.singleCache?this.isSharedCanvasCacheRoot?(this.isSharedCanvasCacheSelf=!0,this.sharedCacheRenderer=f?h.bitmaskWebGL:h.bitmaskCanvas):this.isSharedCanvasCachePlaceholder=!0:(this.isInstanceCanvasCache=!0,this.isUnderCanvasCache=!0,this.groupRenderer=f?h.bitmaskWebGL:h.bitmaskCanvas)),this.node.isPainted())if(this.isUnderCanvasCache)this.selfRenderer=h.bitmaskCanvas;else{var y=this.node._rendererBitmask;if(!f){var C=h.bitmaskWebGL;y^=y&C}this.selfRenderer=y&h.bitmaskOrder(this.preferredRenderers,0)||y&h.bitmaskOrder(this.preferredRenderers,1)||y&h.bitmaskOrder(this.preferredRenderers,2)||y&h.bitmaskOrder(this.preferredRenderers,3)||y&h.bitmaskSVG||y&h.bitmaskCanvas||y&h.bitmaskDOM||y&h.bitmaskWebGL||0}this.groupChanged=t!==this.isBackbone||n!==this.isInstanceCanvasCache||r!==this.isSharedCanvasCacheSelf,this.cascadingStateChange=a!==this.isUnderCanvasCache||c!==this.preferredRenderers,this.incompatibleStateChange=this.isTransformed!==e||this.isSharedCanvasCachePlaceholder!==s,this.anyStateChange=this.groupChanged||this.cascadingStateChange||this.incompatibleStateChange||o!==this.selfRenderer||l!==this.groupRenderer||u!==this.sharedCacheRenderer,i!==this.isVisibilityApplied&&(this.visibilityDirty=!0,this.parent&&this.parent.markChildVisibilityDirty()),this.fittability.checkSelfFittability()},getStateString:function(){var t="S[ "+(this.isDisplayRoot?"displayRoot ":"")+(this.isBackbone?"backbone ":"")+(this.isInstanceCanvasCache?"instanceCache ":"")+(this.isSharedCanvasCachePlaceholder?"sharedCachePlaceholder ":"")+(this.isSharedCanvasCacheSelf?"sharedCacheSelf ":"")+(this.isTransformed?"TR ":"")+(this.isVisibilityApplied?"VIS ":"")+(this.selfRenderer?this.selfRenderer.toString(16):"-")+","+(this.groupRenderer?this.groupRenderer.toString(16):"-")+","+(this.sharedCacheRenderer?this.sharedCacheRenderer.toString(16):"-")+" ";return t+"]"},baseSyncTree:function(){this.syncTree(),this.cleanSyncTreeResults()},syncTree:function(){var t=this.stateless;if((t||this.parent&&this.parent.cascadingStateChange||this.renderStateDirtyFrame===this.display._frameId)&&this.updateRenderingState(),!t&&this.incompatibleStateChange)return!1;if(this.stateless=!1,t&&(this.isTransformed&&this.display.markTransformRootDirty(this,!0),this.attachNodeListeners()),this.isSharedCanvasCachePlaceholder)this.sharedSyncTree();else if(t||this.skipPruningFrame===this.display._frameId||this.anyStateChange){this.prepareChildInstances(t);var e=(this.firstDrawable,this.lastDrawable,this.firstInnerDrawable,this.lastInnerDrawable,this.updateSelfDrawable());this.localSyncTree(e),this.groupSyncTree(t)}return!0},localSyncTree:function(t){var e=this.display._frameId,i=this.selfDrawable,n=i,r=null;t&&(r=a.newForDisplay(null,null,this.display));for(var s=r,h=t?null:this.selfDrawable,l=0;l<this.children.length;l++){var u=this.children[l],c=u.syncTree();c||(u=this.updateIncompatibleChildInstance(u,l),u.syncTree());var d=u.shouldIncludeInParentDrawables();d&&u.firstDrawable&&(n?o.connectDrawables(n,u.firstDrawable,this.display):i=u.firstDrawable,n=u.lastDrawable);var m=u.stitchChangeIncluded,f=d;u.stitchChangeIncluded=f,u.stitchChangeFrame===e&&(u.firstChangeInterval=u.lastChangeInterval=a.newForDisplay(null,null,this.display));var p=u.firstChangeInterval,g=s&&null===s.drawableAfter,b=p&&null===p.drawableBefore,v=u.stitchChangeBefore===e&&!g&&!b;if(v){var E=a.newForDisplay(h,null,this.display);s&&(s.nextChangeInterval=E),s=E,r=r||s,g=!0}if((m||f)&&(g?p?null===p.drawableBefore?(s.drawableAfter=p.drawableAfter,s.nextChangeInterval=p.nextChangeInterval,s=u.lastChangeInterval===p?s:u.lastChangeInterval):(s.drawableAfter=u.firstDrawable,s.nextChangeInterval=p,s=u.lastChangeInterval):s.drawableAfter=u.firstDrawable:p&&(r=r||p,null===p.drawableBefore&&(p.drawableBefore=h),s&&(s.nextChangeInterval=p),s=u.lastChangeInterval),h=s&&null===s.drawableAfter?null:u.lastDrawable?u.lastDrawable:h),l===this.children.length-1&&u.stitchChangeAfter===e&&(!s||null!==s.drawableAfter)){var S=a.newForDisplay(h,null,this.display);s&&(s.nextChangeInterval=S),s=S,r=r||s}u.cleanSyncTreeResults()}r||this.stitchChangeOnChildren!==this.display._frameId||0!==this.children.length||(r=s=a.newForDisplay(null,null,this.display)),this.firstChangeInterval=r,this.lastChangeInterval=s,this.firstDrawable=this.firstInnerDrawable=i,this.lastDrawable=this.lastInnerDrawable=n},updateSelfDrawable:function(){if(this.node.isPainted()){var t=this.selfRenderer;if(!this.selfDrawable||0===(this.selfDrawable.renderer&t&h.bitmaskRendererArea))return this.selfDrawable&&this.selfDrawable.markForDisposal(this.display),this.selfDrawable=h.createSelfDrawable(this,this.node,t,this.fittability.ancestorsFittable),!0}return!1},updateIncompatibleChildInstance:function(t,i){this.display.markInstanceRootForDisposal(t);var n=e.createFromPool(this.display,this.trail.copy().addDescendant(t.node,i),!1,!1);return this.replaceInstanceWithIndex(t,n,i),n},groupSyncTree:function(t){var e=this.groupRenderer,i=!!e!=!!this.groupDrawable||!t&&this.groupChanged||this.groupDrawable&&this.groupDrawable.renderer!==e;i&&(this.groupDrawable&&(this.groupDrawable.markForDisposal(this.display),this.groupDrawable=null),this.firstChangeInterval=this.lastChangeInterval=a.newForDisplay(null,null,this.display)),e&&(this.firstDrawable&&o.disconnectBefore(this.firstDrawable,this.display),this.lastDrawable&&o.disconnectAfter(this.lastDrawable,this.display),this.isBackbone?(i&&(this.groupDrawable=s.BackboneDrawable.createFromPool(this.display,this,this.getTransformRootInstance(),e,this.isDisplayRoot),this.isTransformed&&this.display.markTransformRootDirty(this,!0)),this.firstChangeInterval&&this.groupDrawable.stitch(this.firstDrawable,this.lastDrawable,this.firstChangeInterval,this.lastChangeInterval)):this.isInstanceCanvasCache?(i&&(this.groupDrawable=s.InlineCanvasCacheDrawable.createFromPool(e,this)),this.firstChangeInterval&&this.groupDrawable.stitch(this.firstDrawable,this.lastDrawable,this.firstChangeInterval,this.lastChangeInterval)):this.isSharedCanvasCacheSelf&&i&&(this.groupDrawable=s.CanvasBlock.createFromPool(e,this)),this.groupDrawable.setFittable(this.fittability.ancestorsFittable),this.firstDrawable=this.lastDrawable=this.groupDrawable),i?this.firstChangeInterval=this.lastChangeInterval=a.newForDisplay(null,null,this.display):e&&(this.firstChangeInterval=this.lastChangeInterval=null)},sharedSyncTree:function(){this.ensureSharedCacheInitialized();var t=this.sharedCacheRenderer;this.sharedCacheDrawable&&this.sharedCacheDrawable.renderer===t||(this.sharedCacheDrawable&&this.sharedCacheDrawable.markForDisposal(this.display),this.sharedCacheDrawable=new s.SharedCanvasCacheDrawable(this.trail,t,this,this.sharedCacheInstance),this.firstDrawable=this.sharedCacheDrawable,this.lastDrawable=this.sharedCacheDrawable,this.firstChangeInterval=this.lastChangeInterval=a.newForDisplay(null,null,this.display))},prepareChildInstances:function(t){for(;this.instanceRemovalCheckList.length;){var i=this.instanceRemovalCheckList.pop();-1===i.addRemoveCounter&&(i.addRemoveCounter=0,this.display.markInstanceRootForDisposal(i))}if(t)for(var n=0;n<this.node.children.length;n++){var r=this.node.children[n];this.appendInstance(e.createFromPool(this.display,this.trail.copy().addDescendant(r,n),!1,!1))}},ensureSharedCacheInitialized:function(){if(!this.sharedCacheInstance){var t=this.node.getId();this.sharedCacheInstance=this.display._sharedCanvasInstances[t],this.sharedCacheInstance||(this.sharedCacheInstance=e.createFromPool(this.display,new s.Trail(this.node),!1,!0),this.sharedCacheInstance.syncTree(),this.display._sharedCanvasInstances[t]=this.sharedCacheInstance,this.display.markTransformRootDirty(this.sharedCacheInstance,!0)),this.sharedCacheInstance.externalReferenceCount++,this.isTransformed&&this.display.markTransformRootDirty(this,!0)}},shouldIncludeInParentDrawables:function(){return this.node.isVisible()||!this.node.isExcludeInvisible()},findPreviousDrawable:function(t){for(var e=t-1;e>=0;e--){var i=this.children[e].lastDrawable;if(null!==i)return i}return null},findNextDrawable:function(t){for(var e=this.children.length,i=t+1;e>i;i++){var n=this.children[i].firstDrawable;if(null!==n)return n}return null},appendInstance:function(t){this.insertInstance(t,this.children.length)},insertInstance:function(t,e){t.stitchChangeFrame=this.display._frameId,this.stitchChangeOnChildren=this.display._frameId,this.children.splice(e,0,t),t.parent=this,t.oldParent=this,e<=this.beforeStableIndex&&(this.beforeStableIndex=e-1),e>this.afterStableIndex?this.afterStableIndex=e+1:this.afterStableIndex++,this.fittability.onInsert(t.fittability),this.relativeTransform.insertInstance(t,e),this.markChildVisibilityDirty()},removeInstance:function(t){return this.removeInstanceWithIndex(t,_.indexOf(this.children,t))},removeInstanceWithIndex:function(t,e){var i=this.display._frameId;t.stitchChangeFrame=i,this.stitchChangeOnChildren=i,e-1>=0&&(this.children[e-1].stitchChangeAfter=i),e+1<this.children.length&&(this.children[e+1].stitchChangeBefore=i),this.children.splice(e,1),t.parent=null,t.oldParent=this,e<=this.beforeStableIndex&&(this.beforeStableIndex=e-1),e>=this.afterStableIndex?this.afterStableIndex=e:this.afterStableIndex--,this.fittability.onRemove(t.fittability),this.relativeTransform.removeInstanceWithIndex(t,e)},replaceInstanceWithIndex:function(t,e,i){this.removeInstanceWithIndex(t,i),this.insertInstance(e,i)},findChildInstanceOnNode:function(t){for(var e=t.getInstances(),i=0;i<e.length;i++)if(e[i].oldParent===this)return e[i];return null},onChildInserted:function(t,i){var n=this.findChildInstanceOnNode(t);n?n.addRemoveCounter+=1:n=e.createFromPool(this.display,this.trail.copy().addDescendant(t,i),!1,!1),this.insertInstance(n,i),this.markSkipPruning()},onChildRemoved:function(t,e){var i=this.findChildInstanceOnNode(t);i.addRemoveCounter-=1,this.instanceRemovalCheckList.push(i),this.removeInstanceWithIndex(i,e),this.markSkipPruning()},onVisibilityChange:function(){this.stitchChangeFrame=this.display._frameId,this.parent&&this.parent.markSkipPruning(),this.visibilityDirty=!0,this.parent&&this.parent.markChildVisibilityDirty()},onOpacityChange:function(){this.markRenderStateDirty()},markChildVisibilityDirty:function(){this.childVisibilityDirty||(this.childVisibilityDirty=!0,this.parent&&this.parent.markChildVisibilityDirty())},updateDrawableFittability:function(t){this.selfDrawable&&this.selfDrawable.setFittable(t),this.groupDrawable&&this.groupDrawable.setFittable(t)},updateVisibility:function(t,e,i){this.visibilityDirty&&(i=!0);var n=this.node.isVisible(),r=this.visible,s=this.relativeVisible,a=this.selfVisible;this.visible=t&&n,this.relativeVisible=e&&n,this.selfVisible=this.isVisibilityApplied?!0:this.relativeVisible;for(var o=this.children.length,h=0;o>h;h++){var l=this.children[h];(i||l.visibilityDirty||l.childVisibilityDirty)&&l.updateVisibility(this.visible,this.isVisibilityApplied?!0:this.relativeVisible,i)}this.visibilityDirty=!1,this.childVisibilityDirty=!1,this.visible!==r&&this.trigger0("visibility"),this.relativeVisible!==s&&this.trigger0("relativeVisibility"),this.selfVisible!==a&&this.trigger0("selfVisibility")},getDescendantCount:function(){for(var t=this.children.length,e=0;e<this.children.length;e++)t+=this.children[e].getDescendantCount();return t},addSVGGroup:function(t){this.svgGroups.push(t)},removeSVGGroup:function(t){var e=_.indexOf(this.svgGroups,t);this.svgGroups.splice(e,1)},lookupSVGGroup:function(t){for(var e=this.svgGroups.length,i=0;e>i;i++){var n=this.svgGroups[i];if(n.block===t)return n}return null},getFilterRootInstance:function(){return this.isBackbone||this.isInstanceCanvasCache||!this.parent?this:this.parent.getFilterRootInstance()},getTransformRootInstance:function(){return this.isTransformed||!this.parent?this:this.parent.getTransformRootInstance()},getVisibilityRootInstance:function(){return this.isVisibilityApplied||!this.parent?this:this.parent.getVisibilityRootInstance()},attachNodeListeners:function(){this.relativeTransform.attachNodeListeners(),this.isSharedCanvasCachePlaceholder||(this.node.onStatic("childInserted",this.childInsertedListener),this.node.onStatic("childRemoved",this.childRemovedListener),this.node.onStatic("visibility",this.visibilityListener),this.node.onStatic("opacity",this.markRenderStateDirtyListener),this.node.onStatic("hint",this.markRenderStateDirtyListener),this.node.onStatic("clip",this.markRenderStateDirtyListener),this.node.onStatic("rendererBitmask",this.markRenderStateDirtyListener),this.node.onStatic("rendererSummary",this.markRenderStateDirtyListener))},detachNodeListeners:function(){this.relativeTransform.detachNodeListeners(),this.isSharedCanvasCachePlaceholder||(this.node.offStatic("childInserted",this.childInsertedListener),this.node.offStatic("childRemoved",this.childRemovedListener),this.node.offStatic("visibility",this.visibilityListener),this.node.offStatic("opacity",this.markRenderStateDirtyListener),this.node.offStatic("hint",this.markRenderStateDirtyListener),this.node.offStatic("clip",this.markRenderStateDirtyListener),this.node.offStatic("rendererBitmask",this.markRenderStateDirtyListener),this.node.offStatic("rendererSummary",this.markRenderStateDirtyListener))},markRenderStateDirty:function(){this.renderStateDirtyFrame=this.display._frameId,this.parent&&this.parent.markSkipPruning()},markSkipPruning:function(){this.skipPruningFrame=this.display._frameId,this.parent&&this.parent.markSkipPruning()},dispose:function(){this.active=!1,this.groupDrawable&&this.groupDrawable.disposeImmediately(this.display),this.sharedCacheDrawable&&this.sharedCacheDrawable.disposeImmediately(this.display),this.selfDrawable&&this.selfDrawable.disposeImmediately(this.display);for(var t=this.children.length,e=0;t>e;e++)this.children[e].dispose();for(;this.instanceRemovalCheckList.length;){var i=this.instanceRemovalCheckList.pop();i.active&&i.dispose()}this.stateless||this.detachNodeListeners(),this.node.removeInstance(this),this.sharedCacheInstance&&(this.sharedCacheInstance.externalReferenceCount--,0===this.sharedCacheInstance.externalReferenceCount&&(delete this.display._sharedCanvasInstances[this.node.getId()],this.sharedCacheInstance.dispose())),this.cleanInstance(null,null),this.removeAllEventListeners(),this.freeToPool()},audit:function(t,e){},auditVisibility:function(t){},auditChangeIntervals:function(t,e,i,n){if(t)for(var r=t;r!==e;)r=r.oldNextDrawable;if(i)for(var s=i;s!==n;)s=s.nextDrawable},toString:function(){return this.id+"#"+(this.node?(this.node.constructor.name?this.node.constructor.name:"?")+"#"+this.node.id:"-")}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r,s){return t.length?t.pop().initialize(i,n,r,s):new e(i,n,r,s)}}}),e}),i("SCENERY/display/InlineCanvasCacheDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/Drawable"],function(t){"use strict";function e(t,e){r.call(this,t),this.instance=e}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/Drawable");return n.register("InlineCanvasCacheDrawable",e),i(r,e,{stitch:function(t,e,i,n){}}),e}),i("SCENERY/display/SharedCanvasCacheDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/Drawable"],function(t){"use strict";function e(t,e,i,n){r.call(this,e),this.instance=i,this.sharedInstance=n}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/Drawable");return n.register("SharedCanvasCacheDrawable",e),i(r,e,{}),e}),i("SCENERY/accessibility/AccessibleInstance",["require","PHET_CORE/inherit","PHET_CORE/Poolable","AXON/Events","SCENERY/scenery","PHET_CORE/cleanArray"],function(t){"use strict";function e(t,e,i){this.initializeAccessibleInstance(t,e,i)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("AXON/Events"),s=t("SCENERY/scenery"),a=t("PHET_CORE/cleanArray"),o=1;return s.register("AccessibleInstance",e),i(r,e,{initializeAccessibleInstance:function(t,e,i){if(r.call(this),this.id=this.id||o++,this.parent=t,this.display=e,this.trail=i,this.node=i.lastNode(),this.isRootInstance=0===this.trail.length,this.children=a(this.children),this.node&&this.node.addAccessibleInstance(this),this.isSorted=!0,this.isRootInstance){var n=document.createElement("div");n.className="accessibility",n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width="0",n.style.height="0",n.style.clip="rect(0,0,0,0)",this.peer=new s.AccessiblePeer(this,n)}else{this.peer=this.node.accessibleContent.createPeer(this);var h=this.parent.peer.getChildContainerElement();h.insertBefore(this.peer.domElement,h.childNodes[0])}return this},addSubtree:function(t){var i=t.lastNode(),n=this;if(i.accessibleContent){var r=e.createFromPool(this,this.display,t.copy());this.children.push(r),this.markAsUnsorted(),
n=r}for(var s=i._children,a=0;a<s.length;a++)t.addDescendant(s[a],a),n.addSubtree(t),t.removeDescendant()},removeSubtree:function(t){for(var e=this.children.length-1;e>=0;e--){var i=this.children[e];i.trail.isExtensionOf(t,!0)&&(this.children.splice(e,1),i.dispose())}},markAsUnsorted:function(){this.isSorted&&(this.isSorted=!1,this.display.markUnsortedAccessibleInstance(this))},sortChildren:function(){this.isSorted=!0;for(var t=this,e=0;e<this.children.length;e++)this.children[e].trail.reindex();this.children.sort(function(e,i){for(var n=e.trail.nodes,r=i.trail.nodes,s=Math.max(0,t.trail.length-1);n[s]===r[s];s++){var a=n[s],o=a.accessibleOrder;if(o)for(var h=0;h<o.length;h++){var l=o[h],u=n.indexOf(l),c=r.indexOf(l);if(u>=0&&c>=0){for(var d=s+1;n[d]===r[d];)d++;if(d>u){s=u-1;break}var m=e.trail.indices[d-1],f=i.trail.indices[d-1];if(f>m)return-1;if(m>f)return 1;throw new Error("Two different children have the same child index")}if(u>=0)return-1;if(c>=0)return 1}}var p=e.trail.indices[s-1],g=i.trail.indices[s-1];if(g>p)return-1;if(p>g)return 1;throw new Error("Two different children have the same child index")});for(var i=this.peer.getChildContainerElement(),n=this.children.length-1;n>=0;n--){var r=this.children[n].peer.domElement;r!==i.childNodes[n]&&i.insertBefore(r,i.childNodes[n+1])}},dispose:function(){for(this.isRootInstance||this.parent.peer.getChildContainerElement().removeChild(this.peer.domElement);this.children.length;)this.children.pop().dispose();this.node&&this.node.removeAccessibleInstance(this),this.display=null,this.trail=null,this.node=null,this.peer=null,this.disposed=!0,this.freeToPool()},toString:function(){return this.id+"#{"+this.trail.toString()+"}"},auditRoot:function(){function t(e,i){_.each(e,function(e){var n=_.find(i.children,function(t){return t.trail.equals(e.trail)});t(e.children,n)});for(var n=0;n<e.length;n++);}t(this.display.rootNode.getNestedAccessibleOrder(),this)}}),n.mixin(e,{constructorDuplicateFactory:function(t){return function(i,n,r){return t.length?t.pop().initializeAccessibleInstance(i,n,r):new e(i,n,r)}}}),e}),i("SCENERY/util/SceneryStyle",["require","SCENERY/scenery"],function(t){"use strict";var e=t("SCENERY/scenery"),i=document.createElement("style");i.type="text/css",document.head.appendChild(i);var n=document.styleSheets[document.styleSheets.length-1];return e.register("SceneryStyle",{stylesheet:n,styleElement:i,addRule:function(t){this.stylesheet.insertRule(t,0)}})}),i("SCENERY/util/TransformTracker",["require","PHET_CORE/inherit","DOT/Matrix3","SCENERY/scenery"],function(t){"use strict";function e(t,e){var i=this;e=_.extend({isStatic:!1},e),this._isStatic=e.isStatic,this.trail=t,this._matrices=null,this._dirtyIndex=0,this._listeners=[],this._nodeTransformListeners=[];for(var n=1;n<this.trail.length;n++){var r=function(t){return function(){i.onTransformChange(t)}}(n-1);this._nodeTransformListeners.push(r),this._isStatic?t.nodes[n].onStatic("transform",r):t.nodes[n].on("transform",r)}}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("SCENERY/scenery");return r.register("TransformTracker",e),i(Object,e,{dispose:function(){for(var t=1;t<this.trail.length;t++){var e=this._nodeTransformListeners[t-1];this._isStatic?this.trail.nodes[t].offStatic("transform",e):this.trail.nodes[t].off("transform",e)}},addListener:function(t){this._listeners.push(t)},removeListener:function(t){var e=_.indexOf(this._listeners,t);this._listeners.splice(e,1)},notifyListeners:function(){var t=this._listeners;this._isStatic||(t=t.slice());for(var e=t.length,i=0;e>i;i++)t[i]()},onTransformChange:function(t){this._dirtyIndex=Math.min(this._dirtyIndex,t),this.notifyListeners()},getMatrix:function(){if(null===this._matrices){this._matrices=[];for(var t=1;t<this.trail.length;t++)this._matrices.push(new n)}if(this._matrices.length<=0)return n.IDENTITY;for(var e=this._matrices.length,i=this._dirtyIndex;e>i;i++){var r=this.trail.nodes[i+1].matrix;0===i?this._matrices[i].set(r):(this._matrices[i].set(this._matrices[i-1]),this._matrices[i].multiplyMatrix(r))}return this._dirtyIndex=e,this._matrices[e-1]},get matrix(){return this.getMatrix()}}),e}),i("SCENERY/overlays/FocusOverlay",["require","PHET_CORE/inherit","SCENERY/scenery","DOT/Vector2","SCENERY/nodes/Rectangle","SCENERY/util/Color","SCENERY/util/TransformTracker","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Path"],function(t){"use strict";function e(t,i){this.display=t,this.focusRootNode=i,this.trail=null,this.node=null,this.mode=null,this.transformTracker=null,this.transformDirty=!0,this.highlightNode=new l,this.focusRootNode.addChild(this.highlightNode),this.focusDisplay=new n.Display(this.focusRootNode,{width:this.width,height:this.height,allowCSSHacks:!1,accessibility:!1,isApplication:!1,interactive:!1}),this.domElement=this.focusDisplay.domElement,this.boundsHighlight=new s(0,0,0,0,{stroke:e.focusColor,visible:!1}),this.innerBoundsHighlight=new s(0,0,0,0,{stroke:e.innerFocusColor}),this.boundsHighlight.addChild(this.innerBoundsHighlight),this.shapeHighlight=new u(null,{stroke:e.focusColor,visible:!1}),this.innerShapeHighlight=new u(null,{stroke:e.innerFocusColor}),this.shapeHighlight.addChild(this.innerShapeHighlight),this.nodeHighlight=null,this.highlightNode.addChild(this.boundsHighlight),this.highlightNode.addChild(this.shapeHighlight),this.boundsListener=this.onBoundsChange.bind(this),this.transformListener=this.onTransformChange.bind(this),this.focusListener=this.onFocusChange.bind(this),n.Display.focusProperty.link(this.focusListener)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("DOT/Vector2"),s=t("SCENERY/nodes/Rectangle"),a=t("SCENERY/util/Color"),o=t("SCENERY/util/TransformTracker"),h=t("KITE/Shape"),l=t("SCENERY/nodes/Node"),u=t("SCENERY/nodes/Path");return n.register("FocusOverlay",e),i(Object,e,{dispose:function(){this.hasHighlight()&&this.deactivateHighlight(),n.Display.focusProperty.unlink(this.focusListener)},hasHighlight:function(){return!!this.trail},activateHighlight:function(t){this.trail=t,this.node=t.lastNode(),this.transformTracker=new o(t,{isStatic:!0}),this.transformTracker.addListener(this.transformListener),this.node.accessibleContent.focusHighlight instanceof h?(this.mode="shape",this.shapeHighlight.visible=!0,this.shapeHighlight.shape=this.innerShapeHighlight.shape=this.node.accessibleContent.focusHighlight):this.node.accessibleContent.focusHighlight instanceof l?(this.mode="node",this.nodeHighlight=this.node.accessibleContent.focusHighlight,this.highlightNode.addChild(this.nodeHighlight)):(this.mode="bounds",this.boundsHighlight.visible=!0,this.node.onStatic("localBounds",this.boundsListener),this.onBoundsChange()),this.transformDirty=!0},deactivateHighlight:function(){"shape"===this.mode?this.shapeHighlight.visible=!1:"node"===this.mode?(this.highlightNode.removeChild(this.nodeHighlight),this.nodeHighlight=null):"bounds"===this.mode&&(this.boundsHighlight.visible=!1,this.node.offStatic("localBounds",this.boundsListener)),this.trail=null,this.node=null,this.mode=null,this.transformTracker.removeListener(this.transformListener),this.transformTracker.dispose()},afterTransform:function(){"shape"===this.mode?(this.shapeHighlight.lineWidth=4/this.shapeHighlight.transform.transformDelta2(r.X_UNIT).magnitude(),this.innerShapeHighlight.lineWidth=2.5/this.shapeHighlight.transform.transformDelta2(r.X_UNIT).magnitude()):"bounds"===this.mode&&(this.boundsHighlight.lineWidth=4/this.boundsHighlight.transform.transformDelta2(r.X_UNIT).magnitude(),this.innerBoundsHighlight.lineWidth=2.5/this.boundsHighlight.transform.transformDelta2(r.X_UNIT).magnitude())},onTransformChange:function(){this.transformDirty=!0},onBoundsChange:function(){this.boundsHighlight.setRectBounds(this.node.localBounds),this.innerBoundsHighlight.setRectBounds(this.node.localBounds)},onFocusChange:function(t){var e=t&&t.display===this.display?t.trail:null;this.hasHighlight()&&this.deactivateHighlight(),e&&this.activateHighlight(e)},update:function(){this.hasHighlight()&&this.transformDirty&&(this.transformDirty=!1,this.highlightNode.setMatrix(this.transformTracker.matrix),this.afterTransform()),this.display.size.equals(this.focusDisplay.size)||this.focusDisplay.setWidthHeight(this.display.width,this.display.height),this.focusDisplay.updateDisplay()}},{focusColor:new a("rgba(212,19,106,0.5)"),innerFocusColor:new a("rgba(250,40,135,0.9)")}),e}),i("SCENERY/overlays/ShapeBasedOverlay",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/util/Trail"],function(t){"use strict";function e(t,e,i){function r(t,e){s.setAttribute("width",t),s.setAttribute("height",e),s.style.clip="rect(0px,"+t+"px,"+e+"px,0px)"}this.display=t,this.rootNode=e;var s=this.svg=document.createElementNS(n.svgns,"svg");s.style.position="absolute",s.setAttribute("class",i),s.style.top=0,s.style.left=0,s.style["pointer-events"]="none",t.onStatic("displaySize",function(t){r(t.width,t.height)}),r(t.width,t.height),this.domElement=s}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return t("SCENERY/util/Trail"),n.register("ShapeBasedOverlay",e),i(Object,e,{addShape:function(t,e,i){var r=document.createElementNS(n.svgns,"path"),s=t.getSVGPath();s||(s="M0 0"),s?r.setAttribute("d",s):r.hasAttribute("d")&&r.removeAttribute("d"),r.setAttribute("style","fill: none; stroke: "+e+"; stroke-dasharray: 5, 3; stroke-dashoffset: "+(i?5:0)+"; stroke-width: 3;"),this.svg.appendChild(r)},update:function(){for(;this.svg.childNodes.length;)this.svg.removeChild(this.svg.childNodes[this.svg.childNodes.length-1]);this.addShapes()},addShapes:function(){},dispose:function(){}}),e}),i("SCENERY/overlays/PointerAreaOverlay",["require","PHET_CORE/inherit","SCENERY/overlays/ShapeBasedOverlay","KITE/Shape","SCENERY/scenery","SCENERY/util/Trail"],function(t){"use strict";function e(t,e){n.call(this,t,e,"mouseTouchAreaOverlay")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/overlays/ShapeBasedOverlay"),r=t("KITE/Shape"),s=t("SCENERY/scenery");return t("SCENERY/util/Trail"),s.register("PointerAreaOverlay",e),i(n,e,{addShapes:function(){var t=this;new s.Trail(this.rootNode).eachTrailUnder(function(e){var i=e.lastNode();if(!i.isVisible())return!0;if((i.mouseArea||i.touchArea)&&e.isVisible()){var n=e.getTransform();i.mouseArea&&t.addShape(n.transformShape(i.mouseArea.isBounds?r.bounds(i.mouseArea):i.mouseArea),"rgba(0,0,255,0.8)",!0),i.touchArea&&t.addShape(n.transformShape(i.touchArea.isBounds?r.bounds(i.touchArea):i.touchArea),"rgba(255,0,0,0.8)",!1)}})}}),e}),i("SCENERY/overlays/PointerOverlay",["require","PHET_CORE/inherit","DOT/Matrix3","SCENERY/scenery","SCENERY/util/Trail","SCENERY/util/Util"],function(t){"use strict";function e(t,e){var i=this;this.display=t,this.rootNode=e,this.pointerSVGContainer=document.createElement("div"),this.pointerSVGContainer.style.position="absolute",this.pointerSVGContainer.style.top=0,this.pointerSVGContainer.style.left=0,this.pointerSVGContainer.style["pointer-events"]="none";var a=10,o=1,h=2*(a+o/2),l=h/2;t.onStatic("displaySize",function(t){i.pointerSVGContainer.setAttribute("width",t.width),i.pointerSVGContainer.setAttribute("height",t.height),i.pointerSVGContainer.style.clip="rect(0px,"+t.width+"px,"+t.height+"px,0px)"});var u=this.pointerAdded=function(t){if(!t.isKey){var e=document.createElementNS(r.svgns,"svg");e.style.position="absolute",e.style.top=0,e.style.left=0,e.style["pointer-events"]="none",e.setAttribute("width",h),e.setAttribute("height",h);var u=document.createElementNS(r.svgns,"circle");u.setAttribute("cx",a+o/2),u.setAttribute("cy",a+o/2),u.setAttribute("r",a),u.setAttribute("style","fill:black;"),u.setAttribute("style","stroke:white;"),u.setAttribute("opacity",.4);var c=function(){t.isTouch&&(i.pointerSVGContainer.removeChild(e),t.removeInputListener(d))},d={move:function(){t.point&&s.applyCSSTransform(n.translation(t.point.x-l,t.point.y-l),e)},up:c,cancel:c};t.addInputListener(d),d.move(),e.appendChild(u),i.pointerSVGContainer.appendChild(e)}};t._input.addPointerAddedListener(u),t._input&&t._input.mouse&&u(t._input.mouse),this.domElement=this.pointerSVGContainer}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("SCENERY/scenery");t("SCENERY/util/Trail");var s=t("SCENERY/util/Util");return r.register("PointerOverlay",e),i(Object,e,{dispose:function(){this.display._input.removePointerAddedListener(this.pointerAdded)},update:function(){}}),e}),i("SCENERY/overlays/CanvasNodeBoundsOverlay",["require","PHET_CORE/inherit","SCENERY/overlays/ShapeBasedOverlay","KITE/Shape","SCENERY/scenery","SCENERY/util/Trail"],function(t){"use strict";function e(t,e){n.call(this,t,e,"canvasNodeBoundsOverlay")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/overlays/ShapeBasedOverlay"),r=t("KITE/Shape"),s=t("SCENERY/scenery");return t("SCENERY/util/Trail"),s.register("CanvasNodeBoundsOverlay",e),i(n,e,{addShapes:function(){var t=this;new s.Trail(this.rootNode).eachTrailUnder(function(e){var i=e.lastNode();if(!i.isVisible())return!0;if(i instanceof s.CanvasNode&&e.isVisible()){var n=e.getTransform();t.addShape(n.transformShape(r.bounds(i.selfBounds)),"rgba(0,255,0,0.8)",!0)}})}}),e}),i("SCENERY/overlays/FittedBlockBoundsOverlay",["require","PHET_CORE/inherit","SCENERY/overlays/ShapeBasedOverlay","KITE/Shape","DOT/Matrix3","SCENERY/scenery","SCENERY/util/Trail"],function(t){"use strict";function e(t,e){n.call(this,t,e,"canvasNodeBoundsOverlay")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/overlays/ShapeBasedOverlay"),r=t("KITE/Shape"),s=t("DOT/Matrix3"),a=t("SCENERY/scenery");return t("SCENERY/util/Trail"),a.register("FittedBlockBoundsOverlay",e),i(n,e,{addShapes:function(){function t(t,i){t.willApplyTransform&&(i=i.timesMatrix(t.backboneInstance.relativeTransform.matrix)),t.blocks.forEach(function(t){e(t,i)})}function e(t,e){if(t.fitBounds&&!t.fitBounds.isEmpty()&&n.addShape(r.bounds(t.fitBounds).transformed(e),"rgba(255,0,0,0.8)",!0),t.firstDrawable&&t.lastDrawable){for(var s=t.firstDrawable;s!==t.lastDrawable;s=s.nextDrawable)i(s,e);i(t.lastDrawable,e)}}function i(e,i){e.backboneInstance&&t(e,i)}var n=this;t(this.display._rootBackbone,s.IDENTITY)}}),e}),i("SCENERY/display/Display",["require","PHET_CORE/inherit","PHET_CORE/extend","AXON/Events","AXON/Property","DOT/Dimension2","DOT/Vector2","DOT/Matrix3","SCENERY/scenery","SCENERY/nodes/Node","SCENERY/util/Features","SCENERY/display/BackboneDrawable","SCENERY/display/CanvasBlock","SCENERY/display/CanvasSelfDrawable","SCENERY/display/ChangeInterval","SCENERY/display/DOMSelfDrawable","SCENERY/display/Drawable","SCENERY/display/Instance","SCENERY/display/InlineCanvasCacheDrawable","SCENERY/display/Renderer","SCENERY/display/SharedCanvasCacheDrawable","SCENERY/display/SVGSelfDrawable","SCENERY/input/Input","SCENERY/util/Trail","SCENERY/accessibility/AccessibleInstance","SCENERY/util/SceneryStyle","SCENERY/overlays/FocusOverlay","SCENERY/overlays/PointerAreaOverlay","SCENERY/overlays/PointerOverlay","SCENERY/overlays/CanvasNodeBoundsOverlay","SCENERY/overlays/FittedBlockBoundsOverlay"],function(t){"use strict";function e(t,e){r.call(this),e=_.extend({width:e&&e.container&&e.container.clientWidth||640,height:e&&e.container&&e.container.clientHeight||480,allowCSSHacks:!0,allowSceneOverflow:!1,enablePointerEvents:!0,defaultCursor:"default",backgroundColor:null,preserveDrawingBuffer:!1,allowWebGL:!0,accessibility:!0,isApplication:!1,interactive:!0},e),this.options=e,this._size=new a(this.options.width,this.options.height),this._currentSize=new a(-1,-1),this._rootNode=t,this._rootNode.addRootedDisplay(this),this._rootBackbone=null,this._domElement=e&&e.container?l.BackboneDrawable.repurposeBackboneContainer(e.container):l.BackboneDrawable.createDivBackbone(),this._sharedCanvasInstances={},this._baseInstance=null,this._frameId=0,this._dirtyTransformRoots=[],this._dirtyTransformRootsWithoutPass=[],this._instanceRootsToDispose=[],this._drawablesToDispose=[],this._drawablesToChangeBlock=[],this._drawablesToUpdateLinks=[],this._changeIntervalsToDispose=[],this._lastCursor=null,this._currentBackgroundCSS=null,this._backgroundColor=null,this._requestAnimationFrameID=0,this._input=null,this._interactive=this.options.interactive,this._overlays=[],this._pointerOverlay=null,this._pointerAreaOverlay=null,this._canvasAreaBoundsOverlay=null,this._fittedBlockBoundsOverlay=null,this._fuzzMouseIsDown=!1,this._fuzzMousePosition=new o,this._fuzzMouseLastMoved=!1,this.applyCSSHacks(),this.setBackgroundColor(this.options.backgroundColor),this.scenery=l,this.options.accessibility&&(this.options.isApplication&&this._domElement.setAttribute("aria-role","application"),f.addRule(".accessibility * { position: absolute; left: 0; top: 0; width: 0; height: 0, clip: rect(0,0,0,0); }"),this._focusRootNode=new u,this._focusOverlay=new p(this,this._focusRootNode),this.addOverlay(this._focusOverlay),this._rootAccessibleInstance=m.createFromPool(null,this,new l.Trail),this._rootAccessibleInstance.addSubtree(new l.Trail(this._rootNode)),document.body.appendChild(this._rootAccessibleInstance.peer.domElement),this._unsortedAccessibleInstances=[])}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/extend"),r=t("AXON/Events"),s=t("AXON/Property"),a=t("DOT/Dimension2"),o=t("DOT/Vector2"),h=t("DOT/Matrix3"),l=t("SCENERY/scenery"),u=t("SCENERY/nodes/Node"),c=t("SCENERY/util/Features");t("SCENERY/display/BackboneDrawable"),t("SCENERY/display/CanvasBlock"),t("SCENERY/display/CanvasSelfDrawable");t("SCENERY/display/ChangeInterval");t("SCENERY/display/DOMSelfDrawable");t("SCENERY/display/Drawable"),t("SCENERY/display/Instance");t("SCENERY/display/InlineCanvasCacheDrawable");var d=t("SCENERY/display/Renderer");t("SCENERY/display/SharedCanvasCacheDrawable"),t("SCENERY/display/SVGSelfDrawable"),t("SCENERY/input/Input"),t("SCENERY/util/Trail");var m=t("SCENERY/accessibility/AccessibleInstance"),f=t("SCENERY/util/SceneryStyle"),p=t("SCENERY/overlays/FocusOverlay"),g=t("SCENERY/overlays/PointerAreaOverlay"),b=t("SCENERY/overlays/PointerOverlay"),v=t("SCENERY/overlays/CanvasNodeBoundsOverlay"),E=t("SCENERY/overlays/FittedBlockBoundsOverlay"),S={isMouse:!0};return l.register("Display",e),i(Object,e,n({getDOMElement:function(){return this._domElement},get domElement(){return this.getDOMElement()},updateDisplay:function(){if(!window.sceneryDebugPause){var t=!!this._baseInstance;for(this._input&&this._input.validatePointers(),this._rootNode.validateWatchedBounds(),this._baseInstance=this._baseInstance||l.Instance.createFromPool(this,new l.Trail(this._rootNode),!0,!1),this._baseInstance.baseSyncTree(),t&&this.markTransformRootDirty(this._baseInstance,this._baseInstance.isTransformed);this._drawablesToUpdateLinks.length;)this._drawablesToUpdateLinks.pop().updateLinks();for(;this._changeIntervalsToDispose.length;)this._changeIntervalsToDispose.pop().dispose();for(this._rootBackbone=this._rootBackbone||this._baseInstance.groupDrawable;this._drawablesToChangeBlock.length;){this._drawablesToChangeBlock.pop().updateBlock()}for(this.updateDirtyTransformRoots(),this._baseInstance.updateVisibility(!0,!0,!1);this._instanceRootsToDispose.length;)this._instanceRootsToDispose.pop().dispose();for(;this._drawablesToDispose.length;)this._drawablesToDispose.pop().dispose();if(this._rootBackbone.update(),this.updateCursor(),this.updateBackgroundColor(),this.updateSize(),this._overlays.length)for(var e=this._rootBackbone.lastZIndex,i=0;i<this._overlays.length;i++){var n=this._overlays[i];n.domElement.style.zIndex=e++,n.update()}this._frameId++}},updateSize:function(){var t=!1;this._size.width!==this._currentSize.width&&(t=!0,this._currentSize.width=this._size.width,this._domElement.style.width=this._size.width+"px"),this._size.height!==this._currentSize.height&&(t=!0,this._currentSize.height=this._size.height,this._domElement.style.height=this._size.height+"px"),t&&!this.options.allowSceneOverflow&&(this._domElement.style.clip="rect(0px,"+this._size.width+"px,"+this._size.height+"px,0px)")},getRootNode:function(){return this._rootNode},get rootNode(){return this.getRootNode()},getSize:function(){return this._size},get size(){return this.getSize()},getBounds:function(){return this._size.toBounds()},get bounds(){return this.getBounds()},setSize:function(t){this._size.equals(t)||(this._size=t,this.trigger1("displaySize",this._size))},setWidthHeight:function(t,e){this.setSize(new a(t,e))},getWidth:function(){return this._size.width},get width(){return this.getWidth()},setWidth:function(t){this.getWidth()!==t&&this.setSize(new a(t,this.getHeight()))},set width(t){this.setWidth(t)},getHeight:function(){return this._size.height},get height(){return this.getHeight()},setHeight:function(t){this.getHeight()!==t&&this.setSize(new a(this.getWidth(),t))},set height(t){this.setHeight(t)},setBackgroundColor:function(t){this._backgroundColor=t},set backgroundColor(t){this.setBackgroundColor(t)},getBackgroundColor:function(){return this._backgroundColor},get backgroundColor(){return this.getBackgroundColor()},get interactive(){return this._interactive},set interactive(t){this._interactive=t,!this._interactive&&this._input&&this._input.clearBatchedEvents()},addOverlay:function(t){this._overlays.push(t),this._domElement.appendChild(t.domElement)},removeOverlay:function(t){this._domElement.removeChild(t.domElement),this._overlays.splice(_.indexOf(this._overlays,t),1)},getBaseAccessibleInstance:function(t){var e;for(e=t.length-2;e>=0&&!t.nodes[e].accessibleContent;e--);if(0>e)return this._rootAccessibleInstance;for(var i=t.nodes[e],n=i._accessibleInstances,r=0;r<n.length;r++){var s=n[r];if(t.isExtensionOf(s.trail))return s}throw new Error("A base accessible instance must be defined.")},markUnsortedAccessibleInstance:function(t){this._unsortedAccessibleInstances.push(t)},sortAccessibleInstances:function(){for(;this._unsortedAccessibleInstances.length;)this._unsortedAccessibleInstances.pop().sortChildren()},addAccessibleTrail:function(t){this.options.accessibility&&(this.getBaseAccessibleInstance(t).addSubtree(t),this.sortAccessibleInstances())},removeAccessibleTrail:function(t){this.options.accessibility&&(this.getBaseAccessibleInstance(t).removeSubtree(t),this.sortAccessibleInstances())},changedAccessibleContent:function(t,e,i){this.options.accessibility&&(this.getBaseAccessibleInstance(t).removeSubtree(t),this.getBaseAccessibleInstance(t).addSubtree(t),this.sortAccessibleInstances())},changedAccessibleOrder:function(t){this.options.accessibility&&(this.getBaseAccessibleInstance(t).markAsUnsorted(),this.sortAccessibleInstances())},getUsedRenderersBitmask:function(){function t(e){var i=0;return _.each(e.blocks,function(e){i|=e instanceof l.DOMBlock&&e.domDrawable instanceof l.BackboneDrawable?t(e.domDrawable):e.renderer}),i}return t(this._rootBackbone)&d.bitmaskRendererArea},markTransformRootDirty:function(t,e){e?this._dirtyTransformRoots.push(t):this._dirtyTransformRootsWithoutPass.push(t)},updateDirtyTransformRoots:function(){for(;this._dirtyTransformRoots.length;)this._dirtyTransformRoots.pop().relativeTransform.updateTransformListenersAndCompute(!1,!1,this._frameId,!0);for(;this._dirtyTransformRootsWithoutPass.length;)this._dirtyTransformRootsWithoutPass.pop().relativeTransform.updateTransformListenersAndCompute(!1,!1,this._frameId,!1)},markDrawableChangedBlock:function(t){this._drawablesToChangeBlock.push(t)},markInstanceRootForDisposal:function(t){this._instanceRootsToDispose.push(t)},markDrawableForDisposal:function(t){this._drawablesToDispose.push(t)},markDrawableForLinksUpdate:function(t){this._drawablesToUpdateLinks.push(t)},markChangeIntervalToDispose:function(t){this._changeIntervalsToDispose.push(t)},updateBackgroundColor:function(){var t=null===this._backgroundColor?"":this._backgroundColor.toCSS?this._backgroundColor.toCSS():this._backgroundColor;t!==this._currentBackgroundCSS&&(this._currentBackgroundCSS=t,this._domElement.style.backgroundColor=t)},updateCursor:function(){if(this._input&&this._input.mouse&&this._input.mouse.point){if(this._input.mouse.cursor)return this.setSceneCursor(this._input.mouse.cursor);var t=this._rootNode.trailUnderPoint(this._input.mouse.point,S);if(t)for(var e=t.length-1;e>=0;e--){var i=t.nodes[e],n=i.getCursor();if(n)return this.setSceneCursor(n)}}return this.setSceneCursor(this.options.defaultCursor)},setSceneCursor:function(t){if(t!==this._lastCursor){this._lastCursor=t;var i=e.customCursors[t];if(i)for(var n=i.length-1;n>=0;n--)this._domElement.style.cursor=i[n];else this._domElement.style.cursor=t}},applyCSSHacks:function(){this.options.allowSceneOverflow||(this._domElement.style.overflow="hidden"),document.onselectstart=function(){return!1},this._domElement.style.msTouchAction="none",c.setStyle(this._domElement,c.fontSmoothing,"antialiased"),this.options.allowCSSHacks&&(c.setStyle(this._domElement,c.userDrag,"none"),c.setStyle(this._domElement,c.userSelect,"none"),c.setStyle(this._domElement,c.touchAction,"none"),c.setStyle(this._domElement,c.touchCallout,"none"),c.setStyle(this._domElement,c.tapHighlightColor,"rgba(0,0,0,0)"))},canvasDataURL:function(t){this.canvasSnapshot(function(e){t(e.toDataURL())})},canvasSnapshot:function(t){var e=document.createElement("canvas");e.width=this._size.width,e.height=this._size.height;var i=e.getContext("2d");this._rootNode.renderToCanvas(e,i,function(){t(e,i.getImageData(0,0,e.width,e.height))},this.domElement.style.backgroundColor)},setPointerDisplayVisible:function(t){if(void 0!==t){var e=!!this._pointerOverlay;t!==e&&(t?(this._pointerOverlay=new b(this,this._rootNode),this.addOverlay(this._pointerOverlay)):(this.removeOverlay(this._pointerOverlay),this._pointerOverlay.dispose(),this._pointerOverlay=null))}},setPointerAreaDisplayVisible:function(t){if(void 0!==t){var e=!!this._pointerAreaOverlay;t!==e&&(t?(this._pointerAreaOverlay=new g(this,this._rootNode),this.addOverlay(this._pointerAreaOverlay)):(this.removeOverlay(this._pointerAreaOverlay),this._pointerAreaOverlay.dispose(),this._pointerAreaOverlay=null))}},setCanvasNodeBoundsVisible:function(t){if(void 0!==t){var e=!!this._canvasAreaBoundsOverlay;t!==e&&(t?(this._canvasAreaBoundsOverlay=new v(this,this._rootNode),this.addOverlay(this._canvasAreaBoundsOverlay)):(this.removeOverlay(this._canvasAreaBoundsOverlay),this._canvasAreaBoundsOverlay.dispose(),this._canvasAreaBoundsOverlay=null))}},setFittedBlockBoundsVisible:function(t){if(void 0!==t){var e=!!this._fittedBlockBoundsOverlay;t!==e&&(t?(this._fittedBlockBoundsOverlay=new E(this,this._rootNode),this.addOverlay(this._fittedBlockBoundsOverlay)):(this.removeOverlay(this._fittedBlockBoundsOverlay),this._fittedBlockBoundsOverlay.dispose(),this._fittedBlockBoundsOverlay=null))}},resizeOnWindowResize:function(){var t=this,e=function(){t.setWidthHeight(window.innerWidth,window.innerHeight)};window.addEventListener("resize",e),e()},updateOnRequestAnimationFrame:function(t){var e=0,i=0,n=this;!function r(){n._requestAnimationFrameID=window.requestAnimationFrame(r,n._domElement);var s=(new Date).getTime();0!==e&&(i=(s-e)/1e3),e=s,t&&t(i),n.updateDisplay()}()},cancelUpdateOnRequestAnimationFrame:function(){window.cancelAnimationFrame(this._requestAnimationFrameID)},initializeStandaloneEvents:function(t){var e=this._domElement;this.initializeEvents(_.extend({},{listenerTarget:e,pointFromEvent:function(t){var i=e.getBoundingClientRect();return o.createFromPool(t.clientX-i.left,t.clientY-i.top)}},t))},initializeFullscreenEvents:function(t){var e=this._domElement;this.initializeEvents(_.extend({},{listenerTarget:document,pointFromEvent:function(t){var i=e.getBoundingClientRect();return o.createFromPool(t.clientX-i.left,t.clientY-i.top)}},t))},initializeWindowEvents:function(t){this.initializeEvents(_.extend({},{listenerTarget:window,pointFromEvent:function(t){return o.createFromPool(t.clientX,t.clientY)}},t))},initializeEvents:function(t){var e=t.pointFromEvent,i=t.listenerTarget,n=t.batchDOMEvents,r=new l.Input(this,i,!!n,this.options.enablePointerEvents,e);this._input=r,r.connectListeners()},detachEvents:function(){this._input.disconnectListeners(),this._input=null},dispose:function(){this._rootNode.removeRootedDisplay(this)},ensureNotPainting:function(){},fuzzMouseEvents:function(t){for(var e;(e=Math.random())<1-1/t;){var i;e<(this._fuzzMouseLastMoved?.7:.4)?(i=document.createEvent("MouseEvent"),i.initMouseEvent(this._fuzzMouseIsDown?"mouseup":"mousedown",!0,!0,window,1,this._fuzzMousePosition.x,this._fuzzMousePosition.y,this._fuzzMousePosition.x,this._fuzzMousePosition.y,!1,!1,!1,!1,0,null),this._input.validatePointers(),this._fuzzMouseIsDown?(this._input.mouseUp(this._fuzzMousePosition,i),this._fuzzMouseIsDown=!1):(this._input.mouseDown(this._fuzzMousePosition,i),this._fuzzMouseIsDown=!0),this._fuzzMouseLastMoved=!1):(this._fuzzMousePosition=new o(Math.floor(Math.random()*this.width),Math.floor(Math.random()*this.height)),i=document.createEvent("MouseEvent"),i.initMouseEvent("mousemove",!0,!0,window,0,this._fuzzMousePosition.x,this._fuzzMousePosition.y,this._fuzzMousePosition.x,this._fuzzMousePosition.y,!1,!1,!1,!1,0,null),this._input.validatePointers(),this._input.mouseMove(this._fuzzMousePosition,i),this._fuzzMouseLastMoved=!0)}},getDebugHTML:function(){function t(t){return t?t.toString():t+""}function e(t){for(var i=1,n=0;n<t.children.length;n++)i+=e(t.children[n]);return i}function i(t){for(var e=1,n=0;n<t.children.length;n++)e+=i(t.children[n]);return e}function n(t){var e=1;if(t.blocks)_.each(t.blocks,function(t){e+=n(t)});else if(t.firstDrawable&&t.lastDrawable){for(var i=t.firstDrawable;i!==t.lastDrawable;i=i.nextDrawable)e+=n(i);e+=n(t.lastDrawable)}return e}function r(t){var e=t.constructor.name;g[e]?g[e]++:g[e]=1}function s(t){var e=0;t.selfDrawable&&(r(t.selfDrawable),e++),t.groupDrawable&&(r(t.groupDrawable),e++),t.sharedCacheDrawable&&(r(t.sharedCacheDrawable),e++);for(var i=0;i<t.children.length;i++)e+=s(t.children[i]);return e}function a(t){if(t.firstDrawable&&t.lastDrawable){var e=t.domDrawable&&t.domDrawable.blocks,i='<div style="margin-left: '+20*f+'px">';if(i+=t.toString(),e||(i+=" ("+t.drawableCount+" drawables)"),i+="</div>",f+=1,e)for(var n=0;n<t.domDrawable.blocks.length;n++)i+=a(t.domDrawable.blocks[n]);return f-=1,i}}function o(e){function i(t){n+=' <span style="color: #008">'+t+"</span>"}var n="",r=e.node;n+=e.id,n+=" "+(r.constructor.name?r.constructor.name:"?"),n+=' <span style="font-weight: '+(r.isPainted()?"bold":"normal")+'">'+r.id+"</span>",n+=r.getDebugHTMLExtras(),r.visible||i("invis"),e.visible||i("I-invis"),e.relativeVisible||i("I-rel-invis"),e.selfVisible||i("I-self-invis"),e.fittability.ancestorsFittable||i("nofit-ancestor"),e.fittability.selfFittable||i("nofit-self"),r.pickable===!0&&i("pickable"),r.pickable===!1&&i("unpickable"),e.trail.isPickable()&&i('<span style="color: #808">hits</span>'),r.clipArea&&i("clipArea"),r.mouseArea&&i("mouseArea"),r.touchArea&&i("touchArea"),r.getInputListeners().length&&i("inputListeners"),r.getRenderer()&&i("renderer:"+r.getRenderer()),r.isLayerSplit()&&i("layerSplit"),r.opacity<1&&i("opacity:"+r.opacity),r._boundsEventCount>0&&i('<span style="color: #800">boundsListen:'+r._boundsEventCount+":"+r._boundsEventSelfCount+"</span>");var s="";switch(r.transform.getMatrix().type){case h.Types.IDENTITY:s="";break;case h.Types.TRANSLATION_2D:s="translated";break;case h.Types.SCALING:s="scale";break;case h.Types.AFFINE:s="affine";break;case h.Types.OTHER:s="other"}return s&&(n+=' <span style="color: #88f" title="'+r.transform.getMatrix().toString().replace("\n","&#10;")+'">'+s+"</span>"),n+=' <span style="color: #888">[Trail '+e.trail.indices.join(".")+"]</span>",n+=' <span style="color: #c88">'+t(e.state)+"</span>",n+=' <span style="color: #8c8">'+r._rendererSummary.bitmask.toString(16)+(r._rendererBitmask!==d.bitmaskNodeDefault?" ("+r._rendererBitmask.toString(16)+")":"")+"</span>"}function l(t){var e=t.toString();return t.visible&&(e="<strong>"+e+"</strong>"),t.dirty&&(e+=t.dirty?' <span style="color: #c00;">[x]</span>':""),t.fittable||(e+=t.dirty?' <span style="color: #0c0;">[no-fit]</span>':""),e}function u(t){function e(t,e){i+=' <span style="color: #888">'+t+":"+l(e)+"</span>";
}var i='<div style="margin-left: '+20*f+'px">';i+=o(t),t.selfDrawable&&e("self",t.selfDrawable),t.groupDrawable&&e("group",t.groupDrawable),t.sharedCacheDrawable&&e("sharedCache",t.sharedCacheDrawable),i+="</div>",p+=i,f+=1,_.each(t.children,function(t){u(t)}),f-=1}function c(t){var e='<div style="margin-left: '+20*f+'px">';if(e+=l(t),t.instance?(e+=' <span style="color: #0a0;">('+t.instance.trail.toPathString()+")</span>",e+="&nbsp;&nbsp;&nbsp;"+o(t.instance)):t.backboneInstance&&(e+=' <span style="color: #a00;">('+t.backboneInstance.trail.toPathString()+")</span>",e+="&nbsp;&nbsp;&nbsp;"+o(t.backboneInstance)),e+="</div>",p+=e,t.blocks)f+=1,_.each(t.blocks,function(t){c(t)}),f-=1;else if(t.firstDrawable&&t.lastDrawable){f+=1;for(var i=t.firstDrawable;i!==t.lastDrawable;i=i.nextDrawable)c(i);c(t.lastDrawable),f-=1}}var m="font-weight: bold; font-size: 120%; margin-top: 5px;",f=0,p="";p+='<div style="'+m+'">Display Summary</div>',p+=this._size.toString()+" frame:"+this._frameId+" input:"+!!this._input+" cursor:"+this._lastCursor+"<br>",p+="Nodes: "+e(this._rootNode)+"<br>",p+=this._baseInstance?"Instances: "+i(this._baseInstance)+"<br>":"",p+=this._rootBackbone?"Drawables: "+n(this._rootBackbone)+"<br>":"";var g={};p+=this._baseInstance?"Retained Drawables: "+s(this._baseInstance)+"<br>":"";for(var b in g)p+="&nbsp;&nbsp;&nbsp;&nbsp;"+b+": "+g[b]+"<br>";if(this._rootBackbone){p+='<div style="'+m+'">Block Summary</div>';for(var v=0;v<this._rootBackbone.blocks.length;v++)p+=a(this._rootBackbone.blocks[v])}return this._baseInstance&&(p+='<div style="'+m+'">Root Instance Tree</div>',u(this._baseInstance)),_.each(this._sharedCanvasInstances,function(t){p+='<div style="'+m+'">Shared Canvas Instance Tree</div>',u(t)}),this._rootBackbone&&(p+='<div style="font-weight: bold;">Root Drawable Tree</div>',c(this._rootBackbone)),p},popupDebug:function(){var t='<!DOCTYPE html><html lang="en"><head><title>Scenery Debug Snapshot</title></head><body style="font-size: 12px;">'+this.getDebugHTML()+"</body></html>";window.open("data:text/html;charset=utf-8,"+encodeURIComponent(t))},toStringWithChildren:function(t,e){function i(t){return t===n?e:(t.constructor.name?t.constructor.name.toLowerCase():"(node)")+t.id}e=e||"scene";var n=this._rootNode,r="",s=this._rootNode.getTopologicallySortedNodes().slice(0).reverse();return _.each(s,function(s){if(r&&(r+="\n"),t&&s===n){var a=n.getPropString("  ",!1),o=a?"\n"+a+"\n":"";""!==o?r+=e+".mutate( {"+o+"} )":r=r.slice(0,-1)}else r+="var "+i(s)+" = "+s.toString("",!1);_.each(s.children,function(t){r+="\n"+i(s)+".addChild( "+i(t)+" );"})}),r},foreignObjectRasterization:function(t){function e(t){if(t.blocks)_.each(t.blocks,function(t){e(t)});else if(t.firstDrawable&&t.lastDrawable){for(var n=t.firstDrawable;n!==t.lastDrawable;n=n.nextDrawable)e(n);e(t.lastDrawable),t.domElement&&t.domElement instanceof window.HTMLCanvasElement&&(i[t.canvasId]=t.domElement.toDataURL())}}var i={};e(this._rootBackbone);var n=document.createElement("canvas"),r=n.getContext("2d");n.width=this.width,n.height=this.height;var s=document.implementation.createHTMLDocument("");s.documentElement.innerHTML=this.domElement.outerHTML,s.documentElement.setAttribute("xmlns",s.documentElement.namespaceURI);var a=s.documentElement.getElementsByTagName("canvas");a=Array.prototype.slice.call(a);for(var o=0;o<a.length;o++){var h=a[o],l=h.style.cssText,u=s.createElement("img"),c=i[h.id];u.src=c,u.setAttribute("style",l),h.parentNode.replaceChild(u,h)}var d=(new window.XMLSerializer).serializeToString(s.documentElement),m='<svg xmlns="http://www.w3.org/2000/svg" width="'+this.width+'" height="'+this.height+'"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+d+"</div></foreignObject></svg>",f=new Image;f.onload=function(){r.drawImage(f,0,0),t(n.toDataURL())},f.onerror=function(){t(null)},f.src="data:image/svg+xml;base64,"+window.btoa(m)},popupRasterization:function(){this.foreignObjectRasterization(window.open)}},r.prototype)),e.customCursors={"scenery-grab-pointer":["grab","-moz-grab","-webkit-grab","pointer"],"scenery-grabbing-pointer":["grabbing","-moz-grabbing","-webkit-grabbing","pointer"]},s.addProperty(e,"focus",null),e}),i("SCENERY/accessibility/AccessiblePeer",["require","PHET_CORE/inherit","PHET_CORE/Poolable","AXON/Events","SCENERY/scenery","SCENERY/display/Display"],function(t){"use strict";function e(t,e,i){this.initializeAccessiblePeer(t,e,i)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("AXON/Events"),s=t("SCENERY/scenery"),a=t("SCENERY/display/Display"),o=1;return s.register("AccessiblePeer",e),i(r,e,{initializeAccessiblePeer:function(t,e,i){var n=this;return r.call(this),this.id=this.id||o++,this.accessibleInstance=t,this.display=t.display,this.trail=t.trail,this.domElement=e,this.containerDOMElement=i?i:this.containerDOMElement||null,this.disposed=!1,this.domElement.addEventListener("focus",function(e){e.target===n.domElement&&(a.focus={display:t.display,trail:t.trail})}),this.domElement.addEventListener("blur",function(t){t.target===n.domElement&&(a.focus=null)}),this},getChildContainerElement:function(){return this.containerDOMElement||this.domElement},dispose:function(){this.disposed=!0,this.freeToPool&&this.freeToPool()}}),e.Poolable={mixin:function(t){n.mixin(t,{defaultFactory:function(){return new t},constructorDuplicateFactory:function(e){return function(i){return e.length?e.pop().initialize(i):new t(i)}}})}},e}),function(){function t(t,e,i){i=(i||0)-1;for(var n=t?t.length:0;++i<n;)if(t[i]===e)return i;return-1}function e(e,i){var n=typeof i;if(e=e.l,"boolean"==n||null==i)return e[i]?0:-1;"number"!=n&&"string"!=n&&(n="object");var r="number"==n?i:v+i;return e=(e=e[n])&&e[r],"object"==n?e&&-1<t(e,i)?0:-1:e?0:-1}function n(t){var e=this.l,i=typeof t;if("boolean"==i||null==t)e[t]=!0;else{"number"!=i&&"string"!=i&&(i="object");var n="number"==i?t:v+t,e=e[i]||(e[i]={});"object"==i?(e[n]||(e[n]=[])).push(t):e[n]=!0}}function r(t){return t.charCodeAt(0)}function s(t,e){for(var i=t.m,n=e.m,r=-1,s=i.length;++r<s;){var a=i[r],o=n[r];if(a!==o){if(a>o||"undefined"==typeof a)return 1;if(o>a||"undefined"==typeof o)return-1}}return t.n-e.n}function a(t){var e=-1,i=t.length,r=t[0],s=t[i/2|0],a=t[i-1];if(r&&"object"==typeof r&&s&&"object"==typeof s&&a&&"object"==typeof a)return!1;for(r=l(),r["false"]=r["null"]=r["true"]=r.undefined=!1,s=l(),s.k=t,s.l=r,s.push=n;++e<i;)s.push(t[e]);return s}function o(t){return"\\"+W[t]}function h(){return p.pop()||[]}function l(){return g.pop()||{k:null,l:null,m:null,"false":!1,n:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,o:null}}function u(t){t.length=0,p.length<S&&p.push(t)}function c(t){var e=t.l;e&&c(e),t.k=t.l=t.m=t.object=t.number=t.string=t.o=null,g.length<S&&g.push(t)}function d(t,e,i){e||(e=0),"undefined"==typeof i&&(i=t?t.length:0);var n=-1;i=i-e||0;for(var r=Array(0>i?0:i);++n<i;)r[n]=t[e+n];return r}function m(i){function n(t,e,i){if(!t||!q[typeof t])return t;e=e&&"undefined"==typeof i?e:et(e,i,3);for(var n=-1,r=q[typeof t]&&Ye(t),s=r?r.length:0;++n<s&&(i=r[n],!1!==e(t[i],i,t)););return t}function p(t,e,i){var n;if(!t||!q[typeof t])return t;e=e&&"undefined"==typeof i?e:et(e,i,3);for(n in t)if(!1===e(t[n],n,t))break;return t}function g(t,e,i){var n,r=t,s=r;if(!r)return s;for(var a=arguments,o=0,h="number"==typeof i?2:a.length;++o<h;)if((r=a[o])&&q[typeof r])for(var l=-1,u=q[typeof r]&&Ye(r),c=u?u.length:0;++l<c;)n=u[l],"undefined"==typeof s[n]&&(s[n]=r[n]);return s}function S(t,e,i){var n,r=t,s=r;if(!r)return s;var a=arguments,o=0,h="number"==typeof i?2:a.length;if(h>3&&"function"==typeof a[h-2])var l=et(a[--h-1],a[h--],2);else h>2&&"function"==typeof a[h-1]&&(l=a[--h]);for(;++o<h;)if((r=a[o])&&q[typeof r])for(var u=-1,c=q[typeof r]&&Ye(r),d=c?c.length:0;++u<d;)n=c[u],s[n]=l?l(s[n],r[n]):r[n];return s}function W(t){var e,i=[];if(!t||!q[typeof t])return i;for(e in t)be.call(t,e)&&i.push(e);return i}function J(t){return t&&"object"==typeof t&&!Be(t)&&be.call(t,"__wrapped__")?t:new K(t)}function K(t,e){this.__chain__=!!e,this.__wrapped__=t}function Q(t){function e(){if(n){var t=d(n);ve.apply(t,arguments)}if(this instanceof e){var s=tt(i.prototype),t=i.apply(s,t||arguments);return yt(t)?t:s}return i.apply(r,t||arguments)}var i=t[0],n=t[2],r=t[4];return Ie(e,t),e}function Z(t,e,i,r,s){if(i){var a=i(t);if("undefined"!=typeof a)return a}if(!yt(t))return t;var o=ue.call(t);if(!z[o])return t;var l=Oe[o];switch(o){case Y:case L:return new l(+t);case F:case j:return new l(t);case H:return a=l(t.source,N.exec(t)),a.lastIndex=t.lastIndex,a}if(o=Be(t),e){var c=!r;r||(r=h()),s||(s=h());for(var m=r.length;m--;)if(r[m]==t)return s[m];a=o?l(t.length):{}}else a=o?d(t):S({},t);return o&&(be.call(t,"index")&&(a.index=t.index),be.call(t,"input")&&(a.input=t.input)),e?(r.push(t),s.push(a),(o?Pt:n)(t,function(t,n){a[n]=Z(t,e,i,r,s)}),c&&(u(r),u(s)),a):a}function tt(t){return yt(t)?we(t):{}}function et(t,e,i){if("function"!=typeof t)return qt;if("undefined"==typeof e||!("prototype"in t))return t;var n=t.__bindData__;if("undefined"==typeof n&&(De.funcNames&&(n=!t.name),n=n||!De.funcDecomp,!n)){var r=pe.call(t);De.funcNames||(n=!_.test(r)),n||(n=k.test(r),Ie(t,n))}if(!1===n||!0!==n&&1&n[1])return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)};case 4:return function(i,n,r,s){return t.call(e,i,n,r,s)}}return Ut(t,e)}function it(t){function e(){var t=h?a:this;if(r){var f=d(r);ve.apply(f,arguments)}return(s||u)&&(f||(f=d(arguments)),s&&ve.apply(f,s),u&&f.length<o)?(n|=16,it([i,c?n:-4&n,f,null,a,o])):(f||(f=arguments),l&&(i=t[m]),this instanceof e?(t=tt(i.prototype),f=i.apply(t,f),yt(f)?f:t):i.apply(t,f))}var i=t[0],n=t[1],r=t[2],s=t[3],a=t[4],o=t[5],h=1&n,l=2&n,u=4&n,c=8&n,m=i;return Ie(e,t),e}function nt(i,n){var r=-1,s=dt(),o=i?i.length:0,h=o>=E&&s===t,l=[];if(h){var u=a(n);u?(s=e,n=u):h=!1}for(;++r<o;)u=i[r],0>s(n,u)&&l.push(u);return h&&c(n),l}function rt(t,e,i,n){n=(n||0)-1;for(var r=t?t.length:0,s=[];++n<r;){var a=t[n];if(a&&"object"==typeof a&&"number"==typeof a.length&&(Be(a)||gt(a))){e||(a=rt(a,e,i));var o=-1,h=a.length,l=s.length;for(s.length+=h;++o<h;)s[l++]=a[o]}else i||s.push(a)}return s}function st(t,e,i,n,r,s){if(i){var a=i(t,e);if("undefined"!=typeof a)return!!a}if(t===e)return 0!==t||1/t==1/e;if(t===t&&!(t&&q[typeof t]||e&&q[typeof e]))return!1;if(null==t||null==e)return t===e;var o=ue.call(t),l=ue.call(e);if(o==I&&(o=V),l==I&&(l=V),o!=l)return!1;switch(o){case Y:case L:return+t==+e;case F:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case H:case j:return t==se(e)}if(l=o==B,!l){var c=be.call(t,"__wrapped__"),d=be.call(e,"__wrapped__");if(c||d)return st(c?t.__wrapped__:t,d?e.__wrapped__:e,i,n,r,s);if(o!=V)return!1;if(o=t.constructor,c=e.constructor,o!=c&&!(St(o)&&o instanceof o&&St(c)&&c instanceof c)&&"constructor"in t&&"constructor"in e)return!1}for(o=!r,r||(r=h()),s||(s=h()),c=r.length;c--;)if(r[c]==t)return s[c]==e;var m=0,a=!0;if(r.push(t),s.push(e),l){if(c=t.length,m=e.length,(a=m==c)||n)for(;m--;)if(l=c,d=e[m],n)for(;l--&&!(a=st(t[l],d,i,n,r,s)););else if(!(a=st(t[m],d,i,n,r,s)))break}else p(e,function(e,o,h){return be.call(h,o)?(m++,a=be.call(t,o)&&st(t[o],e,i,n,r,s)):void 0}),a&&!n&&p(t,function(t,e,i){return be.call(i,e)?a=-1<--m:void 0});return r.pop(),s.pop(),o&&(u(r),u(s)),a}function at(t,e,i,r,s){(Be(e)?Pt:n)(e,function(e,n){var a,o,h=e,l=t[n];if(e&&((o=Be(e))||He(e))){for(h=r.length;h--;)if(a=r[h]==e){l=s[h];break}if(!a){var u;i&&(h=i(l,e),u="undefined"!=typeof h)&&(l=h),u||(l=o?Be(l)?l:[]:He(l)?l:{}),r.push(e),s.push(l),u||at(l,e,i,r,s)}}else i&&(h=i(l,e),"undefined"==typeof h&&(h=e)),"undefined"!=typeof h&&(l=h);t[n]=l})}function ot(t,e){return t+fe(ke()*(e-t+1))}function ht(i,n,r){var s=-1,o=dt(),l=i?i.length:0,d=[],m=!n&&l>=E&&o===t,f=r||m?h():d;for(m&&(f=a(f),o=e);++s<l;){var p=i[s],g=r?r(p,s,i):p;(n?!s||f[f.length-1]!==g:0>o(f,g))&&((r||m)&&f.push(g),d.push(p))}return m?(u(f.k),c(f)):r&&u(f),d}function lt(t){return function(e,i,r){var s={};i=J.createCallback(i,r,3),r=-1;var a=e?e.length:0;if("number"==typeof a)for(;++r<a;){var o=e[r];t(s,o,i(o,r,e),e)}else n(e,function(e,n,r){t(s,e,i(e,n,r),r)});return s}}function ut(t,e,i,n,r,s){var a=1&e,o=4&e,h=16&e,l=32&e;if(!(2&e||St(t)))throw new ae;h&&!i.length&&(e&=-17,h=i=!1),l&&!n.length&&(e&=-33,l=n=!1);var u=t&&t.__bindData__;return u&&!0!==u?(u=d(u),u[2]&&(u[2]=d(u[2])),u[3]&&(u[3]=d(u[3])),!a||1&u[1]||(u[4]=r),!a&&1&u[1]&&(e|=8),!o||4&u[1]||(u[5]=s),h&&ve.apply(u[2]||(u[2]=[]),i),l&&ye.apply(u[3]||(u[3]=[]),n),u[1]|=e,ut.apply(null,u)):(1==e||17===e?Q:it)([t,e,i,n,r,s])}function ct(t){return Le[t]}function dt(){var e=(e=J.indexOf)===Mt?t:e;return e}function mt(t){return"function"==typeof t&&ce.test(t)}function ft(t){var e,i;return t&&ue.call(t)==V&&(e=t.constructor,!St(e)||e instanceof e)?(p(t,function(t,e){i=e}),"undefined"==typeof i||be.call(t,i)):!1}function pt(t){return Me[t]}function gt(t){return t&&"object"==typeof t&&"number"==typeof t.length&&ue.call(t)==I||!1}function bt(t,e,i){var n=Ye(t),r=n.length;for(e=et(e,i,3);r--&&(i=n[r],!1!==e(t[i],i,t)););return t}function vt(t){var e=[];return p(t,function(t,i){St(t)&&e.push(i)}),e.sort()}function Et(t){for(var e=-1,i=Ye(t),n=i.length,r={};++e<n;){var s=i[e];r[t[s]]=s}return r}function St(t){return"function"==typeof t}function yt(t){return!(!t||!q[typeof t])}function Ct(t){return"number"==typeof t||t&&"object"==typeof t&&ue.call(t)==F||!1}function wt(t){return"string"==typeof t||t&&"object"==typeof t&&ue.call(t)==j||!1}function Tt(t){for(var e=-1,i=Ye(t),n=i.length,r=Qt(n);++e<n;)r[e]=t[i[e]];return r}function Rt(t,e,i){var r=-1,s=dt(),a=t?t.length:0,o=!1;return i=(0>i?Ae(0,a+i):i)||0,Be(t)?o=-1<s(t,e,i):"number"==typeof a?o=-1<(wt(t)?t.indexOf(e,i):s(t,e,i)):n(t,function(t){return++r<i?void 0:!(o=t===e)}),o}function Nt(t,e,i){var r=!0;e=J.createCallback(e,i,3),i=-1;var s=t?t.length:0;if("number"==typeof s)for(;++i<s&&(r=!!e(t[i],i,t)););else n(t,function(t,i,n){return r=!!e(t,i,n)});return r}function _t(t,e,i){var r=[];e=J.createCallback(e,i,3),i=-1;var s=t?t.length:0;if("number"==typeof s)for(;++i<s;){var a=t[i];e(a,i,t)&&r.push(a)}else n(t,function(t,i,n){e(t,i,n)&&r.push(t)});return r}function At(t,e,i){e=J.createCallback(e,i,3),i=-1;var r=t?t.length:0;if("number"!=typeof r){var s;return n(t,function(t,i,n){return e(t,i,n)?(s=t,!1):void 0}),s}for(;++i<r;){var a=t[i];if(e(a,i,t))return a}}function Pt(t,e,i){var r=-1,s=t?t.length:0;if(e=e&&"undefined"==typeof i?e:et(e,i,3),"number"==typeof s)for(;++r<s&&!1!==e(t[r],r,t););else n(t,e);return t}function xt(t,e,i){var r=t?t.length:0;if(e=e&&"undefined"==typeof i?e:et(e,i,3),"number"==typeof r)for(;r--&&!1!==e(t[r],r,t););else{var s=Ye(t),r=s.length;n(t,function(t,i,n){return i=s?s[--r]:--r,e(n[i],i,n)})}return t}function kt(t,e,i){var r=-1,s=t?t.length:0;if(e=J.createCallback(e,i,3),"number"==typeof s)for(var a=Qt(s);++r<s;)a[r]=e(t[r],r,t);else a=[],n(t,function(t,i,n){a[++r]=e(t,i,n)});return a}function Ot(t,e,i){var n=-1/0,s=n;if("function"!=typeof e&&i&&i[e]===t&&(e=null),null==e&&Be(t)){i=-1;for(var a=t.length;++i<a;){var o=t[i];o>s&&(s=o)}}else e=null==e&&wt(t)?r:J.createCallback(e,i,3),Pt(t,function(t,i,r){i=e(t,i,r),i>n&&(n=i,s=t)});return s}function Dt(t,e,i,r){if(!t)return i;var s=3>arguments.length;e=J.createCallback(e,r,4);var a=-1,o=t.length;if("number"==typeof o)for(s&&(i=t[++a]);++a<o;)i=e(i,t[a],a,t);else n(t,function(t,n,r){i=s?(s=!1,t):e(i,t,n,r)});return i}function It(t,e,i,n){var r=3>arguments.length;return e=J.createCallback(e,n,4),xt(t,function(t,n,s){i=r?(r=!1,t):e(i,t,n,s)}),i}function Bt(t){var e=-1,i=t?t.length:0,n=Qt("number"==typeof i?i:0);return Pt(t,function(t){var i=ot(0,++e);n[e]=n[i],n[i]=t}),n}function Yt(t,e,i){var r;e=J.createCallback(e,i,3),i=-1;var s=t?t.length:0;if("number"==typeof s)for(;++i<s&&!(r=e(t[i],i,t)););else n(t,function(t,i,n){return!(r=e(t,i,n))});return!!r}function Lt(t,e,i){var n=0,r=t?t.length:0;if("number"!=typeof e&&null!=e){var s=-1;for(e=J.createCallback(e,i,3);++s<r&&e(t[s],s,t);)n++}else if(n=e,null==n||i)return t?t[0]:f;return d(t,0,Pe(Ae(0,n),r))}function Mt(e,i,n){if("number"==typeof n){var r=e?e.length:0;n=0>n?Ae(0,r+n):n||0}else if(n)return n=Vt(e,i),e[n]===i?n:-1;return t(e,i,n)}function Ft(t,e,i){if("number"!=typeof e&&null!=e){var n=0,r=-1,s=t?t.length:0;for(e=J.createCallback(e,i,3);++r<s&&e(t[r],r,t);)n++}else n=null==e||i?1:Ae(0,e);return d(t,n)}function Vt(t,e,i,n){var r=0,s=t?t.length:r;for(i=i?J.createCallback(i,n,1):qt,e=i(e);s>r;)n=r+s>>>1,i(t[n])<e?r=n+1:s=n;return r}function Ht(t,e,i,n){return"boolean"!=typeof e&&null!=e&&(n=i,i="function"!=typeof e&&n&&n[e]===t?null:e,e=!1),null!=i&&(i=J.createCallback(i,n,3)),ht(t,e,i)}function jt(){for(var t=1<arguments.length?arguments:arguments[0],e=-1,i=t?Ot(Ge(t,"length")):0,n=Qt(0>i?0:i);++e<i;)n[e]=Ge(t,e);return n}function zt(t,e){var i=-1,n=t?t.length:0,r={};for(e||!n||Be(t[0])||(e=[]);++i<n;){var s=t[i];e?r[s]=e[i]:s&&(r[s[0]]=s[1])}return r}function Ut(t,e){return 2<arguments.length?ut(t,17,d(arguments,2),null,e):ut(t,1,null,null,e)}function Gt(t,e,i){function n(){u&&me(u),a=u=c=f,(p||m!==e)&&(d=qe(),o=t.apply(l,s),u||a||(s=l=null))}function r(){var i=e-(qe()-h);i>0?u=Ee(r,i):(a&&me(a),i=c,a=u=c=f,i&&(d=qe(),o=t.apply(l,s),u||a||(s=l=null)))}var s,a,o,h,l,u,c,d=0,m=!1,p=!0;if(!St(t))throw new ae;if(e=Ae(0,e)||0,!0===i)var g=!0,p=!1;else yt(i)&&(g=i.leading,m="maxWait"in i&&(Ae(e,i.maxWait)||0),p="trailing"in i?i.trailing:p);return function(){if(s=arguments,h=qe(),l=this,c=p&&(u||!g),!1===m)var i=g&&!u;else{a||g||(d=h);var f=m-(h-d),b=0>=f;b?(a&&(a=me(a)),d=h,o=t.apply(l,s)):a||(a=Ee(n,f))}return b&&u?u=me(u):u||e===m||(u=Ee(r,e)),i&&(b=!0,o=t.apply(l,s)),!b||u||a||(s=l=null),o}}function qt(t){return t}function Wt(t,e,i){var n=!0,r=e&&vt(e);e&&(i||r.length)||(null==i&&(i=e),s=K,e=t,t=J,r=vt(e)),!1===i?n=!1:yt(i)&&"chain"in i&&(n=i.chain);var s=t,a=St(s);Pt(r,function(i){var r=t[i]=e[i];a&&(s.prototype[i]=function(){var e=this.__chain__,i=this.__wrapped__,a=[i];if(ve.apply(a,arguments),a=r.apply(t,a),n||e){if(i===a&&yt(a))return this;a=new s(a),a.__chain__=e}return a})})}function Xt(){}function Jt(t){return function(e){return e[t]}}function Kt(){return this.__wrapped__}i=i?$.defaults(X.Object(),i,$.pick(X,D)):X;var Qt=i.Array,Zt=i.Boolean,$t=i.Date,te=i.Function,ee=i.Math,ie=i.Number,ne=i.Object,re=i.RegExp,se=i.String,ae=i.TypeError,oe=[],he=ne.prototype,le=i._,ue=he.toString,ce=re("^"+se(ue).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),de=ee.ceil,me=i.clearTimeout,fe=ee.floor,pe=te.prototype.toString,ge=mt(ge=ne.getPrototypeOf)&&ge,be=he.hasOwnProperty,ve=oe.push,Ee=i.setTimeout,Se=oe.splice,ye=oe.unshift,Ce=function(){try{var t={},e=mt(e=ne.defineProperty)&&e,i=e(t,t,t)&&e}catch(n){}return i}(),we=mt(we=ne.create)&&we,Te=mt(Te=Qt.isArray)&&Te,Re=i.isFinite,Ne=i.isNaN,_e=mt(_e=ne.keys)&&_e,Ae=ee.max,Pe=ee.min,xe=i.parseInt,ke=ee.random,Oe={};Oe[B]=Qt,Oe[Y]=Zt,Oe[L]=$t,Oe[M]=te,Oe[V]=ne,Oe[F]=ie,Oe[H]=re,Oe[j]=se,K.prototype=J.prototype;var De=J.support={};De.funcDecomp=!mt(i.a)&&k.test(m),De.funcNames="string"==typeof te.name,J.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:J}},we||(tt=function(){function t(){}return function(e){if(yt(e)){t.prototype=e;var n=new t;t.prototype=null}return n||i.Object()}}());var Ie=Ce?function(t,e){G.value=e,Ce(t,"__bindData__",G)}:Xt,Be=Te||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&ue.call(t)==B||!1},Ye=_e?function(t){return yt(t)?_e(t):[]}:W,Le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Me=Et(Le),Fe=re("("+Ye(Me).join("|")+")","g"),Ve=re("["+Ye(Le).join("")+"]","g"),He=ge?function(t){if(!t||ue.call(t)!=V)return!1;var e=t.valueOf,i=mt(e)&&(i=ge(e))&&ge(i);return i?t==i||ge(t)==i:ft(t)}:ft,je=lt(function(t,e,i){be.call(t,i)?t[i]++:t[i]=1}),ze=lt(function(t,e,i){(be.call(t,i)?t[i]:t[i]=[]).push(e)}),Ue=lt(function(t,e,i){t[i]=e}),Ge=kt,qe=mt(qe=$t.now)&&qe||function(){return(new $t).getTime()},We=8==xe(y+"08")?xe:function(t,e){return xe(wt(t)?t.replace(P,""):t,e||0)};return J.after=function(t,e){if(!St(e))throw new ae;return function(){return 1>--t?e.apply(this,arguments):void 0}},J.assign=S,J.at=function(t){for(var e=arguments,i=-1,n=rt(e,!0,!1,1),e=e[2]&&e[2][e[1]]===t?1:n.length,r=Qt(e);++i<e;)r[i]=t[n[i]];return r},J.bind=Ut,J.bindAll=function(t){for(var e=1<arguments.length?rt(arguments,!0,!1,1):vt(t),i=-1,n=e.length;++i<n;){var r=e[i];t[r]=ut(t[r],1,null,null,t)}return t},J.bindKey=function(t,e){return 2<arguments.length?ut(e,19,d(arguments,2),null,t):ut(e,3,null,null,t)},J.chain=function(t){return t=new K(t),t.__chain__=!0,t},J.compact=function(t){for(var e=-1,i=t?t.length:0,n=[];++e<i;){var r=t[e];r&&n.push(r)}return n},J.compose=function(){for(var t=arguments,e=t.length;e--;)if(!St(t[e]))throw new ae;return function(){for(var e=arguments,i=t.length;i--;)e=[t[i].apply(this,e)];return e[0]}},J.constant=function(t){return function(){return t}},J.countBy=je,J.create=function(t,e){var i=tt(t);return e?S(i,e):i},J.createCallback=function(t,e,i){var n=typeof t;if(null==t||"function"==n)return et(t,e,i);if("object"!=n)return Jt(t);var r=Ye(t),s=r[0],a=t[s];return 1!=r.length||a!==a||yt(a)?function(e){for(var i=r.length,n=!1;i--&&(n=st(e[r[i]],t[r[i]],null,!0)););return n}:function(t){return t=t[s],a===t&&(0!==a||1/a==1/t)}},J.curry=function(t,e){return e="number"==typeof e?e:+e||t.length,ut(t,4,null,null,null,e)},J.debounce=Gt,J.defaults=g,J.defer=function(t){if(!St(t))throw new ae;var e=d(arguments,1);return Ee(function(){t.apply(f,e)},1)},J.delay=function(t,e){if(!St(t))throw new ae;var i=d(arguments,2);return Ee(function(){t.apply(f,i)},e)},J.difference=function(t){return nt(t,rt(arguments,!0,!0,1))},J.filter=_t,J.flatten=function(t,e,i,n){return"boolean"!=typeof e&&null!=e&&(n=i,i="function"!=typeof e&&n&&n[e]===t?null:e,e=!1),null!=i&&(t=kt(t,i,n)),rt(t,e)},J.forEach=Pt,J.forEachRight=xt,J.forIn=p,J.forInRight=function(t,e,i){var n=[];p(t,function(t,e){n.push(e,t)});var r=n.length;for(e=et(e,i,3);r--&&!1!==e(n[r--],n[r],t););return t},J.forOwn=n,J.forOwnRight=bt,J.functions=vt,J.groupBy=ze,J.indexBy=Ue,J.initial=function(t,e,i){var n=0,r=t?t.length:0;if("number"!=typeof e&&null!=e){var s=r;for(e=J.createCallback(e,i,3);s--&&e(t[s],s,t);)n++}else n=null==e||i?1:e||n;return d(t,0,Pe(Ae(0,r-n),r))},J.intersection=function(){for(var i=[],n=-1,r=arguments.length,s=h(),o=dt(),l=o===t,d=h();++n<r;){var m=arguments[n];(Be(m)||gt(m))&&(i.push(m),s.push(l&&m.length>=E&&a(n?i[n]:d)))}var l=i[0],f=-1,p=l?l.length:0,g=[];t:for(;++f<p;){var b=s[0],m=l[f];if(0>(b?e(b,m):o(d,m))){for(n=r,(b||d).push(m);--n;)if(b=s[n],0>(b?e(b,m):o(i[n],m)))continue t;g.push(m)}}for(;r--;)(b=s[r])&&c(b);return u(s),u(d),g},J.invert=Et,J.invoke=function(t,e){var i=d(arguments,2),n=-1,r="function"==typeof e,s=t?t.length:0,a=Qt("number"==typeof s?s:0);return Pt(t,function(t){a[++n]=(r?e:t[e]).apply(t,i)}),a},J.keys=Ye,J.map=kt,J.mapValues=function(t,e,i){var r={};return e=J.createCallback(e,i,3),n(t,function(t,i,n){r[i]=e(t,i,n)}),r},J.max=Ot,J.memoize=function(t,e){function i(){var n=i.cache,r=e?e.apply(this,arguments):v+arguments[0];return be.call(n,r)?n[r]:n[r]=t.apply(this,arguments)}if(!St(t))throw new ae;return i.cache={},i},J.merge=function(t){var e=arguments,i=2;if(!yt(t))return t;if("number"!=typeof e[2]&&(i=e.length),i>3&&"function"==typeof e[i-2])var n=et(e[--i-1],e[i--],2);else i>2&&"function"==typeof e[i-1]&&(n=e[--i]);for(var e=d(arguments,1,i),r=-1,s=h(),a=h();++r<i;)at(t,e[r],n,s,a);return u(s),u(a),t},J.min=function(t,e,i){var n=1/0,s=n;if("function"!=typeof e&&i&&i[e]===t&&(e=null),null==e&&Be(t)){i=-1;for(var a=t.length;++i<a;){var o=t[i];s>o&&(s=o)}}else e=null==e&&wt(t)?r:J.createCallback(e,i,3),Pt(t,function(t,i,r){i=e(t,i,r),n>i&&(n=i,s=t)});return s},J.omit=function(t,e,i){var n={};if("function"!=typeof e){var r=[];p(t,function(t,e){r.push(e)});for(var r=nt(r,rt(arguments,!0,!1,1)),s=-1,a=r.length;++s<a;){var o=r[s];n[o]=t[o]}}else e=J.createCallback(e,i,3),p(t,function(t,i,r){e(t,i,r)||(n[i]=t)});return n},J.once=function(t){var e,i;if(!St(t))throw new ae;return function(){return e?i:(e=!0,i=t.apply(this,arguments),t=null,i)}},J.pairs=function(t){for(var e=-1,i=Ye(t),n=i.length,r=Qt(n);++e<n;){var s=i[e];r[e]=[s,t[s]]}return r},J.partial=function(t){return ut(t,16,d(arguments,1))},J.partialRight=function(t){return ut(t,32,null,d(arguments,1))},J.pick=function(t,e,i){var n={};if("function"!=typeof e)for(var r=-1,s=rt(arguments,!0,!1,1),a=yt(t)?s.length:0;++r<a;){var o=s[r];o in t&&(n[o]=t[o])}else e=J.createCallback(e,i,3),p(t,function(t,i,r){e(t,i,r)&&(n[i]=t)});return n},J.pluck=Ge,J.property=Jt,J.pull=function(t){for(var e=arguments,i=0,n=e.length,r=t?t.length:0;++i<n;)for(var s=-1,a=e[i];++s<r;)t[s]===a&&(Se.call(t,s--,1),r--);return t},J.range=function(t,e,i){t=+t||0,i="number"==typeof i?i:+i||1,null==e&&(e=t,t=0);var n=-1;e=Ae(0,de((e-t)/(i||1)));for(var r=Qt(e);++n<e;)r[n]=t,t+=i;return r},J.reject=function(t,e,i){return e=J.createCallback(e,i,3),_t(t,function(t,i,n){return!e(t,i,n)})},J.remove=function(t,e,i){var n=-1,r=t?t.length:0,s=[];for(e=J.createCallback(e,i,3);++n<r;)i=t[n],e(i,n,t)&&(s.push(i),Se.call(t,n--,1),r--);return s},J.rest=Ft,J.shuffle=Bt,J.sortBy=function(t,e,i){var n=-1,r=Be(e),a=t?t.length:0,o=Qt("number"==typeof a?a:0);for(r||(e=J.createCallback(e,i,3)),Pt(t,function(t,i,s){var a=o[++n]=l();r?a.m=kt(e,function(e){return t[e]}):(a.m=h())[0]=e(t,i,s),a.n=n,a.o=t}),a=o.length,o.sort(s);a--;)t=o[a],o[a]=t.o,r||u(t.m),c(t);return o},J.tap=function(t,e){return e(t),t},J.throttle=function(t,e,i){var n=!0,r=!0;if(!St(t))throw new ae;return!1===i?n=!1:yt(i)&&(n="leading"in i?i.leading:n,r="trailing"in i?i.trailing:r),U.leading=n,U.maxWait=e,U.trailing=r,Gt(t,e,U)},J.times=function(t,e,i){t=-1<(t=+t)?t:0;var n=-1,r=Qt(t);for(e=et(e,i,1);++n<t;)r[n]=e(n);return r},J.toArray=function(t){return t&&"number"==typeof t.length?d(t):Tt(t)},J.transform=function(t,e,i,r){var s=Be(t);if(null==i)if(s)i=[];else{var a=t&&t.constructor;i=tt(a&&a.prototype)}return e&&(e=J.createCallback(e,r,4),(s?Pt:n)(t,function(t,n,r){return e(i,t,n,r)})),i},J.union=function(){return ht(rt(arguments,!0,!0))},J.uniq=Ht,J.values=Tt,J.where=_t,J.without=function(t){return nt(t,d(arguments,1))},J.wrap=function(t,e){return ut(e,16,[t])},J.xor=function(){for(var t=-1,e=arguments.length;++t<e;){var i=arguments[t];if(Be(i)||gt(i))var n=n?ht(nt(n,i).concat(nt(i,n))):i}return n||[]},J.zip=jt,J.zipObject=zt,J.collect=kt,J.drop=Ft,J.each=Pt,J.eachRight=xt,J.extend=S,J.methods=vt,J.object=zt,J.select=_t,J.tail=Ft,J.unique=Ht,J.unzip=jt,Wt(J),J.clone=function(t,e,i,n){return"boolean"!=typeof e&&null!=e&&(n=i,i=e,e=!1),Z(t,e,"function"==typeof i&&et(i,n,1))},J.cloneDeep=function(t,e,i){return Z(t,!0,"function"==typeof e&&et(e,i,1))},J.contains=Rt,J.escape=function(t){return null==t?"":se(t).replace(Ve,ct)},J.every=Nt,J.find=At,J.findIndex=function(t,e,i){var n=-1,r=t?t.length:0;for(e=J.createCallback(e,i,3);++n<r;)if(e(t[n],n,t))return n;return-1},J.findKey=function(t,e,i){var r;return e=J.createCallback(e,i,3),n(t,function(t,i,n){return e(t,i,n)?(r=i,!1):void 0}),r},J.findLast=function(t,e,i){var n;return e=J.createCallback(e,i,3),xt(t,function(t,i,r){return e(t,i,r)?(n=t,!1):void 0}),n},J.findLastIndex=function(t,e,i){var n=t?t.length:0;for(e=J.createCallback(e,i,3);n--;)if(e(t[n],n,t))return n;return-1},J.findLastKey=function(t,e,i){var n;return e=J.createCallback(e,i,3),bt(t,function(t,i,r){return e(t,i,r)?(n=i,!1):void 0}),n},J.has=function(t,e){return t?be.call(t,e):!1},J.identity=qt,J.indexOf=Mt,J.isArguments=gt,J.isArray=Be,J.isBoolean=function(t){return!0===t||!1===t||t&&"object"==typeof t&&ue.call(t)==Y||!1},J.isDate=function(t){return t&&"object"==typeof t&&ue.call(t)==L||!1},J.isElement=function(t){return t&&1===t.nodeType||!1},J.isEmpty=function(t){var e=!0;if(!t)return e;var i=ue.call(t),r=t.length;return i==B||i==j||i==I||i==V&&"number"==typeof r&&St(t.splice)?!r:(n(t,function(){return e=!1}),e)},J.isEqual=function(t,e,i,n){return st(t,e,"function"==typeof i&&et(i,n,2))},J.isFinite=function(t){return Re(t)&&!Ne(parseFloat(t))},J.isFunction=St,J.isNaN=function(t){return Ct(t)&&t!=+t},J.isNull=function(t){return null===t},J.isNumber=Ct,J.isObject=yt,J.isPlainObject=He,J.isRegExp=function(t){return t&&"object"==typeof t&&ue.call(t)==H||!1},J.isString=wt,J.isUndefined=function(t){return"undefined"==typeof t},J.lastIndexOf=function(t,e,i){var n=t?t.length:0;for("number"==typeof i&&(n=(0>i?Ae(0,n+i):Pe(i,n-1))+1);n--;)if(t[n]===e)return n;return-1},J.mixin=Wt,J.noConflict=function(){return i._=le,this},J.noop=Xt,J.now=qe,J.parseInt=We,J.random=function(t,e,i){var n=null==t,r=null==e;return null==i&&("boolean"==typeof t&&r?(i=t,t=1):r||"boolean"!=typeof e||(i=e,r=!0)),n&&r&&(e=1),t=+t||0,r?(e=t,t=0):e=+e||0,i||t%1||e%1?(i=ke(),Pe(t+i*(e-t+parseFloat("1e-"+((i+"").length-1))),e)):ot(t,e)},J.reduce=Dt,J.reduceRight=It,J.result=function(t,e){if(t){var i=t[e];return St(i)?t[e]():i}},J.runInContext=m,J.size=function(t){var e=t?t.length:0;return"number"==typeof e?e:Ye(t).length},J.some=Yt,J.sortedIndex=Vt,J.template=function(t,e,i){var n=J.templateSettings;t=se(t||""),i=g({},i,n);var r,s=g({},i.imports,n.imports),n=Ye(s),s=Tt(s),a=0,h=i.interpolate||x,l="__p+='",h=re((i.escape||x).source+"|"+h.source+"|"+(h===A?R:x).source+"|"+(i.evaluate||x).source+"|$","g");t.replace(h,function(e,i,n,s,h,u){return n||(n=s),l+=t.slice(a,u).replace(O,o),i&&(l+="'+__e("+i+")+'"),h&&(r=!0,l+="';"+h+";\n__p+='"),n&&(l+="'+((__t=("+n+"))==null?'':__t)+'"),a=u+e.length,e}),l+="';",h=i=i.variable,h||(i="obj",l="with("+i+"){"+l+"}"),l=(r?l.replace(C,""):l).replace(w,"$1").replace(T,"$1;"),l="function("+i+"){"+(h?"":i+"||("+i+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var u=te(n,"return "+l).apply(f,s)}catch(c){throw c.source=l,c}return e?u(e):(u.source=l,u)},J.unescape=function(t){return null==t?"":se(t).replace(Fe,pt)},J.uniqueId=function(t){var e=++b;return se(null==t?"":t)+e},J.all=Nt,J.any=Yt,J.detect=At,J.findWhere=At,J.foldl=Dt,J.foldr=It,J.include=Rt,J.inject=Dt,Wt(function(){var t={};return n(J,function(e,i){J.prototype[i]||(t[i]=e)}),t}(),!1),J.first=Lt,J.last=function(t,e,i){var n=0,r=t?t.length:0;if("number"!=typeof e&&null!=e){var s=r;for(e=J.createCallback(e,i,3);s--&&e(t[s],s,t);)n++}else if(n=e,null==n||i)return t?t[r-1]:f;return d(t,Ae(0,r-n))},J.sample=function(t,e,i){return t&&"number"!=typeof t.length&&(t=Tt(t)),null==e||i?t?t[ot(0,t.length-1)]:f:(t=Bt(t),t.length=Pe(Ae(0,e),t.length),t)},J.take=Lt,J.head=Lt,n(J,function(t,e){var i="sample"!==e;J.prototype[e]||(J.prototype[e]=function(e,n){var r=this.__chain__,s=t(this.__wrapped__,e,n);return r||null!=e&&(!n||i&&"function"==typeof e)?new K(s,r):s})}),J.VERSION="2.4.1",J.prototype.chain=function(){return this.__chain__=!0,this},J.prototype.toString=function(){return se(this.__wrapped__)},J.prototype.value=Kt,J.prototype.valueOf=Kt,Pt(["join","pop","shift"],function(t){var e=oe[t];J.prototype[t]=function(){var t=this.__chain__,i=e.apply(this.__wrapped__,arguments);return t?new K(i,t):i}}),Pt(["push","reverse","sort","unshift"],function(t){var e=oe[t];J.prototype[t]=function(){return e.apply(this.__wrapped__,arguments),this}}),Pt(["concat","slice","splice"],function(t){var e=oe[t];J.prototype[t]=function(){return new K(e.apply(this.__wrapped__,arguments),this.__chain__)}}),J}var f,p=[],g=[],b=0,v=+new Date+"",E=75,S=40,y=" 	\x0B\f \ufeff\n\r\u2028\u2029 ᠎              ",C=/\b__p\+='';/g,w=/\b(__p\+=)''\+/g,T=/(__e\(.*?\)|\b__t\))\+'';/g,R=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,N=/\w*$/,_=/^\s*function[ \n\r\t]+\w/,A=/<%=([\s\S]+?)%>/g,P=RegExp("^["+y+"]*0+(?=.$)"),x=/($^)/,k=/\bthis\b/,O=/['\n\r\t\u2028\u2029\\]/g,D="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),I="[object Arguments]",B="[object Array]",Y="[object Boolean]",L="[object Date]",M="[object Function]",F="[object Number]",V="[object Object]",H="[object RegExp]",j="[object String]",z={};
z[M]=!1,z[I]=z[B]=z[Y]=z[L]=z[F]=z[V]=z[H]=z[j]=!0;var U={leading:!1,maxWait:0,trailing:!1},G={configurable:!1,enumerable:!1,value:null,writable:!1},q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},W={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},X=q[typeof window]&&window||this,J=q[typeof exports]&&exports&&!exports.nodeType&&exports,K=q[typeof module]&&module&&!module.nodeType&&module,Q=K&&K.exports===J&&J,Z=q[typeof global]&&global;!Z||Z.global!==Z&&Z.window!==Z||(X=Z);var $=m();"function"==typeof i&&"object"==typeof i.amd&&i.amd?(X._=$,i("../../sherpa/lib/lodash-2.4.1.min",[],function(){return $})):J&&K?Q?(K.exports=$)._=$:J._=$:X._=$}.call(this),function(t){"use strict";var e={aa:{name:"Afar",localizedName:"Afar",direction:"ltr"},ab:{name:"Abkhazian",localizedName:"Abkhazian",direction:"ltr"},ae:{name:"Avestan",localizedName:"Avestan",direction:"rtl"},af:{name:"Afrikaans",localizedName:"Afrikaans",direction:"ltr"},ak:{name:"Akan",localizedName:"Akan",direction:"ltr"},am:{name:"Amharic",localizedName:"Amharic",direction:"ltr"},an:{name:"Aragonese",localizedName:"Aragonese",direction:"ltr"},ar:{name:"Arabic",localizedName:"العربية",direction:"rtl"},ar_MA:{name:"Arabic, Morocco",localizedName:"العربية (المغرب)",direction:"rtl"},ar_SA:{name:"Arabic, Saudi Arabia",localizedName:"العربية (السعودية)",direction:"rtl"},as:{name:"Assamese",localizedName:"Assamese",direction:"ltr"},av:{name:"Avaric",localizedName:"Avaric",direction:"ltr"},ay:{name:"Aymara",localizedName:"Aymara",direction:"ltr"},az:{name:"Azerbaijani",localizedName:"Azerbaijani",direction:"ltr"},ba:{name:"Bashkir",localizedName:"Bashkir",direction:"ltr"},be:{name:"Belarusian",localizedName:"беларускі",direction:"ltr"},bg:{name:"Bulgarian",localizedName:"български",direction:"ltr"},bh:{name:"Bihari",localizedName:"Bihari",direction:"ltr"},bi:{name:"Bislama",localizedName:"Bislama",direction:"ltr"},bm:{name:"Bambara",localizedName:"Bambara",direction:"ltr"},bn:{name:"Bengali",localizedName:"Bengali",direction:"ltr"},bo:{name:"Tibetan",localizedName:"Tibetan",direction:"ltr"},br:{name:"Breton",localizedName:"Breton",direction:"ltr"},bs:{name:"Bosnian",localizedName:"Bosnian",direction:"ltr"},ca:{name:"Catalan",localizedName:"català",direction:"ltr"},ce:{name:"Chechen",localizedName:"Chechen",direction:"ltr"},ch:{name:"Chamorro",localizedName:"Chamorro",direction:"ltr"},co:{name:"Corsican",localizedName:"Corsican",direction:"ltr"},cr:{name:"Cree",localizedName:"Cree",direction:"ltr"},cs:{name:"Czech",localizedName:"čeština",direction:"ltr"},cu:{name:"Church Slavic",localizedName:"Church Slavic",direction:"ltr"},cv:{name:"Chuvash",localizedName:"Chuvash",direction:"ltr"},cy:{name:"Welsh",localizedName:"Welsh",direction:"ltr"},da:{name:"Danish",localizedName:"Dansk",direction:"ltr"},de:{name:"German",localizedName:"Deutsch",direction:"ltr"},dv:{name:"Divehi",localizedName:"Divehi",direction:"ltr"},dz:{name:"Dzongkha",localizedName:"Dzongkha",direction:"ltr"},ee:{name:"Ewe",localizedName:"Ewe",direction:"ltr"},el:{name:"Greek",localizedName:"Ελληνικά",direction:"ltr"},en:{name:"English",localizedName:"English",direction:"ltr"},eo:{name:"Esperanto",localizedName:"Esperanto",direction:"ltr"},es:{name:"Spanish",localizedName:"español",direction:"ltr"},es_CO:{name:"Spanish, Colombia",localizedName:"español (Colombia)",direction:"ltr"},es_CR:{name:"Spanish, Costa Rica",localizedName:"español (Costa Rica)",direction:"ltr"},es_ES:{name:"Spanish, Spain",localizedName:"español (España)",direction:"ltr"},es_MX:{name:"Spanish, Mexico",localizedName:"español (México)",direction:"ltr"},es_PE:{name:"Spanish, Peru",localizedName:"español (Perú)",direction:"ltr"},et:{name:"Estonian",localizedName:"Eesti",direction:"ltr"},eu:{name:"Basque",localizedName:"Basque",direction:"ltr"},fa:{name:"Persian",localizedName:"Persian",direction:"rtl"},ff:{name:"Fulah",localizedName:"Fulah",direction:"ltr"},fi:{name:"Finnish",localizedName:"suomi",direction:"ltr"},fj:{name:"Fijian",localizedName:"Fijian",direction:"ltr"},fo:{name:"Faroese",localizedName:"Faroese",direction:"ltr"},fr:{name:"French",localizedName:"français",direction:"ltr"},fu:{name:"Friulian",localizedName:"fu",direction:"ltr"},fy:{name:"Western Frisian",localizedName:"Frisian",direction:"ltr"},ga:{name:"Irish",localizedName:"Gaeilge",direction:"ltr"},gd:{name:"Scottish Gaelic",localizedName:"Scottish Gaelic",direction:"ltr"},gl:{name:"Galician",localizedName:"Gallegan",direction:"ltr"},gn:{name:"Guarani",localizedName:"Guarani",direction:"ltr"},gu:{name:"Gujarati",localizedName:"Gujarati",direction:"ltr"},gv:{name:"Manx",localizedName:"Manx",direction:"ltr"},ha:{name:"Hausa",localizedName:"Hausa",direction:"ltr"},hi:{name:"Hindi",localizedName:"हिंदी",direction:"ltr"},ho:{name:"Hiri Motu",localizedName:"Hiri Motu",direction:"ltr"},hr:{name:"Croatian",localizedName:"hrvatski",direction:"ltr"},ht:{name:"Haitian",localizedName:"Haitian",direction:"ltr"},hu:{name:"Hungarian",localizedName:"magyar",direction:"ltr"},hy:{name:"Armenian",localizedName:"Armenian",direction:"ltr"},hz:{name:"Herero",localizedName:"Herero",direction:"ltr"},ia:{name:"Interlingua",localizedName:"Interlingua",direction:"ltr"},ie:{name:"Interlingue",localizedName:"Interlingue",direction:"ltr"},ig:{name:"Igbo",localizedName:"Igbo",direction:"ltr"},ii:{name:"Sichuan Yi",localizedName:"Sichuan Yi",direction:"ltr"},ik:{name:"Inupiaq",localizedName:"Inupiaq",direction:"ltr"},"in":{name:"Indonesian",localizedName:"Bahasa Indonesia",direction:"ltr"},io:{name:"Ido",localizedName:"Ido",direction:"ltr"},is:{name:"Icelandic",localizedName:"íslenska",direction:"ltr"},it:{name:"Italian",localizedName:"italiano",direction:"ltr"},iu:{name:"Inuktitut",localizedName:"Inuktitut",direction:"ltr"},iw:{name:"Hebrew",localizedName:"עברית",direction:"rtl"},ja:{name:"Japanese",localizedName:"日本語",direction:"ltr"},ji:{name:"Yiddish",localizedName:"Yiddish",direction:"ltr"},jv:{name:"Javanese",localizedName:"Javanese",direction:"ltr"},ka:{name:"Georgian",localizedName:"Georgian",direction:"ltr"},kg:{name:"Kongo",localizedName:"Kongo",direction:"ltr"},ki:{name:"Kikuyu",localizedName:"Kikuyu",direction:"ltr"},kj:{name:"Kwanyama",localizedName:"Kwanyama",direction:"ltr"},kk:{name:"Kazakh",localizedName:"Kazakh",direction:"ltr"},kl:{name:"Kalaallisut",localizedName:"Greenlandic",direction:"ltr"},km:{name:"Khmer",localizedName:"Khmer",direction:"ltr"},kn:{name:"Kannada",localizedName:"Kannada",direction:"ltr"},ko:{name:"Korean",localizedName:"한국어",direction:"ltr"},kr:{name:"Kanuri",localizedName:"Kanuri",direction:"ltr"},ks:{name:"Kashmiri",localizedName:"Kashmiri",direction:"ltr"},ku:{name:"Kurdish",localizedName:"Kurdish",direction:"ltr"},ku_TR:{name:"Kurdish, Turkey",localizedName:"Kurdish (Turkey)",direction:"ltr"},kv:{name:"Komi",localizedName:"Komi",direction:"ltr"},kw:{name:"Cornish",localizedName:"Cornish",direction:"ltr"},ky:{name:"Kirghiz",localizedName:"Kirghiz",direction:"ltr"},la:{name:"Latin",localizedName:"Latin",direction:"ltr"},lb:{name:"Luxembourgish",localizedName:"Luxembourgish",direction:"ltr"},lg:{name:"Ganda",localizedName:"Ganda",direction:"ltr"},li:{name:"Limburgish",localizedName:"Limburgish",direction:"ltr"},ln:{name:"Lingala",localizedName:"Lingala",direction:"ltr"},lo:{name:"Lao",localizedName:"Lao",direction:"ltr"},lt:{name:"Lithuanian",localizedName:"Lietuvių",direction:"ltr"},lu:{name:"Luba-Katanga",localizedName:"Luba-Katanga",direction:"ltr"},lv:{name:"Latvian",localizedName:"Latviešu",direction:"ltr"},mg:{name:"Malagasy",localizedName:"Malagasy",direction:"ltr"},mh:{name:"Marshallese",localizedName:"Marshallese",direction:"ltr"},mi:{name:"Maori",localizedName:"Maori",direction:"ltr"},mk:{name:"Macedonian",localizedName:"македонски",direction:"ltr"},ml:{name:"Malayalam",localizedName:"Malayalam",direction:"ltr"},mn:{name:"Mongolian",localizedName:"Mongolian",direction:"ltr"},mo:{name:"Moldavian",localizedName:"Moldavian",direction:"ltr"},mr:{name:"Marathi",localizedName:"Marathi",direction:"ltr"},ms:{name:"Malay",localizedName:"Bahasa Melayu",direction:"ltr"},mt:{name:"Maltese",localizedName:"Malti",direction:"ltr"},my:{name:"Burmese",localizedName:"Burmese",direction:"ltr"},na:{name:"Nauru",localizedName:"Nauru",direction:"ltr"},nb:{name:"Norwegian Bokmal",localizedName:"Norwegian Bokmål",direction:"ltr"},nd:{name:"North Ndebele",localizedName:"North Ndebele",direction:"ltr"},ne:{name:"Nepali",localizedName:"Nepali",direction:"ltr"},ng:{name:"Ndonga",localizedName:"Ndonga",direction:"ltr"},nl:{name:"Dutch",localizedName:"Nederlands",direction:"ltr"},nn:{name:"Norwegian Nynorsk",localizedName:"Norwegian Nynorsk",direction:"ltr"},nr:{name:"South Ndebele",localizedName:"South Ndebele",direction:"ltr"},nv:{name:"Navajo",localizedName:"Navajo",direction:"ltr"},ny:{name:"Chichewa",localizedName:"Nyanja",direction:"ltr"},oc:{name:"Occitan",localizedName:"Occitan",direction:"ltr"},oj:{name:"Ojibwa",localizedName:"Ojibwa",direction:"ltr"},om:{name:"Oromo",localizedName:"Oromo",direction:"ltr"},or:{name:"Oriya",localizedName:"Oriya",direction:"ltr"},os:{name:"Ossetian",localizedName:"Ossetian",direction:"ltr"},pa:{name:"Panjabi",localizedName:"Panjabi",direction:"ltr"},pi:{name:"Pali",localizedName:"Pali",direction:"ltr"},pl:{name:"Polish",localizedName:"polski",direction:"ltr"},ps:{name:"Pashto",localizedName:"Pushto",direction:"ltr"},pt:{name:"Portuguese",localizedName:"português",direction:"ltr"},pt_BR:{name:"Portuguese, Brazil",localizedName:"português (Brasil)",direction:"ltr"},qu:{name:"Quechua",localizedName:"Quechua",direction:"ltr"},rm:{name:"Raeto-Romance",localizedName:"Raeto-Romance",direction:"ltr"},rn:{name:"Kirundi",localizedName:"Rundi",direction:"ltr"},ro:{name:"Romanian",localizedName:"română",direction:"ltr"},ru:{name:"Russian",localizedName:"русский",direction:"ltr"},rw:{name:"Kinyarwanda",localizedName:"Kinyarwanda",direction:"ltr"},ry:{name:"Rusyn",localizedName:"ry",direction:"ltr"},sa:{name:"Sanskrit",localizedName:"Sanskrit",direction:"ltr"},sc:{name:"Sardinian",localizedName:"Sardinian",direction:"ltr"},sd:{name:"Sindhi",localizedName:"Sindhi",direction:"ltr"},se:{name:"Northern Sami",localizedName:"Northern Sami",direction:"ltr"},sg:{name:"Sango",localizedName:"Sango",direction:"ltr"},sh:{name:"Serbo-Croatian",localizedName:"sh",direction:"ltr"},si:{name:"Sinhalese",localizedName:"Sinhalese",direction:"ltr"},sk:{name:"Slovak",localizedName:"Slovenčina",direction:"ltr"},sl:{name:"Slovenian",localizedName:"Slovenščina",direction:"ltr"},sm:{name:"Samoan",localizedName:"Samoan",direction:"ltr"},sn:{name:"Shona",localizedName:"Shona",direction:"ltr"},so:{name:"Somali",localizedName:"Somali",direction:"ltr"},sq:{name:"Albanian",localizedName:"shqipe",direction:"ltr"},sr:{name:"Serbian",localizedName:"Српски",direction:"ltr"},ss:{name:"Swati",localizedName:"Swati",direction:"ltr"},st:{name:"Sotho",localizedName:"Southern Sotho",direction:"ltr"},su:{name:"Sundanese",localizedName:"Sundanese",direction:"ltr"},sv:{name:"Swedish",localizedName:"svenska",direction:"ltr"},sw:{name:"Swahili",localizedName:"Swahili",direction:"ltr"},ta:{name:"Tamil",localizedName:"Tamil",direction:"ltr"},te:{name:"Telugu",localizedName:"Telugu",direction:"ltr"},tg:{name:"Tajik",localizedName:"Tajik",direction:"ltr"},th:{name:"Thai",localizedName:"ไทย",direction:"ltr"},ti:{name:"Tigrinya",localizedName:"Tigrinya",direction:"ltr"},tk:{name:"Turkmen",localizedName:"Turkmen",direction:"ltr"},tl:{name:"Tagalog",localizedName:"Tagalog",direction:"ltr"},tn:{name:"Tswana",localizedName:"Tswana",direction:"ltr"},to:{name:"Tonga",localizedName:"Tonga",direction:"ltr"},tr:{name:"Turkish",localizedName:"Türkçe",direction:"ltr"},ts:{name:"Tsonga",localizedName:"Tsonga",direction:"ltr"},tt:{name:"Tatar",localizedName:"Tatar",direction:"ltr"},tw:{name:"Twi",localizedName:"Twi",direction:"ltr"},ty:{name:"Tahitian",localizedName:"Tahitian",direction:"ltr"},ug:{name:"Uighur",localizedName:"Uighur",direction:"ltr"},uk:{name:"Ukrainian",localizedName:"українська",direction:"ltr"},ur:{name:"Urdu",localizedName:"Urdu",direction:"rtl"},uz:{name:"Uzbek",localizedName:"Uzbek",direction:"ltr"},ve:{name:"Venda",localizedName:"Venda",direction:"ltr"},vi:{name:"Vietnamese",localizedName:"Tiếng Việt",direction:"ltr"},vo:{name:"Volapuk",localizedName:"Volapük",direction:"ltr"},wa:{name:"Walloon",localizedName:"Walloon",direction:"ltr"},wo:{name:"Wolof",localizedName:"Wolof",direction:"ltr"},xh:{name:"Xhosa",localizedName:"Xhosa",direction:"ltr"},yo:{name:"Yoruba",localizedName:"Yoruba",direction:"ltr"},za:{name:"Zhuang",localizedName:"Zhuang",direction:"ltr"},zh_CN:{name:"Simplified Chinese",localizedName:"中文 (中国)",direction:"ltr"},zh_HK:{name:"Hong Kong Chinese",localizedName:"中文 (香港)",direction:"ltr"},zh_TW:{name:"Traditional Chinese",localizedName:"中文 (台灣)",direction:"ltr"},zu:{name:"Zulu",localizedName:"Zulu",direction:"ltr"}};t.define&&t.define(function(){return e}),"undefined"!=typeof module&&(module.exports=e)}(this),i("../../chipper/js/data/localeInfo",function(){}),i("text",["module"],function(t){"use strict";var i,n,r,s,a,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],h=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,u="undefined"!=typeof location&&location.href,c=u&&location.protocol&&location.protocol.replace(/\:/,""),d=u&&location.hostname,m=u&&(location.port||void 0),f={},p=t.config&&t.config()||{};return i={version:"2.0.12",strip:function(t){if(t){t=t.replace(h,"");var e=t.match(l);e&&(t=e[1])}else t="";return t},jsEscape:function(t){return t.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var t,e,i;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(e=0;3>e;e+=1){i=o[e];try{t=new ActiveXObject(i)}catch(n){}if(t){o=[i];break}}return t},parseName:function(t){var e,i,n,r=!1,s=t.indexOf("."),a=0===t.indexOf("./")||0===t.indexOf("../");return-1!==s&&(!a||s>1)?(e=t.substring(0,s),i=t.substring(s+1,t.length)):e=t,n=i||e,s=n.indexOf("!"),-1!==s&&(r="strip"===n.substring(s+1),n=n.substring(0,s),i?i=n:e=n),{moduleName:e,ext:i,strip:r}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(t,e,n,r){var s,a,o,h=i.xdRegExp.exec(t);return h?(s=h[2],a=h[3],a=a.split(":"),o=a[1],a=a[0],!(s&&s!==e||a&&a.toLowerCase()!==n.toLowerCase()||(o||a)&&o!==r)):!0},finishLoad:function(t,e,n,r){n=e?i.strip(n):n,p.isBuild&&(f[t]=n),r(n)},load:function(t,e,n,r){if(r&&r.isBuild&&!r.inlineText)return void n();p.isBuild=r&&r.isBuild;var s=i.parseName(t),a=s.moduleName+(s.ext?"."+s.ext:""),o=e.toUrl(a),h=p.useXhr||i.useXhr;return 0===o.indexOf("empty:")?void n():void(!u||h(o,c,d,m)?i.get(o,function(e){i.finishLoad(t,s.strip,e,n)},function(t){n.error&&n.error(t)}):e([a],function(t){i.finishLoad(s.moduleName+"."+s.ext,s.strip,t,n)}))},write:function(t,e,n,r){if(f.hasOwnProperty(e)){var s=i.jsEscape(f[e]);n.asModule(t+"!"+e,"define(function () { return '"+s+"';});\n")}},writeFile:function(t,e,n,r,s){var a=i.parseName(e),o=a.ext?"."+a.ext:"",h=a.moduleName+o,l=n.toUrl(a.moduleName+o)+".js";i.load(h,n,function(e){var n=function(t){return r(l,t)};n.asModule=function(t,e){return r.asModule(t,l,e)},i.write(t,h,n,s)},s)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=e.nodeRequire("fs"),i.get=function(t,e,i){try{var r=n.readFileSync(t,"utf8");0===r.indexOf("\ufeff")&&(r=r.substring(1)),e(r)}catch(s){i&&i(s)}}):"xhr"===p.env||!p.env&&i.createXhr()?i.get=function(t,e,n,r){var s,a=i.createXhr();if(a.open("GET",t,!0),r)for(s in r)r.hasOwnProperty(s)&&a.setRequestHeader(s.toLowerCase(),r[s]);p.onXhr&&p.onXhr(a,t),a.onreadystatechange=function(i){var r,s;4===a.readyState&&(r=a.status||0,r>399&&600>r?(s=new Error(t+" HTTP status: "+r),s.xhr=a,n&&n(s)):e(a.responseText),p.onXhrComplete&&p.onXhrComplete(a,t))},a.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?i.get=function(t,e){var i,n,r="utf-8",s=new java.io.File(t),a=java.lang.System.getProperty("line.separator"),o=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),r)),h="";try{for(i=new java.lang.StringBuffer,n=o.readLine(),n&&n.length()&&65279===n.charAt(0)&&(n=n.substring(1)),null!==n&&i.append(n);null!==(n=o.readLine());)i.append(a),i.append(n);h=String(i.toString())}finally{o.close()}e(h)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(r=Components.classes,s=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),a="@mozilla.org/windows-registry-key;1"in r,i.get=function(t,e){var i,n,o,h={};a&&(t=t.replace(/\//g,"\\")),o=new FileUtils.File(t);try{i=r["@mozilla.org/network/file-input-stream;1"].createInstance(s.nsIFileInputStream),i.init(o,1,0,!1),n=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(s.nsIConverterInputStream),n.init(i,"utf-8",i.available(),s.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),n.readString(i.available(),h),n.close(),i.close(),e(h.value)}catch(l){throw new Error((o&&o.path||"")+": "+l)}}),i}),function(){"use strict";var t={FALLBACK_LOCALE:"en",MEDIA_TYPES:["audio","images"],START_THIRD_PARTY_LICENSE_ENTRIES:"### START THIRD PARTY LICENSE ENTRIES ###",END_THIRD_PARTY_LICENSE_ENTRIES:"### END THIRD PARTY LICENSE ENTRIES ###",BUILD_DIR:"build"};"undefined"!=typeof i&&i("../../chipper/js/common/ChipperConstants",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),function(){"use strict";var t={addDirectionalFormatting:function(t,e){return t.length>0?(e?"‫":"‪")+t+"‬":t},toCamelCase:function(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})},padString:function(t,e){for(;t.length<e;)t+=" ";return t},replaceAll:function(t,e,i){return t.replace(new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),i)},replaceFirst:function(t,e,i){var n=t.indexOf(e);return-1!==t.indexOf(e)?t.slice(0,n)+i+t.slice(n+e.length):t},endsWith:function(t,e){return-1!==t.indexOf(e,t.length-e.length)}};"undefined"!=typeof i&&i("../../chipper/js/common/ChipperStringUtils",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),i("string",{load:function(t){throw new Error("Dynamic load not allowed: "+t)}}),i("string!JOIST/HomeButton.name",function(){return window.phet.chipper.strings.get("JOIST/HomeButton.name")}),i("JOIST/HomeButton",["require","SUN/FontAwesomeNode","PHET_CORE/inherit","JOIST/JoistButton","SCENERY/nodes/Node","SCENERY/accessibility/AccessiblePeer","AXON/Property","SCENERY/nodes/Rectangle","JOIST/joist","string!JOIST/HomeButton.name"],function(t){"use strict";function e(t,e,n){n=_.extend({highlightExtensionWidth:4,listener:null,textDescription:"Home Screen: Button",tandem:null,accessibleContent:{createPeer:function(t){var e=document.createElement("input");return e.value=u,e.type="button",e.tabIndex="0",e.addEventListener("click",function(){n.listener()}),new a(t,e)}}},n);var l=new i("home");l.setScaleMagnitude(.66*t/l.height);var c=new h(0,0,l.width+12,t);l.center=c.center;var d=new s({children:[c,l]});r.call(this,d,e,n),o.multilink([this.interactionStateProperty,e],function(t,e){"black"===e?l.fill="pressed"===t?"gray":"white":l.fill="pressed"===t?"#444":"#222"})}var i=t("SUN/FontAwesomeNode"),n=t("PHET_CORE/inherit"),r=t("JOIST/JoistButton"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/accessibility/AccessiblePeer"),o=t("AXON/Property"),h=t("SCENERY/nodes/Rectangle"),l=t("JOIST/joist"),u=t("string!JOIST/HomeButton.name");return l.register("HomeButton",e),n(r,e)}),i("SCENERY/util/Font",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(t){return"number"==typeof t?t+"px":t}function i(t){this._style="normal",this._variant="normal",this._weight="normal",this._stretch="normal",this._size="10px",this._lineHeight="normal",this._family="sans-serif";var i=typeof t;if("string"===i)for(var n=_.filter(t.split(/[\x09\x0A\x0C\x0D\x20]/),function(t){return t.length>0}),r=0;r<n.length;r++){var l=n[r];if("normal"===l);else if(_.contains(s,l))this._style=l;else if(_.contains(a,l))this._variant=l;else if(_.contains(o,l))this._weight=l;else{if(!_.contains(h,l)){var u=l.split(/\//);this._size=u[0],u[1]&&(this._lineHeight=u[1]),this._family=n.slice(r+1).join(" ");break}this._stretch=l}}else"object"===i&&(void 0!==t.style&&(this._style=t.style),void 0!==t.variant&&(this._variant=t.variant),void 0!==t.weight&&(this._weight=""+t.weight),void 0!==t.stretch&&(this._stretch=t.stretch),void 0!==t.size&&(this._size=e(t.size)),void 0!==t.lineHeight&&(this._lineHeight=t.lineHeight),void 0!==t.family&&(this._family=t.family));this._font=this.computeShorthand()}var n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=["normal","italic","oblique"],a=["normal","small-caps"],o=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],h=["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"];return r.register("Font",i),n(Object,i,{getFont:function(){return this._font},getStyle:function(){return this._style},getVariant:function(){return this._variant},getWeight:function(){return this._weight},getStretch:function(){return this._stretch},getSize:function(){return this._size},getLineHeight:function(){return this._lineHeight},getFamily:function(){return this._family},get font(){return this.getFont()},get style(){return this.getStyle()},get variant(){return this.getVariant()},get weight(){return this.getWeight()},get stretch(){return this.getStretch()},get size(){return this.getSize()},get lineHeight(){return this.getLineHeight()},get family(){return this.getFamily()},copy:function(t){return new i(_.extend({style:this._style,variant:this._variant,weight:this._weight,stretch:this._stretch,size:this._size,lineHeight:this._lineHeight,family:this._family},t))},computeShorthand:function(){var t="";return"normal"!==this._style&&(t+=this._style+" "),"normal"!==this._variant&&(t+=this._variant+" "),"normal"!==this._weight&&(t+=this._weight+" "),"normal"!==this._stretch&&(t+=this._stretch+" "),t+=this._size,"normal"!==this._lineHeight&&(t+="/"+this._lineHeight),t+=" "+this._family},toCSS:function(){return this.getFont()}}),i.DEFAULT=new i,i}),i("SCENERY_PHET/sceneryPhet",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("sceneryPhet")}),i("SCENERY_PHET/PhetFont",["require","SCENERY/util/Font","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){("number"==typeof t||"string"==typeof t)&&(t={size:t}),t=_.extend({family:"Arial"},t),t.family=t.family+", sans-serif",i.call(this,t)}var i=t("SCENERY/util/Font"),n=t("PHET_CORE/inherit"),r=t("SCENERY_PHET/sceneryPhet");return r.register("PhetFont",e),n(i,e)}),i("PHET_CORE/escapeHTML",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#x27;").replace(/\//g,"&#x2F;")}var i=t("PHET_CORE/phetCore");return i.register("escapeHTML",e),e}),i("SCENERY/display/WebGLSelfDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/SelfDrawable"],function(t){"use strict";function e(t,e){throw this.initializeWebGLSelfDrawable(t,e),new Error("Should use initialization and pooling")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/SelfDrawable");return n.register("WebGLSelfDrawable",e),i(r,e,{initializeWebGLSelfDrawable:function(t,e){return this.initializeSelfDrawable(t,e),this.transformListener=this.transformListener||this.markTransformDirty.bind(this),e.relativeTransform.addListener(this.transformListener),e.relativeTransform.addPrecompute(),this},markTransformDirty:function(){this.markDirty()},updateSelfVisibility:function(){r.prototype.updateSelfVisibility.call(this),this.markDirty()},dispose:function(){this.instance.relativeTransform.removeListener(this.transformListener),this.instance.relativeTransform.removePrecompute(),r.prototype.dispose.call(this)}}),e}),i("SCENERY/nodes/Text",["require","PHET_CORE/inherit","PHET_CORE/escapeHTML","PHET_CORE/platform","DOT/Bounds2","DOT/Matrix3","SCENERY/scenery","SCENERY/nodes/Node","SCENERY/display/Renderer","SCENERY/nodes/Paintable","SCENERY/util/Font","SCENERY/util/Util","SCENERY/util/CanvasContextWrapper","SCENERY/display/DOMSelfDrawable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable","SCENERY/display/WebGLSelfDrawable"],function(t){"use strict";function e(t,e){this._text="",this._font=u.Font.DEFAULT,this._direction="ltr",this._boundsMethod="hybrid",this._isHTML=void 0===this._isHTML?!1:this._isHTML,e=e||{},void 0===e.fill&&(e.fill="#000000"),void 0!==t&&(e.text=t),this.initializePaintable(),c.call(this,e),this.updateTextFlags()}function i(t,i,n){var r="get"+i,s="set"+i;e.prototype[r]=function(){return this._font[n]},e.prototype[s]=function(t){var e={};e[n]=t;var i=this._font.copy(e);return this.setFont(i),this},Object.defineProperty(e.prototype,t,{set:e.prototype[s],get:e.prototype[r]})}function n(){var t=document.createElementNS(u.svgns,"text");return t.appendChild(document.createTextNode("")),t.setAttribute("dominant-baseline","alphabetic"),t.setAttribute("text-rendering","geometricPrecision"),t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t}function r(t,e){t.setAttribute("direction",e._direction),t.setAttribute("font-family",e._font.getFamily()),t.setAttribute("font-size",e._font.getSize()),t.setAttribute("font-style",e._font.getStyle()),t.setAttribute("font-weight",e._font.getWeight()),t.setAttribute("font-stretch",e._font.getStretch()),t.lastChild.nodeValue=e.getNonBreakingText()}var s=t("PHET_CORE/inherit"),a=t("PHET_CORE/escapeHTML"),o=t("PHET_CORE/platform"),h=t("DOT/Bounds2"),l=t("DOT/Matrix3"),u=t("SCENERY/scenery"),c=t("SCENERY/nodes/Node"),d=t("SCENERY/display/Renderer"),m=t("SCENERY/nodes/Paintable");t("SCENERY/util/Font"),t("SCENERY/util/Util"),t("SCENERY/util/CanvasContextWrapper");var f,p=t("SCENERY/display/DOMSelfDrawable"),g=t("SCENERY/display/SVGSelfDrawable"),b=t("SCENERY/display/CanvasSelfDrawable"),v=t("SCENERY/display/SelfDrawable"),E=t("SCENERY/display/WebGLSelfDrawable"),S=!0,y=!0,C=l.dirtyFromPool(),w="sceneryTextSizeContainer",T="sceneryTextSizeElement",R=document.getElementById(w),N=document.getElementById(T),_=-1!==window.navigator.userAgent.indexOf("like Gecko) Version/5")&&-1!==window.navigator.userAgent.indexOf("Safari/"),A=!1,P=!o.ie&&!o.edge,x={};u.register("Text",e),s(c,e,{domUpdateTransformOnRepaint:!0,setText:function(t){if(t=""+t,t!==this._text){var e=this._text;this._text=t;for(var i=this._drawables.length,n=0;i>n;n++)this._drawables[n].markDirtyText();this.invalidateText(),this.trigger2("text",e,t)}return this},getText:function(){return this._text},getNonBreakingText:function(){return this._text.replace(" "," ")},setBoundsMethod:function(t){if(t!==this._boundsMethod){this._boundsMethod=t,this.updateTextFlags();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyBounds();this.invalidateText(),this.trigger0("boundsMethod"),this.trigger0("selfBoundsValid")}return this},getBoundsMethod:function(){return this._boundsMethod},getTextRendererBitmask:function(){var t=0;return"fast"===this._boundsMethod||this._isHTML||(t|=d.bitmaskCanvas),this._isHTML||(t|=d.bitmaskSVG),t|=d.bitmaskDOM},invalidateSupportedRenderers:function(){this.setRendererBitmask(this.getFillRendererBitmask()&this.getStrokeRendererBitmask()&this.getTextRendererBitmask())},updateTextFlags:function(){this.invalidateSupportedRenderers()},invalidateText:function(){this.invalidateSelf();for(var t=this._drawables.length,e=0;t>e;e++)this._drawables[e].markDirtyBounds();this.updateTextFlags()},updateSelfBounds:function(){var t;t=this._isHTML||_&&"accurate"!==this._boundsMethod?this.approximateDOMBounds():"hybrid"===this._boundsMethod?this.approximateHybridBounds():"fast"===this._boundsMethod||"fastCanvas"===this._boundsMethod?this.approximateSVGBounds():this.accurateCanvasBounds(),this.hasStroke()&&t.dilate(this.getLineWidth()/2);var e=!t.equals(this._selfBounds);return e&&this._selfBounds.set(t),e},invalidateStroke:function(){this.invalidateText()},invalidateFill:function(){this.invalidateText()},canvasPaintSelf:function(t){e.TextCanvasDrawable.prototype.paintCanvas(t,this)},createDOMDrawable:function(t,i){return e.TextDOMDrawable.createFromPool(t,i)},createSVGDrawable:function(t,i){return e.TextSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.TextCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.TextWebGLDrawable.createFromPool(t,i)},getDOMTextNode:function(){if(this._isHTML){var t=document.createElement("span");return t.innerHTML=this._text,t}return document.createTextNode(this.getNonBreakingText())},getVerticalBounds:function(){if(!f)return h.NOTHING;var t=this._font.toCSS(),e=x[t];return e||(f.setFont(this._font),e=x[t]=f.getBounds().copy()),e},accurateCanvasBounds:function(){var t=this,e=this.approximateSVGBounds();return this._text&&0!==e.width?u.Util.canvasAccurateBounds(function(e){if(e.font=t.font,e.direction=t.direction,e.fillText(t.text,0,0),t.hasStroke()){var i=new u.CanvasContextWrapper(null,e);t.beforeCanvasStroke(i),e.strokeText(t.text,0,0),t.afterCanvasStroke(i)}},{precision:.5,resolution:128,initialScale:32/Math.max(Math.abs(e.minX),Math.abs(e.minY),Math.abs(e.maxX),Math.abs(e.maxY))}):e},approximateCanvasWidth:function(){var t=u.scratchContext;return t.font=this.font,t.direction=this.direction,t.measureText(this.text).width},approximateSVGBounds:function(){if(!R.parentNode){if(!document.body){if(A)return h.NOTHING;throw new Error("No document.body and trying to get approximate SVG bounds of a Text node")}document.body.appendChild(R)}r(N,this);var t=N.getBBox();return new h(t.x,t.y,t.x+t.width,t.y+t.height)},approximateHybridBounds:function(){var t=this.getVerticalBounds(),e=this.approximateCanvasWidth();return new h(0,t.minY,e,t.maxY)},approximateDOMBounds:function(){var t=1024,e="rtl"===this.direction,i=document.createElement("div");$(i).css({position:"absolute",left:0,top:0,padding:"0 !important",margin:"0 !important",display:"hidden"});var n=document.createElement("span");$(n).css("font",this.getFont()),n.appendChild(this.getDOMTextNode()),n.setAttribute("direction",this._direction);var r=document.createElement("div");$(r).css({"vertical-align":"baseline",display:"inline-block",width:0,height:t+"px",margin:"0 !important",padding:"0 !important"}),i.appendChild(n),i.appendChild(r),document.body.appendChild(i);var s=n.getBoundingClientRect(),a=i.getBoundingClientRect(),o=new h(s.left,s.top-t,s.right+1,s.bottom-t).shifted(-a.left,-a.top);document.body.removeChild(i);var l=s.right-s.left;return o.shiftedX(e?-l:0)},approximateImprovedDOMBounds:function(){var t=document.createElement("div");t.style.display="inline-block",t.style.font=this.getFont(),t.style.color="transparent",t.style.padding="0 !important",t.style.margin="0 !important",t.style.position="absolute",t.style.left="0",t.style.top="0",t.setAttribute("direction",this._direction),t.appendChild(this.getDOMTextNode()),document.body.appendChild(t);var e=new h(t.offsetLeft,t.offsetTop,t.offsetLeft+t.offsetWidth+1,t.offsetTop+t.offsetHeight+1);document.body.removeChild(t);var i=this.getVerticalBounds();return e.shiftedY(i.minY)},getSafeSelfBounds:function(){var t=1,e=this.getSelfBounds();return e.dilatedXY(t*e.width,t*e.height)},setFont:function(t){if(this.font!==t){this._font=t instanceof u.Font?t:new u.Font(t);
for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyFont();this.invalidateText()}return this},getFont:function(){return this._font.getFont()},setDirection:function(t){this._direction=t;for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyDirection();return this.invalidateText(),this},getDirection:function(){return this._direction},isPainted:function(){return!0},areSelfBoundsValid:function(){return"accurate"===this._boundsMethod},getDebugHTMLExtras:function(){return' "'+a(this.getNonBreakingText())+'"'+(this._isHTML?" (html)":"")},getBasicConstructor:function(t){return"new scenery.Text( '"+a(this._text.replace(/'/g,"\\'"))+"', {"+t+"} )"},getPropString:function(t,e){function i(e,i,r){n&&(n+=",\n"),n+=r||"string"!=typeof i?t+e+": "+i:t+e+": '"+i+"'"}var n=c.prototype.getPropString.call(this,t,e);return n=this.appendFillablePropString(t,n),n=this.appendStrokablePropString(t,n),this.font!==(new u.Font).getFont()&&i("font",this.font.replace(/'/g,"\\'")),"ltr"!==this._direction&&i("direction",this._direction),n}}),i("fontWeight","FontWeight","weight"),i("fontFamily","FontFamily","family"),i("fontStretch","FontStretch","stretch"),i("fontStyle","FontStyle","style"),i("fontSize","FontSize","size"),i("lineHeight","LineHeight","lineHeight"),e.prototype._mutatorKeys=["boundsMethod","text","font","fontWeight","fontFamily","fontStretch","fontStyle","fontSize","lineHeight","direction"].concat(c.prototype._mutatorKeys),Object.defineProperty(e.prototype,"font",{set:e.prototype.setFont,get:e.prototype.getFont}),Object.defineProperty(e.prototype,"text",{set:e.prototype.setText,get:e.prototype.getText}),Object.defineProperty(e.prototype,"direction",{set:e.prototype.setDirection,get:e.prototype.getDirection}),Object.defineProperty(e.prototype,"boundsMethod",{set:e.prototype.setBoundsMethod,get:e.prototype.getBoundsMethod}),m.mixin(e),e.TextStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyText=!0,this.dirtyFont=!0,this.dirtyBounds=!0,this.dirtyDirection=!0,this.initializePaintableState(t,e),this},e.disposeState=function(){this.disposePaintableState()},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyText=function(){this.dirtyText=!0,this.markPaintDirty()},e.markDirtyFont=function(){this.dirtyFont=!0,this.markPaintDirty()},e.markDirtyBounds=function(){this.dirtyBounds=!0,this.markPaintDirty()},e.markDirtyDirection=function(){this.dirtyDirection=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyText=!1,this.dirtyFont=!1,this.dirtyBounds=!1,this.dirtyDirection=!1},m.PaintableStatefulDrawable.mixin(t)}};var k=e.TextDOMDrawable=s(p,function(t,e){this.initialize(t,e)},{initialize:function(t,e){return this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),this.domElement||(this.domElement=document.createElement("div"),this.domElement.style.display="block",this.domElement.style.position="absolute",this.domElement.style.pointerEvents="none",this.domElement.style.left="0",this.domElement.style.top="0"),u.Util.prepareForTransform(this.domElement,this.forceAcceleration),this},updateDOM:function(){var t=this.node,e=this.domElement;if(this.paintDirty&&(this.dirtyFont&&(e.style.font=t.getFont()),this.dirtyStroke&&(e.style.color=t.getCSSFill()),this.dirtyBounds&&(e.style.width=t.getSelfBounds().width+"px",e.style.height=t.getSelfBounds().height+"px"),this.dirtyText&&(e.innerHTML=t.getNonBreakingText()),this.dirtyDirection&&e.setAttribute("dir",t._direction)),this.transformDirty||this.dirtyText||this.dirtyFont||this.dirtyBounds){var i=t.getSelfBounds().minY;C.set(this.getTransformMatrix());var n=l.translation(0,i);C.multiplyMatrix(n),n.freeToPool(),u.Util.applyPreparedTransform(C,e,this.forceAcceleration)}this.setToClean()},setToClean:function(){this.setToCleanState(),this.cleanPaintableState(),this.transformDirty=!1},dispose:function(){this.disposeState(),S||(this.domElement=null),p.prototype.dispose.call(this)}});return e.TextStatefulDrawable.mixin(k),v.Poolable.mixin(k),e.TextSVGDrawable=function(t,e){this.initialize(t,e)},s(g,e.TextSVGDrawable,{initialize:function(t,e){if(this.initializeSVGSelfDrawable(t,e,!0,y),!this.svgElement){var i=this.svgElement=document.createElementNS(u.svgns,"text");i.appendChild(document.createTextNode("")),i.setAttribute("dominant-baseline","alphabetic"),i.setAttribute("text-rendering","geometricPrecision"),P&&i.setAttribute("lengthAdjust","spacingAndGlyphs"),i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}return this},updateSVGSelf:function(){var t=this.svgElement;this.dirtyDirection&&t.setAttribute("direction",this.node._direction),this.dirtyFont&&(t.setAttribute("font-family",this.node._font.getFamily()),t.setAttribute("font-size",this.node._font.getSize()),t.setAttribute("font-style",this.node._font.getStyle()),t.setAttribute("font-weight",this.node._font.getWeight()),t.setAttribute("font-stretch",this.node._font.getStretch())),this.dirtyText&&(t.lastChild.nodeValue=this.node.getNonBreakingText()),this.dirtyBounds&&P&&isFinite(this.node.selfBounds.width)&&t.setAttribute("textLength",this.node.selfBounds.width),this.updateFillStrokeStyle(t)}}),e.TextStatefulDrawable.mixin(e.TextSVGDrawable),v.Poolable.mixin(e.TextSVGDrawable),e.TextCanvasDrawable=function(t,e){this.initialize(t,e)},s(b,e.TextCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e),this},paintCanvas:function(t,e){var i=t.context;(e.hasFill()||e.hasStroke())&&(t.setFont(e._font.getFont()),t.setDirection(e._direction)),e.hasFill()&&(e.beforeCanvasFill(t),i.fillText(e._text,0,0),e.afterCanvasFill(t)),e.hasStroke()&&(e.beforeCanvasStroke(t),i.strokeText(e._text,0,0),e.afterCanvasStroke(t))},markDirtyText:function(){this.markPaintDirty()},markDirtyFont:function(){this.markPaintDirty()},markDirtyBounds:function(){this.markPaintDirty()},markDirtyDirection:function(){this.markPaintDirty()},dispose:function(){b.prototype.dispose.call(this),this.disposePaintableStateless()}}),m.PaintableStatelessDrawable.mixin(e.TextCanvasDrawable),v.Poolable.mixin(e.TextCanvasDrawable),e.TextWebGLDrawable=s(E,function(t,e){this.initialize(t,e)},{initialize:function(t,e){this.initializeWebGLSelfDrawable(t,e)},onAddToBlock:function(t){var e=this;this.node.toImageNodeAsynchronous(function(i){var n=i.children[0];e.textHandle=t.webGLRenderer.textureRenderer.createFromImageNode(n,.4),t.webGLRenderer.textureRenderer.bindVertexBuffer(),t.webGLRenderer.textureRenderer.bindDirtyTextures(),e.updateText()})},onRemoveFromBlock:function(t){},updateText:function(){this.textHandle&&this.textHandle.update()},render:function(t){},dispose:function(){this.disposeWebGLBuffers(),E.prototype.dispose.call(this)},disposeWebGLBuffers:function(){this.webglBlock.webGLRenderer.colorTriangleRenderer.colorTriangleBufferData.dispose(this.rectangleHandle)},markDirtyText:function(){this.markDirty()},markDirtyBounds:function(){this.markDirty()},markPaintDirty:function(){this.markDirty()},update:function(){this.updateText(),this.dirty=!1}}),m.PaintableStatefulDrawable.mixin(e.TextWebGLDrawable),v.Poolable.mixin(e.TextWebGLDrawable),R||(R=document.createElementNS(u.svgns,"svg"),R.setAttribute("width","2"),R.setAttribute("height","2"),R.setAttribute("id",w),R.setAttribute("style","visibility: hidden; pointer-events: none; position: absolute; left: -65535px; right: -65535px;")),N||(N=n(),N.setAttribute("id",T),R.appendChild(N)),A=!0,f=new e("m",{boundsMethod:"fast"}),A=!1,e}),i("SCENERY/nodes/VBox",["require","PHET_CORE/inherit","SCENERY/nodes/LayoutBox","SCENERY/scenery"],function(t){"use strict";function e(t){n.call(this,_.extend({},t,{orientation:"vertical"}))}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/LayoutBox"),r=t("SCENERY/scenery");return r.register("VBox",e),i(n,e)}),i("JOIST/NavigationBarScreenButton",["require","SUN/buttons/ButtonListener","AXON/DerivedProperty","JOIST/HighlightNode","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/accessibility/AccessiblePeer","SCENERY_PHET/PhetFont","AXON/Property","SUN/buttons/PushButtonModel","SCENERY/nodes/Rectangle","SCENERY/nodes/Text","DOT/Util","SCENERY/nodes/VBox","JOIST/joist"],function(t){"use strict";function e(t,e,s,f,g,b){function v(){e.value=s.indexOf(f)}b=_.extend({cursor:"pointer",focusable:!0,textDescription:f.name+" Screen: Button",tandem:null,maxButtonWidth:null,accessibleContent:{createPeer:function(t){var e=document.createElement("input");return e.value=f.name,e.type="button",e.tabIndex="0",e.addEventListener("click",v),new o(t,e)}}},b),a.call(this);var E=new a({children:[f.navigationBarIcon],maxHeight:.625*g}),S=new n([e],function(t){return t===s.indexOf(f)});this.buttonModel=new u({listener:v}),this.addInputListener(new i(this.buttonModel)),b.tandem&&b.tandem.addInstance(this);var y=new d(f.name,{font:new h(10)}),C=new m({children:[E,y],pickable:!1,spacing:Math.max(0,12-y.height),usesOpacity:!0,maxHeight:g}),w=new c(0,0,C.width,C.height,{center:C.center}),T=w.width+2*p,R=new r(T,w.height,{center:C.center,fill:"white"}),N=new r(T,w.height,{center:C.center,fill:"black"});this.addChild(C),this.addChild(w),this.addChild(R),this.addChild(N),l.multilink([S,this.buttonModel.downProperty,this.buttonModel.overProperty,t],function(t,e,i,n){var r="black"!==n,s=r?"black":"#f2e916",a=r?"gray":"white";y.fill=t?s:a,C.opacity=t?1:e?.65:.5,R.visible=!r&&(i||e),N.visible=r&&(i||e)}),b.maxButtonWidth&&this.width>b.maxButtonWidth&&(y.maxWidth=E.maxWidth=b.maxButtonWidth-(this.width-C.width),w.setRect(0,0,C.width,w.height),w.center=C.center,R.spacing=N.spacing=w.width+2*p,R.center=N.center=C.center),this.mutate(_.omit(b,"tandem"))}var i=t("SUN/buttons/ButtonListener"),n=t("AXON/DerivedProperty"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/accessibility/AccessiblePeer"),h=t("SCENERY_PHET/PhetFont"),l=t("AXON/Property"),u=t("SUN/buttons/PushButtonModel"),c=t("SCENERY/nodes/Rectangle"),d=t("SCENERY/nodes/Text"),m=(t("DOT/Util"),t("SCENERY/nodes/VBox")),f=t("JOIST/joist"),p=4;return f.register("NavigationBarScreenButton",e),s(a,e)}),i("PHETCOMMON/phetcommon",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("phetcommon")}),i("PHETCOMMON/util/StringUtils",["require","PHETCOMMON/phetcommon","PHET_CORE/platform"],function(t){"use strict";var e=t("PHETCOMMON/phetcommon"),i=t("PHET_CORE/platform"),n="‪",r="‫",s="‬",a={format:function(t){var e=arguments,n=t.replace(/{(\d)}/g,function(t,i){return e[+i+1]});return i.edge&&(n=a.simplifyEmbeddingMarks(n)),n},isEmbeddingMark:function(t){return t===n||t===r||t===s},simplifyEmbeddingMarks:function(t){function e(t){for(var e=t.children.length-1;e>=0;e--){var i=t.children[e];t.dir===i.dir&&Array.prototype.splice.apply(t.children,[e,1].concat(i.children))}}function i(t){1===t.children.length&&t.children[0].dir&&(t.dir=t.children[0].dir,t.children=t.children[0].children)}function a(t){for(var e=t.children.length-1;e>=1;e--){var i=t.children[e-1],n=t.children[e];n.dir&&i.dir===n.dir&&(i.children=i.children.concat(n.children),t.children.splice(e,1),a(i))}}function o(t){if("string"!=typeof t){for(var n=0;n<t.children.length;n++)o(t.children[n]);return i(t),e(t),a(t),t}}function h(t){if("string"==typeof t)return t;var e=t.children.map(h).join("");return t.dir?t.dir+e+"‬":e}for(var l={dir:null,children:[],parent:null},u=l,c=0;c<t.length;c++){var d=t.charAt(c);if(d===n||d===r){var m={dir:d,children:[],parent:u};u.children.push(m),u=m}else d===s?u=u.parent:u.children.push(d)}return h(o(l))},embeddedSlice:function(t,e,i){var o,h=[];for(void 0===i&&(i=t.length),0>i&&(i+=t.length);e<t.length&&a.isEmbeddingMark(t.charAt(e));)e++;for(;i>=1&&a.isEmbeddingMark(t.charAt(i-1));)i--;if(e>=i||e>=t.length)return"";for(var l=0;e>l;l++)o=t.charAt(l),o===n||o===r?h.push(o):o===s&&h.pop();for(var u=h.length,c=h.slice(),d=t.slice(e,i),m=0;m<d.length;m++)o=d.charAt(m),o===n||o===r?h.push(o):o===s&&(h.pop(),u=Math.min(h.length,u));var f=h,p=Math.max(0,u-1);c=c.slice(p),f=f.slice(p);var g=c.join(""),b=f.join("").replace(/./g,s);return g+d+b},embeddedSplit:function(t,e,i){function n(){var t,i;if(e instanceof window.RegExp){var n=o.match(e);n?(t=n.index,i=n[0].length):t=-1}else t=o.indexOf(e),i=e.length;return{index:t,length:i}}if(void 0===e)return[t];for(var r,s=[],o=t,h=0;(r=n()).index>=0;){s.push(a.embeddedSlice(t,h,h+r.index));var l=r.index+r.length;o=o.slice(l),h+=l}return s.push(a.embeddedSlice(t,h)),void 0!==i&&(s=_.first(s,i)),s},embeddedDebugString:function(t){return t.replace(/\u202a/g,"[LTR]").replace(/\u202b/g,"[RTL]").replace(/\u202c/g,"[POP]")},toCamelCase:function(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}};return e.register("StringUtils",a),a}),i("SCENERY_PHET/MultiLineText",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","SCENERY/nodes/Text","SCENERY/nodes/VBox","SCENERY_PHET/sceneryPhet","PHETCOMMON/util/StringUtils"],function(t){"use strict";function e(t,e){e=_.extend({font:new r,align:"center"},e),this.options=e,n.call(this),this._text=null,this.textParent=null,this.text=t,this.mutate(_.omit(e,"align"))}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/Text"),a=t("SCENERY/nodes/VBox"),o=t("SCENERY_PHET/sceneryPhet"),h=t("PHETCOMMON/util/StringUtils");return o.register("MultiLineText",e),i(n,e,{setText:function(t){this._text=t;var e=this,i=h.embeddedSplit(t,"\n").map(function(t){return 0===t.length&&(t=" "),new s(t,_.omit(e.options,"align","maxWidth"))}),n=this.textParent?this.indexOfChild(this.textParent):0;this.textParent&&this.removeChild(this.textParent),this.textParent=new a({children:i,align:this.options.align}),this.insertChild(n,this.textParent)},set text(t){this.setText(t)},getText:function(){return this._text},get text(){return this.getText()},setFill:function(t){this.options.fill=t;for(var e=this.textParent.getChildren(),i=0;i<e.length;i++)e[i].setFill(t)},set fill(t){this.setFill(t)},getFill:function(){return this.options.fill},get fill(){return this.getFill()}})}),i("string!JOIST/adaptedFrom",function(){return window.phet.chipper.strings.get("JOIST/adaptedFrom")}),i("JOIST/AdaptedFromText",["require","PHET_CORE/inherit","SCENERY_PHET/MultiLineText","SCENERY_PHET/PhetFont","JOIST/joist","string!JOIST/adaptedFrom"],function(t){"use strict";function e(t,e){e=_.extend({align:"right",font:o,maxWidth:60},e),n.call(this,a,e),t.linkAttribute(this,"fill")}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/MultiLineText"),r=t("SCENERY_PHET/PhetFont"),s=t("JOIST/joist"),a=t("string!JOIST/adaptedFrom"),o=new r({family:"Arial",size:10,weight:"bold"});return s.register("AdaptedFromText",e),i(n,e)}),i("BRAND/../../js/brand",["require","PHET_CORE/Namespace"],function(t){"use strict";var e=t("PHET_CORE/Namespace");return new e("brand")}),i("string!JOIST/termsPrivacyAndLicensing",function(){return window.phet.chipper.strings.get("JOIST/termsPrivacyAndLicensing")}),i("string!JOIST/translation.credits.link",function(){return window.phet.chipper.strings.get("JOIST/translation.credits.link")}),i("string!JOIST/thirdParty.credits.link",function(){return window.phet.chipper.strings.get("JOIST/thirdParty.credits.link")}),i("BRAND/Brand",["require","BRAND/../../js/brand","string!JOIST/termsPrivacyAndLicensing","string!JOIST/translation.credits.link","string!JOIST/thirdParty.credits.link"],function(t){"use strict";var e=t("BRAND/../../js/brand"),i=t("string!JOIST/termsPrivacyAndLicensing"),n=t("string!JOIST/translation.credits.link"),r=t("string!JOIST/thirdParty.credits.link"),s={id:"phet",name:"PhET<sup>®</sup> Interactive Simulations",copyright:"Copyright © 2004-2016 University of Colorado Boulder",isPhetApp:!!phet.chipper.getQueryParameter("phet-app"),getLinks:function(t,e){return[{text:i,url:"http://phet.colorado.edu/en/licensing/html"},{text:n,url:"http://phet.colorado.edu/translation-credits?simName="+encodeURIComponent(t)+"&locale="+encodeURIComponent(e)},{text:r,url:"http://phet.colorado.edu/third-party-credits?simName="+encodeURIComponent(t)+"&locale="+encodeURIComponent(e)+"#"+t}]}};return e.register("Brand",s),s}),i("SCENERY/nodes/Image",["require","PHET_CORE/inherit","PHET_CORE/cleanArray","PHET_CORE/platform","DOT/Bounds2","DOT/Vector2","SCENERY/scenery","SCENERY/nodes/Node","SCENERY/display/Renderer","SCENERY/util/Util","SCENERY/display/DOMSelfDrawable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable","SCENERY/display/WebGLSelfDrawable"],function(t){"use strict";function e(t,e){e=e||{},t&&(e.image=t),this._initialWidth=0,this._initialHeight=0,this._mipmap=!1,this._mipmapBias=b,this._mipmapInitialLevel=v,this._mipmapMaxLevel=E,this._mipmapCanvases=[],this._mipmapURLs=[],this._mipmapData=null;var i=this;this.loadListener=function(t){i.invalidateImage(),i._image.removeEventListener("load",i.loadListener)},h.call(this,e),this.invalidateSupportedRenderers()}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/cleanArray"),r=t("PHET_CORE/platform"),s=t("DOT/Bounds2"),a=t("DOT/Vector2"),o=t("SCENERY/scenery"),h=t("SCENERY/nodes/Node"),l=t("SCENERY/display/Renderer");t("SCENERY/util/Util");var u=t("SCENERY/display/DOMSelfDrawable"),c=t("SCENERY/display/SVGSelfDrawable"),d=t("SCENERY/display/CanvasSelfDrawable"),m=t("SCENERY/display/SelfDrawable"),f=t("SCENERY/display/WebGLSelfDrawable"),p=!0,g=!0,b=-.7,v=4,E=5,S=Math.log2||function(t){return Math.log(t)/Math.LN2};return o.register("Image",e),i(h,e,{allowsMultipleDOMInstances:!1,invalidateImage:function(){this._image?this.invalidateSelf(new s(0,0,this.getImageWidth(),this.getImageHeight())):this.invalidateSelf(s.NOTHING);for(var t=this._drawables.length,e=0;t>e;e++)this._drawables[e].markDirtyImage();this.invalidateMipmaps()},getImage:function(){return this._image},get image(){return this.getImage()},invalidateSupportedRenderers:function(){this._image instanceof HTMLCanvasElement?this.setRendererBitmask(l.bitmaskCanvas|l.bitmaskWebGL):this.setRendererBitmask(l.bitmaskCanvas|l.bitmaskSVG|l.bitmaskDOM|l.bitmaskWebGL)},setImage:function(t){if(this._image!==t&&("string"!=typeof t||!this._image||t!==this._image.src&&t!==this._mipmapData)){if(this._image&&this._image.removeEventListener("load",this.loadListener),this._mipmapData=null,"string"==typeof t){var e=t;t=document.createElement("img"),t.addEventListener("load",this.loadListener),t.src=e}else t instanceof HTMLImageElement?t.width&&t.height||t.addEventListener("load",this.loadListener):t instanceof Array&&(this._mipmapData=t,t=t[0].img,this._mipmapInitialLevel=this._mipmapMaxLevel=this._mipmapData.length,this._mipmap=!0);this.invalidateSupportedRenderers(),this._image=t,this.invalidateImage()}return this},set image(t){this.setImage(t)},getInitialWidth:function(){return this._initialWidth},get initialWidth(){return this.getInitialWidth()},setInitialWidth:function(t){this._initialWidth=t,this.invalidateImage()},set initialWidth(t){this.setInitialWidth(t)},getInitialHeight:function(){return this._initialHeight},get initialHeight(){return this.getInitialHeight()},setInitialHeight:function(t){this._initialHeight=t,this.invalidateImage()},set initialHeight(t){this.setInitialHeight(t)},isMipmap:function(){return this._mipmap},get mipmap(){return this.isMipmap()},setMipmap:function(t){this._mipmap!==t&&(this._mipmap=t,this.invalidateMipmaps())},set mipmap(t){this.setMipmap(t)},getMipmapBias:function(){return this._mipmapBias},get mipmapBias(){return this.getMipmapBias()},setMipmapBias:function(t){this._mipmapBias!==t&&(this._mipmapBias=t,this.invalidateMipmaps())},set mipmapBias(t){this.setMipmapBias(t)},getMipmapInitialLevel:function(){return this._mipmapInitialLevel},get mipmapInitialLevel(){return this.getMipmapInitialLevel()},setMipmapInitialLevel:function(t){this._mipmapInitialLevel!==t&&(this._mipmapInitialLevel=t,this.invalidateMipmaps())},set mipmapInitialLevel(t){this.setMipmapInitialLevel(t)},getMipmapMaxLevel:function(){return this._mipmapMaxLevel},get mipmapMaxLevel(){return this.getMipmapMaxLevel()},setMipmapMaxLevel:function(t){this._mipmapMaxLevel!==t&&(this._mipmapMaxLevel=t,this.invalidateMipmaps())},set mipmapMaxLevel(t){this.setMipmapMaxLevel(t)},constructNextMipmap:function(){var t=this._mipmapCanvases.length,e=this._mipmapCanvases[t-1];if(e.width*e.height>2){var i=document.createElement("canvas");if(i.width=Math.ceil(e.width/2),i.height=Math.ceil(e.height/2),i.width>0&&i.height>0){var n=i.getContext("2d");n.scale(.5,.5),n.drawImage(e,0,0),this._mipmapCanvases.push(i),this._mipmapURLs.push(i.toDataURL())}}},invalidateMipmaps:function(){if(n(this._mipmapCanvases),n(this._mipmapURLs),this._image&&this._mipmap)if(this._mipmapData)for(var t=0;t<this._mipmapData.length;t++){var e=this._mipmapData[t].url;this._mipmapURLs.push(e);var i=document.createElement("canvas");i.width=this._mipmapData[t].width,i.height=this._mipmapData[t].height;var r=i.getContext("2d");r.drawImage(this._mipmapData[t].img,0,0),this._mipmapCanvases.push(i)}else{var s=document.createElement("canvas");if(s.width=this.getImageWidth(),s.height=this.getImageHeight(),s.width&&s.height){var a=s.getContext("2d");a.drawImage(this._image,0,0),this._mipmapCanvases.push(s),this._mipmapURLs.push(s.toDataURL());for(var o=0;++o<this._mipmapInitialLevel;)this.constructNextMipmap()}for(var h=this._drawables.length,l=0;h>l;l++)this._drawables[l].markDirtyMipmap()}this.trigger0("mipmap")},getMipmapLevel:function(t){if(t>=1)return 0;var e=S(1/t);if(e=Math.round(e+this._mipmapBias),0>e&&(e=0),e>this._mipmapMaxLevel&&(e=this._mipmapMaxLevel),this.mipmap&&!this._mipmapCanvases[e]){for(var i=this._mipmapCanvases.length-1;++i<=e;)this.constructNextMipmap();return Math.min(e,this._mipmapCanvases.length-1)}return e},getMipmapCanvas:function(t){return this._mipmapCanvases[t]},getMipmapURL:function(t){return this._mipmapURLs[t]},hasMipmaps:function(){return this._mipmapCanvases.length>0},getImageWidth:function(){var t=this._mipmapData?this._mipmapData[0].width:this._image.naturalWidth||this._image.width;return 0===t?this._initialWidth:t},get imageWidth(){return this.getImageWidth()},getImageHeight:function(){var t=this._mipmapData?this._mipmapData[0].height:this._image.naturalHeight||this._image.height;return 0===t?this._initialHeight:t},get imageHeight(){return this.getImageHeight()},getImageURL:function(){return this._image.src},isPainted:function(){return!0},canvasPaintSelf:function(t){e.ImageCanvasDrawable.prototype.paintCanvas(t,this)},createDOMDrawable:function(t,i){return e.ImageDOMDrawable.createFromPool(t,i)},createSVGDrawable:function(t,i){return e.ImageSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.ImageCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.ImageWebGLDrawable.createFromPool(t,i)},getBasicConstructor:function(t){return"new scenery.Image( '"+(this._image.src?this._image.src.replace(/'/g,"\\'"):"other")+"', {"+t+"} )"}}),e.prototype._mutatorKeys=["image","initialWidth","initialHeight","mipmap","mipmapBias","mipmapInitialLevel","mipmapMaxLevel"].concat(h.prototype._mutatorKeys),e.createSVGImage=function(t,e,i){var n=document.createElementNS(o.svgns,"image");return n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("width",e+"px"),n.setAttribute("height",i+"px"),n.setAttributeNS(o.xlinkns,"xlink:href",t),n},e.createFastMipmapFromCanvas=function(t){var e=[],i=t.toDataURL(),n=new window.Image;n.src=i,e.push({img:n,url:i,width:t.width,height:t.height});for(var r=t;r.width>=2&&r.height>=2;){var s={},a=document.createElement("canvas");a.width=s.width=Math.ceil(r.width/2),a.height=s.height=Math.ceil(r.height/2);var o=a.getContext("2d");o.setTransform(.5,0,0,.5,0,0),o.drawImage(r,0,0),s.url=a.toDataURL(),s.img=new window.Image,s.img.src=s.url,r=a,e.push(s)}return e},e.ImageStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyImage=!0,this.dirtyMipmap=!0,this},e.disposeState=function(){},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyImage=function(){this.dirtyImage=!0,this.markPaintDirty()},e.markDirtyMipmap=function(){this.dirtyMipmap=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyImage=!1,this.dirtyMipmap=!1}}},e.ImageDOMDrawable=i(u,function(t,e){this.initialize(t,e)},{initialize:function(t,e){return this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),this.domElement||(this.domElement=document.createElement("img"),this.domElement.style.display="block",this.domElement.style.position="absolute",this.domElement.style.pointerEvents="none",this.domElement.style.left="0",this.domElement.style.top="0"),o.Util.prepareForTransform(this.domElement,this.forceAcceleration),this},updateDOM:function(){var t=this.node,e=this.domElement;this.paintDirty&&this.dirtyImage&&(e.src=t._image?t._image.src:"//:0"),this.transformDirty&&o.Util.applyPreparedTransform(this.getTransformMatrix(),this.domElement,this.forceAcceleration),this.setToClean()},setToClean:function(){this.setToCleanState(),this.transformDirty=!1},dispose:function(){this.disposeState(),p||(this.domElement=null),u.prototype.dispose.call(this)}}),e.ImageStatefulDrawable.mixin(e.ImageDOMDrawable),m.Poolable.mixin(e.ImageDOMDrawable),e.ImageSVGDrawable=function(t,e){this.initialize(t,e)},i(c,e.ImageSVGDrawable,{initialize:function(t,e){this.initializeSVGSelfDrawable(t,e,!1,g);var i=this;return this.svgElement||(this.svgElement=document.createElementNS(o.svgns,"image"),this.svgElement.setAttribute("x",0),this.svgElement.setAttribute("y",0)),this._usingMipmap=!1,this._mipmapLevel=-1,this._mipmapTransformListener=this._mipmapTransformListener||function(){i.markDirtyMipmap()},this._mipmapListener=this._mipmapListener||function(){i.markDirtyMipmap(),i.updateMipmapStatus(i.node._mipmap)},this.node.onStatic("mipmap",this._mipmapListener),this.updateMipmapStatus(e.node._mipmap),this},updateSVGSelf:function(){var t=this.svgElement;this.dirtyImage?this.node._image?this.updateURL(t,!0):(t.setAttribute("width","0"),t.setAttribute("height","0"),t.setAttributeNS(o.xlinkns,"xlink:href","//:0")):this.dirtyMipmap&&this.node._image&&this.updateURL(t,!1)},updateURL:function(t,e){var i=-1;if(this.node._mipmap){var n=this.instance.relativeTransform.matrix,s=(Math.sqrt(n.m00()*n.m00()+n.m10()*n.m10())+Math.sqrt(n.m01()*n.m01()+n.m11()*n.m11()))/2;s*=window.devicePixelRatio||1,i=this.node.getMipmapLevel(s)}if(e||i!==this._mipmapLevel)if(this._mipmapLevel>=0&&-1===i&&(r.ie9||r.ie10?t.setAttribute("transform",""):t.removeAttribute("transform")),this._mipmapLevel=i,this.node._mipmap&&this.node.hasMipmaps()){var a=this.node.getMipmapURL(i),h=this.node.getMipmapCanvas(i);t.setAttribute("width",h.width+"px"),t.setAttribute("height",h.height+"px"),t.setAttribute("transform","scale("+Math.pow(2,i).toFixed(20)+")"),t.setAttributeNS(o.xlinkns,"xlink:href",a)}else t.setAttribute("width",this.node.getImageWidth()+"px"),t.setAttribute("height",this.node.getImageHeight()+"px"),t.setAttributeNS(o.xlinkns,"xlink:href",this.node.getImageURL())},updateMipmapStatus:function(t){this._usingMipmap!==t&&(this._usingMipmap=t,t?(this.instance.relativeTransform.addListener(this._mipmapTransformListener),this.instance.relativeTransform.addPrecompute()):(this.instance.relativeTransform.removeListener(this._mipmapTransformListener),this.instance.relativeTransform.removePrecompute()),this.markDirtyMipmap())},dispose:function(){this.updateMipmapStatus(!1),this.node.offStatic("mipmap",this._mipmapListener),c.prototype.dispose.call(this)}}),e.ImageStatefulDrawable.mixin(e.ImageSVGDrawable),m.Poolable.mixin(e.ImageSVGDrawable),e.ImageCanvasDrawable=function(t,e){this.initialize(t,e)},i(d,e.ImageCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e)},paintCanvas:function(t,e){e._image&&t.context.drawImage(e._image,0,0)},markDirtyImage:function(){this.markPaintDirty()},markDirtyMipmap:function(){this.markPaintDirty()}}),m.Poolable.mixin(e.ImageCanvasDrawable),e.ImageWebGLDrawable=i(f,function(t,e){this.initialize(t,e)},{webglRenderer:l.webglTexturedTriangles,initialize:function(t,e){return this.initializeWebGLSelfDrawable(t,e),this.vertexArray||(this.vertexArray=new Float32Array(24)),this.upperLeft=new a,this.lowerLeft=new a,this.upperRight=new a,this.lowerRight=new a,this.xyDirty=!0,this.uvDirty=!0,this.sprite=null,this},onAddToBlock:function(t){this.webglBlock=t,this.markDirty(),this.reserveSprite()},onRemoveFromBlock:function(t){this.unreserveSprite()},reserveSprite:function(){if(this.sprite){if(this.sprite.image===this.node._image)return;this.unreserveSprite()}var t=this.node._image.naturalWidth,e=this.node._image.naturalHeight;this.sprite=t>0&&e>0?this.webglBlock.addSpriteSheetImage(this.node._image,t,e):null,this.xyDirty=!0,this.uvDirty=!0},unreserveSprite:function(){this.sprite&&this.webglBlock.removeSpriteSheetImage(this.sprite),this.sprite=null},markTransformDirty:function(){this.xyDirty=!0,f.prototype.markTransformDirty.call(this)},markPaintDirty:function(){this.xyDirty=!0,this.uvDirty=!0,this.markDirty()},update:function(){if(this.dirty){if(this.dirty=!1,this.reserveSprite(),!this.sprite)return;if(this.uvDirty){this.uvDirty=!1;var t=this.sprite.uvBounds;this.vertexArray[2]=t.minX,this.vertexArray[3]=t.minY,this.vertexArray[6]=t.minX,this.vertexArray[7]=t.maxY,this.vertexArray[10]=t.maxX,this.vertexArray[11]=t.minY,this.vertexArray[14]=t.maxX,this.vertexArray[15]=t.minY,this.vertexArray[18]=t.minX,this.vertexArray[19]=t.maxY,this.vertexArray[22]=t.maxX,this.vertexArray[23]=t.maxY}if(this.xyDirty){this.xyDirty=!1;var e=this.node.getImageWidth(),i=this.node.getImageHeight(),n=this.instance.relativeTransform.matrix;n.multiplyVector2(this.upperLeft.setXY(0,0)),n.multiplyVector2(this.lowerLeft.setXY(0,i)),n.multiplyVector2(this.upperRight.setXY(e,0)),n.multiplyVector2(this.lowerRight.setXY(e,i)),this.vertexArray[0]=this.upperLeft.x,this.vertexArray[1]=this.upperLeft.y,this.vertexArray[4]=this.lowerLeft.x,this.vertexArray[5]=this.lowerLeft.y,this.vertexArray[8]=this.upperRight.x,this.vertexArray[9]=this.upperRight.y,this.vertexArray[12]=this.upperRight.x,this.vertexArray[13]=this.upperRight.y,this.vertexArray[16]=this.lowerLeft.x,this.vertexArray[17]=this.lowerLeft.y,this.vertexArray[20]=this.lowerRight.x,this.vertexArray[21]=this.lowerRight.y}}},dispose:function(){f.prototype.dispose.call(this)}}),e.ImageStatefulDrawable.mixin(e.ImageWebGLDrawable),m.Poolable.mixin(e.ImageWebGLDrawable),e}),i("SCENERY/input/ButtonListener",["require","SCENERY/scenery","SCENERY/util/Trail","PHET_CORE/inherit","SCENERY/input/DownUpListener"],function(t){"use strict";function e(t){var e=this;this.buttonState="up",this._overCount=0,this._buttonOptions=t;var i=this;r.call(this,{mouseButton:t.mouseButton||0,down:function(t,n){t.pointer.isKey&&e.enter(t),i.setButtonState(t,"down")},up:function(t,n){i.setButtonState(t,i._overCount>0?"over":"up"),t.pointer.isKey&&e.exit(t)}})}var i=t("SCENERY/scenery");t("SCENERY/util/Trail");var n=t("PHET_CORE/inherit"),r=t("SCENERY/input/DownUpListener");return i.register("ButtonListener",e),n(r,e,{setButtonState:function(t,e){if(e!==this.buttonState){var i=this.buttonState;this.buttonState=e,this._buttonOptions[e]&&this._buttonOptions[e](t,i),this._buttonOptions.fire&&this._overCount>0&&(this._buttonOptions.fireOnDown?"down"===e:"down"===i)&&this._buttonOptions.fire(t)}},enter:function(t){this._overCount++,1===this._overCount&&this.setButtonState(t,this.isDown?"down":"over")},exit:function(t){this._overCount--,0===this._overCount&&this.setButtonState(t,this.isDown?"out":"up")}}),e}),i("SCENERY/nodes/Leaf",["require","SCENERY/scenery"],function(t){"use strict";var e=t("SCENERY/scenery"),i={mixin:function(t){var e=t.prototype;e.insertChild=function(t,e){throw new Error("Attempt to insert child into Leaf");
},e.removeChildWithIndex=function(t,e){throw new Error("Attempt to remove child from Leaf")}}};return e.register("Leaf",i),e.Leaf}),i("SCENERY/nodes/Spacer",["require","PHET_CORE/inherit","SCENERY/scenery","DOT/Bounds2","SCENERY/nodes/Node","SCENERY/nodes/Leaf"],function(t){"use strict";function e(t,e,i){s.call(this),this.localBounds=new r(0,0,t,e),this.mutate(i)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("DOT/Bounds2"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Leaf");return n.register("Spacer",e),i(s,e),a.mixin(e),e}),i("SCENERY/nodes/VStrut",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/nodes/Spacer"],function(t){"use strict";function e(t,e){r.call(this,0,t,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/nodes/Spacer");return n.register("VStrut",e),i(r,e)}),i("SUN/Panel",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SUN/sun"],function(t){"use strict";function e(t,e){var i=this;e=_.extend({},a,e),n.call(i);var s=new r(0,0,1,1,{lineWidth:e.lineWidth,pickable:e.backgroundPickable,lineDash:e.lineDash});this.background=s,this.setStroke(e.stroke),this.setFill(e.fill),this.addChild(s),this.addChild(t);var o=!1,h=function(){if(!o&&(s.visible=t.bounds.isValid(),s.visible)){o=!0;var i=Math.max(e.minWidth,t.width+2*e.xMargin);s.setRect(0,0,i,t.height+2*e.yMargin,e.cornerRadius,e.cornerRadius),"center"===e.align?t.center=s.center:"left"===e.align?(t.left=s.left+e.xMargin,t.centerY=s.centerY):(t.right=s.right-e.xMargin,t.centerY=s.centerY),o=!1}};e.resize&&t.addEventListener("bounds",function(){h()}),h(),this.mutate(e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Rectangle"),s=t("SUN/sun"),a={fill:"white",stroke:"black",lineWidth:1,xMargin:5,yMargin:5,cornerRadius:10,resize:!0,backgroundPickable:!1,align:"right",minWidth:0};return s.register("Panel",e),i(n,e,{setStroke:function(t){this.background.stroke=t},getStroke:function(){return this.background.stroke},set stroke(t){this.setStroke(t)},get stroke(){return this.getStroke()},setFill:function(t){this.background.fill=t},getFill:function(){return this.background.fill},set fill(t){this.setFill(t)},get fill(){return this.getFill()}},{DEFAULT_OPTIONS:a}),e}),i("SUN/ColorConstants",["require","SCENERY/util/Color","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(){}var i=t("SCENERY/util/Color"),n=t("PHET_CORE/inherit"),r=t("SUN/sun");return r.register("ColorConstants",e),n(Object,e,{},{LIGHT_BLUE:new i(153,206,255),LIGHT_GRAY:new i(220,220,220)})}),i("SUN/buttons/RectangularButtonView",["require","SUN/buttons/ButtonListener","SCENERY/util/Color","SUN/ColorConstants","PHET_CORE/inherit","SCENERY/util/LinearGradient","SCENERY/nodes/Node","SCENERY/nodes/Path","AXON/Property","KITE/Shape","SUN/sun"],function(t){"use strict";function e(t,e,i){return c.roundedRectangleWithRadii(0,0,t,e,{topLeft:"number"==typeof i.leftTopCornerRadius?i.leftTopCornerRadius:i.cornerRadius,topRight:"number"==typeof i.rightTopCornerRadius?i.rightTopCornerRadius:i.cornerRadius,bottomLeft:"number"==typeof i.leftBottomCornerRadius?i.leftBottomCornerRadius:i.cornerRadius,bottomRight:"number"==typeof i.rightBottomCornerRadius?i.rightBottomCornerRadius:i.cornerRadius})}function i(t,a,o){this.buttonModel=t;var d=this;o=_.extend({content:null,minWidth:f+p,minHeight:m+p,cursor:"pointer",cornerRadius:4,baseColor:g,disabledBaseColor:s.LIGHT_GRAY,xMargin:8,yMargin:5,fireOnDown:!1,touchAreaXDilation:0,touchAreaYDilation:0,stroke:void 0,lineWidth:.5,buttonAppearanceStrategy:i.threeDAppearanceStrategy,contentAppearanceStrategy:i.fadeContentWhenDisabled},o),h.call(d);var b=o.content;b&&(b.pickable=!1),this.addInputListener(new n(t)),this.baseColorProperty=new u(r.toColor(o.baseColor));var v=Math.max(b?b.width+2*o.xMargin:0,o.minWidth),E=Math.max(b?b.height+2*o.yMargin:0,o.minHeight),S=new l(e(v,E,o),{fill:o.baseColor,lineWidth:o.lineWidth});this.addChild(S),o.buttonAppearanceStrategy(S,a,this.baseColorProperty,o),b&&(b.center=S.center,d.addChild(b)),o.contentAppearanceStrategy(b,a,o),a.link(function(t){d.cursor="disabled"===t||"disabled-pressed"===t?null:"pointer"}),this.mouseArea=c.rectangle(0,0,v,E),this.touchArea=c.rectangle(-o.touchAreaXDilation,-o.touchAreaYDilation,v+2*o.touchAreaXDilation,E+2*o.touchAreaYDilation),d.mutate(o)}var n=t("SUN/buttons/ButtonListener"),r=t("SCENERY/util/Color"),s=t("SUN/ColorConstants"),a=t("PHET_CORE/inherit"),o=t("SCENERY/util/LinearGradient"),h=t("SCENERY/nodes/Node"),l=t("SCENERY/nodes/Path"),u=t("AXON/Property"),c=t("KITE/Shape"),d=t("SUN/sun"),m=7,f=7,p=3,g=s.LIGHT_BLUE;return d.register("RectangularButtonView",i),i.threeDAppearanceStrategy=function(t,i,n,s){function a(e){var i=new r(e.getRed(),e.getGreen(),e.getBlue(),0);w=new o(0,0,0,c).addColorStop(0,e.colorUtilsBrighter(.7)).addColorStop(d,e).addColorStop(g,e).addColorStop(1,e.colorUtilsDarker(.5)),T=new o(0,0,u,0).addColorStop(0,y).addColorStop(b,i).addColorStop(v,i).addColorStop(1,e.colorUtilsDarker(.5)),R=new o(0,0,0,c).addColorStop(0,e.colorUtilsBrighter(.7)).addColorStop(d,e.colorUtilsBrighter(.5)).addColorStop(g,e.colorUtilsBrighter(.5)).addColorStop(1,e.colorUtilsDarker(.5)),N=new o(0,0,u,0).addColorStop(0,y).addColorStop(b/2,new r(256,256,256,0)).addColorStop(v,i).addColorStop(1,e.colorUtilsDarker(.3)),_=new o(0,0,0,c).addColorStop(0,e.colorUtilsBrighter(.7)).addColorStop(.67*d,e.colorUtilsDarker(.3)).addColorStop(g,e.colorUtilsBrighter(.2)).addColorStop(1,e.colorUtilsDarker(.5)),A=new o(0,0,0,c).addColorStop(0,E.colorUtilsBrighter(.7)).addColorStop(d,E.colorUtilsBrighter(.5)).addColorStop(g,E.colorUtilsBrighter(.5)).addColorStop(1,E.colorUtilsDarker(.5)),P=new o(0,0,u,0).addColorStop(0,E.colorUtilsBrighter(.7)).addColorStop(b,S).addColorStop(v,S).addColorStop(1,E.colorUtilsDarker(.5)),x=new o(0,0,0,c).addColorStop(0,E.colorUtilsBrighter(.7)).addColorStop(.67*d,E.colorUtilsDarker(.3)).addColorStop(g,E.colorUtilsBrighter(.2)).addColorStop(1,E.colorUtilsDarker(.5)),null===s.stroke?(k=null,O=null):"undefined"==typeof s.stroke?(k=e.colorUtilsDarker(.4),O=E.colorUtilsDarker(.4)):(k=r.toColor(s.stroke),O=E.colorUtilsDarker(.4)),t.cachedPaints=[w,R,_,A,x,O],C.cachedPaints=[T,N,P,k,O]}function h(e){switch(e){case"idle":t.fill=w,C.stroke=k,C.fill=T;break;case"over":t.fill=R,C.stroke=k,C.fill=N;break;case"pressed":t.fill=_,C.stroke=k,C.fill=N;break;case"disabled":t.fill=A,t.stroke=O,C.stroke=O,C.fill=P;break;case"disabled-pressed":t.fill=x,t.stroke=O,C.stroke=O,C.fill=P}}var u=t.width,c=t.height,d=Math.min(m/c,1),g=Math.max(1-p/c,0),b=Math.min(f/u,1),v=Math.max(1-p/u,0),E=r.toColor(s.disabledBaseColor),S=new r(E.getRed(),E.getGreen(),E.getBlue(),0),y=new r(256,256,256,.7),C=new l(e(u,c,s),{lineWidth:s.lineWidth,pickable:!1});t.addChild(C);var w,T,R,N,_,A,P,x,k,O;a(n.value),h(i.value),n.lazyLink(function(t){a(t),h(i.value)}),i.lazyLink(function(t){h(t)})},i.flatAppearanceStrategy=function(t,e,i,n){function s(e){o=e,h=e.colorUtilsBrighter(.4),l=e.colorUtilsDarker(.4),u=f,c=u,null===n.stroke?(d=null,m=null):"undefined"==typeof n.stroke?(d=e.colorUtilsDarker(.4),m=f.colorUtilsDarker(.4)):(d=r.toColor(n.stroke),m=f.colorUtilsDarker(.4)),t.cachedPaints=[o,h,l,u,c,d,m]}function a(e){switch(e){case"idle":t.fill=o,t.stroke=d;break;case"over":t.fill=h,t.stroke=d;break;case"pressed":t.fill=l,t.stroke=d;break;case"disabled":t.fill=u,t.stroke=m;break;case"disabled-pressed":t.fill=c,t.stroke=m}}var o,h,l,u,c,d,m,f=r.toColor(n.disabledBaseColor);i.link(function(t){s(t),a(e.value)}),e.lazyLink(function(t){a(t)})},i.fadeContentWhenDisabled=function(t,e){t&&e.link(function(e){t.opacity="disabled"===e||"disabled-pressed"===e?.3:1})},a(h,i,{setEnabled:function(t){this.buttonModel.enabled=t},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this.buttonModel.enabled},get enabled(){return this.getEnabled()},setBaseColor:function(t){this.baseColorProperty.value=r.toColor(t)},set baseColor(t){this.setBaseColor(t)},getBaseColor:function(){return this.baseColorProperty.value},get baseColor(){return this.getBaseColor()}})}),i("SUN/buttons/RectangularPushButton",["require","SCENERY/accessibility/AccessiblePeer","PHET_CORE/inherit","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","SUN/buttons/RectangularButtonView","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({accessibleLabel:"",tandem:null,accessibleContent:{createPeer:function(e){return new i(e,t.accessibleLabel,t.listener)}}},t),this.buttonModel=new a(t),o.call(this,this.buttonModel,new s(this.buttonModel),t),this.rectangularPushButtonTandem=t.tandem,this.rectangularPushButtonTandem&&this.rectangularPushButtonTandem.addInstance(this)}function i(t,e,i){this.initialize(t,e,i)}var n=t("SCENERY/accessibility/AccessiblePeer"),r=t("PHET_CORE/inherit"),s=t("SUN/buttons/PushButtonInteractionStateProperty"),a=t("SUN/buttons/PushButtonModel"),o=t("SUN/buttons/RectangularButtonView"),h=t("SUN/sun");return r(o,e,{dispose:function(){this.buttonModel.dispose(),o.prototype.dispose.call(this),this.rectangularPushButtonTandem&&this.rectangularPushButtonTandem.removeInstance(this)},addListener:function(t){this.buttonModel.addListener(t)},removeListener:function(t){this.buttonModel.removeListener(t)}},{RectangularPushButtonAccessiblePeer:function(t,e,n){return new i(t,e,n)}}),h.register("RectangularPushButton",e),r(n,i,{initialize:function(t,e,i){var n=document.createElement("input");n.setAttribute("type","button"),n.setAttribute("aria-label",e),n.addEventListener("click",function(){i()}),this.initializeAccessiblePeer(t,n)}}),e}),i("JOIST/Dialog",["require","PHET_CORE/inherit","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Path","SUN/Panel","SUN/buttons/RectangularPushButton","SCENERY/accessibility/AccessiblePeer","JOIST/joist"],function(t){"use strict";function e(t,n){function l(){n.layoutStrategy(u,v.bounds,v.screenBounds,v.scale)}var u=this;n=_.extend({modal:!1,title:null,titleAlign:"center",titleSpacing:20,hasCloseButton:!0,layoutStrategy:e.DEFAULT_LAYOUT_STRATEGY,cornerRadius:10,resize:!0,fill:"white",stroke:"black",backgroundPickable:!0,xMargin:20,yMargin:20,closeButtonMargin:5,accessibleContent:{createPeer:function(t){return new i(t,u)}}},n),this.isModal=n.modal,this.isShowing=!1;var c=new s({children:[t]});if(n.title){var d=n.title;c.addChild(d);var m=function(){switch(n.titleAlign){case"center":d.centerX=t.centerX;break;case"left":d.left=t.left;break;case"right":d.right=t.right;break;default:throw new Error("unknown titleAlign for Dialog: "+n.titleAlign)}d.bottom=t.top-n.titleSpacing};n.resize&&(t.addEventListener("bounds",m),d.addEventListener("localBounds",m)),m()}if(o.call(this,c,n),n.hasCloseButton){var f=10,p=new a((new r).moveTo(0,0).lineTo(f,f).moveTo(0,f).lineTo(f,0),{stroke:"#fff",lineWidth:3}),g=new h({content:p,baseColor:"#d00",xMargin:5,yMargin:5,listener:function(){u.hide()}});this.addChild(g);var b=function(){g.right=c.right+n.xMargin-n.closeButtonMargin,g.top=c.top-n.xMargin+n.closeButtonMargin};n.resize&&(c.addEventListener("bounds",b),n.title&&n.title.addEventListener("bounds",b)),b()}var v=window.phet.joist.sim;v.on("resized",l),l()}function i(t,e){this.initialize(t,e)}var n=t("PHET_CORE/inherit"),r=t("KITE/Shape"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Path"),o=t("SUN/Panel"),h=t("SUN/buttons/RectangularPushButton"),l=t("SCENERY/accessibility/AccessiblePeer"),u=t("JOIST/joist");return u.register("Dialog",e),e.DEFAULT_LAYOUT_STRATEGY=function(t,e,i,n){t.center=e.center.times(1/n)},n(o,e,{show:function(){this.isShowing||(window.phet.joist.sim.showPopup(this,this.isModal),this.isShowing=!0)},hide:function(){this.isShowing&&(window.phet.joist.sim.hidePopup(this,this.isModal),this.isShowing=!1)}},{DialogAccessiblePeer:function(t,e){return new i(t,e)}}),n(l,i,{initialize:function(t,e){var i=t.trail,n=i.getUniqueId();this.domElement=document.createElement("div"),this.initializeAccessiblePeer(t,this.domElement),this.domElement.id="dialog-"+n,this.domElement.setAttribute("role","document")}}),e}),i("string!JOIST/credits.title",function(){return window.phet.chipper.strings.get("JOIST/credits.title")}),i("string!JOIST/credits.leadDesign",function(){return window.phet.chipper.strings.get("JOIST/credits.leadDesign")}),i("string!JOIST/credits.softwareDevelopment",function(){return window.phet.chipper.strings.get("JOIST/credits.softwareDevelopment")}),i("string!JOIST/credits.team",function(){return window.phet.chipper.strings.get("JOIST/credits.team")}),i("string!JOIST/credits.qualityAssurance",function(){return window.phet.chipper.strings.get("JOIST/credits.qualityAssurance")}),i("string!JOIST/credits.graphicArts",function(){return window.phet.chipper.strings.get("JOIST/credits.graphicArts")}),i("string!JOIST/credits.translation",function(){return window.phet.chipper.strings.get("JOIST/credits.translation")}),i("string!JOIST/credits.thanks",function(){return window.phet.chipper.strings.get("JOIST/credits.thanks")}),i("JOIST/CreditsNode",["require","SCENERY/nodes/VBox","SCENERY/nodes/Text","PHET_CORE/inherit","SCENERY_PHET/PhetFont","SCENERY_PHET/MultiLineText","PHETCOMMON/util/StringUtils","SCENERY/nodes/VStrut","JOIST/joist","string!JOIST/credits.title","string!JOIST/credits.leadDesign","string!JOIST/credits.softwareDevelopment","string!JOIST/credits.team","string!JOIST/credits.qualityAssurance","string!JOIST/credits.graphicArts","string!JOIST/credits.translation","string!JOIST/credits.thanks"],function(t){"use strict";function e(t,e){var r=new s({size:14,weight:"bold"}),l=new s(12),v={font:l,align:"left"},E=[];E.push(new n(u,{font:r})),t.leadDesign&&E.push(new a(o.format(c,"‪"+t.leadDesign+"‬"),v)),t.softwareDevelopment&&E.push(new a(o.format(d,"‪"+t.softwareDevelopment+"‬"),v)),t.team&&E.push(new a(o.format(m,"‪"+t.team+"‬"),v)),t.qualityAssurance&&E.push(new a(o.format(f,"‪"+t.qualityAssurance+"‬"),v)),t.graphicArts&&E.push(new a(o.format(p,"‪"+t.graphicArts+"‬"),v)),t.translation&&(E.length>0&&E.push(new h(10)),E.push(new n(g,{font:r})),E.push(new a(t.translation,v))),t.thanks&&(E.length>0&&E.push(new h(10)),E.push(new n(b,{font:r})),E.push(new a(t.thanks,v))),i.call(this,_.extend({align:"left",spacing:1,children:E},e))}var i=t("SCENERY/nodes/VBox"),n=t("SCENERY/nodes/Text"),r=t("PHET_CORE/inherit"),s=t("SCENERY_PHET/PhetFont"),a=t("SCENERY_PHET/MultiLineText"),o=t("PHETCOMMON/util/StringUtils"),h=t("SCENERY/nodes/VStrut"),l=t("JOIST/joist"),u=t("string!JOIST/credits.title"),c=t("string!JOIST/credits.leadDesign"),d=t("string!JOIST/credits.softwareDevelopment"),m=t("string!JOIST/credits.team"),f=t("string!JOIST/credits.qualityAssurance"),p=t("string!JOIST/credits.graphicArts"),g=t("string!JOIST/credits.translation"),b=t("string!JOIST/credits.thanks");return l.register("CreditsNode",e),r(i,e)}),i("SUN/buttons/TextPushButton",["require","PHET_CORE/inherit","SCENERY/util/Font","SUN/buttons/RectangularPushButton","SUN/sun","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e){e=_.extend({font:new n(20),textFill:"black"},e);var i=new a(t,{font:e.font,fill:e.textFill});r.call(this,_.extend({content:i},e))}var i=t("PHET_CORE/inherit"),n=t("SCENERY/util/Font"),r=t("SUN/buttons/RectangularPushButton"),s=t("SUN/sun"),a=t("SCENERY/nodes/Text");return s.register("TextPushButton",e),i(r,e)}),i("SCENERY/nodes/Circle",["require","PHET_CORE/inherit","SCENERY/scenery","DOT/Bounds2","DOT/Matrix3","SCENERY/nodes/Path","KITE/Shape","SCENERY/util/Features","SCENERY/nodes/Paintable","SCENERY/display/DOMSelfDrawable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable","SCENERY/display/Renderer","SCENERY/util/Util"],function(t){"use strict";function e(t,e){"object"==typeof t?(e=t,this._radius=e.radius):(this._radius=t,e=e||{}),a.call(this,null,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("DOT/Bounds2"),s=t("DOT/Matrix3"),a=t("SCENERY/nodes/Path"),o=t("KITE/Shape"),h=t("SCENERY/util/Features"),l=t("SCENERY/nodes/Paintable"),u=t("SCENERY/display/DOMSelfDrawable"),c=t("SCENERY/display/SVGSelfDrawable"),d=t("SCENERY/display/CanvasSelfDrawable"),m=t("SCENERY/display/SelfDrawable"),f=t("SCENERY/display/Renderer");t("SCENERY/util/Util");var p=!0,g=!0;return n.register("Circle",e),i(a,e,{getStrokeRendererBitmask:function(){var t=a.prototype.getStrokeRendererBitmask.call(this);return this.hasStroke()&&!this.getStroke().isGradient&&!this.getStroke().isPattern&&this.getLineWidth()<=this.getRadius()&&(t|=f.bitmaskDOM),t},getPathRendererBitmask:function(){return f.bitmaskCanvas|f.bitmaskSVG|(h.borderRadius?f.bitmaskDOM:0)},invalidateCircle:function(){this._shape=null,this.invalidatePath()},createCircleShape:function(){return o.circle(0,0,this._radius)},intersectsBoundsSelf:function(t){var e=Math.abs(t.centerX),i=Math.abs(t.centerY),n=t.maxX-e,r=t.maxY-i;return e>n+this._radius||i>r+this._radius?!1:n>=e||r>=i?!0:(e-=n,i-=r,e*e+i*i<=this._radius*this._radius)},canvasPaintSelf:function(t){e.CircleCanvasDrawable.prototype.paintCanvas(t,this)},createDOMDrawable:function(t,i){return e.CircleDOMDrawable.createFromPool(t,i)},createSVGDrawable:function(t,i){return e.CircleSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.CircleCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.CircleWebGLDrawable.createFromPool(t,i)},getBasicConstructor:function(t){return"new scenery.Circle( "+this._radius+", {"+t+"} )"},getRadius:function(){return this._radius},setRadius:function(t){if(this._radius!==t){this._radius=t,this.invalidateCircle();for(var e=this._drawables.length,i=0;e>i;i++)this._drawables[i].markDirtyRadius()}return this},computeShapeBounds:function(){var t=new r(-this._radius,-this._radius,this._radius,this._radius);return this._stroke&&(t=t.dilated(this.getLineWidth()/2)),t},containsPointSelf:function(t){var e,i=t.x*t.x+t.y*t.y,n=!0;if(this._strokePickable){e=this.getLineWidth()/2;var r=this._radius+e;n=n&&r*r>=i}if(this._fillPickable)return this._strokePickable?n:i<=this._radius*this._radius;if(this._strokePickable){var s=this._radius-e;return n&&i>=s*s}return!1},get radius(){return this.getRadius()},set radius(t){return this.setRadius(t)},setShape:function(t){if(null!==t)throw new Error("Cannot set the shape of a scenery.Circle to something non-null");this.invalidatePath()},getShape:function(){return this._shape||(this._shape=this.createCircleShape()),this._shape},hasShape:function(){return!0}}),e.prototype._mutatorKeys=["radius"].concat(a.prototype._mutatorKeys),e.CircleStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyRadius=!0,this.initializePaintableState(t,e),this},e.disposeState=function(){this.disposePaintableState()},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyRadius=function(){this.dirtyRadius=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyRadius=!1},l.PaintableStatefulDrawable.mixin(t)}},e.CircleDOMDrawable=function(t,e){this.initialize(t,e)},i(u,e.CircleDOMDrawable,{initialize:function(t,e){if(this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),this.matrix||(this.matrix=s.dirtyFromPool()),!this.fillElement||!this.strokeElement){var i=this.fillElement=document.createElement("div"),r=this.strokeElement=document.createElement("div");i.style.display="block",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.pointerEvents="none",r.style.display="block",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.pointerEvents="none",i.appendChild(r)}return this.domElement=this.fillElement,n.Util.prepareForTransform(this.domElement,this.forceAcceleration),this},updateDOM:function(){var t=this.node,e=this.fillElement,i=this.strokeElement;if(this.paintDirty&&(this.dirtyRadius&&(e.style.width=2*t._radius+"px",e.style.height=2*t._radius+"px",e.style[h.borderRadius]=t._radius+"px"),this.dirtyFill&&(e.style.backgroundColor=t.getCSSFill()),this.dirtyStroke&&(t.hasStroke()?i.style.borderStyle="solid":i.style.borderStyle="none"),t.hasStroke())){var r=null===this.lastStroke;(r||this.dirtyLineWidth||this.dirtyRadius)&&(i.style.width=2*t._radius-t.getLineWidth()+"px",i.style.height=2*t._radius-t.getLineWidth()+"px",i.style[h.borderRadius]=t._radius+t.getLineWidth()/2+"px"),(r||this.dirtyLineWidth)&&(i.style.left=-t.getLineWidth()/2+"px",i.style.top=-t.getLineWidth()/2+"px",i.style.borderWidth=t.getLineWidth()+"px"),(r||this.dirtyStroke)&&(i.style.borderColor=t.getSimpleCSSStroke())}if(this.transformDirty||this.dirtyRadius){this.matrix.set(this.getTransformMatrix());var a=s.translation(-t._radius,-t._radius);this.matrix.multiplyMatrix(a),a.freeToPool(),n.Util.applyPreparedTransform(this.matrix,this.fillElement,this.forceAcceleration)}this.setToClean()},setToClean:function(){this.setToCleanState(),this.cleanPaintableState(),this.transformDirty=!1},dispose:function(){this.disposeState(),p||(this.fillElement=null,this.strokeElement=null,this.domElement=null),u.prototype.dispose.call(this)}}),e.CircleStatefulDrawable.mixin(e.CircleDOMDrawable),m.Poolable.mixin(e.CircleDOMDrawable),e.CircleSVGDrawable=function(t,e){this.initialize(t,e)},i(c,e.CircleSVGDrawable,{initialize:function(t,e){return this.initializeSVGSelfDrawable(t,e,!0,g),this.svgElement||(this.svgElement=document.createElementNS(n.svgns,"circle")),this},updateSVGSelf:function(){var t=this.svgElement;this.dirtyRadius&&t.setAttribute("r",this.node._radius),this.updateFillStrokeStyle(t)}}),e.CircleStatefulDrawable.mixin(e.CircleSVGDrawable),m.Poolable.mixin(e.CircleSVGDrawable),e.CircleCanvasDrawable=function(t,e){this.initialize(t,e)},i(d,e.CircleCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e),this},paintCanvas:function(t,e){var i=t.context;i.beginPath(),i.arc(0,0,e._radius,0,2*Math.PI,!1),i.closePath(),e.hasFill()&&(e.beforeCanvasFill(t),i.fill(),e.afterCanvasFill(t)),e.hasStroke()&&(e.beforeCanvasStroke(t),i.stroke(),e.afterCanvasStroke(t))},markDirtyRadius:function(){this.markPaintDirty()},dispose:function(){d.prototype.dispose.call(this),this.disposePaintableStateless()}}),l.PaintableStatelessDrawable.mixin(e.CircleCanvasDrawable),m.Poolable.mixin(e.CircleCanvasDrawable),e}),i("SCENERY_PHET/SpinningIndicatorNode",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY/nodes/Circle","SCENERY/util/Color","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){t=_.extend({indicatorSize:15,indicatorSpeed:1,elementFactory:e.rectangleFactory,elementQuantity:16,activeColor:"rgba(0,0,0,1)",inactiveColor:"rgba(0,0,0,0.15)"},t),this.options=t,n.call(this,t),this.indicatorRotation=2*Math.PI,this.activeColor=new a(t.activeColor),this.inactiveColor=new a(t.inactiveColor),this.angleDelta=2*Math.PI/t.elementQuantity,this.elements=[];for(var i=0,r=0;r<t.elementQuantity;r++){var s=t.elementFactory(this.options);s.right=t.indicatorSize/2,s.centerY=0,s.rotate(i,!0),i+=this.angleDelta,this.elements.push(s),this.addChild(s)}this.step(0)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Rectangle"),s=t("SCENERY/nodes/Circle"),a=t("SCENERY/util/Color"),o=t("SCENERY_PHET/sceneryPhet");return o.register("SpinningIndicatorNode",e),i(n,e,{step:function(t){this.indicatorRotation+=10*t*this.options.indicatorSpeed;for(var e=this.indicatorRotation,i=0;i<this.elements.length;i++){var n=Math.pow(e/(2*Math.PI)%1,.5);n=.2>n?1-5*n:10*(n-.2)/8;var r=n*this.inactiveColor.red+(1-n)*this.activeColor.red,s=n*this.inactiveColor.green+(1-n)*this.activeColor.green,o=n*this.inactiveColor.blue+(1-n)*this.activeColor.blue,h=n*this.inactiveColor.alpha+(1-n)*this.activeColor.alpha;this.elements[i].fill=new a(r,s,o,h),e-=this.angleDelta}}},{rectangleFactory:function(t){return new r(0,0,.175*t.indicatorSize,1.2*t.indicatorSize/t.elementQuantity)},circleFactory:function(t){return new s(.8*t.indicatorSize/t.elementQuantity)}})}),i("text!REPOSITORY/package.json",[],function(){return'{\n  "name": "wave-on-a-string",\n  "version": "1.1.5",\n  "license": "GPL-3.0",\n  "repository": {\n    "type": "git",\n    "url": "https://github.com/phetsims/wave-on-a-string.git"\n  },\n  "devDependencies": {\n    "grunt": "~0.4.1",\n    "grunt-requirejs": "~0.4.0",\n    "grunt-eslint": "~17.2.0",\n    "uglify-js": "~2.4.0",\n    "requirejs": "~2.1.8"\n  },\n  "phet": {\n    "requirejsNamespace": "WAVE_ON_A_STRING"\n  }\n}'}),i("JOIST/packageJSON",["require","JOIST/joist","text!REPOSITORY/package.json"],function(t){"use strict";var e=t("JOIST/joist"),i=t("text!REPOSITORY/package.json"),n=JSON.parse(i);return e.register("packageJSON",n),n}),i("JOIST/SimVersion",["require","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(t){this.major=t.major,this.minor=t.minor,this.maintenance=t.maintenance,this.suffix=t.suffix,this.buildTimestamp=t.buildTimestamp}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist");return n.register("SimVersion",e),i(Object,e,{compare:function(t){return this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.maintenance<t.maintenance?-1:this.maintenance>t.maintenance?1:0},get isSimNotPublished(){return this.major<1||1===this.major&&0===this.minor&&0===this.maintenance&&this.suffix},toString:function(){return this.major+"."+this.minor+"."+this.maintenance+(this.suffix?"-"+this.suffix:"")}},{parse:function(t,i){var n=t.match(/(\d+)\.(\d+)\.(\d+)(-(.+))?/);if(!n)throw new Error("could not parse version: "+t);return new e({major:parseInt(n[1],10),minor:parseInt(n[2],10),maintenance:parseInt(n[3],10),suffix:n[5],buildTimestamp:i})}})}),i("JOIST/UpdateCheck",["require","PHET_CORE/inherit","AXON/PropertySet","JOIST/packageJSON","JOIST/SimVersion","BRAND/Brand","JOIST/joist"],function(t){"use strict";function e(){n.call(this,{state:"unchecked",latestVersion:null,updateURL:"http://phet.colorado.edu/en/simulation/"+h}),this.ourVersion=l,this.timeoutCallback=this.timeout.bind(this)}var i=t("PHET_CORE/inherit"),n=t("AXON/PropertySet"),r=t("JOIST/packageJSON"),s=t("JOIST/SimVersion"),a=t("BRAND/Brand"),o=t("JOIST/joist"),h=r.name,l=s.parse(r.version,phet.chipper.buildTimestamp),u="https:"===document.location.protocol?"https:":"http:";i(n,e,{areUpdatesChecked:!window.phetio&&"phet"===a.id&&!phet.chipper.getQueryParameter("phet-app"),updateURL:"http://phet.colorado.edu/html-sim-update?simulation="+encodeURIComponent(h)+"&version="+encodeURIComponent(l.toString())+"&buildTimestamp="+encodeURIComponent(""+phet.chipper.buildTimestamp),timeoutId:-1,timeoutMilliseconds:15e3,clearTimeout:function(){window.clearTimeout(this.timeoutId)},setTimeout:function(){this.timeoutId=window.setTimeout(this.timeoutCallback,this.timeoutMilliseconds)},resetTimeout:function(){"checking"===this.state&&(this.clearTimeout(),this.setTimeout())},timeout:function(){this.state="offline"},check:function(){var t=this;if(this.areUpdatesChecked&&("unchecked"===t.state||"offline"===t.state)){if(this.ourVersion.isSimNotPublished)return void(t.state="up-to-date");var e=new XMLHttpRequest;"withCredentials"in e&&(t.state="checking",t.setTimeout(),e.onload=function(){t.clearTimeout();try{var i=JSON.parse(e.responseText);i.error?(console.log("Update check failure: "+i.error),t.state="offline"):(t.updateURL&&(t.updateURL=i.updateURL),t.latestVersion=s.parse(i.latestVersion,i.buildTimestamp),"out-of-date"===i.state||"up-to-date"===i.state?t.state=i.state:(console.log("Failed to get proper state: "+i.state),t.state="offline"))}catch(n){t.state="offline"}},e.onerror=function(){t.clearTimeout(),t.state="offline"},e.open("post",u+"//phet.colorado.edu/services/check-html-updates",!0),e.send(JSON.stringify({api:"1.0",simulation:h,locale:phet.joist.sim.locale,currentVersion:t.ourVersion.toString(),buildTimestamp:phet.chipper.buildTimestamp})))}}});var c=new e;return o.register("UpdateCheck",c),c}),i("JOIST/LinkText",["require","PHET_CORE/inherit","SCENERY/nodes/Text","SCENERY/input/ButtonListener","SCENERY/accessibility/AccessiblePeer","JOIST/joist"],function(t){"use strict";function e(t,e,i){i=_.extend({handleEvent:!1,accessibleContent:{createPeer:function(i){var n=document.createElement("a");return n.tabIndex="0",n.href=e,n.innerText=t,n.setAttribute("target","_blank"),new s(i,n)}}},i),n.call(this,t,_.extend({fill:"rgb(27,0,241)",cursor:"pointer"},i)),this.addInputListener(new r({fire:function(t){i.handleEvent&&t.handle();var n=window.open(e,"_blank");n.focus()}}))}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Text"),r=t("SCENERY/input/ButtonListener"),s=t("SCENERY/accessibility/AccessiblePeer"),a=t("JOIST/joist");return a.register("LinkText",e),i(n,e)}),i("string!JOIST/updates.upToDate",function(){return window.phet.chipper.strings.get("JOIST/updates.upToDate")}),i("string!JOIST/updates.outOfDate",function(){return window.phet.chipper.strings.get("JOIST/updates.outOfDate")}),i("string!JOIST/updates.checking",function(){return window.phet.chipper.strings.get("JOIST/updates.checking")}),i("string!JOIST/updates.offline",function(){return window.phet.chipper.strings.get("JOIST/updates.offline")}),i("string!JOIST/updates.newVersionAvailable",function(){return window.phet.chipper.strings.get("JOIST/updates.newVersionAvailable")}),i("string!JOIST/updates.yourCurrentVersion",function(){return window.phet.chipper.strings.get("JOIST/updates.yourCurrentVersion")}),i("string!JOIST/updates.getUpdate",function(){return window.phet.chipper.strings.get("JOIST/updates.getUpdate")}),i("string!JOIST/updates.noThanks",function(){return window.phet.chipper.strings.get("JOIST/updates.noThanks")}),i("JOIST/UpdateNodes",["require","SCENERY/nodes/HBox","SCENERY/nodes/VBox","SCENERY/nodes/Text","SCENERY/nodes/Rectangle","PHETCOMMON/util/StringUtils","SCENERY_PHET/PhetFont","SUN/FontAwesomeNode","SUN/buttons/TextPushButton","SCENERY_PHET/SpinningIndicatorNode","SCENERY/nodes/VStrut","JOIST/UpdateCheck","JOIST/LinkText","JOIST/joist","string!JOIST/updates.upToDate","string!JOIST/updates.outOfDate","string!JOIST/updates.checking","string!JOIST/updates.offline","string!JOIST/updates.newVersionAvailable","string!JOIST/updates.yourCurrentVersion","string!JOIST/updates.getUpdate","string!JOIST/updates.noThanks"],function(t){"use strict";var e=t("SCENERY/nodes/HBox"),i=t("SCENERY/nodes/VBox"),n=t("SCENERY/nodes/Text"),r=t("SCENERY/nodes/Rectangle"),s=t("PHETCOMMON/util/StringUtils"),a=t("SCENERY_PHET/PhetFont"),o=t("SUN/FontAwesomeNode"),h=t("SUN/buttons/TextPushButton"),l=t("SCENERY_PHET/SpinningIndicatorNode"),u=t("SCENERY/nodes/VStrut"),c=t("JOIST/UpdateCheck"),d=t("JOIST/LinkText"),m=t("JOIST/joist"),f=t("string!JOIST/updates.upToDate"),p=t("string!JOIST/updates.outOfDate"),g=t("string!JOIST/updates.checking"),b=t("string!JOIST/updates.offline"),v=t("string!JOIST/updates.newVersionAvailable"),E=t("string!JOIST/updates.yourCurrentVersion"),S=t("string!JOIST/updates.getUpdate"),y=t("string!JOIST/updates.noThanks"),C=new a(14),w=550,T={createCheckingNode:function(t){var i=new l({indicatorSize:t.big?24:18}),r=new e(_.extend({spacing:t.big?10:8,maxWidth:w,children:[i,new n(g,{font:new a(t.big?16:14),fontWeight:t.big?"bold":"normal"})]},t));return r.step=function(t){"checking"===c.state&&i.step(t)},r.stepListener=r.step.bind(r),r},createUpToDateNode:function(t){return new e(_.extend({spacing:8,maxWidth:w,children:[new r(0,0,20,20,5,5,{fill:"#5c3",scale:t.big?1.2:1,children:[new o("check_without_box",{fill:"#fff",scale:.38,centerX:10,centerY:10})]}),new n(f,{font:new a(t.big?16:14),fontWeight:t.big?"bold":"normal"})]},t))},createOutOfDateAboutNode:function(t){return new e(_.extend({spacing:8,cursor:"pointer",maxWidth:w,children:[new o("warning_sign",{fill:"#E87600",scale:.5}),new d(p,c.updateURL,{font:C})]},t))},createOutOfDateDialogNode:function(t,r,o){return new i(_.extend({spacing:15,maxWidth:w,children:[new i({spacing:5,align:"left",children:[new n(s.format(v,r),{font:new a(16),fontWeight:"bold"}),new n(s.format(E,t),{font:C})]}),new e({
spacing:25,children:[new h(S,{baseColor:"#6f6",font:C,listener:function(){var t=window.open(c.updateURL,"_blank");t.focus()}}),new h(y,{baseColor:"#ddd",font:C,listener:function(){}})]})]},o))},createOfflineNode:function(t){return new e(_.extend({spacing:0,maxWidth:w,children:[new u(20),new n(b,{font:new a(t.big?16:14),fontWeight:t.big?"bold":"normal"})]},t))}};return m.register("UpdateNodes",T),T}),i("SCENERY_PHET/SubSupText",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","SCENERY/nodes/Text","SCENERY_PHET/sceneryPhet","PHETCOMMON/util/StringUtils"],function(t){"use strict";function e(t,e){e=_.extend({fill:"black",font:new r(20),textXSpacing:0,subScale:.75,subXSpacing:0,subYOffset:0,supScale:.75,supXSpacing:0,supYOffset:0,capHeightScale:.75},e),this._text=t,this._options=e;var i=new s("X",{font:e.font});this._capLineYOffset=e.capHeightScale*(i.top-i.y),n.call(this),this._textParent=new n,this.addChild(this._textParent),this.update(),this.mutate(e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/Text"),a=t("SCENERY_PHET/sceneryPhet"),o=t("PHETCOMMON/util/StringUtils");return a.register("SubSupText",e),i(n,e,{update:function(){function t(t,e){e>t&&l.push({mode:h,string:o.embeddedSlice(i,t,e)})}for(var e,i=this._text,n=this._options,r=/<\/?[^>]+>/g,a=0,h="normal",l=[];null!==(e=r.exec(i));){var u=e[0],c=e.index;t(a,c),a=c+u.length,"normal"===h?"<sub>"===u?h="sub":"<sup>"===u&&(h="sup"):"sub"===h?h="normal":"sup"===h&&(h="normal")}t(a,i.length);var d={sub:n.subYOffset,sup:this._capLineYOffset+n.supYOffset},m={sub:n.subXSpacing,sup:n.supXSpacing},f={normal:1,sub:n.subScale,sup:n.supScale};this._textParent.removeAllChildren();for(var p,g=0;g<l.length;g++){var b=l[g],v=new s(b.string,{font:n.font,fill:n.fill,scale:f[b.mode],left:p?p.node.right+n.textXSpacing:0});"normal"!==b.mode&&(v.centerY=d[b.mode],v.left=p.node.right+m[b.mode]),b.node=v,this._textParent.addChild(v),p=b}},setText:function(t){this._text=t,this.update()},set text(t){this.setText(t)},getText:function(){return this._text},get text(){return this.getText()},setFill:function(t){this._options.fill=t;for(var e=this._textParent.getChildrenCount(),i=0;e>i;i++)this._textParent.getChildAt(i).fill=t},set fill(t){this.setFill(t)},getFill:function(){return this._fill},get fill(){return this.getFill()}})}),i("string!JOIST/versionPattern",function(){return window.phet.chipper.strings.get("JOIST/versionPattern")}),i("JOIST/AboutDialog",["require","SCENERY/nodes/VBox","SCENERY/nodes/Text","SCENERY/nodes/Node","PHET_CORE/inherit","SCENERY/input/ButtonListener","SCENERY_PHET/PhetFont","PHETCOMMON/util/StringUtils","SCENERY/nodes/VStrut","JOIST/Dialog","PHET_CORE/Timer","JOIST/CreditsNode","JOIST/UpdateNodes","JOIST/UpdateCheck","JOIST/LinkText","SCENERY_PHET/SubSupText","SCENERY_PHET/MultiLineText","JOIST/packageJSON","JOIST/joist","string!JOIST/versionPattern"],function(t){"use strict";function e(t,e,s,c,E){var C=this,w=[];if(w.push(new n(t,{font:new o(28),maxWidth:y})),w.push(new n(h.format(S,e),{font:new o(20),maxWidth:y})),phet.chipper.buildTimestamp&&w.push(new n(phet.chipper.buildTimestamp,{font:new o(13),maxWidth:y})),f.areUpdatesChecked){var T={left:0,top:0},R=m.createCheckingNode(T),N=m.createUpToDateNode(T),_=m.createOutOfDateAboutNode(T),A=m.createOfflineNode(T);this.updateStepListener=R.stepListener,this.updateVisibilityListener=function(t){R.visible="checking"===t,N.visible="up-to-date"===t,_.visible="out-of-date"===t,A.visible="offline"===t},w.push(new r({children:[R,N,_,A],maxWidth:y}))}w.push(new l(15)),c.name&&w.push(new g(c.name,{font:new o(16),supScale:.5,supYOffset:2,maxWidth:y})),c.copyright&&w.push(new n(c.copyright,{font:new o(12),maxWidth:y})),c.additionalLicenseStatement&&w.push(new b(c.additionalLicenseStatement,{font:new o(10),fill:"gray",align:"left",maxWidth:y})),!s||"phet"!==c.id&&"phet-io"!==c.id||(w.push(new l(15)),w.push(new d(s,{maxWidth:y})));var P=c.getLinks(v.name,E);if(P&&P.length>0){w.push(new l(15));for(var x=0;x<P.length;x++){var k=P[x];w.push(new p(k.text,k.url,{font:new o(14),maxWidth:y}))}}var O=new i({align:"left",spacing:5,children:w});u.call(this,O,{modal:!0,hasCloseButton:!1,focusable:!0,accessibleContent:{createPeer:function(e){var i=u.DialogAccessiblePeer(e,C),n=e.trail,r=i.domElement,s=document.createElement("h1");return s.id="simName-"+n.uniqueId,s.innerText=t,r.appendChild(s),i}}}),this.addInputListener(new a({fire:C.hide.bind(C)}))}var i=t("SCENERY/nodes/VBox"),n=t("SCENERY/nodes/Text"),r=t("SCENERY/nodes/Node"),s=t("PHET_CORE/inherit"),a=t("SCENERY/input/ButtonListener"),o=t("SCENERY_PHET/PhetFont"),h=t("PHETCOMMON/util/StringUtils"),l=t("SCENERY/nodes/VStrut"),u=t("JOIST/Dialog"),c=t("PHET_CORE/Timer"),d=t("JOIST/CreditsNode"),m=t("JOIST/UpdateNodes"),f=t("JOIST/UpdateCheck"),p=t("JOIST/LinkText"),g=t("SCENERY_PHET/SubSupText"),b=t("SCENERY_PHET/MultiLineText"),v=t("JOIST/packageJSON"),E=t("JOIST/joist"),S=t("string!JOIST/versionPattern"),y=550;return E.register("AboutDialog",e),s(u,e,{show:function(){f.areUpdatesChecked&&(f.resetTimeout(),("offline"===f.state||"unchecked"===f.state)&&f.check(),c.addStepListener(this.updateStepListener),f.stateProperty.link(this.updateVisibilityListener)),u.prototype.show.call(this)},hide:function(){u.prototype.hide.call(this),f.areUpdatesChecked&&(f.stateProperty.unlink(this.updateVisibilityListener),c.removeStepListener(this.updateStepListener))}})}),i("string!JOIST/options.title",function(){return window.phet.chipper.strings.get("JOIST/options.title")}),i("JOIST/OptionsDialog",["require","SCENERY/nodes/Text","PHET_CORE/inherit","SCENERY_PHET/PhetFont","JOIST/Dialog","JOIST/joist","string!JOIST/options.title"],function(t){"use strict";function e(t){s.call(this,t,{title:new i(o,{font:new r(30)}),titleAlign:"center",modal:!0,hasCloseButton:!0})}var i=t("SCENERY/nodes/Text"),n=t("PHET_CORE/inherit"),r=t("SCENERY_PHET/PhetFont"),s=t("JOIST/Dialog"),a=t("JOIST/joist"),o=t("string!JOIST/options.title");return a.register("OptionsDialog",e),n(s,e,{},{DEFAULT_FONT:new r(15),DEFAULT_SPACING:10})}),i("JOIST/ScreenView",["require","SCENERY/nodes/Node","SCENERY/accessibility/AccessiblePeer","PHET_CORE/inherit","DOT/Bounds2","AXON/Events","JOIST/joist"],function(t){"use strict";function e(t){t=_.extend({layoutBounds:l.copy()},t),this.layoutBounds=t.layoutBounds,n.call(this,_.extend({layerSplit:!0,excludeInvisible:!0,accessibleContent:{createPeer:function(e){return new i(e,t.screenDescription,t.screenLabel)}}},t)),this.events=new o}function i(t,e,i){this.initialize(t,e,i)}var n=t("SCENERY/nodes/Node"),r=t("SCENERY/accessibility/AccessiblePeer"),s=t("PHET_CORE/inherit"),a=t("DOT/Bounds2"),o=t("AXON/Events"),h=t("JOIST/joist"),l=new a(0,0,1024,618);return h.register("ScreenView",e),s(n,e,{getLayoutScale:function(t,e){return Math.min(t/this.layoutBounds.width,e/this.layoutBounds.height)},layout:function(t,e){this.resetTransform();var i=this.getLayoutScale(t,e);this.setScaleMagnitude(i);var n=0,r=0;i===t/this.layoutBounds.width?r=(e/i-this.layoutBounds.height)/2:i===e/this.layoutBounds.height&&(n=(t/i-this.layoutBounds.width)/2),this.translate(n,r),this.events.trigger("layoutFinished",n,r,t/i,e/i,i)}},{DEFAULT_LAYOUT_BOUNDS:l,ScreenViewAccessiblePeer:function(t,e,n){return new i(t,e,n)}}),s(r,i,{initialize:function(t,e,i){var n=t.trail,r=n.getUniqueId();this.node=n.lastNode(),this.domElement=document.createElement("div"),this.domElement.className="ScreenView",this.initializeAccessiblePeer(t,this.domElement);var s=document.createElement("header");if(s.setAttribute("role","banner"),this.domElement.appendChild(s),i){var a=document.createElement("h1");a.id="scene-label-"+r,s.setAttribute("aria-labelledby",a.id),a.textContent=i,s.appendChild(a)}if(e){var o=document.createElement("div"),h=document.createElement("p");o.id="scene-descripion-"+r,s.setAttribute("aria-describedby",o.id),h.textContent=e,o.appendChild(h),s.appendChild(o)}this.containerDOMElement=document.createElement("main"),this.containerDOMElement.className="ScreenViewContainer",this.domElement.appendChild(this.containerDOMElement),this.visibilityListener=this.updateVisibility.bind(this),this.node.onStatic("visibility",this.visibilityListener),this.updateVisibility()},updateVisibility:function(){this.domElement.hidden=!this.node.visible},dispose:function(){r.prototype.dispose.call(this),this.node.offStatic("visibility",this.visibilityListener)}}),e}),i("SUN/CheckBox",["require","SCENERY/accessibility/AccessiblePeer","SCENERY/input/ButtonListener","SUN/FontAwesomeNode","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SUN/sun","SCENERY/nodes/Text"],function(t){"use strict";function e(t,n,a){this.checkBoxValueProperty=n,a=_.extend({spacing:5,boxWidth:21,cursor:"pointer",checkBoxColor:"black",checkBoxColorBackground:"white",tabIndex:"0",tandem:null,checkBoxAppearanceStrategy:e.fadeCheckBoxWhenDisabled,contentAppearanceStrategy:e.fadeContentWhenDisabled},a);var l=this;o.call(this),l.content=t,l.checkBoxAppearanceStrategy=a.checkBoxAppearanceStrategy,l.contentAppearanceStrategy=a.contentAppearanceStrategy,l._enabled=!0,l.backgroundNode=new h(0,-a.boxWidth,.95*a.boxWidth,.95*a.boxWidth,.2*a.boxWidth,.2*a.boxWidth,{fill:a.checkBoxColorBackground}),l.uncheckedNode=new s("check_empty",{fill:a.checkBoxColor});var u=a.boxWidth/l.uncheckedNode.width;l.uncheckedNode.scale(u),l.checkedNode=new s("check",{scale:u,fill:a.checkBoxColor}),this.checkBoxNode=new o({children:[l.backgroundNode,l.checkedNode,l.uncheckedNode]}),l.addChild(this.checkBoxNode),l.addChild(t),t.left=l.checkedNode.right+a.spacing,t.centerY=l.checkedNode.centerY,l.addChild(new h(l.left,l.top,l.width,l.height)),t.pickable=!1,this.fire=function(){if(l._enabled){var t=n.value,e=!n.value;l.trigger2("startedCallbacksForToggled",t,e),n.value=e,l.trigger0("endedCallbacksForToggled")}},this.checkBoxButtonListener=new r({fire:this.fire}),l.addInputListener(this.checkBoxButtonListener),this.checkBoxCheckedListener=function(t){l.checkedNode.visible=t,l.uncheckedNode.visible=!t,_.each(l.instances,function(e){_.each(e.peers,function(e){e.element.setAttribute("checked",t)})})},n.link(this.checkBoxCheckedListener),l.mutate(a),this.checkBoxTandem=a.tandem,this.checkBoxTandem&&this.checkBoxTandem.addInstance(this),this.setAccessibleContent({createPeer:function(t){var e=new i(t,n,l.fire,a.accessibleLabel,a.tabIndex);return l.accessibleId=e.id,e}})}function i(t,e,i,n,r){this.initialize(t,e,i,n,r)}var n=t("SCENERY/accessibility/AccessiblePeer"),r=t("SCENERY/input/ButtonListener"),s=t("SUN/FontAwesomeNode"),a=t("PHET_CORE/inherit"),o=t("SCENERY/nodes/Node"),h=t("SCENERY/nodes/Rectangle"),l=t("SUN/sun"),u=t("SCENERY/nodes/Text"),c=.3;return l.register("CheckBox",e),a(o,e,{dispose:function(){this.checkBoxTandem&&this.checkBoxTandem.removeInstance(this),this.checkBoxValueProperty.unlink(this.checkBoxCheckedListener),this.removeInputListener(this.checkBoxButtonListener)},setCheckBoxColorBackground:function(t){this.backgroundNode.fill=t},set checkBoxColorBackground(t){this.setCheckBoxColorBackground(t)},getCheckboxColorBackground:function(){return this.backgroundNode.fill},get checkBoxColorBackground(){return this.getCheckboxColorBackground()},setCheckBoxColor:function(t){this.checkedNode.fill=this.uncheckedNode.fill=t},set checkBoxColor(t){this.setCheckBoxColor(t)},getCheckboxColor:function(){this.checkedNode.fill},get checkBoxColor(){return this.getCheckboxColor()},setEnabled:function(t){this._enabled=this.pickable=t,this.checkBoxAppearanceStrategy(this.checkBoxNode,t),this.contentAppearanceStrategy(this.content,t)},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this._enabled},get enabled(){return this.getEnabled()}},{fadeCheckBoxWhenDisabled:function(t,e){t.opacity=e?1:c},fadeContentWhenDisabled:function(t,e){t.opacity=e?1:c},createTextCheckBox:function(t,i,n,r){i=i||{},r=_.extend({icon:null,iconSpacing:15},r);var s=new o,a=new u(t,i);return s.addChild(a),r.icon&&(s.addChild(r.icon),r.icon.left=a.right+r.iconSpacing,r.icon.centerY=a.centerY),new e(s,n,r)}}),a(n,i,{initialize:function(t,e,i,n,r){this.domElement=document.createElement("input"),this.initializeAccessiblePeer(t,this.domElement),this.domElement.type="checkbox",e.value&&(this.domElement.checked=!0),this.domElement.setAttribute("aria-label",n),this.domElement.tabIndex=r,this.domElement.addEventListener("click",function(){i()})},dispose:function(){}}),e}),i("string!JOIST/showPointers",function(){return window.phet.chipper.strings.get("JOIST/showPointers")}),i("string!JOIST/done",function(){return window.phet.chipper.strings.get("JOIST/done")}),i("string!JOIST/title.settings",function(){return window.phet.chipper.strings.get("JOIST/title.settings")}),i("JOIST/SettingsDialog",["require","SCENERY/nodes/VBox","SCENERY/nodes/Text","PHET_CORE/inherit","JOIST/ScreenView","SUN/Panel","SUN/CheckBox","SCENERY_PHET/PhetFont","SUN/buttons/TextPushButton","JOIST/joist","string!JOIST/showPointers","string!JOIST/done","string!JOIST/title.settings"],function(t){"use strict";function e(t){function e(){r.layout($(window).width(),$(window).height())}var r=this;s.call(this);var u=new i({align:"center",spacing:50,children:[new n(m,{font:new h(16)}),new o(new n(c,{font:new h(10)}),t),new l(d,{font:new h(20),listener:function(){r.doneListeners.forEach(function(t){t()})}})]});this.addChild(new a(u,{centerX:this.layoutBounds.centerX,centerY:this.layoutBounds.centerY,xMargin:20,yMargin:20})),$(window).resize(e),e(),this.doneListeners=[]}var i=t("SCENERY/nodes/VBox"),n=t("SCENERY/nodes/Text"),r=t("PHET_CORE/inherit"),s=t("JOIST/ScreenView"),a=t("SUN/Panel"),o=t("SUN/CheckBox"),h=t("SCENERY_PHET/PhetFont"),l=t("SUN/buttons/TextPushButton"),u=t("JOIST/joist"),c=t("string!JOIST/showPointers"),d=t("string!JOIST/done"),m=t("string!JOIST/title.settings");return u.register("SettingsDialog",e),r(s,e,{addDoneListener:function(t){this.doneListeners.push(t)}})}),i("JOIST/UpdateDialog",["require","SCENERY/nodes/Node","PHET_CORE/inherit","SCENERY/input/ButtonListener","JOIST/Dialog","PHET_CORE/Timer","JOIST/UpdateNodes","JOIST/UpdateCheck","JOIST/joist"],function(t){"use strict";function e(){function t(){var t=h.latestVersion?h.latestVersion.toString():"x.x.xx",e=h.ourVersion.toString();u.children=[o.createOutOfDateDialogNode(e,t,n)]}var e=this,n={centerX:0,centerY:0,big:!0},a=o.createCheckingNode(n),l=o.createUpToDateNode(n),u=new i,c=o.createOfflineNode(n);t(),this.updateStepListener=a.stepListener,this.updateVisibilityListener=function(e){"out-of-date"===e&&t(),a.visible="checking"===e,l.visible="up-to-date"===e,u.visible="out-of-date"===e,c.visible="offline"===e};var d=new i({children:[a,l,u,c]});s.call(this,d,{modal:!0,hasCloseButton:!1,focusable:!0}),this.addInputListener(new r({fire:e.hide.bind(e)}))}var i=t("SCENERY/nodes/Node"),n=t("PHET_CORE/inherit"),r=t("SCENERY/input/ButtonListener"),s=t("JOIST/Dialog"),a=t("PHET_CORE/Timer"),o=t("JOIST/UpdateNodes"),h=t("JOIST/UpdateCheck"),l=t("JOIST/joist");return l.register("UpdateDialog",e),n(s,e,{show:function(){h.areUpdatesChecked&&(h.resetTimeout(),("offline"===h.state||"unchecked"===h.state)&&h.check(),a.addStepListener(this.updateStepListener),h.stateProperty.link(this.updateVisibilityListener)),s.prototype.show.call(this)},hide:function(){s.prototype.hide.call(this),h.areUpdatesChecked&&(h.stateProperty.unlink(this.updateVisibilityListener),a.removeStepListener(this.updateStepListener))}})}),i("SCENERY/nodes/Plane",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t){r.call(this,-2e3,-2e3,6e3,6e3,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/nodes/Rectangle");return n.register("Plane",e),i(r,e)}),i("PHET_CORE/detectPrefixEvent",["require","PHET_CORE/phetCore"],function(t){"use strict";function e(t,e,i){return void 0!==t["on"+e]?e:void 0!==t["onmoz"+e]?"moz"+e:void 0!==t["onMoz"+e]?"Moz"+e:void 0!==t["onwebkit"+e]?"webkit"+e:void 0!==t["onms"+e]?"ms"+e:void 0!==t["ono"+e]?"o"+e:void 0}var i=t("PHET_CORE/phetCore");return i.register("detectPrefixEvent",e),e}),i("JOIST/FullScreen",["require","PHET_CORE/platform","PHET_CORE/detectPrefix","PHET_CORE/detectPrefixEvent","AXON/Property","JOIST/joist"],function(t){"use strict";var e=t("PHET_CORE/platform"),i=t("PHET_CORE/detectPrefix"),n=t("PHET_CORE/detectPrefixEvent"),r=t("AXON/Property"),s=t("JOIST/joist"),a=i(document.body,"requestFullscreen")||i(document.body,"requestFullScreen"),o=i(document,"exitFullscreen")||i(document,"cancelFullScreen"),h=i(document,"fullscreenElement")||i(document,"fullScreenElement"),l=i(document,"fullscreenEnabled")||i(document,"fullScreenEnabled"),u=n(document,"fullscreenchange");"msfullscreenchange"===u&&(u="MSFullscreenChange");var c={isFullScreen:function(){return!!document[h]},isFullScreenEnabled:function(){return document[l]&&!e.safari7},enterFullScreen:function(t){if(e.ie9||e.ie10){if("undefined"!=typeof window.ActiveXObject){var i=new window.ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}}else t.display.domElement[a]&&t.display.domElement[a]()},exitFullScreen:function(){document[o]&&document[o]()},toggleFullScreen:function(t){c.isFullScreen()?c.exitFullScreen():c.enterFullScreen(t)},isFullScreenProperty:new r(!1)};return document.addEventListener(u,function(t){c.isFullScreenProperty.set(c.isFullScreen())}),s.register("FullScreen",c),c}),i("JOIST/ScreenshotGenerator",["require","PHET_CORE/inherit","SCENERY/util/CanvasContextWrapper","JOIST/joist"],function(t){"use strict";function e(){}var i=t("PHET_CORE/inherit"),n=t("SCENERY/util/CanvasContextWrapper"),r=t("JOIST/joist");return r.register("ScreenshotGenerator",e),i(Object,e,{},{generateScreenshot:function(t,e){e=e||"image/png";var i=document.createElement("canvas");i.width=t.display.width,i.height=t.display.height;var r=i.getContext("2d");r.fillStyle=t.display.domElement.style.backgroundColor,r.fillRect(0,0,i.width,i.height);var s=new n(i,r);if(t.showHomeScreen)t.homeScreen.view.renderToCanvasSubtree(s,t.homeScreen.view.getLocalToGlobalMatrix());else{var a=t.screens[t.screenIndex].view,o=t.navigationBar;a.renderToCanvasSubtree(s,a.getLocalToGlobalMatrix()),o.renderToCanvasSubtree(s,o.getLocalToGlobalMatrix())}var h=i.toDataURL(e);return h}})}),i("string!JOIST/menuItem.options",function(){return window.phet.chipper.strings.get("JOIST/menuItem.options")}),i("string!JOIST/menuItem.about",function(){return window.phet.chipper.strings.get("JOIST/menuItem.about")}),i("string!JOIST/menuItem.mailInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.mailInputEventsLog")}),i("string!JOIST/menuItem.outputInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.outputInputEventsLog")}),i("string!JOIST/menuItem.phetWebsite",function(){return window.phet.chipper.strings.get("JOIST/menuItem.phetWebsite")}),i("string!JOIST/menuItem.reportAProblem",function(){return window.phet.chipper.strings.get("JOIST/menuItem.reportAProblem")}),i("string!JOIST/menuItem.screenshot",function(){return window.phet.chipper.strings.get("JOIST/menuItem.screenshot")}),i("string!JOIST/menuItem.fullscreen",function(){return window.phet.chipper.strings.get("JOIST/menuItem.fullscreen")}),i("string!JOIST/menuItem.settings",function(){return window.phet.chipper.strings.get("JOIST/menuItem.settings")}),i("string!JOIST/menuItem.getUpdate",function(){return window.phet.chipper.strings.get("JOIST/menuItem.getUpdate")}),i("string!JOIST/menuItem.submitInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.submitInputEventsLog")}),i("JOIST/PhetMenu",["require","PHET_CORE/platform","SCENERY/nodes/Node","KITE/Shape","SCENERY/nodes/Path","SCENERY/nodes/Text","PHET_CORE/inherit","JOIST/AboutDialog","JOIST/OptionsDialog","JOIST/SettingsDialog","JOIST/UpdateDialog","SCENERY/nodes/Rectangle","SCENERY/input/ButtonListener","SCENERY/nodes/Plane","SCENERY_PHET/PhetFont","JOIST/FullScreen","BRAND/Brand","SUN/FontAwesomeNode","JOIST/ScreenshotGenerator","JOIST/UpdateCheck","SCENERY/accessibility/AccessiblePeer","JOIST/joist","string!JOIST/menuItem.options","string!JOIST/menuItem.about","string!JOIST/menuItem.mailInputEventsLog","string!JOIST/menuItem.outputInputEventsLog","string!JOIST/menuItem.phetWebsite","string!JOIST/menuItem.reportAProblem","string!JOIST/menuItem.screenshot","string!JOIST/menuItem.fullscreen","string!JOIST/menuItem.settings","string!JOIST/menuItem.getUpdate","string!JOIST/menuItem.submitInputEventsLog"],function(t){"use strict";function e(t,e){var o="phet"===b.id,d=b.isPhetApp;e=_.extend({showSaveAndLoad:!1,tandem:null},e);var m=this;n.call(m);var v,C=[{text:w,present:!!t.options.optionsNode,callback:function(){new l(t.options.optionsNode).show()}},{text:A,tandem:e.tandem&&e.tandem.createTandem("phetWebsiteButton"),present:o,callback:function(){var e=window.open("http://phet.colorado.edu/"+t.locale,"_blank");e.focus()}},{text:N,present:!!t.options.recordInputEventLog,callback:function(){console.log(t.getRecordedInputEventLogString())}},{text:I,present:!!t.options.recordInputEventLog,callback:function(){t.submitEventLog()}},{text:R,present:!!t.options.recordInputEventLog,callback:function(){t.mailEventLog()}},{text:O,present:!1,callback:function(){var e=new u(t.showPointersProperty),i=new f({fill:"black",opacity:.3});t.addChild(i),t.addChild(e),e.addDoneListener(function(){i.detach(),e.detach()})}},{text:P,present:o&&!d,callback:function(){var e=phet.chipper.dependencies?JSON.parse(JSON.stringify(phet.chipper.dependencies)):{};delete e.comment;for(var i in e)e[i].sha&&(e[i].sha=e[i].sha.substring(0,8));var n="http://phet.colorado.edu/files/troubleshooting/?sim="+encodeURIComponent(t.name)+"&version="+encodeURIComponent(t.version+" "+(phet.chipper.buildTimestamp?phet.chipper.buildTimestamp:"(require.js)"))+"&url="+encodeURIComponent(window.location.href)+"&dependencies="+encodeURIComponent(JSON.stringify(e)),r=window.open(n,"_blank");r.focus()},tandem:e.tandem&&e.tandem.createTandem("reportAProblemButton")},{text:"QR code",present:phet.chipper.getQueryParameter("qrCode"),callback:function(){var t=window.open("http://api.qrserver.com/v1/create-qr-code/?data="+encodeURIComponent(window.location.href)+"&size=220x220&margin=0","_blank");t.focus()},tandem:e.tandem&&e.tandem.createTandem("qrCode")},{text:D,present:S.areUpdatesChecked,color:"out-of-date"===S.state?"#0a0":"#000",callback:function(){(new c).show()},tandem:e.tandem&&e.tandem.createTandem("getUpdate")},{text:x,present:!i.ie9&&!d,callback:function(){var e=E.generateScreenshot(t);if(window.Blob&&new window.Blob){for(var i="data:image/png;base64,",n=e.slice(i.length),r=window.atob(n),s=new window.Uint8Array(r.length),a=0;a<s.length;a++)s[a]=r.charCodeAt(a);var o=new window.Blob([s],{type:"image/png"}),h=t.name+" screenshot.png";window.saveAs(o,h)}else window.open(e,"_blank","")}},{text:k,present:g.isFullScreenEnabled()&&!d,checkedProperty:g.isFullScreenProperty,callback:function(){g.toggleFullScreen(t)},tandem:e.tandem&&e.tandem.createTandem("fullScreenButton")},{text:T,present:!0,separatorBefore:o,callback:function(){new h(t.name,t.version,t.credits,b,t.locale).show()},tandem:e.tandem&&e.tandem.createTandem("aboutButton")}],Y=_.filter(C,function(t){return t.present}),M=_.map(Y,function(t){return new a(t.text,{font:new p(B),maxWidth:L})}),H=_.max(M,function(t){return t.width}).width,j=_.max(M,function(t){return t.height}).height,z=this.items=_.map(Y,function(t){return F(t.text,H,j,t.separatorBefore,e.closeCallback,t.callback,t.checkedProperty,{tandem:t.tandem,color:t.color})}),U=_.max(z,function(t){return t.width}).width,G=_.max(z,function(t){return t.height}).height,q=new n,W=0,X=2;_.each(z,function(t){t.separatorBefore&&z[0]!==t&&(W+=X,v=new s(r.lineSegment(0,W,U,W),{stroke:"gray",lineWidth:1}),q.addChild(v),W=W+v.height+X),t.top=W,q.addChild(t),W+=G});var J=5,K=5,Q=V(q.width+J+J,q.height+K+K);m.addChild(Q),m.addChild(q),q.left=J,q.top=K,this.accessibleContent={createPeer:function(t){var e=document.createElement("div");return e.className="PhetMenu",e.tabIndex="-1",e.addEventListener("keydown",function(t){27===t.keyCode&&m.exitMenu()}),m.dispose(),new y(t,e)}},this.isShowing=!1,e.tandem&&e.tandem.addInstance(this),this.disposePhetMenu=function(){e.tandem&&e.tandem.removeInstance(this)}}var i=t("PHET_CORE/platform"),n=t("SCENERY/nodes/Node"),r=t("KITE/Shape"),s=t("SCENERY/nodes/Path"),a=t("SCENERY/nodes/Text"),o=t("PHET_CORE/inherit"),h=t("JOIST/AboutDialog"),l=t("JOIST/OptionsDialog"),u=t("JOIST/SettingsDialog"),c=t("JOIST/UpdateDialog"),d=t("SCENERY/nodes/Rectangle"),m=t("SCENERY/input/ButtonListener"),f=t("SCENERY/nodes/Plane"),p=t("SCENERY_PHET/PhetFont"),g=t("JOIST/FullScreen"),b=t("BRAND/Brand"),v=t("SUN/FontAwesomeNode"),E=t("JOIST/ScreenshotGenerator"),S=t("JOIST/UpdateCheck"),y=t("SCENERY/accessibility/AccessiblePeer"),C=t("JOIST/joist"),w=t("string!JOIST/menuItem.options"),T=t("string!JOIST/menuItem.about"),R=t("string!JOIST/menuItem.mailInputEventsLog"),N=t("string!JOIST/menuItem.outputInputEventsLog"),A=t("string!JOIST/menuItem.phetWebsite"),P=t("string!JOIST/menuItem.reportAProblem"),x=t("string!JOIST/menuItem.screenshot"),k=t("string!JOIST/menuItem.fullscreen"),O=t("string!JOIST/menuItem.settings"),D=t("string!JOIST/menuItem.getUpdate"),I=t("string!JOIST/menuItem.submitInputEventsLog"),B=18,Y="#a6d2f4",L=400,M=new v("check_without_box",{fill:"rgba(0,0,0,0.7)",scale:.4}),F=function(t,e,i,r,s,o,h,l){l=_.extend({tandem:null,color:"#000"},l);var u=2,c=M.width+u,f=2,g=5,b=3,v=5,E=new a(t,{font:new p(B),fill:l.color,maxWidth:L}),S=new d(0,0,e+f+g+c,i+b+b,v,v),C=new n({cursor:"pointer",focusable:!0,textDescription:t+" Button"});C.addChild(S),C.addChild(E),E.left=S.left+f+c,E.centerY=S.centerY,C.addInputListener({enter:function(){S.fill=Y},exit:function(){S.fill=null}});var w=function(t){C.trigger0("startedCallbacksForFired"),s(t),o(t),C.trigger0("endedCallbacksForFired")};C.addInputListener(new m({fire:w})),C.separatorBefore=r;var T;if(h){var R=new n({children:[M],right:E.left-u,centerY:E.centerY});T=function(t){R.visible=t},h.link(T),C.addChild(R)}return C.dispose=function(){h&&h.unlink(T),l.tandem&&l.tandem.removeInstance(C)},l.tandem&&l.tandem.addInstance(C),C.accessibleContent={id:t,createPeer:function(e){var i=document.createElement("input");return i.type="button",i.value=t,i.tabIndex="0",i.className="phetMenuItem",i.addEventListener("click",function(){w();var t=document.getElementsByClassName("Dialog")[0];if(t)t.focus();else{var e=document.getElementsByClassName("ScreenView");_.each(e,function(t){t.hidden=!1}),document.getElementsByClassName("PhetButton")[0].hidden=!1}}),new y(e,i)}},C},V=function(t,e){var i=new d(0,0,t,e,8,8,{fill:"white",lineWidth:1,stroke:"black"}),a=new r;a.moveTo(t-20,e-2),a.lineToRelative(0,20),a.lineToRelative(-20,-20),a.close();var o=new r;o.moveTo(t-20,e),o.lineToRelative(0,18),o.lineToRelative(-18,-18);var h=new n;return h.addChild(i),h.addChild(new s(a,{fill:"white"})),h.addChild(new s(o,{stroke:"black",lineWidth:1})),h};return C.register("PhetMenu",e),o(n,e,{exitMenu:function(){var t=document.getElementsByClassName("screenView");_.each(t,function(t){t.hidden=!1}),document.getElementsByClassName("PhetButton")[0].hidden=!1,this.hide()},show:function(){this.isShowing||(window.phet.joist.sim.showPopup(this,!0),this.isShowing=!0)},hide:function(){this.isShowing&&(this.isShowing=!1,this.dispose(),window.phet.joist.sim.hidePopup(this,!0))},dispose:function(){this.disposePhetMenu(),_.each(this.items,function(t){t.dispose()})}}),e}),i("../../chipper/js/requirejs-plugins/getProjectURL",[],function(){"use strict";return function(t,e){var i=e.toUrl(t.substring(0,t.indexOf("/")));return(i.indexOf("?")>=0?i.substring(0,i.indexOf("?")):i)+"/../"}}),function(t){"use strict";function e(t,e){function i(t,e){return c>t&&u>e}function n(t,e){if(!i(t,e))return[0,0,0,0];var n=4*(t*u+e);return[Math.pow(d[n+s]/255,l),Math.pow(d[n+a]/255,l),Math.pow(d[n+o]/255,l),Math.pow(d[n+h]/255,l)]}function r(t,e){return 4*(t*m+e)}for(var s=0,a=1,o=2,h=3,l=2.2,u=t.width,c=t.height,d=t.data,m=Math.ceil(u/2),f=Math.ceil(c/2),p=e(m,f),g=0;c>g;g++)for(var b=0;u>b;b++){var v=n(2*g,2*b),E=n(2*g,2*b+1),S=n(2*g+1,2*b),y=n(2*g+1,2*b+1),C=[0,0,0,0],w=v[h]+E[h]+S[h]+y[h];C[s]=(v[s]*v[h]+E[s]*E[h]+S[s]*S[h]+y[s]*y[h])/w,C[a]=(v[a]*v[h]+E[a]*E[h]+S[a]*S[h]+y[a]*y[h])/w,C[o]=(v[o]*v[h]+E[o]*E[h]+S[o]*S[h]+y[o]*y[h])/w,C[h]=w/4;var T=r(g,b);p[T+s]=Math.floor(255*Math.pow(C[s],1/l)),p[T+a]=Math.floor(255*Math.pow(C[a],1/l)),p[T+o]=Math.floor(255*Math.pow(C[o],1/l)),p[T+h]=Math.floor(255*Math.pow(C[h],1/l))}return{data:p,width:m,height:f}}t.define&&t.define(function(){return e}),"undefined"!=typeof module&&(module.exports=e)}(this),i("../../chipper/js/common/mipmapDownscale",function(){}),i("../../chipper/js/requirejs-plugins/registerLicenseEntry",[],function(){"use strict";function t(t,e){return"phet"===e||"phet-io"===e?t&&("http://phet.colorado.edu"===t.projectURL||"Public Domain"===t.license||"NASA"===t.license):!0}function e(e,i,n){var r=t(i,n)||i&&!!i.exception;if(r&&i&&i.exception){var s="license exception for "+e+": "+i.exception;global.phet.chipper.grunt?global.phet.chipper.grunt.log.warn(s):console.log("WARNING: "+s)}return r}function i(t,i,n,r,s){e(t,i,n)?(global.phet.chipper.licenseEntries=global.phet.chipper.licenseEntries||{},global.phet.chipper.licenseEntries[r]=global.phet.chipper.licenseEntries[r]||{},global.phet.chipper.licenseEntries[r][t]=i,s(null)):s.error(new Error("unacceptable license entry for "+t))}return i}),function(){"use strict";function t(t){var e=t.lastIndexOf("/"),i=t.substring(0,e),n=i+"/license.json",r=t.substring(e+1),s=JSON.parse(global.phet.chipper.fs.readFileSync(n,"utf8")),a=s[r];return a?a:null}"undefined"!=typeof i&&i("../../chipper/js/common/getLicenseEntry",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),i("mipmap",{load:function(t){throw new Error("Dynamic load not allowed: "+t)}}),i("mipmap!BRAND/logo.png",function(){var t=window.phet.chipper.mipmaps["BRAND/logo.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url}),t}),i("mipmap!BRAND/logo-on-white.png",function(){var t=window.phet.chipper.mipmaps["BRAND/logo-on-white.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url}),t}),i("string!JOIST/PhetButton.name",function(){return window.phet.chipper.strings.get("JOIST/PhetButton.name")}),i("JOIST/PhetButton",["require","JOIST/AdaptedFromText","BRAND/Brand","SCENERY/nodes/Node","SCENERY/nodes/Image","SUN/FontAwesomeNode","PHET_CORE/inherit","JOIST/PhetMenu","AXON/Property","JOIST/JoistButton","JOIST/UpdateCheck","SCENERY/accessibility/AccessiblePeer","SCENERY/util/TransformTracker","JOIST/joist","mipmap!BRAND/logo.png","mipmap!BRAND/logo-on-white.png","string!JOIST/PhetButton.name"],function(t){"use strict";function e(t,e,i,h){h=_.extend({textDescription:"PhET Menu Button",highlightExtensionWidth:6,highlightExtensionHeight:5,highlightCenterOffsetY:4,tandem:null,listener:function(){function e(t,e,n){i.right=t.right/n-2/n;var r=t.height-e.height;i.bottom=e.bottom/n+r/2/n}var i=new l(t,{showSaveAndLoad:t.options.showSaveAndLoad,tandem:h.tandem&&h.tandem.createTandem("phetMenu"),closeCallback:function(){i.isShowing=!1,t.hidePopup(i,!0),i.dispose()}});t.on("resized",e),e(t.bounds,t.screenBounds,t.scale),i.show()}},h);var m=new a(g,{scale:y,pickable:!1}),f=new o("reorder",{scale:.6,left:m.width+10,bottom:m.bottom-1.5,pickable:!1}),p=new s({children:[m,f]});c.call(this,p,e,h),"adapted-from-phet"===r.id&&this.addChild(new n(i,{pickable:!1,right:p.left-10,centerY:p.centerY})),u.multilink([e,t.showHomeScreenProperty,d.stateProperty],function(t,e,i){var n="black"!==t&&!e,r="out-of-date"===i;f.fill=n?r?"#0a0":"#222":r?"#3F3":"white",m.image=n?b:g})}function i(t,e){
this.initialize(t,e)}var n=t("JOIST/AdaptedFromText"),r=t("BRAND/Brand"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Image"),o=t("SUN/FontAwesomeNode"),h=t("PHET_CORE/inherit"),l=t("JOIST/PhetMenu"),u=t("AXON/Property"),c=t("JOIST/JoistButton"),d=t("JOIST/UpdateCheck"),m=t("SCENERY/accessibility/AccessiblePeer"),f=t("SCENERY/util/TransformTracker"),p=t("JOIST/joist"),g=t("mipmap!BRAND/logo.png"),b=t("mipmap!BRAND/logo-on-white.png"),v=t("string!JOIST/PhetButton.name"),E=108,S=.28,y=S/g[0].height*E;return p.register("PhetButton",e),h(c,e,{},{HORIZONTAL_INSET:5,VERTICAL_INSET:0,linkPhetButtonTransform:function(t,e,i){function n(){r.matrix=a.matrix.inverted().timesMatrix(s.matrix)}var r=t.view.phetButton,s=new f(e.phetButton.getUniqueTrailTo(i),{isStatic:!0}),a=new f(r.getParent().getUniqueTrailTo(i),{isStatic:!0});s.addListener(n),a.addListener(n),n()}}),h(m,i,{initialize:function(t,e){this.domElement=document.createElement("input"),this.domElement.type="button",this.domElement.value=v,this.domElement.tabIndex="0",this.domElement.className="PhetButton",this.initializeAccessiblePeer(t,this.domElement),this.domElement.addEventListener("click",function(){this.hidden=!0;var t=document.getElementsByClassName("screenView");_.each(t,function(t){t.hidden=!0}),e(),document.getElementsByClassName("phetMenuItem")[0].focus()})},dispose:function(){}}),e}),i("JOIST/Frame",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY/util/LinearGradient","JOIST/joist"],function(t){"use strict";function e(t,e){e=_.extend({xMargin1:6,yMargin1:6,cornerRadius:0},e),n.call(this);var i=t.width+2*e.xMargin1,a=t.height+2*e.yMargin1;this.gradient=new s(0,0,i,0).addColorStop(0,"#fbff41").addColorStop(.1475,"#fef98b").addColorStop(.465,"#feff40").addColorStop(.77,"#fffccd").addColorStop(1,"#fbff41"),this.rectangle=new r(0,0,i,a,e.cornerRadius,e.cornerRadius,{stroke:this.gradient,lineWidth:3,x:t.x-e.xMargin1,y:t.y-e.yMargin1}),this.addChild(this.rectangle),this.mutate(e),this.frameWidth=i,this.frameHeight=a}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Rectangle"),s=t("SCENERY/util/LinearGradient"),a=t("JOIST/joist");return a.register("Frame",e),i(n,e,{setHighlighted:function(t){this.rectangle.lineWidth=t?4.5:3,t?this.rectangle.setRect(-0.75,-0.75,this.frameWidth+1.5,this.frameHeight+1.5):this.rectangle.setRect(0,0,this.frameWidth,this.frameHeight)}}),e}),i("JOIST/HomeScreenView",["require","JOIST/PhetButton","SCENERY/nodes/Node","SCENERY/nodes/HBox","SCENERY/nodes/VBox","SCENERY/nodes/Text","KITE/Shape","PHET_CORE/inherit","JOIST/ScreenView","JOIST/Frame","AXON/Property","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","DOT/Bounds2","JOIST/joist","SCENERY/accessibility/AccessiblePeer"],function(t){"use strict";function e(t,e){var h=this;e=_.extend({showSmallHomeScreenIconFrame:!1,warningNode:null,tandem:null},e),l.call(this,{layoutBounds:E});var f=new a(t.name,{font:new d({size:52,family:v}),fill:"white",y:110});this.addChild(f),f.scale(Math.min(1,.9*this.layoutBounds.width/f.width)),f.centerX=this.layoutBounds.centerX;var p=new c(-1),S=_.map(t.screens,function(i){var r=t.screens.indexOf(i),h=new n({children:[i.homeScreenIcon],scale:b/i.homeScreenIcon.height*2}),l=new u(h);p.link(function(t){l.setHighlighted(t===r)});var c=new n({children:[l,h]}),f=new a(i.name,{font:new d(42),fill:"#f2e916"});f.width>c.width&&f.scale(c.width/f.width);var v=function(){E.trigger0("startedCallbacksForFired"),t.showHomeScreen=!1,p.value=-1,E.trigger0("endedCallbacksForFired")},E=new s({resize:!1,cursor:"pointer",children:[c,f],focusable:!0,textDescription:i.name+" Screen: Button",accessibleContent:{createPeer:function(t){var e=document.createElement("input");return e.setAttribute("type","button"),e.setAttribute("value",i.name),e.id="largeButton-"+r,e.tabIndex="0",e.addEventListener("click",function(){v()}),new g(t,e)}}});e.tandem&&e.tandem.createTandem(i.tandem.tail+"LargeButton").addInstance(E),E.addInputListener({down:function(){v()}});var S=new n({opacity:.5,children:[i.homeScreenIcon],scale:4===t.screens.length?1*b/i.homeScreenIcon.height:3===t.screens.length?1.25*b/i.homeScreenIcon.height:2===t.screens.length?1.75*b/i.homeScreenIcon.height:b/i.homeScreenIcon.height}),y=new m(0,0,S.width,S.height,{stroke:e.showSmallHomeScreenIconFrame?"#dddddd":null,lineWidth:.7}),C=new n({opacity:.5,children:[y,S]}),w=new a(i.name,{font:new d(18),fill:"gray"});w.width>C.width&&w.scale(C.width/w.width);var T=function(){R.trigger0("startedCallbacksForFired"),t.screenIndex=r,R.trigger0("endedCallbacksForFired")},R=new s({spacing:3,cursor:"pointer",children:[C,w],focusable:!0,textDescription:i.name+" Screen: Button",accessibleContent:{createPeer:function(t){var e=document.createElement("input");return e.setAttribute("type","button"),e.setAttribute("value",i.name),e.tabIndex="0",e.id="smallButton-"+r,e.addEventListener("focus",function(){T(),document.getElementById("largeButton-"+r).focus()}),new g(t,e)}}});R.mouseArea=R.touchArea=o.bounds(R.bounds),R.addInputListener({down:function(t){T()},over:function(e){e.pointer.isTouch&&(t.screenIndex=r)}}),e.tandem&&e.tandem.createTandem(i.tandem.tail+"SmallButton").addInstance(R);var N={over:function(t){p.value=r,R.children[0].opacity=1,R.children[1].fill="white"},out:function(t){p.value=-1,R.children[0].opacity=.5,R.children[1].fill="gray"}};return R.addInputListener(N),E.addInputListener(N),E.mouseArea=E.touchArea=o.bounds(E.bounds),{screen:i,small:R,large:E,index:r}}),y=new n({y:170});h.addChild(y),t.screenIndexProperty.link(function(e){var i=2===t.screens.length?60:3===t.screens.length?60:33,n=_.map(S,function(t){return t.index===e?t.large:t.small});y.children=[new r({spacing:i,children:n,align:"top",resize:!1})],y.centerX=h.layoutBounds.width/2});var C=new c("black"),w=new c("white");if(this.phetButton=new i(t,C,w,{tandem:e.tandem?e.tandem.createTandem("phetButton"):null}),this.addChild(this.phetButton),e.warningNode){var T=e.warningNode;this.addChild(T),T.centerX=this.layoutBounds.centerX,T.bottom=this.layoutBounds.maxY-20}}var i=t("JOIST/PhetButton"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/HBox"),s=t("SCENERY/nodes/VBox"),a=t("SCENERY/nodes/Text"),o=t("KITE/Shape"),h=t("PHET_CORE/inherit"),l=t("JOIST/ScreenView"),u=t("JOIST/Frame"),c=t("AXON/Property"),d=t("SCENERY_PHET/PhetFont"),m=t("SCENERY/nodes/Rectangle"),f=t("DOT/Bounds2"),p=t("JOIST/joist"),g=t("SCENERY/accessibility/AccessiblePeer"),b=70,v="Century Gothic, Futura",E=new f(0,0,768,504);return p.register("HomeScreenView",e),h(l,e,{},{TITLE_FONT_FAMILY:v,LAYOUT_BOUNDS:E})}),i("JOIST/Screen",["require","PHET_CORE/inherit","AXON/PropertySet","DOT/Dimension2","SCENERY/util/Color","KITE/Shape","SCENERY/nodes/Path","JOIST/joist"],function(t){"use strict";function e(t,e,i,r,a){a=_.extend({backgroundColor:"white",navigationBarIcon:e},a),a.tandem&&(this.tandem=a.tandem);var o=a.backgroundColor;"string"==typeof o&&(o=new s(o)),n.call(this,{backgroundColor:o}),this.name=t,this.homeScreenIcon=e,this.navigationBarIcon=a.navigationBarIcon,this.createModel=i,this.createView=r,this._model=null,this._view=null}var i=t("PHET_CORE/inherit"),n=t("AXON/PropertySet"),r=t("DOT/Dimension2"),s=t("SCENERY/util/Color"),a=t("KITE/Shape"),o=t("SCENERY/nodes/Path"),h=t("JOIST/joist"),l=function(t){return new o(a.bounds(t),{stroke:"red",lineWidth:3,pickable:!1})};return h.register("Screen",e),i(n,e,{get model(){return this._model},get view(){return this._view},initializeModel:function(){this._model=this.createModel()},initializeView:function(){this._view=this.createView(this.model),phet.chipper.getQueryParameter("dev")&&this._view.addChild(l(this._view.layoutBounds))},initializeModelAndView:function(){this.initializeModel(),this.initializeView()}},{HOME_SCREEN_ICON_SIZE:new r(548,373),NAVBAR_ICON_SIZE:new r(147,100)})}),i("JOIST/NavigationBar",["require","DOT/Dimension2","JOIST/HomeButton","PHET_CORE/inherit","JOIST/NavigationBarScreenButton","JOIST/HomeScreenView","SCENERY/nodes/Node","JOIST/PhetButton","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","JOIST/Screen","SCENERY/nodes/Text","JOIST/joist"],function(t){"use strict";function e(t,e,i){if(i=_.extend({tandem:null},i),e.length>1)for(var r=c.NAVBAR_ICON_SIZE.width/c.NAVBAR_ICON_SIZE.height,m=c.HOME_SCREEN_ICON_SIZE.width/c.HOME_SCREEN_ICON_SIZE.height,w=0;w<e.length;w++){var T=e[w],R=T.navigationBarIcon.width/T.navigationBarIcon.height,N=.001;Math.abs(R-r)<N||Math.abs(R-m)<N}this.screens=e,o.call(this),this.background=new u(0,0,f.width,f.height,{pickable:!0}),t.lookAndFeel.navigationBarFillProperty.linkAttribute(this.background,"fill"),this.addChild(this.background),this.barContents=new o,this.addChild(this.barContents);var A=new d(t.name,{font:new l(18)});if(t.lookAndFeel.navigationBarTextFillProperty.linkAttribute(A,"fill"),this.barContents.addChild(A),this.phetButton=new h(t,t.lookAndFeel.navigationBarFillProperty,t.lookAndFeel.navigationBarTextFillProperty,{tandem:i.tandem?i.tandem.createTandem("phetButton"):null}),this.barContents.addChild(this.phetButton),1===e.length)A.maxWidth=a.LAYOUT_BOUNDS.width-p-g-this.phetButton.width-v;else{var P=Math.min(A.width,.25*a.LAYOUT_BOUNDS.width);this.homeButton=new n(f.height,t.lookAndFeel.navigationBarFillProperty,{listener:function(){t.showHomeScreen=!0},tandem:i.tandem&&i.tandem.createTandem("homeButton")}),this.barContents.addChild(this.homeButton);for(var x=a.LAYOUT_BOUNDS.width/2-p-P-g,k=a.LAYOUT_BOUNDS.width/2-S-this.homeButton.width-b-this.phetButton.width-v,O=2*Math.min(x,k),D=(O-(e.length-1)*y)/e.length,I=_.map(e,function(e){return new s(t.lookAndFeel.navigationBarFillProperty,t.screenIndexProperty,t.screens,e,f.height,{maxButtonWidth:D,tandem:i.tandem&&i.tandem.createTandem(e.tandem.tail+"Button")})}),B=Math.max(C,_.max(I,function(t){return t.width}).width),Y=B+y,L=0;L<I.length;L++)I[L].centerX=Y*(L-(I.length-1)/2);this.screenButtonsContainer=new o({children:I,x:this.background.centerX,centerY:this.background.centerY,maxWidth:O}),this.barContents.addChild(this.screenButtonsContainer),this.accessibleOrder=[this.screenButtonsContainer,this.homeButton],A.maxWidth=this.screenButtonsContainer.left-p-g}A.left=p,A.centerY=f.height/2,this.phetButton.bottom=f.height-E,1!==this.screens.length&&(this.screenButtonsContainer.centerY=f.height/2,this.homeButton.centerY=f.height/2),this.layout(1,f.width,f.height)}var i=t("DOT/Dimension2"),n=t("JOIST/HomeButton"),r=t("PHET_CORE/inherit"),s=t("JOIST/NavigationBarScreenButton"),a=t("JOIST/HomeScreenView"),o=t("SCENERY/nodes/Node"),h=t("JOIST/PhetButton"),l=t("SCENERY_PHET/PhetFont"),u=t("SCENERY/nodes/Rectangle"),c=t("JOIST/Screen"),d=t("SCENERY/nodes/Text"),m=t("JOIST/joist"),f=new i(a.LAYOUT_BOUNDS.width,40),p=10,g=25,b=g,v=h.HORIZONTAL_INSET,E=h.VERTICAL_INSET,S=8,y=0,C=60;return m.register("NavigationBar",e),r(o,e,{layout:function(t,e,i){this.background.rectWidth=e,this.background.rectHeight=i,this.barContents.setScaleMagnitude(t);var n;n=f.width*t<e?e/t:f.width,this.phetButton.right=n-v,1!==this.screens.length&&(this.screenButtonsContainer.x=n/2,this.homeButton.left=this.screenButtonsContainer.right+S)}},{NAVIGATION_BAR_SIZE:f})}),i("JOIST/HomeScreen",["require","PHET_CORE/inherit","JOIST/Screen","JOIST/HomeScreenView","JOIST/joist"],function(t){"use strict";function e(t,e){e=_.extend({backgroundColor:"black"},e),n.call(this,null,null,function(){return{}},function(){return new r(t,e)},e)}var i=t("PHET_CORE/inherit"),n=t("JOIST/Screen"),r=t("JOIST/HomeScreenView"),s=t("JOIST/joist");return s.register("HomeScreen",e),i(n,e)}),i("AXON/ObservableArray",["require","AXON/Property","AXON/axon","PHET_CORE/inherit","AXON/Emitter"],function(t){"use strict";function e(t,e){t instanceof Object&&!(t instanceof Array)&&(e=t,t=null),this._options=_.extend({allowDuplicates:!1,tandem:null},e),this._array=t||[],this._addedListeners=[],this._removedListeners=[],this.lengthProperty=new i(this._array.length),this.initialArray=t?t.slice():[],this.startedCallbacksForItemAddedEmitter=new s,this.endedCallbacksForItemAddedEmitter=new s,this.startedCallbacksForItemRemovedEmitter=new s,this.endedCallbacksForItemRemovedEmitter=new s,e&&e.tandem&&e.tandem.addInstance(this),this.disposeObservableArray=function(){e&&e.tandem&&e.tandem.removeInstance(this)}}var i=t("AXON/Property"),n=t("AXON/axon"),r=t("PHET_CORE/inherit"),s=t("AXON/Emitter");return n.register("ObservableArray",e),r(Object,e,{dispose:function(){this.disposeObservableArray()},reset:function(){for(var t=0;t<this._array.length;t++)this._fireItemRemoved(this._array[t]);for(this._array=this.initialArray.slice(),t=0;t<this._array.length;t++)this._fireItemAdded(this._array[t])},get length(){return this._array.length},addItemAddedListener:function(t){this._addedListeners.push(t)},removeItemAddedListener:function(t){var e=this._addedListeners.indexOf(t);this._addedListeners.splice(e,1)},addItemRemovedListener:function(t){this._removedListeners.push(t)},removeItemRemovedListener:function(t){var e=this._removedListeners.indexOf(t);this._removedListeners.splice(e,1)},addListeners:function(t,e){this.addItemAddedListener(t),this.addItemRemovedListener(e)},_fireItemAdded:function(t){this.startedCallbacksForItemAddedEmitter.emit1(t);for(var e=this._addedListeners.slice(0),i=0;i<e.length;i++)e[i](t,this);this.endedCallbacksForItemAddedEmitter.emit()},_fireItemRemoved:function(t){this.startedCallbacksForItemRemovedEmitter.emit1(t);for(var e=this._removedListeners.slice(0),i=0;i<e.length;i++)e[i](t,this);this.endedCallbacksForItemRemovedEmitter.emit()},add:function(t){this.push(t)},addAll:function(t){for(var e=0;e<t.length;e++)this.add(t[e])},remove:function(t){var e=this._array.indexOf(t);-1!==e&&(this._array.splice(e,1),this.lengthProperty.set(this._array.length),this._fireItemRemoved(t))},removeAll:function(t){for(var e=0;e<t.length;e++){var i=t[e];this.remove(i)}},push:function(t){if(!this._options.allowDuplicates&&this.contains(t))throw new Error("duplicates are not allowed");this._array.push(t),this.lengthProperty.set(this._array.length),this._fireItemAdded(t)},pop:function(){var t=this._array.pop();return void 0!==t&&(this.lengthProperty.set(this._array.length),this._fireItemRemoved(t)),t},shift:function(){var t=this._array.shift();return void 0!==t&&(this.lengthProperty.set(this._array.length),this._fireItemRemoved(t)),t},contains:function(t){return-1!==this.indexOf(t)},get:function(t){return this._array[t]},indexOf:function(t){return this._array.indexOf(t)},clear:function(){for(var t=this._array.slice(0),e=0;e<t.length;e++)this.remove(t[e])},forEach:function(t){this._array.slice().forEach(t)},map:function(t){return new n.ObservableArray(this._array.map(t))},filter:function(t){return new n.ObservableArray(this._array.filter(t))},reduce:function(t,e){for(var i=0;i<this._array.length;i++)t=e(t,this._array[i]);return t},getArray:function(){return this._array}})}),i("JOIST/Profiler",["require","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(){this.histogram=[],this.longTimes=[],this.allTimes=[],this.frameCount=0;for(var t=0;30>t;t++)this.histogram.push(0);$("body").append('<div style="z-index: 99999999;position: absolute;color:red" id="trace" ></div>')}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist");return n.register("Profiler",e),i(Object,e,{frameStarted:function(){this.frameStartTime=Date.now(),this.frameCount++},frameEnded:function(){var t=this.frameStartTime-this.lastFrameStartTime;if(this.frameCount%60===0){for(var e=0,i=0;i<this.allTimes.length;i++)e+=this.allTimes[i];var n=Math.round(e/this.allTimes.length),r=Math.round(1e3/(e/this.allTimes.length)),s=""+r+" FPS, "+n+"ms/frame, ";for(s+=this.histogram,this.longTimes.length&&(s=s+", +++ = "+this.longTimes),$("#trace").html(s),i=0;30>i;i++)this.histogram[i]=0;this.longTimes.length=0,this.allTimes.length=0}else{var a=t;30>a?this.histogram[a]++:this.longTimes.push(a),this.allTimes.push(a)}this.lastFrameStartTime=this.frameStartTime}},{start:function(t){var i=new e;t.on("frameStarted",function(){i.frameStarted()}),t.on("frameCompleted",function(){i.frameEnded()})}})}),i("JOIST/LookAndFeel",["require","PHET_CORE/inherit","AXON/PropertySet","SCENERY/util/Color","JOIST/joist"],function(t){"use strict";function e(){n.call(this,{backgroundColor:"black"}),this.addDerivedProperty("navigationBarFill",["backgroundColor"],function(t){var e=!!new r(t).equals(r.BLACK);return e?"white":"black"}),this.addDerivedProperty("navigationBarTextFill",["navigationBarFill"],function(t){return"black"===t?"white":"black"})}var i=t("PHET_CORE/inherit"),n=t("AXON/PropertySet"),r=t("SCENERY/util/Color"),s=t("JOIST/joist");return s.register("LookAndFeel",e),i(n,e)}),i("string!JOIST/titlePattern",function(){return window.phet.chipper.strings.get("JOIST/titlePattern")}),i("JOIST/Sim",["require","PHET_CORE/inherit","DOT/Bounds2","DOT/Dimension2","JOIST/NavigationBar","JOIST/HomeScreen","JOIST/HomeScreenView","JOIST/UpdateCheck","SCENERY/util/Util","SCENERY/display/Display","SCENERY/nodes/Node","SCENERY/input/ButtonListener","AXON/PropertySet","AXON/ObservableArray","PHET_CORE/platform","PHET_CORE/Timer","SCENERY/nodes/Rectangle","JOIST/Profiler","SCENERY/input/Input","JOIST/LookAndFeel","JOIST/ScreenshotGenerator","PHETCOMMON/util/StringUtils","JOIST/packageJSON","JOIST/PhetButton","JOIST/joist","string!JOIST/titlePattern"],function(t){"use strict";function e(t,e,i){function r(t){return"true"===t}function o(t){var e,i=new Date;do e=new Date;while(t>e-i)}var l=this;window.phet.joist=window.phet.joist||{},i=_.extend({showHomeScreen:!0,screenIndex:0,standalone:!1,credits:{},optionsNode:null,homeScreenWarningNode:null,recordInputEventLog:!1,playbackMode:!!phet.chipper.getQueryParameter("playbackMode"),inputEventLogName:void 0,batchEvents:!1,showSaveAndLoad:!1,showSmallHomeScreenIconFrame:!1,accessibility:!!phet.chipper.getQueryParameter("accessibility"),rootRenderer:p.edge?"canvas":"svg",tandem:null},i),this.tandem=i.tandem,this.options=i,this.playbackMode=i.playbackMode,i.rootRenderer=phet.chipper.getQueryParameter("rootRenderer")||i.rootRenderer;var g=_.isUndefined(i.showHomeScreen)?!0:i.showHomeScreen;if(phet.chipper.getQueryParameter("screens")){var v=phet.chipper.getQueryParameter("screens");e=v.split(".").map(function(t){return e[parseInt(t,10)-1]}),i.screenIndex=0}1===e.length&&(g=!1),m.call(this,{showHomeScreen:g,screenIndex:i.screenIndex||0,scale:1,bounds:null,screenBounds:null,currentScreen:null,active:!0,showPointerAreas:!!phet.chipper.getQueryParameter("showPointerAreas"),showPointers:!!phet.chipper.getQueryParameter("showPointers"),showCanvasNodeBounds:!!phet.chipper.getQueryParameter("showCanvasNodeBounds"),showFittedBlockBounds:!!phet.chipper.getQueryParameter("showFittedBlockBounds")},{tandemSet:i.tandem?{active:i.tandem.createTandem("sim.active"),screenIndex:i.tandem.createTandem("sim.screenIndex"),showHomeScreen:i.tandem.createTandem("sim.showHomeScreen")}:{}}),i.tandem&&i.tandem.createTandem("sim").addInstance(this),this.lookAndFeel=new S,this.destroyed=!1,window.phet.joist.sim=l,window.phet.joist.ScreenshotGenerator=y,this.name=t,this.version=w.version,this.credits=i.credits,this.frameCounter=0,this.inputEventLog=[],this.inputEventBounds=n.NOTHING,this.fuzzMouseAverage=10,this.locale=phet.chipper.locale||phet.chipper.getQueryParameter("locale")||"en",$("title").html(C.format(N,t,l.version)),phet.chipper.getQueryParameter("showHomeScreen")&&(i.showHomeScreen=r(phet.chipper.getQueryParameter("showHomeScreen"))),phet.chipper.getQueryParameter("recordInputEventLog")&&(i.recordInputEventLog=!0,i.inputEventLogName=phet.chipper.getQueryParameter("recordInputEventLog")),phet.chipper.getQueryParameter("playbackInputEventLog")&&(i.playbackInputEventLog=!0,i.inputEventLogName=phet.chipper.getQueryParameter("playbackInputEventLog")),phet.chipper.getQueryParameter("fuzzMouse")&&(i.fuzzMouse=!0,"undefined"!==phet.chipper.getQueryParameter("fuzzMouse")&&(l.fuzzMouseAverage=parseFloat(phet.chipper.getQueryParameter("fuzzMouse"))),window.open=function(){return{focus:function(){},blur:function(){}}}),i.fuzzTouches=!!phet.chipper.getQueryParameter("fuzzTouches"),this.trigger1("startedSimConstructor",{sessionID:phet.chipper.getQueryParameter("sessionID")||null,simName:this.name,simVersion:this.version,url:window.location.href,randomSeed:window.phet.chipper.randomSeed});var E=$("body");E.css("padding","0").css("margin","0").css("overflow","hidden"),document.getElementById("sim")&&document.getElementById("sim").parentNode===document.body&&document.body.removeChild(document.getElementById("sim")),document.onselectstart=function(){return!1},this.rootNode=new c({renderer:i.rootRenderer}),this.display=new u(l.rootNode,{allowSceneOverflow:!0,allowWebGL:"false"!==phet.chipper.getQueryParameter("webgl"),accessibility:i.accessibility,isApplication:!1}),this.activeProperty.link(function(t){l.display.interactive=t});var R=l.display.domElement;R.id="sim",R.setAttribute("aria-hidden",!0),document.body.appendChild(R);var A=this.heartbeatDiv=document.createElement("div");if(A.style.opacity=0,A.style.position="absolute",A.style.left="0",A.style.top="0",A.style.width="0",A.style.height="0",A.style.clip="rect(0,0,0,0)",A.setAttribute("aria-hidden",!0),document.body.appendChild(A),phet.chipper.getQueryParameter("sceneryLog")){var P=phet.chipper.getQueryParameter("sceneryLog");void 0===P||"undefined"===P?this.display.scenery.enableLogging():this.display.scenery.enableLogging(P.split("."))}phet.chipper.getQueryParameter("sceneryStringLog")&&this.display.scenery.switchLogToString(),this.display.initializeWindowEvents({batchDOMEvents:this.options.batchEvents}),window.phet.joist.rootNode=this.rootNode,window.phet.joist.display=this.display,this.showPointersProperty.link(function(t){l.display.setPointerDisplayVisible(!!t)}),this.showPointerAreasProperty.link(function(t){l.display.setPointerAreaDisplayVisible(!!t)}),this.showCanvasNodeBoundsProperty.link(function(t){l.display.setCanvasNodeBoundsVisible(!!t)}),this.showFittedBlockBoundsProperty.link(function(t){l.display.setFittedBlockBoundsVisible(!!t)}),window.phet.joist.makeEverythingSlow=function(){window.setInterval(function(){o(64)},16)},window.phet.joist.makeRandomSlowness=function(){window.setInterval(function(){o(Math.ceil(100+200*Math.random()))},Math.ceil(100+200*Math.random()))},this.screens=e,e.length>1?(this.homeScreen=new a(this,{warningNode:i.homeScreenWarningNode,showSmallHomeScreenIconFrame:i.showSmallHomeScreenIconFrame,tandem:i.tandem?i.tandem.createTandem("homeScreen"):null}),this.homeScreen.initializeModelAndView()):this.homeScreen=null,this.navigationBar=new s(this,e,{tandem:i.tandem?i.tandem.createTandem("navigationBar"):null}),this.updateBackground=function(){l.lookAndFeel.backgroundColor=l.currentScreen?l.currentScreen.backgroundColor.toCSS():l.homeScreen.backgroundColor.toCSS()},this.lookAndFeel.backgroundColorProperty.link(function(t){l.display.backgroundColor=t}),this.multilink(["showHomeScreen","screenIndex"],function(t,i){l.currentScreen=t?null:e[i],l.updateBackground()}),_.each(e,function(t){t.backgroundColorProperty.link(l.updateBackground),t.initializeModelAndView()}),this.homeScreen&&this.rootNode.addChild(this.homeScreen.view),_.each(e,function(t){t.view.layerSplit=!0,l.rootNode.addChild(t.view)}),this.rootNode.addChild(this.navigationBar),this.homeScreen&&T.linkPhetButtonTransform(this.homeScreen,this.navigationBar,this.rootNode),this.multilink(["screenIndex","showHomeScreen"],function(t,i){l.homeScreen&&l.homeScreen.view.setVisible(i);for(var n=0;n<e.length;n++)e[n].view.setVisible(!i&&t===n);l.navigationBar.setVisible(!i),l.updateBackground()}),this.topLayer=new c,this.rootNode.addChild(this.topLayer),this.modalNodeStack=new f,this.barrierRectangle=new b(0,0,1,1,0,0,{fill:"rgba(0,0,0,0.3)",pickable:!0}),this.topLayer.addChild(this.barrierRectangle),this.modalNodeStack.lengthProperty.link(function(t){l.barrierRectangle.visible=t>0}),this.barrierRectangle.addInputListener(new d({fire:function(t){l.barrierRectangle.trigger0("startedCallbacksForFired"),l.modalNodeStack.get(l.modalNodeStack.length-1).hide(),l.barrierRectangle.trigger0("endedCallbacksForFired")}})),i.tandem&&i.tandem.createTandem("sim.barrierRectangle").addInstance(this.barrierRectangle),$(window).resize(function(){l.resizeToWindow()}),this.resizeToWindow(),h.check(),this.lastTime=-1,this.boundRunAnimationLoop=null,this.boundRunAnimationLoop=this.runAnimationLoop.bind(this),this.trigger0("simulationStarted"),this.trigger0("endedSimConstructor")}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("DOT/Dimension2"),s=t("JOIST/NavigationBar"),a=t("JOIST/HomeScreen"),o=t("JOIST/HomeScreenView"),h=t("JOIST/UpdateCheck"),l=t("SCENERY/util/Util"),u=t("SCENERY/display/Display"),c=t("SCENERY/nodes/Node"),d=t("SCENERY/input/ButtonListener"),m=t("AXON/PropertySet"),f=t("AXON/ObservableArray"),p=t("PHET_CORE/platform"),g=t("PHET_CORE/Timer"),b=t("SCENERY/nodes/Rectangle"),v=t("JOIST/Profiler"),E=t("SCENERY/input/Input"),S=t("JOIST/LookAndFeel"),y=t("JOIST/ScreenshotGenerator"),C=t("PHETCOMMON/util/StringUtils"),w=t("JOIST/packageJSON"),T=t("JOIST/PhetButton"),R=t("JOIST/joist"),N=t("string!JOIST/titlePattern");return R.register("Sim",e),i(m,e,{showPopup:function(t,e){e&&this.modalNodeStack.push(t),this.topLayer.addChild(t),E.pushFocusContext(t.getTrails()[0])},hidePopup:function(t,e){e&&this.modalNodeStack.remove(t),E.popFocusContext(t.getTrails()[0]),this.topLayer.removeChild(t)},resizeToWindow:function(){this.resize(window.innerWidth,window.innerHeight)},resize:function(t,e){var i=this,a=Math.min(t/o.LAYOUT_BOUNDS.width,e/o.LAYOUT_BOUNDS.height);this.barrierRectangle.rectWidth=t/a,this.barrierRectangle.rectHeight=e/a;var h=a*s.NAVIGATION_BAR_SIZE.height;i.navigationBar.layout(a,t,h),i.navigationBar.y=e-h,i.display.setSize(new r(t,e));var l=e-i.navigationBar.height;_.each(i.screens,function(e){e.view.layout(t,l)}),i.topLayer.setScaleMagnitude(a),i.homeScreen&&i.homeScreen.view.layout(t,e),p.mobileSafari&&window.scrollTo(0,0),this.scale=a,this.bounds=new n(0,0,t,e),this.screenBounds=new n(0,0,t,l),this.trigger("resized",this.bounds,this.screenBounds,this.scale)},start:function(){l.polyfillRequestAnimationFrame(),phet.chipper.getQueryParameter("profiler")&&v.start(this),this.boundRunAnimationLoop(),phet.chipper.getQueryParameter("postMessageOnLoad")&&window.parent&&window.parent.postMessage(JSON.stringify({type:"load",url:window.location.href}),"*")},destroy:function(){this.destroyed=!0;var t=this.display.domElement;t.parentNode&&t.parentNode.removeChild(t)},disableRequestAnimationFrame:function(){this.boundRunAnimationLoop=function(){}},runAnimationLoop:function(){this.destroyed||window.requestAnimationFrame(this.boundRunAnimationLoop);var t=Date.now(),e=-1===this.lastTime?1e3/60:t-this.lastTime;this.lastTime=t;var i=e/1e3;this.stepSimulation(i)},stepSimulation:function(t){var e;this.trigger0("frameStarted"),this.frameCounter++,this.frameCounter%1e3===0&&(this.heartbeatDiv.innerHTML=Math.random()),this.options.fuzzMouse?this.display.fuzzMouseEvents(this.fuzzMouseAverage):this.options.fuzzTouches||this.options.batchEvents&&(this.active?this.display._input.fireBatchedEvents():this.display._input.clearBatchedEvents()),this.active&&(this.showHomeScreen||(e=this.screens[this.screenIndex],e.model.step&&t&&e.model.step(t),e.view.step&&e.view.step(t)),g.step(t),window.TWEEN&&window.TWEEN.update()),this.display.updateDisplay(),this.trigger1("frameCompleted",t)}})}),i("WAVE_ON_A_STRING/wave-on-a-string/model/WOASModel",["require","PHET_CORE/inherit","AXON/PropertySet","DOT/Vector2"],function(t){"use strict";function e(){this.stepDt=0;var t=window.Float64Array||window.Array;this.yDraw=new t(s),this.yNow=new t(s),this.yLast=new t(s),this.yNext=new t(s),this.dotPerCm=80,n.call(this,{mode:"manual",typeEnd:"fixedEnd",speed:1,rulers:!1,timer:!1,referenceLine:!1,tension:2,damping:20,frequency:1.5,pulseWidth:.5,amplitude:.75,play:!0,lastDt:.03,time:0,angle:0,pulsePending:!1,pulse:!1,rulerLocH:new r(54,117),rulerLocV:new r(13,440),referenceLineLoc:new r(-10,120),timerStart:!1,timerSecond:0,timerLoc:new r(550,330),pulseSign:1,wrenchArrowsVisible:!0}),this.nextLeftY=0,this.nSegs=s,this.beta=.05,this.alpha=1,this.reset(),this.modeProperty.lazyLink(this.manualRestart.bind(this))}var i=t("PHET_CORE/inherit"),n=t("AXON/PropertySet"),r=t("DOT/Vector2"),s=61,a=50;return i(n,e,{step:function(t){var e=1/a;Math.abs(t-this.lastDt)>.3*this.lastDt&&(t=this.lastDt+(t-this.lastDt<0?-1:1)*this.lastDt*.3),this.lastDt=t,this.play&&(this.stepDt+=t,this.stepDt>=e&&(this.manualStep(this.stepDt),this.stepDt%=e)),this.nextLeftY=this.yNow[0]},reset:function(){n.prototype.reset.call(this),this.manualRestart()},evolve:function(){var t=1,e=1,i=t*e,n=.002*this.damping;switch(this.beta=n*t/2,this.alpha=e*t/i,this.yNext[0]=this.yNow[0],this.typeEnd){case"looseEnd":this.yNow[this.nSegs-1]=this.yNow[this.nSegs-2];break;case"noEnd":this.yNow[this.nSegs-1]=this.yLast[this.nSegs-2];break;default:this.yNow[this.nSegs-1]=0}for(var r=1/(this.beta+1),s=this.alpha*this.alpha,a=2*(1-s),o=1;o<this.nSegs-1;o++)this.yNext[o]=r*((this.beta-1)*this.yLast[o]+a*this.yNow[o]+s*(this.yNow[o+1]+this.yNow[o-1]));var h=this.nSegs-1,l=this.yLast[h],u=this.yNow[h],c=this.yNext[h],d=this.yLast;switch(this.yLast=this.yNow,this.yNow=this.yNext,this.yNext=d,this.yLast[h]=l,this.yNow[h]=u,this.yNext[h]=c,this.typeEnd){case"looseEnd":this.yLast[this.nSegs-1]=this.yNow[this.nSegs-1],this.yNow[this.nSegs-1]=this.yNow[this.nSegs-2];break;case"noEnd":this.yLast[this.nSegs-1]=this.yNow[this.nSegs-1],this.yNow[this.nSegs-1]=this.yLast[this.nSegs-2];break;default:this.yLast[this.nSegs-1]=0,this.yNow[this.nSegs-1]=0}},manualStep:function(t){var e,i=1/a;t=void 0!==t&&t>0?t:i;for(var n=this.yNow[0],r=Math.floor(t/i),s=r?(this.nextLeftY-n)/r:0,o=1/(a*(.2+.4*this.tension)*this.speed);t>=i;){if(this.time+=i,this.timerStart&&(this.timerSecond+=i*this.speed),"oscillate"===this.mode&&(this.angle+=2*Math.PI*this.frequency*i*this.speed,this.angle%=2*Math.PI,this.yDraw[0]=this.yNow[0]=this.amplitude*this.dotPerCm*Math.sin(-this.angle)),"pulse"===this.mode&&this.pulsePending&&(this.pulsePending=!1,this.pulse=!0,this.yNow[0]=0),"pulse"===this.mode&&this.pulse){var h=Math.PI*i*this.speed/this.pulseWidth;this.angle+h>=Math.PI/2&&(this.pulseSign=-1),this.angle+h*this.pulseSign>0?this.angle+=h*this.pulseSign:(this.angleProperty.reset(),this.pulseSignProperty.reset(),this.pulseProperty.reset()),this.yDraw[0]=this.yNow[0]=this.amplitude*this.dotPerCm*(-this.angle/(Math.PI/2))}if("manual"===this.mode&&(this.yNow[0]+=s),this.time>=o)for(this.time%=o,this.evolve(),e=0;e<this.nSegs;e++)this.yDraw[e]=this.yLast[e];else for(e=1;e<this.nSegs;e++)this.yDraw[e]=this.yLast[e]+(this.yNow[e]-this.yLast[e])*(this.time/o);t-=i}"manual"===this.mode,this.trigger("yNowChanged")},manualRestart:function(){this.angleProperty.reset(),this.timeProperty.reset(),this.pulseProperty.reset(),this.pulseSignProperty.reset(),this.pulsePendingProperty.reset(),this.customDt=0;for(var t=0;t<this.yNow.length;t++)this.yDraw[t]=this.yNext[t]=this.yNow[t]=this.yLast[t]=0;this.nextLeftY=0,this.trigger("yNowChanged")},manualPulse:function(){this.yNow[0]=0,this.angle=0,this.pulseSign=1,this.pulsePending=!0,this.pulse=!1}}),e}),i("SCENERY/nodes/Line",["require","PHET_CORE/inherit","SCENERY/scenery","KITE/segments/Line","SCENERY/nodes/Path","KITE/Shape","DOT/Bounds2","DOT/Vector2","SCENERY/nodes/Paintable","SCENERY/display/SVGSelfDrawable","SCENERY/display/CanvasSelfDrawable","SCENERY/display/SelfDrawable","SCENERY/display/Renderer"],function(t){"use strict";function e(t,e,i,n,r){"object"==typeof t?t instanceof l?(this._x1=t.x,this._y1=t.y,this._x2=e.x,this._y2=e.y,r=i||{}):(this._x1=0,this._y1=0,this._x2=0,this._y2=0,r=t||{}):(this._x1=t,this._y1=e,this._x2=i,this._y2=n,r=r||{}),a.call(this,null,r)}function i(t){var i=t.toLowerCase(),n="get"+t,r="set"+t,s="_"+i,a="markDirty"+t;e.prototype[n]=function(){return this[s]},e.prototype[r]=function(t){
if(this[s]!==t){this[s]=t;for(var e=this._drawables.length,i=0;e>i;i++){var n=this._drawables[i];n[a]()}this.invalidateLine()}return this},Object.defineProperty(e.prototype,i,{set:e.prototype[r],get:e.prototype[n]})}var n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=t("KITE/segments/Line"),a=t("SCENERY/nodes/Path"),o=t("KITE/Shape"),h=t("DOT/Bounds2"),l=t("DOT/Vector2"),u=t("SCENERY/nodes/Paintable"),c=t("SCENERY/display/SVGSelfDrawable"),d=t("SCENERY/display/CanvasSelfDrawable"),m=t("SCENERY/display/SelfDrawable"),f=t("SCENERY/display/Renderer"),p=!0;return r.register("Line",e),n(a,e,{setLine:function(t,e,i,n){this._x1=t,this._y1=e,this._x2=i,this._y2=n;for(var r=this._drawables.length,s=0;r>s;s++){var a=this._drawables[s];a.markDirtyLine()}this.invalidateLine()},setPoint1:function(t,e){"number"==typeof t?(this._x1=t,this._y1=e):(this._x1=t.x,this._y1=t.y);for(var i=this._drawables.length,n=0;i>n;n++){var r=this._drawables[n];r.markDirtyP1()}this.invalidateLine()},set p1(t){this.setPoint1(t)},get p1(){return new l(this._x1,this._y1)},setPoint2:function(t,e){"number"==typeof t?(this._x2=t,this._y2=e):(this._x2=t.x,this._y2=t.y);for(var i=this._drawables.length,n=0;i>n;n++){var r=this._drawables[n];r.markDirtyP2()}this.invalidateLine()},set p2(t){this.setPoint2(t)},get p2(){return new l(this._x2,this._y2)},createLineShape:function(){return o.lineSegment(this._x1,this._y1,this._x2,this._y2)},invalidateLine:function(){this._shape=null,this.invalidatePath()},containsPointSelf:function(t){return this._strokePickable?a.prototype.containsPointSelf.call(this,t):!1},intersectsBoundsSelf:function(t){return new s(this.p1,this.p2).intersectsBounds(t)},canvasPaintSelf:function(t){e.LineCanvasDrawable.prototype.paintCanvas(t,this)},computeShapeBounds:function(){if(this._stroke){var t=this.getLineCap(),e=this.getLineWidth()/2;if("round"===t)return new h(Math.min(this._x1,this._x2)-e,Math.min(this._y1,this._y2)-e,Math.max(this._x1,this._x2)+e,Math.max(this._y1,this._y2)+e);var i=this._x2-this._x1,n=this._y2-this._y1,r=Math.sqrt(i*i+n*n);if(0===r)return new h(this._x1-e,this._y1-e,this._x2+e,this._y2+e);var s=e*i/r,a=e*n/r,o=h.NOTHING.copy();return"butt"===t?(o.addCoordinates(this._x1-a,this._y1+s),o.addCoordinates(this._x1+a,this._y1-s),o.addCoordinates(this._x2-a,this._y2+s),o.addCoordinates(this._x2+a,this._y2-s)):(o.addCoordinates(this._x1-s-a,this._y1-a+s),o.addCoordinates(this._x1-s+a,this._y1-a-s),o.addCoordinates(this._x2+s-a,this._y2+a+s),o.addCoordinates(this._x2+s+a,this._y2+a-s)),o}var l=h.NOTHING.copy();return l.addCoordinates(this._x1,this._y1),l.addCoordinates(this._x2,this._y2),l},createSVGDrawable:function(t,i){return e.LineSVGDrawable.createFromPool(t,i)},createCanvasDrawable:function(t,i){return e.LineCanvasDrawable.createFromPool(t,i)},createWebGLDrawable:function(t,i){return e.LineWebGLDrawable.createFromPool(t,i)},getBasicConstructor:function(t){return"new scenery.Line( "+this._x1+", "+this._y1+", "+this._x1+", "+this._y1+", {"+t+"} )"},setShape:function(t){if(null!==t)throw new Error("Cannot set the shape of a scenery.Line to something non-null");this.invalidatePath()},getShape:function(){return this._shape||(this._shape=this.createLineShape()),this._shape},hasShape:function(){return!0},getFillRendererBitmask:function(){return f.bitmaskCanvas|f.bitmaskSVG|f.bitmaskDOM}}),i("X1"),i("Y1"),i("X2"),i("Y2"),e.prototype._mutatorKeys=["p1","p2","x1","y1","x2","y2"].concat(a.prototype._mutatorKeys),e.LineStatefulDrawable={mixin:function(t){var e=t.prototype;e.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyX1=!0,this.dirtyY1=!0,this.dirtyX2=!0,this.dirtyY2=!0,this.initializePaintableState(t,e),this},e.disposeState=function(){this.disposePaintableState()},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyLine=function(){this.dirtyX1=!0,this.dirtyY1=!0,this.dirtyX2=!0,this.dirtyY2=!0,this.markPaintDirty()},e.markDirtyP1=function(){this.dirtyX1=!0,this.dirtyY1=!0,this.markPaintDirty()},e.markDirtyP2=function(){this.dirtyX2=!0,this.dirtyY2=!0,this.markPaintDirty()},e.markDirtyX1=function(){this.dirtyX1=!0,this.markPaintDirty()},e.markDirtyY1=function(){this.dirtyY1=!0,this.markPaintDirty()},e.markDirtyX2=function(){this.dirtyX2=!0,this.markPaintDirty()},e.markDirtyY2=function(){this.dirtyY2=!0,this.markPaintDirty()},e.setToCleanState=function(){this.paintDirty=!1,this.dirtyX1=!1,this.dirtyY1=!1,this.dirtyX2=!1,this.dirtyY2=!1},u.PaintableStatefulDrawable.mixin(t)}},e.LineStatelessDrawable={mixin:function(t){var e=t.prototype;e.initializeLineStateless=function(){return this.paintDirty=!0,this},e.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},e.markDirtyLine=function(){this.markPaintDirty()},e.markDirtyP1=function(){this.markPaintDirty()},e.markDirtyP2=function(){this.markPaintDirty()},e.markDirtyX1=function(){this.markPaintDirty()},e.markDirtyY1=function(){this.markPaintDirty()},e.markDirtyX2=function(){this.markPaintDirty()},e.markDirtyY2=function(){this.markPaintDirty()},u.PaintableStatefulDrawable.mixin(t)}},e.LineSVGDrawable=function(t,e){this.initialize(t,e)},n(c,e.LineSVGDrawable,{initialize:function(t,e){return this.initializeSVGSelfDrawable(t,e,!0,p),this.svgElement||(this.svgElement=document.createElementNS(r.svgns,"line")),this},updateSVGSelf:function(){var t=this.svgElement;this.dirtyX1&&t.setAttribute("x1",this.node._x1),this.dirtyY1&&t.setAttribute("y1",this.node._y1),this.dirtyX2&&t.setAttribute("x2",this.node._x2),this.dirtyY2&&t.setAttribute("y2",this.node._y2),this.updateFillStrokeStyle(t)}}),e.LineStatefulDrawable.mixin(e.LineSVGDrawable),m.Poolable.mixin(e.LineSVGDrawable),e.LineCanvasDrawable=function(t,e){this.initialize(t,e)},n(d,e.LineCanvasDrawable,{initialize:function(t,e){return this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e),this},paintCanvas:function(t,e){var i=t.context;i.beginPath(),i.moveTo(e._x1,e._y1),i.lineTo(e._x2,e._y2),e._stroke&&(e.beforeCanvasStroke(t),i.stroke(),e.afterCanvasStroke(t))},markDirtyLine:function(){this.markPaintDirty()},markDirtyP1:function(){this.markPaintDirty()},markDirtyP2:function(){this.markPaintDirty()},markDirtyX1:function(){this.markPaintDirty()},markDirtyY1:function(){this.markPaintDirty()},markDirtyX2:function(){this.markPaintDirty()},markDirtyY2:function(){this.markPaintDirty()},dispose:function(){d.prototype.dispose.call(this),this.disposePaintableStateless()}}),u.PaintableStatelessDrawable.mixin(e.LineCanvasDrawable),m.Poolable.mixin(e.LineCanvasDrawable),e}),i("SCENERY/input/SimpleDragHandler",["require","PHET_CORE/inherit","SCENERY/scenery"],function(t){"use strict";function e(t){var e=this;t=_.extend({allowTouchSnag:!1,mouseButton:0,dragCursor:"pointer"},t),this.options=t,this.dragging=!1,this.pointer=null,this.trail=null,this.transform=null,this.node=null,this.lastDragPoint=null,this.startTransformMatrix=null,this.mouseButton=void 0,this.transformListener={transform:function(t){if(e.trail.isExtensionOf(t.trail,!0)){var i=t.trail.getMatrix(),n=e.transform.getMatrix();e.node.prependMatrix(i.inverted().timesMatrix(n)),e.transform.setMatrix(i)}}},this.dragListener={up:function(t){if(!t.pointer.isMouse||t.domEvent.button===e.mouseButton){var i=t.currentTarget;t.currentTarget=e.node,e.endDrag(t),t.currentTarget=i}},cancel:function(t){var i=t.currentTarget;t.currentTarget=e.node,e.endDrag(t),t.currentTarget=i,e.transform||e.node.setMatrix(e.startTransformMatrix)},move:function(t){var i=e.pointer.point.minus(e.lastDragPoint);if(0!==i.magnitudeSquared()){var n=e.transform.inverseDelta2(i);if(e.options.translate){var r=e.node.getMatrix().getTranslation();e.options.translate.call(null,{delta:n,oldPosition:r,position:r.plus(n)})}if(e.lastDragPoint=e.pointer.point,e.options.drag){var s=t.currentTarget;t.currentTarget=e.node,e.options.drag.call(null,t,e.trail),t.currentTarget=s}}}}}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery");return n.register("SimpleDragHandler",e),i(Object,e,{startDrag:function(t){t.pointer.dragging=!0,t.pointer.cursor=this.options.dragCursor,t.pointer.addInputListener(this.dragListener),this.dragging=!0,this.pointer=t.pointer,this.trail=t.trail.subtrailTo(t.currentTarget,!0),this.transform=this.trail.getTransform(),this.node=t.currentTarget,this.lastDragPoint=t.pointer.point,this.startTransformMatrix=t.currentTarget.getMatrix().copy(),this.mouseButton=t.pointer.isMouse?t.domEvent.button:void 0,this.options.start&&this.options.start.call(null,t,this.trail)},endDrag:function(t){this.pointer.dragging=!1,this.pointer.cursor=null,this.pointer.removeInputListener(this.dragListener),this.dragging=!1,this.options.end&&this.options.end.call(null,t,this.trail),this.pointer=null},tryToSnag:function(t){t.pointer.isMouse&&t.domEvent&&this.options.mouseButton!==t.domEvent.button&&-1!==this.options.mouseButton||this.dragging||t.pointer.dragging||this.startDrag(t)},tryTouchToSnag:function(t){this.options.allowTouchSnag&&(this.options.allowTouchSnag===!0||this.options.allowTouchSnag(t))&&this.tryToSnag(t)},down:function(t){this.tryToSnag(t)},touchenter:function(t){this.tryTouchToSnag(t)},touchmove:function(t){this.tryTouchToSnag(t)}}),e}),i("SCENERY/util/RadialGradient",["require","SCENERY/scenery","PHET_CORE/inherit","DOT/Vector2","SCENERY/util/Gradient"],function(t){"use strict";function e(t,e,n,a,o,h){this.start=new r(t,e),this.end=new r(a,o),this.startRadius=n,this.endRadius=h,this.focalPoint=this.start.plus(this.end.minus(this.start).times(this.startRadius/(this.startRadius-this.endRadius))),this.startRadius>=this.endRadius,s.call(this,i.scratchContext.createRadialGradient(t,e,n,a,o,h))}var i=t("SCENERY/scenery"),n=t("PHET_CORE/inherit"),r=t("DOT/Vector2"),s=t("SCENERY/util/Gradient");return i.register("RadialGradient",e),n(s,e,{isRadialGradient:!0,getSVGDefinition:function(){function t(t,e,i,n,r){return i+(r-t)*(n-i)/(e-t)}function e(e){var r=n?1-e.ratio:e.ratio;a>0&&(r=t(0,1,a/s,1,r));var h=document.createElementNS(i.svgns,"stop");h.setAttribute("offset",r),h.setAttribute("style","stop-color: "+e.color.withAlpha(1).toCSS()+"; stop-opacity: "+e.color.a.toFixed(20)+";"),o.appendChild(h)}var n=this.startRadius>this.endRadius,r=n?this.start:this.end,s=Math.max(this.startRadius,this.endRadius),a=Math.min(this.startRadius,this.endRadius),o=document.createElementNS(i.svgns,"radialGradient");o.setAttribute("gradientUnits","userSpaceOnUse"),o.setAttribute("cx",r.x),o.setAttribute("cy",r.y),o.setAttribute("r",s),o.setAttribute("fx",this.focalPoint.x),o.setAttribute("fy",this.focalPoint.y),this.transformMatrix&&o.setAttribute("gradientTransform",this.transformMatrix.getSVGTransform());var h;if(n)for(h=this.stops.length-1;h>=0;h--)e(this.stops[h]);else for(h=0;h<this.stops.length;h++)e(this.stops[h]);return o},toString:function(){var t="new scenery.RadialGradient( "+this.start.x+", "+this.start.y+", "+this.startRadius+", "+this.end.x+", "+this.end.y+", "+this.endRadius+" )";return _.each(this.stops,function(e){t+=".addColorStop( "+e.ratio+", '"+e.color.toString()+"' )"}),t}}),e}),i("SUN/buttons/RoundButtonView",["require","SUN/buttons/ButtonListener","SCENERY/nodes/Circle","SCENERY/util/Color","SUN/ColorConstants","PHET_CORE/inherit","SCENERY/nodes/Node","AXON/Property","SCENERY/util/RadialGradient","KITE/Shape","SUN/sun","DOT/Vector2"],function(t){"use strict";function e(t,a,l){this.buttonModel=t;var c=this;l=_.extend({radius:l&&l.content?void 0:30,content:null,cursor:"pointer",baseColor:f,disabledBaseColor:s.LIGHT_GRAY,minXMargin:5,minYMargin:5,fireOnDown:!1,touchAreaDilation:0,mouseAreaDilation:0,stroke:void 0,lineWidth:.5,xContentOffset:0,yContentOffset:0,buttonAppearanceStrategy:e.threeDAppearanceStrategy,contentAppearanceStrategy:e.fadeContentWhenDisabled},l),o.call(c);var m=l.content,p=new d(l.xContentOffset,l.yContentOffset);m&&(m.pickable=!1),this.baseColorProperty=new h(r.toColor(l.baseColor)),this.addInputListener(new i(t));var g=l.radius||Math.max(m.width+2*l.minXMargin,m.height+2*l.minYMargin)/2,b=new n(g,{fill:l.baseColor,lineWidth:l.lineWidth});this.addChild(b),l.buttonAppearanceStrategy(b,a,this.baseColorProperty,l),m&&(m.center=p,c.addChild(m)),l.contentAppearanceStrategy(m,a),a.link(function(t){c.cursor="disabled"===t||"disabled-pressed"===t?null:"pointer"}),this.touchArea=u.circle(0,0,g+l.touchAreaDilation),this.mouseArea=u.circle(0,0,g+l.mouseAreaDilation),this.pickable=null,c.mutate(l)}var i=t("SUN/buttons/ButtonListener"),n=t("SCENERY/nodes/Circle"),r=t("SCENERY/util/Color"),s=t("SUN/ColorConstants"),a=t("PHET_CORE/inherit"),o=t("SCENERY/nodes/Node"),h=t("AXON/Property"),l=t("SCENERY/util/RadialGradient"),u=t("KITE/Shape"),c=t("SUN/sun"),d=t("DOT/Vector2"),m=5,f=s.LIGHT_BLUE;return c.register("RoundButtonView",e),e.threeDAppearanceStrategy=function(t,e,i,s){function a(t){return new l(-b,-b,0,0,0,g).addColorStop(0,t.colorUtilsDarker(.1)).addColorStop(.6,t.colorUtilsDarker(.2)).addColorStop(.8,t).addColorStop(1,t.colorUtilsBrighter(.8))}function o(e){var i=new r(e.getRed(),e.getGreen(),e.getBlue(),0);E=new l(b,b,p,b,b,g).addColorStop(0,e).addColorStop(1,e.colorUtilsBrighter(.7)),S=new l(-b,-b,p,-b,-b,g).addColorStop(0,i).addColorStop(1,e.colorUtilsDarker(.5)),y=new l(b,b,p,b,b,g).addColorStop(0,e.colorUtilsBrighter(.3)).addColorStop(1,e.colorUtilsBrighter(.8)),C=new l(-b,-b,p,-b,-b,g).addColorStop(0,i).addColorStop(1,e.colorUtilsDarker(.5)),w=a(e),T=new l(b,b,p,b,b,g).addColorStop(0,c).addColorStop(1,c.colorUtilsBrighter(.5)),R=new l(-b,-b,p,-b,-b,g).addColorStop(0,d).addColorStop(1,c.colorUtilsDarker(.5)),N=a(c),null===s.stroke?(_=null,f=null):"undefined"==typeof s.stroke?(_=e.colorUtilsDarker(.4),f=c.colorUtilsDarker(.4)):(_=r.toColor(s.stroke),f=c.colorUtilsDarker(.4)),t.cachedPaints=[E,y,w,T,N],v.cachedPaints=[S,C,R,_,f]}function h(e){switch(e){case"idle":t.fill=E,v.stroke=_,v.fill=S;break;case"over":t.fill=y,v.stroke=_,v.fill=C;break;case"pressed":t.fill=w,v.stroke=_,v.fill=C;break;case"disabled":t.fill=T,v.stroke=f,v.fill=R;break;case"disabled-pressed":t.fill=N,v.stroke=f,v.fill=R}}var u=t.width/2,c=r.toColor(s.disabledBaseColor),d=new r(c.getRed(),c.getGreen(),c.getBlue(),0),f=s.stroke?c.colorUtilsDarker(.4):null,p=u-m/2,g=u+m/2,b=m/2,v=new n(u,{lineWidth:s.lineWidth,pickable:!1});t.addChild(v);var E,S,y,C,w,T,R,N,_=null;o(i.value),h(e.value),i.lazyLink(function(t){o(t),h(e.value)}),e.lazyLink(function(t){h(t)})},e.flatAppearanceStrategy=function(t,e,i,n){function s(e){o=e,h=e.colorUtilsBrighter(.4),l=e.colorUtilsDarker(.4),u=d,c=u,null===n.stroke?(m=null,f=null):"undefined"==typeof n.stroke?(m=e.colorUtilsDarker(.4),f=d.colorUtilsDarker(.4)):(m=r.toColor(n.stroke),f=d.colorUtilsDarker(.4)),t.cachedPaints=[o,h,l,u,c,m,f]}function a(e){switch(e){case"idle":t.fill=o,t.stroke=m;break;case"over":t.fill=h,t.stroke=m;break;case"pressed":t.fill=l,t.stroke=m;break;case"disabled":t.fill=u,t.stroke=f;break;case"disabled-pressed":t.fill=c,t.stroke=f}}var o,h,l,u,c,d=r.toColor(n.disabledBaseColor),m=null,f=null;i.link(function(t){s(t),a(e.value)}),e.lazyLink(function(t){a(t)})},e.fadeContentWhenDisabled=function(t,e){t&&e.link(function(e){t.opacity="disabled"===e||"disabled-pressed"===e?.3:1})},a(o,e,{setEnabled:function(t){this.buttonModel.enabled=t},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this.buttonModel.enabled},get enabled(){return this.getEnabled()},setBaseColor:function(t){this.baseColorProperty.value=r.toColor(t)},set baseColor(t){this.setBaseColor(t)},getBaseColor:function(){return this.baseColorProperty.value},get baseColor(){return this.getBaseColor()}})}),i("SUN/buttons/RoundPushButton",["require","PHET_CORE/inherit","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","SUN/buttons/RoundButtonView","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({tandem:null},t),this.buttonModel=new r(t),s.call(this,this.buttonModel,new n(this.buttonModel),t),this.roundPushButtonTandem=t.tandem,this.roundPushButtonTandem&&this.roundPushButtonTandem.addInstance(this)}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/PushButtonInteractionStateProperty"),r=t("SUN/buttons/PushButtonModel"),s=t("SUN/buttons/RoundButtonView"),a=t("SUN/sun");return a.register("RoundPushButton",e),i(s,e,{dispose:function(){this.roundPushButtonTandem&&this.roundPushButtonTandem.removeInstance(this)},addListener:function(t){this.buttonModel.addListener(t)},removeListener:function(t){this.buttonModel.removeListener(t)}})}),i("SCENERY_PHET/ResetAllShape",["require","PHET_CORE/inherit","KITE/Shape","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){n.call(this);var e=.4*t,i=.625*t,r=2.25*(i-e),s=.35*-Math.PI,a=-2*Math.PI*.85,o=.18*-Math.PI;this.moveTo(e*Math.cos(s),e*Math.sin(s)),this.lineTo(i*Math.cos(s),i*Math.sin(s));var h=s+a;this.arc(0,0,i,s,h,!0);var l=(r-(i-e))/2;this.lineTo((i+l)*Math.cos(h),(i+l)*Math.sin(h));var u=.55*(i+e);this.lineTo(u*Math.cos(h+o),u*Math.sin(h+o)),this.lineTo((e-l)*Math.cos(h),(e-l)*Math.sin(h)),this.lineTo(e*Math.cos(h),e*Math.sin(h)),this.arc(0,0,e,h,s),this.close()}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("SCENERY_PHET/sceneryPhet");return r.register("ResetAllShape",e),i(n,e)}),i("string!SCENERY_PHET/ResetAllButton.name",function(){return window.phet.chipper.strings.get("SCENERY_PHET/ResetAllButton.name")}),i("SCENERY_PHET/buttons/ResetAllButton",["require","SCENERY/util/Color","SCENERY/accessibility/AccessiblePeer","PHET_CORE/inherit","SCENERY/nodes/Path","KITE/Shape","SUN/buttons/RoundPushButton","SCENERY_PHET/ResetAllShape","SCENERY_PHET/sceneryPhet","string!SCENERY_PHET/ResetAllButton.name"],function(t){"use strict";function e(t){var e=t&&t.radius?t.radius:c;t=_.extend({radius:c,minXMargin:.2*e,baseColor:new i(247,151,34),xContentOffset:.03*e,yContentOffset:e*-.0125,textDescription:"Reset All Button",tandem:null},t);var r=new s(new h(t.radius),{fill:"white"});o.call(this,_.extend({content:r,accessibleContent:{focusHighlight:(new a).circle(0,0,e),createPeer:function(e){var i=document.createElement("input");return i.value=u,i.type="reset",i.tabIndex="0",i.addEventListener("click",function(){t.listener()}),new n(e,i)}}},t))}var i=t("SCENERY/util/Color"),n=t("SCENERY/accessibility/AccessiblePeer"),r=t("PHET_CORE/inherit"),s=t("SCENERY/nodes/Path"),a=t("KITE/Shape"),o=t("SUN/buttons/RoundPushButton"),h=t("SCENERY_PHET/ResetAllShape"),l=t("SCENERY_PHET/sceneryPhet"),u=t("string!SCENERY_PHET/ResetAllButton.name"),c=24;return l.register("ResetAllButton",e),r(o,e)}),i("SUN/buttons/ToggleButtonInteractionStateProperty",["require","AXON/DerivedProperty","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(t){i.call(this,[t.overProperty,t.downProperty,t.enabledProperty],function(t,e,i){return i?t&&!e?"over":e?"pressed":"idle":"disabled"})}var i=t("AXON/DerivedProperty"),n=t("PHET_CORE/inherit"),r=t("SUN/sun");return r.register("ToggleButtonInteractionStateProperty",e),n(i,e)}),i("SUN/buttons/ToggleButtonModel",["require","SUN/buttons/ButtonModel","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(t,e,n){var r=this;this.valueOff=t,this.valueOn=e,this.valueProperty=n,i.call(this);var s=function(t){r.enabled&&r.over&&(t||r.toggle())};this.property("down").link(s),this.disposeToggleButtonModel=function(){r.property("down").unlink(s)}}var i=t("SUN/buttons/ButtonModel"),n=t("PHET_CORE/inherit"),r=t("SUN/sun");return r.register("ToggleButtonModel",e),n(i,e,{dispose:function(){i.prototype.dispose.call(this),this.disposeToggleButtonModel()},toggle:function(){var t=this.valueProperty.value,e=this.valueProperty.value===this.valueOff?this.valueOn:this.valueOff;this.trigger2("startedCallbacksForToggled",t,e),this.valueProperty.value=e,this.trigger0("endedCallbacksForToggled")}})}),i("SUN/buttons/RoundToggleButton",["require","PHET_CORE/inherit","SUN/buttons/RoundButtonView","SUN/sun","SUN/buttons/ToggleButtonInteractionStateProperty","SUN/buttons/ToggleButtonModel"],function(t){"use strict";function e(t,e,i,r){var o=this;r=_.extend({tandem:null},r),this.toggleButtonModel=new a(t,e,i),n.call(this,this.toggleButtonModel,new s(this.toggleButtonModel),r),r.tandem&&r.tandem.addInstance(this),this.disposeRoundToggleButton=function(){r.tandem&&r.tandem.removeInstance(this),o.toggleButtonModel.dispose()}}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RoundButtonView"),r=t("SUN/sun"),s=t("SUN/buttons/ToggleButtonInteractionStateProperty"),a=t("SUN/buttons/ToggleButtonModel");return r.register("RoundToggleButton",e),i(n,e,{dispose:function(){this.disposeRoundToggleButton()}})}),i("SUN/ToggleNode",["require","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","PHET_CORE/inherit","SUN/sun"],function(t){"use strict";function e(t,e,r,s){s=_.extend({wrapChildren:!0},s);var a=this;i.call(a);var o=n.bounds(t.bounds.union(e.bounds),{visible:!1});this.addChild(o);var h=s.wrapChildren?new i({children:[t]}):t,l=s.wrapChildren?new i({children:[e]}):e;this.addChild(l),this.addChild(h),r.link(function(t){h.setVisible(t),l.setVisible(!t)}),s&&this.mutate(s)}var i=t("SCENERY/nodes/Node"),n=t("SCENERY/nodes/Rectangle"),r=t("PHET_CORE/inherit"),s=t("SUN/sun");return s.register("ToggleNode",e),r(i,e)}),i("SUN/buttons/BooleanRoundToggleButton",["require","PHET_CORE/inherit","SUN/buttons/RoundToggleButton","SUN/sun","SUN/ToggleNode"],function(t){"use strict";function e(t,e,i,r){n.call(this,!1,!0,i,_.extend({content:new s(t,e,i)},r))}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RoundToggleButton"),r=t("SUN/sun"),s=t("SUN/ToggleNode");return r.register("BooleanRoundToggleButton",e),i(n,e)}),i("SCENERY_PHET/buttons/PlayPauseButton",["require","PHET_CORE/inherit","SUN/buttons/BooleanRoundToggleButton","KITE/Shape","SCENERY/nodes/Path","SCENERY/nodes/Circle","SCENERY/nodes/HBox","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){e=_.extend({radius:u},e);var i=e.radius,l=.8*e.radius,c=.2*e.radius,d=i,m=new s((new r).moveTo(0,i/2).lineTo(l,0).lineTo(0,-i/2).close(),{fill:"black"}),f=function(){return new h(0,0,c,d,{fill:"black"})},p=f(),g=f(),b=new o({children:[p,g],spacing:c}),v=new a(e.radius);m.centerX=.05*e.radius,m.centerY=0,v.addChild(m);var E=new a(e.radius);b.centerX=0,b.centerY=0,E.addChild(b),n.call(this,E,v,t,e)}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/BooleanRoundToggleButton"),r=t("KITE/Shape"),s=t("SCENERY/nodes/Path"),a=t("SCENERY/nodes/Circle"),o=t("SCENERY/nodes/HBox"),h=t("SCENERY/nodes/Rectangle"),l=t("SCENERY_PHET/sceneryPhet"),u=28;return l.register("PlayPauseButton",e),i(n,e)}),i("SCENERY_PHET/buttons/StepButton",["require","PHET_CORE/inherit","SUN/buttons/RoundPushButton","KITE/Shape","SCENERY/nodes/Path","SCENERY/nodes/Rectangle","SCENERY/nodes/HBox","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e,i){i=_.extend({radius:l,fireOnHold:!0},i);var h=this,u=.15*i.radius,c=.9*i.radius,d=.65*i.radius,m=c,f=new a(0,0,u,c,{fill:"black"}),p=new s((new r).moveTo(0,m/2).lineTo(d,0).lineTo(0,-m/2).close(),{fill:"black"});n.call(this,_.extend({content:new o({children:[f,p],spacing:u}),listener:t,radius:i.radius,xContentOffset:.075*i.radius},i)),this.enabled=!1,e.link(function(t){h.enabled=!t})}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RoundPushButton"),r=t("KITE/Shape"),s=t("SCENERY/nodes/Path"),a=t("SCENERY/nodes/Rectangle"),o=t("SCENERY/nodes/HBox"),h=t("SCENERY_PHET/sceneryPhet"),l=20;return h.register("StepButton",e),i(n,e)}),i("SCENERY_PHET/RulerNode",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","KITE/Shape","SCENERY/nodes/Text","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e,i,s,l,c){c=_.extend({backgroundFill:"rgb(236, 225, 113)",backgroundStroke:"black",backgroundLineWidth:1,insetsWidth:14,majorTickFont:u,majorTickHeight:.4*e/2,majorTickStroke:"black",majorTickLineWidth:1,minorTickFont:u,minorTickHeight:.2*e/2,minorTickStroke:"black",minorTickLineWidth:1,minorTicksPerMajorTick:0,unitsFont:u,unitsMajorTickIndex:0,unitsSpacing:3,tickMarksOnTop:!0,tickMarksOnBottom:!0},c),n.call(this);var d=new a(0,0,t+2*c.insetsWidth,e,{fill:c.backgroundFill,stroke:c.backgroundStroke,lineWidth:c.backgroundLineWidth});this.addChild(d);var m=i/(c.minorTicksPerMajorTick+1),f=Math.floor(t/m)+1,p=c.insetsWidth,g=0,b=new o,v=new o,E=new h(l,{font:c.unitsFont,pickable:!1}),S=Number.POSITIVE_INFINITY;this.addChild(E);for(var y=0;f>y;y++){if(y%(c.minorTicksPerMajorTick+1)===0){var C=s[g],w=new h(C,{font:c.majorTickFont,centerX:p,centerY:d.centerY,pickable:!1});(0!==c.insetsWidth||0!==y&&y!==f-1)&&(C&&this.addChild(w),c.tickMarksOnTop&&b.moveTo(p,0).lineTo(p,c.majorTickHeight),c.tickMarksOnBottom&&b.moveTo(p,e-c.majorTickHeight).lineTo(p,e)),g===c.unitsMajorTickIndex?(E.left=w.right+c.unitsSpacing,E.y=w.y):g>c.unitsMajorTickIndex&&S===Number.POSITIVE_INFINITY&&w.width>0&&E.right>w.left-c.unitsSpacing&&(S=w.left-c.unitsSpacing-E.left,E.maxWidth=S),g++}else(0!==c.insetsWidth||0!==y&&y!==f-1)&&(c.tickMarksOnTop&&v.moveTo(p,0).lineTo(p,c.minorTickHeight),c.tickMarksOnBottom&&v.moveTo(p,e-c.minorTickHeight).lineTo(p,e));p+=m}E.bounds.maxX>d.bounds.maxX-c.unitsSpacing&&(S=d.bounds.maxX-c.unitsSpacing-E.x,E.scale(S/E.width)),this.addChild(new r(b,{stroke:c.majorTickStroke,lineWidth:c.majorTickLineWidth,pickable:!1})),this.addChild(new r(v,{stroke:c.minorTickStroke,lineWidth:c.minorTickLineWidth,pickable:!1})),this.mutate(c)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/PhetFont"),a=t("SCENERY/nodes/Rectangle"),o=t("KITE/Shape"),h=t("SCENERY/nodes/Text"),l=t("SCENERY_PHET/sceneryPhet"),u=new s(18);return l.register("RulerNode",e),i(n,e)}),i("SUN/VerticalCheckBoxGroup",["require","SUN/CheckBox","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY/nodes/Path","SCENERY/nodes/Rectangle","KITE/Shape","SUN/sun","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,e){e=_.extend({spacing:10,padding:8,checkBoxColor:"black",align:"left",boxWidth:21,tabIndex:"0"},e);for(var r=0,h=0;h<t.length;h++)r=Math.max(r,t[h].content.width);var u=[];for(h=0;h<t.length;h++)!function(h){var l=t[h].indent||0,c=new s(o.rect(0,0,r+e.padding-l,0),{children:[t[h].content]}),d=new i(c,t[h].property,{textDescription:t[h].label+": Checkbox (unchecked)",checkBoxColor:e.checkBoxColor,boxWidth:e.boxWidth,tabIndex:e.tabIndex,accessibleLabel:t[h].label});if(d.mouseArea=d.touchArea=o.bounds(d.bounds.dilatedXY(5,e.spacing/2)),t[h].indent){var m=new n({children:[new a(0,0,t[h].indent,1),d]});u.push(m)}else{var f=new n({children:[d]});u.push(f)}}(h);e.children=u,l.call(this,e)}var i=t("SUN/CheckBox"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("SCENERY/nodes/Path"),a=t("SCENERY/nodes/Rectangle"),o=t("KITE/Shape"),h=t("SUN/sun"),l=t("SCENERY/nodes/VBox");return h.register("VerticalCheckBoxGroup",e),r(l,e)}),i("DOT/Range",["require","DOT/dot"],function(t){"use strict";function e(t,e,i){this.min=t,this.max=e,this.defaultValue=void 0===i?t:i}var i=t("DOT/dot");return i.register("Range",e),e.prototype={constructor:e,copy:function(){return new e(this.min,this.max,this.defaultValue)},getLength:function(){return this.max-this.min},getCenter:function(){return(this.max+this.min)/2},contains:function(t){return t>=this.min&&t<=this.max},containsRange:function(t){return this.min<=t.min&&this.max>=t.max},intersects:function(t){return this.max>=t.min&&t.max>=this.min},intersectsExclusive:function(t){return this.max>t.min&&t.max>this.min},toString:function(){return"[Range (min:"+this.min+" max:"+this.max+" defaultValue:"+this.defaultValue+")]"},constrainValue:function(t){return Math.min(Math.max(t,this.min),this.max)},equals:function(t){return this.min===t.min&&this.max===t.max&&this.defaultValue===this.defaultValue}},e}),i("SCENERY_PHET/buttons/ArrowButton",["require","PHET_CORE/inherit","SCENERY/nodes/Path","SUN/buttons/RectangularPushButton","KITE/Shape","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e,i){var a=this;i=_.extend({cursor:"pointer",baseColor:"white",stroke:"black",lineWidth:1,cornerRadius:4,xMargin:7,yMargin:5,touchAreaXDilation:7,touchAreaYDilation:7,arrowHeight:o,arrowWidth:o*Math.sqrt(3)/2,arrowFill:"black",arrowStroke:null,arrowLineWidth:1,fireOnHold:!0,fireOnHoldDelay:400,fireOnHoldInterval:100,startCallback:function(){},endCallback:function(t){}},i),i.listener=e;var h;if("up"===t)h=(new s).moveTo(i.arrowHeight/2,0).lineTo(i.arrowHeight,i.arrowWidth).lineTo(0,i.arrowWidth).close();else if("down"===t)h=(new s).moveTo(0,0).lineTo(i.arrowHeight,0).lineTo(i.arrowHeight/2,i.arrowWidth).close();else if("left"===t)h=(new s).moveTo(0,i.arrowHeight/2).lineTo(i.arrowWidth,0).lineTo(i.arrowWidth,i.arrowHeight).close();else{if("right"!==t)throw new Error("unsupported direction: "+t);h=(new s).moveTo(0,0).lineTo(i.arrowWidth,i.arrowHeight/2).lineTo(0,i.arrowHeight).close()}i.content=new n(h,{fill:i.arrowFill,stroke:i.arrowStroke,lineWidth:i.arrowLineWidth,pickable:!1}),r.call(a,i)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Path"),r=t("SUN/buttons/RectangularPushButton"),s=t("KITE/Shape"),a=t("SCENERY_PHET/sceneryPhet"),o=20;return a.register("ArrowButton",e),i(r,e)}),i("SUN/TandemDragHandler",["require","BRAND/Brand","AXON/Emitter","PHET_CORE/inherit","SCENERY/input/SimpleDragHandler","SUN/sun"],function(t){"use strict";function e(t){t=_.extend({tandem:null},t),this.startedCallbacksForDragStartedEmitter=new n,this.endedCallbacksForDragStartedEmitter=new n,this.startedCallbacksForDraggedEmitter=new n,this.endedCallbacksForDraggedEmitter=new n,this.startedCallbacksForDragEndedEmitter=new n,this.endedCallbacksForDragEndedEmitter=new n;var e=_.clone(t);if("phet-io"===i.id){var r=this;e.start=function(e,i){r.startedCallbacksForDragStartedEmitter.emit2(e.pointer.point.x,e.pointer.point.y),t.start&&t.start(e,i),r.endedCallbacksForDragStartedEmitter.emit()},e.drag=function(e,i){r.startedCallbacksForDraggedEmitter.emit2(e.pointer.point.x,e.pointer.point.y),t.drag&&t.drag(e,i),r.endedCallbacksForDraggedEmitter.emit()},e.end=function(e,i){r.startedCallbacksForDragEndedEmitter.emit(),t.end&&t.end(e,i),r.endedCallbacksForDragEndedEmitter.emit()}}s.call(this,e),t.tandem&&t.tandem.addInstance(this),this.disposeTandemDragHandler=function(){t.tandem&&t.tandem.removeInstance(r)}}var i=t("BRAND/Brand"),n=t("AXON/Emitter"),r=t("PHET_CORE/inherit"),s=t("SCENERY/input/SimpleDragHandler"),a=t("SUN/sun");return a.register("TandemDragHandler",e),r(s,e,{dispose:function(){this.disposeTandemDragHandler()}})}),i("SUN/SliderTrack",["require","DOT/Dimension2","PHET_CORE/inherit","SCENERY/nodes/Node","AXON/Property","SCENERY/nodes/Rectangle","SUN/TandemDragHandler","SUN/sun"],function(t){"use strict";function e(t,e,n,h){var l=this;r.call(l),h=_.extend({trackSize:new i(100,5),trackFillEnabled:"white",trackFillDisabled:"gray",trackStroke:"black",trackLineWidth:1,enabledRangeProperty:new s(e),cursor:"pointer",enabledProperty:new s(!0),snapValue:null,startDrag:function(){},endDrag:function(){},constrainValue:function(t){return t},tandem:null},h),this.options=h,this.enabledProperty=h.enabledProperty,this.enabledRangeProperty=h.enabledRangeProperty,l.disabledTrack=new a(0,0,h.trackSize.width,h.trackSize.height,{fill:h.trackFillDisabled,stroke:h.trackStroke,lineWidth:h.trackLineWidth}),l.addChild(l.disabledTrack),l.enabledTrack=new a(0,0,h.trackSize.width,h.trackSize.height,{fill:h.trackFillEnabled,stroke:h.trackStroke,ineWidth:h.trackLineWidth}),l.addChild(l.enabledTrack);var u=function(i){if(!(i<=e.max&&i>=e.min))throw new Error("snapValue must be within slider range");t.set(i)},c=function(e,i){if(l.enabledProperty.get()){var r=i.subtrailTo(l).getTransform(),s=r.inversePosition2(e.pointer.point).x,a=n.inverse(s),o=h.constrainValue(a);t.set(o)}},d=new o({tandem:h.tandem?h.tandem.createTandem("trackInputListener"):null,start:function(t,e){l.enabledProperty.get()&&(h.startDrag(),c(t,e))},drag:function(t,e){c(t,e)},end:function(){l.enabledProperty.get()&&("number"==typeof h.snapValue&&u(h.snapValue),h.endDrag())}});l.enabledTrack.addInputListener(d);
var m=function(t){l.cursor=l.enabledProperty.get()?h.cursor:"default",l.enabledTrack.visible=t,t||d.dragging&&d.endDrag()};l.enabledProperty.link(m);var f=function(t){var e=n(t.min),i=n(t.max),r=i-e;l.enabledTrack.setRect(e,0,r,l.options.trackSize.height)};this.enabledRangeProperty.link(f),this.disposeSliderTrack=function(){l.enabledProperty.unlink(m),l.enabledRangeProperty.unlink(f),h.tandem&&h.tandem.removeInstance(l),d.dispose()},l.mutate(h),h.tandem&&h.tandem.addInstance(this)}var i=t("DOT/Dimension2"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Node"),s=t("AXON/Property"),a=t("SCENERY/nodes/Rectangle"),o=t("SUN/TandemDragHandler"),h=t("SUN/sun");return h.register("SliderTrack",e),n(r,e,{dispose:function(){this.disposeSliderTrack()},setEnabled:function(t){this.enabledProperty.value=t},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this.enabledProperty.value},get enabled(){return this.getEnabled()},setEnabledRange:function(t){this.enabledRangeProperty.value=t},set enabledRange(t){this.setEnabledRange(t)},getEnabledRange:function(){return this.enabledRangeProperty.value},get enabledRange(){return this.getEnabledRange()}}),e}),i("DOT/LinearFunction",["require","DOT/dot","DOT/Util"],function(t){"use strict";function e(t,e,n,r,s){s=_.isUndefined(s)?!1:s;var a=function(t,e,n,r,s,a){var o=i.Util.linear(t,e,n,r,s);if(a){var h=Math.max(n,r),l=Math.min(n,r);o=i.Util.clamp(o,l,h)}return o},o=function(i){return a(t,e,n,r,i,s)};return o.inverse=function(i){return a(n,r,t,e,i,s)},o}var i=t("DOT/dot");return t("DOT/Util"),i.register("LinearFunction",e),e}),i("SUN/HSlider",["require","SCENERY/input/ButtonListener","DOT/Dimension2","PHET_CORE/inherit","SCENERY/input/Input","SUN/SliderTrack","DOT/LinearFunction","SCENERY/nodes/Node","SCENERY/nodes/Path","AXON/Property","SCENERY/nodes/Rectangle","KITE/Shape","SUN/TandemDragHandler","SUN/sun","DOT/Util"],function(t){"use strict";function e(t,e,n){var s=this;l.call(s),n=_.extend({trackSize:new r(100,5),enabledRangeProperty:new c(e),thumbNode:null,tickLabelSpacing:6,majorTickLength:25,majorTickStroke:"black",majorTickLineWidth:1,minorTickLength:10,minorTickStroke:"black",minorTickLineWidth:1,cursor:"pointer",enabledProperty:new c(!0),snapValue:null,startDrag:function(){},endDrag:function(){},constrainValue:function(t){return t},tandem:null},n),this.options=n,this.enabledProperty=n.enabledProperty,this.enabledRangeProperty=n.enabledRangeProperty,s.majorTicksParent=new l,s.minorTicksParent=new l,s.addChild(s.majorTicksParent),s.addChild(s.minorTicksParent),s.valueToPosition=new h(e.min,e.max,0,n.trackSize.width,!0),s.track=new o(t,e,s.valueToPosition,n),s.track.centerX=s.valueToPosition((e.max+e.min)/2),s.addChild(s.track);var u=function(i){if(!(i<=e.max&&i>=e.min))throw new Error("snapValue must be within slider range");t.set(i)},d=n.thumbNode||new i(this.enabledProperty,n);if(d.centerY=s.track.centerY,s.addChild(d),!n.thumbNode){var p=.5*d.width,b=.25*d.height;d.touchArea=m.rectangle(-d.width/2-p,-d.height/2-b,d.width+p+p,d.height+b+b)}var v=0,E=new f({tandem:n.tandem?n.tandem.createTandem("thumbInputListener"):null,allowTouchSnag:!0,start:function(t,e){if(s.enabledProperty.get()){n.startDrag();var i=e.subtrailTo(s).getTransform();v=i.inversePosition2(t.pointer.point).x-d.x}},drag:function(e,i){if(s.enabledProperty.get()){var r=i.subtrailTo(s).getTransform(),a=r.inversePosition2(e.pointer.point).x-v,o=s.valueToPosition.inverse(a);t.set(n.constrainValue(o))}},end:function(){s.enabledProperty.get()&&("number"==typeof n.snapValue&&u(n.snapValue),n.endDrag())}});d.addInputListener(E),d.addInputListener({keydown:function(i,r){if(s.enabledProperty.get()){var o=i.domEvent.keyCode,h=o===a.KEY_LEFT_ARROW||o===a.KEY_DOWN_ARROW?-1:o===a.KEY_RIGHT_ARROW||o===a.KEY_UP_ARROW?1:0,l=g.clamp(t.get()+.1*(e.max-e.min)*h,e.min,e.max);t.set(n.constrainValue(l))}}});var S=function(t){s.cursor=s.enabledProperty.get()?n.cursor:"default",t||E.dragging&&E.endDrag(),s.pickable=t};s.enabledProperty.link(S);var y=function(t){d.centerX=s.valueToPosition(t)};t.link(y);var C=function(i){var r=new h(e.min,e.max,0,n.trackSize.width,!0),a=r(i.min),o=r(i.max);s.valueToPosition=new h(i.min,i.max,a,o,!0),t.set(g.clamp(t.value,i.min,i.max))};this.enabledRangeProperty.link(C),this.disposeHSlider=function(){d.dispose&&d.dispose(),t.unlink(y),s.enabledRangeProperty.unlink(C),s.enabledProperty.unlink(S),n.tandem&&n.tandem.removeInstance(s),E.dispose()},s.mutate(n),n.tandem&&n.tandem.addInstance(this)}function i(t,e){e=_.extend({thumbSize:new r(22,45),thumbFillEnabled:"rgb(50,145,184)",thumbFillHighlighted:"rgb(71,207,255)",thumbFillDisabled:"#F0F0F0",thumbStroke:"black",thumbLineWidth:1,thumbCenterLineStroke:"white"},e);var i=this,s=.25*e.thumbSize.width;d.call(i,-e.thumbSize.width/2,-e.thumbSize.height/2,e.thumbSize.width,e.thumbSize.height,s,s,{fill:t.get()?e.thumbFillEnabled:e.thumbFillDisabled,stroke:e.thumbStroke,lineWidth:e.thumbLineWidth,cachedPaints:[e.thumbFillHighlighted,e.thumbFillEnabled,e.thumbFillDisabled]});var a=3;i.addChild(new u(m.lineSegment(0,-(e.thumbSize.height/2)+a,0,e.thumbSize.height/2-a),{stroke:e.thumbCenterLineStroke})),i.addInputListener(new n({over:function(n){t.get()&&(i.fill=e.thumbFillHighlighted)},up:function(n){t.get()&&(i.fill=e.thumbFillEnabled)}}));var o=function(t){i.fill=t?e.thumbFillEnabled:e.thumbFillDisabled};t.link(o),this.disposeThumbNode=function(){t.unlink(o)}}var n=t("SCENERY/input/ButtonListener"),r=t("DOT/Dimension2"),s=t("PHET_CORE/inherit"),a=t("SCENERY/input/Input"),o=t("SUN/SliderTrack"),h=t("DOT/LinearFunction"),l=t("SCENERY/nodes/Node"),u=t("SCENERY/nodes/Path"),c=t("AXON/Property"),d=t("SCENERY/nodes/Rectangle"),m=t("KITE/Shape"),f=t("SUN/TandemDragHandler"),p=t("SUN/sun"),g=t("DOT/Util");return p.register("HSlider",e),s(l,e,{dispose:function(){this.disposeHSlider()},addMajorTick:function(t,e){this.addTick(this.majorTicksParent,t,e,this.options.majorTickLength,this.options.majorTickStroke,this.options.majorTickLineWidth)},addMinorTick:function(t,e){this.addTick(this.minorTicksParent,t,e,this.options.minorTickLength,this.options.minorTickStroke,this.options.minorTickLineWidth)},addTick:function(t,e,i,n,r,s){var a=this.valueToPosition(e),o=new u((new m).moveTo(a,this.track.top).lineTo(a,this.track.top-n),{stroke:r,lineWidth:s});t.addChild(o),i&&(t.addChild(i),i.centerX=o.centerX,i.bottom=o.top-this.options.tickLabelSpacing)},setEnabled:function(t){this.enabledProperty.value=t},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this.enabledProperty.value},get enabled(){return this.getEnabled()},setEnabledRange:function(t){this.enabledRangeProperty.value=t},set enabledRange(t){this.setEnabledRange(t)},getEnabledRange:function(){return this.enabledRangeProperty.value},get enabledRange(){return this.getEnabledRange()},setMajorTicksVisible:function(t){this.majorTicksParent.visible=t},set majorTicksVisible(t){this.setMajorTicksVisible(t)},getMajorTicksVisible:function(){return this.majorTicksParent.visible},get majorTicksVisible(){return this.getMajorTicksVisible()},setMinorTicksVisible:function(t){this.minorTicksParent.visible=t},set minorTicksVisible(t){this.setMinorTicksVisible(t)},getMinorTicksVisible:function(){return this.minorTicksParent.visible},get minorTicksVisible(){return this.getMinorTicksVisible()}}),p.register("HSlider.ThumbNode",i),s(d,i,{dispose:function(){this.disposeThumbNode()}}),e}),i("WAVE_ON_A_STRING/wave-on-a-string/Constants",["require","DOT/Dimension2","DOT/Bounds2","DOT/Range","DOT/Vector2","SCENERY/util/Color","SCENERY/util/LinearGradient","SCENERY/util/RadialGradient","SCENERY/input/SimpleDragHandler","SCENERY/nodes/Node","SCENERY/nodes/Image"],function(t){"use strict";var e=t("DOT/Dimension2"),i=t("DOT/Bounds2"),n=t("DOT/Range"),r=t("DOT/Vector2"),s=t("SCENERY/util/Color"),a=t("SCENERY/util/LinearGradient"),o=t("SCENERY/util/RadialGradient"),h=t("SCENERY/input/SimpleDragHandler"),l=t("SCENERY/nodes/Node"),u=t("SCENERY/nodes/Image"),c=new r,d={projectName:"wave-on-a-string",viewSize:new e(768,504),blueUpColor:new s("hsl(210,70%,75%)"),blueOverColor:new s("hsl(210,90%,80%)"),blueDisabledColor:new s("rgb(180,180,180)"),blueDownColor:new s("hsl(210,80%,70%)"),radioColor:new s("hsl(210,90%,77%)"),sliderUp:new s("hsl(210,50%,63%)"),sliderOver:new s("hsl(210,70%,73%)"),buttonBorder0:new s("transparent"),buttonBorder1:new s("transparent"),dilatedTouchArea:10,dilatedReferenceLineTouchArea:20,segmentTheStringNodeRadius:5,yTheStringNode:215,startTheStringNode:70,endTheStringNode:670,yWrenchRange:new n(-100,100),maxWidthBottomControlPanel:1e3,tensionRange:new n(0,2),dampingRange:new n(0,100),frequencyRange:new n(0,3),pulseWidthRange:new n(.2,1),amplitudeRange:new n(0,1.25),postGradient:new a(-5,0,5,0).addColorStop(0,"#666").addColorStop(.3,"#FFF").addColorStop(1,"#666"),referenceLineBlockGradient:new a(0,-10,0,20).addColorStop(0,"#78571C").addColorStop(.3,"#D3B072").addColorStop(1,"#78571C"),segmentTheStringNodeGradient:function(t){return new o(.5*-t.radius,.5*-t.radius,1,.5*-t.radius,.5*-t.radius,t.radius).addColorStop(0,"#FFF").addColorStop(.3,t.color)},windowScale:.6,windowXOffset:5,windowShift:1,offsetWheel:new r(0,156),dragAndDropHandler:function(t,e,i,n){return new h({start:function(e,n){c=t.globalToParentPoint(e.pointer.point).minus(e.currentTarget.translation),i&&i(e,n)},drag:function(i){e(t.globalToParentPoint(i.pointer.point).minus(c))},end:function(t,e){n&&n(t,e)}})}};return d.viewBounds=d.viewSize.toBounds(),d.boundedDragHandler=function(t,e,i){var n=d.viewBounds.eroded(i),s=new r;t.addInputListener(new h({start:function(e){s=t.globalToParentPoint(e.pointer.point).minus(e.currentTarget.translation)},drag:function(i){var a=t.globalToParentPoint(i.pointer.point).minus(s);e.set(a),t.right<n.minX&&e.set(new r(e.get().x-t.right+n.minX,e.get().y)),t.left>n.maxX&&e.set(new r(e.get().x-t.left+n.maxX,e.get().y)),t.bottom<n.minY&&e.set(new r(e.get().x,e.get().y-t.bottom+n.minY)),t.top>n.maxY&&e.set(new r(e.get().x,e.get().y-t.top+n.maxY))}}))},d.toImageNode=function(t,e,n,r,s){t.width=e,t.height=n;var a=document.createElement("canvas");a.width=e*r,a.height=n*r;var o=a.getContext("2d");o.scale(r,r),o.drawImage(t,0,0);var h;try{h=a.toDataURL()}catch(c){h=a}var d=new u(h,{scale:1/r});return d.localBounds=new i(0,0,e*r,n*r),new l(_.extend({children:[d]},s))},d}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/slider/Slider",["require","PHET_CORE/inherit","DOT/Dimension2","DOT/Range","DOT/Util","AXON/Property","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY/nodes/Text","SCENERY_PHET/buttons/ArrowButton","SCENERY_PHET/PhetFont","SUN/HSlider","PHETCOMMON/util/StringUtils","WAVE_ON_A_STRING/wave-on-a-string/Constants"],function(t){"use strict";function e(t){var e=this,i={type:"simple",property:new a(0),range:new r(0,100),sliderSize:new n(200,110),tick:{step:1,minText:"",maxText:""},title:"",patternValueUnit:"",buttonStep:1,rounding:!1,trackSize:new n(140,2),trackFill:"black",thumbSize:new n(22,38),thumbFillEnabled:f.sliderUp,thumbFillHighlighted:f.sliderOver,tickLabelSpacing:4,majorTickLength:20,minorTickLength:8,majorTickLineWidth:1.5,minorTickLineWidth:1.5,titleVerticalOffset:0};o.call(e),t=_.extend({},i,t),t.endDrag||t.rounding===!1||(t.endDrag=function(){t.property.set(s.roundSymmetric(t.property.get()*Math.pow(10,t.rounding))/Math.pow(10,t.rounding))}),e.addChild(new h(0,0,t.sliderSize.width,t.sliderSize.height)),this.addChild(new l(t.title,{centerX:e.width/2,centerY:t.titleVerticalOffset+10,font:new c(18),maxWidth:150}));var p,g,b,v,E=new d(t.property,t.range,t),S=new o({children:[E],x:(e.width-t.trackSize.width)/2,bottom:e.height-0});if(e.addChild(S),"simple"===t.type&&t.tick&&t.tick.step)for(var y=t.range.min;y<=t.range.max;y+=t.tick.step)y===t.range.max?E.addMajorTick(y,new l(t.tick.maxText,{font:new c(15),maxWidth:55})):y===t.range.min?E.addMajorTick(y,new l(t.tick.minText,{font:new c(15),maxWidth:55})):y===(t.range.min+t.range.max)/2?E.addMajorTick(y):E.addMinorTick(y);if("button"===t.type){p=new o({y:25});var C=function(e){return function(){t.property.set(Math.max(Math.min(t.property.get()+e,t.range.max),t.range.min))}};p.addChild(g=new u("right",C(t.buttonStep),{right:e.width-15,centerY:15})),p.addChild(b=new u("left",C(-t.buttonStep),{left:15,centerY:15})),p.addChild(new h(0,0,90,30,5,5,{fill:"#FFF",stroke:"#000",lineWidth:1,centerX:e.width/2,top:0})),p.addChild(v=new l("0",{font:new c(18),centerX:t.width/2,centerY:13,maxWidth:80})),this.addChild(p)}e.mutate(_.extend(_.omit(t,Object.keys(i)),{x:t.sliderX})),t.property.link(function(i){if("button"===t.type){var n=i;t.rounding!==!1&&t.rounding>=0&&(n=s.toFixed(t.property.get(),t.rounding)),v.text=m.format(t.patternValueUnit,n),v.centerX=e.width/2,g.enabled=i<t.range.max,b.enabled=i>t.range.min}})}var i=t("PHET_CORE/inherit"),n=t("DOT/Dimension2"),r=t("DOT/Range"),s=t("DOT/Util"),a=t("AXON/Property"),o=t("SCENERY/nodes/Node"),h=t("SCENERY/nodes/Rectangle"),l=t("SCENERY/nodes/Text"),u=t("SCENERY_PHET/buttons/ArrowButton"),c=t("SCENERY_PHET/PhetFont"),d=t("SUN/HSlider"),m=t("PHETCOMMON/util/StringUtils"),f=t("WAVE_ON_A_STRING/wave-on-a-string/Constants");return i(o,e),e}),i("string!WAVE_ON_A_STRING/rulers",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/rulers")}),i("string!WAVE_ON_A_STRING/timer",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/timer")}),i("string!WAVE_ON_A_STRING/referenceLine",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/referenceLine")}),i("string!WAVE_ON_A_STRING/tension",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/tension")}),i("string!WAVE_ON_A_STRING/damping",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/damping")}),i("string!WAVE_ON_A_STRING/low",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/low")}),i("string!WAVE_ON_A_STRING/high",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/high")}),i("string!WAVE_ON_A_STRING/none",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/none")}),i("string!WAVE_ON_A_STRING/lots",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/lots")}),i("string!WAVE_ON_A_STRING/frequency",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/frequency")}),i("string!WAVE_ON_A_STRING/patternValueUnitHz",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/patternValueUnitHz")}),i("string!WAVE_ON_A_STRING/pulseWidth",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/pulseWidth")}),i("string!WAVE_ON_A_STRING/patternValueUnitS",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/patternValueUnitS")}),i("string!WAVE_ON_A_STRING/amplitude",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/amplitude")}),i("string!WAVE_ON_A_STRING/patternValueUnitCm",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/patternValueUnitCm")}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/BottomControlPanel",["require","PHET_CORE/inherit","DOT/Dimension2","SCENERY/nodes/Node","SCENERY/nodes/Line","SCENERY/nodes/Text","SCENERY_PHET/PhetFont","SUN/Panel","SUN/VerticalCheckBoxGroup","WAVE_ON_A_STRING/wave-on-a-string/view/control/slider/Slider","WAVE_ON_A_STRING/wave-on-a-string/Constants","string!WAVE_ON_A_STRING/rulers","string!WAVE_ON_A_STRING/timer","string!WAVE_ON_A_STRING/referenceLine","string!WAVE_ON_A_STRING/tension","string!WAVE_ON_A_STRING/damping","string!WAVE_ON_A_STRING/low","string!WAVE_ON_A_STRING/high","string!WAVE_ON_A_STRING/none","string!WAVE_ON_A_STRING/lots","string!WAVE_ON_A_STRING/frequency","string!WAVE_ON_A_STRING/patternValueUnitHz","string!WAVE_ON_A_STRING/pulseWidth","string!WAVE_ON_A_STRING/patternValueUnitS","string!WAVE_ON_A_STRING/amplitude","string!WAVE_ON_A_STRING/patternValueUnitCm"],function(t){"use strict";function e(t){r.call(this,{x:30,scale:.7});var e={font:new o(15),maxWidth:130},i=new l([{content:new a(d,e),property:t.rulersProperty,indent:0},{content:new a(m,e),property:t.timerProperty,indent:0},{content:new a(f,e),property:t.referenceLineProperty,indent:0}],{centerY:55}),_=20;i.x=_;var A=new u({sliderX:-180,title:p,property:t.tensionProperty,trackSize:new n(80,2),rounding:0,range:c.tensionRange,titleVerticalOffset:15,tick:{step:1,minText:b,maxText:v}}),P=new u({sliderX:-360,title:g,property:t.dampingProperty,rounding:-1,range:c.dampingRange,titleVerticalOffset:15,tick:{step:10,minText:E,maxText:S}}),x=new u({sliderX:-570,type:"button",buttonStep:.01,title:y,property:t.frequencyProperty,patternValueUnit:C,rounding:2,range:c.frequencyRange}),k=new u({sliderX:-570,type:"button",buttonStep:.01,title:w,property:t.pulseWidthProperty,patternValueUnit:T,rounding:2,range:c.pulseWidthRange}),O=new u({sliderX:-780,type:"button",buttonStep:.01,title:R,property:t.amplitudeProperty,patternValueUnit:N,rounding:2,range:c.amplitudeRange}),D=new s(0,10,0,100,{stroke:"gray",lineWidth:1}),I=new h(new r({children:[O,x,P,A,D,i]}),{fill:"#D9FCC5",xMargin:10,yMargin:5});this.addChild(I);var B=new h(new r({children:[P,A,D,i]}),{fill:"#D9FCC5",xMargin:10,yMargin:5});this.addChild(B);var Y=new h(new r({children:[O,k,P,A,D,i]}),{fill:"#D9FCC5",xMargin:10,yMargin:5});this.addChild(Y),Y.right=B.right=I.right=c.maxWidthBottomControlPanel-60+_,this.bottom=c.viewSize.height-10,t.modeProperty.link(function(t){I.setVisible("oscillate"===t),B.setVisible("manual"===t),Y.setVisible("pulse"===t)})}var i=t("PHET_CORE/inherit"),n=t("DOT/Dimension2"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Line"),a=t("SCENERY/nodes/Text"),o=t("SCENERY_PHET/PhetFont"),h=t("SUN/Panel"),l=t("SUN/VerticalCheckBoxGroup"),u=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/slider/Slider"),c=t("WAVE_ON_A_STRING/wave-on-a-string/Constants"),d=t("string!WAVE_ON_A_STRING/rulers"),m=t("string!WAVE_ON_A_STRING/timer"),f=t("string!WAVE_ON_A_STRING/referenceLine"),p=t("string!WAVE_ON_A_STRING/tension"),g=t("string!WAVE_ON_A_STRING/damping"),b=t("string!WAVE_ON_A_STRING/low"),v=t("string!WAVE_ON_A_STRING/high"),E=t("string!WAVE_ON_A_STRING/none"),S=t("string!WAVE_ON_A_STRING/lots"),y=t("string!WAVE_ON_A_STRING/frequency"),C=t("string!WAVE_ON_A_STRING/patternValueUnitHz"),w=t("string!WAVE_ON_A_STRING/pulseWidth"),T=t("string!WAVE_ON_A_STRING/patternValueUnitS"),R=t("string!WAVE_ON_A_STRING/amplitude"),N=t("string!WAVE_ON_A_STRING/patternValueUnitCm");return i(r,e),e}),i("SUN/RadioButton",["require","SCENERY/input/ButtonListener","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SUN/sun","SCENERY/accessibility/AccessiblePeer"],function(t){"use strict";function e(t,e,n,a,h){h=_.extend({cursor:"pointer",tandem:null,enabled:!0,accessibleLabel:""},h);var l=this;r.call(l),this._enabled=h.enabled;var u=new s(n.bounds.union(a.bounds));n.pickable=a.pickable=!1,l.addChild(u),l.addChild(n),l.addChild(a);var c=function(t){n.visible=t===e,a.visible=!n.visible};t.link(c);var d=function(){l.trigger1("startedCallbacksForFired",e),t.set(e),l.trigger0("endedCallbacksForFired")},m=new i({fire:d});l.addInputListener(m),this.mutate(h),h.tandem&&h.tandem.addInstance(this),this.disposeRadioButton=function(){h.tandem&&h.tandem.removeInstance(this),l.removeInputListener(m),t.unlink(c)},this.accessibleContent={createPeer:function(i){var n=i.trail,r=n.getUniqueId(),s=i.parent.id,a=document.createElement("input");return a.id="radio-button-"+r,a.setAttribute("type","radio"),a.setAttribute("role","radio"),a.setAttribute("name",s),a.setAttribute("aria-label",h.accessibleLabel),a.addEventListener("click",function(){d()}),t.link(function(t){var i=t===e;a.setAttribute("aria-checked",i),a.checked=i}),new o(i,a)}}}var i=t("SCENERY/input/ButtonListener"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Rectangle"),a=t("SUN/sun"),o=t("SCENERY/accessibility/AccessiblePeer");return a.register("RadioButton",e),n(r,e,{dispose:function(){this.disposeRadioButton()},setEnabled:function(t){this._enabled=t,this.opacity=t?1:.3,this.pickable=t},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this._enabled},get enabled(){return this.getEnabled()}})}),i("SUN/AquaRadioButton",["require","SCENERY/nodes/Circle","PHET_CORE/inherit","SCENERY/nodes/Node","SUN/RadioButton","SUN/sun"],function(t){"use strict";function e(t,e,n,a){a=_.extend({cursor:"pointer",selectedColor:"rgb( 143, 197, 250 )",deselectedColor:"white",centerColor:"black",radius:16,xSpacing:8,stroke:"black"},a);var o=new r,h=new i(a.radius/3,{fill:a.centerColor}),l=new i(a.radius,{fill:a.selectedColor,stroke:a.stroke});o.addChild(l),o.addChild(h),o.addChild(n),n.left=l.right+a.xSpacing,n.centerY=l.centerY;var u=new r,c=new i(a.radius,{fill:a.deselectedColor,stroke:a.stroke});u.addChild(c),u.addChild(n),n.left=c.right+a.xSpacing,n.centerY=c.centerY,s.call(this,t,e,o,u,a)}var i=t("SCENERY/nodes/Circle"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Node"),s=t("SUN/RadioButton"),a=t("SUN/sun");return a.register("AquaRadioButton",e),n(s,e)}),i("SUN/VerticalAquaRadioButtonGroup",["require","SUN/AquaRadioButton","PHET_CORE/inherit","SCENERY/nodes/Path","KITE/Shape","SUN/sun","SCENERY/nodes/VBox","SCENERY/accessibility/AccessiblePeer"],function(t){"use strict";function e(t,e){e=_.extend({spacing:3,padding:8,radius:12,radioButtonOptions:{},touchAreaXDilation:0,mouseAreaXDilation:0,accessibleLabel:"",accessibleDescription:""},e);for(var n=0,a=0;a<t.length;a++)n=Math.max(n,t[a].node.width);var l=[];for(a=0;a<t.length;a++){var u=new r(s.rect(0,0,n+e.padding,0),{children:[t[a].node]}),c=new i(t[a].property,t[a].value,u,_.extend({},e.radioButtonOptions,{radius:e.radius,accessibleLabel:t[a].accessibleLabel}));c.mouseArea=s.bounds(c.bounds.dilatedXY(e.mouseAreaXDilation,e.spacing/2)),c.touchArea=s.bounds(c.bounds.dilatedXY(e.touchAreaXDilation,e.spacing/2)),l.push(c)}e.children=l,o.call(this,e),this.accessibleContent={createPeer:function(t){var i=t.trail,n=i.getUniqueId(),r=document.createElement("fieldset");r.id="radio-button-group-"+n,r.setAttribute("role","radioGroup");var s=document.createElement("legend");s.id="legend-id-"+n,s.innerHTML=e.accessibleLabel;var a=document.createElement("p");a.id="group-description-"+n,a.textContent=e.accessibleDescription;var o=s.id+" "+a.id;return r.setAttribute("aria-describedby",o),r.appendChild(s),r.appendChild(a),new h(t,r)}}}var i=t("SUN/AquaRadioButton"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Path"),s=t("KITE/Shape"),a=t("SUN/sun"),o=t("SCENERY/nodes/VBox"),h=t("SCENERY/accessibility/AccessiblePeer");return a.register("VerticalAquaRadioButtonGroup",e),n(o,e),e}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/RadioGroup",["require","PHET_CORE/inherit","SCENERY/nodes/Text","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","SUN/VerticalAquaRadioButtonGroup","SUN/Panel","WAVE_ON_A_STRING/wave-on-a-string/Constants"],function(t){"use strict";function e(t){t=_.extend({scale:.5},t),r.call(this);for(var e=t.radio.length,i=[],l=0;e>l;l++)i.push({node:new n(t.text[l],{font:new s(20),maxWidth:250}),property:t.property,value:t.radio[l]});var u=new a(i,{spacing:16,touchAreaXDilation:10,radioButtonOptions:{selectedColor:h.radioColor.toCSS()}}),c=new o(u,{fill:"#D9FCC5",xMargin:14,yMargin:14});this.addChild(t.omitPanel?u:c),this.mutate(t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Text"),r=t("SCENERY/nodes/Node"),s=t("SCENERY_PHET/PhetFont"),a=t("SUN/VerticalAquaRadioButtonGroup"),o=t("SUN/Panel"),h=t("WAVE_ON_A_STRING/wave-on-a-string/Constants");return i(r,e),e}),i("string!WAVE_ON_A_STRING/restart",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/restart")}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/RestartButton",["require","PHET_CORE/inherit","SUN/buttons/TextPushButton","SCENERY_PHET/PhetFont","string!WAVE_ON_A_STRING/restart"],function(t){"use strict";function e(t,e){n.call(this,s,{listener:t.manualRestart.bind(t),font:new r(12),baseColor:"hsl(210,0%,85%)",maxWidth:250}),this.mutate(e),this.touchArea=this.localBounds.dilatedXY(5,20)}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/TextPushButton"),r=t("SCENERY_PHET/PhetFont"),s=t("string!WAVE_ON_A_STRING/restart");return i(n,e),e}),i("SCENERY_PHET/UTurnArrowShape",["require","PHET_CORE/inherit","KITE/Shape","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){n.call(this);var e=.3*t,i=e/2,r=.6*t,s=t,a=.5*t,o=.75*t,h=a/2,l=o/2;this.moveTo(h,-i),this.lineTo(r,-i),this.arc(r,s/2,s/2+i,-Math.PI/2,Math.PI/2,!1),this.lineTo(0,s+i),this.lineTo(0,s-i),this.lineTo(r,s-i),this.arc(r,s/2,s/2-i,Math.PI/2,-Math.PI/2,!0),this.lineTo(h,i),this.lineTo(h,l),this.lineTo(-h,0),this.lineTo(h,-l),this.close()}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("SCENERY_PHET/sceneryPhet");return r.register("UTurnArrowShape",e),i(n,e)}),i("SCENERY_PHET/ShadedRectangle",["require","PHET_CORE/inherit","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY/util/LinearGradient","SCENERY/util/RadialGradient","SCENERY/util/Color","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){r.call(this),e=_.extend({baseColor:new h(80,130,230),lightFactor:.5,lighterFactor:.1,darkFactor:.5,darkerFactor:.1,cornerRadius:10,lightSource:"leftTop",lightOffset:.525,darkOffset:.375},e);var i=e.lightSource.indexOf("left")>=0,u=e.lightSource.indexOf("Top")>=0,c=e.cornerRadius,d=e.baseColor instanceof h?e.baseColor:new h(e.baseColor),m=d.colorUtilsBrighter(e.lightFactor+e.lighterFactor),f=d.colorUtilsBrighter(e.lightFactor),p=d.colorUtilsDarker(e.darkFactor),g=d.colorUtilsDarker(e.darkFactor+e.darkerFactor),b=u?m:g,v=i?f:p,E=i?p:f,S=u?g:m,y=e.lightOffset*c,C=e.darkOffset*c,w=u?y:C,T=i?y:C,R=i?C:y,N=u?C:y,A=l.roundedBounds(t,c,c,{pickable:!1}),P=l.roundedBounds(t,c,c,{pickable:!1});A.fill=new a(A.left,0,A.right,0).addColorStop(0,v).addColorStop(T/P.width,d).addColorStop(1-R/P.width,d).addColorStop(1,E),P.fill=new a(0,P.top,0,P.bottom).addColorStop(0,b).addColorStop(w/P.height,b.withAlpha(0)).addColorStop(1-N/P.height,S.withAlpha(0)).addColorStop(1,S);var x=(new n).moveTo(0,0).arc(0,0,c,-Math.PI/2,0,!1).close(),k={leftTop:-Math.PI/2,rightTop:0,rightBottom:Math.PI/2,leftBottom:Math.PI}[e.lightSource],O=t.eroded(c),D=new s(x,{x:i?O.minX:O.maxX,y:u?O.minY:O.maxY,rotation:k,fill:new o(0,0,0,0,0,c).addColorStop(0,d).addColorStop(1-y/c,d).addColorStop(1,m),pickable:!1}),I=new s(x,{x:i?O.maxX:O.minX,y:u?O.maxY:O.minY,rotation:k+Math.PI,fill:new o(0,0,0,0,0,c).addColorStop(0,d).addColorStop(1-C/c,d).addColorStop(1,g),pickable:!1}),B=l.roundedBounds(t,c,c,{stroke:E.withAlpha(.4)});this.addChild(A),this.addChild(P),this.addChild(D),this.addChild(I),this.addChild(B),this.mutate(e)}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Path"),a=t("SCENERY/util/LinearGradient"),o=t("SCENERY/util/RadialGradient"),h=t("SCENERY/util/Color"),l=t("SCENERY/nodes/Rectangle"),u=t("SCENERY_PHET/sceneryPhet");return u.register("ShadedRectangle",e),i(r,e)}),i("SUN/buttons/RectangularToggleButton",["require","PHET_CORE/inherit","SUN/buttons/RectangularButtonView","SUN/sun","SUN/buttons/ToggleButtonInteractionStateProperty","SUN/buttons/ToggleButtonModel"],function(t){"use strict";function e(t,e,i,r){this.toggleButtonModel=new a(t,e,i,r),n.call(this,this.toggleButtonModel,new s(this.toggleButtonModel),r),r&&r.tandem&&r.tandem.addInstance(this)}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RectangularButtonView"),r=t("SUN/sun"),s=t("SUN/buttons/ToggleButtonInteractionStateProperty"),a=t("SUN/buttons/ToggleButtonModel");return r.register("RectangularToggleButton",e),i(n,e,{dispose:function(){}})}),i("SUN/buttons/BooleanRectangularToggleButton",["require","PHET_CORE/inherit","SUN/buttons/RectangularToggleButton","SUN/sun","SUN/ToggleNode"],function(t){"use strict";function e(t,e,i,r){n.call(this,!1,!0,i,_.extend({content:new s(t,e,i)},r))}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RectangularToggleButton"),r=t("SUN/sun"),s=t("SUN/ToggleNode");return r.register("BooleanRectangularToggleButton",e),i(n,e)}),i("SCENERY_PHET/Timer",["require","PHET_CORE/inherit","DOT/Bounds2","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY/util/Color","SCENERY/nodes/Rectangle","SCENERY/nodes/Text","SCENERY_PHET/PhetFont","SCENERY_PHET/UTurnArrowShape","SCENERY_PHET/ShadedRectangle","SUN/buttons/RectangularPushButton","SUN/buttons/BooleanRectangularToggleButton","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e,r){r=_.extend({iconColor:"#333",buttonBaseColor:"#DFE0E1"},r),o.call(this,_.extend({cursor:"pointer"},r));var b=new c(i(0),{font:new d(20)}),v=new c(n(0),{font:new d(15),left:b.right});v.bottom=v.bounds.maxY-b.bounds.minY,b.top=0;var E=new o({children:[b,v],pickable:!1});E.centerX=0;var S=u.roundedBounds(E.bounds.dilatedXY(5,2),5,5,{fill:"#fff",stroke:"rgba(0,0,0,0.5)",pickable:!1}),y=6,C=(S.width-y)/2-1,w=new m(10),T=w.bounds.height,R=T,N=.05*R,A=.15*R,P=(new a).moveTo(R-.5*N-A,0).lineTo(1.5*N+A,T/2-N-A).lineTo(1.5*N+A,-T/2+N+A).close().getOffsetShape(-A),x=a.bounds(new s(0,-T/2,R,T/2).eroded(.1*R)),k=new p({listener:function(){e.set(!1),t.set(0)},content:new h(w,{fill:r.iconColor}),baseColor:r.buttonBaseColor,minWidth:C}),O=new g(new h(x,{fill:r.iconColor}),new h(P,{stroke:r.iconColor,fill:"#eef",lineWidth:2*N}),e,{baseColor:r.buttonBaseColor,minWidth:C}),D=new o;D.addChild(k),D.addChild(O),D.addChild(S),D.addChild(E),k.right=-y/2,O.left=y/2,k.top=S.bottom+y,O.top=S.bottom+y;var I=8;D.left=I,D.top=I;var B=new f(D.bounds.dilated(I),{baseColor:new l(80,130,230),cornerRadius:10});B.touchArea=B.localBounds.dilated(10),this.addChild(B),this.addChild(D),t.link(function(t){b.text=i(t),v.text=n(t),k.enabled=t>0}),this.dragTarget=B}function i(t){var e=Math.floor(t/60)%60,i=Math.floor(t)%60;return 10>i&&(i="0"+i),10>e&&(e="0"+e),e+":"+i}function n(t){var e=Math.floor(t%1*100);return 10>e&&(e="0"+e),"."+e}var r=t("PHET_CORE/inherit"),s=t("DOT/Bounds2"),a=t("KITE/Shape"),o=t("SCENERY/nodes/Node"),h=t("SCENERY/nodes/Path"),l=t("SCENERY/util/Color"),u=t("SCENERY/nodes/Rectangle"),c=t("SCENERY/nodes/Text"),d=t("SCENERY_PHET/PhetFont"),m=t("SCENERY_PHET/UTurnArrowShape"),f=t("SCENERY_PHET/ShadedRectangle"),p=t("SUN/buttons/RectangularPushButton"),g=t("SUN/buttons/BooleanRectangularToggleButton"),b=t("SCENERY_PHET/sceneryPhet");return b.register("Timer",e),r(o,e)}),i("WAVE_ON_A_STRING/wave-on-a-string/view/action/TheStringNode",["require","PHET_CORE/inherit","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Image","SCENERY/nodes/Path","SCENERY/nodes/Circle"],function(t){"use strict";function e(t,e,i){function h(){l=new n,c[0].y=t.nextLeftY,l.lineTo(0,t.nextLeftY||0);for(var e=1;e<t.yDraw.length;e++)c[e].y=t.yDraw[e],l.lineTo(e*i.radius*2,t.yDraw[e]||0);u.shape=l}r.call(this,{layerSplit:!0});var l=new n,u=new a(l,{stroke:"#F00"}),c=[];this.addChild(u),u.computeShapeBounds=function(){return this.getShape().bounds.dilated(20)};var d,m=new o(.3*i.radius,{fill:"#fff",x:-.45*i.radius,y:-.45*i.radius}),f=3,p=new o(i.radius,{fill:"red",stroke:"black",lineWidth:.5,children:[m],scale:f}),g=new o(i.radius,{fill:"lime",stroke:"black",lineWidth:.5,children:[m],scale:f});p.toDataURL(function(t,e,i){d=new s(t,{x:-e/f,y:-i/f,scale:1/f})});var b;g.toDataURL(function(t,e,i){b=new s(t,{x:-e/f,y:-i/f,scale:1/f})});for(var v=0;v<t.yDraw.length;v++){var E=v%10===0?b:d;c.push(new r({x:v*i.radius*2,children:[E]}))}c[0].scale(1.2),this.addChild(new r({children:c})),this.mutate(i);var S=!0;t.on("yNowChanged",function(){S=!0}),e.on("frame",function(){S&&(h(),S=!1)})}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Image"),a=t("SCENERY/nodes/Path"),o=t("SCENERY/nodes/Circle");return i(r,e),e}),i("SCENERY_PHET/ArrowShape",["require","PHET_CORE/inherit","KITE/Shape","DOT/Vector2","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,i,r,s,a){a=_.extend({tailWidth:5,headWidth:10,headHeight:10,doubleHead:!1,isHeadDynamic:!1,scaleTailToo:!1,fractionalHeadHeight:.5
},a);var o=this;if(n.call(this),r!==t||s!==i){var h=e.getArrowShapePoints(t,i,r,s,[],a);this.moveTo(h[0].x,h[0].y);var l=_.tail(h);_.each(l,function(t){o.lineTo(t.x,t.y)}),this.close()}}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("DOT/Vector2"),s=t("SCENERY_PHET/sceneryPhet");return s.register("ArrowShape",e),i(n,e,{},{getArrowShapePoints:function(t,e,i,n,s,a){if(s||(s=[]),i===t&&n===e)s.length=0;else{var o=new r(i-t,n-e),h=o.normalized(),l=h.rotated(Math.PI/2),u=o.magnitude(),c=a.headWidth,d=a.headHeight,m=a.tailWidth;a.isHeadDynamic?u<a.headHeight/a.fractionalHeadHeight&&(d=u*a.fractionalHeadHeight,a.scaleTailToo&&(m=a.tailWidth*d/a.headHeight,c=a.headWidth*d/a.headHeight)):d=Math.min(a.headHeight,a.doubleHead?.35*u:.99*u);var f=0,p=function(i,n){var a=h.x*i+l.x*n+t,o=h.y*i+l.y*n+e;s[f]?(s[f].x=a,s[f].y=o):s.push(new r(a,o)),f++};a.doubleHead?(p(0,0),p(d,c/2),p(d,m/2)):p(0,m/2),p(u-d,m/2),p(u-d,c/2),p(u,0),p(u-d,-c/2),p(u-d,-m/2),a.doubleHead?(p(d,-m/2),p(d,-c/2)):p(0,-m/2),f<s.length&&(s.length=f)}return s}})}),i("SCENERY_PHET/ArrowNode",["require","PHET_CORE/inherit","SCENERY/nodes/Path","KITE/Shape","SCENERY_PHET/ArrowShape","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e,i,r,s){s=_.extend({headHeight:10,headWidth:10,tailWidth:5,isHeadDynamic:!1,scaleTailToo:!1,fractionalHeadHeight:.5,doubleHead:!1,fill:"black",stroke:"black",lineWidth:1},s),this.options=s,n.call(this,null),this.shapePoints=[],this.setTailAndTip(t,e,i,r),this.mutate(s)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Path"),r=t("KITE/Shape"),s=t("SCENERY_PHET/ArrowShape"),a=t("SCENERY_PHET/sceneryPhet");return a.register("ArrowNode",e),i(n,e,{updateShapePoints:function(){var t=this.shapePoints.length;return this.shapePoints=s.getArrowShapePoints(this.tailX,this.tailY,this.tipX,this.tipY,this.shapePoints,this.options),this.shapePoints.length!==t},updateShape:function(){var t=new r;if(this.shapePoints.length>1){t.moveToPoint(this.shapePoints[0]);for(var e=1;e<this.shapePoints.length;e++)t.lineToPoint(this.shapePoints[e]);t.close()}this.shape=t},setTailAndTip:function(t,e,i,n){this.tailX=t,this.tailY=e,this.tipX=i,this.tipY=n;var r=this.updateShapePoints();!this.shape||r?this.updateShape():this.shape.invalidatePoints()},setTailWidth:function(t){this.options.tailWidth=t,this.updateShapePoints(),this.updateShape()},setDoubleHead:function(t){this.options.doubleHead=t,this.updateShapePoints(),this.updateShape()}})}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/PulseButton",["require","PHET_CORE/inherit","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Path","SUN/buttons/RoundPushButton"],function(t){"use strict";function e(t,e){var i=(new n).moveTo(-9,0).lineTo(-3.5,0).lineTo(0,-10).lineTo(3.5,0).lineTo(9,0),o=new s(i,{lineWidth:1.5,stroke:"#333",lineCap:"round"}),h=new s(i,{lineWidth:3,stroke:"#eee",lineCap:"round"});a.call(this,{listener:function(){t.manualPulse(),t.play=!0,t.trigger("yNowChanged")},baseColor:"#33dd33",content:new r({children:[h,o]}),radius:17,yContentOffset:-1});var l=this;this.touchArea=this.localBounds.dilatedXY(5,10),this.mutate(e),t.modeProperty.link(function(t){l.setVisible("pulse"===t)})}var i=t("PHET_CORE/inherit"),n=t("KITE/Shape"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Path"),a=t("SUN/buttons/RoundPushButton");return i(a,e),e}),function(){"use strict";function t(t){var e=t.split("."),i=e[e.length-1],n={png:"image/png",svg:"image/svg+xml",jpg:"image/jpeg",gif:"image/gif",cur:"image/x-icon",mp3:"audio/mpeg",m4a:"audio/mp4",ogg:"audio/ogg",oga:"audio/ogg",bma:"audio/webm",wav:"audio/wav",woff:"application/x-font-woff"}[i];if(!n)throw new Error("Unknown mime type for filename: "+t);var r="data:"+n+";base64,"+new Buffer(global.phet.chipper.fs.readFileSync(t)).toString("base64");return r}"undefined"!=typeof i&&i("../../chipper/js/common/loadFileAsDataURI",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),i("image",{load:function(t){throw new Error("Dynamic load not allowed: "+t)}}),i("image!WAVE_ON_A_STRING/wrench.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAANOCAYAAAAvfYEKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAUWZJREFUeNrsvQucFOWZ7/9MX+bSM8MMwsBgwkyDEkUxzIAmRgKMuSn4z4K60ZhohJiY7DlJhGyOZ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axO786J/rl+X7Z7AWe4P/ED3O3R/dxft6O/LtB/5qqL1XkqZIXBwYHk3iWVlug8silXTNfWTaVltHdWFw74XeIeo3z7Q9Y6oTpxUBmZkQOvfbff6QYbAwYjGG0jXX2yG5V1eO4mWTaqj5ZPqfSPwweEh2iHq/g+dFNWH/t5s0mrp8nqy6TYoEBgUwyqx3E7JwR8ZWS5E5vR6UU0tzauKSSFw98gI7RLp8A5R19/FM5YIcXMQVlpxIXCwRb4pU0Q2R2eWWJO5qaKS5lVXuyZw9/Aw7RKSHhwcoAODg7TjZLcSaQ8UNg6chb1HhlQZAgMzLarIK9M1dmVinqg/K3ILmesiUUXsmZWVioT8el5tbV4CHxwQQvI8X2pU3XH82KnIKoRVHkvTFcYX3G8jB+ZsBsApVqoNXjzpdMJny5OUvFqozY8HDhEYWDV68bJUwpNeu5PFdvV5u98PFgQGuQjN6Xaz+tjmEVG7VFE7yWLu7KAAgUEh1Ksya4+kRmyNOOXQ2m3CfDtVlnK/+rzdJC5Q+f8FGABE6Ra42+WJ4QAAAABJRU5ErkJggg==",
t}),i("WAVE_ON_A_STRING/wave-on-a-string/view/action/StartNode",["require","PHET_CORE/inherit","PHET_CORE/platform","DOT/Matrix3","DOT/Bounds2","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY/nodes/Circle","SCENERY/util/Color","SCENERY/nodes/Line","SCENERY/util/LinearGradient","SCENERY/util/RadialGradient","SCENERY_PHET/ShadedRectangle","SCENERY_PHET/ArrowNode","WAVE_ON_A_STRING/wave-on-a-string/Constants","WAVE_ON_A_STRING/wave-on-a-string/view/control/PulseButton","SCENERY/nodes/Image","image!WAVE_ON_A_STRING/wrench.png"],function(t){"use strict";function e(t,e,i){function S(){L.isVisible()&&(L.y=t.yNow[0])}function y(){var e=t.yNow[0];M.isVisible()&&M.setMatrix(r.createFromPool(1,0,0,0,(g.offsetWheel.y-(e+7))/C,e+7,0,0,1))}i=_.extend({layerSplit:!0},i);var C=158,w=3;o.call(this);var T=this,R=29.5,N=new l(R,{stroke:"#333",lineWidth:1.5,fill:new d(-R,0,R,0).addColorStop(0,"rgb(215,210,210)").addColorStop(1,"rgb(215,210,210)")}),A=4.8;N.addChild(new l(A,{stroke:"#333",lineWidth:1.5,fill:"#fff"})),N.addChild(new c(-A,0,A,0,{stroke:"#333",lineWidth:1.5})),N.addChild(new l(A,{x:1.5*A-R,stroke:"#333",lineWidth:.5,fill:new m(0,0,0,0,0,A).addColorStop(.2,"#555").addColorStop(1,"#555")}));var P=3;N.scale(P);var x=Math.ceil(N.width/2)+2;N=N.toDataURLNodeSynchronous(x,x,2*x,2*x),n.firefox&&(N.renderer="canvas");var k=new v(E,{x:-40,y:-24,scale:.225,pickable:!1}),O={fill:"hsl(210,90%,60%)",tailWidth:10,headWidth:22,headHeight:18},D=8,I=10,B=new p(k.centerX+D,k.top-I,k.centerX+D,k.top-30-I,O),Y=new p(k.centerX+D,k.bottom+I,k.centerX+D,k.bottom+30+I,O),L=new o({children:[k,B,Y],cursor:"pointer"});B.touchArea=B.localBounds.dilated(6),Y.touchArea=Y.localBounds.dilated(6),L.touchArea=a.bounds(k.bounds.dilated(g.dilatedTouchArea)),L.mouseArea=a.bounds(k.bounds);var M=new h(g.offsetWheel.x-5,0,10,C,{stroke:"#000",fill:g.postGradient}),F=new f(s.point(g.offsetWheel.x,g.offsetWheel.y).dilatedXY(40,25),{baseColor:new u(200,200,200),lightFactor:.5,lighterFactor:.1,darkFactor:.5,darkerFactor:.1,cornerRadius:6});F.addChild(new b(t,{center:F.center}));var V=new o({scale:1/w});new o({children:[M],scale:w}).toImageNodeAsynchronous(function(t){V.addChild(t)}),M=new o({children:[V]}),T.addChild(M),T.addChild(F),T.addChild(L),T.addChild(new o({children:[N],translation:g.offsetWheel})),L.addInputListener(g.dragAndDropHandler(L,function(e){t.nextLeftY=Math.max(Math.min(e.y,i.range.max),i.range.min),t.play=!0,t.trigger("yNowChanged")},function(e,i){e.target!==B&&e.target!==Y&&(t.wrenchArrowsVisible=!1)},function(e,i){t.wrenchArrowsVisible=!1})),t.link("wrenchArrowsVisible",function(){B.visible=t.wrenchArrowsVisible,Y.visible=t.wrenchArrowsVisible}),T.mutate(i);var H=!0;t.on("yNowChanged",function(){H=!0}),e.on("frame",function(){H&&(S(),y(),H=!1)});var j=r.scale(1/P);t.angleProperty.link(function(t){N.setMatrix(r.rotation2(t).timesMatrix(j))}),t.modeProperty.link(function(t){var e="manual"===t;L.isVisible()!==e&&(L.setVisible(e),S());var i="manual"!==t;M.isVisible()!==i&&(M.setVisible(i),y()),N.setVisible("oscillate"===t),F.setVisible("pulse"===t)})}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/platform"),r=t("DOT/Matrix3"),s=t("DOT/Bounds2"),a=t("KITE/Shape"),o=t("SCENERY/nodes/Node"),h=t("SCENERY/nodes/Rectangle"),l=t("SCENERY/nodes/Circle"),u=t("SCENERY/util/Color"),c=t("SCENERY/nodes/Line"),d=t("SCENERY/util/LinearGradient"),m=t("SCENERY/util/RadialGradient"),f=t("SCENERY_PHET/ShadedRectangle"),p=t("SCENERY_PHET/ArrowNode"),g=t("WAVE_ON_A_STRING/wave-on-a-string/Constants"),b=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/PulseButton"),v=t("SCENERY/nodes/Image"),E=t("image!WAVE_ON_A_STRING/wrench.png");return i(o,e),e}),i("image!WAVE_ON_A_STRING/ring_back.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAPCAYAAAC4EqxxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAXVJREFUSEvllb1OQkEQRnkQSytLKztLKkorSxstbWy1oNVEW03oTeiJ9sYHML4AtqKooPg3cjYOWfbOblYkAa8kh8AwO/N9s8veioj8K8xgmTGDZcYMlhkzOCkf7Rt5vbiUl9Om9PcPHY8bW/Kwtp4FubqOGtSiZtjnN5jBHBDzfNyQp+0dua/W5HZhUTpLy9/CN6V/cORA+NswNwetY8Fv9KInvUM9uZhBCyZNM3ZhTMBJw4nVl4pXw73demEnYzCw0GgKtKDpJ6fADPqwQ4jRJpj87HYdg9a5MzWJ2GmDebSG+kPMILD4bmW1UJhY6ujNGvSljBcC71fXptFc9HiGl08OHE9dp3WsHjngAS+hv7EviLMWx1Bjg9bZ1G9TH2rTQwdhaYkR7vboAwWtBT5MrbdXd8113azgRKAl5zT6ekcFUpcOU50HkzHQltp5vGmue+O/YyUyPSapyfMOWmM7jkdyXKI+W324ifntL2I9RfAoIpUvSjjwYt5A+Y8AAAAASUVORK5CYII=",t}),i("image!WAVE_ON_A_STRING/ring_front.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAPCAYAAAC4EqxxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAaRJREFUSEvdlT1PwzAQhvtDGJkYmdgYOzEyMXahIwsrDF1BghWk7kjsFeyIH4D4A2Xlo5S2lC+Tx+XUs3OEpgTUJtKjJOezfe/dOak45zy3C4su5u3qOhkajc8b3Vo9pae/dzB2uF9ZTTncLS3PpejebiOlBZ5PTsdOqLecgDHxm2VeLi7dQ3XNUbxubTPQQPHwCSZg1E4axp62tmey4lQOocTY3z90H52Ov+v4pWjBRMRkiRbIIG0zbJ35Rf4b4hwcNd3j+oaPh2oimot7fDwpFPPAXGwS0ZpRC9V9FkkCrRWvOw3v7Ru/FuJIsAhkP0QgjmriR0VjoaDFQrCBBsd48jTQagQqEDiJ0bCX9pGEc+edcQS9JuIRCMPWuevtNPz68Z6AeKsDg5cYMleUcAl4cNz0zxqCZ0xAkFy8M44frfudQAGhX+1tajKNFrTVT5tlQSBUKxYrQnSFrdbMgk6gMJMcJdOYBVUng2yQN7Ai8clLjkPe74VpzAub6rNYZCKk6qxPon/7WzSNRUIyNPKh0iBE+/zlv940lhnTWGZMY3lxlU9AKPQLW+S+lgAAAABJRU5ErkJggg==",t}),i("image!WAVE_ON_A_STRING/window-back.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAAGLCAYAAAABCyaWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAKMhJREFUeNrsnQd0JPd933+zBb3sAbiCKzwc+7EdqE6Klo+mbJJyJIOOLNmJ7YPkxEnoJGc9PT+/WIVWsRI5dqLn+DFynFhKs2U/WzmRNilKYpFIncir4JGH3jtwKIu22AV2Z/L//afPzi5mgW0z8/s9DndvsQAW+/l9f+3/n1kByHxjibEXOtnNWXZ8KkRvh7ctPvp8G4BwVgBA6BF2fK3y+KOvEHivAh95roMBP8PudhgejrLjC3iHwHvINof/ARWthvM2/qDEDkF9hvSJyuOPRQm8V4APPduO4RwkqRMEIdPTzjHo59R/EHgXW2zwmU4lnJ+2f4YqdykqgfAp41cIvMtsY+A7bXKhJpxVijUn9oWqtsdGjQ8I9Fa6BHj/udNy7hY65GguKPQE0P7NbwTlRkUrdFWdePx+688jxZexrfd+O8J4djC0T2nFWraIbrCV5eXo6xe6Imcu3dpu9y0EviyB/x1CfkppxSIZ6Vq4r8RFmO5/G16/2BVdmxmLSJIE0eTNQODL3NZ6/raTAcxSrNk7wMTcMrx54QJM9V2DRDzOinuJOwuCz1TlE/hSw+7+G6ZuAXvvM/a9t70h4OH+fui68AbcmJuTIauw8efe+TDEbn4vCM8tgkTgy8dWr//1ad6KSaxCz6HEXmCQuy5ehKG+Pg5fhY1HsuEArJ76MKyf/BkQK2uV73ieFF9y2G99ixdrcnU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ui0gpcjggw+oKheec4T9Sc/eo7Ae8Dmzz8dQfgM6lkhILSp4R849IAW7hX1R9n/TtTd8USUwHvIFi78OUsDWAwGOgQNuhV+4Gu1tz/xKQLvQVu6/I02OQUEzzDQbRbVY0R4uOa2j7xC4D1sK9f+EmsA5gDB0wb4o+z2fgLvA1vr+VumfKwDAhgJsCX8GoH3kcUGvhNhVV8Hq/bP/n8BBgAeUPP7X3RMagAAAABJRU5ErkJggg==",t}),i("image!WAVE_ON_A_STRING/clamp.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAAFiCAYAAACKzyb5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAQUpJREFUeNrsfQl0W9d55g9u4k6QEiluEkEtlrxFoLXaTmI67UlTR47oTuvISXtEteM0YTrHsjvutGc6keRpj9ueSSXPdJppmkTUdPFSJ6JSx2maTETXcRzL4iLZ9SLJFChR3EmACxaCBDD3u3gPfIQASqJA8l3g/46v3uMDHgy8d7/3L/dfLMRIBdTf4DEdLjE6o445tMG4AVj4EigNW9So0bbXI86tQicZCHjWQEQmHxNLKVjFsGtk0clzDXEyMjKooKBA7ufn58u/Q6EQ5eXlRfYxgNzcXEpPT48cMw6fz0dTU1NzPtvj8VAgEJD7Xq9X7uM9fr8/1vdt1Qh2ViNcKxOLYRbVDWOLtrXqL2RmZkryFBYWSrIUFxfLLYgUiyTGAVzvPcb36oj+O/o4yIUBwoFs2E5OTka/XSfYa9rWxcRiLDYaxHhAI5FdPwipAgJhrFy5UhLKKHluZiwWqa5HOBBMJxq2UUQ7KUZLDHuOicVYEHS1bo9RpSsqKqJVq1ZJEmE/JydnQSQyA6liHYf6CIK53e5oojk0gh1PFpIxsZaWTPs06SQdDLB9QKTKykpJpmg7KJlIFQuQaGNjY5Jk4+Pj0SR7TmVHCBNriclktVrJZrNJQkEq3SoZVCVV9GuQZk6nUw6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cmjFShKFVwMUmFMtTBKHd7MpIKo8haTGXl5fR3f/d/6cKFC7dEKthq57BuGc7RamZihYGLcfjcuXN05C+/vmBS9ff10TviqbXxttvod/7j44khlcHdvhSkkt1KYhEryUilf8bWe++nzKwscd//h0wDWSipfvzqP8vXKZyXlfKIzsdCgmPjgw9+ir78laabIhWM1td/+mPZNBtOi4jjYo6/PNZXMEilUOzX+vv75Xj1hz9adFJh/82fvU6nf/4G3SlDs2a9ksYd47GQYWeh+yHjZ9+IJ/WaqHrjudHR+HNfm7sVBrZzVN632tpa+s9P/xcqLim5aVK5Rkd1UjUzrWLXFZTkuv2OO2Tqx+ryynlJNSGecu8IA/idcAS6a5G8QTaMH7z6L4tOKmzfEqQ684s3iVKvpkM92s5+8Td/i3buvPe6pPpIqI9n3nyD3JOTOBfJrUeZUvGJBRyicEYpbbHbZfzXmrU1lJOXKy/omCCTo6tLSCkHXfjgA3Hhp/RJ+MgirV/I7/PKD3646KTCeFuQqv30W/Ndn2SFXr7btnLlKlmtaq2QYlVV1bPLKFevULfDQeffe49Gw2tWLk1Scd2LGyCWLiVALlTqmS+gEhf0uUV+uktiff+ff7DopMI+SNV55u1UJJaORgoXEpov3g92+XHi3KuYyLjOhduvjXq6NmK5U18DW6ovuxSkCrdaTfluj83asGn33R41LzqJqwQvmFhGtJrB3kBjbrToWUxSyXWsYIBnxiyJHKzmLdzdbnZIUv9C2D6LTSp4QS9dvKhPKgYj6YnlePGF52XH+8Uk1Yfv/Tt53NLLdZynB2OhUCl5ptvtdu9FbNuuXffKLOVEk6rrwgU6+/Zbuv34GE8PRioQ6wOQy+VyNfzkJz+RaysrsrMpLz//lkjl8Xiop7ub3n/3HfogHDzs0EjVz9ODkUqoF+MSJbhVqjawOG7lS8y4Vfx/AQYA8pehIoTXqQAAAAAASUVORK5CYII=",
t}),i("WAVE_ON_A_STRING/wave-on-a-string/view/action/EndNode",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Image","SCENERY/nodes/Rectangle","WAVE_ON_A_STRING/wave-on-a-string/Constants","image!WAVE_ON_A_STRING/ring_back.png","image!WAVE_ON_A_STRING/ring_front.png","image!WAVE_ON_A_STRING/window-back.png","image!WAVE_ON_A_STRING/clamp.png"],function(t){"use strict";function e(t,e,i){function c(){f.y=m.y=t.yNow[t.yNow.length-1]||0}n.call(this);var d=new r(u,{x:-17,y:-31,scale:.4}),m=new n({children:[new r(o,{x:5,y:-7,scale:.5})]}),f=new n({children:[new r(h,{x:4.7,y:0,scale:.5})]}),p=new r(l,{right:a.windowXOffset+a.windowShift,centerY:0,scale:a.windowScale}),g=new s(-5,-130,10,260,{stroke:"#000",fill:a.postGradient,x:20});this.addChild(d),this.addChild(m),this.addChild(g),this.addChild(f),this.windowNode=p,this.mutate(i);var b=!0;t.on("yNowChanged",function(){b=!0}),e.on("frame",function(){b&&(c(),b=!1)}),t.typeEndProperty.link(function(e){d.setVisible("fixedEnd"===e),m.setVisible("looseEnd"===e),g.setVisible("looseEnd"===e),f.setVisible("looseEnd"===e),p.setVisible("noEnd"===e),"fixedEnd"===e&&(t.yNow[t.nSegs-1]=0,t.yDraw[t.nSegs-1]=0,t.trigger("yNowChanged"))})}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Image"),s=t("SCENERY/nodes/Rectangle"),a=t("WAVE_ON_A_STRING/wave-on-a-string/Constants"),o=t("image!WAVE_ON_A_STRING/ring_back.png"),h=t("image!WAVE_ON_A_STRING/ring_front.png"),l=t("image!WAVE_ON_A_STRING/window-back.png"),u=t("image!WAVE_ON_A_STRING/clamp.png");return i(n,e),e}),i("WAVE_ON_A_STRING/wave-on-a-string/view/control/ReferenceLine",["require","PHET_CORE/inherit","DOT/Bounds2","KITE/Shape","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY/nodes/Line","WAVE_ON_A_STRING/wave-on-a-string/Constants"],function(t){"use strict";function e(t){s.call(this,{cursor:"pointer"});var e=this;e.addChild(new a(1480,-10,40,20,{fill:h.referenceLineBlockGradient,scale:.5,stroke:"#000",lineWidth:.5})),e.addChild(new a(750,-10,20,20,{fill:h.referenceLineBlockGradient,stroke:"#000",lineWidth:.5})),e.addChild(new o(0,0,750,0,_.extend({mouseArea:new n(0,0,750,0).dilated(5),touchArea:new n(0,0,750,0).dilated(10)},{stroke:"#F00",lineDash:[10,6],lineWidth:2}))),t.referenceLineProperty.link(function(t){e.setVisible(t)}),t.referenceLineLocProperty.link(function(t){e.translation=t}),e.touchArea=r.bounds(n.point(755,0).dilated(h.dilatedReferenceLineTouchArea)),e.mouseArea=r.bounds(n.point(755,0).dilatedXY(15,10)),h.boundedDragHandler(e,t.referenceLineLocProperty,30)}var i=t("PHET_CORE/inherit"),n=t("DOT/Bounds2"),r=t("KITE/Shape"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Rectangle"),o=t("SCENERY/nodes/Line"),h=t("WAVE_ON_A_STRING/wave-on-a-string/Constants");return i(s,e),e}),i("image!WAVE_ON_A_STRING/window-front.png",function(){var t=new Image;return window.phetImages=window.phetImages||[],window.phetImages.push(t),t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAGLCAYAAADK0MJoAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACSlJREFUeNrcXU2OZDUMztd6Ej+rOQEaxCHYskICcYjuE8ANhjkBXABprgEb4ARsYMOCaSEWw262LBjzqrvee3FiJ46d7ilRoqmmKafiz99nO3mpV0jF4+/vv366Pj37/Y+/rtcf9v+A8tXHH5ZsgCfr0zfrz7XVOH8s5wG+Wn++XH+e5AMcg8jG+WuX8yDP2DtiM0bTmM2IG5+ezr/XPkl/ygbCVfYiZBboGrOBAAhvhwKj1MEIpxmBYYMEE8DbAJlrOIyLQXvGhWtXApo8YjD4yFzLAT8ZwwrSAbbgEiwYCeGvAYeJiBkhi2hB5o8+QWSuVWTMMdONa2YX4pSBbru6HK4UgCMN4SRIBOIgvSA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tYlsTr/3O1PQIbU2YkLNrP8XaGv8CeaGoNhhGD9nWxHZrLrutie+wz14cu/MRKyKOAvmwbQ0ix89QnoV2HInht70sfzcOVN/60nqCvXIN/ObJm5vuGVUnxtzHhpBBM36OXMTId5RBuKEoXDyq7qDrxAjiTdwROXvMD6EiNKMIj6TjZkCARygxens8UsEenZF0h9sIIfn9sgOuXRDYSmLzMztwFFZMbHPAzjG6CB4xJmFWYkuTEpubR4hi9CAFMj9kCczSWppVIL3lCNU92C+BR8gwCjA7n5WrGZVvep/8zWgyfSvMI/CoKkNeZkthjzQRZefv4pEM9hQeJSePkIpKEiqQZSVJ/vCzlVKI2exrQSbwCK6D3kpiCyxq0szPZsF9Bnkpy9ARtAk8gmtGkNdpgUVNwZ/YRzyRvJ+NOIF9i1JrDpCu3v/oixfrNH7ac9D+9Q5jo23fd3GzYvUaW2HEOLPvBnrvw89vV+PnxxdLeGe0Pt59+tm3JxfhKNdsoDOPbtZ/vfbkIzbQOx98ers+PR+wP73+xfpzI77tP3/+8OOrl7998urlr5LhGuH08+n54+vvbsXNuuxx8+bNv7+sz681w/LxnwADAPQSJ3DH8+x8AAAAAElFTkSuQmCC",t}),i("string!WAVE_ON_A_STRING/speedSlow",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/speedSlow")}),i("string!WAVE_ON_A_STRING/speedNormal",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/speedNormal")}),i("string!WAVE_ON_A_STRING/manual",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/manual")}),i("string!WAVE_ON_A_STRING/oscillate",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/oscillate")}),i("string!WAVE_ON_A_STRING/pulse",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/pulse")}),i("string!WAVE_ON_A_STRING/fixedEnd",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/fixedEnd")}),i("string!WAVE_ON_A_STRING/looseEnd",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/looseEnd")}),i("string!WAVE_ON_A_STRING/noEnd",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/noEnd")}),i("string!WAVE_ON_A_STRING/unitCm",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/unitCm")}),i("WAVE_ON_A_STRING/wave-on-a-string/view/WOASView",["require","PHET_CORE/inherit","AXON/Events","DOT/Vector2","DOT/Util","SCENERY/nodes/Node","SCENERY/nodes/Line","SCENERY/input/SimpleDragHandler","JOIST/ScreenView","SCENERY_PHET/buttons/ResetAllButton","SCENERY_PHET/buttons/PlayPauseButton","SCENERY_PHET/buttons/StepButton","SCENERY_PHET/RulerNode","SCENERY_PHET/PhetFont","WAVE_ON_A_STRING/wave-on-a-string/view/control/BottomControlPanel","WAVE_ON_A_STRING/wave-on-a-string/view/control/RadioGroup","WAVE_ON_A_STRING/wave-on-a-string/view/control/RestartButton","SCENERY_PHET/Timer","WAVE_ON_A_STRING/wave-on-a-string/Constants","WAVE_ON_A_STRING/wave-on-a-string/view/action/TheStringNode","WAVE_ON_A_STRING/wave-on-a-string/view/action/StartNode","WAVE_ON_A_STRING/wave-on-a-string/view/action/EndNode","WAVE_ON_A_STRING/wave-on-a-string/view/control/ReferenceLine","SCENERY/nodes/Image","DOT/Bounds2","image!WAVE_ON_A_STRING/window-front.png","string!WAVE_ON_A_STRING/speedSlow","string!WAVE_ON_A_STRING/speedNormal","string!WAVE_ON_A_STRING/manual","string!WAVE_ON_A_STRING/oscillate","string!WAVE_ON_A_STRING/pulse","string!WAVE_ON_A_STRING/fixedEnd","string!WAVE_ON_A_STRING/looseEnd","string!WAVE_ON_A_STRING/noEnd","string!WAVE_ON_A_STRING/unitCm"],function(t){"use strict";function e(t){l.call(this,{layoutBounds:new R(0,0,768,504)}),this.events=new n;var e,i,Y=E.viewSize.width/2,L=E.viewSize.height-131,M={minorTicksPerMajorTick:4,unitsFont:new f(16),cursor:"pointer"},F=new m(800,50,80,s.rangeInclusive(0,10).map(function(t){return t+""}),B,M),V=new m(400,50,80,s.rangeInclusive(0,5).map(function(t){return t+""}),B,M);V.rotate(-Math.PI/2),this.addChild(F),this.addChild(V),t.rulersProperty.link(function(t){F.setVisible(t),V.setVisible(t)}),t.rulerLocHProperty.link(function(t){F.translation=t}),t.rulerLocVProperty.link(function(t){V.translation=t}),E.boundedDragHandler(V,t.rulerLocVProperty,30),E.boundedDragHandler(F,t.rulerLocHProperty,30),this.addChild(e=new g({radio:["manual","oscillate","pulse"],text:[P,x,k],property:t.modeProperty,x:5,y:5})),this.addChild(new b(t,{x:e.right+10,y:5})),this.addChild(i=new g({radio:["fixedEnd","looseEnd","noEnd"],text:[O,D,I],property:t.typeEndProperty,x:E.viewSize.width-100,y:5})),i.right=E.viewSize.width-5,this.addChild(new g({radio:[.25,1],text:[_,A],property:t.speedProperty,omitPanel:!0,right:Y-30,centerY:L})),this.addChild(new p(t));var H={upFill:E.blueUpColor,overFill:E.blueOverColor,disabledFill:E.blueDisabledColor,downFill:E.blueDownColor,backgroundGradientColorStop0:E.buttonBorder0,backgroundGradientColorStop1:E.buttonBorder1,innerButtonLineWidth:1},j=new c(t.playProperty,{x:Y+45,centerY:L,scale:.6,touchAreaDilation:12,pauseOptions:H,playOptions:H});this.addChild(j);var z=1.25;t.playProperty.lazyLink(function(t){j.scale(t?1/z:z)}),this.addChild(new d(t.manualStep.bind(t),t.playProperty,{x:Y+94,centerY:L,scale:.6,touchAreaDilation:12,upFill:E.blueUpColor,overFill:E.blueOverColor,disabledFill:E.blueDisabledColor,downFill:E.blueDownColor,backgroundGradientColorStop0:E.buttonBorder0,backgroundGradientColorStop1:E.buttonBorder1})),this.addChild(new a({scale:.7,right:E.viewSize.width-5,bottom:E.viewSize.height-10,children:[new u({scale:1.32,listener:function(){t.reset()}})]}));var U=new v(t.timerSecondProperty,t.timerStartProperty,{});this.addChild(U),t.timerProperty.link(function(t){U.setVisible(t)}),t.timerLocProperty.link(function(t){U.translation=t});var G=new r,q=E.viewBounds.eroded(30);U.dragTarget.addInputListener(new h({start:function(t){G=U.dragTarget.globalToParentPoint(t.pointer.point).minus(t.currentTarget.translation)},drag:function(e){t.timerLoc=U.globalToParentPoint(e.pointer.point).minus(G),U.right<q.minX&&(t.timerLoc=new r(t.timerLoc.x-U.right+q.minX,t.timerLoc.y)),U.left>q.maxX&&(t.timerLoc=new r(t.timerLoc.x-U.left+q.maxX,t.timerLoc.y)),U.bottom<q.minY&&(t.timerLoc=new r(t.timerLoc.x,t.timerLoc.y-U.bottom+q.minY)),U.top>q.maxY&&(t.timerLoc=new r(t.timerLoc.x,t.timerLoc.y-U.top+q.maxY))}}));var W;this.addChild(new o(0,0,605,0,{stroke:"#FFA91D",lineDash:[8,5],lineWidth:2,x:E.startTheStringNode,y:E.yTheStringNode}));var X=new C(t,this.events,{x:E.endTheStringNode,y:E.yTheStringNode});X.windowNode.x+=E.endTheStringNode,X.windowNode.y+=E.yTheStringNode,this.addChild(X.windowNode),this.addChild(new w(t)),this.addChild(X),this.addChild(new S(t,this.events,{x:E.startTheStringNode,y:E.yTheStringNode,radius:E.segmentTheStringNodeRadius})),this.addChild(new y(t,this.events,{x:E.startTheStringNode,y:E.yTheStringNode,range:E.yWrenchRange})),this.addChild(W=new a({children:[new T(N,{left:E.windowXOffset-4+E.windowShift,centerY:0,scale:E.windowScale})],x:E.endTheStringNode,y:E.yTheStringNode})),t.typeEndProperty.link(function(t){W.setVisible("noEnd"===t)})}var i=t("PHET_CORE/inherit"),n=t("AXON/Events"),r=t("DOT/Vector2"),s=t("DOT/Util"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/nodes/Line"),h=t("SCENERY/input/SimpleDragHandler"),l=t("JOIST/ScreenView"),u=t("SCENERY_PHET/buttons/ResetAllButton"),c=t("SCENERY_PHET/buttons/PlayPauseButton"),d=t("SCENERY_PHET/buttons/StepButton"),m=t("SCENERY_PHET/RulerNode"),f=t("SCENERY_PHET/PhetFont"),p=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/BottomControlPanel"),g=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/RadioGroup"),b=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/RestartButton"),v=t("SCENERY_PHET/Timer"),E=t("WAVE_ON_A_STRING/wave-on-a-string/Constants"),S=t("WAVE_ON_A_STRING/wave-on-a-string/view/action/TheStringNode"),y=t("WAVE_ON_A_STRING/wave-on-a-string/view/action/StartNode"),C=t("WAVE_ON_A_STRING/wave-on-a-string/view/action/EndNode"),w=t("WAVE_ON_A_STRING/wave-on-a-string/view/control/ReferenceLine"),T=t("SCENERY/nodes/Image"),R=t("DOT/Bounds2"),N=t("image!WAVE_ON_A_STRING/window-front.png"),_=t("string!WAVE_ON_A_STRING/speedSlow"),A=t("string!WAVE_ON_A_STRING/speedNormal"),P=t("string!WAVE_ON_A_STRING/manual"),x=t("string!WAVE_ON_A_STRING/oscillate"),k=t("string!WAVE_ON_A_STRING/pulse"),O=t("string!WAVE_ON_A_STRING/fixedEnd"),D=t("string!WAVE_ON_A_STRING/looseEnd"),I=t("string!WAVE_ON_A_STRING/noEnd"),B=t("string!WAVE_ON_A_STRING/unitCm");return i(l,e,{step:function(t){this.events.trigger("frame")}}),e}),i("string!WAVE_ON_A_STRING/wave-on-a-string.title",function(){return window.phet.chipper.strings.get("WAVE_ON_A_STRING/wave-on-a-string.title")}),i("WAVE_ON_A_STRING/wave-on-a-string/view/WOASScreen",["require","PHET_CORE/inherit","JOIST/Screen","WAVE_ON_A_STRING/wave-on-a-string/model/WOASModel","WAVE_ON_A_STRING/wave-on-a-string/view/WOASView","string!WAVE_ON_A_STRING/wave-on-a-string.title"],function(t){"use strict";function e(){n.call(this,a,null,function(){return new r(768,504)},function(t){return new s(t)},{backgroundColor:"#FFFFB7"})}var i=t("PHET_CORE/inherit"),n=t("JOIST/Screen"),r=t("WAVE_ON_A_STRING/wave-on-a-string/model/WOASModel"),s=t("WAVE_ON_A_STRING/wave-on-a-string/view/WOASView"),a=t("string!WAVE_ON_A_STRING/wave-on-a-string.title");return i(n,e)}),i("wave-on-a-string-main",["require","JOIST/SimLauncher","JOIST/Sim","WAVE_ON_A_STRING/wave-on-a-string/view/WOASScreen","string!WAVE_ON_A_STRING/wave-on-a-string.title"],function(t){"use strict";var e=t("JOIST/SimLauncher"),i=t("JOIST/Sim"),n=t("WAVE_ON_A_STRING/wave-on-a-string/view/WOASScreen"),r=t("string!WAVE_ON_A_STRING/wave-on-a-string.title"),s={credits:{leadDesign:"Michael Dubson, Ariel Paul",softwareDevelopment:"Jonathan Olson, Michael Dubson",team:"Trish Loeblein, Ariel Paul, Kathy Perkins, Amy Rouinfar",graphicArts:"Sharon Siman-Tov",thanks:"Thanks to Mobile Learner Labs for working with the PhET development team\nto convert this simulation to HTML5."}};e.launch(function(){new i(r,[new n],s).start()})}),e.config({deps:["wave-on-a-string-main"],paths:{text:"../../sherpa/lib/text-2.0.12",audio:"../../chipper/js/requirejs-plugins/audio",image:"../../chipper/js/requirejs-plugins/image",mipmap:"../../chipper/js/requirejs-plugins/mipmap",string:"../../chipper/js/requirejs-plugins/string",AXON:"../../axon/js",BRAND:"../../brand/"+phet.chipper.brand+"/js",DOT:"../../dot/js",JOIST:"../../joist/js",KITE:"../../kite/js",PHET_CORE:"../../phet-core/js",PHETCOMMON:"../../phetcommon/js",REPOSITORY:"..",SCENERY:"../../scenery/js",SCENERY_PHET:"../../scenery-phet/js",SUN:"../../sun/js",WAVE_ON_A_STRING:"."},urlArgs:phet.chipper.getCacheBusterArgs()}),i("wave-on-a-string-config",function(){})}();</script>
</body>
</html>
Acciones de Documento