[
  {
    "path": ".gitignore",
    "content": "*.py[cod]\n\n# C extensions\n*.so\n\n# Packages\n*.egg\n*.egg-info\ndist\nbuild\neggs\nparts\nbin\nvar\nsdist\ndevelop-eggs\n.installed.cfg\nlib\nlib64\n\n# Installer logs\npip-log.txt\n\n# Unit test / coverage reports\n.coverage\n.tox\nnosetests.xml\n\n# Translations\n*.mo\n\n# Mr Developer\n.mr.developer.cfg\n.project\n.pydevproject\n\n# Complexity\noutput/*.html\noutput/*/index.html\n\n# Sphinx\ndocs/_build\n\n.DS_Store\n*~\n*.xcodeproj"
  },
  {
    "path": ".travis.yml",
    "content": "# Config file for automatic testing at travis-ci.org\n\nlanguage: python\n\npython:\n  - \"2.7\"\n  - \"3.5\"\n  - \"3.6\"\n\n# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors\ninstall: pip install -r requirements.txt\n\n# command to run tests, e.g. python setup.py test\nscript: python setup.py test\n"
  },
  {
    "path": "AUTHORS.rst",
    "content": "=======\nCredits\n=======\n\nDevelopment Lead\n----------------\n\n* Ian McCracken <ian.mccracken@gmail.com>\n\nContributors\n------------\n\n* `Aron Parsons <https://github.com/aronparsons>`_\n* `Brian Peiris <https://github.com/brianpeiris>`_\n* `nschrenk <https://github.com/nschrenk>`_\n* `Gabriel M. Schuyler <https://github.com/fnaard>`_\n* `Markus Stenberg <https://github.com/fingon>`_\n* `aktur <https://github.com/aktur>`_\n* `Justin Eldridge <https://github.com/eldridgejm>`_\n* `logjames <https://github.com/logjames>`_\n* `jgstew <https://github.com/jgstew>`_\n* `Bob Gardner <https://github.com/rgardner>`_\n* `FRITZ|FRITZ <https://github.com/fritz-fritz>`_"
  },
  {
    "path": "CONTRIBUTING.rst",
    "content": "============\nContributing\n============\n\nContributions are welcome, and they are greatly appreciated! Every\nlittle bit helps, and credit will always be given. \n\nYou can contribute in many ways:\n\nTypes of Contributions\n----------------------\n\nReport Bugs\n~~~~~~~~~~~\n\nReport bugs at https://github.com/iancmcc/ouimeaux/issues.\n\nIf you are reporting a bug, please include:\n\n* Your operating system name and version.\n* Any details about your local setup that might be helpful in troubleshooting.\n* Detailed steps to reproduce the bug.\n\nFix Bugs\n~~~~~~~~\n\nLook through the GitHub issues for bugs. Anything tagged with \"bug\"\nis open to whoever wants to implement it.\n\nImplement Features\n~~~~~~~~~~~~~~~~~~\n\nLook through the GitHub issues for features. Anything tagged with \"feature\"\nis open to whoever wants to implement it.\n\nWrite Documentation\n~~~~~~~~~~~~~~~~~~~\n\nouimeaux could always use more documentation, whether as part of the \nofficial ouimeaux docs, in docstrings, or even on the web in blog posts,\narticles, and such.\n\nSubmit Feedback\n~~~~~~~~~~~~~~~\n\nThe best way to send feedback is to file an issue at https://github.com/iancmcc/ouimeaux/issues.\n\nIf you are proposing a feature:\n\n* Explain in detail how it would work.\n* Keep the scope as narrow as possible, to make it easier to implement.\n* Remember that this is a volunteer-driven project, and that contributions\n  are welcome :)\n\nGet Started!\n------------\n\nReady to contribute? Here's how to set up `ouimeaux` for local development.\n\n1. Fork the `ouimeaux` repo on GitHub.\n2. Clone your fork locally::\n\n    $ git clone git@github.com:your_name_here/ouimeaux.git\n\n3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::\n\n    $ mkvirtualenv ouimeaux\n    $ cd ouimeaux/\n    $ python setup.py develop\n\n4. Create a branch for local development::\n\n    $ git checkout -b name-of-your-bugfix-or-feature\n   \n   Now you can make your changes locally.\n\n5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::\n\n    $ flake8 ouimeaux tests\n    $ python setup.py test\n    $ tox\n\n   To get flake8 and tox, just pip install them into your virtualenv. \n\n6. Commit your changes and push your branch to GitHub::\n\n    $ git add .\n    $ git commit -m \"Your detailed description of your changes.\"\n    $ git push origin name-of-your-bugfix-or-feature\n\n7. Submit a pull request through the GitHub website.\n\nPull Request Guidelines\n-----------------------\n\nBefore you submit a pull request, check that it meets these guidelines:\n\n1. The pull request should include tests.\n2. If the pull request adds functionality, the docs should be updated. Put\n   your new functionality into a function with a docstring, and add the\n   feature to the list in README.md.\n3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check \n   https://travis-ci.org/iancmcc/ouimeaux/pull_requests\n   and make sure that the tests pass for all supported Python versions.\n\nTips\n----\n\nTo run a subset of tests::\n\n\t$ python -m unittest tests.test_ouimeaux\n"
  },
  {
    "path": "HISTORY.rst",
    "content": ".. :changelog:\n\nHistory\n-------\n\nRelease 0.8.0 (July 30, 2016)\n+++++++++++++++++++++++++++++\n- Randomize subscription ports to enable simultaneous ouimeaux scripts (thanks @bennytheshap)\n- Fix for WeMo LED Light support (thanks @sstangle73)\n- #32: Removed address cache, broke server out into optional feature\n- Fix for Maker state reporting (thanks @pavoni)\n- Filter by SSDP location, fixing case where multiple devices respond from the same IP (thanks @szakharchenko)\n- Fix Maker event handlers, which were being passed as bridges (thanks @maxlazarov)\n- Work around gevent-socketio bug by explicitly casting header value as string\n- Fix for inconsistent Light state (thanks @canduuk)\n- StateChange signals are now a separate class and do not fire if value is unchanged (thanks @esecules)\n- Python 3 support (thanks to @drock371)\n\nRelease 0.7.9 (March 17, 2015)\n++++++++++++++++++++++++++++++\n- Command line support for WeMo LED Light (thanks @fritz-fritz)\n- Command line support for WeMo Maker (thanks @logjames)\n- Support for 2.0.0 firmware (thanks @fritz-fritz)\n- Bug fixes\n\nRelease 0.7.3 (August 10, 2014)\n++++++++++++++++++++++++++++++++\n- Fixed #18: Error when run as root\n- Fixed #26: Evict devices from cache when unreachable\n- Fixed #29: GetPower stopped working for Insight devices\n- Fixed #31: Add blink method on switches, include in REST API\n- Fixed #33, #37: Handle invalid devices without dying\n- Fixed #35: Require requests >= 2.3.0\n- Fixed #40: Retry requests in the event of failure\n- Fixed #47: Don't choke on invalid newlines in XML returned by switches\n             (thanks to @fingon)\n\nRelease 0.7.2 (January 28, 2014)\n++++++++++++++++++++++++++++++++\n- Fix a bug with using query parameters on /api/device\n\nRelease 0.7 (January 27, 2014)\n++++++++++++++++++++++++++++++\n- Added REST API\n- Added Web app\n\nRelease 0.6 (January 25, 2014)\n++++++++++++++++++++++++++++++++\n- Added signals framework\n- Fixed #16, #19, #22: Defensively resubscribe to events when device responds with an error\n- Fixed #15: Signals framework includes relevant device when sending signal\n- Refactored structure, added Sphinx docs\n\nRelease 0.5.3 (January 25, 2014)\n++++++++++++++++++++++++++++++++\n- Fixed #20: Allow timeout in environment.wait()\n- Fixed #21: Add Insight support\n\nRelease 0.5.2 (November 23, 2013)\n+++++++++++++++++++++++++++++++++\n- Fixed #14: Indicate Connection:close header to avoid logging when WeMo sends\n  invalid HTTP response.\n\nRelease 0.5.1 (November 9, 2013)\n++++++++++++++++++++++++++++++++\n- Fixed #10: Updated subscriber listener to use more reliable method of\n  retrieving non-loopback IP address; updated docs to fix typo in listener\n  registration example (thanks to @benhoyle, @francxk)\n- Fixed #11: Remove instancemethod objects before attempting to pickle devices\n  in the cache (thanks @piperde, @JonPenner, @tomtomau, @masilu77)\n\nRelease 0.5 (October 14, 2013)\n+++++++++++++++++++++++++++++++\n- Added fuzzy matching of device name when searching/toggling from command line\n- Added ``status`` mode to print status for all devices\n- Added ``switch status`` mode to print status for specific device\n- Added flags for all command-line options\n- Fixed #9: Removed unused fcntl import that precluded Windows usage (thanks to\n  @deepseven)\n\nRelease 0.4.3 (August 31, 2013)\n+++++++++++++++++++++++++++++++\n- Used new method of obtaining local IP for discovery that is less likely to\n  return loopback\n- Exit with failure and instructions for solution if loopback IP is used\n- Updated installation docs to include python-dev and pip instructions (patch\n  by @fnaard)\n- Fixed README inclusion bug that occasionally broke installation via pip.\n- Added ``--debug`` option to enable debug logging to stdout\n\nRelease 0.4 (August 17, 2013)\n+++++++++++++++++++++++++++++\n- Fixed #7: Added support for light switch devices (patch by nschrenk).\n- Fixed #6: Added \"wemo clear\" command to clear the device cache.\n\nRelease 0.3 (May 25, 2013)\n++++++++++++++++++++++++++\n- Fixed #4: Added ability to specify ip:port for discovery server binding. Removed\n  documentation describing need to disable SSDP service on Windows.\n- Fixed #5: Added device cache for faster results.\n- Added configuration file.\n- Added ability to configure aliases for devices to avoid quoting strings on\n  the command line.\n- Added 'toggle' command to command line switch control.\n\nRelease 0.2 (April 21, 2013)\n++++++++++++++++++++++++++++++\n- Fixed #1: Added ability to subscribe to motion and switch state change events.\n- Added Windows installation details to README (patch by @brianpeiris)\n- Cleaned up UDP server lifecycle so rediscovery doesn't try to start it back up.\n\nRelease 0.1 (February 2, 2013)\n++++++++++++++++++++++++++++++\n- Initial release.\n\n* First release on PyPI."
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2014, Ian McCracken\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n* Neither the name of ouimeaux nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "MANIFEST.in",
    "content": "include AUTHORS.rst\ninclude CONTRIBUTING.rst\ninclude HISTORY.rst\ninclude LICENSE\ninclude README.md\ninclude requirements.txt\ngraft ouimeaux\n"
  },
  {
    "path": "Makefile",
    "content": ".PHONY: clean-pyc clean-build docs\n\nhelp:\n\t@echo \"clean-build - remove build artifacts\"\n\t@echo \"clean-pyc - remove Python file artifacts\"\n\t@echo \"lint - check style with flake8\"\n\t@echo \"test - run tests quickly with the default Python\"\n\t@echo \"testall - run tests on every Python version with tox\"\n\t@echo \"coverage - check code coverage quickly with the default Python\"\n\t@echo \"docs - generate Sphinx HTML documentation, including API docs\"\n\t@echo \"release - package and upload a release\"\n\t@echo \"sdist - package\"\n\nclean: clean-build clean-pyc\n\nclean-build:\n\trm -fr build/\n\trm -fr dist/\n\trm -fr *.egg-info\n\nclean-pyc:\n\tfind . -name '*.pyc' -exec rm -f {} +\n\tfind . -name '*.pyo' -exec rm -f {} +\n\tfind . -name '*~' -exec rm -f {} +\n\nlint:\n\tflake8 ouimeaux tests\n\ntest:\n\tpython setup.py test\n\ntest-all:\n\ttox\n\ncoverage:\n\tcoverage run --source ouimeaux setup.py test\n\tcoverage report -m\n\tcoverage html\n\topen htmlcov/index.html\n\ndocs:\n\trm -f docs/ouimeaux.rst\n\trm -f docs/modules.rst\n\tsphinx-apidoc -o docs/ ouimeaux\n\t$(MAKE) -C docs clean\n\t$(MAKE) -C docs html\n\topen docs/_build/html/index.html\n\nrelease: clean\n\tpython setup.py sdist upload\n\nsdist: clean\n\tpython setup.py sdist\n\tls -l dist"
  },
  {
    "path": "README.md",
    "content": "# ouimeaux\n\n⚠️ ⚠️ ⚠️\n\nThe ouimeaux project is no longer actively maintained. Please contact @iancmcc\nif you would like to be added to a list of maintained forks.\n\n⚠️ ⚠️ ⚠️\n\nOpen source control for Belkin WeMo devices\n\n* Free software: BSD license\n* Documentation: http://ouimeaux.rtfd.org.\n\n## Features\n\n* Supports WeMo Switch, Light Switch, Insight Switch and Motion\n* Command-line tool to discover and control devices in your environment\n* REST API to obtain information and perform actions on devices\n* Simple responsive Web app provides device control on mobile\n* Python API to interact with device at a low level\n\n## About this fork\n\nThe original repository can be found here: https://github.com/iancmcc/ouimeaux\n\nIt doesn't appear to be maintained and it doesn't work with modern Python\npackages.\n\nIt has been forked here so that I can include my modifications to\n`requirements.txt` as well as document how to use it.\n\n## Installation\n\n```\n$ sudo pip install virtualenv\n$ mkdir ouimeaux-env\n$ virtualenv ouimeaux-env\n$ source ouimeaux-env/bin/activate\n$ cd ouimeaux-env\n$ pip install git+https://github.com/iancmcc/ouimeaux.git\n```\n\nAt this point you should be able to use `wemo` and `wemo server` so long as\nyou've activated your environment with `source ouimeaux-env/bin/activate`.\n\n**Note:** Ensure that the `pip` and `virtualenv` command you use belongs to a\nPython 2 installation. On some systems, there are multiple versions of Python\ninstalled. See below for an example from my Fedora system.\n\n```\n$ /bin/ls -1 \"$(dirname $(which python))/virtualenv\"{,-2} \"$(dirname $(which python))/p\"{ython,ip}[23]\n/usr/bin/pip2\n/usr/bin/pip3\n/usr/bin/python2\n/usr/bin/python3\n/usr/bin/virtualenv\n/usr/bin/virtualenv-2\n\n$ pip --version\npip 9.0.1 from /usr/lib/python3.5/site-packages (python 3.5)\n\n$ pip2 --version\npip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)\n```\n\n## HTTP client version\n\nThe `client.py` script provided by [BlackLight](https://github.com/BlackLight)\nallows the user to send simple commands to a device without the cumbersome\n(and [currently broken](https://github.com/iancmcc/ouimeaux/issues/193)) `Discoverer`\nobject.\n\nRequirements: install requests:\n\n```\npip install requests\n```\n\nYou can run client.py in two modes:\n\n### Scan mode\n\nWill scan for available WeMo Switch devices on the network. Example:\n\n```\npython client.py --scan --subnet 192.168.1.0/24\n```\n\n### Action mode\n\nWill run an action on a specified device. Example:\n\n```\npython client.py --device 192.168.1.19 --on\n```\n\nWith no `--on|--off|--toggle` action specified the script will return a JSON\nwith the device info:\n\n```json\n{\n  \"device\": \"192.168.1.19\",\n  \"name\": \"Lightbulbs\",\n  \"state\": false\n}\n```\n\nRun `python client.py --help` for more info about the available options.\n\n## Troubleshooting\n\n#### Using a VPN \nThe `wemo` command won't be able to communicate with your devices if you're connected to a VPN. It may be redirecting UDP traffic somewhere else. Disconnect from the VPN and the tool should work.\n\nOpen an issue and I'll try to help.\n\n#### Docker\n\nYou need to be on the same network as your device. To do this ensure you are using `host` network, see [https://docs.docker.com/network/host/](https://docs.docker.com/network/host/) for more info. "
  },
  {
    "path": "client.py",
    "content": "#!/usr/bin/env python\n# :author: Fabio \"BlackLight\" Manganiello <info@fabiomanganiello.com>\n#\n# Requirements:\n#     - `requests` package (`pip install requests`)\n#     - [Advised] static IP allocation for your WeMo devices\n\nimport argparse\nimport enum\nimport ipaddress\nimport json\nimport multiprocessing\nimport re\nimport requests\nimport socket\nimport sys\nimport textwrap\n\nfrom typing import Type\nfrom xml.dom.minidom import parseString\n\n\ndefault_port = 49153\n\n\nclass SwitchAction(enum.Enum):\n    GET_STATE = 'GetBinaryState'\n    SET_STATE = 'SetBinaryState'\n    GET_NAME = 'GetFriendlyName'\n\n\nclass Worker(multiprocessing.Process):\n    _END_OF_STREAM = None\n\n    def __init__(self, request_queue: multiprocessing.Queue, response_queue=multiprocessing.Queue):\n        super().__init__()\n        self.request_queue = request_queue\n        self.response_queue = response_queue\n\n    def send_stop(self):\n        self.request_queue.put(self._END_OF_STREAM)\n\n    def process_response(self, resp):\n        self.response_queue.put(resp)\n\n\nclass Workers:\n    def __init__(self, n_workers: int, worker_type: Type[Worker], *args, **kwargs):\n        self.request_queue = multiprocessing.Queue()\n        self.response_queue = multiprocessing.Queue()\n        self._workers = [worker_type(self.request_queue, self.response_queue,\n            *args, **kwargs) for _ in range(n_workers)]\n\n    def start(self):\n        for wrk in self._workers:\n            wrk.start()\n\n    def put(self, msg):\n        self.request_queue.put(msg)\n\n    def wait(self) -> list:\n        while self._workers:\n            for i, wrk in enumerate(self._workers):\n                if not self._workers[i].is_alive():\n                    self._workers.pop(i)\n                    break\n\n        ret = []\n        while not self.response_queue.empty():\n            ret.append(self.response_queue.get())\n        return ret\n\n    def send_stop(self):\n        for wrk in self._workers:\n            wrk.send_stop()\n\n\nclass ScanWorker(Worker):\n    def __init__(self, request_queue: multiprocessing.Queue, response_queue: multiprocessing.Queue,\n            scan_timeout: float, connect_timeout: float, port: int = default_port):\n        super().__init__(request_queue, response_queue)\n        self.scan_timeout = scan_timeout\n        self.connect_timeout = connect_timeout\n        self.port = port\n\n    def run(self):\n        while True:\n            addr = self.request_queue.get()\n            if addr == self._END_OF_STREAM:\n                break\n\n            try:\n                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n                sock.settimeout(self.scan_timeout)\n                sock.connect((addr, self.port))\n                sock.close()\n                dev = get_device(addr, timeout=self.connect_timeout)\n                print('Found WeMo device: {}'.format(dev))\n                self.process_response(dev)\n            except OSError:\n                pass\n\n\ndef _exec(device: str, action: SwitchAction, value=None, port: int = default_port, timeout: float = None):\n    state_name = action.value[3:]\n\n    response = requests.post(\n        'http://{}:{}/upnp/control/basicevent1'.format(device, port),\n        headers={\n            'User-Agent': '',\n            'Accept': '',\n            'Content-Type': 'text/xml; charset=\"utf-8\"',\n            'SOAPACTION': '\\\"urn:Belkin:service:basicevent:1#{}\\\"'.format(action.value),\n        },\n        data=re.sub('\\s+', ' ', textwrap.dedent(\n            '''\n            <?xml version=\"1.0\" encoding=\"utf-8\"?>\n            <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"\n                    s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n                <s:Body>\n                    <u:{action} xmlns:u=\"urn:Belkin:service:basicevent:1\">\n                        <{state}>{value}</{state}>\n                    </u:{action}\n                ></s:Body>\n            </s:Envelope>\n            '''.format(action=action.value, state=state_name,\n                       value=value if value is not None else ''))))\n\n    dom = parseString(response.text)\n    return dom.getElementsByTagName(state_name).item(0).firstChild.data\n\n\ndef on(device: str, *args, **kwargs):\n    return _exec(device, SwitchAction.SET_STATE, 1)\n\n\ndef off(device: str, *args, **kwargs):\n    return _exec(device, SwitchAction.SET_STATE, 0, *args, **kwargs)\n\n\ndef get_state(device: str, *args, **kwargs):\n    return bool(int(_exec(device, SwitchAction.GET_STATE, *args, **kwargs)))\n\n\ndef get_name(device: str, *args, **kwargs):\n    return _exec(device, SwitchAction.GET_NAME, *args, **kwargs)\n\n\ndef get_device(device: str, *args, **kwargs):\n    return {\n        'device': device,\n        'name': get_name(device, *args, **kwargs),\n        'state': get_state(device, *args, **kwargs),\n    }\n\n\ndef main():\n    global default_port\n\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--scan', '-s', dest='scan', required=False, default=False, action='store_true',\n                        help=\"Run Switchbot in scan mode - scan devices to control\")\n\n    parser.add_argument('--subnet', '-n', dest='subnet', required=False, default=None,\n                        help=\"Set the network subnet for --scan mode (e.g. 192.168.1.0/24)\")\n\n    parser.add_argument('--port', '-p', dest='port', required=False, type=int, default=default_port,\n                        help=\"TCP port used by the WeMo device(s)\")\n\n    parser.add_argument('--scan-timeout', dest='scan_timeout', type=float, required=False, default=2.0,\n                        help=\"Device scan timeout (default: 2 seconds)\")\n\n    parser.add_argument('--connect-timeout', dest='connect_timeout', type=float, required=False, default=30.0,\n                        help=\"Device connection timeout (default: 30 seconds)\")\n\n    parser.add_argument('--device', '-d', dest='device', required=False, default=None,\n                        help=\"IP address of a device to control\")\n\n    parser.add_argument('--on', dest='on', required=False, default=False, action='store_true',\n                        help=\"Turn the device on\")\n\n    parser.add_argument('--off', dest='off', required=False, default=False, action='store_true',\n                        help=\"Turn the device off\")\n\n    parser.add_argument('--toggle', dest='toggle', required=False, default=False, action='store_true',\n                        help=\"Toggle the device\")\n\n    opts, args = parser.parse_known_args(sys.argv[1:])\n\n    if (opts.scan and opts.device) or not (opts.scan or opts.device):\n        raise AttributeError('Please specify either --scan or --device')\n\n    if opts.scan:\n        if not opts.subnet:\n            raise AttributeError('No --subnet specified for --scan mode')\n\n        workers = Workers(10, ScanWorker, scan_timeout=opts.scan_timeout,\n                connect_timeout=opts.connect_timeout, port=opts.port)\n\n        workers.start()\n\n        for addr in ipaddress.IPv4Network(opts.subnet):\n            workers.put(addr.exploded)\n\n        workers.send_stop()\n        devices = workers.wait()\n        print('\\nFound {} WeMo devices'.format(len(devices)))\n        print(json.dumps(devices, indent=2))\n        return\n\n    _on = opts.on\n    _off = opts.off\n\n    if opts.toggle:\n        if get_state(opts.device):\n            _off = True\n        else:\n            _on = True\n\n    if _on:\n        on(opts.device, timeout=opts.connect_timeout)\n    elif _off:\n        off(opts.device, timeout=opts.connect_timeout)\n    else:\n        print(json.dumps(\n            get_device(opts.device, timeout=opts.connect_timeout),\n            indent=2))\n\n\nif __name__ == '__main__':\n    main()\n\n\n# vim:sw=4:ts=4:et:\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         =\nBUILDDIR      = _build\n\n# User-friendly check for sphinx-build\nifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)\n$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)\nendif\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n# the i18n builder cannot share the environment and doctrees with the others\nI18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext\n\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  latexpdfja to make LaTeX files and run them through platex/dvipdfmx\"\n\t@echo \"  text       to make text files\"\n\t@echo \"  man        to make manual pages\"\n\t@echo \"  texinfo    to make Texinfo files\"\n\t@echo \"  info       to make Texinfo files and run them through makeinfo\"\n\t@echo \"  gettext    to make PO message catalogs\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  xml        to make Docutils-native XML files\"\n\t@echo \"  pseudoxml  to make pseudoxml-XML files for display purposes\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\nclean:\n\trm -rf $(BUILDDIR)/*\n\nhtml:\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/html.\"\n\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/complexity.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/complexity.qhc\"\n\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/complexity\"\n\t@echo \"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/complexity\"\n\t@echo \"# devhelp\"\n\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make' in that directory to run these through (pdf)latex\" \\\n\t      \"(use \\`make latexpdf' here to do that automatically).\"\n\nlatexpdf:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\nlatexpdfja:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through platex and dvipdfmx...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\ntext:\n\t$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\n\t@echo\n\t@echo \"Build finished. The text files are in $(BUILDDIR)/text.\"\n\nman:\n\t$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\n\t@echo\n\t@echo \"Build finished. The manual pages are in $(BUILDDIR)/man.\"\n\ntexinfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo\n\t@echo \"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo.\"\n\t@echo \"Run \\`make' in that directory to run these through makeinfo\" \\\n\t      \"(use \\`make info' here to do that automatically).\"\n\ninfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo \"Running Texinfo files through makeinfo...\"\n\tmake -C $(BUILDDIR)/texinfo info\n\t@echo \"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo.\"\n\ngettext:\n\t$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\n\t@echo\n\t@echo \"Build finished. The message catalogs are in $(BUILDDIR)/locale.\"\n\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n\nxml:\n\t$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml\n\t@echo\n\t@echo \"Build finished. The XML files are in $(BUILDDIR)/xml.\"\n\npseudoxml:\n\t$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml\n\t@echo\n\t@echo \"Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml.\""
  },
  {
    "path": "docs/api.rst",
    "content": "===========\nPython API\n===========\n\nEnvironment\n-----------\nThe main interface is presented by an ``Environment``, which optionally accepts\nfunctions called when a Switch or Motion device is identified::\n\n    >>> from ouimeaux.environment import Environment\n    >>>\n    >>> def on_switch(switch):\n    ...     print \"Switch found!\", switch.name\n    ...\n    >>> def on_motion(motion):\n    ...     print \"Motion found!\", motion.name\n    ...\n    >>> env = Environment(on_switch, on_motion)\n\nStart up the server to listen for responses to the discovery broadcast::\n\n    >>> env.start()\n\nDiscovery of all WeMo devices in an environment is then straightforward; simply\npass the length of time (in seconds) you want discovery to run::\n\n    >>> env.discover(seconds=3)\n    Switch found! Living Room\n\nDuring that time, the ``Environment`` will continually broadcast search requests\nand parse responses. At any point, you can see the names of discovered devices::\n\n    >>> env.list_switches()\n    ['Living Room', 'TV Room', 'Front Closet']\n    >>> env.list_motions()\n    ['Front Hallway']\n\nDevices can be retrieved by using ``get_switch`` and ``get_motion`` methods::\n\n    >>> switch = env.get_switch('TV Room')\n    >>> switch\n    <WeMo Switch \"TV Room\">\n\nDevices\n-------\nAll devices have an ``explain()`` method, which will print out a list of all\navailable services, as well as the actions and arguments to those actions\non each service::\n\n    >>> switch.explain()\n\n    basicevent\n    ----------\n      SetSmartDevInfo(SmartDevURL)\n      SetServerEnvironment(ServerEnvironmentType, TurnServerEnvironment, ServerEnvironment)\n      GetDeviceId()\n      GetRuleOverrideStatus(RuleOverrideStatus)\n      GetIconURL(URL)\n      SetBinaryState(BinaryState)\n    ...\n\nServices and actions are available via simple attribute access. Calling actions\nreturns a dictionary of return values::\n\n    >>> switch.basicevent.SetBinaryState(BinaryState=0)\n    {'BinaryState': 0}\n\nEvents\n------\n.. warning:: This events framework is deprecated and will be removed prior to the 1.0 release. Please use the signals framework.\n\nBy default, ouimeaux subscribes to property change events on discovered\ndevices (this can be disabled by passing ``with_subscribers=False`` to the\n``Environment`` constructor). You can register callbacks that will be called\nwhen switches and motions change state (on/off, or motion detected)::\n\n    >>> def on_motion(value):\n    ...     print \"Motion detected!\"\n    ...\n    >>> env.get_motion('Front Hallway').register_listener(on_motion)\n    >>> env.wait(timeout=60)\n\nNote the use of ``Environment.wait()`` to give control to the event loop for\nevents to be detected. A timeout in seconds may optionally be specified;\ndefault is no timeout.\n\nSignals\n-------\nA simple signals framework (using pysignals_) is included to replace the\nrudimentary events in earlier releases. These are found in the\n`ouimeaux.signals` module. Signal handlers may be registered using the\n``receiver`` decorator and must have the signature ``sender, **kwargs``::\n\n    @receiver(devicefound)\n    def handler(sender, **kwargs):\n        print \"Found device\", sender\n\n\nWhere ``sender`` is the relevant object (in most cases, the device). Signals\nmay also have handlers registered using ``signal.connect(handler)``::\n\n    def handler(sender, **kwargs):\n        pass\n\n    statechange.connect(sender)\n\nAvailable signals:\n\n    ``discovered``\n        Fires when a device responds to the broadcast request. Includes:\n         - ``sender``: The UPnP broadcast component\n         - ``address``: The address of the responding device\n         - ``headers``: The response headers\n\n    ``devicefound``\n        Sent when a device is found and registered into the environment. Includes:\n         - ``sender``: The device found\n\n    ``subscription``\n        Sent when a device sends an event as the result of a subscription. Includes:\n         - ``sender``: The device that sent the event\n         - ``type``: The type of the event send (e.g., ``BinaryState``)\n         - ``value``: The value associated with the event\n\n    ``statechange``\n        Sent when a device indicates it has detected a state change. Includes:\n         - ``sender``: The device that changed state\n         - ``state``: The resulting state (0 or 1)\n\n\nSee the pysignals_ documentation for further information.\n\nExample: Registering a handler for when a Light Switch switches on or off::\n\n    from ouimeaux.signals import statechange, receiver\n\n    env = Environment(); env.start()\n    env.discover(5)\n\n    switch = env.get_switch('Porch Light')\n\n    @receiver(statechange, sender=switch)\n    def switch_toggle(device, **kwargs):\n        print device, kwargs['state']\n\n    env.wait()  # Pass control to the event loop\n\nSee the examples_ for a more detailed implementation.\n\n.. _pysignals: https://github.com/theojulienne/PySignals\n\nSwitches\n--------\nSwitches have three shortcut methods defined: ``get_state``, ``on`` and\n``off``. Switches also have a ``blink`` method, which accepts a number of\nseconds. This will toggle the device, wait the number of seconds, then toggle\nit again. Remember to call ``env.wait()`` to give control to the event loop.\n\nMotions\n-------\nMotions have one shortcut method defined: ``get_state``.\n\nInsight\n-------\nIn addition to the normal Switch methods, Insight switches have several metrics\nexposed::\n\n    insight.today_kwh\n    insight.current_power\n    insight.today_on_time\n    insight.on_for\n    insight.today_standby_time\n\nDevice Cache\n------------\nBy default, device results are cached on the filesystem for quicker\ninitialization. This can be disabled by passing ``with_cache=False`` to the\n``Environment`` constructor. On a related note, if you want to use the cache\nexclusively, you can pass ``with_discovery=False`` to the ``Environment``\nconstructor to disable M-SEARCH requests.\n\nYou can clear the device cache either by deleting the file ``~/.wemo/cache`` \nor by using the ``wemo clear`` command.\n\nExamples\n--------\nDetailed examples_ are included in the source demonstrating common use cases.\nSuggestions (or implementations) for more are always welcome.\n\n.. _examples: https://github.com/iancmcc/ouimeaux/tree/develop/ouimeaux/examples\n"
  },
  {
    "path": "docs/authors.rst",
    "content": ".. include:: ../AUTHORS.rst"
  },
  {
    "path": "docs/conf.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# complexity documentation build configuration file, created by\n# sphinx-quickstart on Tue Jul  9 22:26:36 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.insert(0, os.path.abspath('.'))\n\n# Get the project root dir, which is the parent dir of this\ncwd = os.getcwd()\nproject_root = os.path.dirname(cwd)\n\n# Insert the project root dir as the first element in the PYTHONPATH.\n# This lets us ensure that the source package is imported, and that its\n# version is used.\nsys.path.insert(0, project_root)\n\nimport ouimeaux\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'ouimeaux'\ncopyright = u'2014, Ian McCracken'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = ouimeaux.__version__\n# The full version, including alpha/beta/rc tags.\nrelease = ouimeaux.__version__\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n#keep_warnings = False\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'ouimeauxdoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'ouimeaux.tex', u'ouimeaux Documentation',\n   u'Ian McCracken', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'ouimeaux', u'ouimeaux Documentation',\n     [u'Ian McCracken'], 1)\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'ouimeaux', u'ouimeaux Documentation',\n   u'Ian McCracken', 'ouimeaux', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#texinfo_no_detailmenu = False"
  },
  {
    "path": "docs/configuration.rst",
    "content": "=============\nConfiguration\n=============\n\nA configuration file in YAML format will be created at ``~/.wemo/config.yml``::\n\n    # ip:port to bind to when receiving responses from discovery.\n    # The default is first DNS resolution of local host, port 54321\n    #\n    # bind: 10.1.2.3:9090\n\n    # Whether to use a device cache (stored at ~/.wemo/cache)\n    #\n    # cache: false\n\n    aliases:\n    # Shortcuts to longer device names. Uncommenting the following\n    # line will allow you to execute 'wemo switch lr on' instead of\n    # 'wemo switch \"Living Room Lights\" on'\n    #\n    #    lr: Living Room Lights\n\n    # Web app bind address\n    #\n    # listen: 0.0.0.0:5000\n\n    # Require basic authentication (username:password) for the web app\n    #\n    # auth: admin:password\n"
  },
  {
    "path": "docs/contributing.rst",
    "content": ".. include:: ../CONTRIBUTING.rst"
  },
  {
    "path": "docs/history.rst",
    "content": ".. include:: ../HISTORY.rst"
  },
  {
    "path": "docs/index.rst",
    "content": ".. complexity documentation master file, created by\n   sphinx-quickstart on Tue Jul  9 22:26:36 2013.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nOuimeaux: Open Source WeMo Control\n==================================\n\nContents:\n\n.. toctree::\n   :maxdepth: 2\n\n   readme\n   installation\n   wemo\n   server\n   configuration\n   api\n   contributing\n   authors\n   history\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n"
  },
  {
    "path": "docs/installation.rst",
    "content": "============\nInstallation\n============\n\nBasic\n-----\nAt the command line::\n\n    $ easy_install ouimeaux\n\nOr, if you have virtualenvwrapper installed::\n\n    $ mkvirtualenv ouimeaux\n    $ pip install ouimeaux\n\nIf you want to enable ``wemo server`` functionality, specify the ``server``\nfeature to install the necessary dependencies::\n\n    $ pip install ouimeaux[server]\n\nLinux\n-----\nouimeaux requires Python header files to build some dependencies, and is\ninstalled normally using pip or easy_install.\n\nDebian/Ubuntu::\n\n    sudo apt-get install python-setuptools python-dev\n\nRHEL/CentOS/Fedora::\n\n    sudo yum -y install python-setuptools python-devel\n\nIf you wish to build from a local copy of the source, you can of course always\nexecute::\n\n    python setup.py install\n\n\nWindows\n-------\nouimeaux requires gevent version 1.0rc2 or higher. If you don't have the \nability to compile gevent and greenlet (a sub-dependency) locally, you can \nfind and download the binary installers for these packages here:\n\n- gevent: https://github.com/SiteSupport/gevent/downloads\n- greenlet: https://pypi.python.org/pypi/greenlet\n"
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset BUILDDIR=_build\nset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\nset I18NSPHINXOPTS=%SPHINXOPTS% .\nif NOT \"%PAPER%\" == \"\" (\n\tset ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\n\tset I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%\n)\n\nif \"%1\" == \"\" goto help\n\nif \"%1\" == \"help\" (\n\t:help\n\techo.Please use `make ^<target^>` where ^<target^> is one of\n\techo.  html       to make standalone HTML files\n\techo.  dirhtml    to make HTML files named index.html in directories\n\techo.  singlehtml to make a single large HTML file\n\techo.  pickle     to make pickle files\n\techo.  json       to make JSON files\n\techo.  htmlhelp   to make HTML files and a HTML help project\n\techo.  qthelp     to make HTML files and a qthelp project\n\techo.  devhelp    to make HTML files and a Devhelp project\n\techo.  epub       to make an epub\n\techo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\n\techo.  text       to make text files\n\techo.  man        to make manual pages\n\techo.  texinfo    to make Texinfo files\n\techo.  gettext    to make PO message catalogs\n\techo.  changes    to make an overview over all changed/added/deprecated items\n\techo.  xml        to make Docutils-native XML files\n\techo.  pseudoxml  to make pseudoxml-XML files for display purposes\n\techo.  linkcheck  to check all external links for integrity\n\techo.  doctest    to run all doctests embedded in the documentation if enabled\n\tgoto end\n)\n\nif \"%1\" == \"clean\" (\n\tfor /d %%i in (%BUILDDIR%\\*) do rmdir /q /s %%i\n\tdel /q /s %BUILDDIR%\\*\n\tgoto end\n)\n\n\n%SPHINXBUILD% 2> nul\nif errorlevel 9009 (\n\techo.\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\n\techo.installed, then set the SPHINXBUILD environment variable to point\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\n\techo.may add the Sphinx directory to PATH.\n\techo.\n\techo.If you don't have Sphinx installed, grab it from\n\techo.http://sphinx-doc.org/\n\texit /b 1\n)\n\nif \"%1\" == \"html\" (\n\t%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/html.\n\tgoto end\n)\n\nif \"%1\" == \"dirhtml\" (\n\t%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\n\tgoto end\n)\n\nif \"%1\" == \"singlehtml\" (\n\t%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.\n\tgoto end\n)\n\nif \"%1\" == \"pickle\" (\n\t%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the pickle files.\n\tgoto end\n)\n\nif \"%1\" == \"json\" (\n\t%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the JSON files.\n\tgoto end\n)\n\nif \"%1\" == \"htmlhelp\" (\n\t%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run HTML Help Workshop with the ^\n.hhp project file in %BUILDDIR%/htmlhelp.\n\tgoto end\n)\n\nif \"%1\" == \"qthelp\" (\n\t%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run \"qcollectiongenerator\" with the ^\n.qhcp project file in %BUILDDIR%/qthelp, like this:\n\techo.^> qcollectiongenerator %BUILDDIR%\\qthelp\\complexity.qhcp\n\techo.To view the help file:\n\techo.^> assistant -collectionFile %BUILDDIR%\\qthelp\\complexity.ghc\n\tgoto end\n)\n\nif \"%1\" == \"devhelp\" (\n\t%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished.\n\tgoto end\n)\n\nif \"%1\" == \"epub\" (\n\t%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The epub file is in %BUILDDIR%/epub.\n\tgoto end\n)\n\nif \"%1\" == \"latex\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdf\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf\n\tcd %BUILDDIR%/..\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdfja\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf-ja\n\tcd %BUILDDIR%/..\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"text\" (\n\t%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The text files are in %BUILDDIR%/text.\n\tgoto end\n)\n\nif \"%1\" == \"man\" (\n\t%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The manual pages are in %BUILDDIR%/man.\n\tgoto end\n)\n\nif \"%1\" == \"texinfo\" (\n\t%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.\n\tgoto end\n)\n\nif \"%1\" == \"gettext\" (\n\t%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The message catalogs are in %BUILDDIR%/locale.\n\tgoto end\n)\n\nif \"%1\" == \"changes\" (\n\t%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.The overview file is in %BUILDDIR%/changes.\n\tgoto end\n)\n\nif \"%1\" == \"linkcheck\" (\n\t%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Link check complete; look for any errors in the above output ^\nor in %BUILDDIR%/linkcheck/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"doctest\" (\n\t%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Testing of doctests in the sources finished, look at the ^\nresults in %BUILDDIR%/doctest/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"xml\" (\n\t%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The XML files are in %BUILDDIR%/xml.\n\tgoto end\n)\n\nif \"%1\" == \"pseudoxml\" (\n\t%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.\n\tgoto end\n)\n\n:end"
  },
  {
    "path": "docs/modules.rst",
    "content": "ouimeaux\n========\n\n.. toctree::\n   :maxdepth: 4\n\n   ouimeaux\n"
  },
  {
    "path": "docs/ouimeaux.device.api.rst",
    "content": "ouimeaux.device.api package\n===========================\n\nSubpackages\n-----------\n\n.. toctree::\n\n    ouimeaux.device.api.xsd\n\nSubmodules\n----------\n\nouimeaux.device.api.service module\n----------------------------------\n\n.. automodule:: ouimeaux.device.api.service\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.device.api\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.device.api.xsd.rst",
    "content": "ouimeaux.device.api.xsd package\n===============================\n\nSubmodules\n----------\n\nouimeaux.device.api.xsd.device module\n-------------------------------------\n\n.. automodule:: ouimeaux.device.api.xsd.device\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.device.api.xsd.service module\n--------------------------------------\n\n.. automodule:: ouimeaux.device.api.xsd.service\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.device.api.xsd\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.device.rst",
    "content": "ouimeaux.device package\n=======================\n\nSubpackages\n-----------\n\n.. toctree::\n\n    ouimeaux.device.api\n\nSubmodules\n----------\n\nouimeaux.device.insight module\n------------------------------\n\n.. automodule:: ouimeaux.device.insight\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.device.lightswitch module\n----------------------------------\n\n.. automodule:: ouimeaux.device.lightswitch\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.device.motion module\n-----------------------------\n\n.. automodule:: ouimeaux.device.motion\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.device.switch module\n-----------------------------\n\n.. automodule:: ouimeaux.device.switch\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.device\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.examples.rst",
    "content": "ouimeaux.examples package\n=========================\n\nSubmodules\n----------\n\nouimeaux.examples.watch module\n------------------------------\n\n.. automodule:: ouimeaux.examples.watch\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.examples\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.pysignals.rst",
    "content": "ouimeaux.pysignals package\n==========================\n\nSubmodules\n----------\n\nouimeaux.pysignals.dispatcher module\n------------------------------------\n\n.. automodule:: ouimeaux.pysignals.dispatcher\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.pysignals.inspect module\n---------------------------------\n\n.. automodule:: ouimeaux.pysignals.inspect\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.pysignals.weakref_backports module\n-------------------------------------------\n\n.. automodule:: ouimeaux.pysignals.weakref_backports\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.pysignals\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.rst",
    "content": "ouimeaux package\n================\n\nSubpackages\n-----------\n\n.. toctree::\n\n    ouimeaux.device\n    ouimeaux.examples\n    ouimeaux.pysignals\n    ouimeaux.server\n\nSubmodules\n----------\n\nouimeaux.cli module\n-------------------\n\n.. automodule:: ouimeaux.cli\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.config module\n----------------------\n\n.. automodule:: ouimeaux.config\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.discovery module\n-------------------------\n\n.. automodule:: ouimeaux.discovery\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.environment module\n---------------------------\n\n.. automodule:: ouimeaux.environment\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.signals module\n-----------------------\n\n.. automodule:: ouimeaux.signals\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.subscribe module\n-------------------------\n\n.. automodule:: ouimeaux.subscribe\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.utils module\n---------------------\n\n.. automodule:: ouimeaux.utils\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.server.rst",
    "content": "ouimeaux.server package\n=======================\n\nSubmodules\n----------\n\nouimeaux.server.settings module\n-------------------------------\n\n.. automodule:: ouimeaux.server.settings\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.server\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/ouimeaux.xsd.rst",
    "content": "ouimeaux.xsd package\n====================\n\nSubmodules\n----------\n\nouimeaux.xsd.device module\n--------------------------\n\n.. automodule:: ouimeaux.xsd.device\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nouimeaux.xsd.service module\n---------------------------\n\n.. automodule:: ouimeaux.xsd.service\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: ouimeaux.xsd\n    :members:\n    :undoc-members:\n    :show-inheritance:\n"
  },
  {
    "path": "docs/readme.rst",
    "content": ".. include:: ../README.md\n"
  },
  {
    "path": "docs/server.rst",
    "content": "=======\nServer\n=======\n\n``wemo server`` starts a process serving up both a Web app providing basic\ndevice control and a REST API allowing integration with any number of services.\n\nThe necessary dependencies to run the server are not installed unless the\n``server`` feature is specified at installation::\n\n    $ pip install ouimeaux[server]\n\nConfiguration\n-------------\nThe IP and port to which the server will bind are specified by the ``listen``\nparameter in the configuration file. Default: ``0.0.0.0:5000``.  \nOptionally, basic authentication can be enabled for the web server by \nsetting the ``auth`` parameter in the configuration file.\n\nWeb App\n--------\nThe Web app very simply presents buttons allowing control of devices and\nindicating current state. Motions appear as disabled buttons but will turn\ngreen when activated.\n\n.. image:: webapp.png\n\nREST API\n---------\nA vaguely RESTful API is provided to control devices. Arguments, where\nspecified, may be passed either as query arguments or as JSON::\n    \n    curl -X POST http://localhost:5000/api/environment -d '{\"seconds\":10}'\n\nis as valid as::\n\n    curl -X POST http://localhost:5000/api/environment?seconds=10\n\n.. table::\n\n   =====================         =========================================\n   Resource                      Description\n   =====================         =========================================\n   GET /api/environment          Returns a JSON description of all devices \n                                 in the environment\n   POST /api/environment         Initiates a discovery of the environment.\n                                 Optional ``seconds`` argument (default: 5)\n                                 determines length of discovery.\n   GET /api/device/NAME          Returns a JSON description of the device \n                                 named NAME. NAME will be fuzzy-matched \n                                 against device names, as on the command\n                                 line (e.g., \"closet\" will match \"Hall \n                                 Closet\"). \n   POST /api/device/NAME         Toggle switch state, specified by optional\n                                 ``state`` argument (default: \"toggle\"). Valid\n                                 values are \"on\", \"off\" or \"toggle\".\n   =====================         =========================================\n"
  },
  {
    "path": "docs/wemo.rst",
    "content": "================\n``wemo`` Command\n================\n\nThe ``wemo`` script will discover devices in your environment and turn\nswitches on and off. To list devices::\n\n    $ wemo list\n\nDefault is to search for 5 seconds; you can pass ``--timeout`` to change that.\n\nYou can also print the status of every device found in your environment (the\n``-v`` option is available to print on/off instead of 0/1)::\n\n    $ wemo status\n\nTo turn a switch on and off, you first have to know the name. Then::\n\n    $ wemo switch \"TV Room\" on\n    $ wemo switch \"TV Room\" off\n\nYou can also toggle the device::\n\n    $ wemo switch \"TV Room\" toggle\n\nOr check its current status (the ``-v`` option will print the word on/off\ninstead of 0/1)::\n\n    $ wemo -v switch \"TV Room\" status\n    on\n\nWeMo LED Bulbs are supported on the command line as well. Control them like\nswitches with ``wemo light``::\n\n    $ wemo light lamp on\n\nOr set them to a dimness level from 1 to 255::\n\n    $ wemo light lamp on 45\n\nThe ``wemo`` script will do fuzzy matching of the name you pass in (this can be\ndisabled with the ``-e`` option)::\n\n    $ wemo switch tvrm on\n\nAliases configured in the file will be accessible on the command line as well::\n\n    aliases:\n        tv: TV Room Lights\n\n    $ wemo switch tv on\n\nNote: If an alias is used on the command line, fuzzy matching will not be\nattempted.\n\nThe ``wemo`` script will obey configured settings; they can also be overridden\non the command line:\n\n``-b``, ``--bind IP:PORT``\n    Bind to this host and port when listening for responses\n\n``-d``, ``--debug``\n    Enable debug logging to stdout\n\n``-e``, ``--exact-match``\n    Disable fuzzy matching\n\n``-v``, ``--human-readable``\n    Print statuses as human-readable words\n\n``-t``, ``--timeout``\n    Time in seconds to allow for discovery\n"
  },
  {
    "path": "ouimeaux/__init__.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n__author__ = 'Ian McCracken'\n__email__ = 'ian.mccracken@gmail.com'\n__version__ = '0.8.2'\n"
  },
  {
    "path": "ouimeaux/cli.py",
    "content": "import sys\nimport logging\nimport argparse\n\nfrom .discovery import UPnPLoopbackException\nfrom .environment import Environment\nfrom .config import WemoConfiguration\nfrom .utils import matcher\n\nreqlog = logging.getLogger(\"requests.packages.urllib3.connectionpool\")\nreqlog.disabled = True\n\nNOOP = lambda *x: None\n\n\ndef _state(device, readable=False):\n    state = device.get_state(force_update=True)\n    if readable:\n        return \"on\" if state else \"off\"\n    else:\n        return state\n\n\ndef scan(args, on_switch=NOOP, on_motion=NOOP, on_bridge=NOOP, on_maker=NOOP):\n    try:\n        env = Environment(on_switch, on_motion, on_bridge, on_maker,\n                          with_subscribers=False, bind=args.bind)\n        env.start()\n        env.discover(args.timeout)\n    except KeyboardInterrupt:\n        sys.exit(0)\n    except UPnPLoopbackException:\n        print(\"\"\"\nLoopback interface is being used! You will probably not receive any responses\nfrom devices.  Use ifconfig to find your IP address, then either pass the\n--bind argument or edit ~/.wemo/config.yml to specify the IP to which devices\nshould call back during discovery.\"\"\".strip())\n        sys.exit(1)\n\n\ndef switch(args):\n    if args.state.lower() in (\"on\", \"1\", \"true\"):\n        state = \"on\"\n    elif args.state.lower() in (\"off\", \"0\", \"false\"):\n        state = \"off\"\n    elif args.state.lower() == \"toggle\":\n        state = \"toggle\"\n    elif args.state.lower() == \"status\":\n        state = \"status\"\n    else:\n        print(\"\"\"No valid action specified.\nUsage: wemo switch NAME (on|off|toggle|status)\"\"\")\n        sys.exit(1)\n\n    matches = make_matcher(args.device)\n\n    def on_switch(switch):\n        if matches(switch.name):\n            if state == \"toggle\":\n                found_state = switch.get_state(force_update=True)\n                switch.set_state(not found_state)\n            elif state == \"status\":\n                print(_state(switch, args.human_readable))\n            else:\n                getattr(switch, state)()\n            if args.device.lower() != 'all':\n                sys.exit(0)\n\n    scan(args, on_switch)\n    if args.device != 'all':\n        # If we got here, we didn't find anything\n        print(\"No device found with that name.\")\n        sys.exit(1)\n\n\ndef light(args):\n    if args.state.lower() in (\"on\", \"1\", \"true\"):\n        state = \"on\"\n    elif args.state.lower() in (\"off\", \"0\", \"false\"):\n        state = \"off\"\n    elif args.state.lower() == \"toggle\":\n        state = \"toggle\"\n    elif args.state.lower() == \"status\":\n        state = \"status\"\n    else:\n        print(\"\"\"No valid action specified.\nUsage: wemo light NAME (on|off|toggle|status)\"\"\")\n        sys.exit(1)\n\n    matches = make_matcher(args.name)\n\n    def on_switch(switch):\n        pass\n\n    def on_motion(motion):\n        pass\n\n    def on_bridge(bridge):\n        bridge.bridge_get_lights()\n        bridge.bridge_get_groups()\n        for light in bridge.Lights:\n            if matches(light):\n                if args.state == \"toggle\":\n                    found_state = bridge.light_get_state(bridge.Lights[light]).get('state')\n                    bridge.light_set_state(bridge.Lights[light], state=not found_state)\n                elif args.state == \"status\":\n                    print(bridge.light_get_state(bridge.Lights[light]))\n                else:\n                    if args.state == \"on\":\n                        if args.dim is not None:\n                            if args.dim <= 255 and args.dim >= 0:\n                                dim = args.dim\n                                state = None\n                            else:\n                                print(\"\"\"Invalid dim specified.\nDim must be between 0 and 255\"\"\")\n                                sys.exit(1)\n                        else:\n                            dim = None\n                            state = 1\n                    else:\n                        dim = None\n                        state = 0\n                    bridge.light_set_state(bridge.Lights[light], state=state, dim=dim)\n                if args.name != 'all':\n                    sys.exit(0)\n        for group in bridge.Groups:\n            if matches(group):\n                if args.state == \"toggle\":\n                    found_state = bridge.group_get_state(bridge.Groups[group]).get('state')\n                    bridge.group_set_state(bridge.Groups[group], state=not found_state)\n                elif args.state == \"status\":\n                    print(bridge.group_get_state(bridge.Groups[group]))\n                else:\n                    if args.dim == None and args.state == \"on\":\n                        dim = bridge.group_get_state(bridge.Groups[group]).get('dim')\n                        state = 1\n                    elif args.state == \"off\":\n                        dim = None\n                        state = 0\n                    elif args.dim <= 255 and args.dim >= 0:\n                        dim = args.dim\n                        state = 1\n                    else:\n                        print(\"\"\"Invalid dim specified.\nDim must be between 0 and 255\"\"\")\n                        sys.exit(1)\n                    bridge.group_set_state(bridge.Groups[group], state=state, dim=dim)\n                sys.exit(0)\n\n    scan(args, on_switch, on_motion, on_bridge)\n    if args.name != 'all':\n        # If we got here, we didn't find anything\n        print(\"No device or group found with that name.\")\n        sys.exit(1)\n\n\ndef make_matcher(device_name):\n    alias = WemoConfiguration().aliases.get(device_name)\n    if device_name.lower() in ('all', 'any'):\n        matches = lambda x: True\n    elif alias:\n        matches = lambda x: x == alias\n    elif device_name:\n        matches = matcher(device_name)\n    else:\n        matches = NOOP\n    return matches\n\n\ndef maker(args):\n    if args.state.lower() in (\"on\", \"1\", \"true\"):\n        state = \"on\"\n    elif args.state.lower() in (\"off\", \"0\", \"false\"):\n        state = \"off\"\n    elif args.state.lower() == \"toggle\":\n        state = \"toggle\"\n    elif args.state.lower() == \"sensor\":\n        state = \"sensor\"\n    elif args.state.lower() == \"switch\":\n        state = \"switch\"\n    else:\n        print(\"\"\"No valid action specified.\nUsage: wemo maker NAME (on|off|toggle|sensor|switch)\"\"\")\n        sys.exit(1)\n\n    matches = make_matcher(args.device)\n\n    def on_switch(maker):\n        return\n\n    def on_motion(maker):\n        return\n\n    def on_bridge(maker):\n        return\n\n    def on_maker(maker):\n        if matches(maker.name):\n            if state == \"toggle\":\n                found_state = maker.get_state(force_update=True)\n                maker.set_state(not found_state)\n            elif state == \"sensor\":\n                if maker.has_sensor:\n                    if args.human_readable:\n                        if maker.sensor_state:\n                            sensorstate = 'Sensor not triggered'\n                        else:\n                            sensorstate = 'Sensor triggered'\n                        print(sensorstate)\n                    else:\n                        print(maker.sensor_state)\n                else:\n                    print(\"Sensor not present\")\n            elif state == \"switch\":\n                if maker.switch_mode:\n                    print(\"Momentary Switch\")\n                else:\n                    print(_state(maker, args.human_readable))\n            else:\n                getattr(maker, state)()\n            if args.device != 'all':\n                sys.exit(0)\n\n    scan(args, on_switch, on_motion, on_bridge, on_maker)\n    if args.device != 'all':\n        # If we got here, we didn't find anything\n        print(\"No device found with that name.\")\n        sys.exit(1)\n\n\ndef list_(args):\n    def on_switch(switch):\n        print(\"Switch:\", switch.name)\n\n    def on_motion(motion):\n        print(\"Motion:\", motion.name)\n\n    def on_maker(maker):\n        print(\"Maker:\", maker.name)\n\n    def on_bridge(bridge):\n        print(\"Bridge:\", bridge.name)\n        bridge.bridge_get_lights()\n        bridge.bridge_get_groups()\n        for group in bridge.Groups:\n            print(\"Group:\", group)\n        for light in bridge.Lights:\n            print(\"Light:\", light)\n\n    scan(args, on_switch, on_motion, on_bridge, on_maker)\n\n\ndef status(args):\n    def on_switch(switch):\n        print(\"Switch:\", switch.name, '\\t', _state(switch, args.human_readable))\n\n    def on_motion(motion):\n        print(\"Motion:\", motion.name, '\\t', _state(motion, args.human_readable))\n\n    def on_maker(maker):\n        if maker.switch_mode:\n            print(\"Maker:\", maker.name, '\\t', \"Momentary State:\", _state(maker, args.human_readable))\n        else:\n            print(\"Maker:\", maker.name, '\\t', \"Persistent State:\", _state(maker, args.human_readable))\n        if maker.has_sensor:\n            if args.human_readable:\n                if maker.sensor_state:\n                    sensorstate = 'Sensor not triggered'\n                else:\n                    sensorstate = 'Sensor triggered'\n                print('\\t\\t\\t', \"Sensor:\", sensorstate)\n            else:\n                print('\\t\\t\\t', \"Sensor:\", maker.sensor_state)\n        else:\n            print('\\t\\t\\t' \"Sensor not present\")\n\n    def on_bridge(bridge):\n        print(\"Bridge:\", bridge.name, '\\t', _state(bridge, args.human_readable))\n        bridge.bridge_get_lights()\n        for light in bridge.Lights:\n            print(\"Light:\", light, '\\t', bridge.light_get_state(bridge.Lights[light]))\n        for group in bridge.Groups:\n            print(\"Group:\", group, '\\t', bridge.group_get_state(bridge.Groups[group]))\n\n    scan(args, on_switch, on_motion, on_bridge, on_maker)\n\n\ndef server(args):\n    try:\n        from socketio.server import SocketIOServer\n        from ouimeaux.server import app, initialize\n    except ImportError:\n        print(\"ouimeaux server dependencies are not installed. Please run, e.g., 'pip install ouimeaux[server]'\")\n        sys.exit(1)\n    initialize(bind=getattr(args, 'bind', None), auth=(WemoConfiguration().auth or None))\n    level = logging.INFO\n    if getattr(args, 'debug', False):\n        level = logging.DEBUG\n    logging.basicConfig(level=level)\n    try:\n        # TODO: Move this to configuration\n        listen = WemoConfiguration().listen or '0.0.0.0:5000'\n        try:\n            host, port = listen.split(':')\n        except Exception:\n            print(\"Invalid bind address configuration:\", listen)\n            sys.exit(1)\n        SocketIOServer((host, int(port)), app,\n                       policy_server=False,\n                       namespace=\"socket.io\").serve_forever()\n    except (KeyboardInterrupt, SystemExit):\n        sys.exit(0)\n\n\ndef wemo():\n    import ouimeaux.utils\n    ouimeaux.utils._RETRIES = 0\n\n    parser = argparse.ArgumentParser()\n\n    parser.add_argument(\"-b\", \"--bind\", default=None,\n                        help=\"ip:port to which to bind the response server.\"\n                             \" Default is localhost:54321\")\n    parser.add_argument(\"-d\", \"--debug\", action=\"store_true\", default=False,\n                        help=\"Enable debug logging\")\n    parser.add_argument(\"-e\", \"--exact-match\", action=\"store_true\",\n                        default=False,\n                        help=\"Disable fuzzy matching for device names\")\n    parser.add_argument(\"-v\", \"--human-readable\", dest=\"human_readable\",\n                        action=\"store_true\", default=False,\n                        help=\"Print statuses as human-readable words\")\n    parser.add_argument(\"-t\", \"--timeout\", type=int, default=5,\n                        help=\"Time in seconds to allow for discovery\")\n    subparsers = parser.add_subparsers()\n\n    statusparser = subparsers.add_parser(\"status\",\n                                         help=\"Print status of WeMo devices\")\n    statusparser.set_defaults(func=status)\n\n    stateparser = subparsers.add_parser(\"switch\",\n                                        help=\"Turn a WeMo Switch on or off\")\n    stateparser.add_argument(\"device\", help=\"Name or alias of the device\")\n    stateparser.add_argument(\"state\", help=\"'on' or 'off'\")\n    stateparser.set_defaults(func=switch)\n\n    makerparser = subparsers.add_parser(\"maker\",\n                                        help=\"Get sensor or switch state of a Maker or Turn on or off\")\n    makerparser.add_argument(\"device\", help=\"Name or alias of the device\")\n    makerparser.add_argument(\"state\", help=\"'on' or 'off' or 'toggle' or 'sensor' or 'switch'\")\n    makerparser.set_defaults(func=maker)\n\n    stateparser = subparsers.add_parser(\"light\",\n                                        help=\"Turn a WeMo LED light on or off\")\n    stateparser.add_argument(\"name\", help=\"Name or alias of the device or group\")\n    stateparser.add_argument(\"state\", help=\"'on' or 'off'\")\n    stateparser.add_argument(\"dim\", nargs='?', type=int,\n                             help=\"Dim value 0 to 255\")\n    stateparser.set_defaults(func=light)\n\n    listparser = subparsers.add_parser(\"list\",\n                                       help=\"List all devices found in the environment\")\n    listparser.set_defaults(func=list_)\n\n    serverparser = subparsers.add_parser(\"server\",\n                                         help=\"Run the API server and web app\")\n    serverparser.set_defaults(func=server)\n\n    args = parser.parse_args()\n\n    if getattr(args, 'debug', False):\n        logging.basicConfig(level=logging.DEBUG)\n\n    if hasattr(args, 'func'):\n        args.func(args)\n    else:\n        parser.print_help(sys.stderr)\n"
  },
  {
    "path": "ouimeaux/config.py",
    "content": "import os\nimport yaml\n\n\ndef in_home(*path):\n    try:\n        from win32com.shell import shellcon, shell\n    except ImportError:\n        home = os.path.expanduser(\"~\")\n    else:\n        home = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)\n    return os.path.join(home, *path)\n\n\ndef ensure_directory(directory):\n    if not os.path.exists(directory):\n        os.makedirs(directory)\n    return directory\n\n\nclass WemoConfiguration(object):\n    def __init__(self, filename=None):\n        if filename is None:\n            ensure_directory(in_home('.wemo'))\n            filename = in_home('.wemo', 'config.yml')\n        if not os.path.isfile(filename):\n            with open(filename, 'w') as f:\n                f.write(\"\"\"\naliases:\n# Shortcuts to longer device names. Uncommenting the following\n# line will allow you to execute 'wemo switch lr on' instead of\n# 'wemo switch \"Living Room Lights\" on'\n#\n#    lr: Living Room Lights\n\n# ip:port to bind to when receiving responses from discovery.\n# The default is first DNS resolution of local host, port 54321\n#\n# bind: 10.1.2.3:9090\n\n# Web app bind address\n#\n# listen: 0.0.0.0:5000\n\n# Require basic authentication (username:password) for the web app\n#\n# auth: admin:password\n\"\"\")\n        with open(filename, 'r') as cfg:\n            self._parsed = yaml.load(cfg, Loader=yaml.FullLoader)\n\n    @property\n    def aliases(self):\n        return self._parsed.get('aliases') or {}\n\n    @property\n    def bind(self):\n        return self._parsed.get('bind', None)\n\n    @property\n    def listen(self):\n        return self._parsed.get('listen', None)\n\n    @property\n    def auth(self):\n        return self._parsed.get('auth', None)\n"
  },
  {
    "path": "ouimeaux/device/__init__.py",
    "content": "import logging\nfrom six.moves.urllib.parse import urlsplit\n\nfrom .api.service import Service\nfrom .api.xsd import device as deviceParser\nfrom ..utils import requests_get\n\n\nlog = logging.getLogger(__name__)\n\n\nclass DeviceUnreachable(Exception): pass\nclass UnknownService(Exception): pass\n\n\nclass Device(object):\n    def __init__(self, url):\n        self._state = None\n        base_url = url.rsplit('/', 1)[0]\n        self.host = urlsplit(url).hostname\n        #self.port = urlsplit(url).port\n        xml = requests_get(url)\n        self._config = deviceParser.parseString(xml.content).device\n        sl = self._config.serviceList\n        self.services = {}\n        for svc in sl.service:\n            svcname = svc.get_serviceType().split(':')[-2]\n            service = Service(svc, base_url)\n            service.eventSubURL = base_url + svc.get_eventSubURL()\n            self.services[svcname] = service\n            setattr(self, svcname, service)\n\n    def _update_state(self, value):\n        self._state = int(value)\n\n    def get_state(self, force_update=False):\n        \"\"\"\n        Returns 0 if off and 1 if on.\n        \"\"\"\n        if force_update or self._state is None:\n            return int(self.basicevent.GetBinaryState()['BinaryState'])\n        return self._state\n\n    def __getstate__(self):\n        odict = self.__dict__.copy() # copy the dict since we change it\n        if 'register_listener' in odict:\n            del odict['register_listener']\n        return odict\n\n    def get_service(self, name):\n        try:\n            return self.services[name]\n        except KeyError:\n            raise UnknownService(name)\n\n    def list_services(self):\n        return self.services.keys()\n\n    def ping(self):\n        try:\n            self.get_state()\n        except Exception:\n            raise DeviceUnreachable(self)\n\n    def explain(self):\n        for name, svc in self.services.items():\n            print(name)\n            print('-' * len(name))\n            for aname, action in svc.actions.items():\n                print(\"  %s(%s)\" % (aname, ', '.join(action.args)))\n            print()\n\n    @property\n    def model(self):\n        return self._config.get_modelDescription()\n\n    @property\n    def name(self):\n        return self._config.get_friendlyName()\n\n    @property\n    def serialnumber(self):\n        return self._config.get_serialNumber()\n\n\ndef test():\n    device = Device(\"http://10.42.1.102:49152/setup.xml\")\n    print(device.get_service('basicevent').SetBinaryState(BinaryState=1))\n\n\nif __name__ == \"__main__\":\n    test()\n\n"
  },
  {
    "path": "ouimeaux/device/api/__init__.py",
    "content": ""
  },
  {
    "path": "ouimeaux/device/api/service.py",
    "content": "import logging\nfrom xml.etree import ElementTree as et\n\nfrom ...utils import requests_get, requests_post\nfrom .xsd import service as serviceParser\n\n\nlog = logging.getLogger(__name__)\n\nREQUEST_TEMPLATE = \"\"\"\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n <s:Body>\n  <u:{action} xmlns:u=\"{service}\">\n   {args}\n  </u:{action}>\n </s:Body>\n</s:Envelope>\n\"\"\"\n\n\nclass Action(object):\n    def __init__(self, service, action_config):\n        self._action_config = action_config\n        self.name = action_config.get_name()\n        self.serviceType = service.serviceType\n        self.controlURL = service.controlURL\n        self.args = {}\n        self.headers = {\n            'Content-Type': 'text/xml',\n            'SOAPACTION': '\"%s#%s\"' % (self.serviceType, self.name)\n        }\n        arglist = action_config.get_argumentList()\n        if arglist is not None:\n            for arg in arglist.get_argument():\n                name = arg.get_name()\n                if name:\n                    # TODO: Get type instead of setting 0\n                    self.args[arg.get_name()] = 0\n\n    def __call__(self, **kwargs):\n        arglist = '\\n'.join('<{0}>{1}</{0}>'.format(arg, value)\n                            for arg, value in kwargs.items())\n        body = REQUEST_TEMPLATE.format(\n            action=self.name,\n            service=self.serviceType,\n            args=arglist\n        )\n        response = requests_post(self.controlURL, body.strip(), headers=self.headers)\n        d = {}\n        for r in list(list(list(et.fromstring(response.content))[0])[0]):\n            d[r.tag] = r.text\n        return d\n\n    def __repr__(self):\n        return \"<Action %s(%s)>\" % (self.name, \", \".join(self.args))\n\n\nclass Service(object):\n    \"\"\"\n    Represents an instance of a service on a device.\n    \"\"\"\n\n    def __init__(self, service, base_url):\n        self._base_url = base_url.rstrip('/')\n        self._config = service\n        url = '%s/%s' % (base_url, service.get_SCPDURL().strip('/'))\n        xml = requests_get(url)\n        self.actions = {}\n        self._svc_config = serviceParser.parseString(xml.content).actionList\n        for action in self._svc_config.get_action():\n            act = Action(self, action)\n            name = action.get_name()\n            self.actions[name] = act\n            setattr(self, name, act)\n\n    @property\n    def hostname(self):\n        return self._base_url.split('/')[-1]\n\n    @property\n    def controlURL(self):\n        return '%s/%s' % (self._base_url,\n                          self._config.get_controlURL().strip('/'))\n\n    @property\n    def serviceType(self):\n        return self._config.get_serviceType()\n"
  },
  {
    "path": "ouimeaux/device/api/xsd/__init__.py",
    "content": ""
  },
  {
    "path": "ouimeaux/device/api/xsd/device.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n#\n# Generated Thu Jan 31 15:50:44 2013 by generateDS.py version 2.8b.\n#\n\nimport sys\nimport getopt\nimport re as re_\nimport base64\nfrom datetime import datetime, tzinfo, timedelta\n\netree_ = None\nVerbose_import_ = False\n(   XMLParser_import_none, XMLParser_import_lxml,\n    XMLParser_import_elementtree\n    ) = range(3)\nXMLParser_import_library = None\ntry:\n    # lxml\n    from lxml import etree as etree_\n    XMLParser_import_library = XMLParser_import_lxml\n    if Verbose_import_:\n        print(\"running with lxml.etree\")\nexcept ImportError:\n    try:\n        # cElementTree from Python 2.5+\n        import xml.etree.cElementTree as etree_\n        XMLParser_import_library = XMLParser_import_elementtree\n        if Verbose_import_:\n            print(\"running with cElementTree on Python 2.5+\")\n    except ImportError:\n        try:\n            # ElementTree from Python 2.5+\n            import xml.etree.ElementTree as etree_\n            XMLParser_import_library = XMLParser_import_elementtree\n            if Verbose_import_:\n                print(\"running with ElementTree on Python 2.5+\")\n        except ImportError:\n            try:\n                # normal cElementTree install\n                import cElementTree as etree_\n                XMLParser_import_library = XMLParser_import_elementtree\n                if Verbose_import_:\n                    print(\"running with cElementTree\")\n            except ImportError:\n                try:\n                    # normal ElementTree install\n                    import elementtree.ElementTree as etree_\n                    XMLParser_import_library = XMLParser_import_elementtree\n                    if Verbose_import_:\n                        print(\"running with ElementTree\")\n                except ImportError:\n                    raise ImportError(\n                        \"Failed to import ElementTree from any known place\")\n\ndef parsexml_(*args, **kwargs):\n    if (XMLParser_import_library == XMLParser_import_lxml and\n        'parser' not in kwargs):\n        # Use the lxml ElementTree compatible parser so that, e.g.,\n        #   we ignore comments.\n        kwargs['parser'] = etree_.ETCompatXMLParser()\n    doc = etree_.parse(*args, **kwargs)\n    return doc\n\n#\n# User methods\n#\n# Calls to the methods in these classes are generated by generateDS.py.\n# You can replace these methods by re-implementing the following class\n#   in a module named generatedssuper.py.\n\ntry:\n    from generatedssuper import GeneratedsSuper\nexcept ImportError as exp:\n\n    class GeneratedsSuper(object):\n        tzoff_pattern = re_.compile(r'(\\+|-)((0\\d|1[0-3]):[0-5]\\d|14:00)$')\n        class _FixedOffsetTZ(tzinfo):\n            def __init__(self, offset, name):\n                self.__offset = timedelta(minutes = offset)\n                self.__name = name\n            def utcoffset(self, dt):\n                return self.__offset\n            def tzname(self, dt):\n                return self.__name\n            def dst(self, dt):\n                return None\n        def gds_format_string(self, input_data, input_name=''):\n            return input_data\n        def gds_validate_string(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_base64(self, input_data, input_name=''):\n            return base64.b64encode(input_data)\n        def gds_validate_base64(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_integer(self, input_data, input_name=''):\n            return '%d' % input_data\n        def gds_validate_integer(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_integer_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_integer_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError) as exp:\n                    raise_parse_error(node, 'Requires sequence of integers')\n            return input_data\n        def gds_format_float(self, input_data, input_name=''):\n            return '%f' % input_data\n        def gds_validate_float(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_float_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_float_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError) as exp:\n                    raise_parse_error(node, 'Requires sequence of floats')\n            return input_data\n        def gds_format_double(self, input_data, input_name=''):\n            return '%e' % input_data\n        def gds_validate_double(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_double_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_double_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError) as exp:\n                    raise_parse_error(node, 'Requires sequence of doubles')\n            return input_data\n        def gds_format_boolean(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_boolean(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_boolean_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_boolean_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                if value not in ('true', '1', 'false', '0', ):\n                    raise_parse_error(node,\n                        'Requires sequence of booleans '\n                        '(\"true\", \"1\", \"false\", \"0\")')\n            return input_data\n        def gds_validate_datetime(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_datetime(self, input_data, input_name=''):\n            if input_data.microsecond == 0:\n                _svalue = input_data.strftime('%Y-%m-%dT%H:%M:%S')\n            else:\n                _svalue = input_data.strftime('%Y-%m-%dT%H:%M:%S.%f')\n            if input_data.tzinfo is not None:\n                tzoff = input_data.tzinfo.utcoffset(input_data)\n                if tzoff is not None:\n                    total_seconds = tzoff.seconds + (86400 * tzoff.days)\n                    if total_seconds == 0:\n                        _svalue += 'Z'\n                    else:\n                        if total_seconds < 0:\n                            _svalue += '-'\n                            total_seconds *= -1\n                        else:\n                            _svalue += '+'\n                        hours = total_seconds // 3600\n                        minutes = (total_seconds - (hours * 3600)) // 60\n                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)\n            return _svalue\n        def gds_parse_datetime(self, input_data, node, input_name=''):\n            tz = None\n            if input_data[-1] == 'Z':\n                tz = GeneratedsSuper._FixedOffsetTZ(0, 'GMT')\n                input_data = input_data[:-1]\n            else:\n                results = GeneratedsSuper.tzoff_pattern.search(input_data)\n                if results is not None:\n                    tzoff_parts = results.group(2).split(':')\n                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])\n                    if results.group(1) == '-':\n                        tzoff *= -1\n                    tz = GeneratedsSuper._FixedOffsetTZ(\n                        tzoff, results.group(0))\n                    input_data = input_data[:-6]\n            if len(input_data.split('.')) > 1:\n                dt = datetime.strptime(\n                        input_data, '%Y-%m-%dT%H:%M:%S.%f')\n            else:\n                dt = datetime.strptime(\n                        input_data, '%Y-%m-%dT%H:%M:%S')\n            return dt.replace(tzinfo = tz)\n\n        def gds_validate_date(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_date(self, input_data, input_name=''):\n            _svalue = input_data.strftime('%Y-%m-%d')\n            if input_data.tzinfo is not None:\n                tzoff = input_data.tzinfo.utcoffset(input_data)\n                if tzoff is not None:\n                    total_seconds = tzoff.seconds + (86400 * tzoff.days)\n                    if total_seconds == 0:\n                        _svalue += 'Z'\n                    else:\n                        if total_seconds < 0:\n                            _svalue += '-'\n                            total_seconds *= -1\n                        else:\n                            _svalue += '+'\n                        hours = total_seconds // 3600\n                        minutes = (total_seconds - (hours * 3600)) // 60\n                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)\n            return _svalue\n        def gds_parse_date(self, input_data, node, input_name=''):\n            tz = None\n            if input_data[-1] == 'Z':\n                tz = GeneratedsSuper._FixedOffsetTZ(0, 'GMT')\n                input_data = input_data[:-1]\n            else:\n                results = GeneratedsSuper.tzoff_pattern.search(input_data)\n                if results is not None:\n                    tzoff_parts = results.group(2).split(':')\n                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])\n                    if results.group(1) == '-':\n                        tzoff *= -1\n                    tz = GeneratedsSuper._FixedOffsetTZ(\n                        tzoff, results.group(0))\n                    input_data = input_data[:-6]\n            return datetime.strptime(input_data,\n                '%Y-%m-%d').replace(tzinfo = tz)\n        def gds_str_lower(self, instring):\n            return instring.lower()\n        def get_path_(self, node):\n            path_list = []\n            self.get_path_list_(node, path_list)\n            path_list.reverse()\n            path = '/'.join(path_list)\n            return path\n        Tag_strip_pattern_ = re_.compile(r'\\{.*\\}')\n        def get_path_list_(self, node, path_list):\n            if node is None:\n                return\n            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)\n            if tag:\n                path_list.append(tag)\n            self.get_path_list_(node.getparent(), path_list)\n        def get_class_obj_(self, node, default_class=None):\n            class_obj1 = default_class\n            if 'xsi' in node.nsmap:\n                classname = node.get('{%s}type' % node.nsmap['xsi'])\n                if classname is not None:\n                    names = classname.split(':')\n                    if len(names) == 2:\n                        classname = names[1]\n                    class_obj2 = globals().get(classname)\n                    if class_obj2 is not None:\n                        class_obj1 = class_obj2\n            return class_obj1\n        def gds_build_any(self, node, type_name=None):\n            return None\n\n\n#\n# If you have installed IPython you can uncomment and use the following.\n# IPython is available from http://ipython.scipy.org/.\n#\n\n## from IPython.Shell import IPShellEmbed\n## args = ''\n## ipshell = IPShellEmbed(args,\n##     banner = 'Dropping into IPython',\n##     exit_msg = 'Leaving Interpreter, back to program.')\n\n# Then use the following line where and when you want to drop into the\n# IPython shell:\n#    ipshell('<some message> -- Entering ipshell.\\nHit Ctrl-D to exit')\n\n#\n# Globals\n#\n\nExternalEncoding = 'ascii'\nTag_pattern_ = re_.compile(r'({.*})?(.*)')\nString_cleanup_pat_ = re_.compile(r\"[\\n\\r\\s]+\")\nNamespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')\n\n#\n# Support/utility functions.\n#\n\ndef showIndent(outfile, level, pretty_print=True):\n    if pretty_print:\n        for idx in range(level):\n            outfile.write('    ')\n\ndef quote_xml(inStr):\n    if not inStr:\n        return ''\n    s1 = (isinstance(inStr, basestring) and inStr or\n          '%s' % inStr)\n    s1 = s1.replace('&', '&amp;')\n    s1 = s1.replace('<', '&lt;')\n    s1 = s1.replace('>', '&gt;')\n    return s1\n\ndef quote_attrib(inStr):\n    s1 = (isinstance(inStr, basestring) and inStr or\n          '%s' % inStr)\n    s1 = s1.replace('&', '&amp;')\n    s1 = s1.replace('<', '&lt;')\n    s1 = s1.replace('>', '&gt;')\n    if '\"' in s1:\n        if \"'\" in s1:\n            s1 = '\"%s\"' % s1.replace('\"', \"&quot;\")\n        else:\n            s1 = \"'%s'\" % s1\n    else:\n        s1 = '\"%s\"' % s1\n    return s1\n\ndef quote_python(inStr):\n    s1 = inStr\n    if s1.find(\"'\") == -1:\n        if s1.find('\\n') == -1:\n            return \"'%s'\" % s1\n        else:\n            return \"'''%s'''\" % s1\n    else:\n        if s1.find('\"') != -1:\n            s1 = s1.replace('\"', '\\\\\"')\n        if s1.find('\\n') == -1:\n            return '\"%s\"' % s1\n        else:\n            return '\"\"\"%s\"\"\"' % s1\n\ndef get_all_text_(node):\n    if node.text is not None:\n        text = node.text\n    else:\n        text = ''\n    for child in node:\n        if child.tail is not None:\n            text += child.tail\n    return text\n\ndef find_attr_value_(attr_name, node):\n    attrs = node.attrib\n    attr_parts = attr_name.split(':')\n    value = None\n    if len(attr_parts) == 1:\n        value = attrs.get(attr_name)\n    elif len(attr_parts) == 2:\n        prefix, name = attr_parts\n        namespace = node.nsmap.get(prefix)\n        if namespace is not None:\n            value = attrs.get('{%s}%s' % (namespace, name, ))\n    return value\n\n\nclass GDSParseError(Exception):\n    pass\n\ndef raise_parse_error(node, msg):\n    if XMLParser_import_library == XMLParser_import_lxml:\n        msg = '%s (element %s/line %d)' % (\n            msg, node.tag, node.sourceline, )\n    else:\n        msg = '%s (element %s)' % (msg, node.tag, )\n    raise GDSParseError(msg)\n\n\nclass MixedContainer:\n    # Constants for category:\n    CategoryNone = 0\n    CategoryText = 1\n    CategorySimple = 2\n    CategoryComplex = 3\n    # Constants for content_type:\n    TypeNone = 0\n    TypeText = 1\n    TypeString = 2\n    TypeInteger = 3\n    TypeFloat = 4\n    TypeDecimal = 5\n    TypeDouble = 6\n    TypeBoolean = 7\n    TypeBase64 = 8\n    def __init__(self, category, content_type, name, value):\n        self.category = category\n        self.content_type = content_type\n        self.name = name\n        self.value = value\n    def getCategory(self):\n        return self.category\n    def getContenttype(self, content_type):\n        return self.content_type\n    def getValue(self):\n        return self.value\n    def getName(self):\n        return self.name\n    def export(self, outfile, level, name, namespace, pretty_print=True):\n        if self.category == MixedContainer.CategoryText:\n            # Prevent exporting empty content as empty lines.\n            if self.value.strip():\n                outfile.write(self.value)\n        elif self.category == MixedContainer.CategorySimple:\n            self.exportSimple(outfile, level, name)\n        else:    # category == MixedContainer.CategoryComplex\n            self.value.export(outfile, level, namespace, name, pretty_print)\n    def exportSimple(self, outfile, level, name):\n        if self.content_type == MixedContainer.TypeString:\n            outfile.write('<%s>%s</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeInteger or \\\n                self.content_type == MixedContainer.TypeBoolean:\n            outfile.write('<%s>%d</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeFloat or \\\n                self.content_type == MixedContainer.TypeDecimal:\n            outfile.write('<%s>%f</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeDouble:\n            outfile.write('<%s>%g</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeBase64:\n            outfile.write('<%s>%s</%s>' %\n                (self.name, base64.b64encode(self.value), self.name))\n    def exportLiteral(self, outfile, level, name):\n        if self.category == MixedContainer.CategoryText:\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\", \"%s\"),\\n'\n                % (self.category, self.content_type, self.name, self.value))\n        elif self.category == MixedContainer.CategorySimple:\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\", \"%s\"),\\n'\n                % (self.category, self.content_type, self.name, self.value))\n        else:    # category == MixedContainer.CategoryComplex\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\",\\n' % \\\n                (self.category, self.content_type, self.name,))\n            self.value.exportLiteral(outfile, level + 1)\n            showIndent(outfile, level)\n            outfile.write(')\\n')\n\n\nclass MemberSpec_(object):\n    def __init__(self, name='', data_type='', container=0):\n        self.name = name\n        self.data_type = data_type\n        self.container = container\n    def set_name(self, name): self.name = name\n    def get_name(self): return self.name\n    def set_data_type(self, data_type): self.data_type = data_type\n    def get_data_type_chain(self): return self.data_type\n    def get_data_type(self):\n        if isinstance(self.data_type, list):\n            if len(self.data_type) > 0:\n                return self.data_type[-1]\n            else:\n                return 'xs:string'\n        else:\n            return self.data_type\n    def set_container(self, container): self.container = container\n    def get_container(self): return self.container\n\ndef _cast(typ, value):\n    if typ is None or value is None:\n        return value\n    return typ(value)\n\n#\n# Data representation classes.\n#\n\nclass root(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, specVersion=None, URLBase=None, device=None):\n        self.specVersion = specVersion\n        self.URLBase = URLBase\n        self.device = device\n        self.anyAttributes_ = {}\n    def factory(*args_, **kwargs_):\n        if root.subclass:\n            return root.subclass(*args_, **kwargs_)\n        else:\n            return root(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_specVersion(self): return self.specVersion\n    def set_specVersion(self, specVersion): self.specVersion = specVersion\n    def get_URLBase(self): return self.URLBase\n    def set_URLBase(self, URLBase): self.URLBase = URLBase\n    def get_device(self): return self.device\n    def set_device(self, device): self.device = device\n    def get_anyAttributes_(self): return self.anyAttributes_\n    def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_\n    def export(self, outfile, level, namespace_='tns:', name_='root', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='root')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='root'):\n        unique_counter = 0\n        for name, value in self.anyAttributes_.items():\n            xsinamespaceprefix = 'xsi'\n            xsinamespace1 = 'http://www.w3.org/2001/XMLSchema-instance'\n            xsinamespace2 = '{%s}' % (xsinamespace1, )\n            if name.startswith(xsinamespace2):\n                name1 = name[len(xsinamespace2):]\n                name2 = '%s:%s' % (xsinamespaceprefix, name1, )\n                if name2 not in already_processed:\n                    already_processed.append(name2)\n                    outfile.write(' %s=%s' % (name2, quote_attrib(value), ))\n            else:\n                mo = re_.match(Namespace_extract_pat_, name)\n                if mo is not None:\n                    namespace, name = mo.group(1, 2)\n                    if name not in already_processed:\n                        already_processed.append(name)\n                        if namespace == 'http://www.w3.org/XML/1998/namespace':\n                            outfile.write(' %s=%s' % (\n                                name, quote_attrib(value), ))\n                        else:\n                            unique_counter += 1\n                            outfile.write(' xmlns:yyy%d=\"%s\"' % (\n                                unique_counter, namespace, ))\n                            outfile.write(' yyy%d:%s=%s' % (\n                                unique_counter, name, quote_attrib(value), ))\n                else:\n                    if name not in already_processed:\n                        already_processed.append(name)\n                        outfile.write(' %s=%s' % (\n                            name, quote_attrib(value), ))\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='root', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.specVersion is not None:\n            self.specVersion.export(outfile, level, namespace_, name_='specVersion', pretty_print=pretty_print)\n        if self.URLBase is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sURLBase>%s</%sURLBase>%s' % (namespace_, self.gds_format_string(quote_xml(self.URLBase).encode(ExternalEncoding), input_name='URLBase'), namespace_, eol_))\n        if self.device is not None:\n            self.device.export(outfile, level, namespace_, name_='device', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.specVersion is not None or\n            self.URLBase is not None or\n            self.device is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='root'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        for name, value in self.anyAttributes_.items():\n            showIndent(outfile, level)\n            outfile.write('%s = \"%s\",\\n' % (name, value,))\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.specVersion is not None:\n            showIndent(outfile, level)\n            outfile.write('specVersion=model_.SpecVersionType(\\n')\n            self.specVersion.exportLiteral(outfile, level, name_='specVersion')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.URLBase is not None:\n            showIndent(outfile, level)\n            outfile.write('URLBase=%s,\\n' % quote_python(self.URLBase).encode(ExternalEncoding))\n        if self.device is not None:\n            showIndent(outfile, level)\n            outfile.write('device=model_.DeviceType(\\n')\n            self.device.exportLiteral(outfile, level, name_='device')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        self.anyAttributes_ = {}\n        for name, value in attrs.items():\n            if name not in already_processed:\n                self.anyAttributes_[name] = value\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'specVersion':\n            obj_ = SpecVersionType.factory()\n            obj_.build(child_)\n            self.set_specVersion(obj_)\n        elif nodeName_ == 'URLBase':\n            URLBase_ = child_.text\n            URLBase_ = self.gds_validate_string(URLBase_, node, 'URLBase')\n            self.URLBase = URLBase_\n        elif nodeName_ == 'device':\n            obj_ = DeviceType.factory()\n            obj_.build(child_)\n            self.set_device(obj_)\n# end class root\n\n\nclass SpecVersionType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, major=None, minor=None):\n        self.major = major\n        self.minor = minor\n    def factory(*args_, **kwargs_):\n        if SpecVersionType.subclass:\n            return SpecVersionType.subclass(*args_, **kwargs_)\n        else:\n            return SpecVersionType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_major(self): return self.major\n    def set_major(self, major): self.major = major\n    def get_minor(self): return self.minor\n    def set_minor(self, minor): self.minor = minor\n    def export(self, outfile, level, namespace_='tns:', name_='SpecVersionType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SpecVersionType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='SpecVersionType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='SpecVersionType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.major is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smajor>%s</%smajor>%s' % (namespace_, self.gds_format_integer(self.major, input_name='major'), namespace_, eol_))\n        if self.minor is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sminor>%s</%sminor>%s' % (namespace_, self.gds_format_integer(self.minor, input_name='minor'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.major is not None or\n            self.minor is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='SpecVersionType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.major is not None:\n            showIndent(outfile, level)\n            outfile.write('major=%d,\\n' % self.major)\n        if self.minor is not None:\n            showIndent(outfile, level)\n            outfile.write('minor=%d,\\n' % self.minor)\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'major':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'major')\n            self.major = ival_\n        elif nodeName_ == 'minor':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'minor')\n            self.minor = ival_\n# end class SpecVersionType\n\n\nclass DeviceType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, deviceType=None, friendlyName=None, manufacturer=None, manufacturerURL=None, modelDescription=None, modelName=None, modelNumber=None, modelURL=None, serialNumber=None, UDN=None, UPC=None, iconList=None, serviceList=None, deviceList=None, presentationURL=None, anytypeobjs_=None):\n        self.deviceType = deviceType\n        self.friendlyName = friendlyName\n        self.manufacturer = manufacturer\n        self.manufacturerURL = manufacturerURL\n        self.modelDescription = modelDescription\n        self.modelName = modelName\n        self.modelNumber = modelNumber\n        self.modelURL = modelURL\n        self.serialNumber = serialNumber\n        self.UDN = UDN\n        self.UPC = UPC\n        self.iconList = iconList\n        self.serviceList = serviceList\n        self.deviceList = deviceList\n        self.presentationURL = presentationURL\n        if anytypeobjs_ is None:\n            self.anytypeobjs_ = []\n        else:\n            self.anytypeobjs_ = anytypeobjs_\n    def factory(*args_, **kwargs_):\n        if DeviceType.subclass:\n            return DeviceType.subclass(*args_, **kwargs_)\n        else:\n            return DeviceType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_deviceType(self): return self.deviceType\n    def set_deviceType(self, deviceType): self.deviceType = deviceType\n    def get_friendlyName(self): return self.friendlyName\n    def set_friendlyName(self, friendlyName): self.friendlyName = friendlyName\n    def get_manufacturer(self): return self.manufacturer\n    def set_manufacturer(self, manufacturer): self.manufacturer = manufacturer\n    def get_manufacturerURL(self): return self.manufacturerURL\n    def set_manufacturerURL(self, manufacturerURL): self.manufacturerURL = manufacturerURL\n    def get_modelDescription(self): return self.modelDescription\n    def set_modelDescription(self, modelDescription): self.modelDescription = modelDescription\n    def get_modelName(self): return self.modelName\n    def set_modelName(self, modelName): self.modelName = modelName\n    def get_modelNumber(self): return self.modelNumber\n    def set_modelNumber(self, modelNumber): self.modelNumber = modelNumber\n    def get_modelURL(self): return self.modelURL\n    def set_modelURL(self, modelURL): self.modelURL = modelURL\n    def get_serialNumber(self): return self.serialNumber\n    def set_serialNumber(self, serialNumber): self.serialNumber = serialNumber\n    def get_UDN(self): return self.UDN\n    def set_UDN(self, UDN): self.UDN = UDN\n    def get_UPC(self): return self.UPC\n    def set_UPC(self, UPC): self.UPC = UPC\n    def get_iconList(self): return self.iconList\n    def set_iconList(self, iconList): self.iconList = iconList\n    def get_serviceList(self): return self.serviceList\n    def set_serviceList(self, serviceList): self.serviceList = serviceList\n    def get_deviceList(self): return self.deviceList\n    def set_deviceList(self, deviceList): self.deviceList = deviceList\n    def get_presentationURL(self): return self.presentationURL\n    def set_presentationURL(self, presentationURL): self.presentationURL = presentationURL\n    def get_anytypeobjs_(self): return self.anytypeobjs_\n    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_\n    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)\n    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value\n    def export(self, outfile, level, namespace_='tns:', name_='DeviceType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeviceType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='DeviceType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='DeviceType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.deviceType is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sdeviceType>%s</%sdeviceType>%s' % (namespace_, self.gds_format_string(quote_xml(self.deviceType).encode(ExternalEncoding), input_name='deviceType'), namespace_, eol_))\n        if self.friendlyName is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sfriendlyName>%s</%sfriendlyName>%s' % (namespace_, self.gds_format_string(quote_xml(self.friendlyName).encode(ExternalEncoding), input_name='friendlyName'), namespace_, eol_))\n        if self.manufacturer is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smanufacturer>%s</%smanufacturer>%s' % (namespace_, self.gds_format_string(quote_xml(self.manufacturer).encode(ExternalEncoding), input_name='manufacturer'), namespace_, eol_))\n        if self.manufacturerURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smanufacturerURL>%s</%smanufacturerURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.manufacturerURL).encode(ExternalEncoding), input_name='manufacturerURL'), namespace_, eol_))\n        if self.modelDescription is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smodelDescription>%s</%smodelDescription>%s' % (namespace_, self.gds_format_string(quote_xml(self.modelDescription).encode(ExternalEncoding), input_name='modelDescription'), namespace_, eol_))\n        if self.modelName is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smodelName>%s</%smodelName>%s' % (namespace_, self.gds_format_string(quote_xml(self.modelName).encode(ExternalEncoding), input_name='modelName'), namespace_, eol_))\n        if self.modelNumber is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smodelNumber>%s</%smodelNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.modelNumber).encode(ExternalEncoding), input_name='modelNumber'), namespace_, eol_))\n        if self.modelURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smodelURL>%s</%smodelURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.modelURL).encode(ExternalEncoding), input_name='modelURL'), namespace_, eol_))\n        if self.serialNumber is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sserialNumber>%s</%sserialNumber>%s' % (namespace_, self.gds_format_string(quote_xml(self.serialNumber).encode(ExternalEncoding), input_name='serialNumber'), namespace_, eol_))\n        if self.UDN is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sUDN>%s</%sUDN>%s' % (namespace_, self.gds_format_string(quote_xml(self.UDN).encode(ExternalEncoding), input_name='UDN'), namespace_, eol_))\n        if self.UPC is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sUPC>%s</%sUPC>%s' % (namespace_, self.gds_format_string(quote_xml(self.UPC).encode(ExternalEncoding), input_name='UPC'), namespace_, eol_))\n        if self.iconList is not None:\n            self.iconList.export(outfile, level, namespace_, name_='iconList', pretty_print=pretty_print)\n        if self.serviceList is not None:\n            self.serviceList.export(outfile, level, namespace_, name_='serviceList', pretty_print=pretty_print)\n        if self.deviceList is not None:\n            self.deviceList.export(outfile, level, namespace_, name_='deviceList', pretty_print=pretty_print)\n        if self.presentationURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%spresentationURL>%s</%spresentationURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.presentationURL).encode(ExternalEncoding), input_name='presentationURL'), namespace_, eol_))\n        for obj_ in self.anytypeobjs_:\n            obj_.export(outfile, level, namespace_, pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.deviceType is not None or\n            self.friendlyName is not None or\n            self.manufacturer is not None or\n            self.manufacturerURL is not None or\n            self.modelDescription is not None or\n            self.modelName is not None or\n            self.modelNumber is not None or\n            self.modelURL is not None or\n            self.serialNumber is not None or\n            self.UDN is not None or\n            self.UPC is not None or\n            self.iconList is not None or\n            self.serviceList is not None or\n            self.deviceList is not None or\n            self.presentationURL is not None or\n            self.anytypeobjs_\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='DeviceType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.deviceType is not None:\n            showIndent(outfile, level)\n            outfile.write('deviceType=%s,\\n' % quote_python(self.deviceType).encode(ExternalEncoding))\n        if self.friendlyName is not None:\n            showIndent(outfile, level)\n            outfile.write('friendlyName=%s,\\n' % quote_python(self.friendlyName).encode(ExternalEncoding))\n        if self.manufacturer is not None:\n            showIndent(outfile, level)\n            outfile.write('manufacturer=%s,\\n' % quote_python(self.manufacturer).encode(ExternalEncoding))\n        if self.manufacturerURL is not None:\n            showIndent(outfile, level)\n            outfile.write('manufacturerURL=%s,\\n' % quote_python(self.manufacturerURL).encode(ExternalEncoding))\n        if self.modelDescription is not None:\n            showIndent(outfile, level)\n            outfile.write('modelDescription=%s,\\n' % quote_python(self.modelDescription).encode(ExternalEncoding))\n        if self.modelName is not None:\n            showIndent(outfile, level)\n            outfile.write('modelName=%s,\\n' % quote_python(self.modelName).encode(ExternalEncoding))\n        if self.modelNumber is not None:\n            showIndent(outfile, level)\n            outfile.write('modelNumber=%s,\\n' % quote_python(self.modelNumber).encode(ExternalEncoding))\n        if self.modelURL is not None:\n            showIndent(outfile, level)\n            outfile.write('modelURL=%s,\\n' % quote_python(self.modelURL).encode(ExternalEncoding))\n        if self.serialNumber is not None:\n            showIndent(outfile, level)\n            outfile.write('serialNumber=%s,\\n' % quote_python(self.serialNumber).encode(ExternalEncoding))\n        if self.UDN is not None:\n            showIndent(outfile, level)\n            outfile.write('UDN=%s,\\n' % quote_python(self.UDN).encode(ExternalEncoding))\n        if self.UPC is not None:\n            showIndent(outfile, level)\n            outfile.write('UPC=%s,\\n' % quote_python(self.UPC).encode(ExternalEncoding))\n        if self.iconList is not None:\n            showIndent(outfile, level)\n            outfile.write('iconList=model_.IconListType(\\n')\n            self.iconList.exportLiteral(outfile, level, name_='iconList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.serviceList is not None:\n            showIndent(outfile, level)\n            outfile.write('serviceList=model_.ServiceListType(\\n')\n            self.serviceList.exportLiteral(outfile, level, name_='serviceList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.deviceList is not None:\n            showIndent(outfile, level)\n            outfile.write('deviceList=model_.DeviceListType(\\n')\n            self.deviceList.exportLiteral(outfile, level, name_='deviceList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.presentationURL is not None:\n            showIndent(outfile, level)\n            outfile.write('presentationURL=%s,\\n' % quote_python(self.presentationURL).encode(ExternalEncoding))\n        showIndent(outfile, level)\n        outfile.write('anytypeobjs_=[\\n')\n        level += 1\n        for anytypeobjs_ in self.anytypeobjs_:\n            anytypeobjs_.exportLiteral(outfile, level)\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'deviceType':\n            deviceType_ = child_.text\n            deviceType_ = self.gds_validate_string(deviceType_, node, 'deviceType')\n            self.deviceType = deviceType_\n        elif nodeName_ == 'friendlyName':\n            friendlyName_ = child_.text\n            friendlyName_ = self.gds_validate_string(friendlyName_, node, 'friendlyName')\n            self.friendlyName = friendlyName_\n        elif nodeName_ == 'manufacturer':\n            manufacturer_ = child_.text\n            manufacturer_ = self.gds_validate_string(manufacturer_, node, 'manufacturer')\n            self.manufacturer = manufacturer_\n        elif nodeName_ == 'manufacturerURL':\n            manufacturerURL_ = child_.text\n            manufacturerURL_ = self.gds_validate_string(manufacturerURL_, node, 'manufacturerURL')\n            self.manufacturerURL = manufacturerURL_\n        elif nodeName_ == 'modelDescription':\n            modelDescription_ = child_.text\n            modelDescription_ = self.gds_validate_string(modelDescription_, node, 'modelDescription')\n            self.modelDescription = modelDescription_\n        elif nodeName_ == 'modelName':\n            modelName_ = child_.text\n            modelName_ = self.gds_validate_string(modelName_, node, 'modelName')\n            self.modelName = modelName_\n        elif nodeName_ == 'modelNumber':\n            modelNumber_ = child_.text\n            modelNumber_ = self.gds_validate_string(modelNumber_, node, 'modelNumber')\n            self.modelNumber = modelNumber_\n        elif nodeName_ == 'modelURL':\n            modelURL_ = child_.text\n            modelURL_ = self.gds_validate_string(modelURL_, node, 'modelURL')\n            self.modelURL = modelURL_\n        elif nodeName_ == 'serialNumber':\n            serialNumber_ = child_.text\n            serialNumber_ = self.gds_validate_string(serialNumber_, node, 'serialNumber')\n            self.serialNumber = serialNumber_\n        elif nodeName_ == 'UDN':\n            UDN_ = child_.text\n            UDN_ = self.gds_validate_string(UDN_, node, 'UDN')\n            self.UDN = UDN_\n        elif nodeName_ == 'UPC':\n            UPC_ = child_.text\n            UPC_ = self.gds_validate_string(UPC_, node, 'UPC')\n            self.UPC = UPC_\n        elif nodeName_ == 'iconList':\n            obj_ = IconListType.factory()\n            obj_.build(child_)\n            self.set_iconList(obj_)\n        elif nodeName_ == 'serviceList':\n            obj_ = ServiceListType.factory()\n            obj_.build(child_)\n            self.set_serviceList(obj_)\n        elif nodeName_ == 'deviceList':\n            obj_ = DeviceListType.factory()\n            obj_.build(child_)\n            self.set_deviceList(obj_)\n        elif nodeName_ == 'presentationURL':\n            presentationURL_ = child_.text\n            presentationURL_ = self.gds_validate_string(presentationURL_, node, 'presentationURL')\n            self.presentationURL = presentationURL_\n        else:\n            obj_ = self.gds_build_any(child_, 'DeviceType')\n            if obj_ is not None:\n                self.add_anytypeobjs_(obj_)\n# end class DeviceType\n\n\nclass IconListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, icon=None):\n        if icon is None:\n            self.icon = []\n        else:\n            self.icon = icon\n    def factory(*args_, **kwargs_):\n        if IconListType.subclass:\n            return IconListType.subclass(*args_, **kwargs_)\n        else:\n            return IconListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_icon(self): return self.icon\n    def set_icon(self, icon): self.icon = icon\n    def add_icon(self, value): self.icon.append(value)\n    def insert_icon(self, index, value): self.icon[index] = value\n    def export(self, outfile, level, namespace_='tns:', name_='IconListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='IconListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='IconListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='IconListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for icon_ in self.icon:\n            icon_.export(outfile, level, namespace_, name_='icon', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.icon\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='IconListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('icon=[\\n')\n        level += 1\n        for icon_ in self.icon:\n            showIndent(outfile, level)\n            outfile.write('model_.iconType(\\n')\n            icon_.exportLiteral(outfile, level, name_='iconType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'icon':\n            obj_ = iconType.factory()\n            obj_.build(child_)\n            self.icon.append(obj_)\n# end class IconListType\n\n\nclass ServiceListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, service=None):\n        if service is None:\n            self.service = []\n        else:\n            self.service = service\n    def factory(*args_, **kwargs_):\n        if ServiceListType.subclass:\n            return ServiceListType.subclass(*args_, **kwargs_)\n        else:\n            return ServiceListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_service(self): return self.service\n    def set_service(self, service): self.service = service\n    def add_service(self, value): self.service.append(value)\n    def insert_service(self, index, value): self.service[index] = value\n    def export(self, outfile, level, namespace_='tns:', name_='ServiceListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ServiceListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='ServiceListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='ServiceListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for service_ in self.service:\n            service_.export(outfile, level, namespace_, name_='service', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.service\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ServiceListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('service=[\\n')\n        level += 1\n        for service_ in self.service:\n            showIndent(outfile, level)\n            outfile.write('model_.serviceType(\\n')\n            service_.exportLiteral(outfile, level, name_='serviceType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'service':\n            obj_ = serviceType.factory()\n            obj_.build(child_)\n            self.service.append(obj_)\n# end class ServiceListType\n\n\nclass DeviceListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, device=None):\n        if device is None:\n            self.device = []\n        else:\n            self.device = device\n    def factory(*args_, **kwargs_):\n        if DeviceListType.subclass:\n            return DeviceListType.subclass(*args_, **kwargs_)\n        else:\n            return DeviceListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_device(self): return self.device\n    def set_device(self, device): self.device = device\n    def add_device(self, value): self.device.append(value)\n    def insert_device(self, index, value): self.device[index] = value\n    def export(self, outfile, level, namespace_='tns:', name_='DeviceListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='DeviceListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='DeviceListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='DeviceListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for device_ in self.device:\n            device_.export(outfile, level, namespace_, name_='device', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.device\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='DeviceListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('device=[\\n')\n        level += 1\n        for device_ in self.device:\n            showIndent(outfile, level)\n            outfile.write('model_.DeviceType(\\n')\n            device_.exportLiteral(outfile, level, name_='DeviceType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'device':\n            obj_ = DeviceType.factory()\n            obj_.build(child_)\n            self.device.append(obj_)\n# end class DeviceListType\n\n\nclass iconType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, mimetype=None, width=None, height=None, depth=None, url=None):\n        self.mimetype = mimetype\n        self.width = width\n        self.height = height\n        self.depth = depth\n        self.url = url\n    def factory(*args_, **kwargs_):\n        if iconType.subclass:\n            return iconType.subclass(*args_, **kwargs_)\n        else:\n            return iconType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_mimetype(self): return self.mimetype\n    def set_mimetype(self, mimetype): self.mimetype = mimetype\n    def get_width(self): return self.width\n    def set_width(self, width): self.width = width\n    def get_height(self): return self.height\n    def set_height(self, height): self.height = height\n    def get_depth(self): return self.depth\n    def set_depth(self, depth): self.depth = depth\n    def get_url(self): return self.url\n    def set_url(self, url): self.url = url\n    def export(self, outfile, level, namespace_='tns:', name_='iconType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='iconType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='iconType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='iconType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.mimetype is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smimetype>%s</%smimetype>%s' % (namespace_, self.gds_format_string(quote_xml(self.mimetype).encode(ExternalEncoding), input_name='mimetype'), namespace_, eol_))\n        if self.width is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%swidth>%s</%swidth>%s' % (namespace_, self.gds_format_integer(self.width, input_name='width'), namespace_, eol_))\n        if self.height is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sheight>%s</%sheight>%s' % (namespace_, self.gds_format_integer(self.height, input_name='height'), namespace_, eol_))\n        if self.depth is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sdepth>%s</%sdepth>%s' % (namespace_, self.gds_format_integer(self.depth, input_name='depth'), namespace_, eol_))\n        if self.url is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%surl>%s</%surl>%s' % (namespace_, self.gds_format_string(quote_xml(self.url).encode(ExternalEncoding), input_name='url'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.mimetype is not None or\n            self.width is not None or\n            self.height is not None or\n            self.depth is not None or\n            self.url is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='iconType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.mimetype is not None:\n            showIndent(outfile, level)\n            outfile.write('mimetype=%s,\\n' % quote_python(self.mimetype).encode(ExternalEncoding))\n        if self.width is not None:\n            showIndent(outfile, level)\n            outfile.write('width=%d,\\n' % self.width)\n        if self.height is not None:\n            showIndent(outfile, level)\n            outfile.write('height=%d,\\n' % self.height)\n        if self.depth is not None:\n            showIndent(outfile, level)\n            outfile.write('depth=%d,\\n' % self.depth)\n        if self.url is not None:\n            showIndent(outfile, level)\n            outfile.write('url=%s,\\n' % quote_python(self.url).encode(ExternalEncoding))\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'mimetype':\n            mimetype_ = child_.text\n            mimetype_ = self.gds_validate_string(mimetype_, node, 'mimetype')\n            self.mimetype = mimetype_\n        elif nodeName_ == 'width':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'width')\n            self.width = ival_\n        elif nodeName_ == 'height':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'height')\n            self.height = ival_\n        elif nodeName_ == 'depth':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'depth')\n            self.depth = ival_\n        elif nodeName_ == 'url':\n            url_ = child_.text\n            url_ = self.gds_validate_string(url_, node, 'url')\n            self.url = url_\n# end class iconType\n\n\nclass serviceType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, serviceType=None, serviceId=None, SCPDURL=None, controlURL=None, eventSubURL=None):\n        self.serviceType = serviceType\n        self.serviceId = serviceId\n        self.SCPDURL = SCPDURL\n        self.controlURL = controlURL\n        self.eventSubURL = eventSubURL\n    def factory(*args_, **kwargs_):\n        if serviceType.subclass:\n            return serviceType.subclass(*args_, **kwargs_)\n        else:\n            return serviceType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_serviceType(self): return self.serviceType\n    def set_serviceType(self, serviceType): self.serviceType = serviceType\n    def get_serviceId(self): return self.serviceId\n    def set_serviceId(self, serviceId): self.serviceId = serviceId\n    def get_SCPDURL(self): return self.SCPDURL\n    def set_SCPDURL(self, SCPDURL): self.SCPDURL = SCPDURL\n    def get_controlURL(self): return self.controlURL\n    def set_controlURL(self, controlURL): self.controlURL = controlURL\n    def get_eventSubURL(self): return self.eventSubURL\n    def set_eventSubURL(self, eventSubURL): self.eventSubURL = eventSubURL\n    def export(self, outfile, level, namespace_='tns:', name_='serviceType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='serviceType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='serviceType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='tns:', name_='serviceType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.serviceType is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sserviceType>%s</%sserviceType>%s' % (namespace_, self.gds_format_string(quote_xml(self.serviceType).encode(ExternalEncoding), input_name='serviceType'), namespace_, eol_))\n        if self.serviceId is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sserviceId>%s</%sserviceId>%s' % (namespace_, self.gds_format_string(quote_xml(self.serviceId).encode(ExternalEncoding), input_name='serviceId'), namespace_, eol_))\n        if self.SCPDURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sSCPDURL>%s</%sSCPDURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.SCPDURL).encode(ExternalEncoding), input_name='SCPDURL'), namespace_, eol_))\n        if self.controlURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%scontrolURL>%s</%scontrolURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.controlURL).encode(ExternalEncoding), input_name='controlURL'), namespace_, eol_))\n        if self.eventSubURL is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%seventSubURL>%s</%seventSubURL>%s' % (namespace_, self.gds_format_string(quote_xml(self.eventSubURL).encode(ExternalEncoding), input_name='eventSubURL'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.serviceType is not None or\n            self.serviceId is not None or\n            self.SCPDURL is not None or\n            self.controlURL is not None or\n            self.eventSubURL is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='serviceType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.serviceType is not None:\n            showIndent(outfile, level)\n            outfile.write('serviceType=%s,\\n' % quote_python(self.serviceType).encode(ExternalEncoding))\n        if self.serviceId is not None:\n            showIndent(outfile, level)\n            outfile.write('serviceId=%s,\\n' % quote_python(self.serviceId).encode(ExternalEncoding))\n        if self.SCPDURL is not None:\n            showIndent(outfile, level)\n            outfile.write('SCPDURL=%s,\\n' % quote_python(self.SCPDURL).encode(ExternalEncoding))\n        if self.controlURL is not None:\n            showIndent(outfile, level)\n            outfile.write('controlURL=%s,\\n' % quote_python(self.controlURL).encode(ExternalEncoding))\n        if self.eventSubURL is not None:\n            showIndent(outfile, level)\n            outfile.write('eventSubURL=%s,\\n' % quote_python(self.eventSubURL).encode(ExternalEncoding))\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'serviceType':\n            serviceType_ = child_.text\n            serviceType_ = self.gds_validate_string(serviceType_, node, 'serviceType')\n            self.serviceType = serviceType_\n        elif nodeName_ == 'serviceId':\n            serviceId_ = child_.text\n            serviceId_ = self.gds_validate_string(serviceId_, node, 'serviceId')\n            self.serviceId = serviceId_\n        elif nodeName_ == 'SCPDURL':\n            SCPDURL_ = child_.text\n            SCPDURL_ = self.gds_validate_string(SCPDURL_, node, 'SCPDURL')\n            self.SCPDURL = SCPDURL_\n        elif nodeName_ == 'controlURL':\n            controlURL_ = child_.text\n            controlURL_ = self.gds_validate_string(controlURL_, node, 'controlURL')\n            self.controlURL = controlURL_\n        elif nodeName_ == 'eventSubURL':\n            eventSubURL_ = child_.text\n            eventSubURL_ = self.gds_validate_string(eventSubURL_, node, 'eventSubURL')\n            self.eventSubURL = eventSubURL_\n# end class serviceType\n\n\nGDSClassesMapping = {\n    'serviceList': ServiceListType,\n    'service': serviceType,\n    'iconList': IconListType,\n    'deviceList': DeviceListType,\n    'device': DeviceType,\n    'specVersion': SpecVersionType,\n    'icon': iconType,\n}\n\n\nUSAGE_TEXT = \"\"\"\nUsage: python <Parser>.py [ -s ] <in_xml_file>\n\"\"\"\n\ndef usage():\n    print(USAGE_TEXT)\n    sys.exit(1)\n\n\ndef get_root_tag(node):\n    tag = Tag_pattern_.match(node.tag).groups()[-1]\n    rootClass = GDSClassesMapping.get(tag)\n    if rootClass is None:\n        rootClass = globals().get(tag)\n    return tag, rootClass\n\n\ndef parse(inFileName):\n    doc = parsexml_(inFileName)\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'root'\n        rootClass = root\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    return rootObj\n\n\ndef parseString(inString):\n    from io import BytesIO\n    doc = parsexml_(BytesIO(inString))\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'root'\n        rootClass = root\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    return rootObj\n\n\ndef parseLiteral(inFileName):\n    doc = parsexml_(inFileName)\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'root'\n        rootClass = root\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    sys.stdout.write('#from device import *\\n\\n')\n    sys.stdout.write('from datetime import datetime as datetime_\\n\\n')\n    sys.stdout.write('import device as model_\\n\\n')\n    sys.stdout.write('rootObj = model_.rootTag(\\n')\n    rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)\n    sys.stdout.write(')\\n')\n    return rootObj\n\n\ndef main():\n    args = sys.argv[1:]\n    if len(args) == 1:\n        parse(args[0])\n    else:\n        usage()\n\n\nif __name__ == '__main__':\n    #import pdb; pdb.set_trace()\n    main()\n\n\n__all__ = [\n    \"DeviceListType\",\n    \"DeviceType\",\n    \"IconListType\",\n    \"ServiceListType\",\n    \"SpecVersionType\",\n    \"iconType\",\n    \"root\",\n    \"serviceType\"\n    ]\n"
  },
  {
    "path": "ouimeaux/device/api/xsd/device.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<xs:schema\r\n  targetNamespace=\"urn:schemas-upnp-org:device-1-0\"\r\n  xmlns:tns=\"urn:schemas-upnp-org:device-1-0\"\r\n  xmlns=\"urn:schemas-upnp-org:device-1-0\"\r\n  xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n  attributeFormDefault=\"qualified\" elementFormDefault=\"qualified\">\r\n \r\n  <xs:annotation>\r\n    <xs:documentation>\r\n      XML Schema for UPnP device descriptions in real XSD format\r\n      (not like the XDR one from Microsoft)\r\n      Created by Michael Weinrich 2007\r\n    </xs:documentation>\r\n  </xs:annotation>\r\n\r\n  <xs:element name=\"root\">\r\n    <xs:complexType>\r\n      <xs:all>\r\n        <xs:element name=\"specVersion\" type=\"SpecVersionType\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n        <xs:element name=\"URLBase\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n        <xs:element name=\"device\" type=\"DeviceType\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      </xs:all>\r\n      <xs:anyAttribute/>\r\n    </xs:complexType>\r\n  </xs:element>\r\n\r\n  <xs:complexType name=\"SpecVersionType\">\r\n    <xs:all>\r\n      <xs:element name=\"major\" type=\"xs:int\" minOccurs=\"1\" />\r\n      <xs:element name=\"minor\" type=\"xs:int\" minOccurs=\"1\"/>\r\n    </xs:all>\r\n  </xs:complexType>\r\n\r\n  <xs:complexType name=\"DeviceType\">\r\n    <xs:sequence>\r\n      <xs:element name=\"deviceType\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      <xs:element name=\"friendlyName\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      <xs:element name=\"manufacturer\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      <xs:element name=\"manufacturerURL\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"modelDescription\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"modelName\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      <xs:element name=\"modelNumber\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"modelURL\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"serialNumber\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"UDN\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n      <xs:element name=\"UPC\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"iconList\" type=\"IconListType\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"serviceList\" type=\"ServiceListType\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"deviceList\" type=\"DeviceListType\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:element name=\"presentationURL\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\r\n      <xs:any namespace=\"##other\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n \r\n  <xs:complexType name=\"IconListType\">\r\n    <xs:sequence>\r\n      <xs:element name=\"icon\" minOccurs=\"1\" maxOccurs=\"unbounded\">\r\n        <xs:complexType>\r\n          <xs:all>\r\n            <xs:element name=\"mimetype\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"width\" type=\"xs:int\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"height\" type=\"xs:int\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"depth\" type=\"xs:int\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"url\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n          </xs:all>\r\n        </xs:complexType>\r\n      </xs:element>\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n\r\n  <xs:complexType name=\"ServiceListType\">\r\n    <xs:sequence>\r\n      <xs:element name=\"service\" minOccurs=\"1\" maxOccurs=\"unbounded\">\r\n        <xs:complexType>\r\n          <xs:all>\r\n            <xs:element name=\"serviceType\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"serviceId\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"SCPDURL\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"controlURL\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n            <xs:element name=\"eventSubURL\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\r\n          </xs:all>\r\n        </xs:complexType>\r\n      </xs:element>\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n\r\n  <xs:complexType name=\"DeviceListType\">\r\n    <xs:sequence>\r\n      <xs:element name=\"device\" type=\"DeviceType\" minOccurs=\"1\" maxOccurs=\"unbounded\"/>\r\n    </xs:sequence>\r\n  </xs:complexType>\r\n \t \r\n</xs:schema>"
  },
  {
    "path": "ouimeaux/device/api/xsd/service.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n#\n# Generated Thu Jan 31 15:52:45 2013 by generateDS.py version 2.8b.\n#\n\nimport sys\nimport getopt\nimport re as re_\nimport base64\nfrom datetime import datetime, tzinfo, timedelta\n\netree_ = None\nVerbose_import_ = False\n(   XMLParser_import_none, XMLParser_import_lxml,\n    XMLParser_import_elementtree\n    ) = range(3)\nXMLParser_import_library = None\ntry:\n    # lxml\n    from lxml import etree as etree_\n    XMLParser_import_library = XMLParser_import_lxml\n    if Verbose_import_:\n        print(\"running with lxml.etree\")\nexcept ImportError:\n    try:\n        # cElementTree from Python 2.5+\n        import xml.etree.cElementTree as etree_\n        XMLParser_import_library = XMLParser_import_elementtree\n        if Verbose_import_:\n            print(\"running with cElementTree on Python 2.5+\")\n    except ImportError:\n        try:\n            # ElementTree from Python 2.5+\n            import xml.etree.ElementTree as etree_\n            XMLParser_import_library = XMLParser_import_elementtree\n            if Verbose_import_:\n                print(\"running with ElementTree on Python 2.5+\")\n        except ImportError:\n            try:\n                # normal cElementTree install\n                import cElementTree as etree_\n                XMLParser_import_library = XMLParser_import_elementtree\n                if Verbose_import_:\n                    print(\"running with cElementTree\")\n            except ImportError:\n                try:\n                    # normal ElementTree install\n                    import elementtree.ElementTree as etree_\n                    XMLParser_import_library = XMLParser_import_elementtree\n                    if Verbose_import_:\n                        print(\"running with ElementTree\")\n                except ImportError:\n                    raise ImportError(\n                        \"Failed to import ElementTree from any known place\")\n\ndef parsexml_(*args, **kwargs):\n    if (XMLParser_import_library == XMLParser_import_lxml and\n        'parser' not in kwargs):\n        # Use the lxml ElementTree compatible parser so that, e.g.,\n        #   we ignore comments.\n        kwargs['parser'] = etree_.ETCompatXMLParser()\n    doc = etree_.parse(*args, **kwargs)\n    return doc\n\n#\n# User methods\n#\n# Calls to the methods in these classes are generated by generateDS.py.\n# You can replace these methods by re-implementing the following class\n#   in a module named generatedssuper.py.\n\ntry:\n    from generatedssuper import GeneratedsSuper\nexcept ImportError as exp:\n\n    class GeneratedsSuper(object):\n        tzoff_pattern = re_.compile(r'(\\+|-)((0\\d|1[0-3]):[0-5]\\d|14:00)$')\n        class _FixedOffsetTZ(tzinfo):\n            def __init__(self, offset, name):\n                self.__offset = timedelta(minutes = offset)\n                self.__name = name\n            def utcoffset(self, dt):\n                return self.__offset\n            def tzname(self, dt):\n                return self.__name\n            def dst(self, dt):\n                return None\n        def gds_format_string(self, input_data, input_name=''):\n            return input_data\n        def gds_validate_string(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_base64(self, input_data, input_name=''):\n            return base64.b64encode(input_data)\n        def gds_validate_base64(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_integer(self, input_data, input_name=''):\n            return '%d' % input_data\n        def gds_validate_integer(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_integer_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_integer_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError):\n                    raise_parse_error(node, 'Requires sequence of integers')\n            return input_data\n        def gds_format_float(self, input_data, input_name=''):\n            return '%f' % input_data\n        def gds_validate_float(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_float_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_float_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError):\n                    raise_parse_error(node, 'Requires sequence of floats')\n            return input_data\n        def gds_format_double(self, input_data, input_name=''):\n            return '%e' % input_data\n        def gds_validate_double(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_double_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_double_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                try:\n                    fvalue = float(value)\n                except (TypeError, ValueError):\n                    raise_parse_error(node, 'Requires sequence of doubles')\n            return input_data\n        def gds_format_boolean(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_boolean(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_boolean_list(self, input_data, input_name=''):\n            return '%s' % input_data\n        def gds_validate_boolean_list(self, input_data, node, input_name=''):\n            values = input_data.split()\n            for value in values:\n                if value not in ('true', '1', 'false', '0', ):\n                    raise_parse_error(node,\n                        'Requires sequence of booleans '\n                        '(\"true\", \"1\", \"false\", \"0\")')\n            return input_data\n        def gds_validate_datetime(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_datetime(self, input_data, input_name=''):\n            if input_data.microsecond == 0:\n                _svalue = input_data.strftime('%Y-%m-%dT%H:%M:%S')\n            else:\n                _svalue = input_data.strftime('%Y-%m-%dT%H:%M:%S.%f')\n            if input_data.tzinfo is not None:\n                tzoff = input_data.tzinfo.utcoffset(input_data)\n                if tzoff is not None:\n                    total_seconds = tzoff.seconds + (86400 * tzoff.days)\n                    if total_seconds == 0:\n                        _svalue += 'Z'\n                    else:\n                        if total_seconds < 0:\n                            _svalue += '-'\n                            total_seconds *= -1\n                        else:\n                            _svalue += '+'\n                        hours = total_seconds // 3600\n                        minutes = (total_seconds - (hours * 3600)) // 60\n                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)\n            return _svalue\n        def gds_parse_datetime(self, input_data, node, input_name=''):\n            tz = None\n            if input_data[-1] == 'Z':\n                tz = GeneratedsSuper._FixedOffsetTZ(0, 'GMT')\n                input_data = input_data[:-1]\n            else:\n                results = GeneratedsSuper.tzoff_pattern.search(input_data)\n                if results is not None:\n                    tzoff_parts = results.group(2).split(':')\n                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])\n                    if results.group(1) == '-':\n                        tzoff *= -1\n                    tz = GeneratedsSuper._FixedOffsetTZ(\n                        tzoff, results.group(0))\n                    input_data = input_data[:-6]\n            if len(input_data.split('.')) > 1:\n                dt = datetime.strptime(\n                        input_data, '%Y-%m-%dT%H:%M:%S.%f')\n            else:\n                dt = datetime.strptime(\n                        input_data, '%Y-%m-%dT%H:%M:%S')\n            return dt.replace(tzinfo = tz)\n\n        def gds_validate_date(self, input_data, node, input_name=''):\n            return input_data\n        def gds_format_date(self, input_data, input_name=''):\n            _svalue = input_data.strftime('%Y-%m-%d')\n            if input_data.tzinfo is not None:\n                tzoff = input_data.tzinfo.utcoffset(input_data)\n                if tzoff is not None:\n                    total_seconds = tzoff.seconds + (86400 * tzoff.days)\n                    if total_seconds == 0:\n                        _svalue += 'Z'\n                    else:\n                        if total_seconds < 0:\n                            _svalue += '-'\n                            total_seconds *= -1\n                        else:\n                            _svalue += '+'\n                        hours = total_seconds // 3600\n                        minutes = (total_seconds - (hours * 3600)) // 60\n                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)\n            return _svalue\n        def gds_parse_date(self, input_data, node, input_name=''):\n            tz = None\n            if input_data[-1] == 'Z':\n                tz = GeneratedsSuper._FixedOffsetTZ(0, 'GMT')\n                input_data = input_data[:-1]\n            else:\n                results = GeneratedsSuper.tzoff_pattern.search(input_data)\n                if results is not None:\n                    tzoff_parts = results.group(2).split(':')\n                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])\n                    if results.group(1) == '-':\n                        tzoff *= -1\n                    tz = GeneratedsSuper._FixedOffsetTZ(\n                        tzoff, results.group(0))\n                    input_data = input_data[:-6]\n            return datetime.strptime(input_data,\n                '%Y-%m-%d').replace(tzinfo = tz)\n        def gds_str_lower(self, instring):\n            return instring.lower()\n        def get_path_(self, node):\n            path_list = []\n            self.get_path_list_(node, path_list)\n            path_list.reverse()\n            path = '/'.join(path_list)\n            return path\n        Tag_strip_pattern_ = re_.compile(r'\\{.*\\}')\n        def get_path_list_(self, node, path_list):\n            if node is None:\n                return\n            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)\n            if tag:\n                path_list.append(tag)\n            self.get_path_list_(node.getparent(), path_list)\n        def get_class_obj_(self, node, default_class=None):\n            class_obj1 = default_class\n            if 'xsi' in node.nsmap:\n                classname = node.get('{%s}type' % node.nsmap['xsi'])\n                if classname is not None:\n                    names = classname.split(':')\n                    if len(names) == 2:\n                        classname = names[1]\n                    class_obj2 = globals().get(classname)\n                    if class_obj2 is not None:\n                        class_obj1 = class_obj2\n            return class_obj1\n        def gds_build_any(self, node, type_name=None):\n            return None\n\n\n#\n# If you have installed IPython you can uncomment and use the following.\n# IPython is available from http://ipython.scipy.org/.\n#\n\n## from IPython.Shell import IPShellEmbed\n## args = ''\n## ipshell = IPShellEmbed(args,\n##     banner = 'Dropping into IPython',\n##     exit_msg = 'Leaving Interpreter, back to program.')\n\n# Then use the following line where and when you want to drop into the\n# IPython shell:\n#    ipshell('<some message> -- Entering ipshell.\\nHit Ctrl-D to exit')\n\n#\n# Globals\n#\n\nExternalEncoding = 'ascii'\nTag_pattern_ = re_.compile(r'({.*})?(.*)')\nString_cleanup_pat_ = re_.compile(r\"[\\n\\r\\s]+\")\nNamespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')\n\n#\n# Support/utility functions.\n#\n\ndef showIndent(outfile, level, pretty_print=True):\n    if pretty_print:\n        for idx in range(level):\n            outfile.write('    ')\n\ndef quote_xml(inStr):\n    if not inStr:\n        return ''\n    s1 = (isinstance(inStr, basestring) and inStr or\n          '%s' % inStr)\n    s1 = s1.replace('&', '&amp;')\n    s1 = s1.replace('<', '&lt;')\n    s1 = s1.replace('>', '&gt;')\n    return s1\n\ndef quote_attrib(inStr):\n    s1 = (isinstance(inStr, basestring) and inStr or\n          '%s' % inStr)\n    s1 = s1.replace('&', '&amp;')\n    s1 = s1.replace('<', '&lt;')\n    s1 = s1.replace('>', '&gt;')\n    if '\"' in s1:\n        if \"'\" in s1:\n            s1 = '\"%s\"' % s1.replace('\"', \"&quot;\")\n        else:\n            s1 = \"'%s'\" % s1\n    else:\n        s1 = '\"%s\"' % s1\n    return s1\n\ndef quote_python(inStr):\n    s1 = inStr\n    if s1.find(\"'\") == -1:\n        if s1.find('\\n') == -1:\n            return \"'%s'\" % s1\n        else:\n            return \"'''%s'''\" % s1\n    else:\n        if s1.find('\"') != -1:\n            s1 = s1.replace('\"', '\\\\\"')\n        if s1.find('\\n') == -1:\n            return '\"%s\"' % s1\n        else:\n            return '\"\"\"%s\"\"\"' % s1\n\ndef get_all_text_(node):\n    if node.text is not None:\n        text = node.text\n    else:\n        text = ''\n    for child in node:\n        if child.tail is not None:\n            text += child.tail\n    return text\n\ndef find_attr_value_(attr_name, node):\n    attrs = node.attrib\n    attr_parts = attr_name.split(':')\n    value = None\n    if len(attr_parts) == 1:\n        value = attrs.get(attr_name)\n    elif len(attr_parts) == 2:\n        prefix, name = attr_parts\n        namespace = node.nsmap.get(prefix)\n        if namespace is not None:\n            value = attrs.get('{%s}%s' % (namespace, name, ))\n    return value\n\n\nclass GDSParseError(Exception):\n    pass\n\ndef raise_parse_error(node, msg):\n    if XMLParser_import_library == XMLParser_import_lxml:\n        msg = '%s (element %s/line %d)' % (\n            msg, node.tag, node.sourceline, )\n    else:\n        msg = '%s (element %s)' % (msg, node.tag, )\n    raise GDSParseError(msg)\n\n\nclass MixedContainer:\n    # Constants for category:\n    CategoryNone = 0\n    CategoryText = 1\n    CategorySimple = 2\n    CategoryComplex = 3\n    # Constants for content_type:\n    TypeNone = 0\n    TypeText = 1\n    TypeString = 2\n    TypeInteger = 3\n    TypeFloat = 4\n    TypeDecimal = 5\n    TypeDouble = 6\n    TypeBoolean = 7\n    TypeBase64 = 8\n    def __init__(self, category, content_type, name, value):\n        self.category = category\n        self.content_type = content_type\n        self.name = name\n        self.value = value\n    def getCategory(self):\n        return self.category\n    def getContenttype(self, content_type):\n        return self.content_type\n    def getValue(self):\n        return self.value\n    def getName(self):\n        return self.name\n    def export(self, outfile, level, name, namespace, pretty_print=True):\n        if self.category == MixedContainer.CategoryText:\n            # Prevent exporting empty content as empty lines.\n            if self.value.strip():\n                outfile.write(self.value)\n        elif self.category == MixedContainer.CategorySimple:\n            self.exportSimple(outfile, level, name)\n        else:    # category == MixedContainer.CategoryComplex\n            self.value.export(outfile, level, namespace, name, pretty_print)\n    def exportSimple(self, outfile, level, name):\n        if self.content_type == MixedContainer.TypeString:\n            outfile.write('<%s>%s</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeInteger or \\\n                self.content_type == MixedContainer.TypeBoolean:\n            outfile.write('<%s>%d</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeFloat or \\\n                self.content_type == MixedContainer.TypeDecimal:\n            outfile.write('<%s>%f</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeDouble:\n            outfile.write('<%s>%g</%s>' %\n                (self.name, self.value, self.name))\n        elif self.content_type == MixedContainer.TypeBase64:\n            outfile.write('<%s>%s</%s>' %\n                (self.name, base64.b64encode(self.value), self.name))\n    def exportLiteral(self, outfile, level, name):\n        if self.category == MixedContainer.CategoryText:\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\", \"%s\"),\\n'\n                % (self.category, self.content_type, self.name, self.value))\n        elif self.category == MixedContainer.CategorySimple:\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\", \"%s\"),\\n'\n                % (self.category, self.content_type, self.name, self.value))\n        else:    # category == MixedContainer.CategoryComplex\n            showIndent(outfile, level)\n            outfile.write('model_.MixedContainer(%d, %d, \"%s\",\\n' % \\\n                (self.category, self.content_type, self.name,))\n            self.value.exportLiteral(outfile, level + 1)\n            showIndent(outfile, level)\n            outfile.write(')\\n')\n\n\nclass MemberSpec_(object):\n    def __init__(self, name='', data_type='', container=0):\n        self.name = name\n        self.data_type = data_type\n        self.container = container\n    def set_name(self, name): self.name = name\n    def get_name(self): return self.name\n    def set_data_type(self, data_type): self.data_type = data_type\n    def get_data_type_chain(self): return self.data_type\n    def get_data_type(self):\n        if isinstance(self.data_type, list):\n            if len(self.data_type) > 0:\n                return self.data_type[-1]\n            else:\n                return 'xs:string'\n        else:\n            return self.data_type\n    def set_container(self, container): self.container = container\n    def get_container(self): return self.container\n\ndef _cast(typ, value):\n    if typ is None or value is None:\n        return value\n    return typ(value)\n\n#\n# Data representation classes.\n#\n\nclass scpd(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, specVersion=None, actionList=None, serviceStateTable=None):\n        self.specVersion = specVersion\n        self.actionList = actionList\n        self.serviceStateTable = serviceStateTable\n    def factory(*args_, **kwargs_):\n        if scpd.subclass:\n            return scpd.subclass(*args_, **kwargs_)\n        else:\n            return scpd(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_specVersion(self): return self.specVersion\n    def set_specVersion(self, specVersion): self.specVersion = specVersion\n    def get_actionList(self): return self.actionList\n    def set_actionList(self, actionList): self.actionList = actionList\n    def get_serviceStateTable(self): return self.serviceStateTable\n    def set_serviceStateTable(self, serviceStateTable): self.serviceStateTable = serviceStateTable\n    def export(self, outfile, level, namespace_='', name_='scpd', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='scpd')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='scpd'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='scpd', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.specVersion is not None:\n            self.specVersion.export(outfile, level, namespace_, name_='specVersion', pretty_print=pretty_print)\n        if self.actionList is not None:\n            self.actionList.export(outfile, level, namespace_, name_='actionList', pretty_print=pretty_print)\n        if self.serviceStateTable is not None:\n            self.serviceStateTable.export(outfile, level, namespace_, name_='serviceStateTable', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.specVersion is not None or\n            self.actionList is not None or\n            self.serviceStateTable is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='scpd'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.specVersion is not None:\n            showIndent(outfile, level)\n            outfile.write('specVersion=model_.SpecVersionType(\\n')\n            self.specVersion.exportLiteral(outfile, level, name_='specVersion')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.actionList is not None:\n            showIndent(outfile, level)\n            outfile.write('actionList=model_.ActionListType(\\n')\n            self.actionList.exportLiteral(outfile, level, name_='actionList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.serviceStateTable is not None:\n            showIndent(outfile, level)\n            outfile.write('serviceStateTable=model_.ServiceStateTableType(\\n')\n            self.serviceStateTable.exportLiteral(outfile, level, name_='serviceStateTable')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'specVersion':\n            obj_ = SpecVersionType.factory()\n            obj_.build(child_)\n            self.set_specVersion(obj_)\n        elif nodeName_ == 'actionList':\n            obj_ = ActionListType.factory()\n            obj_.build(child_)\n            self.set_actionList(obj_)\n        elif nodeName_ == 'serviceStateTable':\n            obj_ = ServiceStateTableType.factory()\n            obj_.build(child_)\n            self.set_serviceStateTable(obj_)\n# end class scpd\n\n\nclass SpecVersionType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, major=None, minor=None):\n        self.major = major\n        self.minor = minor\n    def factory(*args_, **kwargs_):\n        if SpecVersionType.subclass:\n            return SpecVersionType.subclass(*args_, **kwargs_)\n        else:\n            return SpecVersionType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_major(self): return self.major\n    def set_major(self, major): self.major = major\n    def get_minor(self): return self.minor\n    def set_minor(self, minor): self.minor = minor\n    def export(self, outfile, level, namespace_='', name_='SpecVersionType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='SpecVersionType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SpecVersionType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='SpecVersionType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.major is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smajor>%s</%smajor>%s' % (namespace_, self.gds_format_integer(self.major, input_name='major'), namespace_, eol_))\n        if self.minor is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sminor>%s</%sminor>%s' % (namespace_, self.gds_format_integer(self.minor, input_name='minor'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.major is not None or\n            self.minor is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='SpecVersionType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.major is not None:\n            showIndent(outfile, level)\n            outfile.write('major=%d,\\n' % self.major)\n        if self.minor is not None:\n            showIndent(outfile, level)\n            outfile.write('minor=%d,\\n' % self.minor)\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'major':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'major')\n            self.major = ival_\n        elif nodeName_ == 'minor':\n            sval_ = child_.text\n            try:\n                ival_ = int(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires integer: %s' % exp)\n            ival_ = self.gds_validate_integer(ival_, node, 'minor')\n            self.minor = ival_\n# end class SpecVersionType\n\n\nclass ActionListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, action=None):\n        if action is None:\n            self.action = []\n        else:\n            self.action = action\n    def factory(*args_, **kwargs_):\n        if ActionListType.subclass:\n            return ActionListType.subclass(*args_, **kwargs_)\n        else:\n            return ActionListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_action(self): return self.action\n    def set_action(self, action): self.action = action\n    def add_action(self, value): self.action.append(value)\n    def insert_action(self, index, value): self.action[index] = value\n    def export(self, outfile, level, namespace_='', name_='ActionListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ActionListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ActionListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='ActionListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for action_ in self.action:\n            action_.export(outfile, level, namespace_, name_='action', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.action\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ActionListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('action=[\\n')\n        level += 1\n        for action_ in self.action:\n            showIndent(outfile, level)\n            outfile.write('model_.ActionType(\\n')\n            action_.exportLiteral(outfile, level, name_='ActionType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'action':\n            obj_ = ActionType.factory()\n            obj_.build(child_)\n            self.action.append(obj_)\n# end class ActionListType\n\n\nclass ActionType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, name=None, argumentList=None):\n        self.name = name\n        self.argumentList = argumentList\n    def factory(*args_, **kwargs_):\n        if ActionType.subclass:\n            return ActionType.subclass(*args_, **kwargs_)\n        else:\n            return ActionType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_name(self): return self.name\n    def set_name(self, name): self.name = name\n    def get_argumentList(self): return self.argumentList\n    def set_argumentList(self, argumentList): self.argumentList = argumentList\n    def export(self, outfile, level, namespace_='', name_='ActionType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ActionType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ActionType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='ActionType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.name is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sname>%s</%sname>%s' % (namespace_, self.gds_format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_, eol_))\n        if self.argumentList is not None:\n            self.argumentList.export(outfile, level, namespace_, name_='argumentList', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.name is not None or\n            self.argumentList is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ActionType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.name is not None:\n            showIndent(outfile, level)\n            outfile.write('name=%s,\\n' % quote_python(self.name).encode(ExternalEncoding))\n        if self.argumentList is not None:\n            showIndent(outfile, level)\n            outfile.write('argumentList=model_.ArgumentListType(\\n')\n            self.argumentList.exportLiteral(outfile, level, name_='argumentList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'name':\n            name_ = child_.text\n            name_ = self.gds_validate_string(name_, node, 'name')\n            self.name = name_\n        elif nodeName_ == 'argumentList':\n            obj_ = ArgumentListType.factory()\n            obj_.build(child_)\n            self.set_argumentList(obj_)\n# end class ActionType\n\n\nclass ArgumentListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, argument=None):\n        if argument is None:\n            self.argument = []\n        else:\n            self.argument = argument\n    def factory(*args_, **kwargs_):\n        if ArgumentListType.subclass:\n            return ArgumentListType.subclass(*args_, **kwargs_)\n        else:\n            return ArgumentListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_argument(self): return self.argument\n    def set_argument(self, argument): self.argument = argument\n    def add_argument(self, value): self.argument.append(value)\n    def insert_argument(self, index, value): self.argument[index] = value\n    def export(self, outfile, level, namespace_='', name_='ArgumentListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArgumentListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ArgumentListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='ArgumentListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for argument_ in self.argument:\n            argument_.export(outfile, level, namespace_, name_='argument', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.argument\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ArgumentListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('argument=[\\n')\n        level += 1\n        for argument_ in self.argument:\n            showIndent(outfile, level)\n            outfile.write('model_.ArgumentType(\\n')\n            argument_.exportLiteral(outfile, level, name_='ArgumentType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'argument':\n            obj_ = ArgumentType.factory()\n            obj_.build(child_)\n            self.argument.append(obj_)\n# end class ArgumentListType\n\n\nclass ArgumentType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, name=None, direction=None, relatedStateVariable=None, retval=None):\n        self.name = name\n        self.direction = direction\n        self.relatedStateVariable = relatedStateVariable\n        self.retval = retval\n    def factory(*args_, **kwargs_):\n        if ArgumentType.subclass:\n            return ArgumentType.subclass(*args_, **kwargs_)\n        else:\n            return ArgumentType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_name(self): return self.name\n    def set_name(self, name): self.name = name\n    def get_direction(self): return self.direction\n    def set_direction(self, direction): self.direction = direction\n    def get_relatedStateVariable(self): return self.relatedStateVariable\n    def set_relatedStateVariable(self, relatedStateVariable): self.relatedStateVariable = relatedStateVariable\n    def get_retval(self): return self.retval\n    def set_retval(self, retval): self.retval = retval\n    def export(self, outfile, level, namespace_='', name_='ArgumentType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ArgumentType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ArgumentType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='ArgumentType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.name is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sname>%s</%sname>%s' % (namespace_, self.gds_format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_, eol_))\n        if self.direction is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sdirection>%s</%sdirection>%s' % (namespace_, self.gds_format_string(quote_xml(self.direction).encode(ExternalEncoding), input_name='direction'), namespace_, eol_))\n        if self.relatedStateVariable is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%srelatedStateVariable>%s</%srelatedStateVariable>%s' % (namespace_, self.gds_format_string(quote_xml(self.relatedStateVariable).encode(ExternalEncoding), input_name='relatedStateVariable'), namespace_, eol_))\n        if self.retval is not None:\n            self.retval.export(outfile, level, namespace_, name_='retval', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.name is not None or\n            self.direction is not None or\n            self.relatedStateVariable is not None or\n            self.retval is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ArgumentType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.name is not None:\n            showIndent(outfile, level)\n            outfile.write('name=%s,\\n' % quote_python(self.name).encode(ExternalEncoding))\n        if self.direction is not None:\n            showIndent(outfile, level)\n            outfile.write('direction=%s,\\n' % quote_python(self.direction).encode(ExternalEncoding))\n        if self.relatedStateVariable is not None:\n            showIndent(outfile, level)\n            outfile.write('relatedStateVariable=%s,\\n' % quote_python(self.relatedStateVariable).encode(ExternalEncoding))\n        if self.retval is not None:\n            showIndent(outfile, level)\n            outfile.write('retval=model_.retvalType(\\n')\n            self.retval.exportLiteral(outfile, level, name_='retval')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'name':\n            name_ = child_.text\n            name_ = self.gds_validate_string(name_, node, 'name')\n            self.name = name_\n        elif nodeName_ == 'direction':\n            direction_ = child_.text\n            direction_ = self.gds_validate_string(direction_, node, 'direction')\n            self.direction = direction_\n        elif nodeName_ == 'relatedStateVariable':\n            relatedStateVariable_ = child_.text\n            relatedStateVariable_ = self.gds_validate_string(relatedStateVariable_, node, 'relatedStateVariable')\n            self.relatedStateVariable = relatedStateVariable_\n        elif nodeName_ == 'retval':\n            obj_ = retvalType.factory()\n            obj_.build(child_)\n            self.set_retval(obj_)\n# end class ArgumentType\n\n\nclass ServiceStateTableType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, stateVariable=None):\n        if stateVariable is None:\n            self.stateVariable = []\n        else:\n            self.stateVariable = stateVariable\n    def factory(*args_, **kwargs_):\n        if ServiceStateTableType.subclass:\n            return ServiceStateTableType.subclass(*args_, **kwargs_)\n        else:\n            return ServiceStateTableType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_stateVariable(self): return self.stateVariable\n    def set_stateVariable(self, stateVariable): self.stateVariable = stateVariable\n    def add_stateVariable(self, value): self.stateVariable.append(value)\n    def insert_stateVariable(self, index, value): self.stateVariable[index] = value\n    def export(self, outfile, level, namespace_='', name_='ServiceStateTableType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='ServiceStateTableType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ServiceStateTableType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='ServiceStateTableType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for stateVariable_ in self.stateVariable:\n            stateVariable_.export(outfile, level, namespace_, name_='stateVariable', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.stateVariable\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='ServiceStateTableType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('stateVariable=[\\n')\n        level += 1\n        for stateVariable_ in self.stateVariable:\n            showIndent(outfile, level)\n            outfile.write('model_.StateVariableType(\\n')\n            stateVariable_.exportLiteral(outfile, level, name_='StateVariableType')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'stateVariable':\n            obj_ = StateVariableType.factory()\n            obj_.build(child_)\n            self.stateVariable.append(obj_)\n# end class ServiceStateTableType\n\n\nclass StateVariableType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, sendEvents='yes', name=None, dataType=None, defaultValue=None, allowedValueList=None, allowedValueRange=None):\n        self.sendEvents = _cast(None, sendEvents)\n        self.name = name\n        self.dataType = dataType\n        self.defaultValue = defaultValue\n        self.allowedValueList = allowedValueList\n        self.allowedValueRange = allowedValueRange\n    def factory(*args_, **kwargs_):\n        if StateVariableType.subclass:\n            return StateVariableType.subclass(*args_, **kwargs_)\n        else:\n            return StateVariableType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_name(self): return self.name\n    def set_name(self, name): self.name = name\n    def get_dataType(self): return self.dataType\n    def set_dataType(self, dataType): self.dataType = dataType\n    def get_defaultValue(self): return self.defaultValue\n    def set_defaultValue(self, defaultValue): self.defaultValue = defaultValue\n    def get_allowedValueList(self): return self.allowedValueList\n    def set_allowedValueList(self, allowedValueList): self.allowedValueList = allowedValueList\n    def get_allowedValueRange(self): return self.allowedValueRange\n    def set_allowedValueRange(self, allowedValueRange): self.allowedValueRange = allowedValueRange\n    def get_sendEvents(self): return self.sendEvents\n    def set_sendEvents(self, sendEvents): self.sendEvents = sendEvents\n    def export(self, outfile, level, namespace_='', name_='StateVariableType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='StateVariableType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StateVariableType'):\n        if self.sendEvents is not None and 'sendEvents' not in already_processed:\n            already_processed.append('sendEvents')\n            outfile.write(' sendEvents=%s' % (self.gds_format_string(quote_attrib(self.sendEvents).encode(ExternalEncoding), input_name='sendEvents'), ))\n    def exportChildren(self, outfile, level, namespace_='', name_='StateVariableType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.name is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sname>%s</%sname>%s' % (namespace_, self.gds_format_string(quote_xml(self.name).encode(ExternalEncoding), input_name='name'), namespace_, eol_))\n        if self.dataType is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sdataType>%s</%sdataType>%s' % (namespace_, self.gds_format_string(quote_xml(self.dataType).encode(ExternalEncoding), input_name='dataType'), namespace_, eol_))\n        if self.defaultValue is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sdefaultValue>%s</%sdefaultValue>%s' % (namespace_, self.gds_format_string(quote_xml(self.defaultValue).encode(ExternalEncoding), input_name='defaultValue'), namespace_, eol_))\n        if self.allowedValueList is not None:\n            self.allowedValueList.export(outfile, level, namespace_, name_='allowedValueList', pretty_print=pretty_print)\n        if self.allowedValueRange is not None:\n            self.allowedValueRange.export(outfile, level, namespace_, name_='allowedValueRange', pretty_print=pretty_print)\n    def hasContent_(self):\n        if (\n            self.name is not None or\n            self.dataType is not None or\n            self.defaultValue is not None or\n            self.allowedValueList is not None or\n            self.allowedValueRange is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='StateVariableType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        if self.sendEvents is not None and 'sendEvents' not in already_processed:\n            already_processed.append('sendEvents')\n            showIndent(outfile, level)\n            outfile.write('sendEvents = \"%s\",\\n' % (self.sendEvents,))\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.name is not None:\n            showIndent(outfile, level)\n            outfile.write('name=%s,\\n' % quote_python(self.name).encode(ExternalEncoding))\n        if self.dataType is not None:\n            showIndent(outfile, level)\n            outfile.write('dataType=%s,\\n' % quote_python(self.dataType).encode(ExternalEncoding))\n        if self.defaultValue is not None:\n            showIndent(outfile, level)\n            outfile.write('defaultValue=%s,\\n' % quote_python(self.defaultValue).encode(ExternalEncoding))\n        if self.allowedValueList is not None:\n            showIndent(outfile, level)\n            outfile.write('allowedValueList=model_.AllowedValueListType(\\n')\n            self.allowedValueList.exportLiteral(outfile, level, name_='allowedValueList')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n        if self.allowedValueRange is not None:\n            showIndent(outfile, level)\n            outfile.write('allowedValueRange=model_.AllowedValueRangeType(\\n')\n            self.allowedValueRange.exportLiteral(outfile, level, name_='allowedValueRange')\n            showIndent(outfile, level)\n            outfile.write('),\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        value = find_attr_value_('sendEvents', node)\n        if value is not None and 'sendEvents' not in already_processed:\n            already_processed.append('sendEvents')\n            self.sendEvents = value\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'name':\n            name_ = child_.text\n            name_ = self.gds_validate_string(name_, node, 'name')\n            self.name = name_\n        elif nodeName_ == 'dataType':\n            dataType_ = child_.text\n            dataType_ = self.gds_validate_string(dataType_, node, 'dataType')\n            self.dataType = dataType_\n        elif nodeName_ == 'defaultValue':\n            defaultValue_ = child_.text\n            defaultValue_ = self.gds_validate_string(defaultValue_, node, 'defaultValue')\n            self.defaultValue = defaultValue_\n        elif nodeName_ == 'allowedValueList':\n            obj_ = AllowedValueListType.factory()\n            obj_.build(child_)\n            self.set_allowedValueList(obj_)\n        elif nodeName_ == 'allowedValueRange':\n            obj_ = AllowedValueRangeType.factory()\n            obj_.build(child_)\n            self.set_allowedValueRange(obj_)\n# end class StateVariableType\n\n\nclass AllowedValueListType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, allowedValue=None):\n        if allowedValue is None:\n            self.allowedValue = []\n        else:\n            self.allowedValue = allowedValue\n    def factory(*args_, **kwargs_):\n        if AllowedValueListType.subclass:\n            return AllowedValueListType.subclass(*args_, **kwargs_)\n        else:\n            return AllowedValueListType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_allowedValue(self): return self.allowedValue\n    def set_allowedValue(self, allowedValue): self.allowedValue = allowedValue\n    def add_allowedValue(self, value): self.allowedValue.append(value)\n    def insert_allowedValue(self, index, value): self.allowedValue[index] = value\n    def export(self, outfile, level, namespace_='', name_='AllowedValueListType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AllowedValueListType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AllowedValueListType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='AllowedValueListType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        for allowedValue_ in self.allowedValue:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sallowedValue>%s</%sallowedValue>%s' % (namespace_, self.gds_format_string(quote_xml(allowedValue_).encode(ExternalEncoding), input_name='allowedValue'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.allowedValue\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='AllowedValueListType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        showIndent(outfile, level)\n        outfile.write('allowedValue=[\\n')\n        level += 1\n        for allowedValue_ in self.allowedValue:\n            showIndent(outfile, level)\n            outfile.write('%s,\\n' % quote_python(allowedValue_).encode(ExternalEncoding))\n        level -= 1\n        showIndent(outfile, level)\n        outfile.write('],\\n')\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'allowedValue':\n            allowedValue_ = child_.text\n            allowedValue_ = self.gds_validate_string(allowedValue_, node, 'allowedValue')\n            self.allowedValue.append(allowedValue_)\n# end class AllowedValueListType\n\n\nclass AllowedValueRangeType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self, minimum=None, maximum=None, step=None):\n        self.minimum = minimum\n        self.maximum = maximum\n        self.step = step\n    def factory(*args_, **kwargs_):\n        if AllowedValueRangeType.subclass:\n            return AllowedValueRangeType.subclass(*args_, **kwargs_)\n        else:\n            return AllowedValueRangeType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def get_minimum(self): return self.minimum\n    def set_minimum(self, minimum): self.minimum = minimum\n    def get_maximum(self): return self.maximum\n    def set_maximum(self, maximum): self.maximum = maximum\n    def get_step(self): return self.step\n    def set_step(self, step): self.step = step\n    def export(self, outfile, level, namespace_='', name_='AllowedValueRangeType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='AllowedValueRangeType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            showIndent(outfile, level, pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AllowedValueRangeType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='AllowedValueRangeType', fromsubclass_=False, pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        if self.minimum is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sminimum>%s</%sminimum>%s' % (namespace_, self.gds_format_float(self.minimum, input_name='minimum'), namespace_, eol_))\n        if self.maximum is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%smaximum>%s</%smaximum>%s' % (namespace_, self.gds_format_float(self.maximum, input_name='maximum'), namespace_, eol_))\n        if self.step is not None:\n            showIndent(outfile, level, pretty_print)\n            outfile.write('<%sstep>%s</%sstep>%s' % (namespace_, self.gds_format_float(self.step, input_name='step'), namespace_, eol_))\n    def hasContent_(self):\n        if (\n            self.minimum is not None or\n            self.maximum is not None or\n            self.step is not None\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='AllowedValueRangeType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        if self.minimum is not None:\n            showIndent(outfile, level)\n            outfile.write('minimum=%f,\\n' % self.minimum)\n        if self.maximum is not None:\n            showIndent(outfile, level)\n            outfile.write('maximum=%f,\\n' % self.maximum)\n        if self.step is not None:\n            showIndent(outfile, level)\n            outfile.write('step=%f,\\n' % self.step)\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        if nodeName_ == 'minimum':\n            sval_ = child_.text\n            try:\n                fval_ = float(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires float or double: %s' % exp)\n            fval_ = self.gds_validate_float(fval_, node, 'minimum')\n            self.minimum = fval_\n        elif nodeName_ == 'maximum':\n            sval_ = child_.text\n            try:\n                fval_ = float(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires float or double: %s' % exp)\n            fval_ = self.gds_validate_float(fval_, node, 'maximum')\n            self.maximum = fval_\n        elif nodeName_ == 'step':\n            sval_ = child_.text\n            try:\n                fval_ = float(sval_)\n            except (TypeError, ValueError) as exp:\n                raise_parse_error(child_, 'requires float or double: %s' % exp)\n            fval_ = self.gds_validate_float(fval_, node, 'step')\n            self.step = fval_\n# end class AllowedValueRangeType\n\n\nclass retvalType(GeneratedsSuper):\n    subclass = None\n    superclass = None\n    def __init__(self):\n        pass\n    def factory(*args_, **kwargs_):\n        if retvalType.subclass:\n            return retvalType.subclass(*args_, **kwargs_)\n        else:\n            return retvalType(*args_, **kwargs_)\n    factory = staticmethod(factory)\n    def export(self, outfile, level, namespace_='', name_='retvalType', namespacedef_='', pretty_print=True):\n        if pretty_print:\n            eol_ = '\\n'\n        else:\n            eol_ = ''\n        showIndent(outfile, level, pretty_print)\n        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))\n        already_processed = []\n        self.exportAttributes(outfile, level, already_processed, namespace_, name_='retvalType')\n        if self.hasContent_():\n            outfile.write('>%s' % (eol_, ))\n            self.exportChildren(outfile, level + 1, namespace_, name_, pretty_print=pretty_print)\n            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))\n        else:\n            outfile.write('/>%s' % (eol_, ))\n    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='retvalType'):\n        pass\n    def exportChildren(self, outfile, level, namespace_='', name_='retvalType', fromsubclass_=False, pretty_print=True):\n        pass\n    def hasContent_(self):\n        if (\n\n            ):\n            return True\n        else:\n            return False\n    def exportLiteral(self, outfile, level, name_='retvalType'):\n        level += 1\n        self.exportLiteralAttributes(outfile, level, [], name_)\n        if self.hasContent_():\n            self.exportLiteralChildren(outfile, level, name_)\n    def exportLiteralAttributes(self, outfile, level, already_processed, name_):\n        pass\n    def exportLiteralChildren(self, outfile, level, name_):\n        pass\n    def build(self, node):\n        self.buildAttributes(node, node.attrib, [])\n        for child in node:\n            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]\n            self.buildChildren(child, node, nodeName_)\n    def buildAttributes(self, node, attrs, already_processed):\n        pass\n    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):\n        pass\n# end class retvalType\n\n\nGDSClassesMapping = {\n    'argumentList': ArgumentListType,\n    'actionList': ActionListType,\n    'retval': retvalType,\n    'stateVariable': StateVariableType,\n    'argument': ArgumentType,\n    'action': ActionType,\n    'serviceStateTable': ServiceStateTableType,\n    'allowedValueRange': AllowedValueRangeType,\n    'specVersion': SpecVersionType,\n    'allowedValueList': AllowedValueListType,\n}\n\n\nUSAGE_TEXT = \"\"\"\nUsage: python <Parser>.py [ -s ] <in_xml_file>\n\"\"\"\n\ndef usage():\n    print(USAGE_TEXT)\n    sys.exit(1)\n\n\ndef get_root_tag(node):\n    tag = Tag_pattern_.match(node.tag).groups()[-1]\n    rootClass = GDSClassesMapping.get(tag)\n    if rootClass is None:\n        rootClass = globals().get(tag)\n    return tag, rootClass\n\n\ndef parse(inFileName):\n    doc = parsexml_(inFileName)\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'scpd'\n        rootClass = scpd\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    return rootObj\n\n\ndef parseString(inString):\n    from io import BytesIO\n    doc = parsexml_(BytesIO(inString))\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'scpd'\n        rootClass = scpd\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    return rootObj\n\n\ndef parseLiteral(inFileName):\n    doc = parsexml_(inFileName)\n    rootNode = doc.getroot()\n    rootTag, rootClass = get_root_tag(rootNode)\n    if rootClass is None:\n        rootTag = 'scpd'\n        rootClass = scpd\n    rootObj = rootClass.factory()\n    rootObj.build(rootNode)\n    # Enable Python to collect the space used by the DOM.\n    doc = None\n    sys.stdout.write('#from service import *\\n\\n')\n    sys.stdout.write('from datetime import datetime as datetime_\\n\\n')\n    sys.stdout.write('import service as model_\\n\\n')\n    sys.stdout.write('rootObj = model_.rootTag(\\n')\n    rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)\n    sys.stdout.write(')\\n')\n    return rootObj\n\n\ndef main():\n    args = sys.argv[1:]\n    if len(args) == 1:\n        parse(args[0])\n    else:\n        usage()\n\n\nif __name__ == '__main__':\n    #import pdb; pdb.set_trace()\n    main()\n\n\n__all__ = [\n    \"ActionListType\",\n    \"ActionType\",\n    \"AllowedValueListType\",\n    \"AllowedValueRangeType\",\n    \"ArgumentListType\",\n    \"ArgumentType\",\n    \"ServiceStateTableType\",\n    \"SpecVersionType\",\n    \"StateVariableType\",\n    \"retvalType\",\n    \"scpd\"\n    ]\n"
  },
  {
    "path": "ouimeaux/device/api/xsd/service.xsd",
    "content": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n  xmlns=\"urn:schemas-upnp-org:service-1-0\" \n  targetNamespace=\"urn:schemas-upnp-org:service-1-0\"\n  elementFormDefault=\"qualified\">\n\n  <xs:annotation>\n    <xs:documentation>\n      XML Schema for UPnP service descriptions in real XSD format\n      (not like the XDR one from Microsoft)\n      Created by Michael Weinrich 2007\n    </xs:documentation>\n  </xs:annotation>\n\n  <xs:element name=\"scpd\">\n    <xs:complexType>\n      <xs:all>\n        <xs:element name=\"specVersion\" type=\"SpecVersionType\" minOccurs=\"1\" maxOccurs=\"1\" />\n        <xs:element name=\"actionList\" type=\"ActionListType\" minOccurs=\"0\" maxOccurs=\"1\" />\n        <xs:element name=\"serviceStateTable\" type=\"ServiceStateTableType\" minOccurs=\"1\" maxOccurs=\"1\" />\n      </xs:all>\n    </xs:complexType>\n  </xs:element>\n\n  <xs:complexType name=\"SpecVersionType\">\n    <xs:all>\n      <xs:element name=\"major\" type=\"xs:int\" minOccurs=\"1\" />\n      <xs:element name=\"minor\" type=\"xs:int\" minOccurs=\"1\" />\n    </xs:all>\n  </xs:complexType>\n\n  <xs:complexType name=\"ActionListType\">\n    <xs:sequence>\n      <xs:element name=\"action\" type=\"ActionType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n    </xs:sequence>\n  </xs:complexType>\n\n  <xs:complexType name=\"ActionType\">\n    <xs:all>\n      <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"argumentList\" type=\"ArgumentListType\" minOccurs=\"0\" maxOccurs=\"1\" />\n    </xs:all>\n  </xs:complexType>\n\n  <xs:complexType name=\"ArgumentListType\">\n    <xs:sequence>\n      <xs:element name=\"argument\" type=\"ArgumentType\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\n    </xs:sequence>\n  </xs:complexType>\n\n  <xs:complexType name=\"ArgumentType\">\n    <xs:all>\n      <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"direction\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"relatedStateVariable\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"retval\" minOccurs=\"0\" maxOccurs=\"1\">\n        <xs:complexType>\n        </xs:complexType>\n      </xs:element>\n    </xs:all>\n  </xs:complexType>\n\n  <xs:complexType name=\"ServiceStateTableType\">\n    <xs:sequence>\n      <xs:element name=\"stateVariable\" type=\"StateVariableType\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\n    </xs:sequence>\n  </xs:complexType>\n\n  <xs:complexType name=\"StateVariableType\">\n    <xs:all>\n      <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"dataType\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"defaultValue\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\" />\n      <xs:element name=\"allowedValueList\" type=\"AllowedValueListType\" minOccurs=\"0\" maxOccurs=\"1\" />\n      <xs:element name=\"allowedValueRange\" type=\"AllowedValueRangeType\" minOccurs=\"0\" maxOccurs=\"1\" />\n    </xs:all>\n    <xs:attribute name=\"sendEvents\" type=\"xs:string\" default=\"yes\" />\n  </xs:complexType>\n\n  <xs:complexType name=\"AllowedValueListType\">\n    <xs:sequence>\n      <xs:element name=\"allowedValue\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\n    </xs:sequence>\n  </xs:complexType>\n\n  <xs:complexType name=\"AllowedValueRangeType\">\n    <xs:all>\n      <xs:element name=\"minimum\" type=\"xs:decimal\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"maximum\" type=\"xs:decimal\" minOccurs=\"1\" maxOccurs=\"1\" />\n      <xs:element name=\"step\" type=\"xs:decimal\" minOccurs=\"0\" maxOccurs=\"1\" />\n    </xs:all>\n  </xs:complexType>\n\n</xs:schema>\n"
  },
  {
    "path": "ouimeaux/device/bridge.py",
    "content": "from ouimeaux.device import Device\n\nfrom xml.etree import ElementTree as et\n\n\nclass Bridge(Device):\n    Lights = {}\n    Groups = {}\n\n    def __repr__(self):\n        self.bridge_get_lights()\n        self.bridge_get_groups()\n        return '<WeMo Bridge \"{name}\", Lights: {LightCount}, Groups: {GroupCount}>'.format(name=self.name, LightCount=len(self.Lights), GroupCount=len(self.Groups))\n\n    def bridge_get_lights(self):\n        UDN = self.basicevent.GetMacAddr().get('PluginUDN')\n        endDevices = self.bridge.GetEndDevices(DevUDN=UDN,ReqListType='PAIRED_LIST')\n        endDeviceList = et.fromstring(endDevices.get('DeviceLists'))\n\n        for light in endDeviceList.iter('DeviceInfo'):\n            if self.light_name(light) in self.Lights:\n                pass\n            else:\n                self.Lights[self.light_name(light)] = light\n        return self.Lights\n\n    def bridge_get_groups(self):\n        UDN = self.basicevent.GetMacAddr().get('PluginUDN')\n        endDevices = self.bridge.GetEndDevices(DevUDN=UDN,ReqListType='PAIRED_LIST')\n        endDeviceList = et.fromstring(endDevices.get('DeviceLists'))\n\n        for group in endDeviceList.iter('GroupInfo'):\n            if self.group_name(group) in self.Groups:\n                pass\n            else:\n                self.Groups[self.group_name(group)] = group\n        return self.Groups\n\n    def light_attributes(self, light):\n        return {\n            'devIndex' : light.find('DeviceIndex').text,\n            'devID' : light.find('DeviceID').text,\n            'name' : light.find('FriendlyName').text,\n            'iconvalue' : light.find('IconVersion').text,\n            'firmware' : light.find('FirmwareVersion').text,\n            'capabilities' : light.find('CapabilityIDs').text,\n            'state' : light.find('CurrentState').text,\n            'manufacturer' : light.find('Manufacturer').text,\n            'model' : light.find('ModelCode').text,\n            'certified' : light.find('WeMoCertified').text\n        }\n\n    def group_attributes(self, group):\n        return {\n            'GroupID' : group.find('GroupID').text,\n            'name' : group.find('GroupName').text,\n            'capabilities' : group.find('GroupCapabilityIDs').text,\n            'state': group.find('GroupCapabilityValues').text\n        }\n\n    def light_name(self, light):\n        return self.light_attributes(light).get('name')\n\n    def group_name(self, group):\n        return self.group_attributes(group).get('name')\n\n    def light_get_id(self, light):\n        return self.light_attributes(light).get('devID')\n\n    def group_get_id(self, group):\n        return self.group_attributes(group).get('GroupID')\n\n    def light_get_state(self, light):\n        attr = self.light_attributes(light).get('state').split(':', 1)[0].split(',')\n        state = attr[0] # 0 (off) or 1 (on)\n        dim = attr[1]   # 0-255 dark to bright\n        return {\n            'state' : state,\n            'dim' : dim\n        }\n\n    def group_get_state(self, group):\n        attr = self.group_attributes(group).get('state').split(':', 1)[0].split(',')\n        state = attr[0] # 0 (off) or 1 (on)\n        dim = attr[1]   # 0-255 dark to bright\n        return {\n            'state' : state,\n            'dim' : dim\n        }\n\n    # Specify either a state or dim - not both. When specifying dim you can also specify a transition duration to dim across.\n    # This resolves issues that appear to have been caused by a firmware update ~ mid 2016.\n    # Details at https://github.com/iancmcc/ouimeaux/issues/132.\n    def light_set_state(self, light, state=None, dim=None, transition_duration=0):\n        if not state == None:\n            sendState = '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;DeviceStatus&gt;&lt;IsGroupAction&gt;NO&lt;/IsGroupAction&gt;&lt;DeviceID available=&quot;YES&quot;&gt;{devID}&lt;/DeviceID&gt;&lt;CapabilityID&gt;10006&lt;/CapabilityID&gt;&lt;CapabilityValue&gt;{state}&lt;/CapabilityValue&gt;&lt;/DeviceStatus&gt;'.format(devID=self.light_get_id(light),state=state)\n        elif not dim == None:\n            sendState = '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;DeviceStatus&gt;&lt;IsGroupAction&gt;NO&lt;/IsGroupAction&gt;&lt;DeviceID available=&quot;YES&quot;&gt;{devID}&lt;/DeviceID&gt;&lt;CapabilityID&gt;10008&lt;/CapabilityID&gt;&lt;CapabilityValue&gt;{dim}:{duration}&lt;/CapabilityValue&gt;&lt;/DeviceStatus&gt;'.format(devID=self.light_get_id(light),dim=dim,duration=transition_duration)\n\n        return self.bridge.SetDeviceStatus(DeviceStatusList=sendState)\n\n    def group_set_state(self, group, state=None, dim=None):\n        if state == None:\n            state = self.group_get_state(group).get('state')\n        if dim == None:\n            dim = self.group_get_state(group).get('dim')\n\n        sendState = '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;DeviceStatus&gt;&lt;IsGroupAction&gt;YES&lt;/IsGroupAction&gt;&lt;DeviceID available=&quot;YES&quot;&gt;{groupID}&lt;/DeviceID&gt;&lt;CapabilityID&gt;10006&lt;/CapabilityID&gt;&lt;CapabilityValue&gt;{state}&lt;/CapabilityValue&gt;&lt;CapabilityID&gt;10008&lt;/CapabilityID&gt;&lt;CapabilityValue&gt;{dim}&lt;/CapabilityValue&gt;&lt;/DeviceStatus&gt;'.format(groupID=self.group_get_id(group),state=state,dim=dim)\n\n        return self.bridge.SetDeviceStatus(DeviceStatusList=sendState)\n"
  },
  {
    "path": "ouimeaux/device/insight.py",
    "content": "from datetime import datetime\nfrom .switch import Switch\n\nclass Insight(Switch):\n\n    def __repr__(self):\n        return '<WeMo Insight \"{name}\">'.format(name=self.name)\n\n    @property\n    def insight_params(self):\n        params = self.insight.GetInsightParams().get('InsightParams')\n        (\n            state,  # 0 if off, 1 if on, 8 if on but load is off\n            lastchange,\n            onfor,  # seconds\n            ontoday,  # seconds\n            ontotal,  # seconds\n            timeperiod,  # The period over which averages are calculated\n            _x,  # This one is always 19 for me; what is it?\n            currentmw,\n            todaymw,\n            totalmw,\n            powerthreshold\n        ) = params.split('|')\n        return {'state': state,\n                'lastchange': datetime.fromtimestamp(int(lastchange)),\n                'onfor': int(onfor),\n                'ontoday': int(ontoday),\n                'ontotal': int(ontotal),\n                'todaymw': int(float(todaymw)),\n                'totalmw': int(float(totalmw)),\n                'currentpower': int(float(currentmw))}\n\n    @property\n    def today_kwh(self):\n        return self.insight_params['todaymw'] * 1.6666667e-8\n\n    @property\n    def current_power(self):\n        \"\"\"\n        Returns the current power usage in mW.\n        \"\"\"\n        return self.insight_params['currentpower']\n\n    @property\n    def today_on_time(self):\n        return self.insight_params['ontoday']\n\n    @property\n    def on_for(self):\n        return self.insight_params['onfor']\n\n    @property\n    def last_change(self):\n        return self.insight_params['lastchange']\n\n    @property\n    def today_standby_time(self):\n        return self.insight_params['ontoday']\n\n    @property\n    def ontotal(self):\n        return self.insight_params['ontotal']\n\n    @property\n    def totalmw(self):\n        return self.insight_params['totalmw']\n"
  },
  {
    "path": "ouimeaux/device/lightswitch.py",
    "content": "from .switch import Switch\n\nclass LightSwitch(Switch):\n\n    def __repr__(self):\n        return '<WeMo LightSwitch \"{name}\">'.format(name=self.name)\n"
  },
  {
    "path": "ouimeaux/device/maker.py",
    "content": "from datetime import datetime\nfrom ouimeaux.device import Device\nfrom xml.etree import ElementTree as et\n\n\nclass Maker(Device):\n\n    def __repr__(self):\n        return '<WeMo Maker \"{name}\">'.format(name=self.name)\n\n    def get_state(self, force_update=False):\n        \"\"\"\n        Returns 0 if off and 1 if on.\n        \"\"\"\n        # The base implementation using GetBinaryState doesn't work for Maker (always returns 0).\n        # So pull the switch state from the atrributes instead\n        if force_update or self._state is None:\n            return(int(self.maker_attribs.get('switchstate',0)))\n        return self._state\n\n    def set_state(self, state):\n        \"\"\"\n        Set the state of this device to on or off.\n        \"\"\"\n        self.basicevent.SetBinaryState(BinaryState=int(state))\n        self._state = int(state)\n\n    def off(self):\n        \"\"\"\n        Turn this device off. If already off, will return \"Error\".\n        \"\"\"\n        return self.set_state(0)\n\n    def on(self):\n        \"\"\"\n        Turn this device on. If already on, will return \"Error\".\n        \"\"\"\n        return self.set_state(1)\n\n    @property\n    def maker_attribs(self):\n        makerresp = self.deviceevent.GetAttributes().get('attributeList')\n        makerresp = \"<attributes>\" + makerresp + \"</attributes>\"\n        makerresp = makerresp.replace(\"&gt;\",\">\")\n        makerresp = makerresp.replace(\"&lt;\",\"<\")\n        attributes = et.fromstring(makerresp)\n        for attribute in attributes:\n            if attribute[0].text == \"Switch\":\n              switchstate = attribute[1].text\n            elif attribute[0].text == \"Sensor\":\n              sensorstate = attribute[1].text\n            elif attribute[0].text == \"SwitchMode\":\n            \tswitchmode = attribute[1].text\n            elif attribute[0].text == \"SensorPresent\":\n            \thassensor = attribute[1].text\n        return { 'switchstate' : int(switchstate),\n             'sensorstate' : int(sensorstate),\n        \t\t 'switchmode' : int(switchmode),\n        \t\t 'hassensor' : int(hassensor)}\n\n    @property\n    def switch_state(self):\n        return self.maker_attribs['switchstate']\n\n    @property\n    def sensor_state(self):\n        return self.maker_attribs['sensorstate']\n\n    @property\n    def switch_mode(self):\n    \treturn self.maker_attribs['switchmode']\n\n    @property\n    def has_sensor(self):\n    \treturn self.maker_attribs['hassensor']\n"
  },
  {
    "path": "ouimeaux/device/motion.py",
    "content": "from ouimeaux.device import Device\n\nclass Motion(Device):\n\n    def __repr__(self):\n        return '<WeMo Motion \"{name}\">'.format(name=self.name)\n"
  },
  {
    "path": "ouimeaux/device/switch.py",
    "content": "import gevent\n\nfrom ouimeaux.device import Device\n\n\nclass Switch(Device):\n\n    def set_state(self, state):\n        \"\"\"\n        Set the state of this device to on or off.\n        \"\"\"\n        self.basicevent.SetBinaryState(BinaryState=int(state))\n        self._state = int(state)\n\n    def off(self):\n        \"\"\"\n        Turn this device off. If already off, will return \"Error\".\n        \"\"\"\n        return self.set_state(0)\n\n    def on(self):\n        \"\"\"\n        Turn this device on. If already on, will return \"Error\".\n        \"\"\"\n        return self.set_state(1)\n\n    def toggle(self):\n        \"\"\"\n        Toggle the switch's state.\n        \"\"\"\n        return self.set_state(not self.get_state())\n\n    def blink(self, delay=1):\n        \"\"\"\n        Toggle the switch once, then again after a delay (in seconds).\n        \"\"\"\n        self.toggle()\n        gevent.spawn_later(delay, self.toggle)\n\n    def __repr__(self):\n        return '<WeMo Switch \"{name}\">'.format(name=self.name)\n"
  },
  {
    "path": "ouimeaux/discovery.py",
    "content": "import logging\n\nimport gevent\nfrom gevent import socket\nfrom gevent.server import DatagramServer\n\nfrom ouimeaux.utils import get_ip_address\nfrom ouimeaux.pysignals import receiver\nfrom ouimeaux.signals import discovered\n\n\nlog = logging.getLogger(__name__)\n\n\nclass UPnPLoopbackException(Exception):\n    \"\"\"\n    Using loopback interface as callback IP.\n    \"\"\"\n\n\nclass UPnP(object):\n    \"\"\"\n    Makes M-SEARCH requests, filters out non-WeMo responses, and dispatches\n    signals with the results.\n    \"\"\"\n    def __init__(self, mcast_ip='239.255.255.250', mcast_port=1900, bind=None):\n        if bind is None:\n            host = get_ip_address()\n            if host.startswith('127.'):\n                raise UPnPLoopbackException(\"Using %s as a callback IP for \"\n                                            \"discovery will not be successful.\")\n            port = 54321\n            bind = '{0}:{1}'.format(host, port)\n        self.bind = bind\n        self.mcast_ip = mcast_ip\n        self.mcast_port = mcast_port\n        self.clients = {}\n\n    def _response_received(self, message, address):\n        log.debug(\"Received a response from {0}:{1}\".format(*address))\n        lines = [x.decode() for x in message.splitlines()]\n        lines.pop(0) # HTTP status\n        headers = {}\n        for line in lines:\n            try:\n                header, value = line.split(\":\", 1)\n                headers[header.lower()] = value.strip()\n            except ValueError:\n                continue\n        if (headers.get('x-user-agent', None) == 'redsonic'):\n            location=headers.get('location',None)\n            if location is not None and location not in self.clients:\n                log.debug(\"Found WeMo at {0}\".format(location))\n                self.clients[location] = headers\n                gevent.spawn(discovered.send, self, address=address,\n                        headers=headers)\n\n    @property\n    def server(self):\n        \"\"\"\n        UDP server to listen for responses.\n        \"\"\"\n        server = getattr(self, \"_server\", None)\n        if server is None:\n            log.debug(\"Binding datagram server to %s\", self.bind)\n            server = DatagramServer(self.bind, self._response_received)\n            self._server = server\n        return server\n\n    def broadcast(self):\n        \"\"\"\n        Send a multicast M-SEARCH request asking for devices to report in.\n        \"\"\"\n        log.debug(\"Broadcasting M-SEARCH to %s:%s\", self.mcast_ip, self.mcast_port)\n        request = '\\r\\n'.join((\"M-SEARCH * HTTP/1.1\",\n                               \"HOST:{mcast_ip}:{mcast_port}\",\n                               \"ST:upnp:rootdevice\",\n                               \"MX:2\",\n                               'MAN:\"ssdp:discover\"',\n                               \"\", \"\")).format(**self.__dict__)\n        self.server.sendto(request.encode(), (self.mcast_ip, self.mcast_port))\n\n\ndef test():\n    logging.basicConfig(level=logging.DEBUG)\n\n    @receiver(discovered)\n    def handler(sender, **kwargs):\n        print(\"I GOT ONE\")\n        print(kwargs['address'], kwargs['headers'])\n\n    upnp = UPnP()\n    upnp.server.set_spawn(1)\n    upnp.server.start()\n    log.debug(\"Started server, listening for responses\")\n    with gevent.Timeout(2, KeyboardInterrupt):\n        while True:\n            try:\n                upnp.broadcast()\n                gevent.sleep(2)\n            except KeyboardInterrupt:\n                break\n\n\nif __name__ == \"__main__\":\n    test()\n"
  },
  {
    "path": "ouimeaux/environment.py",
    "content": "import logging\n\nimport gevent\nimport requests\n\nfrom ouimeaux.config import WemoConfiguration\nfrom ouimeaux.device import DeviceUnreachable\nfrom ouimeaux.device.switch import Switch\nfrom ouimeaux.device.insight import Insight\nfrom ouimeaux.device.maker import Maker\nfrom ouimeaux.device.lightswitch import LightSwitch\nfrom ouimeaux.device.motion import Motion\nfrom ouimeaux.device.bridge import Bridge\nfrom ouimeaux.discovery import UPnP\nfrom ouimeaux.signals import discovered, devicefound\nfrom ouimeaux.subscribe import SubscriptionRegistry\nfrom ouimeaux.utils import matcher\n\n\n_MARKER = object()\n_NOOP = lambda *x: None\nlog = logging.getLogger(__name__)\n\nreqlog = logging.getLogger(\"requests\")\nreqlog.disabled = True\n\n\nclass StopBroadcasting(Exception):\n    pass\n\n\nclass UnknownDevice(Exception):\n    pass\n\nclass Environment(object):\n    def __init__(self, switch_callback=_NOOP, motion_callback=_NOOP, bridge_callback=_NOOP,\n                 maker_callback=_NOOP, with_discovery=True, with_subscribers=True, with_cache=_MARKER, \n                 bind=None, config_filename=None):\n        \"\"\"\n        Create a WeMo environment.\n\n        @param switch_callback: A function to be called when a new switch is\n                                discovered.\n        @type switch_callback:  function\n        @param motion_callback: A function to be called when a new motion is\n                                discovered.\n        @type motion_callback:  function\n        @param with_subscribers: Whether to register for events with discovered\n                                devices.\n        @type with_subscribers: bool\n        @param bind: ip:port to which to bind the response server.\n        @type bind: str\n        \"\"\"\n        if with_cache is not _MARKER:\n            log.warn(\"with_cache argument is deprecated (and nonfunctional)\")\n        self._config = WemoConfiguration(filename=config_filename)\n        self.upnp = UPnP(bind=bind or self._config.bind)\n        discovered.connect(self._found_device, self.upnp)\n        self.registry = SubscriptionRegistry()\n        self._with_discovery = with_discovery\n        self._with_subscribers = with_subscribers\n        self._switch_callback = switch_callback\n        self._motion_callback = motion_callback\n        self._bridge_callback = bridge_callback\n        self._maker_callback = maker_callback\n        self._switches = {}\n        self._motions = {}\n        self._bridges = {}\n        self._makers = {}\n        self.devices = {}\n\n    def __iter__(self):\n        return self.devices.itervalues()\n\n    def start(self):\n        \"\"\"\n        Start the server(s) necessary to receive information from devices.\n        \"\"\"\n        if self._with_discovery:\n            # Start the server to listen to new devices\n            self.upnp.server.set_spawn(2)\n            self.upnp.server.start()\n        if self._with_subscribers:\n            # Start the server to listen to events\n            self.registry.server.set_spawn(2)\n            self.registry.server.start()\n\n    def wait(self, timeout=None):\n        \"\"\"\n        Wait for events.\n        \"\"\"\n        try:\n            if timeout:\n                gevent.sleep(timeout)\n            else:\n                while True:\n                    gevent.sleep(1000)\n        except (KeyboardInterrupt, SystemExit, Exception):\n            pass\n\n    def discover(self, seconds=2):\n        \"\"\"\n        Discover devices in the environment.\n\n        @param seconds: Number of seconds to broadcast requests.\n        @type seconds: int\n        \"\"\"\n        log.info(\"Discovering devices\")\n        with gevent.Timeout(seconds, StopBroadcasting) as timeout:\n            try:\n                try:\n                    while True:\n                        self.upnp.broadcast()\n                        gevent.sleep(1)\n                except Exception as e:\n                    raise StopBroadcasting(e)\n            except StopBroadcasting:\n                return\n\n    def _found_device(self, sender, **kwargs):\n        address = kwargs['address']\n        headers = kwargs['headers']\n        usn = headers['usn']\n        if usn.startswith('uuid:Socket'):\n            klass = Switch\n        elif usn.startswith('uuid:Lightswitch'):\n            klass = LightSwitch\n        elif usn.startswith('uuid:Insight'):\n            klass = Insight\n        elif usn.startswith('uuid:Sensor'):\n            klass = Motion\n        elif usn.startswith('uuid:Bridge'):\n            klass = Bridge\n        elif usn.startswith('uuid:Maker'):\n        \tklass = Maker\n        else:\n            log.info(\"Unrecognized device type. USN={0}\".format(usn))\n            return\n        device = klass(headers['location'])\n        log.info(\"Found device %r at %s\" % (device, address))\n        self._process_device(device)\n\n    def _process_device(self, device):\n        if isinstance(device, Switch):\n            callback = self._switch_callback\n            registry = self._switches\n        elif isinstance(device, Motion):\n            callback = self._motion_callback\n            registry = self._motions\n        elif isinstance(device, Bridge):\n            callback = self._bridge_callback\n            registry = self._bridges\n            for light in device.Lights:\n                log.info(\"Found light \\\"%s\\\" connected to \\\"%s\\\"\" % (light, device.name))\n            for group in device.Groups:\n                log.info(\"Found group \\\"%s\\\" connected to \\\"%s\\\"\" % (group, device.name))\n        elif isinstance(device, Maker):\n            callback = self._maker_callback\n            registry = self._makers\n        else:\n            return\n        self.devices[device.name] = device\n        registry[device.name] = device\n        if self._with_subscribers:\n            self.registry.register(device)\n            self.registry.on(device, 'BinaryState',\n                             device._update_state)\n        try:\n            if isinstance(device, Bridge):\n                pass\n            else:\n                device.ping()\n        except DeviceUnreachable:\n            return\n        devicefound.send(device)\n        callback(device)\n\n    def list_switches(self):\n        \"\"\"\n        List switches discovered in the environment.\n        \"\"\"\n        return self._switches.keys()\n\n    def list_motions(self):\n        \"\"\"\n        List motions discovered in the environment.\n        \"\"\"\n        return self._motions.keys()\n        \n    def list_makers(self):\n        \"\"\"\n        List makers discovered in the environment.\n        \"\"\"\n        return self._makers.keys()\n\n    def list_bridges(self):\n        \"\"\"\n        List bridges discovered in the environment.\n        \"\"\"\n        return self._bridges.keys()\n\n    def get(self, name):\n        alias = self._config.aliases.get(name)\n        if alias:\n            matches = lambda x: x == alias\n        elif name:\n            matches = matcher(name)\n        else:\n            matches = _NOOP\n        for k in self.devices:\n            if matches(k):\n                return self.devices[k]\n        else:\n            raise UnknownDevice(name)\n\n    def get_switch(self, name):\n        \"\"\"\n        Get a switch by name.\n        \"\"\"\n        try:\n            return self._switches[name]\n        except KeyError:\n            raise UnknownDevice(name)\n\n    def get_motion(self, name):\n        \"\"\"\n        Get a motion by name.\n        \"\"\"\n        try:\n            return self._motions[name]\n        except KeyError:\n            raise UnknownDevice(name)\n\n    def get_bridge(self, name):\n        \"\"\"\n        Get a bridge by name.\n        \"\"\"\n        try:\n            return self._bridges[name]\n        except KeyError:\n            raise UnknownDevice(name)\n\n    def get_maker(self, name):\n        \"\"\"\n        Get a maker by name.\n        \"\"\"\n        try:\n            return self._makers[name]\n        except KeyError:\n            raise UnknownDevice(name)\n\n\nif __name__ == \"__main__\":\n    # Use with python -i\n    environment = Environment()\n"
  },
  {
    "path": "ouimeaux/examples/Randomize.py",
    "content": "\nimport random\nimport datetime\nimport time\nimport ouimeaux\nfrom ouimeaux.environment import Environment\n\n# http://pydoc.net/Python/ouimeaux/0.7.3/ouimeaux.examples.watch/\nif __name__ == \"__main__\":\n    print(\"\")\n    print(\"WeMo Randomizer\")\n    print(\"---------------\")\n    env = Environment()\n    # TODO: run from 10am to 10pm\n    try:\n        env.start()\n        env.discover(100)\n        print(env.list_switches())\n        print(env.list_motions())\n        print(\"---------------\")\n        while True:\n            # http://stackoverflow.com/questions/306400/how-do-i-randomly-select-an-item-from-a-list-using-python\n            switchRND = env.get_switch( random.choice( env.list_switches() ) )\n            print(switchRND)\n            switchRND.toggle()\n            env.wait( random.randint(20,50) )\n        \n    except (KeyboardInterrupt, SystemExit):\n        print(\"---------------\")\n        print(\"Goodbye!\")\n        print(\"---------------\")\n        # Turn off all switches\n        for switch in ( env.list_switches() ):\n            print(\"Turning Off: \" + switch)\n            env.get_switch( switch ).off()\n"
  },
  {
    "path": "ouimeaux/examples/__init__.py",
    "content": ""
  },
  {
    "path": "ouimeaux/examples/watch.py",
    "content": "#!/usr/bin/env python\nimport argparse\nimport sys\n\nfrom ouimeaux.environment import Environment\nfrom ouimeaux.utils import matcher\nfrom ouimeaux.signals import receiver, statechange, devicefound\n\n\ndef mainloop(name):\n    matches = matcher(name)\n\n    @receiver(devicefound)\n    def found(sender, **kwargs):\n        if matches(sender.name):\n            print(\"Found device:\", sender.name)\n\n    @receiver(statechange)\n    def motion(sender, **kwargs):\n        if matches(sender.name):\n            print(\"{} state is {state}\".format(\n                sender.name, state=\"on\" if kwargs.get('state') else \"off\"))\n\n    env = Environment()\n    try:\n        env.start()\n        env.discover(10)\n        env.wait()\n    except (KeyboardInterrupt, SystemExit):\n        print(\"Goodbye!\")\n        sys.exit(0)\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(\"Motion notifier\")\n    parser.add_argument(\"name\", metavar=\"NAME\",\n                        help=\"Name (fuzzy matchable)\"\n                             \" of the Motion to detect\")\n    args = parser.parse_args()\n    mainloop(args.name)\n"
  },
  {
    "path": "ouimeaux/pysignals/LICENSE.txt",
    "content": "pysignals was originally forked from django.dispatch.\n\nCopyright (c) Django Software Foundation and individual contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice, \n       this list of conditions and the following disclaimer.\n    \n    2. Redistributions in binary form must reproduce the above copyright \n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    3. Neither the name of Django nor the names of its contributors may be used\n       to endorse or promote products derived from this software without\n       specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n\ndjango.dispatch was originally forked from PyDispatcher.\n\nPyDispatcher License:\n\n    Copyright (c) 2001-2003, Patrick K. O'Brien and Contributors\n    All rights reserved.\n    \n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    \n        Redistributions of source code must retain the above copyright\n        notice, this list of conditions and the following disclaimer.\n    \n        Redistributions in binary form must reproduce the above\n        copyright notice, this list of conditions and the following\n        disclaimer in the documentation and/or other materials\n        provided with the distribution.\n    \n        The name of Patrick K. O'Brien, or the name of any Contributor,\n        may not be used to endorse or promote products derived from this \n        software without specific prior written permission.\n    \n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n    COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n    OF THE POSSIBILITY OF SUCH DAMAGE. \n\n"
  },
  {
    "path": "ouimeaux/pysignals/__init__.py",
    "content": "\"\"\"Multi-consumer multi-producer dispatching mechanism\n\nOriginally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1\nSee license.txt for original license.\n\nHeavily modified for Django's purposes.\n\"\"\"\n\nfrom .dispatcher import Signal, StateChange, receiver  # NOQA\n"
  },
  {
    "path": "ouimeaux/pysignals/dispatcher.py",
    "content": "from __future__ import absolute_import\n\nimport sys\nimport threading\nimport weakref\n\nimport logging\n\nfrom future.builtins import range\nimport six\nfrom .inspect import func_accepts_kwargs\n\nif six.PY2:\n    from .weakref_backports import WeakMethod\nelse:\n    from weakref import WeakMethod\n\n\npysignals_debug = False\n\n\ndef set_debug( val ):\n    pysignals_debug = val\n\n\ndef _make_id(target):\n    if hasattr(target, '__func__'):\n        return (id(target.__self__), id(target.__func__))\n    return id(target)\nNONE_ID = _make_id(None)\n\n# A marker for caching\nNO_RECEIVERS = object()\n\n\nclass Signal(object):\n    \"\"\"\n    Base class for all signals\n\n    Internal attributes:\n\n        receivers\n            { receiverkey (id) : weakref(receiver) }\n    \"\"\"\n    def __init__(self, providing_args=None, use_caching=False):\n        \"\"\"\n        Create a new signal.\n\n        providing_args\n            A list of the arguments this signal can pass along in a send() call.\n        \"\"\"\n        self.receivers = []\n        if providing_args is None:\n            providing_args = []\n        self.providing_args = set(providing_args)\n        self.lock = threading.Lock()\n        self.use_caching = use_caching\n        # For convenience we create empty caches even if they are not used.\n        # A note about caching: if use_caching is defined, then for each\n        # distinct sender we cache the receivers that sender has in\n        # 'sender_receivers_cache'. The cache is cleaned when .connect() or\n        # .disconnect() is called and populated on send().\n        self.sender_receivers_cache = weakref.WeakKeyDictionary() if use_caching else {}\n        self._dead_receivers = False\n\n    def connect(self, receiver, sender=None, weak=True, dispatch_uid=None):\n        \"\"\"\n        Connect receiver to sender for signal.\n\n        Arguments:\n\n            receiver\n                A function or an instance method which is to receive signals.\n                Receivers must be hashable objects.\n\n                If weak is True, then receiver must be weak referenceable.\n\n                Receivers must be able to accept keyword arguments.\n\n                If a receiver is connected with a dispatch_uid argument, it\n                will not be added if another receiver was already connected\n                with that dispatch_uid.\n\n            sender\n                The sender to which the receiver should respond. Must either be\n                of type Signal, or None to receive events from any sender.\n\n            weak\n                Whether to use weak references to the receiver. By default, the\n                module will attempt to use weak references to the receiver\n                objects. If this parameter is false, then strong references will\n                be used.\n\n            dispatch_uid\n                An identifier used to uniquely identify a particular instance of\n                a receiver. This will usually be a string, though it may be\n                anything hashable.\n        \"\"\"\n        #from django.conf import settings\n\n        # If DEBUG is on, check that we got a good receiver\n        if pysignals_debug:\n            import inspect\n            assert callable(receiver), \"Signal receivers must be callable.\"\n\n            # Check for **kwargs\n            if not func_accepts_kwargs(receiver):\n                raise ValueError(\"Signal receivers must accept keyword arguments (**kwargs).\")\n\n        if dispatch_uid:\n            lookup_key = (dispatch_uid, _make_id(sender))\n        else:\n            lookup_key = (_make_id(receiver), _make_id(sender))\n\n        if weak:\n            ref = weakref.ref\n            receiver_object = receiver\n            # Check for bound methods\n            if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'):\n                ref = WeakMethod\n                receiver_object = receiver.__self__\n            if six.PY3:\n                receiver = ref(receiver)\n                weakref.finalize(receiver_object, self._remove_receiver)\n            else:\n                receiver = ref(receiver, self._remove_receiver)\n\n        with self.lock:\n            self._clear_dead_receivers()\n            for r_key, _ in self.receivers:\n                if r_key == lookup_key:\n                    break\n            else:\n                self.receivers.append((lookup_key, receiver))\n            self.sender_receivers_cache.clear()\n\n    def disconnect(self, receiver=None, sender=None, weak=None, dispatch_uid=None):\n        \"\"\"\n        Disconnect receiver from sender for signal.\n\n        If weak references are used, disconnect need not be called. The receiver\n        will be remove from dispatch automatically.\n\n        Arguments:\n\n            receiver\n                The registered receiver to disconnect. May be none if\n                dispatch_uid is specified.\n\n            sender\n                The registered sender to disconnect\n\n            dispatch_uid\n                the unique identifier of the receiver to disconnect\n        \"\"\"\n        if weak is not None:\n            logging.WARNING(\"Passing `weak` to disconnect has no effect.\")\n        if dispatch_uid:\n            lookup_key = (dispatch_uid, _make_id(sender))\n        else:\n            lookup_key = (_make_id(receiver), _make_id(sender))\n\n        disconnected = False\n        with self.lock:\n            self._clear_dead_receivers()\n            for index in range(len(self.receivers)):\n                (r_key, _) = self.receivers[index]\n                if r_key == lookup_key:\n                    disconnected = True\n                    del self.receivers[index]\n                    break\n            self.sender_receivers_cache.clear()\n        return disconnected\n\n    def has_listeners(self, sender=None):\n        return bool(self._live_receivers(sender))\n\n    def send(self, sender, **named):\n        \"\"\"\n        Send signal from sender to all connected receivers.\n\n        If any receiver raises an error, the error propagates back through send,\n        terminating the dispatch loop. So it's possible that all receivers\n        won't be called if an error is raised.\n\n        Arguments:\n\n            sender\n                The sender of the signal. Either a specific object or None.\n\n            named\n                Named arguments which will be passed to receivers.\n\n        Returns a list of tuple pairs [(receiver, response), ... ].\n        \"\"\"\n        responses = []\n        if not self.receivers or self.sender_receivers_cache.get(sender) is NO_RECEIVERS:\n            return responses\n\n        for receiver in self._live_receivers(sender):\n            response = receiver(signal=self, sender=sender, **named)\n            responses.append((receiver, response))\n        return responses\n\n    def send_robust(self, sender, **named):\n        \"\"\"\n        Send signal from sender to all connected receivers catching errors.\n\n        Arguments:\n\n            sender\n                The sender of the signal. Can be any python object (normally one\n                registered with a connect if you actually want something to\n                occur).\n\n            named\n                Named arguments which will be passed to receivers. These\n                arguments must be a subset of the argument names defined in\n                providing_args.\n\n        Return a list of tuple pairs [(receiver, response), ... ]. May raise\n        DispatcherKeyError.\n\n        If any receiver raises an error (specifically any subclass of\n        Exception), the error instance is returned as the result for that\n        receiver. The traceback is always attached to the error at\n        ``__traceback__``.\n        \"\"\"\n        responses = []\n        if not self.receivers or self.sender_receivers_cache.get(sender) is NO_RECEIVERS:\n            return responses\n\n        # Call each receiver with whatever arguments it can accept.\n        # Return a list of tuple pairs [(receiver, response), ... ].\n        for receiver in self._live_receivers(sender):\n            try:\n                response = receiver(signal=self, sender=sender, **named)\n            except Exception as err:\n                if not hasattr(err, '__traceback__'):\n                    err.__traceback__ = sys.exc_info()[2]\n                responses.append((receiver, err))\n            else:\n                responses.append((receiver, response))\n        return responses\n\n    def _clear_dead_receivers(self):\n        # Note: caller is assumed to hold self.lock.\n        if self._dead_receivers:\n            self._dead_receivers = False\n            new_receivers = []\n            for r in self.receivers:\n                if isinstance(r[1], weakref.ReferenceType) and r[1]() is None:\n                    continue\n                new_receivers.append(r)\n            self.receivers = new_receivers\n\n    def _live_receivers(self, sender):\n        \"\"\"\n        Filter sequence of receivers to get resolved, live receivers.\n\n        This checks for weak references and resolves them, then returning only\n        live receivers.\n        \"\"\"\n        receivers = None\n        if self.use_caching and not self._dead_receivers:\n            receivers = self.sender_receivers_cache.get(sender)\n            # We could end up here with NO_RECEIVERS even if we do check this case in\n            # .send() prior to calling _live_receivers() due to concurrent .send() call.\n            if receivers is NO_RECEIVERS:\n                return []\n        if receivers is None:\n            with self.lock:\n                self._clear_dead_receivers()\n                senderkey = _make_id(sender)\n                receivers = []\n                for (receiverkey, r_senderkey), receiver in self.receivers:\n                    if r_senderkey == NONE_ID or r_senderkey == senderkey:\n                        receivers.append(receiver)\n                if self.use_caching:\n                    if not receivers:\n                        self.sender_receivers_cache[sender] = NO_RECEIVERS\n                    else:\n                        # Note, we must cache the weakref versions.\n                        self.sender_receivers_cache[sender] = receivers\n        non_weak_receivers = []\n        for receiver in receivers:\n            if isinstance(receiver, weakref.ReferenceType):\n                # Dereference the weak reference.\n                receiver = receiver()\n                if receiver is not None:\n                    non_weak_receivers.append(receiver)\n            else:\n                non_weak_receivers.append(receiver)\n        return non_weak_receivers\n\n    def _remove_receiver(self, receiver=None):\n        # Mark that the self.receivers list has dead weakrefs. If so, we will\n        # clean those up in connect, disconnect and _live_receivers while\n        # holding self.lock. Note that doing the cleanup here isn't a good\n        # idea, _remove_receiver() will be called as side effect of garbage\n        # collection, and so the call can happen while we are already holding\n        # self.lock.\n        self._dead_receivers = True\n\n    def receive(self, **kwargs):\n        \"\"\"\n        A decorator for connecting receivers to this signal. Used by passing in the\n        keyword arguments to connect::\n\n            @post_save.receive(sender=MyModel)\n            def signal_receiver(sender, **kwargs):\n                ...\n\n        \"\"\"\n        def _decorator(func):\n            self.connect(func, **kwargs)\n            return func\n        return _decorator\n\n\nclass StateChange( Signal ):\n\n    def __init__(self, providing_args=None):\n        super(StateChange, self).__init__(providing_args)\n        self.sender_status = {}\n\n    def send(self, sender, **named):\n        \"\"\"\n        Send signal from sender to all connected receivers *only if* the signal's\n        contents has changed.\n\n        If any receiver raises an error, the error propagates back through send,\n        terminating the dispatch loop, so it is quite possible to not have all\n        receivers called if a raises an error.\n\n        Arguments:\n\n            sender\n                The sender of the signal Either a specific object or None.\n\n            named\n                Named arguments which will be passed to receivers.\n\n        Returns a list of tuple pairs [(receiver, response), ... ].\n        \"\"\"\n        responses = []\n        if not self.receivers:\n            return responses\n\n        sender_id = _make_id(sender)\n        if sender_id not in self.sender_status:\n            self.sender_status[sender_id] = {}\n\n        if self.sender_status[sender_id] == named:\n            return responses\n\n        self.sender_status[sender_id] = named\n\n        for receiver in self._live_receivers(sender_id):\n            response = receiver(signal=self, sender=sender, **named)\n            responses.append((receiver, response))\n        return responses\n\n\ndef receiver(signal, **kwargs):\n    \"\"\"\n    A decorator for connecting receivers to signals. Used by passing in the\n    signal (or list of signals) and keyword arguments to connect::\n\n        @receiver(post_save, sender=MyModel)\n        def signal_receiver(sender, **kwargs):\n            ...\n\n        @receiver([post_save, post_delete], sender=MyModel)\n        def signals_receiver(sender, **kwargs):\n            ...\n    \"\"\"\n    def _decorator(func):\n        if isinstance(signal, (list, tuple)):\n            for s in signal:\n                s.connect(func, **kwargs)\n        else:\n            signal.connect(func, **kwargs)\n        return func\n    return _decorator\n"
  },
  {
    "path": "ouimeaux/pysignals/inspect.py",
    "content": "from __future__ import absolute_import\n\nimport inspect\n\nimport six\n\n\ndef getargspec(func):\n    if six.PY2:\n        return inspect.getargspec(func)\n\n    sig = inspect.signature(func)\n    args = [\n        p.name for p in sig.parameters.values()\n        if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD\n    ]\n    varargs = [\n        p.name for p in sig.parameters.values()\n        if p.kind == inspect.Parameter.VAR_POSITIONAL\n    ]\n    varargs = varargs[0] if varargs else None\n    varkw = [\n        p.name for p in sig.parameters.values()\n        if p.kind == inspect.Parameter.VAR_KEYWORD\n    ]\n    varkw = varkw[0] if varkw else None\n    defaults = [\n        p.default for p in sig.parameters.values()\n        if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD and p.default is not p.empty\n    ] or None\n    return args, varargs, varkw, defaults\n\n\ndef get_func_args(func):\n    if six.PY2:\n        argspec = inspect.getargspec(func)\n        return argspec.args[1:]  # ignore 'self'\n\n    sig = inspect.signature(func)\n    return [\n        arg_name for arg_name, param in sig.parameters.items()\n        if param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD\n    ]\n\n\ndef get_func_full_args(func):\n    \"\"\"\n    Return a list of (argument name, default value) tuples. If the argument\n    does not have a default value, omit it in the tuple. Arguments such as\n    *args and **kwargs are also included.\n    \"\"\"\n    if six.PY2:\n        argspec = inspect.getargspec(func)\n        args = argspec.args[1:]  # ignore 'self'\n        defaults = argspec.defaults or []\n        # Split args into two lists depending on whether they have default value\n        no_default = args[:len(args) - len(defaults)]\n        with_default = args[len(args) - len(defaults):]\n        # Join the two lists and combine it with default values\n        args = [(arg,) for arg in no_default] + zip(with_default, defaults)\n        # Add possible *args and **kwargs and prepend them with '*' or '**'\n        varargs = [('*' + argspec.varargs,)] if argspec.varargs else []\n        kwargs = [('**' + argspec.keywords,)] if argspec.keywords else []\n        return args + varargs + kwargs\n\n    sig = inspect.signature(func)\n    args = []\n    for arg_name, param in sig.parameters.items():\n        name = arg_name\n        # Ignore 'self'\n        if name == 'self':\n            continue\n        if param.kind == inspect.Parameter.VAR_POSITIONAL:\n            name = '*' + name\n        elif param.kind == inspect.Parameter.VAR_KEYWORD:\n            name = '**' + name\n        if param.default != inspect.Parameter.empty:\n            args.append((name, param.default))\n        else:\n            args.append((name,))\n    return args\n\n\ndef func_accepts_kwargs(func):\n    if six.PY2:\n        # Not all callables are inspectable with getargspec, so we'll\n        # try a couple different ways but in the end fall back on assuming\n        # it is -- we don't want to prevent registration of valid but weird\n        # callables.\n        try:\n            argspec = inspect.getargspec(func)\n        except TypeError:\n            try:\n                argspec = inspect.getargspec(func.__call__)\n            except (TypeError, AttributeError):\n                argspec = None\n        return not argspec or argspec[2] is not None\n\n    return any(\n        p for p in inspect.signature(func).parameters.values()\n        if p.kind == p.VAR_KEYWORD\n    )\n\n\ndef func_accepts_var_args(func):\n    \"\"\"\n    Return True if function 'func' accepts positional arguments *args.\n    \"\"\"\n    if six.PY2:\n        return inspect.getargspec(func)[1] is not None\n\n    return any(\n        p for p in inspect.signature(func).parameters.values()\n        if p.kind == p.VAR_POSITIONAL\n    )\n\n\ndef func_has_no_args(func):\n    args = inspect.getargspec(func)[0] if six.PY2 else [\n        p for p in inspect.signature(func).parameters.values()\n        if p.kind == p.POSITIONAL_OR_KEYWORD\n    ]\n    return len(args) == 1\n\n\ndef func_supports_parameter(func, parameter):\n    if six.PY3:\n        return parameter in inspect.signature(func).parameters\n    else:\n        args, varargs, varkw, defaults = inspect.getargspec(func)\n        return parameter in args\n"
  },
  {
    "path": "ouimeaux/pysignals/license.python.txt",
    "content": "A. HISTORY OF THE SOFTWARE\n==========================\n\nPython was created in the early 1990s by Guido van Rossum at Stichting\nMathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands\nas a successor of a language called ABC.  Guido remains Python's\nprincipal author, although it includes many contributions from others.\n\nIn 1995, Guido continued his work on Python at the Corporation for\nNational Research Initiatives (CNRI, see http://www.cnri.reston.va.us)\nin Reston, Virginia where he released several versions of the\nsoftware.\n\nIn May 2000, Guido and the Python core development team moved to\nBeOpen.com to form the BeOpen PythonLabs team.  In October of the same\nyear, the PythonLabs team moved to Digital Creations (now Zope\nCorporation, see http://www.zope.com).  In 2001, the Python Software\nFoundation (PSF, see http://www.python.org/psf/) was formed, a\nnon-profit organization created specifically to own Python-related\nIntellectual Property.  Zope Corporation is a sponsoring member of\nthe PSF.\n\nAll Python releases are Open Source (see http://www.opensource.org for\nthe Open Source Definition).  Historically, most, but not all, Python\nreleases have also been GPL-compatible; the table below summarizes\nthe various releases.\n\n    Release         Derived     Year        Owner       GPL-\n                    from                                compatible? (1)\n\n    0.9.0 thru 1.2              1991-1995   CWI         yes\n    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes\n    1.6             1.5.2       2000        CNRI        no\n    2.0             1.6         2000        BeOpen.com  no\n    1.6.1           1.6         2001        CNRI        yes (2)\n    2.1             2.0+1.6.1   2001        PSF         no\n    2.0.1           2.0+1.6.1   2001        PSF         yes\n    2.1.1           2.1+2.0.1   2001        PSF         yes\n    2.1.2           2.1.1       2002        PSF         yes\n    2.1.3           2.1.2       2002        PSF         yes\n    2.2 and above   2.1.1       2001-now    PSF         yes\n\nFootnotes:\n\n(1) GPL-compatible doesn't mean that we're distributing Python under\n    the GPL.  All Python licenses, unlike the GPL, let you distribute\n    a modified version without making your changes open source.  The\n    GPL-compatible licenses make it possible to combine Python with\n    other software that is released under the GPL; the others don't.\n\n(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,\n    because its license has a choice of law clause.  According to\n    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1\n    is \"not incompatible\" with the GPL.\n\nThanks to the many outside volunteers who have worked under Guido's\ndirection to make these releases possible.\n\n\nB. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\n===============================================================\n\nPYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\n--------------------------------------------\n\n1. This LICENSE AGREEMENT is between the Python Software Foundation\n(\"PSF\"), and the Individual or Organization (\"Licensee\") accessing and\notherwise using this software (\"Python\") in source or binary form and\nits associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, PSF hereby\ngrants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,\nanalyze, test, perform and/or display publicly, prepare derivative works,\ndistribute, and otherwise use Python alone or in any derivative version,\nprovided, however, that PSF's License Agreement and PSF's notice of copyright,\ni.e., \"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014 Python Software Foundation; All Rights Reserved\" are retained\nin Python alone or in any derivative version prepared by Licensee.\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python.\n\n4. PSF is making Python available to Licensee on an \"AS IS\"\nbasis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\nFOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. Nothing in this License Agreement shall be deemed to create any\nrelationship of agency, partnership, or joint venture between PSF and\nLicensee.  This License Agreement does not grant permission to use PSF\ntrademarks or trade name in a trademark sense to endorse or promote\nproducts or services of Licensee, or any third party.\n\n8. By copying, installing or otherwise using Python, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nBEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\n-------------------------------------------\n\nBEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\n\n1. This LICENSE AGREEMENT is between BeOpen.com (\"BeOpen\"), having an\noffice at 160 Saratoga Avenue, Santa Clara, CA 95051, and the\nIndividual or Organization (\"Licensee\") accessing and otherwise using\nthis software in source or binary form and its associated\ndocumentation (\"the Software\").\n\n2. Subject to the terms and conditions of this BeOpen Python License\nAgreement, BeOpen hereby grants Licensee a non-exclusive,\nroyalty-free, world-wide license to reproduce, analyze, test, perform\nand/or display publicly, prepare derivative works, distribute, and\notherwise use the Software alone or in any derivative version,\nprovided, however, that the BeOpen Python License is retained in the\nSoftware, alone or in any derivative version prepared by Licensee.\n\n3. BeOpen is making the Software available to Licensee on an \"AS IS\"\nbasis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE\nSOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS\nAS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY\nDERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n5. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n6. This License Agreement shall be governed by and interpreted in all\nrespects by the law of the State of California, excluding conflict of\nlaw provisions.  Nothing in this License Agreement shall be deemed to\ncreate any relationship of agency, partnership, or joint venture\nbetween BeOpen and Licensee.  This License Agreement does not grant\npermission to use BeOpen trademarks or trade names in a trademark\nsense to endorse or promote products or services of Licensee, or any\nthird party.  As an exception, the \"BeOpen Python\" logos available at\nhttp://www.pythonlabs.com/logos.html may be used according to the\npermissions granted on that web page.\n\n7. By copying, installing or otherwise using the software, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nCNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\n---------------------------------------\n\n1. This LICENSE AGREEMENT is between the Corporation for National\nResearch Initiatives, having an office at 1895 Preston White Drive,\nReston, VA 20191 (\"CNRI\"), and the Individual or Organization\n(\"Licensee\") accessing and otherwise using Python 1.6.1 software in\nsource or binary form and its associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, CNRI\nhereby grants Licensee a nonexclusive, royalty-free, world-wide\nlicense to reproduce, analyze, test, perform and/or display publicly,\nprepare derivative works, distribute, and otherwise use Python 1.6.1\nalone or in any derivative version, provided, however, that CNRI's\nLicense Agreement and CNRI's notice of copyright, i.e., \"Copyright (c)\n1995-2001 Corporation for National Research Initiatives; All Rights\nReserved\" are retained in Python 1.6.1 alone or in any derivative\nversion prepared by Licensee.  Alternately, in lieu of CNRI's License\nAgreement, Licensee may substitute the following text (omitting the\nquotes): \"Python 1.6.1 is made available subject to the terms and\nconditions in CNRI's License Agreement.  This Agreement together with\nPython 1.6.1 may be located on the Internet using the following\nunique, persistent identifier (known as a handle): 1895.22/1013.  This\nAgreement may also be obtained from a proxy server on the Internet\nusing the following URL: http://hdl.handle.net/1895.22/1013\".\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python 1.6.1 or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python 1.6.1.\n\n4. CNRI is making Python 1.6.1 available to Licensee on an \"AS IS\"\nbasis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\n1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. This License Agreement shall be governed by the federal\nintellectual property law of the United States, including without\nlimitation the federal copyright law, and, to the extent such\nU.S. federal law does not apply, by the law of the Commonwealth of\nVirginia, excluding Virginia's conflict of law provisions.\nNotwithstanding the foregoing, with regard to derivative works based\non Python 1.6.1 that incorporate non-separable material that was\npreviously distributed under the GNU General Public License (GPL), the\nlaw of the Commonwealth of Virginia shall govern this License\nAgreement only as to issues arising under or with respect to\nParagraphs 4, 5, and 7 of this License Agreement.  Nothing in this\nLicense Agreement shall be deemed to create any relationship of\nagency, partnership, or joint venture between CNRI and Licensee.  This\nLicense Agreement does not grant permission to use CNRI trademarks or\ntrade name in a trademark sense to endorse or promote products or\nservices of Licensee, or any third party.\n\n8. By clicking on the \"ACCEPT\" button where indicated, or by copying,\ninstalling or otherwise using Python 1.6.1, Licensee agrees to be\nbound by the terms and conditions of this License Agreement.\n\n        ACCEPT\n\n\nCWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\n--------------------------------------------------\n\nCopyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,\nThe Netherlands.  All rights reserved.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Stichting Mathematisch\nCentrum or CWI not be used in advertising or publicity pertaining to\ndistribution of the software without specific, written prior\npermission.\n\nSTICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO\nTHIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE\nFOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\nOF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "ouimeaux/pysignals/weakref_backports.py",
    "content": "\"\"\"\nweakref_backports is a partial backport of the weakref module for python\nversions below 3.4.\n\nCopyright (C) 2013 Python Software Foundation, see license.python.txt for\ndetails.\n\nThe following changes were made to the original sources during backporting:\n\n * Added `self` to `super` calls.\n * Removed `from None` when raising exceptions.\n\n\"\"\"\nfrom weakref import ref\n\n\nclass WeakMethod(ref):\n    \"\"\"\n    A custom `weakref.ref` subclass which simulates a weak reference to\n    a bound method, working around the lifetime problem of bound methods.\n    \"\"\"\n\n    __slots__ = \"_func_ref\", \"_meth_type\", \"_alive\", \"__weakref__\"\n\n    def __new__(cls, meth, callback=None):\n        try:\n            obj = meth.__self__\n            func = meth.__func__\n        except AttributeError:\n            raise TypeError(\"argument should be a bound method, not {}\"\n                            .format(type(meth)))\n        def _cb(arg):\n            # The self-weakref trick is needed to avoid creating a reference\n            # cycle.\n            self = self_wr()\n            if self._alive:\n                self._alive = False\n                if callback is not None:\n                    callback(self)\n        self = ref.__new__(cls, obj, _cb)\n        self._func_ref = ref(func, _cb)\n        self._meth_type = type(meth)\n        self._alive = True\n        self_wr = ref(self)\n        return self\n\n    def __call__(self):\n        obj = super(WeakMethod, self).__call__()\n        func = self._func_ref()\n        if obj is None or func is None:\n            return None\n        return self._meth_type(func, obj)\n\n    def __eq__(self, other):\n        if isinstance(other, WeakMethod):\n            if not self._alive or not other._alive:\n                return self is other\n            return ref.__eq__(self, other) and self._func_ref == other._func_ref\n        return False\n\n    def __ne__(self, other):\n        if isinstance(other, WeakMethod):\n            if not self._alive or not other._alive:\n                return self is not other\n            return ref.__ne__(self, other) or self._func_ref != other._func_ref\n        return True\n\n    __hash__ = ref.__hash__\n"
  },
  {
    "path": "ouimeaux/server/__init__.py",
    "content": "import os\nimport json\nimport gevent\nfrom flask import Flask, request, Response\nfrom flask import render_template, send_from_directory, url_for\nfrom flask import send_file, make_response, abort\nfrom flask.ext.restful import reqparse, abort, Api, Resource\nfrom flask.ext.basicauth import BasicAuth\n\n# add support for CORS - https://flask-cors.readthedocs.io/en/latest/\nfrom flask_cors import CORS, cross_origin\n\n\nfrom ouimeaux.signals import statechange\nfrom ouimeaux.device.switch import Switch\nfrom ouimeaux.device.insight import Insight\nfrom ouimeaux.device.maker import Maker\nfrom ouimeaux.environment import Environment, UnknownDevice\nfrom socketio import socketio_manage\nfrom socketio.namespace import BaseNamespace\nfrom socketio.mixins import BroadcastMixin\n\nhere = lambda *x: os.path.join(os.path.dirname(__file__), *x)\n\n\napp = Flask(__name__)\napi = Api(app)\n\n#add support for CORS\nCORS(app)\n\n\nENV = None\n\n\ndef initialize(bind=None, auth=None):\n    global ENV\n    if ENV is None:\n        ENV = Environment(bind=bind)\n        ENV.start()\n        gevent.spawn(ENV.discover, 10)\n    if auth is not None:\n        elems = auth.split(':', 1)\n        username = elems[0]\n        password = elems[1]\n        print(\"Protected server with basic auth username/password: \", username, password)\n        app.config['BASIC_AUTH_USERNAME'] = username\n        app.config['BASIC_AUTH_PASSWORD'] = password\n        app.config['BASIC_AUTH_FORCE'] = True\n        basic_auth = BasicAuth(app)\n\n\ndef serialize(device):\n    if isinstance(device, Insight):\n      return {'name': device.name,\n              'type': device.__class__.__name__,\n              'serialnumber': device.serialnumber,\n              'state': device.get_state(),\n              'model': device.model,\n              'host': device.host,\n              'lastchange': str(device.last_change),\n              'onfor': device.on_for,\n              'ontoday': device.today_on_time,\n              'ontotal': device.ontotal,\n              'todaymw': device.today_kwh,\n              'totalmw': device.totalmw,\n              'currentpower': device.current_power\n              }\n    elif isinstance(device, Maker):\n       return {'name': device.name,\n              'type': device.__class__.__name__,\n              'serialnumber': device.serialnumber,\n              'state': device.get_state(),\n              'model': device.model,\n              'host': device.host,\n              'hassensor' : device.has_sensor,\n              'switchmode' : device.switch_mode,\n              'sensor' : device.sensor_state\n              }\n    return {'name': device.name,\n            'type': device.__class__.__name__,\n            'serialnumber': device.serialnumber,\n            'state': device.get_state(),\n            'model': device.model,\n            'host': device.host}\n\n\ndef get_device(name, should_abort=True):\n    try:\n        return ENV.get(name)\n    except UnknownDevice:\n        if not should_abort:\n            raise\n        abort(404, error='No device matching {}'.format(name))\n\n\n# First, the REST API\nclass EnvironmentResource(Resource):\n\n    def get(self):\n        result = {}\n        for dev in ENV:\n            result[dev.name] = serialize(dev)\n        return result\n\n    def post(self):\n        seconds = (request.json or {}).get('seconds', (\n            request.values or {}).get('seconds', 5))\n        ENV.discover(int(seconds))\n        return self.get()\n\n\nclass DeviceResource(Resource):\n\n    def get(self, name):\n        return serialize(get_device(name))\n\n    def post(self, name):\n        dev = get_device(name)\n        if not isinstance(dev, Switch):\n            abort(405, error='Only switches can have their state changed')\n        action = (request.json or {}).get('state', (\n            request.values or {}).get('state', 'toggle'))\n        if action not in ('on', 'off', 'toggle', 'blink'):\n            abort(400, error='{} is not a valid state'.format(action))\n        if action == 'blink':\n            delay = (request.json or {}).get('delay', (\n                request.values or {}).get('delay', '1'))\n            getattr(dev, action)(delay=int(delay))\n        else:\n            getattr(dev, action)()\n        return serialize(dev)\n\n\napi.add_resource(EnvironmentResource, '/api/environment')\napi.add_resource(DeviceResource, '/api/device/<string:name>')\n\n\nclass SocketNamespace(BaseNamespace):\n\n    def update_state(self, sender, **kwargs):\n        data = serialize(sender)\n        data['state'] = kwargs.get('state', data['state'])\n        self.emit(\"send:devicestate\", data)\n\n    def on_statechange(self, data):\n        ENV.get(data['name']).set_state(data['state'])\n\n    def on_join(self, data):\n        statechange.connect(self.update_state,\n                            dispatch_uid=id(self))\n        for device in ENV:\n            self.update_state(device)\n\n    def __del__(self):\n        statechange.disconnect(dispatch_uid=id(self))\n\n\n# Now for the WebSocket api\n@app.route(\"/socket.io/<path:path>\")\ndef run_socketio(**kwargs):\n    socketio_manage(request.environ, {'': SocketNamespace})\n\n\n# routing for basic pages (pass routing onto the Angular app)\n@app.route('/')\ndef basic_pages(**kwargs):\n    return make_response(open(here('templates/index.html')).read())\n\n\n# special file handlers and error handlers\n@app.route('/favicon.ico')\ndef favicon():\n    return send_from_directory(os.path.join(app.root_path, 'static'),\n                               'img/favicon.ico')\n\n@app.errorhandler(404)\ndef page_not_found(e):\n    return render_template('404.html'), 404\n\napp.config.from_object('ouimeaux.server.settings')\napp.url_map.strict_slashes = False\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "ouimeaux/server/settings.py",
    "content": "DEBUG = True\nSECRET_KEY = 'temporary_secret_key'  # make sure to change this\n"
  },
  {
    "path": "ouimeaux/server/static/css/bootstrap-responsive.css",
    "content": "/*!\n * Bootstrap Responsive v2.3.2\n *\n * Copyright 2012 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */\n\n.clearfix {\n  *zoom: 1;\n}\n\n.clearfix:before,\n.clearfix:after {\n  display: table;\n  line-height: 0;\n  content: \"\";\n}\n\n.clearfix:after {\n  clear: both;\n}\n\n.hide-text {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n\n.input-block-level {\n  display: block;\n  width: 100%;\n  min-height: 30px;\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n\n@-ms-viewport {\n  width: device-width;\n}\n\n.hidden {\n  display: none;\n  visibility: hidden;\n}\n\n.visible-phone {\n  display: none !important;\n}\n\n.visible-tablet {\n  display: none !important;\n}\n\n.hidden-desktop {\n  display: none !important;\n}\n\n.visible-desktop {\n  display: inherit !important;\n}\n\n@media (min-width: 768px) and (max-width: 979px) {\n  .hidden-desktop {\n    display: inherit !important;\n  }\n  .visible-desktop {\n    display: none !important ;\n  }\n  .visible-tablet {\n    display: inherit !important;\n  }\n  .hidden-tablet {\n    display: none !important;\n  }\n}\n\n@media (max-width: 767px) {\n  .hidden-desktop {\n    display: inherit !important;\n  }\n  .visible-desktop {\n    display: none !important;\n  }\n  .visible-phone {\n    display: inherit !important;\n  }\n  .hidden-phone {\n    display: none !important;\n  }\n}\n\n.visible-print {\n  display: none !important;\n}\n\n@media print {\n  .visible-print {\n    display: inherit !important;\n  }\n  .hidden-print {\n    display: none !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .row {\n    margin-left: -30px;\n    *zoom: 1;\n  }\n  .row:before,\n  .row:after {\n    display: table;\n    line-height: 0;\n    content: \"\";\n  }\n  .row:after {\n    clear: both;\n  }\n  [class*=\"span\"] {\n    float: left;\n    min-height: 1px;\n    margin-left: 30px;\n  }\n  .container,\n  .navbar-static-top .container,\n  .navbar-fixed-top .container,\n  .navbar-fixed-bottom .container {\n    width: 1170px;\n  }\n  .span12 {\n    width: 1170px;\n  }\n  .span11 {\n    width: 1070px;\n  }\n  .span10 {\n    width: 970px;\n  }\n  .span9 {\n    width: 870px;\n  }\n  .span8 {\n    width: 770px;\n  }\n  .span7 {\n    width: 670px;\n  }\n  .span6 {\n    width: 570px;\n  }\n  .span5 {\n    width: 470px;\n  }\n  .span4 {\n    width: 370px;\n  }\n  .span3 {\n    width: 270px;\n  }\n  .span2 {\n    width: 170px;\n  }\n  .span1 {\n    width: 70px;\n  }\n  .offset12 {\n    margin-left: 1230px;\n  }\n  .offset11 {\n    margin-left: 1130px;\n  }\n  .offset10 {\n    margin-left: 1030px;\n  }\n  .offset9 {\n    margin-left: 930px;\n  }\n  .offset8 {\n    margin-left: 830px;\n  }\n  .offset7 {\n    margin-left: 730px;\n  }\n  .offset6 {\n    margin-left: 630px;\n  }\n  .offset5 {\n    margin-left: 530px;\n  }\n  .offset4 {\n    margin-left: 430px;\n  }\n  .offset3 {\n    margin-left: 330px;\n  }\n  .offset2 {\n    margin-left: 230px;\n  }\n  .offset1 {\n    margin-left: 130px;\n  }\n  .row-fluid {\n    width: 100%;\n    *zoom: 1;\n  }\n  .row-fluid:before,\n  .row-fluid:after {\n    display: table;\n    line-height: 0;\n    content: \"\";\n  }\n  .row-fluid:after {\n    clear: both;\n  }\n  .row-fluid [class*=\"span\"] {\n    display: block;\n    float: left;\n    width: 100%;\n    min-height: 30px;\n    margin-left: 2.564102564102564%;\n    *margin-left: 2.5109110747408616%;\n    -webkit-box-sizing: border-box;\n       -moz-box-sizing: border-box;\n            box-sizing: border-box;\n  }\n  .row-fluid [class*=\"span\"]:first-child {\n    margin-left: 0;\n  }\n  .row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 2.564102564102564%;\n  }\n  .row-fluid .span12 {\n    width: 100%;\n    *width: 99.94680851063829%;\n  }\n  .row-fluid .span11 {\n    width: 91.45299145299145%;\n    *width: 91.39979996362975%;\n  }\n  .row-fluid .span10 {\n    width: 82.90598290598291%;\n    *width: 82.8527914166212%;\n  }\n  .row-fluid .span9 {\n    width: 74.35897435897436%;\n    *width: 74.30578286961266%;\n  }\n  .row-fluid .span8 {\n    width: 65.81196581196582%;\n    *width: 65.75877432260411%;\n  }\n  .row-fluid .span7 {\n    width: 57.26495726495726%;\n    *width: 57.21176577559556%;\n  }\n  .row-fluid .span6 {\n    width: 48.717948717948715%;\n    *width: 48.664757228587014%;\n  }\n  .row-fluid .span5 {\n    width: 40.17094017094017%;\n    *width: 40.11774868157847%;\n  }\n  .row-fluid .span4 {\n    width: 31.623931623931625%;\n    *width: 31.570740134569924%;\n  }\n  .row-fluid .span3 {\n    width: 23.076923076923077%;\n    *width: 23.023731587561375%;\n  }\n  .row-fluid .span2 {\n    width: 14.52991452991453%;\n    *width: 14.476723040552828%;\n  }\n  .row-fluid .span1 {\n    width: 5.982905982905983%;\n    *width: 5.929714493544281%;\n  }\n  .row-fluid .offset12 {\n    margin-left: 105.12820512820512%;\n    *margin-left: 105.02182214948171%;\n  }\n  .row-fluid .offset12:first-child {\n    margin-left: 102.56410256410257%;\n    *margin-left: 102.45771958537915%;\n  }\n  .row-fluid .offset11 {\n    margin-left: 96.58119658119658%;\n    *margin-left: 96.47481360247316%;\n  }\n  .row-fluid .offset11:first-child {\n    margin-left: 94.01709401709402%;\n    *margin-left: 93.91071103837061%;\n  }\n  .row-fluid .offset10 {\n    margin-left: 88.03418803418803%;\n    *margin-left: 87.92780505546462%;\n  }\n  .row-fluid .offset10:first-child {\n    margin-left: 85.47008547008548%;\n    *margin-left: 85.36370249136206%;\n  }\n  .row-fluid .offset9 {\n    margin-left: 79.48717948717949%;\n    *margin-left: 79.38079650845607%;\n  }\n  .row-fluid .offset9:first-child {\n    margin-left: 76.92307692307693%;\n    *margin-left: 76.81669394435352%;\n  }\n  .row-fluid .offset8 {\n    margin-left: 70.94017094017094%;\n    *margin-left: 70.83378796144753%;\n  }\n  .row-fluid .offset8:first-child {\n    margin-left: 68.37606837606839%;\n    *margin-left: 68.26968539734497%;\n  }\n  .row-fluid .offset7 {\n    margin-left: 62.393162393162385%;\n    *margin-left: 62.28677941443899%;\n  }\n  .row-fluid .offset7:first-child {\n    margin-left: 59.82905982905982%;\n    *margin-left: 59.72267685033642%;\n  }\n  .row-fluid .offset6 {\n    margin-left: 53.84615384615384%;\n    *margin-left: 53.739770867430444%;\n  }\n  .row-fluid .offset6:first-child {\n    margin-left: 51.28205128205128%;\n    *margin-left: 51.175668303327875%;\n  }\n  .row-fluid .offset5 {\n    margin-left: 45.299145299145295%;\n    *margin-left: 45.1927623204219%;\n  }\n  .row-fluid .offset5:first-child {\n    margin-left: 42.73504273504273%;\n    *margin-left: 42.62865975631933%;\n  }\n  .row-fluid .offset4 {\n    margin-left: 36.75213675213675%;\n    *margin-left: 36.645753773413354%;\n  }\n  .row-fluid .offset4:first-child {\n    margin-left: 34.18803418803419%;\n    *margin-left: 34.081651209310785%;\n  }\n  .row-fluid .offset3 {\n    margin-left: 28.205128205128204%;\n    *margin-left: 28.0987452264048%;\n  }\n  .row-fluid .offset3:first-child {\n    margin-left: 25.641025641025642%;\n    *margin-left: 25.53464266230224%;\n  }\n  .row-fluid .offset2 {\n    margin-left: 19.65811965811966%;\n    *margin-left: 19.551736679396257%;\n  }\n  .row-fluid .offset2:first-child {\n    margin-left: 17.094017094017094%;\n    *margin-left: 16.98763411529369%;\n  }\n  .row-fluid .offset1 {\n    margin-left: 11.11111111111111%;\n    *margin-left: 11.004728132387708%;\n  }\n  .row-fluid .offset1:first-child {\n    margin-left: 8.547008547008547%;\n    *margin-left: 8.440625568285142%;\n  }\n  input,\n  textarea,\n  .uneditable-input {\n    margin-left: 0;\n  }\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 30px;\n  }\n  input.span12,\n  textarea.span12,\n  .uneditable-input.span12 {\n    width: 1156px;\n  }\n  input.span11,\n  textarea.span11,\n  .uneditable-input.span11 {\n    width: 1056px;\n  }\n  input.span10,\n  textarea.span10,\n  .uneditable-input.span10 {\n    width: 956px;\n  }\n  input.span9,\n  textarea.span9,\n  .uneditable-input.span9 {\n    width: 856px;\n  }\n  input.span8,\n  textarea.span8,\n  .uneditable-input.span8 {\n    width: 756px;\n  }\n  input.span7,\n  textarea.span7,\n  .uneditable-input.span7 {\n    width: 656px;\n  }\n  input.span6,\n  textarea.span6,\n  .uneditable-input.span6 {\n    width: 556px;\n  }\n  input.span5,\n  textarea.span5,\n  .uneditable-input.span5 {\n    width: 456px;\n  }\n  input.span4,\n  textarea.span4,\n  .uneditable-input.span4 {\n    width: 356px;\n  }\n  input.span3,\n  textarea.span3,\n  .uneditable-input.span3 {\n    width: 256px;\n  }\n  input.span2,\n  textarea.span2,\n  .uneditable-input.span2 {\n    width: 156px;\n  }\n  input.span1,\n  textarea.span1,\n  .uneditable-input.span1 {\n    width: 56px;\n  }\n  .thumbnails {\n    margin-left: -30px;\n  }\n  .thumbnails > li {\n    margin-left: 30px;\n  }\n  .row-fluid .thumbnails {\n    margin-left: 0;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 979px) {\n  .row {\n    margin-left: -20px;\n    *zoom: 1;\n  }\n  .row:before,\n  .row:after {\n    display: table;\n    line-height: 0;\n    content: \"\";\n  }\n  .row:after {\n    clear: both;\n  }\n  [class*=\"span\"] {\n    float: left;\n    min-height: 1px;\n    margin-left: 20px;\n  }\n  .container,\n  .navbar-static-top .container,\n  .navbar-fixed-top .container,\n  .navbar-fixed-bottom .container {\n    width: 724px;\n  }\n  .span12 {\n    width: 724px;\n  }\n  .span11 {\n    width: 662px;\n  }\n  .span10 {\n    width: 600px;\n  }\n  .span9 {\n    width: 538px;\n  }\n  .span8 {\n    width: 476px;\n  }\n  .span7 {\n    width: 414px;\n  }\n  .span6 {\n    width: 352px;\n  }\n  .span5 {\n    width: 290px;\n  }\n  .span4 {\n    width: 228px;\n  }\n  .span3 {\n    width: 166px;\n  }\n  .span2 {\n    width: 104px;\n  }\n  .span1 {\n    width: 42px;\n  }\n  .offset12 {\n    margin-left: 764px;\n  }\n  .offset11 {\n    margin-left: 702px;\n  }\n  .offset10 {\n    margin-left: 640px;\n  }\n  .offset9 {\n    margin-left: 578px;\n  }\n  .offset8 {\n    margin-left: 516px;\n  }\n  .offset7 {\n    margin-left: 454px;\n  }\n  .offset6 {\n    margin-left: 392px;\n  }\n  .offset5 {\n    margin-left: 330px;\n  }\n  .offset4 {\n    margin-left: 268px;\n  }\n  .offset3 {\n    margin-left: 206px;\n  }\n  .offset2 {\n    margin-left: 144px;\n  }\n  .offset1 {\n    margin-left: 82px;\n  }\n  .row-fluid {\n    width: 100%;\n    *zoom: 1;\n  }\n  .row-fluid:before,\n  .row-fluid:after {\n    display: table;\n    line-height: 0;\n    content: \"\";\n  }\n  .row-fluid:after {\n    clear: both;\n  }\n  .row-fluid [class*=\"span\"] {\n    display: block;\n    float: left;\n    width: 100%;\n    min-height: 30px;\n    margin-left: 2.7624309392265194%;\n    *margin-left: 2.709239449864817%;\n    -webkit-box-sizing: border-box;\n       -moz-box-sizing: border-box;\n            box-sizing: border-box;\n  }\n  .row-fluid [class*=\"span\"]:first-child {\n    margin-left: 0;\n  }\n  .row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 2.7624309392265194%;\n  }\n  .row-fluid .span12 {\n    width: 100%;\n    *width: 99.94680851063829%;\n  }\n  .row-fluid .span11 {\n    width: 91.43646408839778%;\n    *width: 91.38327259903608%;\n  }\n  .row-fluid .span10 {\n    width: 82.87292817679558%;\n    *width: 82.81973668743387%;\n  }\n  .row-fluid .span9 {\n    width: 74.30939226519337%;\n    *width: 74.25620077583166%;\n  }\n  .row-fluid .span8 {\n    width: 65.74585635359117%;\n    *width: 65.69266486422946%;\n  }\n  .row-fluid .span7 {\n    width: 57.18232044198895%;\n    *width: 57.12912895262725%;\n  }\n  .row-fluid .span6 {\n    width: 48.61878453038674%;\n    *width: 48.56559304102504%;\n  }\n  .row-fluid .span5 {\n    width: 40.05524861878453%;\n    *width: 40.00205712942283%;\n  }\n  .row-fluid .span4 {\n    width: 31.491712707182323%;\n    *width: 31.43852121782062%;\n  }\n  .row-fluid .span3 {\n    width: 22.92817679558011%;\n    *width: 22.87498530621841%;\n  }\n  .row-fluid .span2 {\n    width: 14.3646408839779%;\n    *width: 14.311449394616199%;\n  }\n  .row-fluid .span1 {\n    width: 5.801104972375691%;\n    *width: 5.747913483013988%;\n  }\n  .row-fluid .offset12 {\n    margin-left: 105.52486187845304%;\n    *margin-left: 105.41847889972962%;\n  }\n  .row-fluid .offset12:first-child {\n    margin-left: 102.76243093922652%;\n    *margin-left: 102.6560479605031%;\n  }\n  .row-fluid .offset11 {\n    margin-left: 96.96132596685082%;\n    *margin-left: 96.8549429881274%;\n  }\n  .row-fluid .offset11:first-child {\n    margin-left: 94.1988950276243%;\n    *margin-left: 94.09251204890089%;\n  }\n  .row-fluid .offset10 {\n    margin-left: 88.39779005524862%;\n    *margin-left: 88.2914070765252%;\n  }\n  .row-fluid .offset10:first-child {\n    margin-left: 85.6353591160221%;\n    *margin-left: 85.52897613729868%;\n  }\n  .row-fluid .offset9 {\n    margin-left: 79.8342541436464%;\n    *margin-left: 79.72787116492299%;\n  }\n  .row-fluid .offset9:first-child {\n    margin-left: 77.07182320441989%;\n    *margin-left: 76.96544022569647%;\n  }\n  .row-fluid .offset8 {\n    margin-left: 71.2707182320442%;\n    *margin-left: 71.16433525332079%;\n  }\n  .row-fluid .offset8:first-child {\n    margin-left: 68.50828729281768%;\n    *margin-left: 68.40190431409427%;\n  }\n  .row-fluid .offset7 {\n    margin-left: 62.70718232044199%;\n    *margin-left: 62.600799341718584%;\n  }\n  .row-fluid .offset7:first-child {\n    margin-left: 59.94475138121547%;\n    *margin-left: 59.838368402492065%;\n  }\n  .row-fluid .offset6 {\n    margin-left: 54.14364640883978%;\n    *margin-left: 54.037263430116376%;\n  }\n  .row-fluid .offset6:first-child {\n    margin-left: 51.38121546961326%;\n    *margin-left: 51.27483249088986%;\n  }\n  .row-fluid .offset5 {\n    margin-left: 45.58011049723757%;\n    *margin-left: 45.47372751851417%;\n  }\n  .row-fluid .offset5:first-child {\n    margin-left: 42.81767955801105%;\n    *margin-left: 42.71129657928765%;\n  }\n  .row-fluid .offset4 {\n    margin-left: 37.01657458563536%;\n    *margin-left: 36.91019160691196%;\n  }\n  .row-fluid .offset4:first-child {\n    margin-left: 34.25414364640884%;\n    *margin-left: 34.14776066768544%;\n  }\n  .row-fluid .offset3 {\n    margin-left: 28.45303867403315%;\n    *margin-left: 28.346655695309746%;\n  }\n  .row-fluid .offset3:first-child {\n    margin-left: 25.69060773480663%;\n    *margin-left: 25.584224756083227%;\n  }\n  .row-fluid .offset2 {\n    margin-left: 19.88950276243094%;\n    *margin-left: 19.783119783707537%;\n  }\n  .row-fluid .offset2:first-child {\n    margin-left: 17.12707182320442%;\n    *margin-left: 17.02068884448102%;\n  }\n  .row-fluid .offset1 {\n    margin-left: 11.32596685082873%;\n    *margin-left: 11.219583872105325%;\n  }\n  .row-fluid .offset1:first-child {\n    margin-left: 8.56353591160221%;\n    *margin-left: 8.457152932878806%;\n  }\n  input,\n  textarea,\n  .uneditable-input {\n    margin-left: 0;\n  }\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 20px;\n  }\n  input.span12,\n  textarea.span12,\n  .uneditable-input.span12 {\n    width: 710px;\n  }\n  input.span11,\n  textarea.span11,\n  .uneditable-input.span11 {\n    width: 648px;\n  }\n  input.span10,\n  textarea.span10,\n  .uneditable-input.span10 {\n    width: 586px;\n  }\n  input.span9,\n  textarea.span9,\n  .uneditable-input.span9 {\n    width: 524px;\n  }\n  input.span8,\n  textarea.span8,\n  .uneditable-input.span8 {\n    width: 462px;\n  }\n  input.span7,\n  textarea.span7,\n  .uneditable-input.span7 {\n    width: 400px;\n  }\n  input.span6,\n  textarea.span6,\n  .uneditable-input.span6 {\n    width: 338px;\n  }\n  input.span5,\n  textarea.span5,\n  .uneditable-input.span5 {\n    width: 276px;\n  }\n  input.span4,\n  textarea.span4,\n  .uneditable-input.span4 {\n    width: 214px;\n  }\n  input.span3,\n  textarea.span3,\n  .uneditable-input.span3 {\n    width: 152px;\n  }\n  input.span2,\n  textarea.span2,\n  .uneditable-input.span2 {\n    width: 90px;\n  }\n  input.span1,\n  textarea.span1,\n  .uneditable-input.span1 {\n    width: 28px;\n  }\n}\n\n@media (max-width: 767px) {\n  body {\n    padding-right: 20px;\n    padding-left: 20px;\n  }\n  .navbar-fixed-top,\n  .navbar-fixed-bottom,\n  .navbar-static-top {\n    margin-right: -20px;\n    margin-left: -20px;\n  }\n  .container-fluid {\n    padding: 0;\n  }\n  .dl-horizontal dt {\n    float: none;\n    width: auto;\n    clear: none;\n    text-align: left;\n  }\n  .dl-horizontal dd {\n    margin-left: 0;\n  }\n  .container {\n    width: auto;\n  }\n  .row-fluid {\n    width: 100%;\n  }\n  .row,\n  .thumbnails {\n    margin-left: 0;\n  }\n  .thumbnails > li {\n    float: none;\n    margin-left: 0;\n  }\n  [class*=\"span\"],\n  .uneditable-input[class*=\"span\"],\n  .row-fluid [class*=\"span\"] {\n    display: block;\n    float: none;\n    width: 100%;\n    margin-left: 0;\n    -webkit-box-sizing: border-box;\n       -moz-box-sizing: border-box;\n            box-sizing: border-box;\n  }\n  .span12,\n  .row-fluid .span12 {\n    width: 100%;\n    -webkit-box-sizing: border-box;\n       -moz-box-sizing: border-box;\n            box-sizing: border-box;\n  }\n  .row-fluid [class*=\"offset\"]:first-child {\n    margin-left: 0;\n  }\n  .input-large,\n  .input-xlarge,\n  .input-xxlarge,\n  input[class*=\"span\"],\n  select[class*=\"span\"],\n  textarea[class*=\"span\"],\n  .uneditable-input {\n    display: block;\n    width: 100%;\n    min-height: 30px;\n    -webkit-box-sizing: border-box;\n       -moz-box-sizing: border-box;\n            box-sizing: border-box;\n  }\n  .input-prepend input,\n  .input-append input,\n  .input-prepend input[class*=\"span\"],\n  .input-append input[class*=\"span\"] {\n    display: inline-block;\n    width: auto;\n  }\n  .controls-row [class*=\"span\"] + [class*=\"span\"] {\n    margin-left: 0;\n  }\n  .modal {\n    position: fixed;\n    top: 20px;\n    right: 20px;\n    left: 20px;\n    width: auto;\n    margin: 0;\n  }\n  .modal.fade {\n    top: -100px;\n  }\n  .modal.fade.in {\n    top: 20px;\n  }\n}\n\n@media (max-width: 480px) {\n  .nav-collapse {\n    -webkit-transform: translate3d(0, 0, 0);\n  }\n  .page-header h1 small {\n    display: block;\n    line-height: 20px;\n  }\n  input[type=\"checkbox\"],\n  input[type=\"radio\"] {\n    border: 1px solid #ccc;\n  }\n  .form-horizontal .control-label {\n    float: none;\n    width: auto;\n    padding-top: 0;\n    text-align: left;\n  }\n  .form-horizontal .controls {\n    margin-left: 0;\n  }\n  .form-horizontal .control-list {\n    padding-top: 0;\n  }\n  .form-horizontal .form-actions {\n    padding-right: 10px;\n    padding-left: 10px;\n  }\n  .media .pull-left,\n  .media .pull-right {\n    display: block;\n    float: none;\n    margin-bottom: 10px;\n  }\n  .media-object {\n    margin-right: 0;\n    margin-left: 0;\n  }\n  .modal {\n    top: 10px;\n    right: 10px;\n    left: 10px;\n  }\n  .modal-header .close {\n    padding: 10px;\n    margin: -10px;\n  }\n  .carousel-caption {\n    position: static;\n  }\n}\n\n@media (max-width: 979px) {\n  body {\n    padding-top: 0;\n  }\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    position: static;\n  }\n  .navbar-fixed-top {\n    margin-bottom: 20px;\n  }\n  .navbar-fixed-bottom {\n    margin-top: 20px;\n  }\n  .navbar-fixed-top .navbar-inner,\n  .navbar-fixed-bottom .navbar-inner {\n    padding: 5px;\n  }\n  .navbar .container {\n    width: auto;\n    padding: 0;\n  }\n  .navbar .brand {\n    padding-right: 10px;\n    padding-left: 10px;\n    margin: 0 0 0 -5px;\n  }\n  .nav-collapse {\n    clear: both;\n  }\n  .nav-collapse .nav {\n    float: none;\n    margin: 0 0 10px;\n  }\n  .nav-collapse .nav > li {\n    float: none;\n  }\n  .nav-collapse .nav > li > a {\n    margin-bottom: 2px;\n  }\n  .nav-collapse .nav > .divider-vertical {\n    display: none;\n  }\n  .nav-collapse .nav .nav-header {\n    color: #777777;\n    text-shadow: none;\n  }\n  .nav-collapse .nav > li > a,\n  .nav-collapse .dropdown-menu a {\n    padding: 9px 15px;\n    font-weight: bold;\n    color: #777777;\n    -webkit-border-radius: 3px;\n       -moz-border-radius: 3px;\n            border-radius: 3px;\n  }\n  .nav-collapse .btn {\n    padding: 4px 10px 4px;\n    font-weight: normal;\n    -webkit-border-radius: 4px;\n       -moz-border-radius: 4px;\n            border-radius: 4px;\n  }\n  .nav-collapse .dropdown-menu li + li a {\n    margin-bottom: 2px;\n  }\n  .nav-collapse .nav > li > a:hover,\n  .nav-collapse .nav > li > a:focus,\n  .nav-collapse .dropdown-menu a:hover,\n  .nav-collapse .dropdown-menu a:focus {\n    background-color: #f2f2f2;\n  }\n  .navbar-inverse .nav-collapse .nav > li > a,\n  .navbar-inverse .nav-collapse .dropdown-menu a {\n    color: #999999;\n  }\n  .navbar-inverse .nav-collapse .nav > li > a:hover,\n  .navbar-inverse .nav-collapse .nav > li > a:focus,\n  .navbar-inverse .nav-collapse .dropdown-menu a:hover,\n  .navbar-inverse .nav-collapse .dropdown-menu a:focus {\n    background-color: #111111;\n  }\n  .nav-collapse.in .btn-group {\n    padding: 0;\n    margin-top: 5px;\n  }\n  .nav-collapse .dropdown-menu {\n    position: static;\n    top: auto;\n    left: auto;\n    display: none;\n    float: none;\n    max-width: none;\n    padding: 0;\n    margin: 0 15px;\n    background-color: transparent;\n    border: none;\n    -webkit-border-radius: 0;\n       -moz-border-radius: 0;\n            border-radius: 0;\n    -webkit-box-shadow: none;\n       -moz-box-shadow: none;\n            box-shadow: none;\n  }\n  .nav-collapse .open > .dropdown-menu {\n    display: block;\n  }\n  .nav-collapse .dropdown-menu:before,\n  .nav-collapse .dropdown-menu:after {\n    display: none;\n  }\n  .nav-collapse .dropdown-menu .divider {\n    display: none;\n  }\n  .nav-collapse .nav > li > .dropdown-menu:before,\n  .nav-collapse .nav > li > .dropdown-menu:after {\n    display: none;\n  }\n  .nav-collapse .navbar-form,\n  .nav-collapse .navbar-search {\n    float: none;\n    padding: 10px 15px;\n    margin: 10px 0;\n    border-top: 1px solid #f2f2f2;\n    border-bottom: 1px solid #f2f2f2;\n    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  }\n  .navbar-inverse .nav-collapse .navbar-form,\n  .navbar-inverse .nav-collapse .navbar-search {\n    border-top-color: #111111;\n    border-bottom-color: #111111;\n  }\n  .navbar .nav-collapse .nav.pull-right {\n    float: none;\n    margin-left: 0;\n  }\n  .nav-collapse,\n  .nav-collapse.collapse {\n    height: 0;\n    overflow: hidden;\n  }\n  .navbar .btn-navbar {\n    display: block;\n  }\n  .navbar-static .navbar-inner {\n    padding-right: 10px;\n    padding-left: 10px;\n  }\n}\n\n@media (min-width: 980px) {\n  .nav-collapse.collapse {\n    height: auto !important;\n    overflow: visible !important;\n  }\n}\n"
  },
  {
    "path": "ouimeaux/server/static/css/bootstrap-theme.css",
    "content": "/*!\n * Bootstrap v3.0.3 (http://getbootstrap.com)\n * Copyright 2013 Twitter, Inc.\n * Licensed under http://www.apache.org/licenses/LICENSE-2.0\n */\n\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n\n.btn:active,\n.btn.active {\n  background-image: none;\n}\n\n.btn-default {\n  text-shadow: 0 1px 0 #fff;\n  background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n  background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n  background-repeat: repeat-x;\n  border-color: #dbdbdb;\n  border-color: #ccc;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-default:hover,\n.btn-default:focus {\n  background-color: #e0e0e0;\n  background-position: 0 -15px;\n}\n\n.btn-default:active,\n.btn-default.active {\n  background-color: #e0e0e0;\n  border-color: #dbdbdb;\n}\n\n.btn-primary {\n  background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);\n  background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);\n  background-repeat: repeat-x;\n  border-color: #2b669a;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-primary:hover,\n.btn-primary:focus {\n  background-color: #2d6ca2;\n  background-position: 0 -15px;\n}\n\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #2d6ca2;\n  border-color: #2b669a;\n}\n\n.btn-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n  background-repeat: repeat-x;\n  border-color: #3e8f3e;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-success:hover,\n.btn-success:focus {\n  background-color: #419641;\n  background-position: 0 -15px;\n}\n\n.btn-success:active,\n.btn-success.active {\n  background-color: #419641;\n  border-color: #3e8f3e;\n}\n\n.btn-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n  background-repeat: repeat-x;\n  border-color: #e38d13;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-warning:hover,\n.btn-warning:focus {\n  background-color: #eb9316;\n  background-position: 0 -15px;\n}\n\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #eb9316;\n  border-color: #e38d13;\n}\n\n.btn-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n  background-repeat: repeat-x;\n  border-color: #b92c28;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-danger:hover,\n.btn-danger:focus {\n  background-color: #c12e2a;\n  background-position: 0 -15px;\n}\n\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #c12e2a;\n  border-color: #b92c28;\n}\n\n.btn-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n  background-repeat: repeat-x;\n  border-color: #28a4c9;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-info:hover,\n.btn-info:focus {\n  background-color: #2aabd2;\n  background-position: 0 -15px;\n}\n\n.btn-info:active,\n.btn-info.active {\n  background-color: #2aabd2;\n  border-color: #28a4c9;\n}\n\n.thumbnail,\n.img-thumbnail {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  background-color: #e8e8e8;\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  background-color: #357ebd;\n  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);\n  background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);\n}\n\n.navbar-default {\n  background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n  background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n  background-repeat: repeat-x;\n  border-radius: 4px;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n\n.navbar-default .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);\n  background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n\n.navbar-inverse {\n  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n  background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.navbar-inverse .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);\n  background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n.alert {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.alert-success {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n  background-repeat: repeat-x;\n  border-color: #b2dba1;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n}\n\n.alert-info {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n  background-repeat: repeat-x;\n  border-color: #9acfea;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n}\n\n.alert-warning {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n  background-repeat: repeat-x;\n  border-color: #f5e79e;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n}\n\n.alert-danger {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n  background-repeat: repeat-x;\n  border-color: #dca7a7;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n}\n\n.progress {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n\n.progress-bar {\n  background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);\n  background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);\n}\n\n.progress-bar-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n\n.progress-bar-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n\n.progress-bar-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n\n.progress-bar-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n\n.list-group {\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 #3071a9;\n  background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);\n  background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);\n  background-repeat: repeat-x;\n  border-color: #3278b3;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);\n}\n\n.panel {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.panel-default > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n\n.panel-primary > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);\n  background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);\n}\n\n.panel-success > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n\n.panel-info > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n\n.panel-warning > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n\n.panel-danger > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n\n.well {\n  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  border-color: #dcdcdc;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n          box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}"
  },
  {
    "path": "ouimeaux/server/static/css/bootstrap.css",
    "content": "/*!\n * Bootstrap v3.0.3 (http://getbootstrap.com)\n * Copyright 2013 Twitter, Inc.\n * Licensed under http://www.apache.org/licenses/LICENSE-2.0\n */\n\n/*! normalize.css v2.1.3 | MIT License | git.io/normalize */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\naudio,\ncanvas,\nvideo {\n  display: inline-block;\n}\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n[hidden],\ntemplate {\n  display: none;\n}\n\nhtml {\n  font-family: sans-serif;\n  -webkit-text-size-adjust: 100%;\n      -ms-text-size-adjust: 100%;\n}\n\nbody {\n  margin: 0;\n}\n\na {\n  background: transparent;\n}\n\na:focus {\n  outline: thin dotted;\n}\n\na:active,\na:hover {\n  outline: 0;\n}\n\nh1 {\n  margin: 0.67em 0;\n  font-size: 2em;\n}\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\nb,\nstrong {\n  font-weight: bold;\n}\n\ndfn {\n  font-style: italic;\n}\n\nhr {\n  height: 0;\n  -moz-box-sizing: content-box;\n       box-sizing: content-box;\n}\n\nmark {\n  color: #000;\n  background: #ff0;\n}\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, serif;\n  font-size: 1em;\n}\n\npre {\n  white-space: pre-wrap;\n}\n\nq {\n  quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\";\n}\n\nsmall {\n  font-size: 80%;\n}\n\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nimg {\n  border: 0;\n}\n\nsvg:not(:root) {\n  overflow: hidden;\n}\n\nfigure {\n  margin: 0;\n}\n\nfieldset {\n  padding: 0.35em 0.625em 0.75em;\n  margin: 0 2px;\n  border: 1px solid #c0c0c0;\n}\n\nlegend {\n  padding: 0;\n  border: 0;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n  margin: 0;\n  font-family: inherit;\n  font-size: 100%;\n}\n\nbutton,\ninput {\n  line-height: normal;\n}\n\nbutton,\nselect {\n  text-transform: none;\n}\n\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer;\n  -webkit-appearance: button;\n}\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  padding: 0;\n  box-sizing: border-box;\n}\n\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\n\ntextarea {\n  overflow: auto;\n  vertical-align: top;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n@media print {\n  * {\n    color: #000 !important;\n    text-shadow: none !important;\n    background: transparent !important;\n    box-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"javascript:\"]:after,\n  a[href^=\"#\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  @page  {\n    margin: 2cm .5cm;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  select {\n    background: #fff !important;\n  }\n  .navbar {\n    display: none;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n\n*,\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n\nhtml {\n  font-size: 62.5%;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.428571429;\n  color: #333333;\n  background-color: #ffffff;\n}\n\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\n\na {\n  color: #428bca;\n  text-decoration: none;\n}\n\na:hover,\na:focus {\n  color: #2a6496;\n  text-decoration: underline;\n}\n\na:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n\nimg {\n  vertical-align: middle;\n}\n\n.img-responsive {\n  display: block;\n  height: auto;\n  max-width: 100%;\n}\n\n.img-rounded {\n  border-radius: 6px;\n}\n\n.img-thumbnail {\n  display: inline-block;\n  height: auto;\n  max-width: 100%;\n  padding: 4px;\n  line-height: 1.428571429;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n  border-radius: 4px;\n  -webkit-transition: all 0.2s ease-in-out;\n          transition: all 0.2s ease-in-out;\n}\n\n.img-circle {\n  border-radius: 50%;\n}\n\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eeeeee;\n}\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\n\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #999999;\n}\n\nh1,\nh2,\nh3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\n\nh1 small,\nh2 small,\nh3 small,\nh1 .small,\nh2 .small,\nh3 .small {\n  font-size: 65%;\n}\n\nh4,\nh5,\nh6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n\nh4 small,\nh5 small,\nh6 small,\nh4 .small,\nh5 .small,\nh6 .small {\n  font-size: 75%;\n}\n\nh1,\n.h1 {\n  font-size: 36px;\n}\n\nh2,\n.h2 {\n  font-size: 30px;\n}\n\nh3,\n.h3 {\n  font-size: 24px;\n}\n\nh4,\n.h4 {\n  font-size: 18px;\n}\n\nh5,\n.h5 {\n  font-size: 14px;\n}\n\nh6,\n.h6 {\n  font-size: 12px;\n}\n\np {\n  margin: 0 0 10px;\n}\n\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 200;\n  line-height: 1.4;\n}\n\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\n\nsmall,\n.small {\n  font-size: 85%;\n}\n\ncite {\n  font-style: normal;\n}\n\n.text-muted {\n  color: #999999;\n}\n\n.text-primary {\n  color: #428bca;\n}\n\n.text-primary:hover {\n  color: #3071a9;\n}\n\n.text-warning {\n  color: #8a6d3b;\n}\n\n.text-warning:hover {\n  color: #66512c;\n}\n\n.text-danger {\n  color: #a94442;\n}\n\n.text-danger:hover {\n  color: #843534;\n}\n\n.text-success {\n  color: #3c763d;\n}\n\n.text-success:hover {\n  color: #2b542c;\n}\n\n.text-info {\n  color: #31708f;\n}\n\n.text-info:hover {\n  color: #245269;\n}\n\n.text-left {\n  text-align: left;\n}\n\n.text-right {\n  text-align: right;\n}\n\n.text-center {\n  text-align: center;\n}\n\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eeeeee;\n}\n\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\n\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n\n.list-inline {\n  padding-left: 0;\n  list-style: none;\n}\n\n.list-inline > li {\n  display: inline-block;\n  padding-right: 5px;\n  padding-left: 5px;\n}\n\n.list-inline > li:first-child {\n  padding-left: 0;\n}\n\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\n\ndt,\ndd {\n  line-height: 1.428571429;\n}\n\ndt {\n  font-weight: bold;\n}\n\ndd {\n  margin-left: 0;\n}\n\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    overflow: hidden;\n    clear: left;\n    text-align: right;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n  .dl-horizontal dd:before,\n  .dl-horizontal dd:after {\n    display: table;\n    content: \" \";\n  }\n  .dl-horizontal dd:after {\n    clear: both;\n  }\n  .dl-horizontal dd:before,\n  .dl-horizontal dd:after {\n    display: table;\n    content: \" \";\n  }\n  .dl-horizontal dd:after {\n    clear: both;\n  }\n}\n\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #999999;\n}\n\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\n\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  border-left: 5px solid #eeeeee;\n}\n\nblockquote p {\n  font-size: 17.5px;\n  font-weight: 300;\n  line-height: 1.25;\n}\n\nblockquote p:last-child {\n  margin-bottom: 0;\n}\n\nblockquote small,\nblockquote .small {\n  display: block;\n  line-height: 1.428571429;\n  color: #999999;\n}\n\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid #eeeeee;\n  border-left: 0;\n}\n\nblockquote.pull-right p,\nblockquote.pull-right small,\nblockquote.pull-right .small {\n  text-align: right;\n}\n\nblockquote.pull-right small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n\nblockquote.pull-right small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\n\nblockquote:before,\nblockquote:after {\n  content: \"\";\n}\n\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.428571429;\n}\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\n\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  white-space: nowrap;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\n\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.428571429;\n  color: #333333;\n  word-break: break-all;\n  word-wrap: break-word;\n  background-color: #f5f5f5;\n  border: 1px solid #cccccc;\n  border-radius: 4px;\n}\n\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n\n.container {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n\n.container:before,\n.container:after {\n  display: table;\n  content: \" \";\n}\n\n.container:after {\n  clear: both;\n}\n\n.container:before,\n.container:after {\n  display: table;\n  content: \" \";\n}\n\n.container:after {\n  clear: both;\n}\n\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n\n.row {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n\n.row:before,\n.row:after {\n  display: table;\n  content: \" \";\n}\n\n.row:after {\n  clear: both;\n}\n\n.row:before,\n.row:after {\n  display: table;\n  content: \" \";\n}\n\n.row:after {\n  clear: both;\n}\n\n.col-xs-1,\n.col-sm-1,\n.col-md-1,\n.col-lg-1,\n.col-xs-2,\n.col-sm-2,\n.col-md-2,\n.col-lg-2,\n.col-xs-3,\n.col-sm-3,\n.col-md-3,\n.col-lg-3,\n.col-xs-4,\n.col-sm-4,\n.col-md-4,\n.col-lg-4,\n.col-xs-5,\n.col-sm-5,\n.col-md-5,\n.col-lg-5,\n.col-xs-6,\n.col-sm-6,\n.col-md-6,\n.col-lg-6,\n.col-xs-7,\n.col-sm-7,\n.col-md-7,\n.col-lg-7,\n.col-xs-8,\n.col-sm-8,\n.col-md-8,\n.col-lg-8,\n.col-xs-9,\n.col-sm-9,\n.col-md-9,\n.col-lg-9,\n.col-xs-10,\n.col-sm-10,\n.col-md-10,\n.col-lg-10,\n.col-xs-11,\n.col-sm-11,\n.col-md-11,\n.col-lg-11,\n.col-xs-12,\n.col-sm-12,\n.col-md-12,\n.col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-right: 15px;\n  padding-left: 15px;\n}\n\n.col-xs-1,\n.col-xs-2,\n.col-xs-3,\n.col-xs-4,\n.col-xs-5,\n.col-xs-6,\n.col-xs-7,\n.col-xs-8,\n.col-xs-9,\n.col-xs-10,\n.col-xs-11,\n.col-xs-12 {\n  float: left;\n}\n\n.col-xs-12 {\n  width: 100%;\n}\n\n.col-xs-11 {\n  width: 91.66666666666666%;\n}\n\n.col-xs-10 {\n  width: 83.33333333333334%;\n}\n\n.col-xs-9 {\n  width: 75%;\n}\n\n.col-xs-8 {\n  width: 66.66666666666666%;\n}\n\n.col-xs-7 {\n  width: 58.333333333333336%;\n}\n\n.col-xs-6 {\n  width: 50%;\n}\n\n.col-xs-5 {\n  width: 41.66666666666667%;\n}\n\n.col-xs-4 {\n  width: 33.33333333333333%;\n}\n\n.col-xs-3 {\n  width: 25%;\n}\n\n.col-xs-2 {\n  width: 16.666666666666664%;\n}\n\n.col-xs-1 {\n  width: 8.333333333333332%;\n}\n\n.col-xs-pull-12 {\n  right: 100%;\n}\n\n.col-xs-pull-11 {\n  right: 91.66666666666666%;\n}\n\n.col-xs-pull-10 {\n  right: 83.33333333333334%;\n}\n\n.col-xs-pull-9 {\n  right: 75%;\n}\n\n.col-xs-pull-8 {\n  right: 66.66666666666666%;\n}\n\n.col-xs-pull-7 {\n  right: 58.333333333333336%;\n}\n\n.col-xs-pull-6 {\n  right: 50%;\n}\n\n.col-xs-pull-5 {\n  right: 41.66666666666667%;\n}\n\n.col-xs-pull-4 {\n  right: 33.33333333333333%;\n}\n\n.col-xs-pull-3 {\n  right: 25%;\n}\n\n.col-xs-pull-2 {\n  right: 16.666666666666664%;\n}\n\n.col-xs-pull-1 {\n  right: 8.333333333333332%;\n}\n\n.col-xs-pull-0 {\n  right: 0;\n}\n\n.col-xs-push-12 {\n  left: 100%;\n}\n\n.col-xs-push-11 {\n  left: 91.66666666666666%;\n}\n\n.col-xs-push-10 {\n  left: 83.33333333333334%;\n}\n\n.col-xs-push-9 {\n  left: 75%;\n}\n\n.col-xs-push-8 {\n  left: 66.66666666666666%;\n}\n\n.col-xs-push-7 {\n  left: 58.333333333333336%;\n}\n\n.col-xs-push-6 {\n  left: 50%;\n}\n\n.col-xs-push-5 {\n  left: 41.66666666666667%;\n}\n\n.col-xs-push-4 {\n  left: 33.33333333333333%;\n}\n\n.col-xs-push-3 {\n  left: 25%;\n}\n\n.col-xs-push-2 {\n  left: 16.666666666666664%;\n}\n\n.col-xs-push-1 {\n  left: 8.333333333333332%;\n}\n\n.col-xs-push-0 {\n  left: 0;\n}\n\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n\n.col-xs-offset-11 {\n  margin-left: 91.66666666666666%;\n}\n\n.col-xs-offset-10 {\n  margin-left: 83.33333333333334%;\n}\n\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n\n.col-xs-offset-8 {\n  margin-left: 66.66666666666666%;\n}\n\n.col-xs-offset-7 {\n  margin-left: 58.333333333333336%;\n}\n\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n\n.col-xs-offset-5 {\n  margin-left: 41.66666666666667%;\n}\n\n.col-xs-offset-4 {\n  margin-left: 33.33333333333333%;\n}\n\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n\n.col-xs-offset-2 {\n  margin-left: 16.666666666666664%;\n}\n\n.col-xs-offset-1 {\n  margin-left: 8.333333333333332%;\n}\n\n.col-xs-offset-0 {\n  margin-left: 0;\n}\n\n@media (min-width: 768px) {\n  .col-sm-1,\n  .col-sm-2,\n  .col-sm-3,\n  .col-sm-4,\n  .col-sm-5,\n  .col-sm-6,\n  .col-sm-7,\n  .col-sm-8,\n  .col-sm-9,\n  .col-sm-10,\n  .col-sm-11,\n  .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666666666666%;\n  }\n  .col-sm-10 {\n    width: 83.33333333333334%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666666666666%;\n  }\n  .col-sm-7 {\n    width: 58.333333333333336%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666666666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.666666666666664%;\n  }\n  .col-sm-1 {\n    width: 8.333333333333332%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666666666666%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333333334%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666666666666%;\n  }\n  .col-sm-pull-7 {\n    right: 58.333333333333336%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666666666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.666666666666664%;\n  }\n  .col-sm-pull-1 {\n    right: 8.333333333333332%;\n  }\n  .col-sm-pull-0 {\n    right: 0;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666666666666%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333333334%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666666666666%;\n  }\n  .col-sm-push-7 {\n    left: 58.333333333333336%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666666666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.666666666666664%;\n  }\n  .col-sm-push-1 {\n    left: 8.333333333333332%;\n  }\n  .col-sm-push-0 {\n    left: 0;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666666666666%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333333334%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666666666666%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.333333333333336%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666666666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.666666666666664%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.333333333333332%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0;\n  }\n}\n\n@media (min-width: 992px) {\n  .col-md-1,\n  .col-md-2,\n  .col-md-3,\n  .col-md-4,\n  .col-md-5,\n  .col-md-6,\n  .col-md-7,\n  .col-md-8,\n  .col-md-9,\n  .col-md-10,\n  .col-md-11,\n  .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666666666666%;\n  }\n  .col-md-10 {\n    width: 83.33333333333334%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666666666666%;\n  }\n  .col-md-7 {\n    width: 58.333333333333336%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666666666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.666666666666664%;\n  }\n  .col-md-1 {\n    width: 8.333333333333332%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666666666666%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333333334%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666666666666%;\n  }\n  .col-md-pull-7 {\n    right: 58.333333333333336%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666666666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.666666666666664%;\n  }\n  .col-md-pull-1 {\n    right: 8.333333333333332%;\n  }\n  .col-md-pull-0 {\n    right: 0;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666666666666%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333333334%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666666666666%;\n  }\n  .col-md-push-7 {\n    left: 58.333333333333336%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666666666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.666666666666664%;\n  }\n  .col-md-push-1 {\n    left: 8.333333333333332%;\n  }\n  .col-md-push-0 {\n    left: 0;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666666666666%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333333334%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666666666666%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.333333333333336%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666666666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.666666666666664%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.333333333333332%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0;\n  }\n}\n\n@media (min-width: 1200px) {\n  .col-lg-1,\n  .col-lg-2,\n  .col-lg-3,\n  .col-lg-4,\n  .col-lg-5,\n  .col-lg-6,\n  .col-lg-7,\n  .col-lg-8,\n  .col-lg-9,\n  .col-lg-10,\n  .col-lg-11,\n  .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666666666666%;\n  }\n  .col-lg-10 {\n    width: 83.33333333333334%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666666666666%;\n  }\n  .col-lg-7 {\n    width: 58.333333333333336%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666666666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.666666666666664%;\n  }\n  .col-lg-1 {\n    width: 8.333333333333332%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666666666666%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333333334%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666666666666%;\n  }\n  .col-lg-pull-7 {\n    right: 58.333333333333336%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666666666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.666666666666664%;\n  }\n  .col-lg-pull-1 {\n    right: 8.333333333333332%;\n  }\n  .col-lg-pull-0 {\n    right: 0;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666666666666%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333333334%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666666666666%;\n  }\n  .col-lg-push-7 {\n    left: 58.333333333333336%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666666666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.666666666666664%;\n  }\n  .col-lg-push-1 {\n    left: 8.333333333333332%;\n  }\n  .col-lg-push-0 {\n    left: 0;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666666666666%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333333334%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666666666666%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.333333333333336%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666666666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.666666666666664%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.333333333333332%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0;\n  }\n}\n\ntable {\n  max-width: 100%;\n  background-color: transparent;\n}\n\nth {\n  text-align: left;\n}\n\n.table {\n  width: 100%;\n  margin-bottom: 20px;\n}\n\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.428571429;\n  vertical-align: top;\n  border-top: 1px solid #dddddd;\n}\n\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #dddddd;\n}\n\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n\n.table > tbody + tbody {\n  border-top: 2px solid #dddddd;\n}\n\n.table .table {\n  background-color: #ffffff;\n}\n\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n\n.table-bordered {\n  border: 1px solid #dddddd;\n}\n\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #dddddd;\n}\n\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n\n.table-striped > tbody > tr:nth-child(odd) > td,\n.table-striped > tbody > tr:nth-child(odd) > th {\n  background-color: #f9f9f9;\n}\n\n.table-hover > tbody > tr:hover > td,\n.table-hover > tbody > tr:hover > th {\n  background-color: #f5f5f5;\n}\n\ntable col[class*=\"col-\"] {\n  position: static;\n  display: table-column;\n  float: none;\n}\n\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  display: table-cell;\n  float: none;\n}\n\n.table > thead > tr > .active,\n.table > tbody > tr > .active,\n.table > tfoot > tr > .active,\n.table > thead > .active > td,\n.table > tbody > .active > td,\n.table > tfoot > .active > td,\n.table > thead > .active > th,\n.table > tbody > .active > th,\n.table > tfoot > .active > th {\n  background-color: #f5f5f5;\n}\n\n.table-hover > tbody > tr > .active:hover,\n.table-hover > tbody > .active:hover > td,\n.table-hover > tbody > .active:hover > th {\n  background-color: #e8e8e8;\n}\n\n.table > thead > tr > .success,\n.table > tbody > tr > .success,\n.table > tfoot > tr > .success,\n.table > thead > .success > td,\n.table > tbody > .success > td,\n.table > tfoot > .success > td,\n.table > thead > .success > th,\n.table > tbody > .success > th,\n.table > tfoot > .success > th {\n  background-color: #dff0d8;\n}\n\n.table-hover > tbody > tr > .success:hover,\n.table-hover > tbody > .success:hover > td,\n.table-hover > tbody > .success:hover > th {\n  background-color: #d0e9c6;\n}\n\n.table > thead > tr > .danger,\n.table > tbody > tr > .danger,\n.table > tfoot > tr > .danger,\n.table > thead > .danger > td,\n.table > tbody > .danger > td,\n.table > tfoot > .danger > td,\n.table > thead > .danger > th,\n.table > tbody > .danger > th,\n.table > tfoot > .danger > th {\n  background-color: #f2dede;\n}\n\n.table-hover > tbody > tr > .danger:hover,\n.table-hover > tbody > .danger:hover > td,\n.table-hover > tbody > .danger:hover > th {\n  background-color: #ebcccc;\n}\n\n.table > thead > tr > .warning,\n.table > tbody > tr > .warning,\n.table > tfoot > tr > .warning,\n.table > thead > .warning > td,\n.table > tbody > .warning > td,\n.table > tfoot > .warning > td,\n.table > thead > .warning > th,\n.table > tbody > .warning > th,\n.table > tfoot > .warning > th {\n  background-color: #fcf8e3;\n}\n\n.table-hover > tbody > tr > .warning:hover,\n.table-hover > tbody > .warning:hover > td,\n.table-hover > tbody > .warning:hover > th {\n  background-color: #faf2cc;\n}\n\n@media (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-x: scroll;\n    overflow-y: hidden;\n    border: 1px solid #dddddd;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    -webkit-overflow-scrolling: touch;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\n\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\n\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\n\nlabel {\n  display: inline-block;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  /* IE8-9 */\n\n  line-height: normal;\n}\n\ninput[type=\"file\"] {\n  display: block;\n}\n\nselect[multiple],\nselect[size] {\n  height: auto;\n}\n\nselect optgroup {\n  font-family: inherit;\n  font-size: inherit;\n  font-style: inherit;\n}\n\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n\ninput[type=\"number\"]::-webkit-outer-spin-button,\ninput[type=\"number\"]::-webkit-inner-spin-button {\n  height: auto;\n}\n\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.428571429;\n  color: #555555;\n  vertical-align: middle;\n}\n\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.428571429;\n  color: #555555;\n  vertical-align: middle;\n  background-color: #ffffff;\n  background-image: none;\n  border: 1px solid #cccccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n          transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n}\n\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n\n.form-control:-moz-placeholder {\n  color: #999999;\n}\n\n.form-control::-moz-placeholder {\n  color: #999999;\n  opacity: 1;\n}\n\n.form-control:-ms-input-placeholder {\n  color: #999999;\n}\n\n.form-control::-webkit-input-placeholder {\n  color: #999999;\n}\n\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n  background-color: #eeeeee;\n}\n\ntextarea.form-control {\n  height: auto;\n}\n\n.form-group {\n  margin-bottom: 15px;\n}\n\n.radio,\n.checkbox {\n  display: block;\n  min-height: 20px;\n  padding-left: 20px;\n  margin-top: 10px;\n  margin-bottom: 10px;\n  vertical-align: middle;\n}\n\n.radio label,\n.checkbox label {\n  display: inline;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  float: left;\n  margin-left: -20px;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n\n.radio-inline,\n.checkbox-inline {\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  vertical-align: middle;\n  cursor: pointer;\n}\n\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\n\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\n.radio[disabled],\n.radio-inline[disabled],\n.checkbox[disabled],\n.checkbox-inline[disabled],\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"],\nfieldset[disabled] .radio,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\n\ntextarea.input-sm {\n  height: auto;\n}\n\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.33;\n  border-radius: 6px;\n}\n\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\n\ntextarea.input-lg {\n  height: auto;\n}\n\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline {\n  color: #8a6d3b;\n}\n\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #8a6d3b;\n}\n\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline {\n  color: #a94442;\n}\n\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n\n.has-error .input-group-addon {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #a94442;\n}\n\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline {\n  color: #3c763d;\n}\n\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n\n.has-success .input-group-addon {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #3c763d;\n}\n\n.form-control-static {\n  margin-bottom: 0;\n}\n\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n  }\n  .form-inline select.form-control {\n    width: auto;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    padding-left: 0;\n    margin-top: 0;\n    margin-bottom: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    float: none;\n    margin-left: 0;\n  }\n}\n\n.form-horizontal .control-label,\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  padding-top: 7px;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n\n.form-horizontal .form-group {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after {\n  display: table;\n  content: \" \";\n}\n\n.form-horizontal .form-group:after {\n  clear: both;\n}\n\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after {\n  display: table;\n  content: \" \";\n}\n\n.form-horizontal .form-group:after {\n  clear: both;\n}\n\n.form-horizontal .form-control-static {\n  padding-top: 7px;\n}\n\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    text-align: right;\n  }\n}\n\n.btn {\n  display: inline-block;\n  padding: 6px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.428571429;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  cursor: pointer;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n       -o-user-select: none;\n          user-select: none;\n}\n\n.btn:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n\n.btn:hover,\n.btn:focus {\n  color: #333333;\n  text-decoration: none;\n}\n\n.btn:active,\n.btn.active {\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  pointer-events: none;\n  cursor: not-allowed;\n  opacity: 0.65;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n\n.btn-default {\n  color: #333333;\n  background-color: #ffffff;\n  border-color: #cccccc;\n}\n\n.btn-default:hover,\n.btn-default:focus,\n.btn-default:active,\n.btn-default.active,\n.open .dropdown-toggle.btn-default {\n  color: #333333;\n  background-color: #ebebeb;\n  border-color: #adadad;\n}\n\n.btn-default:active,\n.btn-default.active,\n.open .dropdown-toggle.btn-default {\n  background-image: none;\n}\n\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #ffffff;\n  border-color: #cccccc;\n}\n\n.btn-default .badge {\n  color: #ffffff;\n  background-color: #fff;\n}\n\n.btn-primary {\n  color: #ffffff;\n  background-color: #428bca;\n  border-color: #357ebd;\n}\n\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary:active,\n.btn-primary.active,\n.open .dropdown-toggle.btn-primary {\n  color: #ffffff;\n  background-color: #3276b1;\n  border-color: #285e8e;\n}\n\n.btn-primary:active,\n.btn-primary.active,\n.open .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #428bca;\n  border-color: #357ebd;\n}\n\n.btn-primary .badge {\n  color: #428bca;\n  background-color: #fff;\n}\n\n.btn-warning {\n  color: #ffffff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n\n.btn-warning:hover,\n.btn-warning:focus,\n.btn-warning:active,\n.btn-warning.active,\n.open .dropdown-toggle.btn-warning {\n  color: #ffffff;\n  background-color: #ed9c28;\n  border-color: #d58512;\n}\n\n.btn-warning:active,\n.btn-warning.active,\n.open .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n\n.btn-danger {\n  color: #ffffff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger:active,\n.btn-danger.active,\n.open .dropdown-toggle.btn-danger {\n  color: #ffffff;\n  background-color: #d2322d;\n  border-color: #ac2925;\n}\n\n.btn-danger:active,\n.btn-danger.active,\n.open .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n\n.btn-success {\n  color: #ffffff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n\n.btn-success:hover,\n.btn-success:focus,\n.btn-success:active,\n.btn-success.active,\n.open .dropdown-toggle.btn-success {\n  color: #ffffff;\n  background-color: #47a447;\n  border-color: #398439;\n}\n\n.btn-success:active,\n.btn-success.active,\n.open .dropdown-toggle.btn-success {\n  background-image: none;\n}\n\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n\n.btn-info {\n  color: #ffffff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n\n.btn-info:hover,\n.btn-info:focus,\n.btn-info:active,\n.btn-info.active,\n.open .dropdown-toggle.btn-info {\n  color: #ffffff;\n  background-color: #39b3d7;\n  border-color: #269abc;\n}\n\n.btn-info:active,\n.btn-info.active,\n.open .dropdown-toggle.btn-info {\n  background-image: none;\n}\n\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n\n.btn-link {\n  font-weight: normal;\n  color: #428bca;\n  cursor: pointer;\n  border-radius: 0;\n}\n\n.btn-link,\n.btn-link:active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n\n.btn-link:hover,\n.btn-link:focus {\n  color: #2a6496;\n  text-decoration: underline;\n  background-color: transparent;\n}\n\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #999999;\n  text-decoration: none;\n}\n\n.btn-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.33;\n  border-radius: 6px;\n}\n\n.btn-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\n.btn-xs {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\n.btn-block {\n  display: block;\n  width: 100%;\n  padding-right: 0;\n  padding-left: 0;\n}\n\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\n\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity 0.15s linear;\n          transition: opacity 0.15s linear;\n}\n\n.fade.in {\n  opacity: 1;\n}\n\n.collapse {\n  display: none;\n}\n\n.collapse.in {\n  display: block;\n}\n\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition: height 0.35s ease;\n          transition: height 0.35s ease;\n}\n\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');\n}\n\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  -webkit-font-smoothing: antialiased;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.glyphicon:empty {\n  width: 1em;\n}\n\n.glyphicon-asterisk:before {\n  content: \"\\2a\";\n}\n\n.glyphicon-plus:before {\n  content: \"\\2b\";\n}\n\n.glyphicon-euro:before {\n  content: \"\\20ac\";\n}\n\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px solid;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n\n.dropdown {\n  position: relative;\n}\n\n.dropdown-toggle:focus {\n  outline: 0;\n}\n\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  font-size: 14px;\n  list-style: none;\n  background-color: #ffffff;\n  border: 1px solid #cccccc;\n  border: 1px solid rgba(0, 0, 0, 0.15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n          box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  background-clip: padding-box;\n}\n\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.428571429;\n  color: #333333;\n  white-space: nowrap;\n}\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  color: #262626;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #ffffff;\n  text-decoration: none;\n  background-color: #428bca;\n  outline: 0;\n}\n\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #999999;\n}\n\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.open > .dropdown-menu {\n  display: block;\n}\n\n.open > a {\n  outline: 0;\n}\n\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.428571429;\n  color: #999999;\n}\n\n.dropdown-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 990;\n}\n\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  border-top: 0;\n  border-bottom: 4px solid;\n  content: \"\";\n}\n\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 1px;\n}\n\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    right: 0;\n    left: auto;\n  }\n}\n\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus {\n  outline: none;\n}\n\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n\n.btn-toolbar:before,\n.btn-toolbar:after {\n  display: table;\n  content: \" \";\n}\n\n.btn-toolbar:after {\n  clear: both;\n}\n\n.btn-toolbar:before,\n.btn-toolbar:after {\n  display: table;\n  content: \" \";\n}\n\n.btn-toolbar:after {\n  clear: both;\n}\n\n.btn-toolbar .btn-group {\n  float: left;\n}\n\n.btn-toolbar > .btn + .btn,\n.btn-toolbar > .btn-group + .btn,\n.btn-toolbar > .btn + .btn-group,\n.btn-toolbar > .btn-group + .btn-group {\n  margin-left: 5px;\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.btn-group > .btn-group {\n  float: left;\n}\n\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n\n.btn-group > .btn-group:first-child > .btn:last-child,\n.btn-group > .btn-group:first-child > .dropdown-toggle {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.btn-group > .btn-group:last-child > .btn:first-child {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.33;\n  border-radius: 6px;\n}\n\n.btn-group > .btn + .dropdown-toggle {\n  padding-right: 8px;\n  padding-left: 8px;\n}\n\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-right: 12px;\n  padding-left: 12px;\n}\n\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n\n.btn .caret {\n  margin-left: 0;\n}\n\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after {\n  display: table;\n  content: \" \";\n}\n\n.btn-group-vertical > .btn-group:after {\n  clear: both;\n}\n\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after {\n  display: table;\n  content: \" \";\n}\n\n.btn-group-vertical > .btn-group:after {\n  clear: both;\n}\n\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-right-radius: 0;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 0;\n}\n\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n\n.btn-group-vertical > .btn-group:first-child > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n\n.btn-group-vertical > .btn-group:last-child > .btn:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  border-collapse: separate;\n  table-layout: fixed;\n}\n\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  display: table-cell;\n  float: none;\n  width: 1%;\n}\n\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n\n[data-toggle=\"buttons\"] > .btn > input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn > input[type=\"checkbox\"] {\n  display: none;\n}\n\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-right: 0;\n  padding-left: 0;\n}\n\n.input-group .form-control {\n  width: 100%;\n  margin-bottom: 0;\n}\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.33;\n  border-radius: 6px;\n}\n\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\n\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\n\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555555;\n  text-align: center;\n  background-color: #eeeeee;\n  border: 1px solid #cccccc;\n  border-radius: 4px;\n}\n\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.input-group-addon:first-child {\n  border-right: 0;\n}\n\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.input-group-addon:last-child {\n  border-left: 0;\n}\n\n.input-group-btn {\n  position: relative;\n  white-space: nowrap;\n}\n\n.input-group-btn:first-child > .btn {\n  margin-right: -1px;\n}\n\n.input-group-btn:last-child > .btn {\n  margin-left: -1px;\n}\n\n.input-group-btn > .btn {\n  position: relative;\n}\n\n.input-group-btn > .btn + .btn {\n  margin-left: -4px;\n}\n\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n\n.nav {\n  padding-left: 0;\n  margin-bottom: 0;\n  list-style: none;\n}\n\n.nav:before,\n.nav:after {\n  display: table;\n  content: \" \";\n}\n\n.nav:after {\n  clear: both;\n}\n\n.nav:before,\n.nav:after {\n  display: table;\n  content: \" \";\n}\n\n.nav:after {\n  clear: both;\n}\n\n.nav > li {\n  position: relative;\n  display: block;\n}\n\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n\n.nav > li.disabled > a {\n  color: #999999;\n}\n\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #999999;\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n}\n\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eeeeee;\n  border-color: #428bca;\n}\n\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n\n.nav > li > a > img {\n  max-width: none;\n}\n\n.nav-tabs {\n  border-bottom: 1px solid #dddddd;\n}\n\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.428571429;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n\n.nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #dddddd;\n}\n\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555555;\n  cursor: default;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n  border-bottom-color: transparent;\n}\n\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n\n.nav-tabs.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #dddddd;\n}\n\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #dddddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #ffffff;\n  }\n}\n\n.nav-pills > li {\n  float: left;\n}\n\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #ffffff;\n  background-color: #428bca;\n}\n\n.nav-stacked > li {\n  float: none;\n}\n\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n\n.nav-justified {\n  width: 100%;\n}\n\n.nav-justified > li {\n  float: none;\n}\n\n.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #dddddd;\n}\n\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #dddddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #ffffff;\n  }\n}\n\n.tab-content > .tab-pane {\n  display: none;\n}\n\n.tab-content > .active {\n  display: block;\n}\n\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n\n.navbar:before,\n.navbar:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar:after {\n  clear: both;\n}\n\n.navbar:before,\n.navbar:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar:after {\n  clear: both;\n}\n\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n\n.navbar-header:before,\n.navbar-header:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar-header:after {\n  clear: both;\n}\n\n.navbar-header:before,\n.navbar-header:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar-header:after {\n  clear: both;\n}\n\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n\n.navbar-collapse {\n  max-height: 340px;\n  padding-right: 15px;\n  padding-left: 15px;\n  overflow-x: visible;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n  -webkit-overflow-scrolling: touch;\n}\n\n.navbar-collapse:before,\n.navbar-collapse:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar-collapse:after {\n  clear: both;\n}\n\n.navbar-collapse:before,\n.navbar-collapse:after {\n  display: table;\n  content: \" \";\n}\n\n.navbar-collapse:after {\n  clear: both;\n}\n\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n\n.container > .navbar-header,\n.container > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n\n.navbar-brand {\n  float: left;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n}\n\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand {\n    margin-left: -15px;\n  }\n}\n\n.navbar-toggle {\n  position: relative;\n  float: right;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-right: 15px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n  .navbar-nav.navbar-right:last-child {\n    margin-right: -15px;\n  }\n}\n\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n  }\n}\n\n.navbar-form {\n  padding: 10px 15px;\n  margin-top: 8px;\n  margin-right: -15px;\n  margin-bottom: 8px;\n  margin-left: -15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n  }\n  .navbar-form select.form-control {\n    width: auto;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    padding-left: 0;\n    margin-top: 0;\n    margin-bottom: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    float: none;\n    margin-left: 0;\n  }\n}\n\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n}\n\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    padding-top: 0;\n    padding-bottom: 0;\n    margin-right: 0;\n    margin-left: 0;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-form.navbar-right:last-child {\n    margin-right: -15px;\n  }\n}\n\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n\n.navbar-nav.pull-right > li > .dropdown-menu,\n.navbar-nav > li > .dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-right: 15px;\n    margin-left: 15px;\n  }\n  .navbar-text.navbar-right:last-child {\n    margin-right: 0;\n  }\n}\n\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n\n.navbar-default .navbar-brand {\n  color: #777777;\n}\n\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n\n.navbar-default .navbar-text {\n  color: #777777;\n}\n\n.navbar-default .navbar-nav > li > a {\n  color: #777777;\n}\n\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333333;\n  background-color: transparent;\n}\n\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555555;\n  background-color: #e7e7e7;\n}\n\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #cccccc;\n  background-color: transparent;\n}\n\n.navbar-default .navbar-toggle {\n  border-color: #dddddd;\n}\n\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #dddddd;\n}\n\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #cccccc;\n}\n\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  color: #555555;\n  background-color: #e7e7e7;\n}\n\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #cccccc;\n    background-color: transparent;\n  }\n}\n\n.navbar-default .navbar-link {\n  color: #777777;\n}\n\n.navbar-default .navbar-link:hover {\n  color: #333333;\n}\n\n.navbar-inverse {\n  background-color: #222222;\n  border-color: #080808;\n}\n\n.navbar-inverse .navbar-brand {\n  color: #999999;\n}\n\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #ffffff;\n  background-color: transparent;\n}\n\n.navbar-inverse .navbar-text {\n  color: #999999;\n}\n\n.navbar-inverse .navbar-nav > li > a {\n  color: #999999;\n}\n\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #ffffff;\n  background-color: transparent;\n}\n\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #ffffff;\n  background-color: #080808;\n}\n\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444444;\n  background-color: transparent;\n}\n\n.navbar-inverse .navbar-toggle {\n  border-color: #333333;\n}\n\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333333;\n}\n\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #ffffff;\n}\n\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  color: #ffffff;\n  background-color: #080808;\n}\n\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #999999;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #ffffff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #ffffff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444444;\n    background-color: transparent;\n  }\n}\n\n.navbar-inverse .navbar-link {\n  color: #999999;\n}\n\n.navbar-inverse .navbar-link:hover {\n  color: #ffffff;\n}\n\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n\n.breadcrumb > li {\n  display: inline-block;\n}\n\n.breadcrumb > li + li:before {\n  padding: 0 5px;\n  color: #cccccc;\n  content: \"/\\00a0\";\n}\n\n.breadcrumb > .active {\n  color: #999999;\n}\n\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n\n.pagination > li {\n  display: inline;\n}\n\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  margin-left: -1px;\n  line-height: 1.428571429;\n  text-decoration: none;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n}\n\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n}\n\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  background-color: #eeeeee;\n}\n\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 2;\n  color: #ffffff;\n  cursor: default;\n  background-color: #428bca;\n  border-color: #428bca;\n}\n\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #999999;\n  cursor: not-allowed;\n  background-color: #ffffff;\n  border-color: #dddddd;\n}\n\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n}\n\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-bottom-left-radius: 6px;\n  border-top-left-radius: 6px;\n}\n\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n}\n\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-top-right-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  text-align: center;\n  list-style: none;\n}\n\n.pager:before,\n.pager:after {\n  display: table;\n  content: \" \";\n}\n\n.pager:after {\n  clear: both;\n}\n\n.pager:before,\n.pager:after {\n  display: table;\n  content: \" \";\n}\n\n.pager:after {\n  clear: both;\n}\n\n.pager li {\n  display: inline;\n}\n\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n  border-radius: 15px;\n}\n\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #999999;\n  cursor: not-allowed;\n  background-color: #ffffff;\n}\n\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #ffffff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\n\n.label[href]:hover,\n.label[href]:focus {\n  color: #ffffff;\n  text-decoration: none;\n  cursor: pointer;\n}\n\n.label:empty {\n  display: none;\n}\n\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n\n.label-default {\n  background-color: #999999;\n}\n\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #808080;\n}\n\n.label-primary {\n  background-color: #428bca;\n}\n\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #3071a9;\n}\n\n.label-success {\n  background-color: #5cb85c;\n}\n\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n\n.label-info {\n  background-color: #5bc0de;\n}\n\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n\n.label-warning {\n  background-color: #f0ad4e;\n}\n\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n\n.label-danger {\n  background-color: #d9534f;\n}\n\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  line-height: 1;\n  color: #ffffff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  background-color: #999999;\n  border-radius: 10px;\n}\n\n.badge:empty {\n  display: none;\n}\n\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n\na.badge:hover,\na.badge:focus {\n  color: #ffffff;\n  text-decoration: none;\n  cursor: pointer;\n}\n\na.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #428bca;\n  background-color: #ffffff;\n}\n\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n\n.jumbotron {\n  padding: 30px;\n  margin-bottom: 30px;\n  font-size: 21px;\n  font-weight: 200;\n  line-height: 2.1428571435;\n  color: inherit;\n  background-color: #eeeeee;\n}\n\n.jumbotron h1,\n.jumbotron .h1 {\n  line-height: 1;\n  color: inherit;\n}\n\n.jumbotron p {\n  line-height: 1.4;\n}\n\n.container .jumbotron {\n  border-radius: 6px;\n}\n\n.jumbotron .container {\n  max-width: 100%;\n}\n\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron {\n    padding-right: 60px;\n    padding-left: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.428571429;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n  border-radius: 4px;\n  -webkit-transition: all 0.2s ease-in-out;\n          transition: all 0.2s ease-in-out;\n}\n\n.thumbnail > img,\n.thumbnail a > img {\n  display: block;\n  height: auto;\n  max-width: 100%;\n  margin-right: auto;\n  margin-left: auto;\n}\n\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #428bca;\n}\n\n.thumbnail .caption {\n  padding: 9px;\n  color: #333333;\n}\n\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n\n.alert .alert-link {\n  font-weight: bold;\n}\n\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n\n.alert > p + p {\n  margin-top: 5px;\n}\n\n.alert-dismissable {\n  padding-right: 35px;\n}\n\n.alert-dismissable .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n\n.alert-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n\n.alert-success .alert-link {\n  color: #2b542c;\n}\n\n.alert-info {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n\n.alert-info .alert-link {\n  color: #245269;\n}\n\n.alert-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n\n.alert-warning .alert-link {\n  color: #66512c;\n}\n\n.alert-danger {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n\n.alert-danger .alert-link {\n  color: #843534;\n}\n\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n\n.progress {\n  height: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n\n.progress-bar {\n  float: left;\n  width: 0;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #ffffff;\n  text-align: center;\n  background-color: #428bca;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  -webkit-transition: width 0.6s ease;\n          transition: width 0.6s ease;\n}\n\n.progress-striped .progress-bar {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-size: 40px 40px;\n}\n\n.progress.active .progress-bar {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n          animation: progress-bar-stripes 2s linear infinite;\n}\n\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.media,\n.media-body {\n  overflow: hidden;\n  zoom: 1;\n}\n\n.media,\n.media .media {\n  margin-top: 15px;\n}\n\n.media:first-child {\n  margin-top: 0;\n}\n\n.media-object {\n  display: block;\n}\n\n.media-heading {\n  margin: 0 0 5px;\n}\n\n.media > .pull-left {\n  margin-right: 10px;\n}\n\n.media > .pull-right {\n  margin-left: 10px;\n}\n\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n\n.list-group {\n  padding-left: 0;\n  margin-bottom: 20px;\n}\n\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #ffffff;\n  border: 1px solid #dddddd;\n}\n\n.list-group-item:first-child {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n}\n\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n\n.list-group-item > .badge {\n  float: right;\n}\n\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n\na.list-group-item {\n  color: #555555;\n}\n\na.list-group-item .list-group-item-heading {\n  color: #333333;\n}\n\na.list-group-item:hover,\na.list-group-item:focus {\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n\na.list-group-item.active,\na.list-group-item.active:hover,\na.list-group-item.active:focus {\n  z-index: 2;\n  color: #ffffff;\n  background-color: #428bca;\n  border-color: #428bca;\n}\n\na.list-group-item.active .list-group-item-heading,\na.list-group-item.active:hover .list-group-item-heading,\na.list-group-item.active:focus .list-group-item-heading {\n  color: inherit;\n}\n\na.list-group-item.active .list-group-item-text,\na.list-group-item.active:hover .list-group-item-text,\na.list-group-item.active:focus .list-group-item-text {\n  color: #e1edf7;\n}\n\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n\n.panel {\n  margin-bottom: 20px;\n  background-color: #ffffff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n\n.panel-body {\n  padding: 15px;\n}\n\n.panel-body:before,\n.panel-body:after {\n  display: table;\n  content: \" \";\n}\n\n.panel-body:after {\n  clear: both;\n}\n\n.panel-body:before,\n.panel-body:after {\n  display: table;\n  content: \" \";\n}\n\n.panel-body:after {\n  clear: both;\n}\n\n.panel > .list-group {\n  margin-bottom: 0;\n}\n\n.panel > .list-group .list-group-item {\n  border-width: 1px 0;\n}\n\n.panel > .list-group .list-group-item:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n\n.panel > .list-group .list-group-item:last-child {\n  border-bottom: 0;\n}\n\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n\n.panel > .table,\n.panel > .table-responsive > .table {\n  margin-bottom: 0;\n}\n\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive {\n  border-top: 1px solid #dddddd;\n}\n\n.panel > .table > tbody:first-child th,\n.panel > .table > tbody:first-child td {\n  border-top: 0;\n}\n\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n\n.panel > .table-bordered > thead > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:last-child > th,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-bordered > thead > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n  border-bottom: 0;\n}\n\n.panel > .table-responsive {\n  margin-bottom: 0;\n  border: 0;\n}\n\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n\n.panel-title > a {\n  color: inherit;\n}\n\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #dddddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n\n.panel-group .panel {\n  margin-bottom: 0;\n  overflow: hidden;\n  border-radius: 4px;\n}\n\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n\n.panel-group .panel-heading + .panel-collapse .panel-body {\n  border-top: 1px solid #dddddd;\n}\n\n.panel-group .panel-footer {\n  border-top: 0;\n}\n\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #dddddd;\n}\n\n.panel-default {\n  border-color: #dddddd;\n}\n\n.panel-default > .panel-heading {\n  color: #333333;\n  background-color: #f5f5f5;\n  border-color: #dddddd;\n}\n\n.panel-default > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #dddddd;\n}\n\n.panel-default > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #dddddd;\n}\n\n.panel-primary {\n  border-color: #428bca;\n}\n\n.panel-primary > .panel-heading {\n  color: #ffffff;\n  background-color: #428bca;\n  border-color: #428bca;\n}\n\n.panel-primary > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #428bca;\n}\n\n.panel-primary > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #428bca;\n}\n\n.panel-success {\n  border-color: #d6e9c6;\n}\n\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n\n.panel-success > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #d6e9c6;\n}\n\n.panel-success > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n\n.panel-warning {\n  border-color: #faebcc;\n}\n\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n\n.panel-warning > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #faebcc;\n}\n\n.panel-warning > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #faebcc;\n}\n\n.panel-danger {\n  border-color: #ebccd1;\n}\n\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n\n.panel-danger > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #ebccd1;\n}\n\n.panel-danger > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #ebccd1;\n}\n\n.panel-info {\n  border-color: #bce8f1;\n}\n\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n\n.panel-info > .panel-heading + .panel-collapse .panel-body {\n  border-top-color: #bce8f1;\n}\n\n.panel-info > .panel-footer + .panel-collapse .panel-body {\n  border-bottom-color: #bce8f1;\n}\n\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, 0.15);\n}\n\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000000;\n  text-shadow: 0 1px 0 #ffffff;\n  opacity: 0.2;\n  filter: alpha(opacity=20);\n}\n\n.close:hover,\n.close:focus {\n  color: #000000;\n  text-decoration: none;\n  cursor: pointer;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n\nbutton.close {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  -webkit-appearance: none;\n}\n\n.modal-open {\n  overflow: hidden;\n}\n\n.modal {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  display: none;\n  overflow: auto;\n  overflow-y: scroll;\n}\n\n.modal.fade .modal-dialog {\n  -webkit-transform: translate(0, -25%);\n      -ms-transform: translate(0, -25%);\n          transform: translate(0, -25%);\n  -webkit-transition: -webkit-transform 0.3s ease-out;\n     -moz-transition: -moz-transform 0.3s ease-out;\n       -o-transition: -o-transform 0.3s ease-out;\n          transition: transform 0.3s ease-out;\n}\n\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n      -ms-transform: translate(0, 0);\n          transform: translate(0, 0);\n}\n\n.modal-dialog {\n  position: relative;\n  z-index: 1050;\n  width: auto;\n  margin: 10px;\n}\n\n.modal-content {\n  position: relative;\n  background-color: #ffffff;\n  border: 1px solid #999999;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  outline: none;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n          box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  background-clip: padding-box;\n}\n\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1030;\n  background-color: #000000;\n}\n\n.modal-backdrop.fade {\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n\n.modal-backdrop.in {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n\n.modal-header {\n  min-height: 16.428571429px;\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n\n.modal-header .close {\n  margin-top: -2px;\n}\n\n.modal-title {\n  margin: 0;\n  line-height: 1.428571429;\n}\n\n.modal-body {\n  position: relative;\n  padding: 20px;\n}\n\n.modal-footer {\n  padding: 19px 20px 20px;\n  margin-top: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n\n.modal-footer:after {\n  clear: both;\n}\n\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n\n.modal-footer:after {\n  clear: both;\n}\n\n.modal-footer .btn + .btn {\n  margin-bottom: 0;\n  margin-left: 5px;\n}\n\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n\n@media screen and (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n  }\n}\n\n.tooltip {\n  position: absolute;\n  z-index: 1030;\n  display: block;\n  font-size: 12px;\n  line-height: 1.4;\n  opacity: 0;\n  filter: alpha(opacity=0);\n  visibility: visible;\n}\n\n.tooltip.in {\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n\n.tooltip.top {\n  padding: 5px 0;\n  margin-top: -3px;\n}\n\n.tooltip.right {\n  padding: 0 5px;\n  margin-left: 3px;\n}\n\n.tooltip.bottom {\n  padding: 5px 0;\n  margin-top: 3px;\n}\n\n.tooltip.left {\n  padding: 0 5px;\n  margin-left: -3px;\n}\n\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #ffffff;\n  text-align: center;\n  text-decoration: none;\n  background-color: #000000;\n  border-radius: 4px;\n}\n\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-top-color: #000000;\n  border-width: 5px 5px 0;\n}\n\n.tooltip.top-left .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  border-top-color: #000000;\n  border-width: 5px 5px 0;\n}\n\n.tooltip.top-right .tooltip-arrow {\n  right: 5px;\n  bottom: 0;\n  border-top-color: #000000;\n  border-width: 5px 5px 0;\n}\n\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-right-color: #000000;\n  border-width: 5px 5px 5px 0;\n}\n\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-left-color: #000000;\n  border-width: 5px 0 5px 5px;\n}\n\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-bottom-color: #000000;\n  border-width: 0 5px 5px;\n}\n\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  border-bottom-color: #000000;\n  border-width: 0 5px 5px;\n}\n\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  border-bottom-color: #000000;\n  border-width: 0 5px 5px;\n}\n\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1010;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  text-align: left;\n  white-space: normal;\n  background-color: #ffffff;\n  border: 1px solid #cccccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  background-clip: padding-box;\n}\n\n.popover.top {\n  margin-top: -10px;\n}\n\n.popover.right {\n  margin-left: 10px;\n}\n\n.popover.bottom {\n  margin-top: 10px;\n}\n\n.popover.left {\n  margin-left: -10px;\n}\n\n.popover-title {\n  padding: 8px 14px;\n  margin: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 18px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n\n.popover-content {\n  padding: 9px 14px;\n}\n\n.popover .arrow,\n.popover .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n\n.popover .arrow {\n  border-width: 11px;\n}\n\n.popover .arrow:after {\n  border-width: 10px;\n  content: \"\";\n}\n\n.popover.top .arrow {\n  bottom: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-color: #999999;\n  border-top-color: rgba(0, 0, 0, 0.25);\n  border-bottom-width: 0;\n}\n\n.popover.top .arrow:after {\n  bottom: 1px;\n  margin-left: -10px;\n  border-top-color: #ffffff;\n  border-bottom-width: 0;\n  content: \" \";\n}\n\n.popover.right .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-right-color: #999999;\n  border-right-color: rgba(0, 0, 0, 0.25);\n  border-left-width: 0;\n}\n\n.popover.right .arrow:after {\n  bottom: -10px;\n  left: 1px;\n  border-right-color: #ffffff;\n  border-left-width: 0;\n  content: \" \";\n}\n\n.popover.bottom .arrow {\n  top: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-bottom-color: #999999;\n  border-bottom-color: rgba(0, 0, 0, 0.25);\n  border-top-width: 0;\n}\n\n.popover.bottom .arrow:after {\n  top: 1px;\n  margin-left: -10px;\n  border-bottom-color: #ffffff;\n  border-top-width: 0;\n  content: \" \";\n}\n\n.popover.left .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-left-color: #999999;\n  border-left-color: rgba(0, 0, 0, 0.25);\n  border-right-width: 0;\n}\n\n.popover.left .arrow:after {\n  right: 1px;\n  bottom: -10px;\n  border-left-color: #ffffff;\n  border-right-width: 0;\n  content: \" \";\n}\n\n.carousel {\n  position: relative;\n}\n\n.carousel-inner {\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n}\n\n.carousel-inner > .item {\n  position: relative;\n  display: none;\n  -webkit-transition: 0.6s ease-in-out left;\n          transition: 0.6s ease-in-out left;\n}\n\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  height: auto;\n  max-width: 100%;\n  line-height: 1;\n}\n\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n\n.carousel-inner > .active {\n  left: 0;\n}\n\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n\n.carousel-inner > .next {\n  left: 100%;\n}\n\n.carousel-inner > .prev {\n  left: -100%;\n}\n\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n\n.carousel-inner > .active.left {\n  left: -100%;\n}\n\n.carousel-inner > .active.right {\n  left: 100%;\n}\n\n.carousel-control {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 15%;\n  font-size: 20px;\n  color: #ffffff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%));\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n\n.carousel-control.right {\n  right: 0;\n  left: auto;\n  background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%));\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n\n.carousel-control:hover,\n.carousel-control:focus {\n  color: #ffffff;\n  text-decoration: none;\n  outline: none;\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  z-index: 5;\n  display: inline-block;\n}\n\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n}\n\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n}\n\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  margin-top: -10px;\n  margin-left: -10px;\n  font-family: serif;\n}\n\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  padding-left: 0;\n  margin-left: -30%;\n  text-align: center;\n  list-style: none;\n}\n\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n  border: 1px solid #ffffff;\n  border-radius: 10px;\n}\n\n.carousel-indicators .active {\n  width: 12px;\n  height: 12px;\n  margin: 0;\n  background-color: #ffffff;\n}\n\n.carousel-caption {\n  position: absolute;\n  right: 15%;\n  bottom: 20px;\n  left: 15%;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #ffffff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n\n.carousel-caption .btn {\n  text-shadow: none;\n}\n\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicons-chevron-left,\n  .carousel-control .glyphicons-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -15px;\n    margin-left: -15px;\n    font-size: 30px;\n  }\n  .carousel-caption {\n    right: 20%;\n    left: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n\n.clearfix:before,\n.clearfix:after {\n  display: table;\n  content: \" \";\n}\n\n.clearfix:after {\n  clear: both;\n}\n\n.center-block {\n  display: block;\n  margin-right: auto;\n  margin-left: auto;\n}\n\n.pull-right {\n  float: right !important;\n}\n\n.pull-left {\n  float: left !important;\n}\n\n.hide {\n  display: none !important;\n}\n\n.show {\n  display: block !important;\n}\n\n.invisible {\n  visibility: hidden;\n}\n\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n\n.hidden {\n  display: none !important;\n  visibility: hidden !important;\n}\n\n.affix {\n  position: fixed;\n}\n\n@-ms-viewport {\n  width: device-width;\n}\n\n.visible-xs,\ntr.visible-xs,\nth.visible-xs,\ntd.visible-xs {\n  display: none !important;\n}\n\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-xs.visible-sm {\n    display: block !important;\n  }\n  table.visible-xs.visible-sm {\n    display: table;\n  }\n  tr.visible-xs.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-xs.visible-sm,\n  td.visible-xs.visible-sm {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-xs.visible-md {\n    display: block !important;\n  }\n  table.visible-xs.visible-md {\n    display: table;\n  }\n  tr.visible-xs.visible-md {\n    display: table-row !important;\n  }\n  th.visible-xs.visible-md,\n  td.visible-xs.visible-md {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .visible-xs.visible-lg {\n    display: block !important;\n  }\n  table.visible-xs.visible-lg {\n    display: table;\n  }\n  tr.visible-xs.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-xs.visible-lg,\n  td.visible-xs.visible-lg {\n    display: table-cell !important;\n  }\n}\n\n.visible-sm,\ntr.visible-sm,\nth.visible-sm,\ntd.visible-sm {\n  display: none !important;\n}\n\n@media (max-width: 767px) {\n  .visible-sm.visible-xs {\n    display: block !important;\n  }\n  table.visible-sm.visible-xs {\n    display: table;\n  }\n  tr.visible-sm.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-sm.visible-xs,\n  td.visible-sm.visible-xs {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-sm.visible-md {\n    display: block !important;\n  }\n  table.visible-sm.visible-md {\n    display: table;\n  }\n  tr.visible-sm.visible-md {\n    display: table-row !important;\n  }\n  th.visible-sm.visible-md,\n  td.visible-sm.visible-md {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .visible-sm.visible-lg {\n    display: block !important;\n  }\n  table.visible-sm.visible-lg {\n    display: table;\n  }\n  tr.visible-sm.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-sm.visible-lg,\n  td.visible-sm.visible-lg {\n    display: table-cell !important;\n  }\n}\n\n.visible-md,\ntr.visible-md,\nth.visible-md,\ntd.visible-md {\n  display: none !important;\n}\n\n@media (max-width: 767px) {\n  .visible-md.visible-xs {\n    display: block !important;\n  }\n  table.visible-md.visible-xs {\n    display: table;\n  }\n  tr.visible-md.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-md.visible-xs,\n  td.visible-md.visible-xs {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-md.visible-sm {\n    display: block !important;\n  }\n  table.visible-md.visible-sm {\n    display: table;\n  }\n  tr.visible-md.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-md.visible-sm,\n  td.visible-md.visible-sm {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .visible-md.visible-lg {\n    display: block !important;\n  }\n  table.visible-md.visible-lg {\n    display: table;\n  }\n  tr.visible-md.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-md.visible-lg,\n  td.visible-md.visible-lg {\n    display: table-cell !important;\n  }\n}\n\n.visible-lg,\ntr.visible-lg,\nth.visible-lg,\ntd.visible-lg {\n  display: none !important;\n}\n\n@media (max-width: 767px) {\n  .visible-lg.visible-xs {\n    display: block !important;\n  }\n  table.visible-lg.visible-xs {\n    display: table;\n  }\n  tr.visible-lg.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-lg.visible-xs,\n  td.visible-lg.visible-xs {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-lg.visible-sm {\n    display: block !important;\n  }\n  table.visible-lg.visible-sm {\n    display: table;\n  }\n  tr.visible-lg.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-lg.visible-sm,\n  td.visible-lg.visible-sm {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-lg.visible-md {\n    display: block !important;\n  }\n  table.visible-lg.visible-md {\n    display: table;\n  }\n  tr.visible-lg.visible-md {\n    display: table-row !important;\n  }\n  th.visible-lg.visible-md,\n  td.visible-lg.visible-md {\n    display: table-cell !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n\n.hidden-xs {\n  display: block !important;\n}\n\ntable.hidden-xs {\n  display: table;\n}\n\ntr.hidden-xs {\n  display: table-row !important;\n}\n\nth.hidden-xs,\ntd.hidden-xs {\n  display: table-cell !important;\n}\n\n@media (max-width: 767px) {\n  .hidden-xs,\n  tr.hidden-xs,\n  th.hidden-xs,\n  td.hidden-xs {\n    display: none !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-xs.hidden-sm,\n  tr.hidden-xs.hidden-sm,\n  th.hidden-xs.hidden-sm,\n  td.hidden-xs.hidden-sm {\n    display: none !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-xs.hidden-md,\n  tr.hidden-xs.hidden-md,\n  th.hidden-xs.hidden-md,\n  td.hidden-xs.hidden-md {\n    display: none !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .hidden-xs.hidden-lg,\n  tr.hidden-xs.hidden-lg,\n  th.hidden-xs.hidden-lg,\n  td.hidden-xs.hidden-lg {\n    display: none !important;\n  }\n}\n\n.hidden-sm {\n  display: block !important;\n}\n\ntable.hidden-sm {\n  display: table;\n}\n\ntr.hidden-sm {\n  display: table-row !important;\n}\n\nth.hidden-sm,\ntd.hidden-sm {\n  display: table-cell !important;\n}\n\n@media (max-width: 767px) {\n  .hidden-sm.hidden-xs,\n  tr.hidden-sm.hidden-xs,\n  th.hidden-sm.hidden-xs,\n  td.hidden-sm.hidden-xs {\n    display: none !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm,\n  tr.hidden-sm,\n  th.hidden-sm,\n  td.hidden-sm {\n    display: none !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-sm.hidden-md,\n  tr.hidden-sm.hidden-md,\n  th.hidden-sm.hidden-md,\n  td.hidden-sm.hidden-md {\n    display: none !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .hidden-sm.hidden-lg,\n  tr.hidden-sm.hidden-lg,\n  th.hidden-sm.hidden-lg,\n  td.hidden-sm.hidden-lg {\n    display: none !important;\n  }\n}\n\n.hidden-md {\n  display: block !important;\n}\n\ntable.hidden-md {\n  display: table;\n}\n\ntr.hidden-md {\n  display: table-row !important;\n}\n\nth.hidden-md,\ntd.hidden-md {\n  display: table-cell !important;\n}\n\n@media (max-width: 767px) {\n  .hidden-md.hidden-xs,\n  tr.hidden-md.hidden-xs,\n  th.hidden-md.hidden-xs,\n  td.hidden-md.hidden-xs {\n    display: none !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-md.hidden-sm,\n  tr.hidden-md.hidden-sm,\n  th.hidden-md.hidden-sm,\n  td.hidden-md.hidden-sm {\n    display: none !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md,\n  tr.hidden-md,\n  th.hidden-md,\n  td.hidden-md {\n    display: none !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .hidden-md.hidden-lg,\n  tr.hidden-md.hidden-lg,\n  th.hidden-md.hidden-lg,\n  td.hidden-md.hidden-lg {\n    display: none !important;\n  }\n}\n\n.hidden-lg {\n  display: block !important;\n}\n\ntable.hidden-lg {\n  display: table;\n}\n\ntr.hidden-lg {\n  display: table-row !important;\n}\n\nth.hidden-lg,\ntd.hidden-lg {\n  display: table-cell !important;\n}\n\n@media (max-width: 767px) {\n  .hidden-lg.hidden-xs,\n  tr.hidden-lg.hidden-xs,\n  th.hidden-lg.hidden-xs,\n  td.hidden-lg.hidden-xs {\n    display: none !important;\n  }\n}\n\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-lg.hidden-sm,\n  tr.hidden-lg.hidden-sm,\n  th.hidden-lg.hidden-sm,\n  td.hidden-lg.hidden-sm {\n    display: none !important;\n  }\n}\n\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-lg.hidden-md,\n  tr.hidden-lg.hidden-md,\n  th.hidden-lg.hidden-md,\n  td.hidden-lg.hidden-md {\n    display: none !important;\n  }\n}\n\n@media (min-width: 1200px) {\n  .hidden-lg,\n  tr.hidden-lg,\n  th.hidden-lg,\n  td.hidden-lg {\n    display: none !important;\n  }\n}\n\n.visible-print,\ntr.visible-print,\nth.visible-print,\ntd.visible-print {\n  display: none !important;\n}\n\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n  .hidden-print,\n  tr.hidden-print,\n  th.hidden-print,\n  td.hidden-print {\n    display: none !important;\n  }\n}"
  },
  {
    "path": "ouimeaux/server/static/css/main.css",
    "content": ".navbar {\n    padding-left: 25px;\n}\n\n.header-section {\n\tpadding: 30px 30px;\n\tbackground: #222;\n\tposition: absolute;\n\ttop: 50px;\n\tleft: 0px;\n\twidth: 100%;\n\tmargin-left: 0;\n\tcolor: #FFF;\n}\n\n.main {\n\tpadding-top: 20px;\n\tmin-height: 370px;\n}\n\n.footer-left {\n    padding-left: 30px;\n\tfloat: left;\n}\n\n.btn {\n    text-align: left;\n}\n\n.btn-icon {\n    margin-left: 15px;\n    margin-right: 15px;\n}"
  },
  {
    "path": "ouimeaux/server/static/js/app.js",
    "content": "'use strict';\n\nangular.module('Ouimeaux', ['Ouimeaux.controllers', 'btford.socket-io'])\n.config(['$routeProvider', '$locationProvider',\n    function($routeProvider, $locationProvider) {\n      $routeProvider\n        .when('/', {\n          templateUrl: 'static/partials/landing.html',\n          controller: 'IndexCtrl'\n        });\n      $locationProvider.html5Mode(true);\n    }\n]);"
  },
  {
    "path": "ouimeaux/server/static/js/bootstrap.js",
    "content": "/*!\n * Bootstrap v3.0.3 (http://getbootstrap.com)\n * Copyright 2013 Twitter, Inc.\n * Licensed under http://www.apache.org/licenses/LICENSE-2.0\n */\n\nif (typeof jQuery === \"undefined\") { throw new Error(\"Bootstrap requires jQuery\") }\n\n/* ========================================================================\n * Bootstrap: transition.js v3.0.3\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      'WebkitTransition' : 'webkitTransitionEnd'\n    , 'MozTransition'    : 'transitionend'\n    , 'OTransition'      : 'oTransitionEnd otransitionend'\n    , 'transition'       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n  }\n\n  // http://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false, $el = this\n    $(this).one($.support.transition.end, function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: alert.js v3.0.3\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // ALERT CLASS DEFINITION\n  // ======================\n\n  var dismiss = '[data-dismiss=\"alert\"]'\n  var Alert   = function (el) {\n    $(el).on('click', dismiss, this.close)\n  }\n\n  Alert.prototype.close = function (e) {\n    var $this    = $(this)\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = $(selector)\n\n    if (e) e.preventDefault()\n\n    if (!$parent.length) {\n      $parent = $this.hasClass('alert') ? $this : $this.parent()\n    }\n\n    $parent.trigger(e = $.Event('close.bs.alert'))\n\n    if (e.isDefaultPrevented()) return\n\n    $parent.removeClass('in')\n\n    function removeElement() {\n      $parent.trigger('closed.bs.alert').remove()\n    }\n\n    $.support.transition && $parent.hasClass('fade') ?\n      $parent\n        .one($.support.transition.end, removeElement)\n        .emulateTransitionEnd(150) :\n      removeElement()\n  }\n\n\n  // ALERT PLUGIN DEFINITION\n  // =======================\n\n  var old = $.fn.alert\n\n  $.fn.alert = function (option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.alert')\n\n      if (!data) $this.data('bs.alert', (data = new Alert(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  $.fn.alert.Constructor = Alert\n\n\n  // ALERT NO CONFLICT\n  // =================\n\n  $.fn.alert.noConflict = function () {\n    $.fn.alert = old\n    return this\n  }\n\n\n  // ALERT DATA-API\n  // ==============\n\n  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: button.js v3.0.3\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // BUTTON PUBLIC CLASS DEFINITION\n  // ==============================\n\n  var Button = function (element, options) {\n    this.$element = $(element)\n    this.options  = $.extend({}, Button.DEFAULTS, options)\n  }\n\n  Button.DEFAULTS = {\n    loadingText: 'loading...'\n  }\n\n  Button.prototype.setState = function (state) {\n    var d    = 'disabled'\n    var $el  = this.$element\n    var val  = $el.is('input') ? 'val' : 'html'\n    var data = $el.data()\n\n    state = state + 'Text'\n\n    if (!data.resetText) $el.data('resetText', $el[val]())\n\n    $el[val](data[state] || this.options[state])\n\n    // push to event loop to allow forms to submit\n    setTimeout(function () {\n      state == 'loadingText' ?\n        $el.addClass(d).attr(d, d) :\n        $el.removeClass(d).removeAttr(d);\n    }, 0)\n  }\n\n  Button.prototype.toggle = function () {\n    var $parent = this.$element.closest('[data-toggle=\"buttons\"]')\n    var changed = true\n\n    if ($parent.length) {\n      var $input = this.$element.find('input')\n      if ($input.prop('type') === 'radio') {\n        // see if clicking on current one\n        if ($input.prop('checked') && this.$element.hasClass('active'))\n          changed = false\n        else\n          $parent.find('.active').removeClass('active')\n      }\n      if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')\n    }\n\n    if (changed) this.$element.toggleClass('active')\n  }\n\n\n  // BUTTON PLUGIN DEFINITION\n  // ========================\n\n  var old = $.fn.button\n\n  $.fn.button = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.button')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n      if (option == 'toggle') data.toggle()\n      else if (option) data.setState(option)\n    })\n  }\n\n  $.fn.button.Constructor = Button\n\n\n  // BUTTON NO CONFLICT\n  // ==================\n\n  $.fn.button.noConflict = function () {\n    $.fn.button = old\n    return this\n  }\n\n\n  // BUTTON DATA-API\n  // ===============\n\n  $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {\n    var $btn = $(e.target)\n    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')\n    $btn.button('toggle')\n    e.preventDefault()\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: carousel.js v3.0.3\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // CAROUSEL CLASS DEFINITION\n  // =========================\n\n  var Carousel = function (element, options) {\n    this.$element    = $(element)\n    this.$indicators = this.$element.find('.carousel-indicators')\n    this.options     = options\n    this.paused      =\n    this.sliding     =\n    this.interval    =\n    this.$active     =\n    this.$items      = null\n\n    this.options.pause == 'hover' && this.$element\n      .on('mouseenter', $.proxy(this.pause, this))\n      .on('mouseleave', $.proxy(this.cycle, this))\n  }\n\n  Carousel.DEFAULTS = {\n    interval: 5000\n  , pause: 'hover'\n  , wrap: true\n  }\n\n  Carousel.prototype.cycle =  function (e) {\n    e || (this.paused = false)\n\n    this.interval && clearInterval(this.interval)\n\n    this.options.interval\n      && !this.paused\n      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n    return this\n  }\n\n  Carousel.prototype.getActiveIndex = function () {\n    this.$active = this.$element.find('.item.active')\n    this.$items  = this.$active.parent().children()\n\n    return this.$items.index(this.$active)\n  }\n\n  Carousel.prototype.to = function (pos) {\n    var that        = this\n    var activeIndex = this.getActiveIndex()\n\n    if (pos > (this.$items.length - 1) || pos < 0) return\n\n    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) })\n    if (activeIndex == pos) return this.pause().cycle()\n\n    return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))\n  }\n\n  Carousel.prototype.pause = function (e) {\n    e || (this.paused = true)\n\n    if (this.$element.find('.next, .prev').length && $.support.transition.end) {\n      this.$element.trigger($.support.transition.end)\n      this.cycle(true)\n    }\n\n    this.interval = clearInterval(this.interval)\n\n    return this\n  }\n\n  Carousel.prototype.next = function () {\n    if (this.sliding) return\n    return this.slide('next')\n  }\n\n  Carousel.prototype.prev = function () {\n    if (this.sliding) return\n    return this.slide('prev')\n  }\n\n  Carousel.prototype.slide = function (type, next) {\n    var $active   = this.$element.find('.item.active')\n    var $next     = next || $active[type]()\n    var isCycling = this.interval\n    var direction = type == 'next' ? 'left' : 'right'\n    var fallback  = type == 'next' ? 'first' : 'last'\n    var that      = this\n\n    if (!$next.length) {\n      if (!this.options.wrap) return\n      $next = this.$element.find('.item')[fallback]()\n    }\n\n    this.sliding = true\n\n    isCycling && this.pause()\n\n    var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })\n\n    if ($next.hasClass('active')) return\n\n    if (this.$indicators.length) {\n      this.$indicators.find('.active').removeClass('active')\n      this.$element.one('slid.bs.carousel', function () {\n        var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])\n        $nextIndicator && $nextIndicator.addClass('active')\n      })\n    }\n\n    if ($.support.transition && this.$element.hasClass('slide')) {\n      this.$element.trigger(e)\n      if (e.isDefaultPrevented()) return\n      $next.addClass(type)\n      $next[0].offsetWidth // force reflow\n      $active.addClass(direction)\n      $next.addClass(direction)\n      $active\n        .one($.support.transition.end, function () {\n          $next.removeClass([type, direction].join(' ')).addClass('active')\n          $active.removeClass(['active', direction].join(' '))\n          that.sliding = false\n          setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)\n        })\n        .emulateTransitionEnd(600)\n    } else {\n      this.$element.trigger(e)\n      if (e.isDefaultPrevented()) return\n      $active.removeClass('active')\n      $next.addClass('active')\n      this.sliding = false\n      this.$element.trigger('slid.bs.carousel')\n    }\n\n    isCycling && this.cycle()\n\n    return this\n  }\n\n\n  // CAROUSEL PLUGIN DEFINITION\n  // ==========================\n\n  var old = $.fn.carousel\n\n  $.fn.carousel = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.carousel')\n      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n      var action  = typeof option == 'string' ? option : options.slide\n\n      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n      if (typeof option == 'number') data.to(option)\n      else if (action) data[action]()\n      else if (options.interval) data.pause().cycle()\n    })\n  }\n\n  $.fn.carousel.Constructor = Carousel\n\n\n  // CAROUSEL NO CONFLICT\n  // ====================\n\n  $.fn.carousel.noConflict = function () {\n    $.fn.carousel = old\n    return this\n  }\n\n\n  // CAROUSEL DATA-API\n  // =================\n\n  $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {\n    var $this   = $(this), href\n    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) //strip for ie7\n    var options = $.extend({}, $target.data(), $this.data())\n    var slideIndex = $this.attr('data-slide-to')\n    if (slideIndex) options.interval = false\n\n    $target.carousel(options)\n\n    if (slideIndex = $this.attr('data-slide-to')) {\n      $target.data('bs.carousel').to(slideIndex)\n    }\n\n    e.preventDefault()\n  })\n\n  $(window).on('load', function () {\n    $('[data-ride=\"carousel\"]').each(function () {\n      var $carousel = $(this)\n      $carousel.carousel($carousel.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: collapse.js v3.0.3\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // COLLAPSE PUBLIC CLASS DEFINITION\n  // ================================\n\n  var Collapse = function (element, options) {\n    this.$element      = $(element)\n    this.options       = $.extend({}, Collapse.DEFAULTS, options)\n    this.transitioning = null\n\n    if (this.options.parent) this.$parent = $(this.options.parent)\n    if (this.options.toggle) this.toggle()\n  }\n\n  Collapse.DEFAULTS = {\n    toggle: true\n  }\n\n  Collapse.prototype.dimension = function () {\n    var hasWidth = this.$element.hasClass('width')\n    return hasWidth ? 'width' : 'height'\n  }\n\n  Collapse.prototype.show = function () {\n    if (this.transitioning || this.$element.hasClass('in')) return\n\n    var startEvent = $.Event('show.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    var actives = this.$parent && this.$parent.find('> .panel > .in')\n\n    if (actives && actives.length) {\n      var hasData = actives.data('bs.collapse')\n      if (hasData && hasData.transitioning) return\n      actives.collapse('hide')\n      hasData || actives.data('bs.collapse', null)\n    }\n\n    var dimension = this.dimension()\n\n    this.$element\n      .removeClass('collapse')\n      .addClass('collapsing')\n      [dimension](0)\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.$element\n        .removeClass('collapsing')\n        .addClass('in')\n        [dimension]('auto')\n      this.transitioning = 0\n      this.$element.trigger('shown.bs.collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n    this.$element\n      .one($.support.transition.end, $.proxy(complete, this))\n      .emulateTransitionEnd(350)\n      [dimension](this.$element[0][scrollSize])\n  }\n\n  Collapse.prototype.hide = function () {\n    if (this.transitioning || !this.$element.hasClass('in')) return\n\n    var startEvent = $.Event('hide.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    var dimension = this.dimension()\n\n    this.$element\n      [dimension](this.$element[dimension]())\n      [0].offsetHeight\n\n    this.$element\n      .addClass('collapsing')\n      .removeClass('collapse')\n      .removeClass('in')\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.transitioning = 0\n      this.$element\n        .trigger('hidden.bs.collapse')\n        .removeClass('collapsing')\n        .addClass('collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    this.$element\n      [dimension](0)\n      .one($.support.transition.end, $.proxy(complete, this))\n      .emulateTransitionEnd(350)\n  }\n\n  Collapse.prototype.toggle = function () {\n    this[this.$element.hasClass('in') ? 'hide' : 'show']()\n  }\n\n\n  // COLLAPSE PLUGIN DEFINITION\n  // ==========================\n\n  var old = $.fn.collapse\n\n  $.fn.collapse = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.collapse')\n      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.collapse.Constructor = Collapse\n\n\n  // COLLAPSE NO CONFLICT\n  // ====================\n\n  $.fn.collapse.noConflict = function () {\n    $.fn.collapse = old\n    return this\n  }\n\n\n  // COLLAPSE DATA-API\n  // =================\n\n  $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {\n    var $this   = $(this), href\n    var target  = $this.attr('data-target')\n        || e.preventDefault()\n        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') //strip for ie7\n    var $target = $(target)\n    var data    = $target.data('bs.collapse')\n    var option  = data ? 'toggle' : $this.data()\n    var parent  = $this.attr('data-parent')\n    var $parent = parent && $(parent)\n\n    if (!data || !data.transitioning) {\n      if ($parent) $parent.find('[data-toggle=collapse][data-parent=\"' + parent + '\"]').not($this).addClass('collapsed')\n      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')\n    }\n\n    $target.collapse(option)\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: dropdown.js v3.0.3\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=dropdown]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $('<div class=\"dropdown-backdrop\"/>').insertAfter($(this)).on('click', clearMenus)\n      }\n\n      $parent.trigger(e = $.Event('show.bs.dropdown'))\n\n      if (e.isDefaultPrevented()) return\n\n      $parent\n        .toggleClass('open')\n        .trigger('shown.bs.dropdown')\n\n      $this.focus()\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27)/.test(e.keyCode)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive || (isActive && e.keyCode == 27)) {\n      if (e.which == 27) $parent.find(toggle).focus()\n      return $this.click()\n    }\n\n    var $items = $('[role=menu] li:not(.divider):visible a', $parent)\n\n    if (!$items.length) return\n\n    var index = $items.index($items.filter(':focus'))\n\n    if (e.keyCode == 38 && index > 0)                 index--                        // up\n    if (e.keyCode == 40 && index < $items.length - 1) index++                        // down\n    if (!~index)                                      index=0\n\n    $items.eq(index).focus()\n  }\n\n  function clearMenus() {\n    $(backdrop).remove()\n    $(toggle).each(function (e) {\n      var $parent = getParent($(this))\n      if (!$parent.hasClass('open')) return\n      $parent.trigger(e = $.Event('hide.bs.dropdown'))\n      if (e.isDefaultPrevented()) return\n      $parent.removeClass('open').trigger('hidden.bs.dropdown')\n    })\n  }\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\n    }\n\n    var $parent = selector && $(selector)\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown = function (option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: modal.js v3.0.3\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // MODAL CLASS DEFINITION\n  // ======================\n\n  var Modal = function (element, options) {\n    this.options   = options\n    this.$element  = $(element)\n    this.$backdrop =\n    this.isShown   = null\n\n    if (this.options.remote) this.$element.load(this.options.remote)\n  }\n\n  Modal.DEFAULTS = {\n      backdrop: true\n    , keyboard: true\n    , show: true\n  }\n\n  Modal.prototype.toggle = function (_relatedTarget) {\n    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)\n  }\n\n  Modal.prototype.show = function (_relatedTarget) {\n    var that = this\n    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n    this.$element.trigger(e)\n\n    if (this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = true\n\n    this.escape()\n\n    this.$element.on('click.dismiss.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n    this.backdrop(function () {\n      var transition = $.support.transition && that.$element.hasClass('fade')\n\n      if (!that.$element.parent().length) {\n        that.$element.appendTo(document.body) // don't move modals dom position\n      }\n\n      that.$element.show()\n\n      if (transition) {\n        that.$element[0].offsetWidth // force reflow\n      }\n\n      that.$element\n        .addClass('in')\n        .attr('aria-hidden', false)\n\n      that.enforceFocus()\n\n      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n      transition ?\n        that.$element.find('.modal-dialog') // wait for modal to slide in\n          .one($.support.transition.end, function () {\n            that.$element.focus().trigger(e)\n          })\n          .emulateTransitionEnd(300) :\n        that.$element.focus().trigger(e)\n    })\n  }\n\n  Modal.prototype.hide = function (e) {\n    if (e) e.preventDefault()\n\n    e = $.Event('hide.bs.modal')\n\n    this.$element.trigger(e)\n\n    if (!this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = false\n\n    this.escape()\n\n    $(document).off('focusin.bs.modal')\n\n    this.$element\n      .removeClass('in')\n      .attr('aria-hidden', true)\n      .off('click.dismiss.modal')\n\n    $.support.transition && this.$element.hasClass('fade') ?\n      this.$element\n        .one($.support.transition.end, $.proxy(this.hideModal, this))\n        .emulateTransitionEnd(300) :\n      this.hideModal()\n  }\n\n  Modal.prototype.enforceFocus = function () {\n    $(document)\n      .off('focusin.bs.modal') // guard against infinite focus loop\n      .on('focusin.bs.modal', $.proxy(function (e) {\n        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {\n          this.$element.focus()\n        }\n      }, this))\n  }\n\n  Modal.prototype.escape = function () {\n    if (this.isShown && this.options.keyboard) {\n      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {\n        e.which == 27 && this.hide()\n      }, this))\n    } else if (!this.isShown) {\n      this.$element.off('keyup.dismiss.bs.modal')\n    }\n  }\n\n  Modal.prototype.hideModal = function () {\n    var that = this\n    this.$element.hide()\n    this.backdrop(function () {\n      that.removeBackdrop()\n      that.$element.trigger('hidden.bs.modal')\n    })\n  }\n\n  Modal.prototype.removeBackdrop = function () {\n    this.$backdrop && this.$backdrop.remove()\n    this.$backdrop = null\n  }\n\n  Modal.prototype.backdrop = function (callback) {\n    var that    = this\n    var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n    if (this.isShown && this.options.backdrop) {\n      var doAnimate = $.support.transition && animate\n\n      this.$backdrop = $('<div class=\"modal-backdrop ' + animate + '\" />')\n        .appendTo(document.body)\n\n      this.$element.on('click.dismiss.modal', $.proxy(function (e) {\n        if (e.target !== e.currentTarget) return\n        this.options.backdrop == 'static'\n          ? this.$element[0].focus.call(this.$element[0])\n          : this.hide.call(this)\n      }, this))\n\n      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n      this.$backdrop.addClass('in')\n\n      if (!callback) return\n\n      doAnimate ?\n        this.$backdrop\n          .one($.support.transition.end, callback)\n          .emulateTransitionEnd(150) :\n        callback()\n\n    } else if (!this.isShown && this.$backdrop) {\n      this.$backdrop.removeClass('in')\n\n      $.support.transition && this.$element.hasClass('fade')?\n        this.$backdrop\n          .one($.support.transition.end, callback)\n          .emulateTransitionEnd(150) :\n        callback()\n\n    } else if (callback) {\n      callback()\n    }\n  }\n\n\n  // MODAL PLUGIN DEFINITION\n  // =======================\n\n  var old = $.fn.modal\n\n  $.fn.modal = function (option, _relatedTarget) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.modal')\n      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n      if (typeof option == 'string') data[option](_relatedTarget)\n      else if (options.show) data.show(_relatedTarget)\n    })\n  }\n\n  $.fn.modal.Constructor = Modal\n\n\n  // MODAL NO CONFLICT\n  // =================\n\n  $.fn.modal.noConflict = function () {\n    $.fn.modal = old\n    return this\n  }\n\n\n  // MODAL DATA-API\n  // ==============\n\n  $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n    var $this   = $(this)\n    var href    = $this.attr('href')\n    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) //strip for ie7\n    var option  = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n    e.preventDefault()\n\n    $target\n      .modal(option, this)\n      .one('hide', function () {\n        $this.is(':visible') && $this.focus()\n      })\n  })\n\n  $(document)\n    .on('show.bs.modal',  '.modal', function () { $(document.body).addClass('modal-open') })\n    .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tooltip.js v3.0.3\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       =\n    this.options    =\n    this.enabled    =\n    this.timeout    =\n    this.hoverState =\n    this.$element   = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.DEFAULTS = {\n    animation: true\n  , placement: 'top'\n  , selector: false\n  , template: '<div class=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>'\n  , trigger: 'hover focus'\n  , title: ''\n  , delay: 0\n  , html: false\n  , container: false\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled  = true\n    this.type     = type\n    this.$element = $(element)\n    this.options  = this.getOptions(options)\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay\n      , hide: options.delay\n      }\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.'+ this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      var $tip = this.tip()\n\n      this.setContent()\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n\n      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var $parent = this.$element.parent()\n\n        var orgPlacement = placement\n        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop\n        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()\n        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()\n        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left\n\n        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :\n                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :\n                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :\n                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n      this.$element.trigger('shown.bs.' + this.type)\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function(offset, placement) {\n    var replace\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  = offset.top  + marginTop\n    offset.left = offset.left + marginLeft\n\n    $tip\n      .offset(offset)\n      .addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      replace = true\n      offset.top = offset.top + height - actualHeight\n    }\n\n    if (/bottom|top/.test(placement)) {\n      var delta = 0\n\n      if (offset.left < 0) {\n        delta       = offset.left * -2\n        offset.left = 0\n\n        $tip.offset(offset)\n\n        actualWidth  = $tip[0].offsetWidth\n        actualHeight = $tip[0].offsetHeight\n      }\n\n      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')\n    } else {\n      this.replaceArrow(actualHeight - height, actualHeight, 'top')\n    }\n\n    if (replace) $tip.offset(offset)\n  }\n\n  Tooltip.prototype.replaceArrow = function(delta, dimension, position) {\n    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + \"%\") : '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function () {\n    var that = this\n    var $tip = this.tip()\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && this.$tip.hasClass('fade') ?\n      $tip\n        .one($.support.transition.end, complete)\n        .emulateTransitionEnd(150) :\n      complete()\n\n    this.$element.trigger('hidden.bs.' + this.type)\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function () {\n    var el = this.$element[0]\n    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {\n      width: el.offsetWidth\n    , height: el.offsetHeight\n    }, this.$element.offset())\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.tip = function () {\n    return this.$tip = this.$tip || $(this.options.template)\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')\n  }\n\n  Tooltip.prototype.validate = function () {\n    if (!this.$element[0].parentNode) {\n      this.hide()\n      this.$element = null\n      this.options  = null\n    }\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this\n    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n  }\n\n  Tooltip.prototype.destroy = function () {\n    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)\n  }\n\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: popover.js v3.0.3\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // POPOVER PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Popover = function (element, options) {\n    this.init('popover', element, options)\n  }\n\n  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n  Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {\n    placement: 'right'\n  , trigger: 'click'\n  , content: ''\n  , template: '<div class=\"popover\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n  })\n\n\n  // NOTE: POPOVER EXTENDS tooltip.js\n  // ================================\n\n  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n  Popover.prototype.constructor = Popover\n\n  Popover.prototype.getDefaults = function () {\n    return Popover.DEFAULTS\n  }\n\n  Popover.prototype.setContent = function () {\n    var $tip    = this.tip()\n    var title   = this.getTitle()\n    var content = this.getContent()\n\n    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n    $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)\n\n    $tip.removeClass('fade top bottom left right in')\n\n    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n    // this manually by checking the contents.\n    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n  }\n\n  Popover.prototype.hasContent = function () {\n    return this.getTitle() || this.getContent()\n  }\n\n  Popover.prototype.getContent = function () {\n    var $e = this.$element\n    var o  = this.options\n\n    return $e.attr('data-content')\n      || (typeof o.content == 'function' ?\n            o.content.call($e[0]) :\n            o.content)\n  }\n\n  Popover.prototype.arrow = function () {\n    return this.$arrow = this.$arrow || this.tip().find('.arrow')\n  }\n\n  Popover.prototype.tip = function () {\n    if (!this.$tip) this.$tip = $(this.options.template)\n    return this.$tip\n  }\n\n\n  // POPOVER PLUGIN DEFINITION\n  // =========================\n\n  var old = $.fn.popover\n\n  $.fn.popover = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.popover')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.popover.Constructor = Popover\n\n\n  // POPOVER NO CONFLICT\n  // ===================\n\n  $.fn.popover.noConflict = function () {\n    $.fn.popover = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: scrollspy.js v3.0.3\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // SCROLLSPY CLASS DEFINITION\n  // ==========================\n\n  function ScrollSpy(element, options) {\n    var href\n    var process  = $.proxy(this.process, this)\n\n    this.$element       = $(element).is('body') ? $(window) : $(element)\n    this.$body          = $('body')\n    this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)\n    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)\n    this.selector       = (this.options.target\n      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) //strip for ie7\n      || '') + ' .nav li > a'\n    this.offsets        = $([])\n    this.targets        = $([])\n    this.activeTarget   = null\n\n    this.refresh()\n    this.process()\n  }\n\n  ScrollSpy.DEFAULTS = {\n    offset: 10\n  }\n\n  ScrollSpy.prototype.refresh = function () {\n    var offsetMethod = this.$element[0] == window ? 'offset' : 'position'\n\n    this.offsets = $([])\n    this.targets = $([])\n\n    var self     = this\n    var $targets = this.$body\n      .find(this.selector)\n      .map(function () {\n        var $el   = $(this)\n        var href  = $el.data('target') || $el.attr('href')\n        var $href = /^#\\w/.test(href) && $(href)\n\n        return ($href\n          && $href.length\n          && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null\n      })\n      .sort(function (a, b) { return a[0] - b[0] })\n      .each(function () {\n        self.offsets.push(this[0])\n        self.targets.push(this[1])\n      })\n  }\n\n  ScrollSpy.prototype.process = function () {\n    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset\n    var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight\n    var maxScroll    = scrollHeight - this.$scrollElement.height()\n    var offsets      = this.offsets\n    var targets      = this.targets\n    var activeTarget = this.activeTarget\n    var i\n\n    if (scrollTop >= maxScroll) {\n      return activeTarget != (i = targets.last()[0]) && this.activate(i)\n    }\n\n    for (i = offsets.length; i--;) {\n      activeTarget != targets[i]\n        && scrollTop >= offsets[i]\n        && (!offsets[i + 1] || scrollTop <= offsets[i + 1])\n        && this.activate( targets[i] )\n    }\n  }\n\n  ScrollSpy.prototype.activate = function (target) {\n    this.activeTarget = target\n\n    $(this.selector)\n      .parents('.active')\n      .removeClass('active')\n\n    var selector = this.selector\n      + '[data-target=\"' + target + '\"],'\n      + this.selector + '[href=\"' + target + '\"]'\n\n    var active = $(selector)\n      .parents('li')\n      .addClass('active')\n\n    if (active.parent('.dropdown-menu').length)  {\n      active = active\n        .closest('li.dropdown')\n        .addClass('active')\n    }\n\n    active.trigger('activate.bs.scrollspy')\n  }\n\n\n  // SCROLLSPY PLUGIN DEFINITION\n  // ===========================\n\n  var old = $.fn.scrollspy\n\n  $.fn.scrollspy = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.scrollspy')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.scrollspy.Constructor = ScrollSpy\n\n\n  // SCROLLSPY NO CONFLICT\n  // =====================\n\n  $.fn.scrollspy.noConflict = function () {\n    $.fn.scrollspy = old\n    return this\n  }\n\n\n  // SCROLLSPY DATA-API\n  // ==================\n\n  $(window).on('load', function () {\n    $('[data-spy=\"scroll\"]').each(function () {\n      var $spy = $(this)\n      $spy.scrollspy($spy.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tab.js v3.0.3\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // TAB CLASS DEFINITION\n  // ====================\n\n  var Tab = function (element) {\n    this.element = $(element)\n  }\n\n  Tab.prototype.show = function () {\n    var $this    = this.element\n    var $ul      = $this.closest('ul:not(.dropdown-menu)')\n    var selector = $this.data('target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\n    }\n\n    if ($this.parent('li').hasClass('active')) return\n\n    var previous = $ul.find('.active:last a')[0]\n    var e        = $.Event('show.bs.tab', {\n      relatedTarget: previous\n    })\n\n    $this.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    var $target = $(selector)\n\n    this.activate($this.parent('li'), $ul)\n    this.activate($target, $target.parent(), function () {\n      $this.trigger({\n        type: 'shown.bs.tab'\n      , relatedTarget: previous\n      })\n    })\n  }\n\n  Tab.prototype.activate = function (element, container, callback) {\n    var $active    = container.find('> .active')\n    var transition = callback\n      && $.support.transition\n      && $active.hasClass('fade')\n\n    function next() {\n      $active\n        .removeClass('active')\n        .find('> .dropdown-menu > .active')\n        .removeClass('active')\n\n      element.addClass('active')\n\n      if (transition) {\n        element[0].offsetWidth // reflow for transition\n        element.addClass('in')\n      } else {\n        element.removeClass('fade')\n      }\n\n      if (element.parent('.dropdown-menu')) {\n        element.closest('li.dropdown').addClass('active')\n      }\n\n      callback && callback()\n    }\n\n    transition ?\n      $active\n        .one($.support.transition.end, next)\n        .emulateTransitionEnd(150) :\n      next()\n\n    $active.removeClass('in')\n  }\n\n\n  // TAB PLUGIN DEFINITION\n  // =====================\n\n  var old = $.fn.tab\n\n  $.fn.tab = function ( option ) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.tab')\n\n      if (!data) $this.data('bs.tab', (data = new Tab(this)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.tab.Constructor = Tab\n\n\n  // TAB NO CONFLICT\n  // ===============\n\n  $.fn.tab.noConflict = function () {\n    $.fn.tab = old\n    return this\n  }\n\n\n  // TAB DATA-API\n  // ============\n\n  $(document).on('click.bs.tab.data-api', '[data-toggle=\"tab\"], [data-toggle=\"pill\"]', function (e) {\n    e.preventDefault()\n    $(this).tab('show')\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: affix.js v3.0.3\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n    this.$window = $(window)\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element = $(element)\n    this.affixed  =\n    this.unpin    = null\n\n    this.checkPosition()\n  }\n\n  Affix.RESET = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var scrollHeight = $(document).height()\n    var scrollTop    = this.$window.scrollTop()\n    var position     = this.$element.offset()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top()\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()\n\n    var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :\n                offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :\n                offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false\n\n    if (this.affixed === affix) return\n    if (this.unpin) this.$element.css('top', '')\n\n    this.affixed = affix\n    this.unpin   = affix == 'bottom' ? position.top - scrollTop : null\n\n    this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))\n\n    if (affix == 'bottom') {\n      this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  var old = $.fn.affix\n\n  $.fn.affix = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop)    data.offset.top    = data.offsetTop\n\n      $spy.affix(data)\n    })\n  })\n\n}(jQuery);\n"
  },
  {
    "path": "ouimeaux/server/static/js/controllers.js",
    "content": "'use strict';\n\n/* Controllers */\n\nangular.module('Ouimeaux.controllers', []).\n  controller('IndexCtrl', function ($scope, socket) {\n    $scope.data = {}\n\n    $scope.toggleState = function(device) {\n      socket.emit('statechange', {\n        name:device.name, \n        state:device.state ? 0 : 1\n      });\n    }\n\n    socket.on(\"send:devicestate\", function(device) {\n      $scope.data[device.name] = device;\n    });\n\n    socket.on('connect', function () {\n      socket.emit('join');\n    });\n\n  });\n"
  },
  {
    "path": "ouimeaux/server/static/js/directives.js",
    "content": "'use strict';\n\n/* Directives */\n\n"
  },
  {
    "path": "ouimeaux/server/static/js/filters.js",
    "content": "'use strict';\n\n/* Filters */\n\nangular.module('wemoFilters', []).filter('uppercase', function() {\n  return function(input) {\n    return input.toUpperCase();\n  }\n});"
  },
  {
    "path": "ouimeaux/server/static/js/services.js",
    "content": "'use strict';\n\nangular.module('angularFlaskServices', ['ngResource'])\n .factory('Post', function($resource) {\n  return $resource('/api/post/:postId', {}, {\n   query: {\n    method: 'GET',\n    params: { postId: '' },\n    isArray: true\n   }\n  });\n })\n;\n\n\n\n"
  },
  {
    "path": "ouimeaux/server/static/js/socket.js",
    "content": "/*\n * angular-socket-io v0.0.2\n * (c) 2013 Brian Ford http://briantford.com\n * License: MIT\n */\n\n'use strict';\n\nangular.module('btford.socket-io', []).\n  factory('socket', function ($rootScope, $timeout) {\n    var socket = io.connect();\n    return {\n      on: function (eventName, callback) {\n        socket.on(eventName, function () {  \n          var args = arguments;\n          $timeout(function () {\n            callback.apply(socket, args);\n          }, 0);\n        });\n      },\n      emit: function (eventName, data, callback) {\n        socket.emit(eventName, data, function () {\n          var args = arguments;\n          $rootScope.$apply(function () {\n            if (callback) {\n              callback.apply(socket, args);\n            }\n          });\n        });\n      }\n    };\n  });\n"
  },
  {
    "path": "ouimeaux/server/static/partials/about.html",
    "content": "<div>\n    <p>This is a basic AngularJS + Flask application.</p>\n</div>\n"
  },
  {
    "path": "ouimeaux/server/static/partials/landing.html",
    "content": "<div class=\"header-section\">\n    <p ng-repeat=\"device in data\">\n    <a role=\"button\" \n        class=\"btn btn-lg btn-block\"\n        ng-disabled=\"device.type=='Motion'\"\n        ng-click=\"toggleState(device)\"\n        ng-class=\"{'btn-default': device.state==0 || (device.type=='Maker' &&  device.sensor==0), 'btn-success':device.state==1 || (device.type=='Maker' &&  device.sensor==1)}\">\n         <span class=\"btn-icon glyphicon\"\n             ng-class=\"{\n                'glyphicon-off': device.type=='Switch' || \n                                 device.type=='LightSwitch' ||\n                                 device.type=='Insight',\n                'glyphicon-transfer': device.type=='Motion',\n                'glyphicon-adjust': device.type=='Maker'\n             }\"></span>\n        {{device.name}}\n    </a>\n    </p>\n</div>\n"
  },
  {
    "path": "ouimeaux/server/templates/404.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n    <title>Ouimeaux</title>\n\n    <link rel=\"stylesheet\" href=\"/static/css/bootstrap.css\">\n    <link rel=\"stylesheet\" href=\"/static/css/main.css\">\n\n     <script src=\"/static/lib/jquery/jquery.min.js\"></script>\n    <script src=\"/static/lib/bootstrap/bootstrap.min.js\"></script>\n</head>\n<body>\n    <div id=\"header\" class=\"header navbar navbar-static-top\">\n        <div class=\"navbar-inner\">\n            <div class=\"container\">\n                <button type=\"button\" class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\">\n                </button>\n                <a class=\"brand\" href=\"/\">Ouimeaux</a>\n                <div class=\"nav-collapse collapse\">\n                    <ul class=\"nav pull-right\">\n                        <li class=\"\">\n                            <a href=\"/\">Home</a>\n                        </li>\n                    </ul>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div class=\"container page\">\n        <div id=\"content\" class=\"container main\" ng-view>\n            <div>\n                <h3>404</h3>\n                <h4>Sorry, but the page you were trying to view does not exist.</h4>\n            </div>\n        </div>\n\n        <hr>\n        <footer id=\"footer\" class=\"footer\">\n            <div class=\"footer-left\">\n                <a href=\"/about\">About</a> |\n                <a href=\"/\">Home</a>\n            </div>\n            <div class=\"footer-right\">\n                <span>&copy; 2014 Ian McCracken</span>\n            </div>\n        </footer>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "ouimeaux/server/templates/index.html",
    "content": "<!doctype html>\n<html lang=\"en\" ng-app=\"Ouimeaux\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n    <title>Ouimeaux</title>\n\n    <link rel=\"stylesheet\" href=\"/static/css/bootstrap.css\">\n    <link rel=\"stylesheet\" href=\"/static/css/main.css\">\n\n    <script src=\"/static/lib/angular/angular.js\"></script>\n    <script src=\"/static/lib/angular/angular-resource.js\"></script>\n\n    <script src=\"/static/js/app.js\"></script>\n    <script src=\"/static/js/controllers.js\"></script>\n     <script src=\"/static/js/services.js\"></script>\n     <script src=\"/static/js/socket.js\"></script>\n\n    <script src=\"/static/lib/jquery/jquery.min.js\"></script>\n    <script src=\"/static/lib/bootstrap/bootstrap.min.js\"></script>\n    <script src=\"/static/lib/socket.io/socket.io.js\"></script>\n\n</head>\n<body>\n    <nav class=\"navbar navbar-default\" role=\"navigation\">\n        <a class=\"navbar-brand\" href=\"#\">Ouimeaux</a>\n    </nav>\n    <div id=\"content\" class=\"container main\" ng-view>\n    </div>\n\n        <hr>\n        <footer id=\"footer\" class=\"footer\">\n            <div class=\"footer-left\">\n                <span>&copy; 2013 Ian McCracken</span>\n            </div>\n        </footer>\n</body>\n</html>"
  },
  {
    "path": "ouimeaux/signals.py",
    "content": "from ouimeaux.pysignals import Signal, StateChange, receiver\n\n# Work around a bug in pysignals when in the interactive interpreter\nimport sys\n_main = sys.modules.get('__main__')\nif _main:\n    _main.__file__ = \"__main__.py\"\n\n\n# Fires when a device responds to a broadcast \ndiscovered = Signal(providing_args=[\"address\", \"headers\"])\n\n# Fires when a device is found and added to the environment\ndevicefound = Signal()\n\n# Fires when a subscriber receives an event\nsubscription = Signal(providing_args=[\"type\", \"value\"])\n\n# Fires when a device changes state\nstatechange = StateChange(providing_args=[\"state\"])\n\n\n@receiver(subscription)\ndef _got_subscription(sender, **kwargs):\n    if kwargs['type'] == 'BinaryState':\n        statechange.send(sender, state=int(kwargs['value']))\n"
  },
  {
    "path": "ouimeaux/subscribe.py",
    "content": "from collections import defaultdict\nimport logging\nfrom xml.etree import ElementTree\nfrom functools import partial\n\nimport gevent\nfrom gevent.pywsgi import WSGIServer\n\nfrom ouimeaux.utils import get_ip_address, requests_request\nfrom ouimeaux.device.insight import Insight\nfrom ouimeaux.device.maker import Maker\nfrom ouimeaux.signals import subscription\n\nfrom random import randint\n\n\n\nlog = logging.getLogger(__name__)\n\nNS = \"{urn:schemas-upnp-org:event-1-0}\"\nSUCCESS = '<html><body><h1>200 OK</h1></body></html>'\nSUCCESS_BINARY = SUCCESS.encode()\n\n\nclass SubscriptionRegistry(object):\n    def __init__(self):\n        self._devices = {}\n        self._callbacks = defaultdict(list)\n        self.port = randint(8300, 8990)\n\n\n    def register(self, device):\n        if not device:\n            log.error(\"Received an invalid device: %r\", device)\n            return\n        log.info(\"Subscribing to basic events from %r\", device)\n        # Provide a function to register a callback when the device changes\n        # state\n        device.register_listener = partial(self.on, device, 'BinaryState')\n        self._devices[device.host] = device\n        self._resubscribe(device.basicevent.eventSubURL)\n\n    def _resubscribe(self, url, sid=None):\n        headers = {'TIMEOUT': 'Second-%d' % 1800}\n        if sid is not None:\n            headers['SID'] = sid\n        else:\n            host = get_ip_address()\n            headers.update({\n                \"CALLBACK\": '<http://%s:%d>'%(host, self.port),\n                \"NT\": \"upnp:event\"\n            })\n        response = requests_request(method=\"SUBSCRIBE\", url=url,\n                                    headers=headers)\n        if response.status_code == 412 and sid:\n            # Invalid subscription ID. Send an UNSUBSCRIBE for safety and\n            # start over.\n            requests_request(method='UNSUBSCRIBE', url=url,\n                             headers={'SID': sid})\n            return self._resubscribe(url)\n        timeout = int(response.headers.get('timeout', '1801').replace(\n            'Second-', ''))\n        sid = response.headers.get('sid', sid)\n        gevent.spawn_later(int(timeout * 0.75), self._resubscribe, url, sid)\n\n    def _handle(self, environ, start_response):\n        device = self._devices.get(environ['REMOTE_ADDR'])\n        if device is not None:\n            data = environ['wsgi.input'].read()\n            # trim garbage from end, if any\n            data = data.split(\"\\n\\n\")[0]\n            doc = ElementTree.fromstring(data)\n            for propnode in doc.findall('./{0}property'.format(NS)):\n                for property_ in propnode.getchildren():\n                    text = property_.text\n                    if isinstance(device, Insight) and property_.tag=='BinaryState':\n                        text = text.split('|')[0]\n                    subscription.send(device, type=property_.tag, value=text)\n                    self._event(device, property_.tag, text)\n        start_response('200 OK', [\n            ('Content-Type', 'text/html'),\n            ('Content-Length', str(len(SUCCESS))),\n            ('Connection', 'close')\n        ])\n        yield SUCCESS_BINARY\n\n    def _event(self, device, type_, value):\n        for t, callback in self._callbacks.get(device, ()):\n            if t == type_:\n                callback(value)\n\n    def on(self, device, type, callback):\n        self._callbacks[device].append((type, callback))\n\n    @property\n    def server(self):\n        \"\"\"\n        UDP server to listen for responses.\n        \"\"\"\n        server = getattr(self, \"_server\", None)\n        if server is None:\n            server = WSGIServer(('', self.port), self._handle, log=None)\n            self._server = server\n        return server\n"
  },
  {
    "path": "ouimeaux/utils.py",
    "content": "from functools import wraps\nimport re\nimport socket\nimport struct\nimport time\n\nimport gevent\nimport requests\n\n\ndef tz_hours():\n    delta = time.localtime().tm_hour - time.gmtime().tm_hour\n    sign = '-' if delta < 0 else ''\n    return \"%s%02d.00\" % (sign, abs(delta))\n\n\ndef is_dst():\n    return 1 if time.localtime().tm_isdst else 0\n\n\ndef get_timesync():\n    timesync = \"\"\"\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n <s:Body>\n  <u:TimeSync xmlns:u=\"urn:Belkin:service:timesync:1\">\n   <UTC>{utc}</UTC>\n   <TimeZone>{tz}</TimeZone>\n   <dst>{dst}</dst>\n   <DstSupported>{dstsupported}</DstSupported>\n  </u:TimeSync>\n </s:Body>\n</s:Envelope>\"\"\".format(\n        utc=int(time.time()),\n        tz=tz_hours(),\n        dst=is_dst(),\n        dstsupported=is_dst()).strip()\n    return timesync\n\n\ndef get_ip_address():\n    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n    try:\n        s.connect(('1.2.3.4', 9))\n        return s.getsockname()[0]\n    except socket.error:\n        return None\n    finally:\n        del s\n\n\ndef matcher(match_string):\n    pattern = re.compile('.*?'.join(re.escape(c) for c in match_string.lower()))\n    def matches(s):\n        return pattern.search(s.lower()) is not None\n    return matches\n\n\n# This is pretty arbitrary. I'm choosing, for no real reason, the length of\n# a subscription.\n_RETRIES = 1801/60\n\n\ndef get_retries():\n    return _RETRIES\n\n\ndef retry_with_delay(f, delay=60):\n    \"\"\"\n    Retry the wrapped requests.request function in case of ConnectionError.\n    Optionally limit the number of retries or set the delay between retries.\n    \"\"\"\n    @wraps(f)\n    def inner(*args, **kwargs):\n        kwargs['timeout'] = 5\n        remaining = get_retries() + 1\n        while remaining:\n            remaining -= 1\n            try:\n                return f(*args, **kwargs)\n            except (requests.ConnectionError, requests.Timeout):\n                if not remaining:\n                    raise\n                gevent.sleep(delay)\n    return inner\n\n\nrequests_get = retry_with_delay(requests.get)\nrequests_post = retry_with_delay(requests.post)\nrequests_request = retry_with_delay(requests.request)\n"
  },
  {
    "path": "requirements.txt",
    "content": "gevent >= 1.3.0\nrequests >= 2.3.0\npyyaml\nsix\nfuture\n"
  },
  {
    "path": "setup.cfg",
    "content": "[egg_info]\ntag_build = \n"
  },
  {
    "path": "setup.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\n\nhere = lambda *a: os.path.join(os.path.dirname(__file__), *a)\n\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\nif sys.argv[-1] == 'publish':\n    os.system('python setup.py sdist upload')\n    sys.exit()\n\nreadme = open(here('README.md')).read()\nhistory = open(here('HISTORY.rst')).read().replace('.. :changelog:', '')\nrequirements = [x.strip() for x in open(here('requirements.txt')).readlines()]\n\nsetup(\n    name='ouimeaux',\n    version='0.8.2',\n    description='Open source control for Belkin WeMo devices',\n    long_description=readme + '\\n\\n' + history,\n    author='Ian McCracken',\n    author_email='ian.mccracken@gmail.com',\n    url='https://github.com/iancmcc/ouimeaux',\n    packages=[\n        'ouimeaux',\n    ],\n    package_dir={'ouimeaux': 'ouimeaux'},\n    include_package_data=True,\n    install_requires=requirements,\n    license=\"BSD\",\n    zip_safe=False,\n    keywords='ouimeaux',\n    classifiers=[\n        'Development Status :: 2 - Pre-Alpha',\n        'Topic :: Home Automation',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: BSD License',\n        'Natural Language :: English',\n        \"Programming Language :: Python :: 2\",\n        'Programming Language :: Python :: 2.6',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n    ],\n    entry_points={\n        'console_scripts': [\n            'wemo = ouimeaux.cli:wemo'\n        ]\n    },\n    # added CORS as dependency\n    extras_require = {\n        'server':  [\n            \"flask-restful\",\n            \"flask-basicauth\",\n            \"gevent-socketio\",\n            \"flask-cors\",\n        ],\n    },\n    test_suite='tests',\n)\n"
  },
  {
    "path": "tests/__init__.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n"
  },
  {
    "path": "tests/test_ouimeaux.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_ouimeaux\n----------------------------------\n\nTests for `ouimeaux` module.\n\"\"\"\n\nimport unittest\n\n\nimport ouimeaux\n\nclass TestOuimeaux(unittest.TestCase):\n\n    def setUp(self):\n        pass\n\n    def test_something(self):\n        pass\n\n    def tearDown(self):\n        pass\n\nif __name__ == '__main__':\n    unittest.main()"
  },
  {
    "path": "tox.ini",
    "content": "[tox]\nenvlist = py27, py34, py35\n\n[testenv]\nsetenv =\n    PYTHONPATH = {toxinidir}:{toxinidir}/ouimeaux\ncommands = python setup.py test\ndeps =\n    -r{toxinidir}/requirements.txt\n"
  }
]