Showing preview only (3,426K chars total). Download the full file or copy to clipboard to get everything.
Repository: adobe-webplatform/Snap.svg
Branch: master
Commit: c8e483c96945
Files: 124
Total size: 3.2 MB
Directory structure:
gitextract_cmqa50dk/
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CONTRIBUTING
├── Gruntfile.js
├── LICENSE
├── NOTICE
├── README.md
├── bower.json
├── component.json
├── demos/
│ ├── animated-game/
│ │ ├── index.html
│ │ └── js/
│ │ ├── backbone.js
│ │ ├── main.js
│ │ ├── path-animal.js
│ │ ├── seedrandom.js
│ │ ├── snap.svg.js
│ │ ├── tree-face.js
│ │ └── underscore.js
│ ├── animated-map/
│ │ └── index.html
│ ├── clock/
│ │ └── index.html
│ ├── illustrated-infographic-coffee/
│ │ └── index.html
│ ├── pattern/
│ │ └── index.html
│ ├── snap-ad/
│ │ ├── Gruntfile.js
│ │ ├── README.md
│ │ ├── SnapAd.tmproj
│ │ ├── package.json
│ │ ├── site/
│ │ │ ├── css/
│ │ │ │ └── screen.css
│ │ │ ├── index.html
│ │ │ ├── index.min.html
│ │ │ └── js/
│ │ │ ├── main.js
│ │ │ └── vendor/
│ │ │ └── require.js
│ │ └── src/
│ │ ├── .sass-cache/
│ │ │ └── 7eb2e4ecfecd432261de95f74b5302c6e0956ac9/
│ │ │ └── screen.scssc
│ │ ├── config.rb
│ │ ├── css/
│ │ │ └── screen.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ ├── app/
│ │ │ │ ├── app.js
│ │ │ │ ├── burst.js
│ │ │ │ ├── device.js
│ │ │ │ ├── heart.js
│ │ │ │ ├── logo.js
│ │ │ │ └── mesh.js
│ │ │ ├── main.js
│ │ │ └── vendor/
│ │ │ ├── fss/
│ │ │ │ ├── Color.js
│ │ │ │ ├── Core.js
│ │ │ │ ├── Geometry.js
│ │ │ │ ├── Light.js
│ │ │ │ ├── Material.js
│ │ │ │ ├── Math.js
│ │ │ │ ├── Mesh.js
│ │ │ │ ├── Object.js
│ │ │ │ ├── Plane.js
│ │ │ │ ├── Renderer.js
│ │ │ │ ├── SVGRenderer.js
│ │ │ │ ├── Scene.js
│ │ │ │ ├── Triangle.js
│ │ │ │ ├── Vector3.js
│ │ │ │ ├── Vector4.js
│ │ │ │ └── Vertex.js
│ │ │ ├── fss.js
│ │ │ ├── require.js
│ │ │ ├── snap.svg-min.js
│ │ │ └── snap.svg.js
│ │ └── sass/
│ │ └── screen.scss
│ ├── snap-mascot/
│ │ ├── crocodile-1.html
│ │ ├── crocodile-2.html
│ │ ├── index.html
│ │ ├── snap-logo.html
│ │ └── style.css
│ └── tutorial/
│ ├── 1.html
│ ├── 2.html
│ ├── 3.html
│ ├── 4.html
│ ├── index.html
│ └── tutorial.html
├── dist/
│ ├── snap.svg-min.js
│ └── snap.svg.js
├── doc/
│ ├── css/
│ │ ├── dr.css
│ │ ├── main.css
│ │ ├── prism.css
│ │ └── topcoat-desktop-light.css
│ ├── fonts/
│ │ └── stylesheet.css
│ ├── js/
│ │ └── prism.js
│ └── reference.html
├── dr.json
├── history.md
├── package.json
├── src/
│ ├── align.js
│ ├── amd-banner.js
│ ├── amd-footer.js
│ ├── animation.js
│ ├── attr.js
│ ├── attradd.js
│ ├── class.js
│ ├── colors.js
│ ├── copy.js
│ ├── element.js
│ ├── equal.js
│ ├── filter.js
│ ├── matrix.js
│ ├── mina.js
│ ├── mouse.js
│ ├── paper.js
│ ├── path.js
│ ├── set.js
│ └── svg.js
├── template.dot
└── test/
├── attradd.js
├── attrs.js
├── class.js
├── colors.js
├── element.js
├── filter.js
├── gradients.js
├── matrix.js
├── mina.js
├── paper.js
├── path.js
├── primitives.js
├── res/
│ └── file-for-ajax.txt
├── set.js
├── snap-tests.js
├── system.js
├── test.html
└── test.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
TAGS
*~
_*
.DS_Store
node_modules
playground
*.svg
================================================
FILE: .gitmodules
================================================
[submodule "third-party/mocha"]
path = third-party/mocha
url = https://github.com/visionmedia/mocha.git
[submodule "third-party/eve"]
path = third-party/eve
url = https://github.com/adobe-webplatform/eve.git
[submodule "third-party/expect"]
path = third-party/expect
url = https://github.com/LearnBoost/expect.js.git
================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
- "node"
sudo: true
before_script:
- npm install -g grunt-cli
- npm install
- grunt
- cd test
script: phantomjs test.js
notifications:
slack: snapsvg:1zY6dZQuE1vhnug8pLSbbYMv
================================================
FILE: CONTRIBUTING
================================================
Contributions to this code are covered by the Adobe contributors
license agreement. Developers must sign and submit the Adobe CLA in
order to contribute to this project.
================================================
FILE: Gruntfile.js
================================================
module.exports = function(grunt) {
var pkg = grunt.file.readJSON("package.json"),
core = [
"./src/mina.js",
"./src/svg.js",
"./src/element.js",
"./src/animation.js",
"./src/matrix.js",
"./src/attr.js",
"./src/class.js",
"./src/attradd.js",
"./src/paper.js",
"./src/path.js",
"./src/set.js",
"./src/equal.js",
"./src/mouse.js",
"./src/filter.js",
"./src/align.js",
"./src/colors.js"
],
src = [
"./node_modules/eve/eve.js",
"./src/amd-banner.js",
"./src/amd-footer.js"
];
src.splice(2, 0, core);
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: pkg,
banner: grunt.file.read("./src/copy.js")
.replace(/@VERSION/, pkg.version)
.replace(/@DATE/, grunt.template.today("yyyy-mm-dd")) + "\n",
// Task configuration.
uglify: {
options: {
banner: "<%= banner %>",
report: "min"
},
dist: {
src: "<%= concat.target.dest %>",
dest: "dist/snap.svg-min.js"
}
},
concat: {
options: {
banner: "<%= banner %>"
},
target: {
dest: "dist/snap.svg.js",
src: src
}
},
exec: {
dr: {
command: "node node_modules/dr.js/dr dr.json"
},
test: {
command: "cd test; phantomjs test.js"
},
eslint: {
command: "./node_modules/eslint/bin/eslint.js " + core.join(" ")
},
},
prettify: {
options: {
indent: 4,
indent_char: " ",
wrap_line_length: 80,
brace_style: "expand",
unformatted: ["code", "pre", "script"]
},
one: {
src: "./doc/reference.html",
dest: "./doc/reference.html"
}
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-exec");
grunt.loadNpmTasks("grunt-prettify");
grunt.registerTask("default", ["exec:eslint", "concat", "uglify", "exec:dr", "prettify"]);
grunt.registerTask("lint", ["exec:eslint"]);
grunt.registerTask("test", ["exec:test"]);
};
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2013 Adobe Systems Incorporated
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NOTICE
================================================
Snap.svg is licensed under the Apache license version 2.0, January 2004 (see LICENSE file).
Snap.svg uses the following third party libraries that may have licenses
differing from that of Snap.svg itself. You can find the libraries and their
respective licenses below.
- eve ./node_modules/eve
https://github.com/adobe-webplatform/eve/
Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Mocha ./node_modules/mocha
https://github.com/visionmedia/mocha/
(The MIT License)
Copyright (c) 2011-2013 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Expect ./node_modules/expect.js
https://github.com/LearnBoost/expect.js
(The MIT License)
Copyright (c) 2011 Guillermo Rauch <guillermo@learnboost.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Grunt ./node_modules/grunt
http://gruntjs.com
Copyright (c) 2013 "Cowboy" Ben Alman
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
- Backbone ./demos/animated-game/js/backbone.js
http://backbonejs.org/
(The MIT License)
Copyright (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Underscore ./demos/animated-game/js/underscore.js
http://underscorejs.org
(The MIT License)
Copyright (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- jQuery ./demos/animated-game/js/jquery-1.9.0.min.js
http://http://jquery.com/
(The MIT License)
Copyright 2013 jQuery Foundation and other contributors
http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
[Snap.svg](http://snapsvg.io) · [](https://travis-ci.org/adobe-webplatform/Snap.svg) [](https://cdnjs.com/libraries/snap.svg/) [](https://github.com/adobe-webplatform/Snap.svg/releases) [](https://github.com/adobe-webplatform/Snap.svg/blob/master/LICENSE)
======
A JavaScript SVG library for the modern web. Learn more at [snapsvg.io](http://snapsvg.io).
[Follow us on Twitter.](https://twitter.com/snapsvg)
### Install
* [Bower](http://bower.io/) - `bower install snap.svg` 
* [npm](http://npmjs.com/) - `npm install snapsvg` [](https://www.npmjs.com/package/snapsvg) [](https://www.npmjs.com/package/snapsvg)
* Manual Minified - https://github.com/adobe-webplatform/Snap.svg/raw/master/dist/snap.svg-min.js
* Manual Unminified - https://raw.githubusercontent.com/adobe-webplatform/Snap.svg/master/dist/snap.svg.js
### Learn
* [About Snap.svg](http://snapsvg.io/about/)
* [Getting Started](http://snapsvg.io/start/)
* [API Reference](http://snapsvg.io/docs/)
* [Slack Room](https://snapsvg.slack.com/). [Invite](https://snapsvg.slack.com/shared_invite/MTM2NTE4MTk3MDYwLTE0ODYwODgzNzUtYjQ0YmM1N2U0Mg)
### Use
In your HTML file, load simply by:
```html
<script src="snap.svg-min.js"></script>
```
No other scripts are needed. Both the minified and uncompressed (for development) versions are in the `/dist` folder.
#### webpack
To load with webpack 2.x and 3.x, install [Imports Loader](https://github.com/webpack-contrib/imports-loader) (`npm i -D imports-loader`), and add the following to your webpack config:
```js
module: {
rules: [
{
test: require.resolve('snapsvg/dist/snap.svg.js'),
use: 'imports-loader?this=>window,fix=>module.exports=0',
},
],
},
resolve: {
alias: {
snapsvg: 'snapsvg/dist/snap.svg.js',
},
},
```
Then, in any module you’d like to require Snap, use:
```
import Snap from 'snapsvg';
```
### Build
[](https://travis-ci.org/adobe-webplatform/Snap.svg)
Snap.svg uses [Grunt](http://gruntjs.com/) to build.
* Open the terminal from the Snap.svg directory:
```sh
cd Snap.svg
```
* Install its command line interface (CLI) globally:
```sh
npm install -g grunt-cli
```
_*You might need to use `sudo npm`, depending on your configuration._
* Install dependencies with npm:
```sh
npm install
```
_*Snap.svg uses Grunt 0.4.0. You might want to [read](http://gruntjs.com/getting-started) more on their website if you haven’t upgraded since a lot has changed._
* To build the files run
```sh
grunt
```
* The results will be built into the `dist` folder.
* Alternatively type `grunt watch` to have the build run automatically when you make changes to source files.
### Testing
Tests are located in `test` folder. To run tests, simply open `test.html` in there. Automatic tests use PhantomJS to scrap this file, so you can use it as a reference.
Alternatively, install [PhantomJS](http://phantomjs.org) and run command
```sh
grunt test
```
### Contribute
* [Fill out the CLA](http://snapsvg.io/contributions/).
* [Fork](https://help.github.com/articles/fork-a-repo) the repo.
* Create a branch:
```sh
git checkout -b my_branch
```
* Add your changes.
* Check that tests are passing
* Commit your changes:
```sh
git commit -am "Added some awesome stuff"
```
* Push your branch:
```sh
git push origin my_branch
```
* Make a [pull request](https://help.github.com/articles/using-pull-requests) to `dev`(!) branch.
*Note:* Pull requests to other branches than `dev` or without filled CLA wouldn’t be accepted.
================================================
FILE: bower.json
================================================
{
"name": "Snap.svg",
"version": "0.5.1",
"homepage": "http://snapsvg.io",
"authors": [
"Dmitry Baranovskiy <dmitry@baranovskiy.com>"
],
"description": "The JavaScript library for modern SVG graphics",
"main": "dist/snap.svg-min.js",
"keywords": [
"svg",
"snap",
"js",
"javascript"
],
"license": "Apache 2",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"demos",
"src"
]
}
================================================
FILE: component.json
================================================
{
"name": "Snap.svg",
"repo": "adobe-webplatform/Snap.svg",
"description": "The JavaScript library for modern SVG graphics.",
"version": "0.5.1",
"keywords": ["svg", "snap", "js", "javascript"],
"dependencies": {},
"development": {},
"main": "dist/snap.svg-min.js",
"scripts": [
"dist/snap.svg-min.js"
]
}
================================================
FILE: demos/animated-game/index.html
================================================
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="copyright" content="Copyright © 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>illustration</title>
<style>
body{
margin: 0;
padding: 0;
background: #b7bf76;
overflow: hidden;
}
svg{
display: block;
margin: auto;
-webkit-transform-origin: top center;
-webkit-transform: scale(1.5);
-moz-transform-origin: top center;
-moz-transform: scale(1.5);
}
.hit-area{
cursor: pointer;
}
.face .mouth{
-webkit-transform-origin: 0px 4px;
-webkit-transition: -webkit-transform .4s;
-webkit-transform: scale(1, 0);
-moz-transform-origin: 0px 4px;
-moz-transition: -webkit-transform .4s;
-moz-transform: scale(1, 0);
}
.face .eye.right{
-webkit-transform-origin: 8px -4px;
-moz-transform-origin: 8px -4px;
}
.face .eye.left{
-webkit-transform-origin: -8px -4px;
-moz-transform-origin: -8px -4px;
}
.face .eye{
-webkit-transition: -webkit-transform .2s;
-webkit-transform: scale(1, 0);
-moz-transition: -webkit-transform .2s;
-moz-transform: scale(1, 0);
}
@-webkit-keyframes breeze{
0% {
-webkit-transform: rotate(0deg);
}
50% {
-webkit-transform: rotate(10deg);
}
100% {
-webkit-transform: rotate(0deg);
}
}
@-moz-keyframes breeze{
0% {
-moz-transform: rotate(0deg);
}
50% {
-moz-transform: rotate(10deg);
}
100% {
-moz-transform: rotate(0deg);
}
}
@-webkit-keyframes blink{
0% {
-webkit-transform: scale(1, 0);
}
10% {
-webkit-transform: scale(1, 1);
}
90% {
-webkit-transform: scale(1, 1);
}
100% {
-webkit-transform: scale(1, 0);
}
}
@-moz-keyframes blink{
0% {
-moz-transform: scale(1, 0);
}
10% {
-moz-transform: scale(1, 1);
}
90% {
-moz-transform: scale(1, 1);
}
100% {
-moz-transform: scale(1, 0);
}
}
@-webkit-keyframes talk{
0% {
-webkit-transform: scale(1, 0);
}
50% {
-webkit-transform: scale(1, 1);
}
100% {
-webkit-transform: scale(1, 0);
}
}
@-moz-keyframes talk{
0% {
-moz-transform: scale(1, 0);
}
50% {
-moz-transform: scale(1, 1);
}
100% {
-moz-transform: scale(1, 0);
}
}
.tree{
-webkit-transform-origin: 50% 100%;
-webkit-animation: breeze 2s ease-out infinite;
-moz-transform-origin: 50% bottom;
/*-moz-animation: breeze 2s ease-out infinite;*/
}
.tree .face.animating .eye{
-webkit-transform: scale(1, 1);
-moz-transform: scale(1, 1);
}
.face.animating .eye{
-webkit-animation: blink 5s infinite;
-moz-animation: blink 5s infinite;
}
.face.animating .mouth{
-webkit-animation: talk 1s infinite;
-moz-animation: talk 1s infinite;
}
#cube-hitarea{
position: absolute;
top: 100px;
left: 100px;
width: 125px;
height: 125px;
cursor: pointer;
}
#cube{
position: absolute;
left: 25px;
top: 25px;
width: 74px;
height: 74px;
z-index: 100;
backface-visibility: visible;
pointer-events: none;
-webkit-transform-style: preserve-3d;
-webkit-transform-origin: center center;
-webkit-backface-visibility: visible;
-webkit-transform: rotateX(-45deg) rotateY(50deg);
-webkit-transition: -webkit-transform 1s;
-moz-transform-style: preserve-3d;
-moz-transform-origin: center center;
-moz-backface-visibility: visible;
-moz-transform: rotateX(-45deg) rotateY(50deg);
-moz-transition: -moz-transform 1s;
}
.side{
position: absolute;
top: 0;
left: 0;
width: 74px;
height: 74px;
pointer-events: none;
backface-visibility: visible;
-webkit-transform-origin: center center;
-webkit-backface-visibility: visible;
-moz-transform-origin: center center;
-moz-backface-visibility: visible;
}
.side *{
pointer-events: none;
}
#cube .side:nth-child(1) {
-webkit-transform: translateY(37px) rotateX(90deg);
-moz-transform: translateY(37px) rotateX(90deg);
}
#cube .side:nth-child(2) {
-webkit-transform: translateY(-37px) rotateX(-90deg);
-moz-transform: translateY(-37px) rotateX(-90deg);
}
#cube .side:nth-child(3) {
-webkit-transform: translateX(37px) rotateY(-90deg);
-moz-transform: translateX(37px) rotateY(-90deg);
}
#cube .side:nth-child(4) {
-webkit-transform: translateX(-37px) rotateY(-90deg);
-moz-transform: translateX(-37px) rotateY(-90deg);
}
#cube .side:nth-child(5) {
-webkit-transform: translateZ(37px) rotateZ(90deg);
-moz-transform: translateZ(37px) rotateZ(90deg);
}
#cube .side:nth-child(6) {
-webkit-transform: translateZ(-37px) rotateZ(0deg);
-moz-transform: translateZ(-37px) rotateZ(0deg);
}
</style>
</head>
<body>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="500px"
height="500px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="preserve">
<g id="Layer_1">
<rect x="1.103" y="-3.397" fill="#B7C077" width="498.897" height="503.397"/>
<polygon fill="#8FA268" points="418.781,75.171 403.456,67.284 371.524,101.763 386.849,109.65 "/>
<polygon fill="#8FA268" points="455.281,94.171 439.956,86.284 408.024,120.763 423.349,128.65 "/>
<g>
<path fill="#8FA268" d="M307.422,349.64c2.285-1.785,5.976-0.877,8.245,2.027s2.255,6.705-0.03,8.49
c-2.285,1.785-11.397,0.436-11.397,0.436S305.137,351.425,307.422,349.64z"/>
<path fill="#2D7E66" d="M322.176,351.605c0,2.9-3.246,5.25-7.25,5.25s-7.25-2.35-7.25-5.25c0-2.899,7.25-9.25,7.25-9.25
S322.176,348.706,322.176,351.605z"/>
<g>
<path fill="#4B9469" d="M315.638,343c0.56,1.102,4.291,8.604,3.316,11.104c-0.551,1.413-1.879,2.357-3.551,2.734
c3.781-0.179,6.774-2.45,6.774-5.233C322.176,349.266,317.461,344.685,315.638,343z"/>
<path fill="#4B9469" d="M315.501,342.874c-0.351-0.322-0.574-0.518-0.574-0.518s-0.585,0.515-1.411,1.303
C314.567,343.22,315.325,342.938,315.501,342.874z"/>
</g>
</g>
<path fill="#B7AA92" d="M448.987,144.849c11.418,1.436,26.354-1.275,32.959,6.957c6.697,8.347,11.56,23.593,10.135,34.927
c-1.426,11.333-7.266,28.424-15.822,34.852c-8.438,6.34-26.34,8.047-37.757,6.611c-11.418-1.436-32.753-3.982-39.358-12.215
c-6.697-8.347,14.278-27.631,15.704-38.964c1.426-11.333-9.795-29.455-1.239-35.883
C422.048,134.793,437.569,143.412,448.987,144.849z"/>
<path fill="#1DA2C7" d="M446.987,147.849c11.418,1.436,26.354-1.275,32.959,6.957c6.697,8.347,11.56,23.593,10.135,34.927
c-1.426,11.333-7.266,28.424-15.822,34.852c-8.438,6.34-26.34,8.047-37.757,6.611c-11.418-1.436-32.753-3.982-39.358-12.215
c-6.697-8.347,14.278-27.631,15.704-38.964c1.426-11.333-9.795-29.455-1.239-35.883
C420.048,137.793,435.569,146.412,446.987,147.849z"/>
<path fill="#188BAB" d="M479.946,154.806c-6.605-8.232-21.542-5.521-32.959-6.957c-11.418-1.436-26.939-10.056-35.378-3.716
c-1.42,1.067-2.287,2.462-2.765,4.089c8.765-2.002,21.436,4.406,31.143,5.627c11.418,1.436,26.354-1.275,32.959,6.957
c6.697,8.347,11.56,23.593,10.135,34.927c-1.176,9.346-5.356,22.603-11.584,30.571c0.994-0.534,1.935-1.098,2.762-1.719
c8.556-6.428,14.396-23.519,15.822-34.852C491.507,178.399,486.644,163.153,479.946,154.806z"/>
<g>
<path fill="#8FA268" d="M141.244,332.65l5.092,6.17l9.996-8.312c0.023-0.018,0.05-0.027,0.072-0.046
c1.341-1.106,1.322-3.343-0.042-4.995s-3.556-2.095-4.896-0.988C151.261,324.648,141.244,332.65,141.244,332.65z"/>
<path fill="#8FA268" d="M143.154,334.964l12.684-10.036c-1.354-1.194-3.192-1.423-4.372-0.449
c-0.205,0.169-10.222,8.171-10.222,8.171L143.154,334.964z"/>
<path fill="#8FA268" d="M128.41,330.061c5.75-4.746,14.259-3.932,19.005,1.819c4.746,5.75,3.932,14.259-1.819,19.005
c-5.75,4.746-29.031,6.456-29.031,6.456S122.66,334.807,128.41,330.061z"/>
<path fill="#8FA268" d="M116.565,357.341c0,0,0.07-0.005,0.176-0.014c1.86-4.138,9.678-20.974,15.261-24.357
c6.072-3.679,13.88-1.998,17.949,3.676c-0.5-1.695-1.341-3.319-2.536-4.767c-4.746-5.75-13.255-6.565-19.005-1.819
C122.66,334.807,116.565,357.341,116.565,357.341z"/>
</g>
<g>
<g>
<path fill="#8FA268" d="M137.623,221.277l2.694,3.265l5.289-4.398c0.012-0.009,0.026-0.015,0.038-0.024
c0.709-0.585,0.699-1.769-0.022-2.643c-0.722-0.874-1.881-1.108-2.591-0.523C142.923,217.043,137.623,221.277,137.623,221.277z"
/>
<path fill="#8FA268" d="M138.633,222.501l6.711-5.31c-0.716-0.632-1.689-0.753-2.313-0.238c-0.108,0.089-5.408,4.324-5.408,4.324
L138.633,222.501z"/>
<path fill="#8FA268" d="M130.832,219.907c3.043-2.511,7.545-2.08,10.056,0.962c2.511,3.043,2.08,7.545-0.962,10.056
c-3.043,2.511-15.361,3.416-15.361,3.416S127.79,222.418,130.832,219.907z"/>
<path fill="#8FA268" d="M124.565,234.341c0,0,0.037-0.003,0.093-0.007c0.984-2.189,5.121-11.098,8.075-12.887
c3.213-1.946,7.344-1.057,9.497,1.945c-0.264-0.897-0.709-1.756-1.342-2.522c-2.511-3.043-7.013-3.473-10.056-0.962
C127.79,222.418,124.565,234.341,124.565,234.341z"/>
</g>
<g id="tree_2_" class="tree">
<path fill="#4D333C" d="M146.93,210.747h-4.233l0.025,6.878c-0.001,0.015-0.006,0.03-0.006,0.045c0,0.92,0.919,1.665,2.052,1.665
s2.052-0.746,2.052-1.665C146.821,217.53,146.93,210.747,146.93,210.747z"/>
<path fill="#61403F" d="M145.342,210.747l-0.176,8.556c0.943-0.15,1.656-0.823,1.656-1.633c0-0.141,0.108-6.923,0.108-6.923
H145.342z"/>
<path fill="#2D7E66" d="M152.309,206.382c0,3.945-3.198,7.143-7.143,7.143c-3.945,0-7.143-3.198-7.143-7.143
s7.143-14.021,7.143-14.021S152.309,202.437,152.309,206.382z"/>
<path fill="#4B9469" d="M145.166,192.361c0,0-0.022,0.031-0.054,0.076c1.062,2.153,5.3,11.013,4.799,14.431
c-0.544,3.717-3.86,6.337-7.545,6.086c0.86,0.367,1.806,0.571,2.8,0.571c3.945,0,7.143-3.198,7.143-7.143
C152.309,202.437,145.166,192.361,145.166,192.361z"/>
</g>
</g>
<g>
<g>
<path fill="#8FA268" d="M155.331,243.566l4.078,4.942l8.006-6.657c0.018-0.014,0.04-0.022,0.058-0.037
c1.074-0.886,1.059-2.677-0.034-4.001c-1.092-1.323-2.848-1.678-3.922-0.792C163.354,237.157,155.331,243.566,155.331,243.566z"
/>
<path fill="#8FA268" d="M156.86,245.419l10.159-8.038c-1.084-0.957-2.556-1.139-3.501-0.36c-0.164,0.135-8.187,6.545-8.187,6.545
L156.86,245.419z"/>
<path fill="#8FA268" d="M145.052,241.492c4.606-3.801,11.42-3.149,15.221,1.457c3.801,4.606,3.149,11.42-1.457,15.221
c-4.606,3.801-23.252,5.171-23.252,5.171S140.446,245.293,145.052,241.492z"/>
<path fill="#8FA268" d="M135.565,263.341c0,0,0.056-0.004,0.141-0.011c1.489-3.314,7.751-16.799,12.223-19.508
c4.863-2.946,11.117-1.6,14.376,2.944c-0.4-1.357-1.074-2.658-2.031-3.818c-3.801-4.606-10.616-5.258-15.221-1.457
C140.446,245.293,135.565,263.341,135.565,263.341z"/>
</g>
<g id="tree_3_" class="tree">
<path fill="#4D333C" d="M169.418,227.627h-6.407l0.039,10.412c-0.001,0.023-0.008,0.045-0.008,0.068
c0,1.392,1.391,2.521,3.107,2.521s3.107-1.129,3.107-2.521C169.255,237.895,169.418,227.627,169.418,227.627z"/>
<path fill="#61403F" d="M167.015,227.627l-0.267,12.951c1.428-0.227,2.506-1.246,2.506-2.471c0-0.213,0.164-10.48,0.164-10.48
H167.015z"/>
<path fill="#2D7E66" d="M177.561,221.02c0,5.971-4.841,10.812-10.812,10.812c-5.971,0-10.812-4.841-10.812-10.812
s10.812-21.224,10.812-21.224S177.561,215.049,177.561,221.02z"/>
<path fill="#4B9469" d="M166.749,199.796c0,0-0.033,0.046-0.081,0.116c1.608,3.258,8.022,16.671,7.265,21.844
c-0.823,5.626-5.842,9.592-11.421,9.213c1.302,0.555,2.733,0.864,4.238,0.864c5.971,0,10.812-4.841,10.812-10.812
C177.561,215.048,166.749,199.796,166.749,199.796z"/>
</g>
</g>
<g>
<g>
<path fill="#8FA268" d="M108.244,247.65l5.092,6.17l9.996-8.312c0.023-0.018,0.05-0.027,0.072-0.046
c1.341-1.106,1.322-3.343-0.042-4.995s-3.556-2.095-4.896-0.988C118.261,239.648,108.244,247.65,108.244,247.65z"/>
<path fill="#8FA268" d="M110.154,249.964l12.684-10.036c-1.354-1.194-3.192-1.423-4.372-0.449
c-0.205,0.169-10.222,8.171-10.222,8.171L110.154,249.964z"/>
<path fill="#8FA268" d="M95.41,245.061c5.75-4.746,14.259-3.932,19.005,1.819c4.746,5.75,3.932,14.259-1.819,19.005
c-5.75,4.746-29.031,6.456-29.031,6.456S89.66,249.807,95.41,245.061z"/>
<path fill="#8FA268" d="M83.565,272.341c0,0,0.07-0.005,0.176-0.014c1.86-4.138,9.678-20.974,15.262-24.357
c6.072-3.679,13.88-1.998,17.949,3.676c-0.5-1.695-1.341-3.319-2.536-4.767c-4.746-5.75-13.255-6.565-19.005-1.819
C89.66,249.807,83.565,272.341,83.565,272.341z"/>
</g>
<g id="tree" class="tree">
<path fill="#4D333C" d="M125.833,227.75h-8l0.048,13c-0.001,0.029-0.011,0.056-0.011,0.085c0,1.738,1.737,3.147,3.879,3.147
s3.879-1.409,3.879-3.147C125.629,240.569,125.833,227.75,125.833,227.75z"/>
<path fill="#61403F" d="M122.833,227.75l-0.333,16.171c1.783-0.284,3.129-1.556,3.129-3.086c0-0.266,0.204-13.085,0.204-13.085
H122.833z"/>
<path fill="#2D7E66" d="M136,219.5c0,7.456-6.044,13.5-13.5,13.5s-13.5-6.044-13.5-13.5s13.5-26.5,13.5-26.5
S136,212.044,136,219.5z"/>
<path fill="#4B9469" d="M122.5,193c0,0-0.041,0.058-0.101,0.144c2.008,4.068,10.016,20.815,9.071,27.274
c-1.028,7.025-7.295,11.977-14.26,11.503c1.625,0.693,3.413,1.078,5.291,1.078c7.456,0,13.5-6.044,13.5-13.5
C136,212.044,122.5,193,122.5,193z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M107.995,488.935c0,0-27.495,15.065-38.495-8.435s14.505-35.435,14.505-35.435l-0.12,0.066
c8.25-4.635,21.086-15.728,22.441-24.818c0.706-4.742-2.117-10.473-8.392-17.033c-29.661-31.009-40.896-58.425-34.35-83.813
c5.938-23.025,25.774-39.959,58.958-50.329c29.623-9.256,55.577-6.308,79.346,9.018c19.332,12.465,34.375,31.005,51.794,52.473
c5.819,7.172,11.837,14.588,18.272,22.071c19.028,22.127,42.605,34.183,61.514,31.455c13.414-1.932,24.096-11.502,31.747-28.444
c9.5-21.035-10.042-41.312-19.434-51.055c-23.146-24.015-60.765-49.642-100.592-76.773c-11.578-7.887-23.55-16.042-35.499-24.381
c-70.021-48.869-47.963-94.971-39.535-107.937c24.343-37.448,86.145-51.298,124.771-27.962
c48.298,29.18,80.323,52.135,81.663,53.098c11.212,8.058,13.768,23.68,5.71,34.891c-8.059,11.21-23.676,13.767-34.889,5.712l0,0
c-0.312-0.225-31.873-22.831-78.34-50.905c-14.191-8.572-46.646-3.502-56.994,12.417c-2.279,3.506-2.561,6.683-0.974,10.966
c1.817,4.903,7.769,15.154,27.204,28.718c11.716,8.177,23.57,16.252,35.033,24.061c42.021,28.626,81.712,55.665,108.441,83.397
c15.897,16.493,26.271,32.227,31.712,48.098c6.755,19.703,5.844,39.296-2.71,58.235c-14.717,32.586-39.643,52.955-70.188,57.354
c-4.11,0.592-8.272,0.884-12.457,0.884c-32.675,0.002-67.042-17.771-94.094-49.228c-6.902-8.025-13.149-15.725-19.19-23.17
c-33.405-41.169-46.527-54.919-77.399-45.269c-18.515,5.786-24.713,12.207-25.456,15.09c-1.033,4.008,2.451,16.261,22.065,36.768
c21.94,22.938,23.89,44.913,21.661,59.309C150.006,464.983,112.278,486.592,107.995,488.935z"/>
</g>
<polygon fill="#8FA268" points="444.031,82.921 421.206,70.034 376.024,118.763 398.849,131.65 "/>
<ellipse fill="#425353" cx="431.75" cy="81.25" rx="39.75" ry="32.25"/>
<g>
<path fill="#A46340" d="M114.994,480.935c0,0-29.994,15.565-38.994-9.935s15.006-33.935,15.006-33.935l-0.122,0.065
c8.25-4.634,21.087-15.728,22.441-24.818c0.706-4.74-2.116-10.472-8.391-17.031c-29.663-31.01-40.897-58.425-34.35-83.815
c5.938-23.025,25.775-39.956,58.959-50.328c29.623-9.255,55.578-6.306,79.344,9.019c19.334,12.463,34.375,31.003,51.794,52.472
c5.821,7.172,11.837,14.588,18.271,22.072c19.032,22.125,42.604,34.183,61.516,31.456c13.416-1.935,24.097-11.503,31.747-28.447
c3.084-6.828,9.5-21.034-19.435-51.053c-23.146-24.016-60.763-49.644-100.591-76.775c-11.578-7.884-23.55-16.041-35.5-24.381
c-70.019-48.869-47.962-94.972-39.534-107.938c24.345-37.447,86.149-51.296,124.771-27.959
c48.297,29.178,80.322,52.134,81.663,53.097c11.212,8.059,13.769,23.678,5.709,34.891c-8.059,11.21-23.673,13.767-34.887,5.712
l-0.001,0c-0.312-0.225-31.871-22.832-78.34-50.906c-16.629-10.045-48.164-1.173-56.994,12.418
c-2.278,3.506-2.562,6.682-0.975,10.966c1.819,4.903,7.769,15.153,27.207,28.719c11.716,8.175,23.568,16.25,35.031,24.06
c42.021,28.625,81.712,55.666,108.44,83.396c15.896,16.494,26.271,32.229,31.713,48.101c6.756,19.699,5.844,39.293-2.71,58.234
c-14.716,32.584-39.644,52.953-70.188,57.353c-36.207,5.218-76.034-12.859-106.55-48.344c-6.903-8.024-13.15-15.725-19.19-23.169
c-33.406-41.168-46.527-54.915-77.4-45.269c-18.516,5.784-24.712,12.206-25.456,15.091c-1.031,4.006,2.453,16.26,22.065,36.766
c21.941,22.938,23.891,44.912,21.663,59.31C157.006,456.984,119.278,478.591,114.994,480.935z"/>
</g>
<g>
<polygon fill="#F8F1E5" points="417.514,47.235 402.848,38.955 414.939,27.215 429.606,35.495 "/>
<polygon fill="#DBD6CA" points="417.514,47.235 417.626,76.223 429.718,64.483 429.606,35.495 "/>
<polygon fill="#A7AFA4" points="417.835,75.829 403.169,67.548 403.052,39.102 417.719,47.382 "/>
</g>
<defs>
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="68.781" y="48.158" width="356.179" height="437.532">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="68.781" y="48.158" width="356.179" height="437.532" id="SVGID_1_">
<g filter="url(#Adobe_OpacityMaskFilter)">
<g>
<g>
<polygon fill="#FFFFFF" points="369.002,174.823 349.888,155.712 327.395,140.715 330.333,127 360.675,90.792 388.113,109.084
411.425,132.396 "/>
</g>
<g>
<path fill="#FFFFFF" d="M338,434.397l-2-17.731l-12-43.269l24.601-5.638L365,353.397L397.667,389l6.268,18.175l-25.173,12.585
L338,434.397z M109,409.397l-8.039-11.622l-0.527-0.589l-20.069-22.296L85,361l39.965-26.248l19.513,21.686l20.695,20.695
L109,409.397z M272.573,415.756l-20.044-20.047l-22.137-17.711L236,360.647l31.873-29.499l24.738,19.792L306,363.397
l-28.5,34.75L272.573,415.756z M371,333.397l-17-32l2.5-11.064l49.908-22.089l26.842,53.685L371,333.397z M204,338.397
l-17.119-16.618l-0.7-0.639L171,310.397l2-12.731l31.342-41.103l21.523,19.565l22.677,18.143L207,326L204,338.397z
M124,327.397l-8.667-11.064l-43.102-28.743l26.289-19.116l29.05-14.526L154,296.667l0.404,10.951l-24.617,12.307L124,327.397z
M331.55,280.052l-26.058-17.373l-1.019-0.812l-23.424-18.742l1.95-11.958l35.531-34.896l22.426,17.942l23.878,15.916
L333,268.333L331.55,280.052z M252.135,222.594l-27.238-15.888L202,192.397l4.167-14.731L241,144.397l16.76,12.017
l24.605,14.354L253.5,210.833L252.135,222.594z M224,131.397l-53.333,0.103L163,142.397l7.215-53.596l0.489-0.834L177,67.397
l52.833,27.769l-1.833,13.5l-5.011,8.749L224,131.397z M298.7,118.625L258,102.397l1-14.064l12.851-50.216l53.665,26.831
L299.667,107L298.7,118.625z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="94.679,500 61.398,450.077 89.706,431.204 101,423.397 137,454.333 142,469.397
116.301,485.584 "/>
</g>
</g>
</g>
</mask>
<g mask="url(#SVGID_1_)">
<path fill="#C1BF80" d="M114.995,480.935c0,0-27.495,15.065-38.495-8.435s14.505-35.435,14.505-35.435l-0.12,0.066
c8.25-4.635,21.086-15.728,22.441-24.818c0.706-4.742-2.117-10.473-8.392-17.033c-29.661-31.009-40.896-58.425-34.35-83.813
c5.938-23.025,25.774-39.959,58.958-50.329c29.623-9.256,55.577-6.308,79.346,9.018c19.332,12.465,34.375,31.005,51.794,52.473
c5.819,7.172,11.837,14.588,18.272,22.071c19.028,22.127,42.605,34.183,61.514,31.455c13.414-1.932,24.096-11.502,31.747-28.444
c9.5-21.035-10.042-41.312-19.434-51.055c-23.146-24.015-60.765-49.642-100.592-76.773c-11.578-7.887-23.55-16.042-35.499-24.381
c-70.021-48.869-47.963-94.971-39.535-107.937c24.343-37.448,86.145-51.298,124.771-27.962
c48.298,29.18,80.323,52.135,81.663,53.098c11.212,8.058,13.768,23.68,5.71,34.891c-8.059,11.21-23.676,13.767-34.889,5.712l0,0
c-0.312-0.225-31.873-22.831-78.34-50.905c-14.191-8.572-46.646-3.502-56.994,12.417c-2.279,3.506-2.561,6.683-0.974,10.966
c1.817,4.903,7.769,15.154,27.204,28.718c11.716,8.177,23.57,16.252,35.033,24.061c42.021,28.626,81.712,55.665,108.441,83.397
c15.897,16.493,26.271,32.227,31.712,48.098c6.755,19.703,5.844,39.296-2.71,58.235c-14.717,32.586-39.643,52.955-70.188,57.354
c-4.11,0.592-8.272,0.884-12.457,0.884c-32.675,0.002-67.042-17.771-94.094-49.228c-6.902-8.025-13.149-15.725-19.19-23.17
c-33.405-41.169-46.527-54.919-77.399-45.269c-18.515,5.786-24.713,12.207-25.456,15.09c-1.033,4.008,2.451,16.261,22.065,36.768
c21.94,22.938,23.89,44.913,21.661,59.309C157.006,456.983,119.278,478.592,114.995,480.935z"/>
</g>
<g>
<g>
<path fill="#D88254" d="M114.994,470.935c0,0-29.994,15.565-38.994-9.935s15.006-33.935,15.006-33.935l-0.122,0.065
c8.25-4.634,21.087-15.728,22.441-24.818c0.706-4.74-2.116-10.472-8.391-17.031c-29.663-31.01-40.897-58.425-34.35-83.815
c5.938-23.025,25.775-39.956,58.959-50.328c29.623-9.255,55.578-6.306,79.344,9.019c19.334,12.463,34.375,31.003,51.794,52.472
c5.821,7.172,11.837,14.588,18.271,22.072c19.032,22.125,42.604,34.183,61.516,31.456c13.416-1.935,24.097-11.503,31.747-28.447
c3.084-6.828,9.5-21.034-19.435-51.053c-23.146-24.016-60.763-49.644-100.591-76.775c-11.578-7.884-23.55-16.041-35.5-24.381
c-70.019-48.869-47.962-94.972-39.534-107.938c24.345-37.447,86.149-51.296,124.771-27.959
c48.297,29.178,80.322,52.134,81.663,53.097c11.212,8.059,13.769,23.678,5.709,34.891c-8.059,11.21-23.673,13.767-34.887,5.712
l-0.001,0c-0.312-0.225-31.871-22.832-78.34-50.906c-16.629-10.045-48.164-1.173-56.994,12.418
c-2.278,3.506-2.562,6.682-0.975,10.966c1.819,4.903,7.769,15.153,27.207,28.719c11.716,8.175,23.568,16.25,35.031,24.06
c42.021,28.625,81.712,55.666,108.44,83.396c15.896,16.494,26.271,32.229,31.713,48.101c6.756,19.699,5.844,39.293-2.71,58.234
c-14.716,32.584-39.644,52.953-70.188,57.353c-36.207,5.218-76.034-12.859-106.55-48.344c-6.903-8.024-13.15-15.725-19.19-23.169
c-33.406-41.168-46.527-54.915-77.4-45.269c-18.516,5.784-24.712,12.206-25.456,15.091c-1.031,4.006,2.453,16.26,22.065,36.766
c21.941,22.938,23.891,44.912,21.663,59.31C157.006,446.984,119.278,468.591,114.994,470.935z"/>
</g>
<defs>
<filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="68.781" y="38.158" width="356.179" height="437.525">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="68.781" y="38.158" width="356.179" height="437.525" id="SVGID_2_">
<g filter="url(#Adobe_OpacityMaskFilter_1_)">
<g>
<g>
<polygon fill="#FFFFFF" points="369.002,165.425 349.888,146.314 327.395,131.318 360.675,81.395 388.113,99.687
411.425,122.999 "/>
</g>
<g>
<path fill="#FFFFFF" d="M338,425l-14-61l24.601-5.638L365,344l38.935,53.777l-25.173,12.585L338,425z M109,400l-8.039-11.622
l-0.527-0.589l-20.069-22.296l44.6-40.139l19.513,21.686l20.695,20.695L109,400z M272.573,406.358l-20.044-20.047
l-22.137-17.711l37.48-46.85l24.738,19.792L306,354L272.573,406.358z M371,324l-17-32l52.408-33.153l26.842,53.685L371,324z
M204,329l-17.119-16.618l-0.7-0.639L171,301l33.342-53.834l21.523,19.565l22.677,18.143L204,329z M124,318l-51.769-39.807
l26.289-19.116l29.05-14.526l26.834,53.669l-24.617,12.307L124,318z M331.55,270.654l-26.058-17.373l-1.019-0.812
l-23.424-18.742l37.481-46.854l22.426,17.942l23.878,15.916L331.55,270.654z M252.135,213.197l-27.238-15.888L202,183l39-48
l16.76,12.017l24.605,14.354L252.135,213.197z M224,122l-61,11l7.215-53.596l0.489-0.834L177,58l57,40l-11.011,10.019L224,122
z M298.7,109.228L258,93l13.851-64.28l53.665,26.831L298.7,109.228z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="94.679,490.603 61.398,440.68 89.706,421.807 101,414 142,460 116.301,476.187 "/>
</g>
</g>
</g>
</mask>
<g mask="url(#SVGID_2_)">
<path fill="#F4F2A3" d="M114.995,470.935c0,0-27.995,15.399-38.662-9.268C65.667,437,91.005,427.065,91.005,427.065l-0.12,0.066
c8.25-4.635,21.086-15.728,22.441-24.818c0.706-4.742-2.117-10.473-8.392-17.033c-29.661-31.009-40.896-58.425-34.35-83.813
c5.938-23.025,25.774-39.959,58.958-50.329c29.623-9.256,55.577-6.308,79.346,9.018c19.332,12.465,34.375,31.005,51.794,52.473
c5.819,7.172,11.837,14.588,18.272,22.071c19.028,22.127,42.605,34.183,61.514,31.455c13.414-1.932,24.096-11.502,31.747-28.444
c9.5-21.035-10.042-41.312-19.434-51.055c-23.146-24.015-60.765-49.642-100.592-76.773c-11.578-7.887-23.55-16.042-35.499-24.381
c-70.021-48.869-47.963-94.971-39.535-107.937c24.343-37.448,86.145-51.298,124.771-27.962
c48.298,29.18,80.323,52.135,81.663,53.098c11.212,8.058,13.768,23.68,5.71,34.891c-8.059,11.21-23.676,13.767-34.889,5.712l0,0
c-0.312-0.225-31.873-22.831-78.34-50.905c-14.191-8.572-46.646-3.502-56.994,12.417c-2.279,3.506-2.561,6.683-0.974,10.966
c1.817,4.903,7.769,15.154,27.204,28.718c11.716,8.177,23.57,16.252,35.033,24.061c42.021,28.626,81.712,55.665,108.441,83.397
c15.897,16.493,26.271,32.227,31.712,48.098c6.755,19.703,5.844,39.296-2.71,58.235c-14.717,32.586-39.643,52.955-70.188,57.354
c-4.11,0.592-8.272,0.884-12.457,0.884c-32.675,0.002-67.042-17.771-94.094-49.228c-6.902-8.025-13.149-15.725-19.19-23.17
c-33.405-41.169-46.527-54.919-77.399-45.269c-18.515,5.786-24.713,12.207-25.456,15.09c-1.033,4.008,2.451,16.261,22.065,36.768
c21.94,22.938,23.89,44.913,21.661,59.309C157.006,446.983,119.278,468.592,114.995,470.935z"/>
</g>
</g>
<g id="dots">
<ellipse fill="#50728C" cx="366.75" cy="120" rx="12.75" ry="11.5"/>
<ellipse fill="#BADA8B" cx="164.25" cy="270.25" rx="12.25" ry="11.75"/>
<ellipse fill="#7970B3" cx="362.75" cy="261.25" rx="12.25" ry="11.25"/>
<ellipse fill="#42B19D" cx="390.75" cy="295.5" rx="14.75" ry="12.5"/>
<ellipse fill="#DA813E" cx="120" cy="363.5" rx="13.545" ry="13.122"/>
<ellipse fill="#42B19D" cx="119" cy="281.5" rx="12.928" ry="12.524"/>
<ellipse transform="matrix(0.9297 0.3683 -0.3683 0.9297 120.9971 -56.4044)" fill="#50728C" cx="208.25" cy="288.75" rx="13.608" ry="12.715"/>
<ellipse transform="matrix(0.7964 0.6048 -0.6048 0.7964 272.4656 -91.1952)" fill="#EBC755" cx="271.674" cy="359.063" rx="15.027" ry="13.5"/>
<ellipse fill="#DA813E" cx="358.5" cy="385.75" rx="14.5" ry="13.25"/>
<circle fill="#7970B3" cx="138" cy="413" r="13"/>
<ellipse fill="#E2584C" cx="93.5" cy="322.5" rx="13" ry="12"/>
<ellipse fill="#7970B3" cx="240.5" cy="324" rx="11.5" ry="12"/>
<ellipse fill="#E2584C" cx="308" cy="388.5" rx="13" ry="11.5"/>
<ellipse fill="#BADA8B" cx="397.75" cy="343.25" rx="13.25" ry="11.75"/>
<ellipse fill="#E2584C" cx="283.25" cy="199.5" rx="12.25" ry="11.5"/>
<ellipse fill="#50728C" cx="325.25" cy="230.25" rx="12.25" ry="11.25"/>
<circle fill="#EBC755" cx="244" cy="175" r="13"/>
<ellipse fill="#BADA8B" cx="205.75" cy="144.75" rx="12.25" ry="11.25"/>
<ellipse fill="#DA813E" cx="195.25" cy="100.5" rx="13.25" ry="12"/>
<ellipse fill="#7970B3" cx="234.25" cy="69" rx="14.25" ry="12"/>
<ellipse fill="#42B19D" cx="289.75" cy="72.75" rx="13.25" ry="11.75"/>
<ellipse fill="#E2584C" cx="329" cy="94.5" rx="12" ry="10.75"/>
<ellipse fill="#EBC755" cx="102.25" cy="450" rx="13.25" ry="11.5"/>
</g>
<g id="tree_6_" class="tree">
<g>
<path fill="#4D333C" d="M158.833,312.75h-8l0.048,13c-0.001,0.029-0.011,0.056-0.011,0.085c0,1.738,1.737,3.147,3.879,3.147
s3.879-1.409,3.879-3.147C158.629,325.569,158.833,312.75,158.833,312.75z"/>
<path fill="#61403F" d="M155.833,312.75l-0.333,16.171c1.783-0.284,3.129-1.556,3.129-3.086c0-0.266,0.204-13.085,0.204-13.085
H155.833z"/>
<path fill="#2D7E66" d="M169,304.5c0,7.456-6.044,13.5-13.5,13.5s-13.5-6.044-13.5-13.5s13.5-26.5,13.5-26.5
S169,297.044,169,304.5z"/>
<path fill="#4B9469" d="M155.5,278c0,0-0.041,0.058-0.101,0.144c2.008,4.068,10.016,20.815,9.071,27.274
c-1.028,7.025-7.295,11.977-14.26,11.503c1.625,0.693,3.413,1.078,5.291,1.078c7.456,0,13.5-6.044,13.5-13.5
C169,297.044,155.5,278,155.5,278z"/>
</g>
</g>
<g>
<defs>
<ellipse id="SVGID_3_" cx="431.75" cy="81.25" rx="39.75" ry="32.25"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" overflow="visible"/>
</clipPath>
<polygon clip-path="url(#SVGID_4_)" fill="#324040" points="418.781,75.171 403.456,67.284 371.524,101.763 386.849,109.65 "/>
<polygon clip-path="url(#SVGID_4_)" fill="#324040" points="434.031,92.921 411.206,80.034 389.024,103.763 411.849,116.65 "/>
<polygon clip-path="url(#SVGID_4_)" fill="#324040" points="455.281,94.171 439.956,86.284 408.024,120.763 423.349,128.65 "/>
</g>
<g>
<g>
<path fill="#8FA268" d="M417.244,418.65l5.092,6.17l9.996-8.312c0.023-0.018,0.05-0.027,0.072-0.046
c1.341-1.106,1.322-3.343-0.042-4.995c-1.364-1.652-3.556-2.095-4.896-0.988C427.261,410.648,417.244,418.65,417.244,418.65z"/>
<path fill="#8FA268" d="M419.154,420.964l12.684-10.036c-1.354-1.194-3.192-1.423-4.372-0.449
c-0.205,0.169-10.222,8.171-10.222,8.171L419.154,420.964z"/>
<path fill="#8FA268" d="M404.41,416.061c5.75-4.746,14.259-3.932,19.005,1.819c4.746,5.75,3.932,14.259-1.819,19.005
c-5.75,4.746-29.031,6.456-29.031,6.456S398.66,420.807,404.41,416.061z"/>
<path fill="#8FA268" d="M392.565,443.341c0,0,0.07-0.005,0.176-0.014c1.86-4.138,9.678-20.974,15.262-24.357
c6.072-3.679,13.88-1.998,17.949,3.676c-0.5-1.695-1.341-3.319-2.536-4.767c-4.746-5.75-13.255-6.565-19.005-1.819
C398.66,420.807,392.565,443.341,392.565,443.341z"/>
</g>
<g id="tree_4_" class="tree">
<path fill="#4D333C" d="M434.833,398.75h-8l0.048,13c-0.001,0.029-0.011,0.056-0.011,0.085c0,1.738,1.737,3.147,3.879,3.147
s3.879-1.409,3.879-3.147C434.629,411.569,434.833,398.75,434.833,398.75z"/>
<path fill="#61403F" d="M431.833,398.75l-0.333,16.171c1.783-0.284,3.129-1.556,3.129-3.086c0-0.266,0.204-13.085,0.204-13.085
H431.833z"/>
<path fill="#2D7E66" d="M445,390.5c0,7.456-6.044,13.5-13.5,13.5s-13.5-6.044-13.5-13.5s13.5-26.5,13.5-26.5
S445,383.044,445,390.5z"/>
<path fill="#4B9469" d="M431.5,364c0,0-0.041,0.058-0.101,0.144c2.008,4.068,10.016,20.815,9.071,27.274
c-1.028,7.025-7.295,11.977-14.26,11.503c1.625,0.693,3.413,1.078,5.291,1.078c7.456,0,13.5-6.044,13.5-13.5
C445,383.044,431.5,364,431.5,364z"/>
</g>
</g>
<g>
<g>
<path fill="#8FA268" d="M91.623,245.277l2.694,3.265l5.289-4.398c0.012-0.009,0.026-0.015,0.038-0.024
c0.709-0.585,0.699-1.769-0.022-2.643c-0.722-0.874-1.881-1.108-2.591-0.523C96.923,241.043,91.623,245.277,91.623,245.277z"/>
<path fill="#8FA268" d="M92.633,246.501l6.711-5.31c-0.716-0.632-1.689-0.753-2.313-0.238c-0.108,0.089-5.408,4.324-5.408,4.324
L92.633,246.501z"/>
<path fill="#8FA268" d="M84.832,243.907c3.043-2.511,7.545-2.08,10.056,0.962c2.511,3.043,2.08,7.545-0.962,10.056
c-3.043,2.511-15.361,3.416-15.361,3.416S81.79,246.418,84.832,243.907z"/>
<path fill="#8FA268" d="M78.565,258.341c0,0,0.037-0.003,0.093-0.007c0.984-2.19,5.121-11.098,8.075-12.887
c3.213-1.946,7.344-1.057,9.497,1.945c-0.264-0.897-0.709-1.756-1.342-2.522c-2.511-3.043-7.013-3.473-10.056-0.962
C81.79,246.418,78.565,258.341,78.565,258.341z"/>
</g>
<g id="tree_1_" class="tree">
<path fill="#4D333C" d="M100.93,234.747h-4.233l0.025,6.878c-0.001,0.015-0.006,0.03-0.006,0.045c0,0.92,0.919,1.665,2.052,1.665
c1.134,0,2.052-0.746,2.052-1.665C100.821,241.53,100.93,234.747,100.93,234.747z"/>
<path fill="#61403F" d="M99.342,234.747l-0.176,8.556c0.943-0.15,1.656-0.823,1.656-1.633c0-0.141,0.108-6.923,0.108-6.923
H99.342z"/>
<path fill="#2D7E66" d="M106.309,230.382c0,3.945-3.198,7.143-7.143,7.143c-3.945,0-7.143-3.198-7.143-7.143
s7.143-14.021,7.143-14.021S106.309,226.437,106.309,230.382z"/>
<path fill="#4B9469" d="M99.166,216.361c0,0-0.022,0.031-0.054,0.076c1.062,2.153,5.3,11.013,4.799,14.431
c-0.544,3.717-3.86,6.337-7.545,6.086c0.86,0.367,1.806,0.571,2.8,0.571c3.945,0,7.143-3.198,7.143-7.143
C106.309,226.437,99.166,216.361,99.166,216.361z"/>
</g>
</g>
<g>
<g>
<path fill="#8FA268" d="M396.008,431.888l4.218,5.111l8.28-6.885c0.019-0.015,0.041-0.023,0.06-0.038
c1.11-0.916,1.095-2.769-0.035-4.138s-2.946-1.735-4.056-0.819C404.306,425.26,396.008,431.888,396.008,431.888z"/>
<path fill="#8FA268" d="M397.59,433.805l10.507-8.313c-1.121-0.989-2.644-1.179-3.621-0.372c-0.17,0.14-8.467,6.769-8.467,6.769
L397.59,433.805z"/>
<path fill="#8FA268" d="M385.377,429.743c4.763-3.931,11.812-3.257,15.743,1.507s3.257,11.812-1.507,15.743
c-4.763,3.931-24.048,5.348-24.048,5.348S380.614,433.674,385.377,429.743z"/>
<path fill="#8FA268" d="M375.565,452.341c0,0,0.058-0.004,0.146-0.011c1.54-3.428,8.017-17.374,12.642-20.176
c5.03-3.047,11.498-1.655,14.868,3.045c-0.414-1.404-1.111-2.749-2.101-3.949c-3.931-4.763-10.98-5.438-15.743-1.507
C380.614,433.674,375.565,452.341,375.565,452.341z"/>
</g>
<g id="tree_5_" class="tree">
<path fill="#4D333C" d="M410.578,415.404h-6.627l0.04,10.769c-0.001,0.024-0.009,0.046-0.009,0.07
c0,1.44,1.439,2.607,3.213,2.607s3.213-1.167,3.213-2.607C410.409,426.023,410.578,415.404,410.578,415.404z"/>
<path fill="#61403F" d="M408.093,415.404l-0.276,13.395c1.477-0.235,2.592-1.289,2.592-2.556c0-0.22,0.169-10.839,0.169-10.839
H408.093z"/>
<path fill="#2D7E66" d="M419,408.57c0,6.176-5.007,11.183-11.183,11.183s-11.183-5.007-11.183-11.183
s11.183-21.952,11.183-21.952S419,402.394,419,408.57z"/>
<path fill="#4B9469" d="M407.817,386.618c0,0-0.034,0.048-0.084,0.119c1.663,3.37,8.297,17.242,7.514,22.593
c-0.852,5.819-6.043,9.921-11.813,9.529c1.346,0.574,2.827,0.893,4.383,0.893c6.176,0,11.183-5.007,11.183-11.183
C419,402.393,407.817,386.618,407.817,386.618z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M345.746,442.285c2.285-1.785,5.976-0.877,8.245,2.027s2.255,6.705-0.03,8.49
c-2.285,1.785-11.397,0.436-11.397,0.436S343.461,444.069,345.746,442.285z"/>
<path fill="#2D7E66" d="M360.5,444.25c0,2.9-3.246,5.25-7.25,5.25s-7.25-2.35-7.25-5.25s7.25-9.25,7.25-9.25
S360.5,441.35,360.5,444.25z"/>
<g>
<path fill="#4B9469" d="M353.961,435.645c0.56,1.102,4.291,8.604,3.316,11.104c-0.551,1.413-1.879,2.357-3.551,2.734
c3.781-0.179,6.774-2.45,6.774-5.233C360.5,441.911,355.785,437.329,353.961,435.645z"/>
<path fill="#4B9469" d="M353.824,435.518c-0.351-0.322-0.574-0.518-0.574-0.518s-0.585,0.515-1.411,1.303
C352.891,435.865,353.649,435.583,353.824,435.518z"/>
</g>
</g>
<g>
<defs>
<path id="SVGID_5_" d="M114.995,470.935c0,0-27.995,15.399-38.662-9.268C65.667,437,91.005,427.065,91.005,427.065l-0.12,0.066
c8.25-4.635,21.086-15.728,22.441-24.818c0.706-4.742-2.117-10.473-8.392-17.033c-29.661-31.009-40.896-58.425-34.35-83.813
c5.938-23.025,25.774-39.959,58.958-50.329c29.623-9.256,55.577-6.308,79.346,9.018c19.332,12.465,34.375,31.005,51.794,52.473
c5.819,7.172,11.837,14.588,18.272,22.071c19.028,22.127,42.605,34.183,61.514,31.455c13.414-1.932,24.096-11.502,31.747-28.444
c9.5-21.035-10.042-41.312-19.434-51.055c-23.146-24.015-60.765-49.642-100.592-76.773c-11.578-7.887-23.55-16.042-35.499-24.381
c-70.021-48.869-47.963-94.971-39.535-107.937c24.343-37.448,86.145-51.298,124.771-27.962
c48.298,29.18,80.323,52.135,81.663,53.098c11.212,8.058,13.768,23.68,5.71,34.891c-8.059,11.21-23.676,13.767-34.889,5.712l0,0
c-0.312-0.225-31.873-22.831-78.34-50.905c-14.191-8.572-46.646-3.502-56.994,12.417c-2.279,3.506-2.561,6.683-0.974,10.966
c1.817,4.903,7.769,15.154,27.204,28.718c11.716,8.177,23.57,16.252,35.033,24.061c42.021,28.626,81.712,55.665,108.441,83.397
c15.897,16.493,26.271,32.227,31.712,48.098c6.755,19.703,5.844,39.296-2.71,58.235c-14.717,32.586-39.643,52.955-70.188,57.354
c-4.11,0.592-8.272,0.884-12.457,0.884c-32.675,0.002-67.042-17.771-94.094-49.228c-6.902-8.025-13.149-15.725-19.19-23.17
c-33.405-41.169-46.527-54.919-77.399-45.269c-18.515,5.786-24.713,12.207-25.456,15.09c-1.033,4.008,2.451,16.261,22.065,36.768
c21.94,22.938,23.89,44.913,21.661,59.309C157.006,446.983,119.278,468.592,114.995,470.935z"/>
</defs>
<clipPath id="SVGID_6_">
<use xlink:href="#SVGID_5_" overflow="visible"/>
</clipPath>
<polygon clip-path="url(#SVGID_6_)" fill="#C1BF80" points="438.031,80.921 415.206,68.034 370.024,116.763 392.849,129.65 "/>
</g>
<g>
<path fill="#8FA268" d="M330.006,440.356c1.521-1.188,3.977-0.584,5.487,1.349s1.501,4.462-0.02,5.65s-7.585,0.29-7.585,0.29
S328.485,441.544,330.006,440.356z"/>
<path fill="#2D7E66" d="M339.825,441.664c0,1.93-2.16,3.494-4.825,3.494s-4.825-1.564-4.825-3.494c0-1.93,4.825-6.156,4.825-6.156
S339.825,439.735,339.825,441.664z"/>
<g>
<path fill="#4B9469" d="M335.473,435.937c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C339.825,440.107,336.687,437.059,335.473,435.937z"/>
<path fill="#4B9469" d="M335.382,435.854c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C334.761,436.084,335.265,435.896,335.382,435.854z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M191.694,235.081c1.775-1.387,4.644-0.682,6.406,1.575c1.763,2.256,1.752,5.21-0.023,6.597
c-1.775,1.387-8.855,0.338-8.855,0.338S189.919,236.467,191.694,235.081z"/>
<path fill="#2D7E66" d="M203.158,236.608c0,2.253-2.522,4.079-5.633,4.079c-3.111,0-5.633-1.826-5.633-4.079
s5.633-7.187,5.633-7.187S203.158,234.355,203.158,236.608z"/>
<g>
<path fill="#4B9469" d="M198.078,229.921c0.435,0.856,3.334,6.685,2.576,8.628c-0.428,1.098-1.46,1.832-2.759,2.124
c2.938-0.139,5.263-1.903,5.263-4.066C203.158,234.79,199.494,231.23,198.078,229.921z"/>
<path fill="#4B9469" d="M197.971,229.823c-0.273-0.25-0.446-0.403-0.446-0.403s-0.454,0.4-1.097,1.013
C197.246,230.093,197.835,229.873,197.971,229.823z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M96.594,250.092c1.775-1.387,4.644-0.682,6.406,1.575c1.763,2.256,1.752,5.21-0.023,6.597
c-1.775,1.387-8.855,0.338-8.855,0.338S94.818,251.479,96.594,250.092z"/>
<path fill="#2D7E66" d="M108.058,251.619c0,2.253-2.522,4.079-5.633,4.079s-5.633-1.826-5.633-4.079s5.633-7.187,5.633-7.187
S108.058,249.366,108.058,251.619z"/>
<g>
<path fill="#4B9469" d="M102.977,244.933c0.435,0.856,3.334,6.685,2.576,8.628c-0.428,1.098-1.46,1.832-2.759,2.124
c2.938-0.139,5.263-1.903,5.263-4.066C108.058,249.801,104.394,246.242,102.977,244.933z"/>
<path fill="#4B9469" d="M102.871,244.835c-0.273-0.25-0.446-0.403-0.446-0.403s-0.454,0.4-1.097,1.013
C102.146,245.104,102.735,244.885,102.871,244.835z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M166.594,328.092c1.775-1.387,4.644-0.682,6.406,1.575c1.763,2.257,1.752,5.21-0.023,6.597
s-8.855,0.338-8.855,0.338S164.818,329.479,166.594,328.092z"/>
<path fill="#2D7E66" d="M178.058,329.619c0,2.253-2.522,4.079-5.633,4.079s-5.633-1.826-5.633-4.079s5.633-7.187,5.633-7.187
S178.058,327.366,178.058,329.619z"/>
<g>
<path fill="#4B9469" d="M172.977,322.933c0.435,0.856,3.334,6.685,2.576,8.628c-0.428,1.098-1.46,1.832-2.759,2.124
c2.938-0.139,5.263-1.903,5.263-4.066C178.058,327.801,174.394,324.242,172.977,322.933z"/>
<path fill="#4B9469" d="M172.871,322.835c-0.273-0.25-0.446-0.403-0.446-0.403s-0.454,0.4-1.097,1.013
C172.146,323.104,172.735,322.885,172.871,322.835z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M371.572,434.034c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S370.052,435.222,371.572,434.034z"/>
<path fill="#2D7E66" d="M381.391,435.342c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S381.391,433.413,381.391,435.342z"/>
<g>
<path fill="#4B9469" d="M377.04,429.615c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C381.391,433.786,378.253,430.737,377.04,429.615z"/>
<path fill="#4B9469" d="M376.949,429.532c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C376.328,429.762,376.832,429.574,376.949,429.532z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M189.671,37.275c2.285-1.785,5.976-0.877,8.245,2.027c2.268,2.904,2.255,6.705-0.03,8.49
s-11.397,0.436-11.397,0.436S187.385,39.06,189.671,37.275z"/>
<path fill="#2D7E66" d="M204.425,39.241c0,2.899-3.246,5.25-7.25,5.25s-7.25-2.351-7.25-5.25s7.25-9.25,7.25-9.25
S204.425,36.341,204.425,39.241z"/>
<g>
<path fill="#4B9469" d="M197.886,30.636c0.56,1.102,4.291,8.604,3.316,11.104c-0.551,1.413-1.879,2.357-3.551,2.734
c3.781-0.179,6.774-2.45,6.774-5.233C204.425,36.902,199.71,32.32,197.886,30.636z"/>
<path fill="#4B9469" d="M197.749,30.509c-0.351-0.322-0.574-0.518-0.574-0.518s-0.585,0.515-1.411,1.303
C196.816,30.856,197.574,30.574,197.749,30.509z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M215.497,29.025c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
s-7.585,0.29-7.585,0.29S213.977,30.213,215.497,29.025z"/>
<path fill="#2D7E66" d="M225.316,30.333c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S225.316,28.404,225.316,30.333z"/>
<g>
<path fill="#4B9469" d="M220.965,24.606c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C225.316,28.777,222.178,25.728,220.965,24.606z"/>
<path fill="#4B9469" d="M220.874,24.523c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C220.253,24.753,220.757,24.565,220.874,24.523z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M374.164,72.359c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S372.643,73.546,374.164,72.359z"/>
<path fill="#2D7E66" d="M383.983,73.667c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S383.983,71.737,383.983,73.667z"/>
<g>
<path fill="#4B9469" d="M379.632,67.94c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C383.983,72.11,380.845,69.061,379.632,67.94z"/>
<path fill="#4B9469" d="M379.54,67.856c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C378.919,68.086,379.424,67.899,379.54,67.856z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M248.847,116.985c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S247.326,118.172,248.847,116.985z"/>
<path fill="#2D7E66" d="M258.666,118.293c0,1.93-2.16,3.494-4.825,3.494s-4.825-1.564-4.825-3.494c0-1.93,4.825-6.156,4.825-6.156
S258.666,116.363,258.666,118.293z"/>
<g>
<path fill="#4B9469" d="M254.314,112.566c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C258.666,116.736,255.528,113.687,254.314,112.566z"/>
<path fill="#4B9469" d="M254.223,112.482c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C253.602,112.712,254.106,112.525,254.223,112.482z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M158.089,476.307c2.285-1.785,5.976-0.877,8.245,2.027s2.255,6.705-0.03,8.49
c-2.285,1.785-11.397,0.436-11.397,0.436S155.804,478.092,158.089,476.307z"/>
<path fill="#2D7E66" d="M172.843,478.272c0,2.899-3.246,5.25-7.25,5.25c-4.004,0-7.25-2.351-7.25-5.25c0-2.9,7.25-9.25,7.25-9.25
S172.843,475.373,172.843,478.272z"/>
<g>
<path fill="#4B9469" d="M166.304,469.667c0.56,1.102,4.291,8.604,3.316,11.104c-0.551,1.413-1.879,2.357-3.551,2.734
c3.781-0.179,6.774-2.45,6.774-5.233C172.843,475.933,168.128,471.351,166.304,469.667z"/>
<path fill="#4B9469" d="M166.167,469.541c-0.351-0.322-0.574-0.518-0.574-0.518s-0.585,0.515-1.411,1.303
C165.234,469.887,165.992,469.605,166.167,469.541z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M142.349,474.378c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S140.828,475.566,142.349,474.378z"/>
<path fill="#2D7E66" d="M152.168,475.686c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S152.168,473.757,152.168,475.686z"/>
<g>
<path fill="#4B9469" d="M147.816,469.96c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C152.168,474.13,149.03,471.081,147.816,469.96z"/>
<path fill="#4B9469" d="M147.725,469.876c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C147.104,470.106,147.608,469.919,147.725,469.876z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M168.673,441.69c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S167.152,442.877,168.673,441.69z"/>
<path fill="#2D7E66" d="M178.492,442.998c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S178.492,441.068,178.492,442.998z"/>
<g>
<path fill="#4B9469" d="M174.14,437.271c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C178.492,441.441,175.354,438.392,174.14,437.271z"/>
<path fill="#4B9469" d="M174.049,437.187c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C173.428,437.417,173.932,437.23,174.049,437.187z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M78.18,408.985c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S76.659,410.172,78.18,408.985z"/>
<path fill="#2D7E66" d="M87.999,410.293c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494s4.825-6.156,4.825-6.156
S87.999,408.363,87.999,410.293z"/>
<g>
<path fill="#4B9469" d="M83.647,404.566c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C87.999,408.736,84.861,405.687,83.647,404.566z"/>
<path fill="#4B9469" d="M83.556,404.482c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C82.935,404.712,83.439,404.525,83.556,404.482z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M64.422,387.973c2.285-1.785,5.976-0.877,8.245,2.027c2.268,2.904,2.255,6.705-0.03,8.49
s-11.397,0.436-11.397,0.436S62.137,389.758,64.422,387.973z"/>
<path fill="#2D7E66" d="M79.176,389.939c0,2.9-3.246,5.25-7.25,5.25s-7.25-2.35-7.25-5.25s7.25-9.25,7.25-9.25
S79.176,387.039,79.176,389.939z"/>
<g>
<path fill="#4B9469" d="M72.638,381.333c0.56,1.102,4.291,8.604,3.316,11.104c-0.551,1.413-1.879,2.357-3.551,2.734
c3.781-0.179,6.774-2.45,6.774-5.233C79.176,387.599,74.461,383.018,72.638,381.333z"/>
<path fill="#4B9469" d="M72.501,381.207c-0.351-0.322-0.574-0.518-0.574-0.518s-0.585,0.515-1.411,1.303
C71.567,381.554,72.325,381.272,72.501,381.207z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M333.027,349.747c1.775-1.387,4.644-0.682,6.406,1.575c1.763,2.257,1.752,5.21-0.023,6.597
s-8.855,0.338-8.855,0.338S331.252,351.134,333.027,349.747z"/>
<path fill="#2D7E66" d="M344.491,351.274c0,2.253-2.522,4.079-5.633,4.079s-5.633-1.826-5.633-4.079s5.633-7.187,5.633-7.187
S344.491,349.022,344.491,351.274z"/>
<g>
<path fill="#4B9469" d="M339.411,344.588c0.435,0.856,3.334,6.685,2.576,8.628c-0.428,1.098-1.46,1.832-2.759,2.124
c2.938-0.139,5.263-1.903,5.263-4.066C344.491,349.457,340.828,345.897,339.411,344.588z"/>
<path fill="#4B9469" d="M339.304,344.49c-0.273-0.25-0.446-0.403-0.446-0.403s-0.454,0.4-1.097,1.013
C338.579,344.759,339.168,344.54,339.304,344.49z"/>
</g>
</g>
<g>
<path fill="#8FA268" d="M140.18,235.651c1.521-1.188,3.977-0.584,5.487,1.349c1.51,1.933,1.501,4.462-0.02,5.65
c-1.521,1.188-7.585,0.29-7.585,0.29S138.659,236.839,140.18,235.651z"/>
<path fill="#2D7E66" d="M149.999,236.959c0,1.93-2.16,3.494-4.825,3.494c-2.665,0-4.825-1.564-4.825-3.494
c0-1.93,4.825-6.156,4.825-6.156S149.999,235.03,149.999,236.959z"/>
<g>
<path fill="#4B9469" d="M145.647,231.232c0.373,0.733,2.856,5.726,2.207,7.39c-0.367,0.94-1.25,1.569-2.363,1.819
c2.516-0.119,4.508-1.63,4.508-3.482C149.999,235.402,146.861,232.353,145.647,231.232z"/>
<path fill="#4B9469" d="M145.556,231.149c-0.234-0.214-0.382-0.345-0.382-0.345s-0.389,0.342-0.939,0.867
C144.935,231.379,145.439,231.191,145.556,231.149z"/>
</g>
</g>
<g>
<ellipse transform="matrix(0.4646 0.8855 -0.8855 0.4646 502.2097 -254.0585)" fill="#8FA268" cx="461.212" cy="288.3" rx="20.771" ry="24.544"/>
<g>
<path fill="none" d="M468,261c-5.767,0-11.108,1.276-15.495,3.444c5.131-1.864,11.075-2.076,16.895-0.197
c12.964,4.185,20.39,17.132,16.585,28.917c-0.142,0.438-0.301,0.866-0.469,1.289C491.317,290.968,495,285.788,495,280
C495,269.507,482.912,261,468,261z"/>
<path fill="#A9B16D" d="M469.4,264.247c-5.82-1.879-11.764-1.667-16.895,0.197C445.55,267.881,441,273.565,441,280
c0,10.493,12.088,19,27,19c6.687,0,12.801-1.714,17.516-4.547c0.168-0.423,0.327-0.851,0.469-1.289
C489.79,281.379,482.364,268.432,469.4,264.247z"/>
</g>
</g>
<ellipse transform="matrix(0.9932 0.1167 -0.1167 0.9932 36.3685 -52.3216)" fill="none" cx="465.156" cy="284.528" rx="25.404" ry="13.337"/>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 389.4986 -114.181)" fill="#8FA268" cx="304.813" cy="318.363" rx="11.249" ry="14.507"/>
<g>
<path fill="none" d="M308.844,302.847c-2.888,0-5.563,0.639-7.76,1.725c2.57-0.934,5.547-1.04,8.461-0.099
c6.493,2.096,10.212,8.58,8.307,14.483c-0.071,0.22-0.151,0.434-0.235,0.646c2.905-1.745,4.75-4.34,4.75-7.239
C322.367,307.107,316.313,302.847,308.844,302.847z"/>
<path fill="#A9B16D" d="M309.546,304.473c-2.915-0.941-5.892-0.835-8.461,0.099c-3.483,1.721-5.762,4.568-5.762,7.791
c0,5.255,6.054,9.516,13.523,9.516c3.349,0,6.411-0.858,8.773-2.277c0.084-0.212,0.164-0.426,0.235-0.646
C319.757,313.053,316.039,306.569,309.546,304.473z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 365.8505 -107.0299)" fill="#8FA268" cx="286.096" cy="299.143" rx="7.223" ry="9.315"/>
<g>
<path fill="none" d="M288.684,289.18c-1.855,0-3.572,0.41-4.983,1.108c1.65-0.599,3.561-0.668,5.433-0.063
c4.169,1.346,6.557,5.509,5.334,9.299c-0.046,0.141-0.097,0.279-0.151,0.414c1.866-1.121,3.05-2.786,3.05-4.648
C297.367,291.916,293.48,289.18,288.684,289.18z"/>
<path fill="#A9B16D" d="M289.134,290.225c-1.872-0.604-3.783-0.536-5.433,0.063c-2.237,1.105-3.7,2.933-3.7,5.002
c0,3.375,3.887,6.11,8.683,6.11c2.15,0,4.116-0.551,5.633-1.462c0.054-0.136,0.105-0.274,0.151-0.414
C295.691,295.734,293.304,291.57,289.134,290.225z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 163.597 -36.67)" fill="#8FA268" cx="117.146" cy="139.363" rx="11.249" ry="14.507"/>
<g>
<path fill="none" d="M121.178,123.847c-2.888,0-5.563,0.639-7.76,1.725c2.57-0.934,5.547-1.04,8.461-0.099
c6.493,2.096,10.212,8.58,8.307,14.483c-0.071,0.22-0.151,0.434-0.235,0.646c2.905-1.745,4.75-4.34,4.75-7.239
C134.7,128.107,128.646,123.847,121.178,123.847z"/>
<path fill="#A9B16D" d="M121.879,125.473c-2.915-0.941-5.892-0.835-8.461,0.099c-3.483,1.721-5.762,4.568-5.762,7.791
c0,5.255,6.054,9.516,13.523,9.516c3.349,0,6.411-0.858,8.773-2.277c0.084-0.212,0.164-0.426,0.235-0.646
C132.091,134.053,128.372,127.569,121.879,125.473z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 151.2835 16.0107)" fill="#8FA268" cx="60.208" cy="153.834" rx="15.723" ry="19.612"/>
<g>
<path fill="none" d="M65.171,132.725c-4.314,0-8.309,0.955-11.59,2.576c3.838-1.394,8.284-1.553,12.637-0.147
c9.697,3.13,15.252,12.814,12.406,21.63c-0.106,0.328-0.225,0.648-0.351,0.964c4.339-2.607,7.094-6.481,7.094-10.811
C85.367,139.088,76.325,132.725,65.171,132.725z"/>
<path fill="#A9B16D" d="M66.218,135.154c-4.353-1.405-8.799-1.247-12.637,0.147c-5.203,2.571-8.606,6.822-8.606,11.636
c0,7.849,9.042,14.212,20.196,14.212c5.002,0,9.575-1.282,13.102-3.401c0.126-0.316,0.245-0.636,0.351-0.964
C81.47,147.968,75.915,138.284,66.218,135.154z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 412.3203 18.0488)" fill="#8FA268" cx="188.762" cy="406.476" rx="7.223" ry="9.315"/>
<g>
<path fill="none" d="M191.351,396.514c-1.855,0-3.572,0.41-4.983,1.108c1.65-0.599,3.561-0.668,5.433-0.063
c4.169,1.346,6.557,5.509,5.334,9.299c-0.046,0.141-0.097,0.279-0.151,0.414c1.866-1.121,3.05-2.786,3.05-4.648
C200.034,399.249,196.146,396.514,191.351,396.514z"/>
<path fill="#A9B16D" d="M191.801,397.558c-1.872-0.604-3.783-0.536-5.433,0.063c-2.237,1.105-3.7,2.933-3.7,5.002
c0,3.375,3.887,6.11,8.683,6.11c2.15,0,4.117-0.551,5.633-1.462c0.054-0.136,0.105-0.273,0.151-0.414
C198.358,403.067,195.97,398.904,191.801,397.558z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 439.3286 20.6466)" fill="#8FA268" cx="199.762" cy="433.809" rx="7.223" ry="9.315"/>
<g>
<path fill="none" d="M202.351,423.847c-1.855,0-3.572,0.41-4.983,1.108c1.65-0.599,3.561-0.668,5.433-0.063
c4.169,1.346,6.557,5.509,5.334,9.299c-0.046,0.141-0.097,0.279-0.151,0.414c1.866-1.121,3.05-2.786,3.05-4.648
C211.034,426.583,207.146,423.847,202.351,423.847z"/>
<path fill="#A9B16D" d="M202.801,424.891c-1.872-0.604-3.783-0.536-5.433,0.063c-2.237,1.105-3.7,2.933-3.7,5.002
c0,3.375,3.887,6.11,8.683,6.11c2.15,0,4.117-0.551,5.633-1.462c0.054-0.136,0.105-0.274,0.151-0.414
C209.358,430.4,206.97,426.237,202.801,424.891z"/>
</g>
<ellipse transform="matrix(0.576 0.8175 -0.8175 0.576 428.5368 -0.0644)" fill="#8FA268" cx="214.33" cy="413.051" rx="6.431" ry="8.294"/>
<g>
<path fill="none" d="M216.635,404.18c-1.651,0-3.181,0.366-4.437,0.986c1.469-0.534,3.171-0.594,4.838-0.056
c3.712,1.198,5.839,4.906,4.749,8.28c-0.041,0.126-0.086,0.248-0.134,0.369c1.661-0.998,2.716-2.481,2.716-4.139
C224.367,406.616,220.905,404.18,216.635,404.18z"/>
<path fill="#A9B16D" d="M217.036,405.11c-1.667-0.538-3.369-0.477-4.838,0.056c-1.992,0.984-3.295,2.612-3.295,4.454
c0,3.005,3.462,5.441,7.731,5.441c1.915,0,3.665-0.491,5.016-1.302c0.048-0.121,0.094-0.244,0.134-0.369
C222.875,410.016,220.749,406.309,217.036,405.11z"/>
</g>
<g>
<polygon fill="#F8F1E5" points="433.531,48.421 410.706,35.534 429.524,17.263 452.349,30.15 "/>
<polygon fill="#DBD6CA" points="433.531,48.421 433.706,93.534 452.524,75.263 452.349,30.15 "/>
<polygon fill="#A7AFA4" points="434.031,93.921 411.206,80.034 411.024,35.763 433.849,48.65 "/>
<polygon fill="#55757B" points="425.196,88.305 419.901,85.315 419.859,75.047 425.154,78.036 "/>
</g>
<g>
<polygon fill="#F8F1E5" points="455.014,65.985 440.348,57.705 452.439,45.965 467.106,54.245 "/>
<polygon fill="#DBD6CA" points="455.014,65.985 455.126,94.973 467.218,83.233 467.106,54.245 "/>
<polygon fill="#A7AFA4" points="455.335,94.579 440.669,86.298 440.552,57.852 455.219,66.132 "/>
</g>
<g>
<g>
<path fill="#8FA268" d="M381.008,190.888l4.218,5.111l8.28-6.885c0.019-0.015,0.041-0.023,0.06-0.038
c1.11-0.916,1.095-2.769-0.035-4.138s-2.946-1.735-4.056-0.819C389.306,184.26,381.008,190.888,381.008,190.888z"/>
<path fill="#8FA268" d="M382.59,192.805l10.507-8.313c-1.121-0.989-2.644-1.179-3.621-0.372c-0.17,0.14-8.467,6.769-8.467,6.769
L382.59,192.805z"/>
<path fill="#8FA268" d="M370.377,188.743c4.763-3.931,11.812-3.257,15.743,1.507c3.931,4.763,3.257,11.812-1.507,15.743
s-24.048,5.348-24.048,5.348S365.614,192.674,370.377,188.743z"/>
<path fill="#8FA268" d="M360.565,211.341c0,0,0.058-0.004,0.146-0.011c1.54-3.428,8.017-17.374,12.642-20.176
c5.03-3.047,11.498-1.655,14.868,3.045c-0.414-1.404-1.111-2.749-2.101-3.949c-3.931-4.763-10.98-5.438-15.743-1.507
C365.614,192.674,360.565,211.341,360.565,211.341z"/>
</g>
<g id="tree_7_" class="tree">
<path fill="#4D333C" d="M395.578,174.404h-6.627l0.04,10.769c-0.001,0.024-0.009,0.046-0.009,0.07
c0,1.44,1.439,2.607,3.213,2.607s3.213-1.167,3.213-2.607C395.409,185.023,395.578,174.404,395.578,174.404z"/>
<path fill="#61403F" d="M393.093,174.404l-0.276,13.395c1.477-0.235,2.592-1.289,2.592-2.556c0-0.22,0.169-10.839,0.169-10.839
H393.093z"/>
<path fill="#2D7E66" d="M404,167.57c0,6.176-5.007,11.183-11.183,11.183s-11.183-5.007-11.183-11.183
s11.183-21.952,11.183-21.952S404,161.394,404,167.57z"/>
<path fill="#4B9469" d="M392.817,145.618c0,0-0.034,0.048-0.084,0.119c1.663,3.37,8.297,17.242,7.514,22.593
c-0.852,5.819-6.043,9.921-11.813,9.529c1.346,0.574,2.827,0.893,4.383,0.893c6.176,0,11.183-5.007,11.183-11.183
C404,161.394,392.817,145.618,392.817,145.618z"/>
</g>
</g>
<g>
<defs>
<polygon id="SVGID_7_" points="438.031,80.921 415.206,68.034 370.024,116.763 392.849,129.65 "/>
</defs>
<clipPath id="SVGID_8_">
<use xlink:href="#SVGID_7_" overflow="visible"/>
</clipPath>
<ellipse clip-path="url(#SVGID_8_)" fill="#354C5D" cx="366.75" cy="120" rx="12.75" ry="11.5"/>
</g>
<g>
<polygon fill="#B05747" points="249.837,469.412 227.012,455.525 248.242,417.698 "/>
<polygon fill="#8FA268" points="249.837,469.412 227.012,455.525 209,487.667 "/>
<polygon fill="#DB7C6D" points="248.083,418.083 249.914,469.368 268.732,451.097 "/>
</g>
</g>
<g id="identifier" display="none">
<g display="inline">
<defs>
<path id="SVGID_9_" d="M114.994,470.935c0,0-29.994,15.565-38.994-9.935s15.006-33.935,15.006-33.935l-0.122,0.065
c8.25-4.634,21.087-15.728,22.441-24.818c0.706-4.74-2.116-10.472-8.391-17.031c-29.663-31.01-40.897-58.425-34.35-83.815
c5.938-23.025,25.775-39.956,58.959-50.328c29.623-9.255,55.578-6.306,79.344,9.019c19.334,12.463,34.375,31.003,51.794,52.472
c5.821,7.172,11.837,14.588,18.271,22.072c19.032,22.125,42.604,34.183,61.516,31.456c13.416-1.935,24.097-11.503,31.747-28.447
c3.084-6.828,9.5-21.034-19.435-51.053c-23.146-24.016-60.763-49.644-100.591-76.775c-11.578-7.884-23.55-16.041-35.5-24.381
c-70.019-48.869-47.962-94.972-39.534-107.938c24.345-37.447,86.149-51.296,124.771-27.959
c48.297,29.178,80.322,52.134,81.663,53.097c11.212,8.059,13.769,23.678,5.709,34.891c-8.059,11.21-23.673,13.767-34.887,5.712
l-0.001,0c-0.312-0.225-31.871-22.832-78.34-50.906c-16.629-10.045-48.164-1.173-56.994,12.418
c-2.278,3.506-2.562,6.682-0.975,10.966c1.819,4.903,7.769,15.153,27.207,28.719c11.716,8.175,23.568,16.25,35.031,24.06
c42.021,28.625,81.712,55.666,108.44,83.396c15.896,16.494,26.271,32.229,31.713,48.101c6.756,19.699,5.844,39.293-2.71,58.234
c-14.716,32.584-39.644,52.953-70.188,57.353c-36.207,5.218-76.034-12.859-106.55-48.344c-6.903-8.024-13.15-15.725-19.19-23.169
c-33.406-41.168-46.527-54.915-77.4-45.269c-18.516,5.784-24.712,12.206-25.456,15.091c-1.031,4.006,2.453,16.26,22.065,36.766
c21.941,22.938,23.891,44.912,21.663,59.31C157.006,446.984,119.278,468.591,114.994,470.935z"/>
</defs>
<clipPath id="SVGID_10_">
<use xlink:href="#SVGID_9_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_10_)">
<path fill="#DAD891" d="M344.271,295.107c10.11-5.097,45.393,0.072,45.393,0.072s-16.825,31.441-26.934,36.538
s-22.437,1.034-27.534-9.076C330.098,312.531,334.162,300.204,344.271,295.107z"/>
</g>
</g>
<ellipse display="inline" fill="#42B19D" cx="390.75" cy="295.5" rx="14.75" ry="12.5"/>
<g display="inline">
<defs>
<path id="SVGID_11_" d="M344.265,295.603c10.037-5.238,45.389-0.565,45.389-0.565s-16.382,31.674-26.419,36.912
c-10.037,5.238-22.42,1.348-27.659-8.689C330.337,313.225,334.227,300.842,344.265,295.603z"/>
</defs>
<clipPath id="SVGID_12_">
<use xlink:href="#SVGID_11_" overflow="visible"/>
</clipPath>
<ellipse transform="matrix(0.9979 -0.0643 0.0643 0.9979 -18.1951 25.7734)" clip-path="url(#SVGID_12_)" fill="#389786" cx="391.006" cy="295.346" rx="14.75" ry="12.5"/>
</g>
<g display="inline">
<path fill="#70C8B9" d="M410.75,254.25c0,11.322-20.5,40.5-20.5,40.5s-20.5-29.178-20.5-40.5s9.178-20.5,20.5-20.5
S410.75,242.928,410.75,254.25z"/>
<circle fill="#F8F1E5" cx="390.25" cy="254.75" r="15"/>
</g>
<path display="inline" fill="#8FA268" d="M365.713,335.974c2.386-1.168,5.218-4.011,8.081-7.523
c-2.53-10.206-9.599-19.37-15.681-26.122c-3.331,0.225-6.185,0.726-8.059,1.643c-8.837,4.324-12.496,14.993-8.172,23.831
C346.206,336.64,356.876,340.298,365.713,335.974z"/>
</g>
<g id="sketch" display="none">
<path display="inline" fill="#188BAB" d="M823.946,170.806c-6.605-8.232-21.542-5.521-32.959-6.957
c-11.418-1.436-26.939-10.056-35.378-3.716c-2.134,1.603-3.037,3.934-3.214,6.705c8.416-0.058,19.13,4.946,27.591,6.011
c11.418,1.436,26.354-1.275,32.959,6.957c6.697,8.347,11.56,23.593,10.135,34.927c-1.097,8.716-4.806,20.833-10.352,28.891
c2.097-0.863,3.976-1.871,5.53-3.038c8.556-6.428,14.396-23.519,15.822-34.852C835.507,194.399,830.644,179.153,823.946,170.806z"
/>
<ellipse display="inline" fill="#B7C077" cx="663.436" cy="388.124" rx="56.314" ry="15.803"/>
<g display="inline">
<defs>
<ellipse id="SVGID_13_" cx="663.436" cy="388.124" rx="56.314" ry="15.803"/>
</defs>
<clipPath id="SVGID_14_">
<use xlink:href="#SVGID_13_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_14_)">
<path fill="#8FA268" d="M695.772,379.762c0,0,1.925,0.537,2.64,3.639c0.714,3.102-0.854,4.117-0.854,4.117l-24.749,5.698
l-1.785-7.755L695.772,379.762z"/>
<path fill="#8FA268" d="M644.01,383.106c19.22-4.425,36.303-1.485,38.157,6.567c1.854,8.051-12.225,18.165-31.444,22.59
c-19.22,4.425-71.843,1.188-71.843,1.188S624.79,387.531,644.01,383.106z"/>
</g>
</g>
<path display="inline" fill="#4D333C" d="M699.686,385.252c0,0-1.693,1.756-7.337,1.756c-5.644,0-6.772-1.756-6.772-1.756v-25.397
h14.109V385.252z"/>
<path display="inline" fill="#2D7E66" d="M720.131,334.791c0,19.722-11.874,35.711-26.522,35.711
c-14.648,0-26.522-15.988-26.522-35.711c0-19.722,26.522-70.278,26.522-70.278S720.131,315.068,720.131,334.791z"/>
<path display="inline" fill="#4B9469" d="M693.609,264.513c0,0-0.071,0.136-0.204,0.392c1.663,3.877,22.511,52.932,21.098,71.817
c-1.315,17.578-11.867,31.472-24.523,33.445c1.187,0.219,2.398,0.334,3.629,0.334c14.648,0,26.522-15.988,26.522-35.711
C720.131,315.068,693.609,264.513,693.609,264.513z"/>
<ellipse display="inline" fill="#425353" cx="628.244" cy="125.753" rx="39.75" ry="32.25"/>
<g display="inline">
<polygon fill="#F8F1E5" points="630.025,92.924 607.2,80.037 626.018,61.766 648.843,74.653 "/>
<polygon fill="#A7AFA4" points="630.025,92.924 630.2,138.037 649.018,119.766 648.843,74.653 "/>
<polygon fill="#DBD6CA" points="630.525,137.424 607.7,124.537 607.518,80.266 630.343,93.153 "/>
</g>
<ellipse display="inline" fill="#B7C077" cx="644.92" cy="241.126" rx="56.314" ry="15.803"/>
<path display="inline" fill="#8FA268" d="M651.496,177.609c19.22-4.425,36.303-1.485,38.157,6.567
c1.854,8.051-12.225,18.165-31.444,22.59s-71.843,1.188-71.843,1.188S632.276,182.034,651.496,177.609z"/>
<g display="inline">
<path fill="none" d="M550.225,269.333c-16.26,0-29.441,8.954-29.441,20c0,0.068,0.007,0.135,0.008,0.204
c3.689-8.713,12.686-14.87,23.209-14.87c13.807,0,25,10.596,25,23.667c0,2.438-0.39,4.789-1.113,7.002
c7.152-3.649,11.78-9.458,11.78-16.002C579.667,278.288,566.485,269.333,550.225,269.333z"/>
<path fill="#A9B16D" d="M544,274.667c-10.522,0-19.52,6.157-23.209,14.87c0.162,10.951,13.274,19.796,29.434,19.796
c6.627,0,12.741-1.488,17.662-3.998c0.723-2.213,1.113-4.564,1.113-7.002C569,285.263,557.807,274.667,544,274.667z"/>
</g>
<rect x="194" y="-95" display="inline" fill="#5F52A3" width="63" height="63"/>
<rect x="275" y="-97" display="inline" fill="#BADA8B" width="67" height="67"/>
<g display="inline">
<circle fill="#F8F1E5" cx="-333" cy="58" r="41.006"/>
<g>
<g>
<path fill="#BADA8B" d="M-333.715,97.591c-21.926,0-39.767-17.838-39.767-39.764s17.841-39.766,39.767-39.766
s39.764,17.839,39.764,39.766S-311.789,97.591-333.715,97.591z M-333.715,24.423c-18.419,0-33.405,14.985-33.405,33.403
c0,18.417,14.986,33.402,33.405,33.402s33.402-14.985,33.402-33.402C-300.313,39.408-315.296,24.423-333.715,24.423z"/>
</g>
<g>
<path fill="#5F52A3" d="M-333.715,100.821c-23.709,0-42.998-19.287-42.998-42.995s19.289-42.996,42.998-42.996
c23.706,0,42.995,19.289,42.995,42.996S-310.009,100.821-333.715,100.821z M-333.715,21.192
c-20.202,0-36.636,16.434-36.636,36.634c0,20.199,16.434,36.633,36.636,36.633c20.199,0,36.633-16.434,36.633-36.633
C-297.082,37.626-313.516,21.192-333.715,21.192z"/>
</g>
<g>
<path fill="#5F52A3" d="M-333.668,110.331v-3.181c1.041,0,2.072-0.033,3.097-0.098l0.199,3.175
C-331.459,110.295-332.559,110.331-333.668,110.331z M-336.958,110.234c-1.106-0.067-2.203-0.168-3.284-0.303l0.391-3.156
c1.019,0.126,2.047,0.221,3.085,0.284L-336.958,110.234z M-327.092,109.917l-0.398-3.156c1.031-0.129,2.053-0.29,3.06-0.483
l0.596,3.125C-324.908,109.608-325.992,109.779-327.092,109.917z M-343.497,109.422c-1.087-0.205-2.159-0.443-3.221-0.713
l0.789-3.082c0.994,0.255,2.004,0.477,3.023,0.669L-343.497,109.422z M-320.614,108.684l-0.789-3.082
c1.003-0.258,1.994-0.545,2.97-0.865l0.988,3.026C-318.489,108.102-319.543,108.411-320.614,108.684z M-349.881,107.794
c-1.053-0.339-2.091-0.711-3.11-1.112l1.168-2.959c0.957,0.377,1.932,0.725,2.917,1.045L-349.881,107.794z M-314.355,106.643
l-1.168-2.957c0.96-0.381,1.904-0.791,2.833-1.23l1.361,2.877C-312.32,105.8-313.326,106.238-314.355,106.643z
M-356.026,105.371c-0.997-0.469-1.976-0.968-2.942-1.494l1.528-2.793c0.904,0.495,1.827,0.966,2.768,1.407L-356.026,105.371z
M-308.396,103.833l-1.535-2.787c0.901-0.497,1.789-1.024,2.659-1.578l1.709,2.684
C-306.489,102.741-307.433,103.302-308.396,103.833z M-361.804,102.194c-0.929-0.59-1.839-1.208-2.728-1.853l1.864-2.575
c0.839,0.607,1.693,1.188,2.566,1.741L-361.804,102.194z M-302.845,100.298l-1.87-2.572c0.836-0.609,1.653-1.243,2.448-1.9
l2.025,2.451C-301.086,98.978-301.953,99.652-302.845,100.298z M-367.141,98.321c-0.848-0.701-1.674-1.427-2.476-2.179
l2.175-2.321c0.752,0.705,1.528,1.389,2.327,2.046L-367.141,98.321z M-297.766,96.095l-2.181-2.314
c0.752-0.71,1.485-1.44,2.193-2.193l2.317,2.178C-296.187,94.565-296.964,95.341-297.766,96.095z M-371.95,93.813
c-0.752-0.798-1.479-1.62-2.181-2.465l2.442-2.038c0.665,0.795,1.348,1.57,2.057,2.322L-371.95,93.813z M-293.258,91.292
l-2.448-2.032c0.659-0.794,1.292-1.609,1.901-2.445l2.572,1.87C-291.879,89.577-292.556,90.445-293.258,91.292z
M-376.157,88.745c-0.646-0.884-1.264-1.789-1.861-2.715l2.678-1.721c0.559,0.873,1.14,1.726,1.749,2.56L-376.157,88.745z
M-289.384,85.963l-2.678-1.715c0.556-0.868,1.081-1.757,1.578-2.662l2.79,1.535C-288.228,84.088-288.791,85.035-289.384,85.963
z M-379.698,83.19c-0.528-0.957-1.028-1.932-1.5-2.923l2.87-1.37c0.447,0.935,0.916,1.855,1.414,2.759L-379.698,83.19z
M-286.197,80.181l-2.877-1.358c0.438-0.93,0.851-1.879,1.233-2.844l2.957,1.171C-285.29,78.178-285.728,79.189-286.197,80.181z
M-382.513,77.244c-0.41-1.019-0.783-2.053-1.128-3.102l3.026-0.988c0.32,0.983,0.674,1.952,1.053,2.909L-382.513,77.244z
M-283.764,74.046l-3.026-0.988c0.32-0.975,0.609-1.966,0.864-2.968l3.082,0.786C-283.118,71.946-283.426,73.002-283.764,74.046
z M-384.563,70.975c-0.27-1.056-0.513-2.128-0.724-3.209l3.125-0.609c0.199,1.019,0.422,2.029,0.68,3.026L-384.563,70.975z
M-282.13,67.657l-3.125-0.596c0.193-1.008,0.351-2.027,0.482-3.057l3.156,0.398C-281.754,65.497-281.925,66.584-282.13,67.657z
M-385.803,64.504c-0.137-1.084-0.242-2.178-0.314-3.281l3.175-0.202c0.065,1.034,0.165,2.063,0.295,3.082L-385.803,64.504z
M-281.313,61.118l-3.175-0.196c0.062-1.022,0.096-2.055,0.096-3.096l3.181-0.2v0.2
C-281.211,58.932-281.245,60.031-281.313,61.118z M-386.222,57.926v-0.099c0-1.072,0.031-2.136,0.096-3.19l3.175,0.193
c-0.059,0.993-0.09,1.991-0.09,2.998L-386.222,57.926z M-284.501,54.532c-0.068-1.034-0.168-2.063-0.301-3.08l3.156-0.41
c0.14,1.083,0.245,2.176,0.32,3.279L-284.501,54.532z M-382.668,51.742l-3.156-0.388c0.134-1.097,0.304-2.184,0.506-3.257
l3.125,0.587C-382.382,49.692-382.541,50.711-382.668,51.742z M-285.29,48.397c-0.196-1.017-0.426-2.024-0.687-3.02l3.079-0.801
c0.276,1.058,0.519,2.13,0.733,3.212L-285.29,48.397z M-381.531,45.66l-3.082-0.786c0.273-1.07,0.578-2.128,0.913-3.167
l3.026,0.979C-380.99,43.662-381.276,44.655-381.531,45.66z M-286.849,42.407c-0.326-0.985-0.68-1.956-1.062-2.912l2.951-1.18
c0.407,1.016,0.786,2.049,1.131,3.093L-286.849,42.407z M-379.63,39.762l-2.957-1.165c0.404-1.028,0.839-2.039,1.308-3.034
l2.877,1.354C-378.841,37.85-379.251,38.799-379.63,39.762z M-289.148,36.663c-0.447-0.934-0.92-1.85-1.42-2.751l2.783-1.544
c0.531,0.957,1.034,1.932,1.507,2.925L-289.148,36.663z M-376.999,34.15l-2.79-1.528c0.528-0.966,1.09-1.915,1.681-2.844
l2.684,1.706C-375.976,32.353-376.501,33.243-376.999,34.15z M-292.149,31.261c-0.562-0.87-1.146-1.724-1.755-2.558l2.566-1.876
c0.646,0.884,1.267,1.788,1.861,2.71L-292.149,31.261z M-373.687,28.918l-2.572-1.87c0.646-0.89,1.32-1.76,2.019-2.608
l2.454,2.025C-372.447,27.264-373.078,28.081-373.687,28.918z M-295.805,26.264c-0.662-0.792-1.348-1.564-2.06-2.314
l2.311-2.187c0.755,0.797,1.485,1.619,2.19,2.464L-295.805,26.264z M-369.745,24.136l-2.324-2.171
c0.749-0.803,1.525-1.581,2.327-2.336l2.181,2.314C-368.313,22.651-369.04,23.382-369.745,24.136z M-300.061,21.765
c-0.755-0.705-1.532-1.387-2.33-2.043l2.019-2.457c0.848,0.699,1.674,1.424,2.479,2.173L-300.061,21.765z M-365.237,19.888
l-2.038-2.445c0.845-0.702,1.712-1.379,2.603-2.029l1.87,2.572C-363.637,18.595-364.448,19.229-365.237,19.888z
M-304.845,17.829c-0.839-0.604-1.693-1.184-2.569-1.737l1.696-2.69c0.932,0.587,1.842,1.204,2.731,1.845L-304.845,17.829z
M-360.245,16.233l-1.715-2.678c0.923-0.592,1.867-1.154,2.83-1.687l1.541,2.783C-358.49,15.15-359.378,15.678-360.245,16.233z
M-310.08,14.519c-0.907-0.494-1.827-0.961-2.768-1.403l1.348-2.88c0.997,0.466,1.979,0.965,2.942,1.49L-310.08,14.519z
M-354.836,13.236l-1.361-2.874c0.988-0.469,1.994-0.909,3.016-1.317L-352,12C-352.96,12.384-353.904,12.795-354.836,13.236z
M-315.7,11.894c-0.96-0.376-1.935-0.724-2.923-1.041l0.975-3.029c1.05,0.339,2.088,0.708,3.11,1.109L-315.7,11.894z
M-349.092,10.942l-0.988-3.023c1.041-0.342,2.094-0.651,3.159-0.927l0.802,3.079
C-347.123,10.332-348.114,10.622-349.092,10.942z M-321.599,10.001c-0.994-0.253-2.001-0.474-3.023-0.663l0.584-3.128
c1.084,0.202,2.159,0.438,3.222,0.707L-321.599,10.001z M-343.1,9.394l-0.603-3.125c1.075-0.207,2.162-0.381,3.256-0.52
l0.404,3.156C-341.074,9.035-342.093,9.199-343.1,9.394z M-327.679,8.865c-1.016-0.124-2.047-0.217-3.085-0.28l0.186-3.175
c1.106,0.065,2.199,0.165,3.284,0.295L-327.679,8.865z M-336.961,8.606l-0.205-3.175c1.087-0.07,2.187-0.107,3.293-0.11
l0.006,3.181C-334.905,8.505-335.936,8.539-336.961,8.606z"/>
</g>
</g>
</g>
<circle display="inline" fill="#F8F1E5" cx="-164.5" cy="238.5" r="35.5"/>
<circle display="inline" fill="#42B19D" cx="-287" cy="463" r="22"/>
<circle display="inline" fill="#E2584C" cx="-227" cy="463" r="22"/>
<circle display="inline" fill="#EBC755" cx="-167" cy="463" r="22"/>
<circle display="inline" fill="#354C5D" cx="-107" cy="463" r="22"/>
<circle display="inline" fill="#DA813E" cx="-46" cy="463" r="22"/>
<circle display="inline" fill="#42B19D" cx="-271" cy="611" r="22"/>
<circle display="inline" fill="#E2584C" cx="-211" cy="611" r="22"/>
<circle display="inline" fill="#EBC755" cx="-151" cy="611" r="22"/>
<circle display="inline" fill="#354C5D" cx="-91" cy="611" r="22"/>
<circle display="inline" fill="#DA813E" cx="-30" cy="611" r="22"/>
<g display="inline">
<path fill="#42B19D" d="M-275.667,780.333c-11.046,0-20-8.954-20-20v-86.666c0-11.046,8.954-20,20-20s20,8.954,20,20v86.666
C-255.667,771.379-264.621,780.333-275.667,780.333z"/>
</g>
<g display="inline">
<path fill="#354C5D" d="M-89.667,780.333c-11.046,0-20-8.954-20-20v-86.666c0-11.046,8.954-20,20-20s20,8.954,20,20v86.666
C-69.667,771.379-78.621,780.333-89.667,780.333z"/>
</g>
<g display="inline">
<path fill="#DA813E" d="M-31,780.333c-11.046,0-20-8.954-20-20v-86.666c0-11.046,8.954-20,20-20s20,8.954,20,20v86.666
C-11,771.379-19.954,780.333-31,780.333z"/>
</g>
<path display="inline" fill="#FFFFFF" d="M-278.667,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-278.667,669.667-278.667,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-261.333,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-261.333,669.667-261.333,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-92.667,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-92.667,669.667-92.667,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-75.333,669.667c0,0-2.537,2.5-5.667,2.5c-3.13,0-5.667-2.5-5.667-2.5
s2.537-2.5,5.667-2.5C-77.87,667.167-75.333,669.667-75.333,669.667z"/>
<g display="inline">
<path fill="#EBC755" d="M-150.667,780.333c-11.046,0-20-8.954-20-20v-86.666c0-11.046,8.954-20,20-20s20,8.954,20,20v86.666
C-130.667,771.379-139.621,780.333-150.667,780.333z"/>
</g>
<path display="inline" fill="#FFFFFF" d="M-153.667,669.667c0,0-2.537,2.5-5.667,2.5c-3.13,0-5.667-2.5-5.667-2.5
s2.537-2.5,5.667-2.5C-156.204,667.167-153.667,669.667-153.667,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-136.333,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-136.333,669.667-136.333,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-34,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-34,669.667-34,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-16.667,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-16.667,669.667-16.667,669.667z"/>
<g display="inline">
<path fill="#42B19D" d="M-378.983,757.672c-1.511,0-3.045-0.173-4.581-0.532c-10.746-2.519-17.418-13.266-14.914-24.011
c4.118-17.809,6.811-58.796-9.045-58.812c-9.413-0.01-7.944,9.739-8.467,13.884c-1.228,9.731-2.756,21.844-10.152,32.478
c-8.896,12.788-23.532,19.622-43.502,20.311c-11.077,0.373-20.297-8.261-20.678-19.299c-0.38-11.039,8.26-20.297,19.299-20.678
c6.31-0.218,10.812-1.404,12.043-3.175c1.78-2.559,2.589-8.979,3.304-14.644c1.169-9.272,2.496-19.782,8.566-29.345
c7.765-12.232,20.539-18.793,37.966-19.499c20.655-0.854,32.962,8.646,39.656,16.747c10.779,13.045,15.587,32.848,14.291,58.856
c-0.864,17.33-4.189,31.676-4.331,32.277C-361.688,751.45-369.906,757.672-378.983,757.672z"/>
</g>
<g display="inline">
<path fill="#E2584C" d="M-210.333,780.333c-11.046,0-20-8.954-20-20v-86.666c0-11.046,8.954-20,20-20s20,8.954,20,20v86.666
C-190.333,771.379-199.288,780.333-210.333,780.333z"/>
</g>
<path display="inline" fill="#FFFFFF" d="M-213.333,669.667c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
S-213.333,669.667-213.333,669.667z"/>
<path display="inline" fill="#FFFFFF" d="M-196,669.667c0,0-2.537,2.5-5.667,2.5c-3.13,0-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5
C-198.537,667.167-196,669.667-196,669.667z"/>
<g display="inline">
<defs>
<path id="SVGID_15_" d="M-74.397,368.534c0,6.439-6.014,11.658-13.432,11.658s-13.433-5.22-13.433-11.658S-108.75,319-87,319.25
S-74.397,362.095-74.397,368.534z"/>
</defs>
<clipPath id="SVGID_16_">
<use xlink:href="#SVGID_15_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_16_)">
<g>
<path fill="#EBC755" d="M-88.056,422.706c-6.838,0-12.381-5.543-12.381-12.381v-53.649c0-6.838,5.543-12.381,12.381-12.381
c6.838,0,12.381,5.543,12.381,12.381v53.649C-75.676,417.163-81.219,422.706-88.056,422.706z"/>
</g>
<path fill="#FFFFFF" d="M-89.913,354.2c0,0-1.571,1.548-3.508,1.548s-3.508-1.548-3.508-1.548s1.571-1.548,3.508-1.548
S-89.913,354.2-89.913,354.2z"/>
<path fill="#FFFFFF" d="M-79.183,354.2c0,0-1.571,1.548-3.508,1.548s-3.508-1.548-3.508-1.548s1.571-1.548,3.508-1.548
S-79.183,354.2-79.183,354.2z"/>
</g>
</g>
<circle display="inline" cx="-274.833" cy="683.167" r="3.167"/>
<g display="inline" opacity="0.5">
<g>
<g enable-background="new ">
<defs>
<polygon id="SVGID_17_" enable-background="new " points="-176.386,392.016 -169.129,348.955 -133.251,349.627
-140.434,393.717 "/>
</defs>
<clipPath id="SVGID_18_">
<use xlink:href="#SVGID_17_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_18_)">
<g>
<g>
<g>
<path fill="#F8F2E5" d="M-151.399,349.287c-2.473-0.046-4.922,0.513-7.233,1.563c-2.306,1.047-4.477,2.582-6.402,4.493
c-1.922,1.907-3.599,4.191-4.921,6.739c-1.321,2.547-2.289,5.361-2.79,8.333c-0.501,2.975-0.488,5.829-0.034,8.446
c0.455,2.622,1.353,5.008,2.621,7.038c1.271,2.036,2.916,3.715,4.859,4.915c1.95,1.204,4.201,1.927,6.679,2.044
c2.486,0.118,4.963-0.385,7.314-1.398c2.356-1.015,4.583-2.542,6.562-4.466c1.982-1.927,3.712-4.252,5.071-6.858
c1.36-2.607,2.347-5.492,2.844-8.538c0.496-3.043,0.454-5.954-0.046-8.61c-0.499-2.651-1.453-5.045-2.781-7.064
c-1.325-2.013-3.021-3.651-5.009-4.796C-146.648,349.985-148.918,349.333-151.399,349.287"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
<path display="inline" fill="none" stroke="#42B19D" stroke-width="40" stroke-linecap="round" stroke-miterlimit="10" d="
M-632,579c0,0-8-97,53-97s31,63,91,63s54-124,54-124"/>
</g>
<g>
<g>
<g>
<path fill="#8FA268" d="M93.729,230.969c-1.229-1.403-5.014-0.029-8.691,4.254l-15.494,18.043l1.805,2.061
c0,0,10.046-11.699,11.216-13.062c2.381-2.773,5.47-6.226,6.071-5.538s-0.6,1.942-1.882,3.435
c-8.815,10.266-10.268,15.82-8.834,17.458l5.81-6.766c-0.865-0.988,0.76-3.892,4.829-8.63c3.016-3.512,4.369-6,4.975-7.47
C94.268,232.97,94.335,231.662,93.729,230.969z"/>
</g>
<path fill="#8FA268" d="M73.302,258.081c4.699-5.619,6.491-12.282,4.004-14.883c-2.487-2.601-8.313-0.154-13.011,5.465
c-4.699,5.619-6.491,12.282-4.004,14.883S68.604,263.7,73.302,258.081z"/>
<polygon fill="#8FA268" points="80.478,224.827 75.21,223.998 66.108,236.924 69.519,240.362 "/>
<polygon fill="#8FA268" points="89.929,221.327 85.193,220.685 66.001,247.98 69.412,251.418 "/>
<polygon fill="#8FA268" points="72.032,222.469 67.218,222.022 59.027,232.447 62.438,235.885 "/>
<path fill="#8FA268" d="M63.263,256.391c6.266-3.334,10.729-12.172,9.968-19.74c-0.76-7.568-6.456-11-12.722-7.666
c-6.266,3.334-10.729,12.172-9.968,19.74C51.302,256.293,56.998,259.725,63.263,256.391z"/>
</g>
<g>
<g>
<path fill="#B7B3AB" d="M98.076,213.564c-2.042,0-4.228-1.275-4.228-3.174v-8h3c0,0,0,5.187,0,5.792
c0,1.229,0.104,2.792,1.104,2.792s0.896-0.588,0.896-1.25c0-4.552,2.783-6.167,5.167-6.167v3c-1.438,0-2.167,1.065-2.167,3.167
c0,1.557-0.657,2.46-1.208,2.944C99.97,213.253,99.084,213.564,98.076,213.564z"/>
</g>
<g>
<path fill="#87837F" d="M95.848,210.389v-8h-2v8c0,1.899,2.186,3.174,4.228,3.174c0.341,0,0.661-0.048,0.97-0.118
C97.362,213.104,95.848,211.968,95.848,210.389z"/>
<path fill="#87837F" d="M98.848,210.181c0,0,0.693,0.035,0.875-1.416c0.208-1.667,1-4.875,4.292-4.804
c0.042,0.001,0-0.404,0-0.404c-2.383,0-5.167,1.615-5.167,6.167V210.181z"/>
</g>
<ellipse fill="#B7B3AB" cx="90.514" cy="203.223" rx="7.167" ry="7.5"/>
<path fill="#87837F" d="M83.348,203.223c0,4.142,3.209,7.5,7.167,7.5c0.208,0,0.413-0.014,0.616-0.033
c2.122-1.302,3.55-3.708,3.55-6.467c0-4.142-3.209-7.5-7.167-7.5c-0.208,0-0.413,0.014-0.616,0.033
C84.776,198.057,83.348,200.463,83.348,203.223z"/>
<rect x="75.014" y="217.389" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="74.764" y="217.389" fill="#87837F" width="2.5" height="7.667"/>
<rect x="84.681" y="210.056" fill="#B7B3AB" width="5.333" height="11.333"/>
<rect x="84.681" y="210.056" fill="#87837F" width="2.333" height="11.333"/>
<rect x="66.681" y="215.056" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="66.494" y="215.056" fill="#87837F" width="2.708" height="7.667"/>
<ellipse transform="matrix(0.9118 -0.4107 0.4107 0.9118 -79.3698 50.5674)" fill="#B7B3AB" cx="78" cy="210" rx="12.82" ry="10.532"/>
<g>
<path fill="#87837F" d="M66.311,215.266c1.32,2.931,4.104,4.829,7.418,5.455c1.201-0.216,2.411-0.584,3.597-1.118
c6.456-2.908,14.188-11.38,11.188-16.88s-10.5-4.167-14.84-2.326C67.156,203.162,63.922,209.962,66.311,215.266z"/>
</g>
<path fill="#87837F" d="M96.348,203.639c0,2.439-1.455,4.417-3.25,4.417c-1.795,0-3.25-1.977-3.25-4.417s0.167-4.417,3.25-4.417
C96.181,199.223,96.348,201.2,96.348,203.639z"/>
</g>
</g>
<g>
<g>
<g>
<path fill="#8FA268" d="M53.142,254.768c-0.976-1.115-3.984-0.023-6.907,3.381l-12.313,14.339l1.434,1.638
c0,0,7.983-9.297,8.914-10.38c1.892-2.204,4.347-4.947,4.825-4.401s-0.476,1.543-1.495,2.73
c-7.005,8.158-8.16,12.572-7.021,13.873l4.617-5.377c-0.687-0.785,0.604-3.093,3.838-6.858c2.397-2.791,3.472-4.768,3.953-5.936
C53.571,256.359,53.624,255.319,53.142,254.768z"/>
</g>
<path fill="#8FA268" d="M37.705,272.34c3.734-4.465,5.158-9.761,3.182-11.827c-1.977-2.067-6.606-0.122-10.34,4.343
s-5.158,9.761-3.182,11.827C29.341,278.75,33.971,276.806,37.705,272.34z"/>
<polygon fill="#8FA268" points="43.407,245.914 39.221,245.255 31.987,255.528 34.698,258.26 "/>
<polygon fill="#8FA268" points="50.918,243.132 47.154,242.622 31.903,264.313 34.613,267.045 "/>
<polygon fill="#8FA268" points="36.695,244.04 32.869,243.685 26.36,251.969 29.071,254.701 "/>
<path fill="#8FA268" d="M29.727,270.997c4.979-2.65,8.526-9.673,7.922-15.687c-0.604-6.014-5.13-8.742-10.11-6.092
s-8.526,9.673-7.922,15.687C20.221,270.919,24.748,273.647,29.727,270.997z"/>
</g>
<g>
<g>
<path fill="#B7B3AB" d="M57.392,236.963c-1.623,0-3.36-1.014-3.36-2.523v-6.357h2.384c0,0,0,4.122,0,4.602
c0,0.977,0.083,2.219,0.877,2.219s0.712-0.467,0.712-0.993c0-3.617,2.212-4.9,4.106-4.9v2.384c-1.142,0-1.722,0.847-1.722,2.516
c0,1.237-0.522,1.955-0.96,2.339C58.897,236.717,58.193,236.963,57.392,236.963z"/>
</g>
<g>
<path fill="#87837F" d="M55.621,234.441v-6.357h-1.589v6.357c0,1.509,1.737,2.523,3.36,2.523c0.271,0,0.525-0.038,0.771-0.094
C56.825,236.598,55.621,235.695,55.621,234.441z"/>
<path fill="#87837F" d="M58.005,234.275c0,0,0.551,0.028,0.695-1.126c0.166-1.324,0.795-3.874,3.411-3.818
c0.033,0.001,0-0.321,0-0.321c-1.894,0-4.106,1.283-4.106,4.9V234.275z"/>
</g>
<ellipse fill="#B7B3AB" cx="51.383" cy="228.745" rx="5.695" ry="5.96"/>
<path fill="#87837F" d="M45.687,228.745c0,3.292,2.55,5.96,5.695,5.96c0.165,0,0.328-0.011,0.49-0.026
c1.686-1.035,2.821-2.946,2.821-5.14c0-3.292-2.55-5.96-5.695-5.96c-0.165,0-0.328,0.011-0.49,0.026
C46.823,224.641,45.687,226.552,45.687,228.745z"/>
<rect x="39.065" y="240.003" fill="#B7B3AB" width="4.238" height="6.093"/>
<rect x="38.866" y="240.003" fill="#87837F" width="1.987" height="6.093"/>
<rect x="46.747" y="234.176" fill="#B7B3AB" width="4.238" height="9.006"/>
<rect x="46.747" y="234.176" fill="#87837F" width="1.854" height="9.006"/>
<rect x="32.443" y="238.149" fill="#B7B3AB" width="4.238" height="6.093"/>
<rect x="32.294" y="238.149" fill="#87837F" width="2.152" height="6.093"/>
<ellipse transform="matrix(0.9118 -0.4107 0.4107 0.9118 -92.5074 37.6797)" fill="#B7B3AB" cx="41.438" cy="234.131" rx="10.188" ry="8.37"/>
<g>
<path fill="#87837F" d="M32.149,238.316c1.049,2.329,3.262,3.838,5.895,4.335c0.954-0.172,1.916-0.464,2.859-0.888
c5.13-2.311,11.275-9.044,8.891-13.414S41.449,225.037,38,226.5C32.82,228.697,30.25,234.101,32.149,238.316z"/>
</g>
<path fill="#87837F" d="M56.018,229.077c0,1.938-1.156,3.51-2.583,3.51s-2.583-1.571-2.583-3.51c0-1.938,0.132-3.51,2.583-3.51
S56.018,227.138,56.018,229.077z"/>
</g>
</g>
<g>
<g>
<g>
<path fill="#8FA268" d="M65.092,279.742c-1.229-1.403-5.014-0.029-8.691,4.254l-15.494,18.043l1.805,2.061
c0,0,10.046-11.699,11.216-13.062c2.381-2.773,5.47-6.226,6.071-5.538s-0.6,1.942-1.882,3.435
c-8.815,10.266-10.268,15.82-8.834,17.458l5.81-6.766c-0.865-0.988,0.76-3.892,4.829-8.63c3.016-3.512,4.369-6,4.975-7.47
C65.632,281.743,65.699,280.435,65.092,279.742z"/>
</g>
<path fill="#8FA268" d="M44.302,306.581c4.699-5.619,6.491-12.282,4.004-14.883s-8.313-0.154-13.011,5.465
s-6.491,12.282-4.004,14.883S39.604,312.2,44.302,306.581z"/>
<polygon fill="#8FA268" points="51.478,273.327 46.21,272.498 37.108,285.424 40.519,288.862 "/>
<polygon fill="#8FA268" points="60.929,269.827 56.193,269.185 37.001,296.48 40.412,299.918 "/>
<polygon fill="#8FA268" points="43.032,270.969 38.218,270.522 30.027,280.947 33.438,284.385 "/>
<path fill="#8FA268" d="M34.263,304.891c6.266-3.334,10.729-12.172,9.968-19.74s-6.456-11-12.722-7.666
c-6.266,3.334-10.729,12.172-9.968,19.74C22.302,304.793,27.998,308.225,34.263,304.891z"/>
</g>
<g>
<g>
<path fill="#B7B3AB" d="M69.076,262.064c-2.042,0-4.228-1.275-4.228-3.174v-8h3c0,0,0,5.187,0,5.792
c0,1.229,0.104,2.792,1.104,2.792s0.896-0.588,0.896-1.25c0-4.552,2.783-6.167,5.167-6.167v3c-1.438,0-2.167,1.065-2.167,3.167
c0,1.557-0.657,2.46-1.208,2.944C70.97,261.753,70.084,262.064,69.076,262.064z"/>
</g>
<g>
<path fill="#87837F" d="M66.848,258.889v-8h-2v8c0,1.899,2.186,3.174,4.228,3.174c0.341,0,0.661-0.048,0.97-0.118
C68.362,261.604,66.848,260.468,66.848,258.889z"/>
<path fill="#87837F" d="M69.848,258.681c0,0,0.693,0.035,0.875-1.416c0.208-1.667,1-4.875,4.292-4.804
c0.042,0.001,0-0.404,0-0.404c-2.383,0-5.167,1.615-5.167,6.167V258.681z"/>
</g>
<ellipse fill="#B7B3AB" cx="61.514" cy="251.723" rx="7.167" ry="7.5"/>
<path fill="#87837F" d="M54.348,251.723c0,4.142,3.209,7.5,7.167,7.5c0.208,0,0.413-0.014,0.616-0.033
c2.122-1.302,3.55-3.708,3.55-6.467c0-4.142-3.209-7.5-7.167-7.5c-0.208,0-0.413,0.014-0.616,0.033
C55.776,246.557,54.348,248.963,54.348,251.723z"/>
<rect x="46.014" y="265.889" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="45.764" y="265.889" fill="#87837F" width="2.5" height="7.667"/>
<rect x="55.681" y="258.556" fill="#B7B3AB" width="5.333" height="11.333"/>
<rect x="55.681" y="258.556" fill="#87837F" width="2.333" height="11.333"/>
<rect x="37.681" y="263.556" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="37.494" y="263.556" fill="#87837F" width="2.708" height="7.667"/>
<ellipse transform="matrix(0.9118 -0.4107 0.4107 0.9118 -101.849 42.936)" fill="#B7B3AB" cx="49" cy="258.5" rx="12.82" ry="10.532"/>
<g>
<path fill="#87837F" d="M37.311,263.766c1.32,2.931,4.104,4.829,7.418,5.455c1.201-0.216,2.411-0.584,3.597-1.118
c6.456-2.908,14.188-11.38,11.188-16.88s-10.5-4.167-14.84-2.326C38.156,251.662,34.922,258.462,37.311,263.766z"/>
</g>
<path fill="#87837F" d="M67.348,252.139c0,2.439-1.455,4.417-3.25,4.417c-1.795,0-3.25-1.977-3.25-4.417s0.167-4.417,3.25-4.417
C67.181,247.723,67.348,249.7,67.348,252.139z"/>
</g>
</g>
<g>
<g>
<g>
<path fill="#8FA268" d="M310.592,462.742c-1.229-1.403-5.014-0.029-8.691,4.254l-15.494,18.043l1.805,2.061
c0,0,10.046-11.699,11.216-13.062c2.381-2.773,5.47-6.226,6.071-5.538s-0.6,1.942-1.882,3.435
c-8.815,10.266-10.268,15.82-8.834,17.458l5.81-6.766c-0.865-0.988,0.76-3.892,4.829-8.63c3.016-3.512,4.369-6,4.975-7.47
C311.132,464.743,311.199,463.435,310.592,462.742z"/>
</g>
<path fill="#8FA268" d="M289.802,491.081c4.699-5.619,6.491-12.282,4.004-14.883s-8.313-0.154-13.011,5.465
s-6.491,12.282-4.004,14.883S285.104,496.7,289.802,491.081z"/>
<polygon fill="#8FA268" points="296.978,457.827 291.71,456.998 282.608,469.924 286.019,473.362 "/>
<polygon fill="#8FA268" points="306.429,454.327 301.693,453.685 282.501,480.98 285.912,484.418 "/>
<polygon fill="#8FA268" points="288.532,455.469 283.718,455.022 275.527,465.447 278.938,468.885 "/>
<path fill="#8FA268" d="M279.763,489.391c6.266-3.334,10.729-12.172,9.968-19.74c-0.76-7.568-6.456-11-12.722-7.666
c-6.266,3.334-10.729,12.172-9.968,19.74C267.802,489.293,273.498,492.725,279.763,489.391z"/>
</g>
<g>
<g>
<path fill="#B7B3AB" d="M314.576,446.564c-2.042,0-4.228-1.275-4.228-3.174v-8h3c0,0,0,5.187,0,5.792
c0,1.229,0.104,2.792,1.104,2.792s0.896-0.588,0.896-1.25c0-4.552,2.783-6.167,5.167-6.167v3c-1.438,0-2.167,1.065-2.167,3.167
c0,1.557-0.657,2.46-1.208,2.944C316.47,446.253,315.584,446.564,314.576,446.564z"/>
</g>
<g>
<path fill="#87837F" d="M312.348,443.389v-8h-2v8c0,1.899,2.186,3.174,4.228,3.174c0.341,0,0.661-0.048,0.97-0.118
C313.862,446.104,312.348,444.968,312.348,443.389z"/>
<path fill="#87837F" d="M315.348,443.181c0,0,0.693,0.035,0.875-1.416c0.208-1.667,1-4.875,4.292-4.804
c0.042,0.001,0-0.404,0-0.404c-2.383,0-5.167,1.615-5.167,6.167V443.181z"/>
</g>
<ellipse fill="#B7B3AB" cx="307.014" cy="436.223" rx="7.167" ry="7.5"/>
<path fill="#87837F" d="M299.848,436.223c0,4.142,3.209,7.5,7.167,7.5c0.208,0,0.413-0.014,0.616-0.033
c2.122-1.302,3.55-3.708,3.55-6.467c0-4.142-3.209-7.5-7.167-7.5c-0.208,0-0.413,0.014-0.616,0.033
C301.276,431.057,299.848,433.463,299.848,436.223z"/>
<rect x="291.514" y="450.389" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="291.264" y="450.389" fill="#87837F" width="2.5" height="7.667"/>
<rect x="301.181" y="443.056" fill="#B7B3AB" width="5.333" height="11.333"/>
<rect x="301.181" y="443.056" fill="#87837F" width="2.333" height="11.333"/>
<rect x="283.181" y="448.056" fill="#B7B3AB" width="5.333" height="7.667"/>
<rect x="282.994" y="448.056" fill="#87837F" width="2.708" height="7.667"/>
<ellipse transform="matrix(0.9118 -0.4107 0.4107 0.9118 -155.9648 160.05)" fill="#B7B3AB" cx="294.5" cy="443" rx="12.82" ry="10.532"/>
<g>
<path fill="#87837F" d="M282.811,448.266c1.32,2.931,4.104,4.829,7.418,5.455c1.201-0.216,2.411-0.584,3.597-1.118
c6.456-2.908,14.188-11.38,11.188-16.88s-10.5-4.167-14.84-2.326C283.656,436.162,280.422,442.962,282.811,448.266z"/>
</g>
<path fill="#87837F" d="M312.848,436.639c0,2.439-1.455,4.417-3.25,4.417s-3.25-1.977-3.25-4.417c0-2.439,0.167-4.417,3.25-4.417
S312.848,434.2,312.848,436.639z"/>
</g>
</g>
</svg>
<div id="cube-hitarea">
<div id="cube">
<svg class="side" width="100px" height="100px">
<rect fill="#DAD6CC" width="74" height="74"/>
<circle fill="#F8F1E5" cx="37" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="37" cy="37" r="6"/>
</g>
</g>
</svg>
<svg class="side" width="100px" height="100px">
<rect fill="#DAD6CC" width="74" height="74"/>
<circle fill="#F8F1E5" cx="37" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="59.75" cy="37" r="6"/>
<circle fill="#9B9993" cx="14.25" cy="37" r="6"/>
</g>
</g>
</svg>
<svg class="side" width="100px" height="100px">
<rect fill="#DAD6CC" width="74" height="74"/>
<circle fill="#F8F1E5" cx="37" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="59.75" cy="16.5" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="37" cy="37" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="14.25" cy="57.5" r="6"/>
</g>
</g>
</svg>
<svg class="side" width="100px" height="100px">
<rect fill="#dddddd" width="74" height="74"/>
<circle fill="#F8F1E5" cx="37" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="37" cy="16.5" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="59.75" cy="37" r="6"/>
<circle fill="#9B9993" cx="14.25" cy="37" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="37" cy="57.5" r="6"/>
</g>
</g>
</svg>
<svg class="side" width="100px" height="100px">
<rect fill="#cccccc" width="74" height="74"/>
<circle fill="#F8F1E5" cx="37" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="37" cy="16.5" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="59.75" cy="37" r="6"/>
<circle fill="#9B9993" cx="37" cy="37" r="6"/>
<circle fill="#9B9993" cx="14.25" cy="37" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="37" cy="57.5" r="6"/>
</g>
</g>
</svg>
<svg class="side" width="100px" height="100px">
<rect fill="#efefef" width="74" height="74"/>
<circle fill="#F8F1E5" cx="38" cy="37" r="27"/>
<g>
<g>
<circle fill="#9B9993" cx="60.75" cy="16.5" r="6"/>
<circle fill="#9B9993" cx="38" cy="16.5" r="6"/>
<circle fill="#9B9993" cx="15.25" cy="16.5" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="60.75" cy="37" r="6"/>
<circle fill="#9B9993" cx="38" cy="37" r="6"/>
<circle fill="#9B9993" cx="15.25" cy="37" r="6"/>
</g>
<g>
<circle fill="#9B9993" cx="60.75" cy="57.5" r="6"/>
<circle fill="#9B9993" cx="38" cy="57.5" r="6"/>
<circle fill="#9B9993" cx="15.25" cy="57.5" r="6"/>
</g>
</g>
</svg>
</div>
</div>
<script src="js/jquery-1.9.0.min.js"></script>
<script src="js/underscore.js"></script>
<script src="js/backbone.js"></script>
<script src="js/seedrandom.js"></script>
<script src="js/path-animal.js"></script>
<script src="js/tree-face.js"></script>
<script src="js/snap.svg.js"></script>
<script src="js/main.js"></script>
</body>
</html>
================================================
FILE: demos/animated-game/js/backbone.js
================================================
// Backbone.js 1.0.0
// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(root, factory) {
// Set up Backbone appropriately for the environment.
if (typeof exports !== 'undefined') {
// Node/CommonJS, no need for jQuery in that case.
factory(root, exports, require('underscore'));
} else if (typeof define === 'function' && define.amd) {
// AMD
define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
// Export global even in AMD case in case this script is loaded with
// others that may still expect a global Backbone.
root.Backbone = factory(root, exports, _, $);
});
} else {
// Browser globals
root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
}
}(this, function(root, Backbone, _, $) {
// Initial Setup
// -------------
// Save the previous value of the `Backbone` variable, so that it can be
// restored later on, if `noConflict` is used.
var previousBackbone = root.Backbone;
// Create local references to array methods we'll want to use later.
var array = [];
var push = array.push;
var slice = array.slice;
var splice = array.splice;
// Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '1.0.0';
// For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.
Backbone.$ = $;
// Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
// to its previous owner. Returns a reference to this Backbone object.
Backbone.noConflict = function() {
root.Backbone = previousBackbone;
return this;
};
// Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
// will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and
// set a `X-Http-Method-Override` header.
Backbone.emulateHTTP = false;
// Turn on `emulateJSON` to support legacy servers that can't deal with direct
// `application/json` requests ... will encode the body as
// `application/x-www-form-urlencoded` instead and will send the model in a
// form param named `model`.
Backbone.emulateJSON = false;
// Backbone.Events
// ---------------
// A module that can be mixed in to *any object* in order to provide it with
// custom events. You may bind with `on` or remove with `off` callback
// functions to an event; `trigger`-ing an event fires all callbacks in
// succession.
//
// var object = {};
// _.extend(object, Backbone.Events);
// object.on('expand', function(){ alert('expanded'); });
// object.trigger('expand');
//
var Events = Backbone.Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind
// the callback to all events fired.
on: function(name, callback, context) {
if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
this._events || (this._events = {});
var events = this._events[name] || (this._events[name] = []);
events.push({callback: callback, context: context, ctx: context || this});
return this;
},
// Bind an event to only be triggered a single time. After the first time
// the callback is invoked, it will be removed.
once: function(name, callback, context) {
if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
var self = this;
var once = _.once(function() {
self.off(name, once);
callback.apply(this, arguments);
});
once._callback = callback;
return this.on(name, once, context);
},
// Remove one or many callbacks. If `context` is null, removes all
// callbacks with that function. If `callback` is null, removes all
// callbacks for the event. If `name` is null, removes all bound
// callbacks for all events.
off: function(name, callback, context) {
var retain, ev, events, names, i, l, j, k;
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
if (!name && !callback && !context) {
this._events = {};
return this;
}
names = name ? [name] : _.keys(this._events);
for (i = 0, l = names.length; i < l; i++) {
name = names[i];
if (events = this._events[name]) {
this._events[name] = retain = [];
if (callback || context) {
for (j = 0, k = events.length; j < k; j++) {
ev = events[j];
if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||
(context && context !== ev.context)) {
retain.push(ev);
}
}
}
if (!retain.length) delete this._events[name];
}
}
return this;
},
// Trigger one or many events, firing all bound callbacks. Callbacks are
// passed the same arguments as `trigger` is, apart from the event name
// (unless you're listening on `"all"`, which will cause your callback to
// receive the true name of the event as the first argument).
trigger: function(name) {
if (!this._events) return this;
var args = slice.call(arguments, 1);
if (!eventsApi(this, 'trigger', name, args)) return this;
var events = this._events[name];
var allEvents = this._events.all;
if (events) triggerEvents(events, args);
if (allEvents) triggerEvents(allEvents, arguments);
return this;
},
// Tell this object to stop listening to either specific events ... or
// to every object it's currently listening to.
stopListening: function(obj, name, callback) {
var listeners = this._listeners;
if (!listeners) return this;
var deleteListener = !name && !callback;
if (typeof name === 'object') callback = this;
if (obj) (listeners = {})[obj._listenerId] = obj;
for (var id in listeners) {
listeners[id].off(name, callback, this);
if (deleteListener) delete this._listeners[id];
}
return this;
}
};
// Regular expression used to split event strings.
var eventSplitter = /\s+/;
// Implement fancy features of the Events API such as multiple event
// names `"change blur"` and jQuery-style event maps `{change: action}`
// in terms of the existing API.
var eventsApi = function(obj, action, name, rest) {
if (!name) return true;
// Handle event maps.
if (typeof name === 'object') {
for (var key in name) {
obj[action].apply(obj, [key, name[key]].concat(rest));
}
return false;
}
// Handle space separated event names.
if (eventSplitter.test(name)) {
var names = name.split(eventSplitter);
for (var i = 0, l = names.length; i < l; i++) {
obj[action].apply(obj, [names[i]].concat(rest));
}
return false;
}
return true;
};
// A difficult-to-believe, but optimized internal dispatch function for
// triggering events. Tries to keep the usual cases speedy (most internal
// Backbone events have 3 arguments).
var triggerEvents = function(events, args) {
var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
switch (args.length) {
case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
}
};
var listenMethods = {listenTo: 'on', listenToOnce: 'once'};
// Inversion-of-control versions of `on` and `once`. Tell *this* object to
// listen to an event in another object ... keeping track of what it's
// listening to.
_.each(listenMethods, function(implementation, method) {
Events[method] = function(obj, name, callback) {
var listeners = this._listeners || (this._listeners = {});
var id = obj._listenerId || (obj._listenerId = _.uniqueId('l'));
listeners[id] = obj;
if (typeof name === 'object') callback = this;
obj[implementation](name, callback, this);
return this;
};
});
// Aliases for backwards compatibility.
Events.bind = Events.on;
Events.unbind = Events.off;
// Allow the `Backbone` object to serve as a global event bus, for folks who
// want global "pubsub" in a convenient place.
_.extend(Backbone, Events);
// Backbone.Model
// --------------
// Backbone **Models** are the basic data object in the framework --
// frequently representing a row in a table in a database on your server.
// A discrete chunk of data and a bunch of useful, related methods for
// performing computations and transformations on that data.
// Create a new model with the specified attributes. A client id (`cid`)
// is automatically generated and assigned for you.
var Model = Backbone.Model = function(attributes, options) {
var defaults;
var attrs = attributes || {};
options || (options = {});
this.cid = _.uniqueId('c');
this.attributes = {};
_.extend(this, _.pick(options, modelOptions));
if (options.parse) attrs = this.parse(attrs, options) || {};
if (defaults = _.result(this, 'defaults')) {
attrs = _.defaults({}, attrs, defaults);
}
this.set(attrs, options);
this.changed = {};
this.initialize.apply(this, arguments);
};
// A list of options to be attached directly to the model, if provided.
var modelOptions = ['url', 'urlRoot', 'collection'];
// Attach all inheritable methods to the Model prototype.
_.extend(Model.prototype, Events, {
// A hash of attributes whose current and previous value differ.
changed: null,
// The value returned during the last failed validation.
validationError: null,
// The default name for the JSON `id` attribute is `"id"`. MongoDB and
// CouchDB users may want to set this to `"_id"`.
idAttribute: 'id',
// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize: function(){},
// Return a copy of the model's `attributes` object.
toJSON: function(options) {
return _.clone(this.attributes);
},
// Proxy `Backbone.sync` by default -- but override this if you need
// custom syncing semantics for *this* particular model.
sync: function() {
return Backbone.sync.apply(this, arguments);
},
// Get the value of an attribute.
get: function(attr) {
return this.attributes[attr];
},
// Get the HTML-escaped value of an attribute.
escape: function(attr) {
return _.escape(this.get(attr));
},
// Returns `true` if the attribute contains a value that is not null
// or undefined.
has: function(attr) {
return this.get(attr) != null;
},
// Set a hash of model attributes on the object, firing `"change"`. This is
// the core primitive operation of a model, updating the data and notifying
// anyone who needs to know about the change in state. The heart of the beast.
set: function(key, val, options) {
var attr, attrs, unset, changes, silent, changing, prev, current;
if (key == null) return this;
// Handle both `"key", value` and `{key: value}` -style arguments.
if (typeof key === 'object') {
attrs = key;
options = val;
} else {
(attrs = {})[key] = val;
}
options || (options = {});
// Run validation.
if (!this._validate(attrs, options)) return false;
// Extract attributes and options.
unset = options.unset;
silent = options.silent;
changes = [];
changing = this._changing;
this._changing = true;
if (!changing) {
this._previousAttributes = _.clone(this.attributes);
this.changed = {};
}
current = this.attributes, prev = this._previousAttributes;
// Check for changes of `id`.
if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
// For each `set` attribute, update or delete the current value.
for (attr in attrs) {
val = attrs[attr];
if (!_.isEqual(current[attr], val)) changes.push(attr);
if (!_.isEqual(prev[attr], val)) {
this.changed[attr] = val;
} else {
delete this.changed[attr];
}
unset ? delete current[attr] : current[attr] = val;
}
// Trigger all relevant attribute changes.
if (!silent) {
if (changes.length) this._pending = true;
for (var i = 0, l = changes.length; i < l; i++) {
this.trigger('change:' + changes[i], this, current[changes[i]], options);
}
}
// You might be wondering why there's a `while` loop here. Changes can
// be recursively nested within `"change"` events.
if (changing) return this;
if (!silent) {
while (this._pending) {
this._pending = false;
this.trigger('change', this, options);
}
}
this._pending = false;
this._changing = false;
return this;
},
// Remove an attribute from the model, firing `"change"`. `unset` is a noop
// if the attribute doesn't exist.
unset: function(attr, options) {
return this.set(attr, void 0, _.extend({}, options, {unset: true}));
},
// Clear all attributes on the model, firing `"change"`.
clear: function(options) {
var attrs = {};
for (var key in this.attributes) attrs[key] = void 0;
return this.set(attrs, _.extend({}, options, {unset: true}));
},
// Determine if the model has changed since the last `"change"` event.
// If you specify an attribute name, determine if that attribute has changed.
hasChanged: function(attr) {
if (attr == null) return !_.isEmpty(this.changed);
return _.has(this.changed, attr);
},
// Return an object containing all the attributes that have changed, or
// false if there are no changed attributes. Useful for determining what
// parts of a view need to be updated and/or what attributes need to be
// persisted to the server. Unset attributes will be set to undefined.
// You can also pass an attributes object to diff against the model,
// determining if there *would be* a change.
changedAttributes: function(diff) {
if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
var val, changed = false;
var old = this._changing ? this._previousAttributes : this.attributes;
for (var attr in diff) {
if (_.isEqual(old[attr], (val = diff[attr]))) continue;
(changed || (changed = {}))[attr] = val;
}
return changed;
},
// Get the previous value of an attribute, recorded at the time the last
// `"change"` event was fired.
previous: function(attr) {
if (attr == null || !this._previousAttributes) return null;
return this._previousAttributes[attr];
},
// Get all of the attributes of the model at the time of the previous
// `"change"` event.
previousAttributes: function() {
return _.clone(this._previousAttributes);
},
// Fetch the model from the server. If the server's representation of the
// model differs from its current attributes, they will be overridden,
// triggering a `"change"` event.
fetch: function(options) {
options = options ? _.clone(options) : {};
if (options.parse === void 0) options.parse = true;
var model = this;
var success = options.success;
options.success = function(resp) {
if (!model.set(model.parse(resp, options), options)) return false;
if (success) success(model, resp, options);
model.trigger('sync', model, resp, options);
};
wrapError(this, options);
return this.sync('read', this, options);
},
// Set a hash of model attributes, and sync the model to the server.
// If the server returns an attributes hash that differs, the model's
// state will be `set` again.
save: function(key, val, options) {
var attrs, method, xhr, attributes = this.attributes;
// Handle both `"key", value` and `{key: value}` -style arguments.
if (key == null || typeof key === 'object') {
attrs = key;
options = val;
} else {
(attrs = {})[key] = val;
}
// If we're not waiting and attributes exist, save acts as `set(attr).save(null, opts)`.
if (attrs && (!options || !options.wait) && !this.set(attrs, options)) return false;
options = _.extend({validate: true}, options);
// Do not persist invalid models.
if (!this._validate(attrs, options)) return false;
// Set temporary attributes if `{wait: true}`.
if (attrs && options.wait) {
this.attributes = _.extend({}, attributes, attrs);
}
// After a successful server-side save, the client is (optionally)
// updated with the server-side state.
if (options.parse === void 0) options.parse = true;
var model = this;
var success = options.success;
options.success = function(resp) {
// Ensure attributes are restored during synchronous saves.
model.attributes = attributes;
var serverAttrs = model.parse(resp, options);
if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
return false;
}
if (success) success(model, resp, options);
model.trigger('sync', model, resp, options);
};
wrapError(this, options);
method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
if (method === 'patch') options.attrs = attrs;
xhr = this.sync(method, this, options);
// Restore attributes.
if (attrs && options.wait) this.attributes = attributes;
return xhr;
},
// Destroy this model on the server if it was already persisted.
// Optimistically removes the model from its collection, if it has one.
// If `wait: true` is passed, waits for the server to respond before removal.
destroy: function(options) {
options = options ? _.clone(options) : {};
var model = this;
var success = options.success;
var destroy = function() {
model.trigger('destroy', model, model.collection, options);
};
options.success = function(resp) {
if (options.wait || model.isNew()) destroy();
if (success) success(model, resp, options);
if (!model.isNew()) model.trigger('sync', model, resp, options);
};
if (this.isNew()) {
options.success();
return false;
}
wrapError(this, options);
var xhr = this.sync('delete', this, options);
if (!options.wait) destroy();
return xhr;
},
// Default URL for the model's representation on the server -- if you're
// using Backbone's restful methods, override this to change the endpoint
// that will be called.
url: function() {
var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();
if (this.isNew()) return base;
return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);
},
// **parse** converts a response into the hash of attributes to be `set` on
// the model. The default implementation is just to pass the response along.
parse: function(resp, options) {
return resp;
},
// Create a new model with identical attributes to this one.
clone: function() {
return new this.constructor(this.attributes);
},
// A model is new if it has never been saved to the server, and lacks an id.
isNew: function() {
return this.id == null;
},
// Check if the model is currently in a valid state.
isValid: function(options) {
return this._validate({}, _.extend(options || {}, { validate: true }));
},
// Run validation against the next complete set of model attributes,
// returning `true` if all is well. Otherwise, fire an `"invalid"` event.
_validate: function(attrs, options) {
if (!options.validate || !this.validate) return true;
attrs = _.extend({}, this.attributes, attrs);
var error = this.validationError = this.validate(attrs, options) || null;
if (!error) return true;
this.trigger('invalid', this, error, _.extend(options || {}, {validationError: error}));
return false;
}
});
// Underscore methods that we want to implement on the Model.
var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit'];
// Mix in each Underscore method as a proxy to `Model#attributes`.
_.each(modelMethods, function(method) {
Model.prototype[method] = function() {
var args = slice.call(arguments);
args.unshift(this.attributes);
return _[method].apply(_, args);
};
});
// Backbone.Collection
// -------------------
// If models tend to represent a single row of data, a Backbone Collection is
// more analagous to a table full of data ... or a small slice or page of that
// table, or a collection of rows that belong together for a particular reason
// -- all of the messages in this particular folder, all of the documents
// belonging to this particular author, and so on. Collections maintain
// indexes of their models, both in order, and for lookup by `id`.
// Create a new **Collection**, perhaps to contain a specific type of `model`.
// If a `comparator` is specified, the Collection will maintain
// its models in sort order, as they're added and removed.
var Collection = Backbone.Collection = function(models, options) {
options || (options = {});
if (options.url) this.url = options.url;
if (options.model) this.model = options.model;
if (options.comparator !== void 0) this.comparator = options.comparator;
this._reset();
this.initialize.apply(this, arguments);
if (models) this.reset(models, _.extend({silent: true}, options));
};
// Default options for `Collection#set`.
var setOptions = {add: true, remove: true, merge: true};
var addOptions = {add: true, merge: false, remove: false};
// Define the Collection's inheritable methods.
_.extend(Collection.prototype, Events, {
// The default model for a collection is just a **Backbone.Model**.
// This should be overridden in most cases.
model: Model,
// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize: function(){},
// The JSON representation of a Collection is an array of the
// models' attributes.
toJSON: function(options) {
return this.map(function(model){ return model.toJSON(options); });
},
// Proxy `Backbone.sync` by default.
sync: function() {
return Backbone.sync.apply(this, arguments);
},
// Add a model, or list of models to the set.
add: function(models, options) {
return this.set(models, _.defaults(options || {}, addOptions));
},
// Remove a model, or a list of models from the set.
remove: function(models, options) {
models = _.isArray(models) ? models.slice() : [models];
options || (options = {});
var i, l, index, model;
for (i = 0, l = models.length; i < l; i++) {
model = this.get(models[i]);
if (!model) continue;
delete this._byId[model.id];
delete this._byId[model.cid];
index = this.indexOf(model);
this.models.splice(index, 1);
this.length--;
if (!options.silent) {
options.index = index;
model.trigger('remove', model, this, options);
}
this._removeReference(model);
}
return this;
},
// Update a collection by `set`-ing a new list of models, adding new ones,
// removing models that are no longer present, and merging models that
// already exist in the collection, as necessary. Similar to **Model#set**,
// the core operation for updating the data contained by the collection.
set: function(models, options) {
options = _.defaults(options || {}, setOptions);
if (options.parse) models = this.parse(models, options);
if (!_.isArray(models)) models = models ? [models] : [];
var i, l, model, attrs, existing, sort;
var at = options.at;
var sortable = this.comparator && (at == null) && options.sort !== false;
var sortAttr = _.isString(this.comparator) ? this.comparator : null;
var toAdd = [], toRemove = [], modelMap = {};
// Turn bare objects into model references, and prevent invalid models
// from being added.
for (i = 0, l = models.length; i < l; i++) {
if (!(model = this._prepareModel(models[i], options))) continue;
// If a duplicate is found, prevent it from being added and
// optionally merge it into the existing model.
if (existing = this.get(model)) {
if (options.remove) modelMap[existing.cid] = true;
if (options.merge) {
existing.set(model.attributes, options);
if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true;
}
// This is a new model, push it to the `toAdd` list.
} else if (options.add) {
toAdd.push(model);
// Listen to added models' events, and index models for lookup by
// `id` and by `cid`.
model.on('all', this._onModelEvent, this);
this._byId[model.cid] = model;
if (model.id != null) this._byId[model.id] = model;
}
}
// Remove nonexistent models if appropriate.
if (options.remove) {
for (i = 0, l = this.length; i < l; ++i) {
if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
}
if (toRemove.length) this.remove(toRemove, options);
}
// See if sorting is needed, update `length` and splice in new models.
if (toAdd.length) {
if (sortable) sort = true;
this.length += toAdd.length;
if (at != null) {
splice.apply(this.models, [at, 0].concat(toAdd));
} else {
push.apply(this.models, toAdd);
}
}
// Silently sort the collection if appropriate.
if (sort) this.sort({silent: true});
if (options.silent) return this;
// Trigger `add` events.
for (i = 0, l = toAdd.length; i < l; i++) {
(model = toAdd[i]).trigger('add', model, this, options);
}
// Trigger `sort` if the collection was sorted.
if (sort) this.trigger('sort', this, options);
return this;
},
// When you have more items than you want to add or remove individually,
// you can reset the entire set with a new list of models, without firing
// any granular `add` or `remove` events. Fires `reset` when finished.
// Useful for bulk operations and optimizations.
reset: function(models, options) {
options || (options = {});
for (var i = 0, l = this.models.length; i < l; i++) {
this._removeReference(this.models[i]);
}
options.previousModels = this.models;
this._reset();
this.add(models, _.extend({silent: true}, options));
if (!options.silent) this.trigger('reset', this, options);
return this;
},
// Add a model to the end of the collection.
push: function(model, options) {
model = this._prepareModel(model, options);
this.add(model, _.extend({at: this.length}, options));
return model;
},
// Remove a model from the end of the collection.
pop: function(options) {
var model = this.at(this.length - 1);
this.remove(model, options);
return model;
},
// Add a model to the beginning of the collection.
unshift: function(model, options) {
model = this._prepareModel(model, options);
this.add(model, _.extend({at: 0}, options));
return model;
},
// Remove a model from the beginning of the collection.
shift: function(options) {
var model = this.at(0);
this.remove(model, options);
return model;
},
// Slice out a sub-array of models from the collection.
slice: function(begin, end) {
return this.models.slice(begin, end);
},
// Get a model from the set by id.
get: function(obj) {
if (obj == null) return void 0;
return this._byId[obj.id != null ? obj.id : obj.cid || obj];
},
// Get the model at the given index.
at: function(index) {
return this.models[index];
},
// Return models with matching attributes. Useful for simple cases of
// `filter`.
where: function(attrs, first) {
if (_.isEmpty(attrs)) return first ? void 0 : [];
return this[first ? 'find' : 'filter'](function(model) {
for (var key in attrs) {
if (attrs[key] !== model.get(key)) return false;
}
return true;
});
},
// Return the first model with matching attributes. Useful for simple cases
// of `find`.
findWhere: function(attrs) {
return this.where(attrs, true);
},
// Force the collection to re-sort itself. You don't need to call this under
// normal circumstances, as the set will maintain sort order as each item
// is added.
sort: function(options) {
if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
options || (options = {});
// Run sort based on type of `comparator`.
if (_.isString(this.comparator) || this.comparator.length === 1) {
this.models = this.sortBy(this.comparator, this);
} else {
this.models.sort(_.bind(this.comparator, this));
}
if (!options.silent) this.trigger('sort', this, options);
return this;
},
// Figure out the smallest index at which a model should be inserted so as
// to maintain order.
sortedIndex: function(model, value, context) {
value || (value = this.comparator);
var iterator = _.isFunction(value) ? value : function(model) {
return model.get(value);
};
return _.sortedIndex(this.models, model, iterator, context);
},
// Pluck an attribute from each model in the collection.
pluck: function(attr) {
return _.invoke(this.models, 'get', attr);
},
// Fetch the default set of models for this collection, resetting the
// collection when they arrive. If `reset: true` is passed, the response
// data will be passed through the `reset` method instead of `set`.
fetch: function(options) {
options = options ? _.clone(options) : {};
if (options.parse === void 0) options.parse = true;
var success = options.success;
var collection = this;
options.success = function(resp) {
var method = options.reset ? 'reset' : 'set';
collection[method](resp, options);
if (success) success(collection, resp, options);
collection.trigger('sync', collection, resp, options);
};
wrapError(this, options);
return this.sync('read', this, options);
},
// Create a new instance of a model in this collection. Add the model to the
// collection immediately, unless `wait: true` is passed, in which case we
// wait for the server to agree.
create: function(model, options) {
options = options ? _.clone(options) : {};
if (!(model = this._prepareModel(model, options))) return false;
if (!options.wait) this.add(model, options);
var collection = this;
var success = options.success;
options.success = function(resp) {
if (options.wait) collection.add(model, options);
if (success) success(model, resp, options);
};
model.save(null, options);
return model;
},
// **parse** converts a response into a list of models to be added to the
// collection. The default implementation is just to pass it through.
parse: function(resp, options) {
return resp;
},
// Create a new collection with an identical list of models as this one.
clone: function() {
return new this.constructor(this.models);
},
// Private method to reset all internal state. Called when the collection
// is first initialized or reset.
_reset: function() {
this.length = 0;
this.models = [];
this._byId = {};
},
// Prepare a hash of attributes (or other model) to be added to this
// collection.
_prepareModel: function(attrs, options) {
if (attrs instanceof Model) {
if (!attrs.collection) attrs.collection = this;
return attrs;
}
options || (options = {});
options.collection = this;
var model = new this.model(attrs, options);
if (!model._validate(attrs, options)) {
this.trigger('invalid', this, attrs, options);
return false;
}
return model;
},
// Internal method to sever a model's ties to a collection.
_removeReference: function(model) {
if (this === model.collection) delete model.collection;
model.off('all', this._onModelEvent, this);
},
// Internal method called every time a model in the set fires an event.
// Sets need to update their indexes when models change ids. All other
// events simply proxy through. "add" and "remove" events that originate
// in other collections are ignored.
_onModelEvent: function(event, model, collection, options) {
if ((event === 'add' || event === 'remove') && collection !== this) return;
if (event === 'destroy') this.remove(model, options);
if (model && event === 'change:' + model.idAttribute) {
delete this._byId[model.previous(model.idAttribute)];
if (model.id != null) this._byId[model.id] = model;
}
this.trigger.apply(this, arguments);
}
});
// Underscore methods that we want to implement on the Collection.
// 90% of the core usefulness of Backbone Collections is actually implemented
// right here:
var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf',
'isEmpty', 'chain'];
// Mix in each Underscore method as a proxy to `Collection#models`.
_.each(methods, function(method) {
Collection.prototype[method] = function() {
var args = slice.call(arguments);
args.unshift(this.models);
return _[method].apply(_, args);
};
});
// Underscore methods that take a property name as an argument.
var attributeMethods = ['groupBy', 'countBy', 'sortBy'];
// Use attributes instead of properties.
_.each(attributeMethods, function(method) {
Collection.prototype[method] = function(value, context) {
var iterator = _.isFunction(value) ? value : function(model) {
return model.get(value);
};
return _[method](this.models, iterator, context);
};
});
// Backbone.View
// -------------
// Backbone Views are almost more convention than they are actual code. A View
// is simply a JavaScript object that represents a logical chunk of UI in the
// DOM. This might be a single item, an entire list, a sidebar or panel, or
// even the surrounding frame which wraps your whole app. Defining a chunk of
// UI as a **View** allows you to define your DOM events declaratively, without
// having to worry about render order ... and makes it easy for the view to
// react to specific changes in the state of your models.
// Creating a Backbone.View creates its initial element outside of the DOM,
// if an existing element is not provided...
var View = Backbone.View = function(options) {
this.cid = _.uniqueId('view');
this._configure(options || {});
this._ensureElement();
this.initialize.apply(this, arguments);
this.delegateEvents();
};
// Cached regex to split keys for `delegate`.
var delegateEventSplitter = /^(\S+)\s*(.*)$/;
// List of view options to be merged as properties.
var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
// Set up all inheritable **Backbone.View** properties and methods.
_.extend(View.prototype, Events, {
// The default `tagName` of a View's element is `"div"`.
tagName: 'div',
// jQuery delegate for element lookup, scoped to DOM elements within the
// current view. This should be prefered to global lookups where possible.
$: function(selector) {
return this.$el.find(selector);
},
// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize: function(){},
// **render** is the core function that your view should override, in order
// to populate its element (`this.el`), with the appropriate HTML. The
// convention is for **render** to always return `this`.
render: function() {
return this;
},
// Remove this view by taking the element out of the DOM, and removing any
// applicable Backbone.Events listeners.
remove: function() {
this.$el.remove();
this.stopListening();
return this;
},
// Change the view's element (`this.el` property), including event
// re-delegation.
setElement: function(element, delegate) {
if (this.$el) this.undelegateEvents();
this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
this.el = this.$el[0];
if (delegate !== false) this.delegateEvents();
return this;
},
// Set callbacks, where `this.events` is a hash of
//
// *{"event selector": "callback"}*
//
// {
// 'mousedown .title': 'edit',
// 'click .button': 'save'
// 'click .open': function(e) { ... }
// }
//
// pairs. Callbacks will be bound to the view, with `this` set properly.
// Uses event delegation for efficiency.
// Omitting the selector binds the event to `this.el`.
// This only works for delegate-able events: not `focus`, `blur`, and
// not `change`, `submit`, and `reset` in Internet Explorer.
delegateEvents: function(events) {
if (!(events || (events = _.result(this, 'events')))) return this;
this.undelegateEvents();
for (var key in events) {
var method = events[key];
if (!_.isFunction(method)) method = this[events[key]];
if (!method) continue;
var match = key.match(delegateEventSplitter);
var eventName = match[1], selector = match[2];
method = _.bind(method, this);
eventName += '.delegateEvents' + this.cid;
if (selector === '') {
this.$el.on(eventName, method);
} else {
this.$el.on(eventName, selector, method);
}
}
return this;
},
// Clears all callbacks previously bound to the view with `delegateEvents`.
// You usually don't need to use this, but may wish to if you have multiple
// Backbone views attached to the same DOM element.
undelegateEvents: function() {
this.$el.off('.delegateEvents' + this.cid);
return this;
},
// Performs the initial configuration of a View with a set of options.
// Keys with special meaning *(e.g. model, collection, id, className)* are
// attached directly to the view. See `viewOptions` for an exhaustive
// list.
_configure: function(options) {
if (this.options) options = _.extend({}, _.result(this, 'options'), options);
_.extend(this, _.pick(options, viewOptions));
this.options = options;
},
// Ensure that the View has a DOM element to render into.
// If `this.el` is a string, pass it through `$()`, take the first
// matching element, and re-assign it to `el`. Otherwise, create
// an element from the `id`, `className` and `tagName` properties.
_ensureElement: function() {
if (!this.el) {
var attrs = _.extend({}, _.result(this, 'attributes'));
if (this.id) attrs.id = _.result(this, 'id');
if (this.className) attrs['class'] = _.result(this, 'className');
var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);
this.setElement($el, false);
} else {
this.setElement(_.result(this, 'el'), false);
}
}
});
// Backbone.sync
// -------------
// Override this function to change the manner in which Backbone persists
// models to the server. You will be passed the type of request, and the
// model in question. By default, makes a RESTful Ajax request
// to the model's `url()`. Some possible customizations could be:
//
// * Use `setTimeout` to batch rapid-fire updates into a single request.
// * Send up the models as XML instead of JSON.
// * Persist models via WebSockets instead of Ajax.
//
// Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
// as `POST`, with a `_method` parameter containing the true HTTP method,
// as well as all requests with the body as `application/x-www-form-urlencoded`
// instead of `application/json` with the model in a param named `model`.
// Useful when interfacing with server-side languages like **PHP** that make
// it difficult to read the body of `PUT` requests.
Backbone.sync = function(method, model, options) {
var type = methodMap[method];
// Default options, unless specified.
_.defaults(options || (options = {}), {
emulateHTTP: Backbone.emulateHTTP,
emulateJSON: Backbone.emulateJSON
});
// Default JSON-request options.
var params = {type: type, dataType: 'json'};
// Ensure that we have a URL.
if (!options.url) {
params.url = _.result(model, 'url') || urlError();
}
// Ensure that we have the appropriate request data.
if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
params.contentType = 'application/json';
params.data = JSON.stringify(options.attrs || model.toJSON(options));
}
// For older servers, emulate JSON by encoding the request into an HTML-form.
if (options.emulateJSON) {
params.contentType = 'application/x-www-form-urlencoded';
params.data = params.data ? {model: params.data} : {};
}
// For older servers, emulate HTTP by mimicking the HTTP method with `_method`
// And an `X-HTTP-Method-Override` header.
if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
params.type = 'POST';
if (options.emulateJSON) params.data._method = type;
var beforeSend = options.beforeSend;
options.beforeSend = function(xhr) {
xhr.setRequestHeader('X-HTTP-Method-Override', type);
if (beforeSend) return beforeSend.apply(this, arguments);
};
}
// Don't process data on a non-GET request.
if (params.type !== 'GET' && !options.emulateJSON) {
params.processData = false;
}
// If we're sending a `PATCH` request, and we're in an old Internet Explorer
// that still has ActiveX enabled by default, override jQuery to use that
// for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
if (params.type === 'PATCH' && window.ActiveXObject &&
!(window.external && window.external.msActiveXFilteringEnabled)) {
params.xhr = function() {
return new ActiveXObject("Microsoft.XMLHTTP");
};
}
// Make the request, allowing the user to override any Ajax options.
var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
model.trigger('request', model, xhr, options);
return xhr;
};
// Map from CRUD to HTTP for our default `Backbone.sync` implementation.
var methodMap = {
'create': 'POST',
'update': 'PUT',
'patch': 'PATCH',
'delete': 'DELETE',
'read': 'GET'
};
// Set the default implementation of `Backbone.ajax` to proxy through to `$`.
// Override this if you'd like to use a different library.
Backbone.ajax = function() {
return Backbone.$.ajax.apply(Backbone.$, arguments);
};
// Backbone.Router
// ---------------
// Routers map faux-URLs to actions, and fire events when routes are
// matched. Creating a new one sets its `routes` hash, if not set statically.
var Router = Backbone.Router = function(options) {
options || (options = {});
if (options.routes) this.routes = options.routes;
this._bindRoutes();
this.initialize.apply(this, arguments);
};
// Cached regular expressions for matching named param parts and splatted
// parts of route strings.
var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g;
var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
// Set up all inheritable **Backbone.Router** properties and methods.
_.extend(Router.prototype, Events, {
// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize: function(){},
// Manually bind a single named route to a callback. For example:
//
// this.route('search/:query/p:num', 'search', function(query, num) {
// ...
// });
//
route: function(route, name, callback) {
if (!_.isRegExp(route)) route = this._routeToRegExp(route);
if (_.isFunction(name)) {
callback = name;
name = '';
}
if (!callback) callback = this[name];
var router = this;
Backbone.history.route(route, function(fragment) {
var args = router._extractParameters(route, fragment);
callback && callback.apply(router, args);
router.trigger.apply(router, ['route:' + name].concat(args));
router.trigger('route', name, args);
Backbone.history.trigger('route', router, name, args);
});
return this;
},
// Simple proxy to `Backbone.history` to save a fragment into the history.
navigate: function(fragment, options) {
Backbone.history.navigate(fragment, options);
return this;
},
// Bind all defined routes to `Backbone.history`. We have to reverse the
// order of the routes here to support behavior where the most general
// routes can be defined at the bottom of the route map.
_bindRoutes: function() {
if (!this.routes) return;
this.routes = _.result(this, 'routes');
var route, routes = _.keys(this.routes);
while ((route = routes.pop()) != null) {
this.route(route, this.routes[route]);
}
},
// Convert a route string into a regular expression, suitable for matching
// against the current location hash.
_routeToRegExp: function(route) {
route = route.replace(escapeRegExp, '\\$&')
.replace(optionalParam, '(?:$1)?')
.replace(namedParam, function(match, optional){
return optional ? match : '([^\/]+)';
})
.replace(splatParam, '(.*?)');
return new RegExp('^' + route + '$');
},
// Given a route, and a URL fragment that it matches, return the array of
// extracted decoded parameters. Empty or unmatched parameters will be
// treated as `null` to normalize cross-browser behavior.
_extractParameters: function(route, fragment) {
var params = route.exec(fragment).slice(1);
return _.map(params, function(param) {
return param ? decodeURIComponent(param) : null;
});
}
});
// Backbone.History
// ----------------
// Handles cross-browser history management, based on either
// [pushState](http://diveintohtml5.info/history.html) and real URLs, or
// [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
// and URL fragments. If the browser supports neither (old IE, natch),
// falls back to polling.
var History = Backbone.History = function() {
this.handlers = [];
_.bindAll(this, 'checkUrl');
// Ensure that `History` can be used outside of the browser.
if (typeof window !== 'undefined') {
this.location = window.location;
this.history = window.history;
}
};
// Cached regex for stripping a leading hash/slash and trailing space.
var routeStripper = /^[#\/]|\s+$/g;
// Cached regex for stripping leading and trailing slashes.
var rootStripper = /^\/+|\/+$/g;
// Cached regex for detecting MSIE.
var isExplorer = /msie [\w.]+/;
// Cached regex for removing a trailing slash.
var trailingSlash = /\/$/;
// Has the history handling already been started?
History.started = false;
// Set up all inheritable **Backbone.History** properties and methods.
_.extend(History.prototype, Events, {
// The default interval to poll for hash changes, if necessary, is
// twenty times a second.
interval: 50,
// Gets the true hash value. Cannot use location.hash directly due to bug
// in Firefox where location.hash will always be decoded.
getHash: function(window) {
var match = (window || this).location.href.match(/#(.*)$/);
return match ? match[1] : '';
},
// Get the cross-browser normalized URL fragment, either from the URL,
// the hash, or the override.
getFragment: function(fragment, forcePushState) {
if (fragment == null) {
if (this._hasPushState || !this._wantsHashChange || forcePushState) {
fragment = this.location.pathname;
var root = this.root.replace(trailingSlash, '');
if (!fragment.indexOf(root)) fragment = fragment.substr(root.length);
} else {
fragment = this.getHash();
}
}
return fragment.replace(routeStripper, '');
},
// Start the hash change handling, returning `true` if the current URL matches
// an existing route, and `false` otherwise.
start: function(options) {
if (History.started) throw new Error("Backbone.history has already been started");
History.started = true;
// Figure out the initial configuration. Do we need an iframe?
// Is pushState desired ... is it available?
this.options = _.extend({}, {root: '/'}, this.options, options);
this.root = this.options.root;
this._wantsHashChange = this.options.hashChange !== false;
this._wantsPushState = !!this.options.pushState;
this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
var fragment = this.getFragment();
var docMode = document.documentMode;
var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
// Normalize root to always include a leading and trailing slash.
this.root = ('/' + this.root + '/').replace(rootStripper, '/');
if (oldIE && this._wantsHashChange) {
this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
this.navigate(fragment);
}
// Depending on whether we're using pushState or hashes, and whether
// 'onhashchange' is supported, determine how we check the URL state.
if (this._hasPushState) {
Backbone.$(window).on('popstate', this.checkUrl);
} else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
Backbone.$(window).on('hashchange', this.checkUrl);
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
}
// Determine if we need to change the base url, for a pushState link
// opened by a non-pushState browser.
this.fragment = fragment;
var loc = this.location;
var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;
// If we've started off with a route from a `pushState`-enabled browser,
// but we're currently in a browser that doesn't support it...
if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {
this.fragment = this.getFragment(null, true);
this.location.replace(this.root + this.location.search + '#' + this.fragment);
// Return immediately as browser will do redirect to new url
return true;
// Or if we've started out with a hash-based route, but we're currently
// in a browser where it could be `pushState`-based instead...
} else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
this.fragment = this.getHash().replace(routeStripper, '');
this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
}
if (!this.options.silent) return this.loadUrl();
},
// Disable Backbone.history, perhaps temporarily. Not useful in a real app,
// but possibly useful for unit testing Routers.
stop: function() {
Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
clearInterval(this._checkUrlInterval);
History.started = false;
},
// Add a route to be tested when the fragment changes. Routes added later
// may override previous routes.
route: function(route, callback) {
this.handlers.unshift({route: route, callback: callback});
},
// Checks the current URL to see if it has changed, and if it has,
// calls `loadUrl`, normalizing across the hidden iframe.
checkUrl: function(e) {
var current = this.getFragment();
if (current === this.fragment && this.iframe) {
current = this.getFragment(this.getHash(this.iframe));
}
if (current === this.fragment) return false;
if (this.iframe) this.navigate(current);
this.loadUrl() || this.loadUrl(this.getHash());
},
// Attempt to load the current URL fragment. If a route succeeds with a
// match, returns `true`. If no defined routes matches the fragment,
// returns `false`.
loadUrl: function(fragmentOverride) {
var fragment = this.fragment = this.getFragment(fragmentOverride);
var matched = _.any(this.handlers, function(handler) {
if (handler.route.test(fragment)) {
handler.callback(fragment);
return true;
}
});
return matched;
},
// Save a fragment into the hash history, or replace the URL state if the
// 'replace' option is passed. You are responsible for properly URL-encoding
// the fragment in advance.
//
// The options object can contain `trigger: true` if you wish to have the
// route callback be fired (not usually desirable), or `replace: true`, if
// you wish to modify the current URL without adding an entry to the history.
navigate: function(fragment, options) {
if (!History.started) return false;
if (!options || options === true) options = {trigger: options};
fragment = this.getFragment(fragment || '');
if (this.fragment === fragment) return;
this.fragment = fragment;
var url = this.root + fragment;
// If pushState is available, we use it to set the fragment as a real URL.
if (this._hasPushState) {
this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
// If hash changes haven't been explicitly disabled, update the hash
// fragment to store history.
} else if (this._wantsHashChange) {
this._updateHash(this.location, fragment, options.replace);
if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {
// Opening and closing the iframe tricks IE7 and earlier to push a
// history entry on hash-tag change. When replace is true, we don't
// want this.
if(!options.replace) this.iframe.document.open().close();
this._updateHash(this.iframe.location, fragment, options.replace);
}
// If you've told us that you explicitly don't want fallback hashchange-
// based history, then `navigate` becomes a page refresh.
} else {
return this.location.assign(url);
}
if (options.trigger) this.loadUrl(fragment);
},
// Update the hash location, either replacing the current entry, or adding
// a new one to the browser history.
_updateHash: function(location, fragment, replace) {
if (replace) {
var href = location.href.replace(/(javascript:|#).*$/, '');
location.replace(href + '#' + fragment);
} else {
// Some browsers require that `hash` contains a leading #.
location.hash = '#' + fragment;
}
}
});
// Create the default Backbone.history.
Backbone.history = new History;
// Helpers
// -------
// Helper function to correctly set up the prototype chain, for subclasses.
// Similar to `goog.inherits`, but uses a hash of prototype properties and
// class properties to be extended.
var extend = function(protoProps, staticProps) {
var parent = this;
var child;
// The constructor function for the new subclass is either defined by you
// (the "constructor" property in your `extend` definition), or defaulted
// by us to simply call the parent's constructor.
if (protoProps && _.has(protoProps, 'constructor')) {
child = protoProps.constructor;
} else {
child = function(){ return parent.apply(this, arguments); };
}
// Add static properties to the constructor function, if supplied.
_.extend(child, parent, staticProps);
// Set the prototype chain to inherit from `parent`, without calling
// `parent`'s constructor function.
var Surrogate = function(){ this.constructor = child; };
Surrogate.prototype = parent.prototype;
child.prototype = new Surrogate;
// Add prototype properties (instance properties) to the subclass,
// if supplied.
if (protoProps) _.extend(child.prototype, protoProps);
// Set a convenience property in case the parent's prototype is needed
// later.
child.__super__ = parent.prototype;
return child;
};
// Set up inheritance for the model, collection, router, view and history.
Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
// Throw an error when a URL is needed, and none is supplied.
var urlError = function() {
throw new Error('A "url" property or function must be specified');
};
// Wrap an optional error callback with a fallback error event.
var wrapError = function (model, options) {
var error = options.error;
options.error = function(resp) {
if (error) error(model, resp, options);
model.trigger('error', model, resp, options);
};
};
return Backbone;
}));
================================================
FILE: demos/animated-game/js/main.js
================================================
var WIDTH = 1024,
HEIGHT = 720;
console.log('oh');
var MainView = Backbone.View.extend({
initialize: function () {
var i,
dotGroup,
animal;
Math.seedrandom('fish');
this.state = 0;
this.dots = [];
this.animals = [];
this.trees = [];
this.treeFaces = [];
this.s = Snap(document.getElementsByTagName('svg')[0]);
//dot animals
dotGroup = this.s.select('#dots');
this.dots = dotGroup.selectAll('*');
for (i = 0; i < this.dots.length; i += 1) {
animal = new PathAnimal({s: this.s, dot: this.dots[i]});
this.animals.push(animal);
}
//sort depth
for (i = 0; i < this.animals.length; i += 1) {
if (i > 0) {
var a = this.animals[i - 1].el,
b = this.animals[i].el;
if (a.matrix.split().dy > b.matrix.split().dy) {
a.before(b);
}
}
}
//trees
this.trees = this.s.selectAll('.tree');
for (i = 0; i < this.trees.length; i += 1) {
var tree = new TreeFace({s: this.s, tree: this.trees[i]});
this.treeFaces.push(tree);
}
this.cube = document.getElementById('cube');
var $cubeHitArea = document.getElementById('cube-hitarea');
$cubeHitArea.addEventListener('click', this.handle_ROLL.bind(this));
setTimeout(this.animate.bind(this), 3000);
},
handle_ROLL: function () {
this.number = Math.ceil(Math.random() * 6);
if (this.number == 6) {
rx = 45;
ry = 180;
rz = -45;
} else if (this.number == 5) {
rx = 50;
ry = 0;
rz = 50;
} else if (this.number == 4) {
rx = -45;
ry = 50;
rz = 90;
} else if (this.number == 3) {
rx = -45;
ry = 225;
rz = -90;
} else if (this.number == 2) {
rx = -45;
ry = 50;
rz = 0;
} else if (this.number == 1) {
rx = 145;
ry = -45;
rz = 0;
} else {
rx = -90;
ry = 0;
rz = 0;
}
this.cube.style['webkitTransform'] = 'rotateX(' + rx + 'deg) rotateY(' + ry + 'deg) rotateZ(' + rz + 'deg)';
this.cube.style['MozTransform'] = 'rotateX(' + rx + 'deg) rotateY(' + ry + 'deg) rotateZ(' + rz + 'deg)';
},
trigger: function () {
this.state += 1;//this.number;
var animal = this.animals[this.state];
animal.handle_MOUSEOVER();
},
animate: function () {
var tree = this.treeFaces[Math.floor(Math.random() * this.treeFaces.length)];
tree.handle_MOUSEOVER();
setTimeout(function () {
tree.handle_MOUSEOUT();
}.bind(this), 3000);
setTimeout(this.animate.bind(this), 3000);
}
});
var main = new MainView();
================================================
FILE: demos/animated-game/js/path-animal.js
================================================
var PathAnimal = Backbone.View.extend({
initialize: function () {
var _x,
_y,
PATHS = [
'M0,0c0,0,0-28.008,0-46.707S0-89,0-89',
'M0,0c0,0-9.634-22.317,10-46.707S50-69,50-69',
'M0,0c0,0,17.52-24.431,0-56.707S-50-99-50-99'
];
this.s = this.options.s;
this.dot = this.options.dot;
_x = this.dot.attr('cx');
_y = this.dot.attr('cy');
this.el = this.s.g();
this.path = this.s.path(PATHS[Math.floor(Math.random() * PATHS.length)]);
this.totalLength = this.dashOffset = this.path.getTotalLength();
this.path.attr({
fill: 'none',
stroke: this.dot.attr('fill'),
strokeWidth: 25,
strokeMiterlimit: 10,
strokeLinecap: 'round',
opacity: 1,
strokeDasharray: this.totalLength + " 200",
strokeDashoffset: this.totalLength
});
this.el.add(this.path);
this.el.transform("t" + [_x, _y]);
this.hitarea = this.s.circle(_x, _y, 30);
this.hitarea.attr({
fill: 'transparent',
'class': 'hit-area'
});
this.hitarea.mouseover(this.handle_MOUSEOVER.bind(this));
this.hitarea.mouseout(this.handle_MOUSEOUT.bind(this));
this.addFace();
},
addFace: function () {
var mouth,
eye,
ey2;
this.face = this.s.g();
this.face.attr({
'class': 'face'
});
mouth = this.s.circle(0, 5, 4);
mouth.attr({fill: 'black', 'class': 'mouth'});
this.face.add(mouth);
eye = this.s.path('M-2.75-6.75c0,0-2.537,2.5-5.667,2.5s-5.667-2.5-5.667-2.5s2.537-2.5,5.667-2.5S-2.75-6.75-2.75-6.75z');
eye.attr({fill: 'white', 'class': 'eye left'});
this.face.add(eye);
eye2 = this.s.path('M14.583-6.75c0,0-2.537,2.5-5.667,2.5S3.25-6.75,3.25-6.75s2.537-2.5,5.667-2.5S14.583-6.75,14.583-6.75z');
eye2.attr({fill: 'white', 'class': 'eye right'});
this.face.add(eye2);
this.face.transform("s.6");
this.el.add(this.face);
},
handle_MOUSEOVER: function () {
var instance = this;
this.face.attr({
'class': 'face animating'
});
Snap.animate(this.dashOffset, 0, function (val) {
instance.dashOffset = val;
instance.render();
}, 500);
},
handle_MOUSEOUT: function () {
var instance = this;
this.face.attr({
'class': 'face'
});
Snap.animate(this.dashOffset, this.totalLength, function (val) {
instance.dashOffset = val;
instance.render();
}, 500);
},
render: function () {
var point;
this.path.attr({
'stroke-dashoffset': this.dashOffset
});
point = this.path.getPointAtLength(this.totalLength - this.dashOffset);
this.face.transform("t" + [point.x, point.y] + "s.6");
}
});
================================================
FILE: demos/animated-game/js/seedrandom.js
================================================
// seedrandom.js version 2.2.
// Author: David Bau
// Date: 2013 Jun 15
//
// Defines a method Math.seedrandom() that, when called, substitutes
// an explicitly seeded RC4-based algorithm for Math.random(). Also
// supports automatic seeding from local or network sources of entropy.
//
// http://davidbau.com/encode/seedrandom.js
// http://davidbau.com/encode/seedrandom-min.js
//
// Usage:
//
// <script src=http://davidbau.com/encode/seedrandom-min.js></script>
//
// Math.seedrandom('yay.'); Sets Math.random to a function that is
// initialized using the given explicit seed.
//
// Math.seedrandom(); Sets Math.random to a function that is
// seeded using the current time, dom state,
// and other accumulated local entropy.
// The generated seed string is returned.
//
// Math.seedrandom('yowza.', true);
// Seeds using the given explicit seed mixed
// together with accumulated entropy.
//
// <script src="https://jsonlib.appspot.com/urandom?callback=Math.seedrandom">
// </script> Seeds using urandom bits from a server.
//
// More advanced examples:
//
// Math.seedrandom("hello."); // Use "hello." as the seed.
// document.write(Math.random()); // Always 0.9282578795792454
// document.write(Math.random()); // Always 0.3752569768646784
// var rng1 = Math.random; // Remember the current prng.
//
// var autoseed = Math.seedrandom(); // New prng with an automatic seed.
// document.write(Math.random()); // Pretty much unpredictable x.
//
// Math.random = rng1; // Continue "hello." prng sequence.
// document.write(Math.random()); // Always 0.7316977468919549
//
// Math.seedrandom(autoseed); // Restart at the previous seed.
// document.write(Math.random()); // Repeat the 'unpredictable' x.
//
// function reseed(event, count) { // Define a custom entropy collector.
// var t = [];
// function w(e) {
// t.push([e.pageX, e.pageY, +new Date]);
// if (t.length < count) { return; }
// document.removeEventListener(event, w);
// Math.seedrandom(t, true); // Mix in any previous entropy.
// }
// document.addEventListener(event, w);
// }
// reseed('mousemove', 100); // Reseed after 100 mouse moves.
//
// Version notes:
//
// The random number sequence is the same as version 1.0 for string seeds.
// Version 2.0 changed the sequence for non-string seeds.
// Version 2.1 speeds seeding and uses window.crypto to autoseed if present.
// Version 2.2 alters non-crypto autoseeding to sweep up entropy from plugins.
//
// The standard ARC4 key scheduler cycles short keys, which means that
// seedrandom('ab') is equivalent to seedrandom('abab') and 'ababab'.
// Therefore it is a good idea to add a terminator to avoid trivial
// equivalences on short string seeds, e.g., Math.seedrandom(str + '\0').
// Starting with version 2.0, a terminator is added automatically for
// non-string seeds, so seeding with the number 111 is the same as seeding
// with '111\0'.
//
// When seedrandom() is called with zero args, it uses a seed
// drawn from the browser crypto object if present. If there is no
// crypto support, seedrandom() uses the current time, the native rng,
// and a walk of several DOM objects to collect a few bits of entropy.
//
// Each time the one- or two-argument forms of seedrandom are called,
// entropy from the passed seed is accumulated in a pool to help generate
// future seeds for the zero- and two-argument forms of seedrandom.
//
// On speed - This javascript implementation of Math.random() is about
// 3-10x slower than the built-in Math.random() because it is not native
// code, but that is typically fast enough. Some details (timings on
// Chrome 25 on a 2010 vintage macbook):
//
// seeded Math.random() - avg less than 0.0002 milliseconds per call
// seedrandom('explicit.') - avg less than 0.2 milliseconds per call
// seedrandom('explicit.', true) - avg less than 0.2 milliseconds per call
// seedrandom() with crypto - avg less than 0.2 milliseconds per call
//
// Autoseeding without crypto is somewhat slower, about 20-30 milliseconds on
// a 2012 windows 7 1.5ghz i5 laptop, as seen on Firefox 19, IE 10, and Opera.
// Seeded rng calls themselves are fast across these browsers, with slowest
// numbers on Opera at about 0.0005 ms per seeded Math.random().
//
// LICENSE (BSD):
//
// Copyright 2013 David Bau, all rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. 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.
//
// 3. Neither the name of this module nor the names of its contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS 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
// OWNER 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.
//
/**
* All code is in an anonymous closure to keep the global namespace clean.
*/
(function (
global, pool, math, width, chunks, digits) {
//
// The following constants are related to IEEE 754 limits.
//
var startdenom = math.pow(width, chunks),
significance = math.pow(2, digits),
overflow = significance * 2,
mask = width - 1;
//
// seedrandom()
// This is the seedrandom function described above.
//
math['seedrandom'] = function(seed, use_entropy) {
var key = [];
// Flatten the seed string or build one from local entropy if needed.
var shortseed = mixkey(flatten(
use_entropy ? [seed, tostring(pool)] :
0 in arguments ? seed : autoseed(), 3), key);
// Use the seed to initialize an ARC4 generator.
var arc4 = new ARC4(key);
// Mix the randomness into accumulated entropy.
mixkey(tostring(arc4.S), pool);
// Override Math.random
// This function returns a random double in [0, 1) that contains
// randomness in every bit of the mantissa of the IEEE 754 value.
math['random'] = function() { // Closure to return a random double:
var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48
d = startdenom, // and denominator d = 2 ^ 48.
x = 0; // and no 'extra last byte'.
while (n < significance) { // Fill up all significant digits by
n = (n + x) * width; // shifting numerator and
d *= width; // denominator and generating a
x = arc4.g(1); // new least-significant-byte.
}
while (n >= overflow) { // To avoid rounding up, before adding
n /= 2; // last byte, shift everything
d /= 2; // right using integer math until
x >>>= 1; // we have exactly the desired bits.
}
return (n + x) / d; // Form the number within [0, 1).
};
// Return the seed that was used
return shortseed;
};
//
// ARC4
//
// An ARC4 implementation. The constructor takes a key in the form of
// an array of at most (width) integers that should be 0 <= x < (width).
//
// The g(count) method returns a pseudorandom integer that concatenates
// the next (count) outputs from ARC4. Its return value is a number x
// that is in the range 0 <= x < (width ^ count).
//
/** @constructor */
function ARC4(key) {
var t, keylen = key.length,
me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
// The empty key [] is treated as [0].
if (!keylen) { key = [keylen++]; }
// Set up S using the standard key scheduling algorithm.
while (i < width) {
s[i] = i++;
}
for (i = 0; i < width; i++) {
s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
s[j] = t;
}
// The "g" method returns the next (count) outputs as one number.
(me.g = function(count) {
// Using instance members instead of closure state nearly doubles speed.
var t, r = 0,
i = me.i, j = me.j, s = me.S;
while (count--) {
t = s[i = mask & (i + 1)];
r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
}
me.i = i; me.j = j;
return r;
// For robust unpredictability discard an initial batch of values.
// See http://www.rsa.com/rsalabs/node.asp?id=2009
})(width);
}
//
// flatten()
/
gitextract_cmqa50dk/
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CONTRIBUTING
├── Gruntfile.js
├── LICENSE
├── NOTICE
├── README.md
├── bower.json
├── component.json
├── demos/
│ ├── animated-game/
│ │ ├── index.html
│ │ └── js/
│ │ ├── backbone.js
│ │ ├── main.js
│ │ ├── path-animal.js
│ │ ├── seedrandom.js
│ │ ├── snap.svg.js
│ │ ├── tree-face.js
│ │ └── underscore.js
│ ├── animated-map/
│ │ └── index.html
│ ├── clock/
│ │ └── index.html
│ ├── illustrated-infographic-coffee/
│ │ └── index.html
│ ├── pattern/
│ │ └── index.html
│ ├── snap-ad/
│ │ ├── Gruntfile.js
│ │ ├── README.md
│ │ ├── SnapAd.tmproj
│ │ ├── package.json
│ │ ├── site/
│ │ │ ├── css/
│ │ │ │ └── screen.css
│ │ │ ├── index.html
│ │ │ ├── index.min.html
│ │ │ └── js/
│ │ │ ├── main.js
│ │ │ └── vendor/
│ │ │ └── require.js
│ │ └── src/
│ │ ├── .sass-cache/
│ │ │ └── 7eb2e4ecfecd432261de95f74b5302c6e0956ac9/
│ │ │ └── screen.scssc
│ │ ├── config.rb
│ │ ├── css/
│ │ │ └── screen.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ ├── app/
│ │ │ │ ├── app.js
│ │ │ │ ├── burst.js
│ │ │ │ ├── device.js
│ │ │ │ ├── heart.js
│ │ │ │ ├── logo.js
│ │ │ │ └── mesh.js
│ │ │ ├── main.js
│ │ │ └── vendor/
│ │ │ ├── fss/
│ │ │ │ ├── Color.js
│ │ │ │ ├── Core.js
│ │ │ │ ├── Geometry.js
│ │ │ │ ├── Light.js
│ │ │ │ ├── Material.js
│ │ │ │ ├── Math.js
│ │ │ │ ├── Mesh.js
│ │ │ │ ├── Object.js
│ │ │ │ ├── Plane.js
│ │ │ │ ├── Renderer.js
│ │ │ │ ├── SVGRenderer.js
│ │ │ │ ├── Scene.js
│ │ │ │ ├── Triangle.js
│ │ │ │ ├── Vector3.js
│ │ │ │ ├── Vector4.js
│ │ │ │ └── Vertex.js
│ │ │ ├── fss.js
│ │ │ ├── require.js
│ │ │ ├── snap.svg-min.js
│ │ │ └── snap.svg.js
│ │ └── sass/
│ │ └── screen.scss
│ ├── snap-mascot/
│ │ ├── crocodile-1.html
│ │ ├── crocodile-2.html
│ │ ├── index.html
│ │ ├── snap-logo.html
│ │ └── style.css
│ └── tutorial/
│ ├── 1.html
│ ├── 2.html
│ ├── 3.html
│ ├── 4.html
│ ├── index.html
│ └── tutorial.html
├── dist/
│ ├── snap.svg-min.js
│ └── snap.svg.js
├── doc/
│ ├── css/
│ │ ├── dr.css
│ │ ├── main.css
│ │ ├── prism.css
│ │ └── topcoat-desktop-light.css
│ ├── fonts/
│ │ └── stylesheet.css
│ ├── js/
│ │ └── prism.js
│ └── reference.html
├── dr.json
├── history.md
├── package.json
├── src/
│ ├── align.js
│ ├── amd-banner.js
│ ├── amd-footer.js
│ ├── animation.js
│ ├── attr.js
│ ├── attradd.js
│ ├── class.js
│ ├── colors.js
│ ├── copy.js
│ ├── element.js
│ ├── equal.js
│ ├── filter.js
│ ├── matrix.js
│ ├── mina.js
│ ├── mouse.js
│ ├── paper.js
│ ├── path.js
│ ├── set.js
│ └── svg.js
├── template.dot
└── test/
├── attradd.js
├── attrs.js
├── class.js
├── colors.js
├── element.js
├── filter.js
├── gradients.js
├── matrix.js
├── mina.js
├── paper.js
├── path.js
├── primitives.js
├── res/
│ └── file-for-ajax.txt
├── set.js
├── snap-tests.js
├── system.js
├── test.html
└── test.js
SYMBOL INDEX (724 symbols across 28 files)
FILE: demos/animated-game/js/seedrandom.js
function ARC4 (line 197) | function ARC4(key) {
function flatten (line 233) | function flatten(obj, depth) {
function mixkey (line 248) | function mixkey(seed, key) {
function autoseed (line 262) | function autoseed(seed) {
function tostring (line 276) | function tostring(a) {
FILE: demos/animated-game/js/snap.svg.js
function parse (line 755) | function parse(s) {
function at (line 773) | function at(s, i) {
function on (line 777) | function on(name, f) {
function event (line 783) | function event(name, data, extra) {
function end (line 795) | function end() {
function step (line 1072) | function step(c, n, p) {
function elemental (line 1077) | function elemental(type, ent) {
function Snap (line 1129) | function Snap(w, h) {
function $ (line 1190) | function $(el, attr) {
function getAttrs (line 1221) | function getAttrs(el) {
function is (line 1236) | function is(o, type) {
function onerror (line 1295) | function onerror() {
function clone (line 1312) | function clone(obj) {
function repush (line 1323) | function repush(array, item) {
function cacher (line 1328) | function cacher(f, scope, postprocessor) {
function angle (line 1346) | function angle(x1, y1, x2, y2, x3, y3) {
function rad (line 1358) | function rad(deg) {
function deg (line 1361) | function deg(rad) {
function x_y (line 1364) | function x_y() {
function x_y_w_h (line 1367) | function x_y_w_h() {
function Matrix (line 1446) | function Matrix(a, b, c, d, e, f) {
function norm (line 1617) | function norm(a) {
function normalize (line 1620) | function normalize(a) {
function svgTransform2string (line 2224) | function svgTransform2string(tstr) {
function transform2matrix (line 2251) | function transform2matrix(tstr, bbox) {
function extractTransform (line 2321) | function extractTransform(el, tstr) {
function getSomeDefs (line 2362) | function getSomeDefs(el) {
function unit2px (line 2378) | function unit2px(el, name, value) {
function add2group (line 2489) | function add2group(list) {
function Element (line 2511) | function Element(el) {
function arrayFirstValue (line 2544) | function arrayFirstValue(arr) {
function fixids (line 2925) | function fixids(el) {
function slice (line 3103) | function slice(from, to, f) {
function toString (line 3359) | function toString(type) {
function Fragment (line 3419) | function Fragment(frag) {
function make (line 3464) | function make(name, parent) {
function Paper (line 3472) | function Paper(w, h) {
function wrap (line 3509) | function wrap(dom) {
function Gstops (line 3522) | function Gstops() {
function GaddStop (line 3525) | function GaddStop(color, offset) {
function GgetBBox (line 3539) | function GgetBBox() {
function gradient (line 3553) | function gradient(defs, str) {
function gradientLinear (line 3594) | function gradientLinear(defs, x1, y1, x2, y2) {
function gradientRadial (line 3609) | function gradientRadial(defs, cx, cy, r, fx, fy) {
function fillStroke (line 4168) | function fillStroke(name) {
function getter (line 4736) | function getter(end) {
function setter (line 4747) | function setter(end) {
function textExtract (line 4784) | function textExtract(node) {
function paths (line 4870) | function paths(ps) {
function box (line 4887) | function box(x, y, width, height) {
function toString (line 4915) | function toString() {
function pathClone (line 4918) | function pathClone(pathArray) {
function getPointAtSegmentLength (line 4923) | function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y,...
function getLengthFactory (line 4931) | function getLengthFactory(istotal, subpath) {
function findDotsAtSegment (line 4995) | function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function bezierBBox (line 5023) | function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function isPointInsideBBox (line 5035) | function isPointInsideBBox(bbox, x, y) {
function isBBoxIntersect (line 5041) | function isBBoxIntersect(bbox1, bbox2) {
function base3 (line 5057) | function base3(t, p1, p2, p3, p4) {
function bezlen (line 5062) | function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
function getTotLen (line 5081) | function getTotLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
function intersect (line 5098) | function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
function inter (line 5132) | function inter(bez1, bez2) {
function interCount (line 5135) | function interCount(bez1, bez2) {
function interHelper (line 5138) | function interHelper(bez1, bez2, justCount) {
function pathIntersection (line 5193) | function pathIntersection(path1, path2) {
function pathIntersectionNumber (line 5196) | function pathIntersectionNumber(path1, path2) {
function interPathHelper (line 5199) | function interPathHelper(path1, path2, justCount) {
function isPointInsidePath (line 5252) | function isPointInsidePath(path, x, y) {
function pathBBox (line 5257) | function pathBBox(path) {
function rectPath (line 5294) | function rectPath(x, y, w, h, r) {
function ellipsePath (line 5313) | function ellipsePath(x, y, rx, ry, a) {
function pathToRelative (line 5376) | function pathToRelative(pathArray) {
function pathToAbsolute (line 5456) | function pathToAbsolute(pathArray) {
function l2c (line 5581) | function l2c(x1, y1, x2, y2) {
function q2c (line 5584) | function q2c(x1, y1, ax, ay, x2, y2) {
function a2c (line 5596) | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, ...
function findDotAtSegment (line 5685) | function findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function curveDim (line 5692) | function curveDim(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function path2curve (line 5735) | function path2curve(path, path2) {
function mapPath (line 5834) | function mapPath(path, matrix) {
function catmullRom2bezier (line 5853) | function catmullRom2bezier(crp, z) {
function getEmpty (line 6412) | function getEmpty(item) {
function equaliseTransform (line 6431) | function equaliseTransform(t1, t2, getBBox) {
function getNumber (line 6466) | function getNumber(val) {
function getUnit (line 6469) | function getUnit(unit) {
function getColour (line 6474) | function getColour(clr) {
function getPath (line 6477) | function getPath(path) {
function path2array (line 6490) | function path2array(path) {
function start (line 6981) | function start(e) {
FILE: demos/snap-ad/site/js/main.js
function Snap (line 780) | function Snap(w, h) {
function $ (line 844) | function $(el, attr) {
function getAttrs (line 880) | function getAttrs(el) {
function is (line 895) | function is(o, type) {
function onerror (line 954) | function onerror() {
function clone (line 971) | function clone(obj) {
function repush (line 982) | function repush(array, item) {
function cacher (line 987) | function cacher(f, scope, postprocessor) {
function angle (line 1005) | function angle(x1, y1, x2, y2, x3, y3) {
function rad (line 1017) | function rad(deg) {
function deg (line 1020) | function deg(rad) {
function x_y (line 1023) | function x_y() {
function x_y_w_h (line 1026) | function x_y_w_h() {
function Matrix (line 1105) | function Matrix(a, b, c, d, e, f) {
function norm (line 1275) | function norm(a) {
function normalize (line 1278) | function normalize(a) {
function svgTransform2string (line 1876) | function svgTransform2string(tstr) {
function transform2matrix (line 1904) | function transform2matrix(tstr, bbox) {
function extractTransform (line 1973) | function extractTransform(el, tstr) {
function getSomeDefs (line 2027) | function getSomeDefs(el) {
function unit2px (line 2045) | function unit2px(el, name, value) {
function add2group (line 2156) | function add2group(list) {
function Element (line 2179) | function Element(el) {
function arrayFirstValue (line 2206) | function arrayFirstValue(arr) {
function fixids (line 2643) | function fixids(el) {
function slice (line 2821) | function slice(from, to, f) {
function toString (line 3091) | function toString(type) {
function Fragment (line 3152) | function Fragment(frag) {
function make (line 3197) | function make(name, parent) {
function Paper (line 3204) | function Paper(w, h) {
function wrap (line 3241) | function wrap(dom) {
function Gstops (line 3254) | function Gstops() {
function GaddStop (line 3257) | function GaddStop(color, offset) {
function GgetBBox (line 3271) | function GgetBBox() {
function gradient (line 3285) | function gradient(defs, str) {
function gradientLinear (line 3326) | function gradientLinear(defs, x1, y1, x2, y2) {
function gradientRadial (line 3341) | function gradientRadial(defs, cx, cy, r, fx, fy) {
function fillStroke (line 3926) | function fillStroke(name) {
function getter (line 4225) | function getter(end) {
function setter (line 4236) | function setter(end) {
function textExtract (line 4273) | function textExtract(node) {
function paths (line 4422) | function paths(ps) {
function box (line 4439) | function box(x, y, width, height) {
function toString (line 4467) | function toString() {
function pathClone (line 4470) | function pathClone(pathArray) {
function getPointAtSegmentLength (line 4475) | function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y,...
function getLengthFactory (line 4483) | function getLengthFactory(istotal, subpath) {
function findDotsAtSegment (line 4547) | function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function bezierBBox (line 4575) | function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function isPointInsideBBox (line 4587) | function isPointInsideBBox(bbox, x, y) {
function isBBoxIntersect (line 4593) | function isBBoxIntersect(bbox1, bbox2) {
function base3 (line 4609) | function base3(t, p1, p2, p3, p4) {
function bezlen (line 4614) | function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
function getTotLen (line 4633) | function getTotLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
function intersect (line 4650) | function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
function inter (line 4684) | function inter(bez1, bez2) {
function interCount (line 4687) | function interCount(bez1, bez2) {
function interHelper (line 4690) | function interHelper(bez1, bez2, justCount) {
function pathIntersection (line 4745) | function pathIntersection(path1, path2) {
function pathIntersectionNumber (line 4748) | function pathIntersectionNumber(path1, path2) {
function interPathHelper (line 4751) | function interPathHelper(path1, path2, justCount) {
function isPointInsidePath (line 4804) | function isPointInsidePath(path, x, y) {
function pathBBox (line 4809) | function pathBBox(path) {
function rectPath (line 4846) | function rectPath(x, y, w, h, r) {
function ellipsePath (line 4865) | function ellipsePath(x, y, rx, ry, a) {
function pathToRelative (line 4939) | function pathToRelative(pathArray) {
function pathToAbsolute (line 5019) | function pathToAbsolute(pathArray) {
function l2c (line 5144) | function l2c(x1, y1, x2, y2) {
function q2c (line 5147) | function q2c(x1, y1, ax, ay, x2, y2) {
function a2c (line 5159) | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, ...
function findDotAtSegment (line 5248) | function findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function curveDim (line 5255) | function curveDim(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function path2curve (line 5298) | function path2curve(path, path2) {
function mapPath (line 5397) | function mapPath(path, matrix) {
function catmullRom2bezier (line 5416) | function catmullRom2bezier(crp, z) {
function getEmpty (line 5981) | function getEmpty(item) {
function equaliseTransform (line 6000) | function equaliseTransform(t1, t2, getBBox) {
function getNumber (line 6035) | function getNumber(val) {
function getUnit (line 6038) | function getUnit(unit) {
function getColour (line 6043) | function getColour(clr) {
function getPath (line 6046) | function getPath(path) {
function path2array (line 6059) | function path2array(path) {
function start (line 6574) | function start(e, x, y) {
function updatePath (line 6985) | function updatePath() {
function getPath (line 7005) | function getPath(n) {
function addBack (line 7051) | function addBack() {
function addScreen (line 7060) | function addScreen() {
function addKeyboard (line 7069) | function addKeyboard() {
function addGloss (line 7091) | function addGloss() {
function colorTriangle (line 8134) | function colorTriangle(j) {
function tweakMesh (line 8151) | function tweakMesh() {
function distortMesh (line 8166) | function distortMesh() {
function animate (line 8187) | function animate() {
function animateEach (line 8234) | function animateEach() {
function addHeart (line 8330) | function addHeart() {
function addComputer (line 8334) | function addComputer() {
function addBurst (line 8342) | function addBurst() {
function addMeshA (line 8346) | function addMeshA() {
function addMeshB (line 8350) | function addMeshB() {
function showMeshB (line 8355) | function showMeshB() {
function showComputer (line 8361) | function showComputer() {
function toTablet (line 8368) | function toTablet() {
function toPhone (line 8375) | function toPhone() {
function rotate (line 8382) | function rotate() {
function zoom (line 8387) | function zoom() {
function greenMesh (line 8394) | function greenMesh() {
function maskReveal (line 8408) | function maskReveal() {
function showText3 (line 8412) | function showText3() {
function hideText3 (line 8419) | function hideText3() {
function resolve (line 8431) | function resolve() {
function stop (line 8437) | function stop() {
function reset (line 8442) | function reset() {
function replay_CLICK (line 8465) | function replay_CLICK(e) {
function handle_CLICK (line 8474) | function handle_CLICK(e) {
function handle_RESIZE (line 8479) | function handle_RESIZE() {
function run (line 8491) | function run() {
function basic (line 8508) | function basic() {
function checkSVG (line 8554) | function checkSVG() {
function addFallback (line 8567) | function addFallback() {
FILE: demos/snap-ad/site/js/vendor/require.js
function isFunction (line 41) | function isFunction(it) {
function isArray (line 45) | function isArray(it) {
function each (line 53) | function each(ary, func) {
function eachReverse (line 68) | function eachReverse(ary, func) {
function hasProp (line 79) | function hasProp(obj, prop) {
function getOwn (line 83) | function getOwn(obj, prop) {
function eachProp (line 92) | function eachProp(obj, func) {
function mixin (line 107) | function mixin(target, source, force, deepStringMixin) {
function bind (line 127) | function bind(obj, fn) {
function scripts (line 133) | function scripts() {
function getGlobal (line 139) | function getGlobal(value) {
function makeError (line 158) | function makeError(id, msg, err, requireModules) {
function newContext (line 190) | function newContext(contextName) {
function getInteractiveScript (line 1881) | function getInteractiveScript() {
FILE: demos/snap-ad/src/js/app/app.js
function addHeart (line 66) | function addHeart() {
function addComputer (line 70) | function addComputer() {
function addBurst (line 78) | function addBurst() {
function addMeshA (line 82) | function addMeshA() {
function addMeshB (line 86) | function addMeshB() {
function showMeshB (line 91) | function showMeshB() {
function showComputer (line 97) | function showComputer() {
function toTablet (line 104) | function toTablet() {
function toPhone (line 111) | function toPhone() {
function rotate (line 118) | function rotate() {
function zoom (line 123) | function zoom() {
function greenMesh (line 130) | function greenMesh() {
function maskReveal (line 144) | function maskReveal() {
function showText3 (line 148) | function showText3() {
function hideText3 (line 155) | function hideText3() {
function resolve (line 167) | function resolve() {
function stop (line 173) | function stop() {
function reset (line 178) | function reset() {
function replay_CLICK (line 201) | function replay_CLICK(e) {
function handle_CLICK (line 210) | function handle_CLICK(e) {
function handle_RESIZE (line 215) | function handle_RESIZE() {
function run (line 227) | function run() {
function basic (line 244) | function basic() {
FILE: demos/snap-ad/src/js/app/device.js
function addBack (line 22) | function addBack() {
function addScreen (line 31) | function addScreen() {
function addKeyboard (line 40) | function addKeyboard() {
function addGloss (line 62) | function addGloss() {
FILE: demos/snap-ad/src/js/app/heart.js
function updatePath (line 59) | function updatePath() {
function getPath (line 79) | function getPath(n) {
FILE: demos/snap-ad/src/js/app/logo.js
function animateEach (line 29) | function animateEach() {
FILE: demos/snap-ad/src/js/app/mesh.js
function colorTriangle (line 72) | function colorTriangle(j) {
function tweakMesh (line 89) | function tweakMesh() {
function distortMesh (line 104) | function distortMesh() {
function animate (line 125) | function animate() {
FILE: demos/snap-ad/src/js/main.js
function checkSVG (line 21) | function checkSVG() {
function addFallback (line 34) | function addFallback() {
FILE: demos/snap-ad/src/js/vendor/require.js
function isFunction (line 41) | function isFunction(it) {
function isArray (line 45) | function isArray(it) {
function each (line 53) | function each(ary, func) {
function eachReverse (line 68) | function eachReverse(ary, func) {
function hasProp (line 79) | function hasProp(obj, prop) {
function getOwn (line 83) | function getOwn(obj, prop) {
function eachProp (line 92) | function eachProp(obj, func) {
function mixin (line 107) | function mixin(target, source, force, deepStringMixin) {
function bind (line 127) | function bind(obj, fn) {
function scripts (line 133) | function scripts() {
function getGlobal (line 139) | function getGlobal(value) {
function makeError (line 158) | function makeError(id, msg, err, requireModules) {
function newContext (line 190) | function newContext(contextName) {
function getInteractiveScript (line 1881) | function getInteractiveScript() {
FILE: demos/snap-ad/src/js/vendor/snap.svg-min.js
function d (line 18) | function d(a,b){if(a){if(a.tagName)return z(a);if(a instanceof u)return ...
function e (line 18) | function e(a,b){if(b){if("string"==typeof a&&(a=e(a)),"string"==typeof b...
function f (line 18) | function f(a,b){return b=K.prototype.toLowerCase.call(b),"finite"==b?isF...
function h (line 18) | function h(a){if("function"==typeof a||Object(a)!==a)return a;var b=new ...
function i (line 18) | function i(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push...
function j (line 18) | function j(a,b,c){function d(){var e=Array.prototype.slice.call(argument...
function k (line 18) | function k(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180...
function l (line 18) | function l(a){return a%360*R/180}
function m (line 18) | function m(a){return 180*a/R%360}
function n (line 18) | function n(a,b,c,d,e,f){return null==b&&"[object SVGMatrix]"==U.call(a)?...
function o (line 18) | function o(a){var b=[];return a=a.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,fu...
function p (line 18) | function p(a,b){var c=qb(a),d=new n;if(c)for(var e=0,f=c.length;f>e;e++)...
function q (line 18) | function q(a,b){if(null==b){var c=!0;if(b=a.node.getAttribute("linearGra...
function r (line 18) | function r(a){var b=d._.someDefs;if(b&&rb(b.ownerDocument.documentElemen...
function s (line 18) | function s(a,b,c){function d(a){return null==a?S:a==+a?a:(e(j,{width:a})...
function t (line 18) | function t(a){f(a,"array")||(a=Array.prototype.slice.call(arguments,0));...
function u (line 18) | function u(a){if(a.snap in hb)return hb[a.snap];var b,c=this.id=eb();try...
function v (line 18) | function v(a){for(var b,c=0,d=a.length;d>c;c++)if(b=b||a[c])return b}
function w (line 18) | function w(a){this.node=a}
function x (line 18) | function x(a,b){var c=e(a);b.appendChild(c);var d=z(c);return d.type=a,d}
function y (line 18) | function y(a,b){var c,d,f,g=y.prototype;if(a&&"svg"==a.tagName){if(a.sna...
function z (line 18) | function z(a){return a?a instanceof u||a instanceof w?a:"svg"==a.tagName...
function A (line 18) | function A(){return this.selectAll("stop")}
function B (line 18) | function B(a,b){var c=e("stop"),f={offset:+b+"%"};return a=d.color(a),f[...
function C (line 18) | function C(){if("linearGradient"==this.type){var a=e(this.node,"x1")||0,...
function D (line 18) | function D(a,c){function d(a,b){for(var c=(b-j)/(a-k),d=k;a>d;d++)h[d].o...
function E (line 18) | function E(a,b,c,d,f){var g=x("linearGradient",a);return g.stops=A,g.add...
function F (line 18) | function F(a,b,c,d,f,g){var h=x("radialGradient",a);return h.stops=A,h.a...
function G (line 18) | function G(a){return function(c){if(b.stop(),c instanceof w&&1==c.node.c...
function H (line 18) | function H(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=...
function a (line 18) | function a(){this.parentNode.removeChild(this)}
function b (line 18) | function b(a){return a[0]*a[0]+a[1]*a[1]}
function c (line 18) | function c(a){var c=N.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}
function g (line 18) | function g(a){function b(a,b){var c=e(a.node,b);c=c&&c.match(g),c=c&&c[2...
function h (line 18) | function h(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.leng...
function i (line 18) | function i(a){return function(){var b=a?"<"+this.type:"",c=this.node.att...
function a (line 19) | function a(a){return function(){b.stop();var c=I.doc.defaultView.getComp...
function c (line 19) | function c(a){return function(c){b.stop();var d="marker"+a.charAt(0).toU...
function c (line 19) | function c(a){var b=c.ps=c.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep...
function d (line 19) | function d(a,b,c,d){return null==a&&(a=b=c=d=0),null==b&&(b=a.y,c=a.widt...
function e (line 19) | function e(){return this.join(",").replace(M,"$1")}
function f (line 19) | function f(a){var b=K(a);return b.toString=e,b}
function g (line 19) | function g(a,b,c,d,e,f,g,h,j){return null==j?n(a,b,c,d,e,f,g,h):i(a,b,c,...
function h (line 19) | function h(c,d){function e(a){return+(+a).toFixed(3)}return a._.cacher(f...
function i (line 19) | function i(a,b,c,d,e,f,g,h,i){var j=1-i,k=S(j,3),l=S(j,2),m=i*i,n=m*i,o=...
function j (line 19) | function j(b,c,e,f,g,h,i,j){a.is(b,"array")||(b=[b,c,e,f,g,h,i,j]);var k...
function k (line 19) | function k(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}
function l (line 19) | function l(a,b){return a=d(a),b=d(b),k(b,a.x,a.y)||k(b,a.x2,a.y)||k(b,a....
function m (line 19) | function m(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a...
function n (line 19) | function n(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i...
function o (line 19) | function o(a,b,c,d,e,f,g,h,i){if(!(0>i||n(a,b,c,d,e,f,g,h)<i)){var j,k=1...
function p (line 19) | function p(a,b,c,d,e,f,g,h){if(!(R(a,c)<Q(e,g)||Q(a,c)>R(e,g)||R(b,d)<Q(...
function q (line 19) | function q(a,b,c){var d=j(a),e=j(b);if(!l(d,e))return c?0:[];for(var f=n...
function r (line 19) | function r(a,b){return t(a,b)}
function s (line 19) | function s(a,b){return t(a,b,1)}
function t (line 19) | function t(a,b,c){a=F(a),b=F(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0...
function u (line 19) | function u(a,b,c){var d=v(a);return k(d,b,c)&&t(a,[["M",b,c],["H",d.x2+1...
function v (line 19) | function v(a){var b=c(a);if(b.bbox)return K(b.bbox);if(!a)return d();a=F...
function w (line 19) | function w(a,b,c,d,f){if(f)return[["M",a+f,b],["l",c-2*f,0],["a",f,f,0,0...
function x (line 19) | function x(a,b,c,d,f){if(null==f&&null==d&&(d=c),null!=f)var g=Math.PI/1...
function y (line 19) | function y(b){var d=c(b),g=String.prototype.toLowerCase;if(d.rel)return ...
function z (line 19) | function z(b){var d=c(b);if(d.abs)return f(d.abs);if(J(b,"array")&&J(b&&...
function A (line 19) | function A(a,b,c,d){return[a,b,c,d,c,d]}
function B (line 19) | function B(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g...
function C (line 19) | function C(b,c,d,e,f,g,h,i,j,k){var l,m=120*P/180,n=P/180*(+f||0),o=[],p...
function D (line 19) | function D(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:S(j,3)*a+3*S(j,2)*i*c+3...
function E (line 19) | function E(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),...
function F (line 19) | function F(a,b){var d=!b&&c(a);if(!b&&d.curve)return f(d.curve);for(var ...
function G (line 19) | function G(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=F(a),e=0,g=a.leng...
function H (line 19) | function H(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[...
function c (line 19) | function c(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];c...
function d (line 19) | function d(b,d,e){d=l(d).replace(/\.{3}|…/g,b),b=a.parseTransformString(...
function e (line 19) | function e(a){return a}
function f (line 19) | function f(a){return function(b){return+b.toFixed(3)+a}}
function g (line 19) | function g(b){return a.rgb(b[0],b[1],b[2])}
function h (line 19) | function h(a){var b,c,d,e,f,g,h=0,i=[];for(b=0,c=a.length;c>b;b++){for(f...
function i (line 19) | function i(a){for(var b=[],c=0,d=a.length;d>c;c++)for(var e=1,f=a[c].len...
function i (line 19) | function i(i,j,k){(i.originalEvent||i).preventDefault(),this._drag.x=j,t...
FILE: demos/snap-ad/src/js/vendor/snap.svg.js
function Snap (line 779) | function Snap(w, h) {
function $ (line 843) | function $(el, attr) {
function getAttrs (line 879) | function getAttrs(el) {
function is (line 894) | function is(o, type) {
function onerror (line 953) | function onerror() {
function clone (line 970) | function clone(obj) {
function repush (line 981) | function repush(array, item) {
function cacher (line 986) | function cacher(f, scope, postprocessor) {
function angle (line 1004) | function angle(x1, y1, x2, y2, x3, y3) {
function rad (line 1016) | function rad(deg) {
function deg (line 1019) | function deg(rad) {
function x_y (line 1022) | function x_y() {
function x_y_w_h (line 1025) | function x_y_w_h() {
function Matrix (line 1104) | function Matrix(a, b, c, d, e, f) {
function norm (line 1274) | function norm(a) {
function normalize (line 1277) | function normalize(a) {
function svgTransform2string (line 1875) | function svgTransform2string(tstr) {
function transform2matrix (line 1903) | function transform2matrix(tstr, bbox) {
function extractTransform (line 1972) | function extractTransform(el, tstr) {
function getSomeDefs (line 2026) | function getSomeDefs(el) {
function unit2px (line 2044) | function unit2px(el, name, value) {
function add2group (line 2155) | function add2group(list) {
function Element (line 2178) | function Element(el) {
function arrayFirstValue (line 2205) | function arrayFirstValue(arr) {
function fixids (line 2642) | function fixids(el) {
function slice (line 2820) | function slice(from, to, f) {
function toString (line 3090) | function toString(type) {
function Fragment (line 3151) | function Fragment(frag) {
function make (line 3196) | function make(name, parent) {
function Paper (line 3203) | function Paper(w, h) {
function wrap (line 3240) | function wrap(dom) {
function Gstops (line 3253) | function Gstops() {
function GaddStop (line 3256) | function GaddStop(color, offset) {
function GgetBBox (line 3270) | function GgetBBox() {
function gradient (line 3284) | function gradient(defs, str) {
function gradientLinear (line 3325) | function gradientLinear(defs, x1, y1, x2, y2) {
function gradientRadial (line 3340) | function gradientRadial(defs, cx, cy, r, fx, fy) {
function fillStroke (line 3925) | function fillStroke(name) {
function getter (line 4224) | function getter(end) {
function setter (line 4235) | function setter(end) {
function textExtract (line 4272) | function textExtract(node) {
function paths (line 4421) | function paths(ps) {
function box (line 4438) | function box(x, y, width, height) {
function toString (line 4466) | function toString() {
function pathClone (line 4469) | function pathClone(pathArray) {
function getPointAtSegmentLength (line 4474) | function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y,...
function getLengthFactory (line 4482) | function getLengthFactory(istotal, subpath) {
function findDotsAtSegment (line 4546) | function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function bezierBBox (line 4574) | function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function isPointInsideBBox (line 4586) | function isPointInsideBBox(bbox, x, y) {
function isBBoxIntersect (line 4592) | function isBBoxIntersect(bbox1, bbox2) {
function base3 (line 4608) | function base3(t, p1, p2, p3, p4) {
function bezlen (line 4613) | function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
function getTotLen (line 4632) | function getTotLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
function intersect (line 4649) | function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
function inter (line 4683) | function inter(bez1, bez2) {
function interCount (line 4686) | function interCount(bez1, bez2) {
function interHelper (line 4689) | function interHelper(bez1, bez2, justCount) {
function pathIntersection (line 4744) | function pathIntersection(path1, path2) {
function pathIntersectionNumber (line 4747) | function pathIntersectionNumber(path1, path2) {
function interPathHelper (line 4750) | function interPathHelper(path1, path2, justCount) {
function isPointInsidePath (line 4803) | function isPointInsidePath(path, x, y) {
function pathBBox (line 4808) | function pathBBox(path) {
function rectPath (line 4845) | function rectPath(x, y, w, h, r) {
function ellipsePath (line 4864) | function ellipsePath(x, y, rx, ry, a) {
function pathToRelative (line 4938) | function pathToRelative(pathArray) {
function pathToAbsolute (line 5018) | function pathToAbsolute(pathArray) {
function l2c (line 5143) | function l2c(x1, y1, x2, y2) {
function q2c (line 5146) | function q2c(x1, y1, ax, ay, x2, y2) {
function a2c (line 5158) | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, ...
function findDotAtSegment (line 5247) | function findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function curveDim (line 5254) | function curveDim(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function path2curve (line 5297) | function path2curve(path, path2) {
function mapPath (line 5396) | function mapPath(path, matrix) {
function catmullRom2bezier (line 5415) | function catmullRom2bezier(crp, z) {
function getEmpty (line 5980) | function getEmpty(item) {
function equaliseTransform (line 5999) | function equaliseTransform(t1, t2, getBBox) {
function getNumber (line 6034) | function getNumber(val) {
function getUnit (line 6037) | function getUnit(unit) {
function getColour (line 6042) | function getColour(clr) {
function getPath (line 6045) | function getPath(path) {
function path2array (line 6058) | function path2array(path) {
function start (line 6573) | function start(e, x, y) {
FILE: dist/snap.svg-min.js
function c (line 19) | function c(a,b){if(a){if(a.nodeType)return w(a);if(e(a,"array")&&c.set)r...
function d (line 19) | function d(a,b){if(b){if("#text"==a&&(a=y.doc.createTextNode(b.text||b["...
function e (line 19) | function e(a,b){return b=A.prototype.toLowerCase.call(b),"finite"==b?isF...
function f (line 19) | function f(a){if("function"==typeof a||Object(a)!==a)return a;var b=new ...
function h (line 19) | function h(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push...
function i (line 19) | function i(a,b,c){function d(){var e=Array.prototype.slice.call(argument...
function j (line 19) | function j(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180...
function k (line 19) | function k(a){return a%360*H/180}
function l (line 19) | function l(a){return 180*a/H%360}
function m (line 19) | function m(a){var b=[];return a=a.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,fu...
function n (line 19) | function n(a,b){var d=aa(a),e=new c.Matrix;if(d)for(var f=0,g=d.length;g...
function o (line 19) | function o(a){var b=a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||a...
function p (line 19) | function p(a){return a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||...
function q (line 19) | function q(a,b,c){function e(a){if(null==a)return I;if(a==+a)return a;d(...
function r (line 19) | function r(a){e(a,"array")||(a=Array.prototype.slice.call(arguments,0));...
function s (line 19) | function s(a){if(a.snap in V)return V[a.snap];var b;try{b=a.ownerSVGElem...
function t (line 19) | function t(a){this.node=a}
function u (line 19) | function u(a,b){var c=d(a);b.appendChild(c);var e=w(c);return e}
function v (line 19) | function v(a,b){var c,e,f,g=v.prototype;if(a&&a.tagName&&"svg"==a.tagNam...
function w (line 19) | function w(a){return a?a instanceof s||a instanceof t?a:a.tagName&&"svg"...
function x (line 19) | function x(a,b){for(var c=0,d=a.length;d>c;c++){var e={type:a[c].type,at...
function d (line 19) | function d(a){var d=a.x-b,e=a.y-c;return d*d+e*e}
function h (line 19) | function h(a,b){if(null==b){var d=!0;if(b="linearGradient"==a.type||"rad...
function i (line 19) | function i(a){function b(a,b){var d=o(a.node,b);d=d&&d.match(g),d=d&&d[2...
function j (line 19) | function j(a){return function(){var b=a?"<"+this.type:"",c=this.node.att...
function h (line 20) | function h(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.leng...
function f (line 20) | function f(a,b,c,d,e,f){return null==b&&"[object SVGMatrix]"==g.call(a)?...
function c (line 20) | function c(a){return a[0]*a[0]+a[1]*a[1]}
function d (line 20) | function d(a){var b=i.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}
function g (line 20) | function g(d){return function(e){if(b.stop(),e instanceof f&&1==e.node.c...
function h (line 20) | function h(a){b.stop(),a==+a&&(a+="px"),this.node.style.fontSize=a}
function i (line 20) | function i(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=...
function j (line 20) | function j(){return b.stop(),this.node.style.fontSize}
function b (line 20) | function b(a,b){for(var c=(b-h)/(a-i),d=i;a>d;d++)f[d].offset=+(+h+c*(d-...
function c (line 20) | function c(c){return function(){b.stop();var d=e.doc.defaultView.getComp...
function d (line 20) | function d(a){return function(c){b.stop();var d="marker"+a.charAt(0).toU...
function g (line 20) | function g(a){return a}
function h (line 20) | function h(a){return function(b){return+b.toFixed(3)+a}}
function a (line 20) | function a(){this.parentNode.removeChild(this)}
function d (line 20) | function d(){return this.selectAll("stop")}
function e (line 20) | function e(a,b){var d=l("stop"),e={offset:+b+"%"};a=c.color(a),e["stop-c...
function f (line 20) | function f(){if("linearGradient"==this.type){var a=l(this.node,"x1")||0,...
function g (line 20) | function g(a){var d=a,e=this.stops();if("string"==typeof a&&(d=b("snap.u...
function i (line 20) | function i(a,c){var d,e=b("snap.util.grad.parse",null,c).firstDefined();...
function j (line 20) | function j(a,b,h,i,j){var k=c._.make("linearGradient",a);return k.stops=...
function k (line 20) | function k(a,b,g,h,i,j){var k=c._.make("radialGradient",a);return k.stop...
function e (line 20) | function e(a){var b=e.ps=e.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep...
function f (line 20) | function f(a,b,c,d){return null==a&&(a=b=c=d=0),null==b&&(b=a.y,c=a.widt...
function g (line 20) | function g(){return this.join(",").replace(N,"$1")}
function h (line 20) | function h(a){var b=L(a);return b.toString=g,b}
function i (line 20) | function i(a,b,c,d,e,f,g,h,i){return null==i?p(a,b,c,d,e,f,g,h):k(a,b,c,...
function j (line 20) | function j(c,d){function e(a){return+(+a).toFixed(3)}return a._.cacher(f...
function k (line 20) | function k(a,b,c,d,e,f,g,h,i){var j=1-i,k=T(j,3),l=T(j,2),m=i*i,n=m*i,o=...
function l (line 20) | function l(b,c,d,e,g,h,i,j){a.is(b,"array")||(b=[b,c,d,e,g,h,i,j]);var k...
function m (line 20) | function m(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}
function n (line 20) | function n(a,b){return a=f(a),b=f(b),m(b,a.x,a.y)||m(b,a.x2,a.y)||m(b,a....
function o (line 20) | function o(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a...
function p (line 20) | function p(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i...
function q (line 20) | function q(a,b,c,d,e,f,g,h,i){if(!(0>i||p(a,b,c,d,e,f,g,h)<i)){var j,k=1...
function r (line 20) | function r(a,b,c,d,e,f,g,h){if(!(S(a,c)<R(e,g)||R(a,c)>S(e,g)||S(b,d)<R(...
function s (line 20) | function s(a,b,c){var d=l(a),e=l(b);if(!n(d,e))return c?0:[];for(var f=p...
function t (line 20) | function t(a,b){return v(a,b)}
function u (line 20) | function u(a,b){return v(a,b,1)}
function v (line 20) | function v(a,b,c){a=G(a),b=G(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0...
function w (line 20) | function w(a,b,c){var d=x(a);return m(d,b,c)&&v(a,[["M",b,c],["H",d.x2+1...
function x (line 20) | function x(a){var b=e(a);if(b.bbox)return L(b.bbox);if(!a)return f();a=G...
function y (line 20) | function y(a,b,c,d,e){if(e)return[["M",+a+ +e,b],["l",c-2*e,0],["a",e,e,...
function z (line 20) | function z(a,b,c,d,e){if(null==e&&null==d&&(d=c),a=+a,b=+b,c=+c,d=+d,nul...
function A (line 20) | function A(b){var c=e(b),d=String.prototype.toLowerCase;if(c.rel)return ...
function B (line 20) | function B(b){var c=e(b);if(c.abs)return h(c.abs);if(K(b,"array")&&K(b&&...
function C (line 20) | function C(a,b,c,d){return[a,b,c,d,c,d]}
function D (line 20) | function D(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g...
function E (line 20) | function E(b,c,d,e,f,g,h,i,j,k){var l,m=120*Q/180,n=Q/180*(+f||0),o=[],p...
function F (line 20) | function F(a,b,c,d,e,f,g,h){for(var i,j,k,l,m,n,o,p,q=[],r=[[],[]],s=0;2...
function G (line 20) | function G(a,b){var c=!b&&e(a);if(!b&&c.curve)return h(c.curve);for(var ...
function H (line 20) | function H(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=G(a),e=0,g=a.leng...
function I (line 20) | function I(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[...
function f (line 21) | function f(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];c...
function g (line 21) | function g(b,c,d){b=b||new a.Matrix,c=c||new a.Matrix,b=a.parseTransform...
function h (line 21) | function h(a){return a}
function i (line 21) | function i(a){return function(b){return+b.toFixed(3)+a}}
function j (line 21) | function j(a){return a.join(" ")}
function k (line 21) | function k(b){return a.rgb(b[0],b[1],b[2],b[3])}
function l (line 21) | function l(a){var b,c,d,e,f,g,h=0,i=[];for(b=0,c=a.length;c>b;b++){for(f...
function m (line 21) | function m(a){for(var b=[],c=0,d=a.length;d>c;c++)for(var e=1,f=a[c].len...
function n (line 21) | function n(a){return isFinite(a)}
function o (line 21) | function o(b,c){return a.is(b,"array")&&a.is(c,"array")?b.toString()==c....
function i (line 21) | function i(i,j,l){(i.originalEvent||i).preventDefault(),k._drag.x=j,k._d...
function j (line 21) | function j(a,c,d){b("snap.draginit."+k.id,k,a,c,d)}
function f (line 21) | function f(a){a=a.split(/(?=#)/);var b=new String(a[5]);return b[50]=a[0...
FILE: dist/snap.svg.js
function Snap (line 888) | function Snap(w, h) {
function $ (line 965) | function $(el, attr) {
function getAttrs (line 1016) | function getAttrs(el) {
function is (line 1031) | function is(o, type) {
function clone (line 1089) | function clone(obj) {
function repush (line 1100) | function repush(array, item) {
function cacher (line 1105) | function cacher(f, scope, postprocessor) {
function angle (line 1123) | function angle(x1, y1, x2, y2, x3, y3) {
function rad (line 1135) | function rad(deg) {
function deg (line 1138) | function deg(rad) {
function x_y (line 1141) | function x_y() {
function x_y_w_h (line 1144) | function x_y_w_h() {
function distance2 (line 1303) | function distance2(p) {
function svgTransform2string (line 1894) | function svgTransform2string(tstr) {
function transform2matrix (line 1924) | function transform2matrix(tstr, bbox) {
function getSomeDefs (line 2015) | function getSomeDefs(el) {
function getSomeSVG (line 2027) | function getSomeSVG(el) {
function unit2px (line 2032) | function unit2px(el, name, value) {
function add2group (line 2153) | function add2group(list) {
function Element (line 2186) | function Element(el) {
function Fragment (line 2321) | function Fragment(frag) {
function make (line 2351) | function make(name, parent) {
function Paper (line 2357) | function Paper(w, h) {
function wrap (line 2395) | function wrap(dom) {
function jsonFiller (line 2456) | function jsonFiller(root, o) {
function extractTransform (line 2809) | function extractTransform(el, tstr) {
function fixids (line 3192) | function fixids(el) {
function toString (line 3459) | function toString(type) {
function slice (line 3533) | function slice(from, to, f) {
function Matrix (line 3741) | function Matrix(a, b, c, d, e, f) {
function norm (line 3971) | function norm(a) {
function normalize (line 3974) | function normalize(a) {
function fillStroke (line 4185) | function fillStroke(name) {
function seed (line 4264) | function seed(i, end) {
function setFontSize (line 4413) | function setFontSize(value) {
function getter (line 4434) | function getter(end) {
function setter (line 4445) | function setter(end) {
function textExtract (line 4482) | function textExtract(node) {
function getFontSize (line 4553) | function getFontSize() {
function getNumber (line 4740) | function getNumber(val) {
function getUnit (line 4743) | function getUnit(unit) {
function onerror (line 4885) | function onerror() {
function Gstops (line 5321) | function Gstops() {
function GaddStop (line 5334) | function GaddStop(color, offset) {
function GgetBBox (line 5360) | function GgetBBox() {
function GsetStops (line 5385) | function GsetStops(str) {
function gradient (line 5412) | function gradient(defs, str) {
function gradientLinear (line 5437) | function gradientLinear(defs, x1, y1, x2, y2) {
function gradientRadial (line 5453) | function gradientRadial(defs, cx, cy, r, fx, fy) {
function paths (line 5599) | function paths(ps) {
function box (line 5616) | function box(x, y, width, height) {
function toString (line 5644) | function toString() {
function pathClone (line 5647) | function pathClone(pathArray) {
function getPointAtSegmentLength (line 5652) | function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y,...
function getLengthFactory (line 5660) | function getLengthFactory(istotal, subpath) {
function findDotsAtSegment (line 5724) | function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function bezierBBox (line 5752) | function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function isPointInsideBBox (line 5764) | function isPointInsideBBox(bbox, x, y) {
function isBBoxIntersect (line 5770) | function isBBoxIntersect(bbox1, bbox2) {
function base3 (line 5786) | function base3(t, p1, p2, p3, p4) {
function bezlen (line 5791) | function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
function getTotLen (line 5810) | function getTotLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
function intersect (line 5827) | function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
function inter (line 5861) | function inter(bez1, bez2) {
function interCount (line 5864) | function interCount(bez1, bez2) {
function interHelper (line 5867) | function interHelper(bez1, bez2, justCount) {
function pathIntersection (line 5922) | function pathIntersection(path1, path2) {
function pathIntersectionNumber (line 5925) | function pathIntersectionNumber(path1, path2) {
function interPathHelper (line 5928) | function interPathHelper(path1, path2, justCount) {
function isPointInsidePath (line 5981) | function isPointInsidePath(path, x, y) {
function pathBBox (line 5986) | function pathBBox(path) {
function rectPath (line 6023) | function rectPath(x, y, w, h, r) {
function ellipsePath (line 6042) | function ellipsePath(x, y, rx, ry, a) {
function pathToRelative (line 6104) | function pathToRelative(pathArray) {
function pathToAbsolute (line 6184) | function pathToAbsolute(pathArray) {
function l2c (line 6309) | function l2c(x1, y1, x2, y2) {
function q2c (line 6312) | function q2c(x1, y1, ax, ay, x2, y2) {
function a2c (line 6324) | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, ...
function findDotAtSegment (line 6416) | function findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function curveDim (line 6428) | function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {
function path2curve (line 6490) | function path2curve(path, path2) {
function mapPath (line 6632) | function mapPath(path, matrix) {
function catmullRom2bezier (line 6651) | function catmullRom2bezier(crp, z) {
function getEmpty (line 7421) | function getEmpty(item) {
function equaliseTransform (line 7440) | function equaliseTransform(t1, t2, getBBox) {
function getNumber (line 7476) | function getNumber(val) {
function getUnit (line 7479) | function getUnit(unit) {
function getViewBox (line 7484) | function getViewBox(val) {
function getColour (line 7487) | function getColour(clr) {
function getPath (line 7490) | function getPath(path) {
function path2array (line 7503) | function path2array(path) {
function isNumeric (line 7512) | function isNumeric(obj) {
function arrayEqual (line 7515) | function arrayEqual(arr1, arr2) {
function start (line 8028) | function start(e, x, y) {
function init (line 8040) | function init(e, x, y) {
function saveColor (line 8551) | function saveColor(colors) {
FILE: src/animation.js
function slice (line 19) | function slice(from, to, f) {
FILE: src/attr.js
function fillStroke (line 93) | function fillStroke(name) {
function seed (line 172) | function seed(i, end) {
function setFontSize (line 321) | function setFontSize(value) {
function getter (line 342) | function getter(end) {
function setter (line 353) | function setter(end) {
function textExtract (line 390) | function textExtract(node) {
function getFontSize (line 461) | function getFontSize() {
FILE: src/attradd.js
function getNumber (line 32) | function getNumber(val) {
function getUnit (line 35) | function getUnit(unit) {
FILE: src/colors.js
function saveColor (line 53) | function saveColor(colors) {
FILE: src/element.js
function extractTransform (line 92) | function extractTransform(el, tstr) {
function fixids (line 475) | function fixids(el) {
function toString (line 742) | function toString(type) {
FILE: src/equal.js
function getEmpty (line 19) | function getEmpty(item) {
function equaliseTransform (line 38) | function equaliseTransform(t1, t2, getBBox) {
function getNumber (line 74) | function getNumber(val) {
function getUnit (line 77) | function getUnit(unit) {
function getViewBox (line 82) | function getViewBox(val) {
function getColour (line 85) | function getColour(clr) {
function getPath (line 88) | function getPath(path) {
function path2array (line 101) | function path2array(path) {
function isNumeric (line 110) | function isNumeric(obj) {
function arrayEqual (line 113) | function arrayEqual(arr1, arr2) {
FILE: src/matrix.js
function Matrix (line 19) | function Matrix(a, b, c, d, e, f) {
function norm (line 249) | function norm(a) {
function normalize (line 252) | function normalize(a) {
FILE: src/mouse.js
function start (line 428) | function start(e, x, y) {
function init (line 440) | function init(e, x, y) {
FILE: src/paper.js
function onerror (line 87) | function onerror() {
function Gstops (line 523) | function Gstops() {
function GaddStop (line 536) | function GaddStop(color, offset) {
function GgetBBox (line 562) | function GgetBBox() {
function GsetStops (line 587) | function GsetStops(str) {
function gradient (line 614) | function gradient(defs, str) {
function gradientLinear (line 639) | function gradientLinear(defs, x1, y1, x2, y2) {
function gradientRadial (line 655) | function gradientRadial(defs, cx, cy, r, fx, fy) {
FILE: src/path.js
function paths (line 27) | function paths(ps) {
function box (line 44) | function box(x, y, width, height) {
function toString (line 72) | function toString() {
function pathClone (line 75) | function pathClone(pathArray) {
function getPointAtSegmentLength (line 80) | function getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y,...
function getLengthFactory (line 88) | function getLengthFactory(istotal, subpath) {
function findDotsAtSegment (line 152) | function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function bezierBBox (line 180) | function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
function isPointInsideBBox (line 192) | function isPointInsideBBox(bbox, x, y) {
function isBBoxIntersect (line 198) | function isBBoxIntersect(bbox1, bbox2) {
function base3 (line 214) | function base3(t, p1, p2, p3, p4) {
function bezlen (line 219) | function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
function getTotLen (line 238) | function getTotLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
function intersect (line 255) | function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
function inter (line 289) | function inter(bez1, bez2) {
function interCount (line 292) | function interCount(bez1, bez2) {
function interHelper (line 295) | function interHelper(bez1, bez2, justCount) {
function pathIntersection (line 350) | function pathIntersection(path1, path2) {
function pathIntersectionNumber (line 353) | function pathIntersectionNumber(path1, path2) {
function interPathHelper (line 356) | function interPathHelper(path1, path2, justCount) {
function isPointInsidePath (line 409) | function isPointInsidePath(path, x, y) {
function pathBBox (line 414) | function pathBBox(path) {
function rectPath (line 451) | function rectPath(x, y, w, h, r) {
function ellipsePath (line 470) | function ellipsePath(x, y, rx, ry, a) {
function pathToRelative (line 532) | function pathToRelative(pathArray) {
function pathToAbsolute (line 612) | function pathToAbsolute(pathArray) {
function l2c (line 737) | function l2c(x1, y1, x2, y2) {
function q2c (line 740) | function q2c(x1, y1, ax, ay, x2, y2) {
function a2c (line 752) | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, ...
function findDotAtSegment (line 844) | function findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
function curveDim (line 856) | function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {
function path2curve (line 918) | function path2curve(path, path2) {
function mapPath (line 1060) | function mapPath(path, matrix) {
function catmullRom2bezier (line 1079) | function catmullRom2bezier(crp, z) {
FILE: src/svg.js
function Snap (line 33) | function Snap(w, h) {
function $ (line 110) | function $(el, attr) {
function getAttrs (line 161) | function getAttrs(el) {
function is (line 176) | function is(o, type) {
function clone (line 234) | function clone(obj) {
function repush (line 245) | function repush(array, item) {
function cacher (line 250) | function cacher(f, scope, postprocessor) {
function angle (line 268) | function angle(x1, y1, x2, y2, x3, y3) {
function rad (line 280) | function rad(deg) {
function deg (line 283) | function deg(rad) {
function x_y (line 286) | function x_y() {
function x_y_w_h (line 289) | function x_y_w_h() {
function distance2 (line 449) | function distance2(p) {
function svgTransform2string (line 1040) | function svgTransform2string(tstr) {
function transform2matrix (line 1070) | function transform2matrix(tstr, bbox) {
function getSomeDefs (line 1161) | function getSomeDefs(el) {
function getSomeSVG (line 1173) | function getSomeSVG(el) {
function unit2px (line 1178) | function unit2px(el, name, value) {
function add2group (line 1299) | function add2group(list) {
function Element (line 1332) | function Element(el) {
function Fragment (line 1467) | function Fragment(frag) {
function make (line 1497) | function make(name, parent) {
function Paper (line 1503) | function Paper(w, h) {
function wrap (line 1541) | function wrap(dom) {
function jsonFiller (line 1602) | function jsonFiller(root, o) {
FILE: test/attrs.js
function colorTestProp (line 10) | function colorTestProp(key) {
function colorTestStyle (line 37) | function colorTestStyle(key) {
FILE: test/gradients.js
function getGrad (line 11) | function getGrad(el) {
Condensed preview — 124 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,555K chars).
[
{
"path": ".gitignore",
"chars": 50,
"preview": "TAGS\n*~\n_*\n.DS_Store\nnode_modules\nplayground\n*.svg"
},
{
"path": ".gitmodules",
"chars": 323,
"preview": "[submodule \"third-party/mocha\"]\n\tpath = third-party/mocha\n\turl = https://github.com/visionmedia/mocha.git\n[submodule \"th"
},
{
"path": ".travis.yml",
"chars": 218,
"preview": "language: node_js\nnode_js:\n - \"node\"\n\nsudo: true\n\nbefore_script:\n - npm install -g grunt-cli\n - npm install\n - grunt"
},
{
"path": "CONTRIBUTING",
"chars": 170,
"preview": "Contributions to this code are covered by the Adobe contributors\nlicense agreement. Developers must sign and submit the "
},
{
"path": "Gruntfile.js",
"chars": 2622,
"preview": "module.exports = function(grunt) {\n\n var pkg = grunt.file.readJSON(\"package.json\"),\n core = [\n \"./s"
},
{
"path": "LICENSE",
"chars": 11356,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "NOTICE",
"chars": 8460,
"preview": "Snap.svg is licensed under the Apache license version 2.0, January 2004 (see LICENSE file).\n\nSnap.svg uses the followin"
},
{
"path": "README.md",
"chars": 3992,
"preview": "[Snap.svg](http://snapsvg.io) · [](https"
},
{
"path": "bower.json",
"chars": 460,
"preview": "{\n \"name\": \"Snap.svg\",\n \"version\": \"0.5.1\",\n \"homepage\": \"http://snapsvg.io\",\n \"authors\": [\n \"Dmitry Baranovskiy "
},
{
"path": "component.json",
"chars": 330,
"preview": "{\n \"name\": \"Snap.svg\",\n \"repo\": \"adobe-webplatform/Snap.svg\",\n \"description\": \"The JavaScript library for modern SVG "
},
{
"path": "demos/animated-game/index.html",
"chars": 95855,
"preview": "<!doctype html>\n<html lang=\"en\">\n\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t <meta name=\"copyright\" content=\"Copyright © 2013"
},
{
"path": "demos/animated-game/js/backbone.js",
"chars": 59594,
"preview": "// Backbone.js 1.0.0\n\n// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.\n// Backbone may be freely distrib"
},
{
"path": "demos/animated-game/js/main.js",
"chars": 2470,
"preview": "var WIDTH = 1024,\n HEIGHT = 720;\n console.log('oh');\n\nvar MainView = Backbone.View.extend({\n initialize: functi"
},
{
"path": "demos/animated-game/js/path-animal.js",
"chars": 2612,
"preview": "var PathAnimal = Backbone.View.extend({\n\tinitialize: function () {\n\t\tvar _x,\n\t\t\t_y,\n\t\t\tPATHS = [\n\t\t\t\t'M0,0c0,0,0-28.008,"
},
{
"path": "demos/animated-game/js/seedrandom.js",
"chars": 11541,
"preview": "// seedrandom.js version 2.2.\n// Author: David Bau\n// Date: 2013 Jun 15\n//\n// Defines a method Math.seedrandom() that, w"
},
{
"path": "demos/animated-game/js/snap.svg.js",
"chars": 234417,
"preview": "// Snap.svg 0.0.1\n// \n// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n// \n// Licensed under the A"
},
{
"path": "demos/animated-game/js/tree-face.js",
"chars": 1600,
"preview": "\nvar TreeFace = Backbone.View.extend({\n\tinitialize: function () {\n\t\tthis.s = this.options.s;\n\t\tthis.el = this.options.tr"
},
{
"path": "demos/animated-game/js/underscore.js",
"chars": 41662,
"preview": "// Underscore.js 1.4.4\n// http://underscorejs.org\n// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n// "
},
{
"path": "demos/animated-map/index.html",
"chars": 3969,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/clock/index.html",
"chars": 2953,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/illustrated-infographic-coffee/index.html",
"chars": 15807,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/pattern/index.html",
"chars": 3822,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/snap-ad/Gruntfile.js",
"chars": 2187,
"preview": "module.exports = function(grunt) {\n\n var pkg = grunt.file.readJSON(\"package.json\");\n\n // Project configuration.\n "
},
{
"path": "demos/snap-ad/README.md",
"chars": 98,
"preview": "snap-ad\n=======\n\nSnap.svg banner ad\n\nrun\n`npm install` \nto add node modules\n\n\nrun\n`grunt`\nto build"
},
{
"path": "demos/snap-ad/SnapAd.tmproj",
"chars": 2507,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "demos/snap-ad/package.json",
"chars": 405,
"preview": "{\n \"name\": \"snapad\",\n \"version\": \"0.0.1\",\n \"description\": \"snap ad\",\n \"main\": \"Gruntfile.js\",\n \"repository\": {\n "
},
{
"path": "demos/snap-ad/site/css/screen.css",
"chars": 2091,
"preview": "/* line 3, ../../src/sass/screen.scss */\n.base-font {\n font-family: 'Open Sans', serif;\n}\n\n/* line 7, ../../src/sass/sc"
},
{
"path": "demos/snap-ad/site/index.html",
"chars": 9920,
"preview": "<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\n<!--[if IE 7]> <ht"
},
{
"path": "demos/snap-ad/site/index.min.html",
"chars": 291037,
"preview": "<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\n<!--[if IE 7]> <ht"
},
{
"path": "demos/snap-ad/site/js/main.js",
"chars": 263976,
"preview": "\n// Snap.svg 0.2.0\n// \n// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n// \n// Licensed under the "
},
{
"path": "demos/snap-ad/site/js/vendor/require.js",
"chars": 81102,
"preview": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved"
},
{
"path": "demos/snap-ad/src/config.rb",
"chars": 851,
"preview": "# Require any additional compass plugins here.\n\n# Set this to the root of your project when deployed:\nhttp_path = \"/\"\ncs"
},
{
"path": "demos/snap-ad/src/css/screen.css",
"chars": 2000,
"preview": "/* line 3, ../sass/screen.scss */\n.base-font {\n font-family: 'Open Sans', serif;\n}\n\n/* line 7, ../sass/screen.scss */\n."
},
{
"path": "demos/snap-ad/src/index.html",
"chars": 10015,
"preview": "<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\n<!--[if IE 7]> <ht"
},
{
"path": "demos/snap-ad/src/js/app/app.js",
"chars": 5469,
"preview": "define(function (require) {\n\n\trequire('snap');\n\t\n\tvar App,\n\t\tHeart = require('app/heart'),\n\t\tDevice = require('app/devic"
},
{
"path": "demos/snap-ad/src/js/app/burst.js",
"chars": 777,
"preview": "define(function (require) {\n\t\n\tvar Burst = function (s, x, y) {\n\t\tvar instance = this,\n\t\t\tpolygons,\n\t\t\tmask,\n\t\t\tmaskCirc"
},
{
"path": "demos/snap-ad/src/js/app/device.js",
"chars": 4423,
"preview": "define(function (require) {\n\t\n\tvar Device = function (s, x, y) {\n\t\tvar instance = this;\n\t\t\n\t\tthis.el = s.g();\n\t\tthis.mat"
},
{
"path": "demos/snap-ad/src/js/app/heart.js",
"chars": 1878,
"preview": "define(function (require) {\n\t\n\tvar Heart = function (s, x, y) {\n\t\tvar instance = this,\n\t\t\theart,\n\t\t\theartMatrix,\n\t\t\ttota"
},
{
"path": "demos/snap-ad/src/js/app/logo.js",
"chars": 1131,
"preview": "define(function (require) {\n\t\t\n\tvar Logo = function (s) {\n\t\tvar instance = this,\n\t\t\tlogo,\n\t\t\tparts = [\n\t\t\t\t['top', 0, 20"
},
{
"path": "demos/snap-ad/src/js/app/mesh.js",
"chars": 3368,
"preview": "define(function (require) {\n\t\n\trequire('vendor/fss');\n\t\n\tvar Mesh = function (s, container, colorA, colorB) {\n\t\tvar inst"
},
{
"path": "demos/snap-ad/src/js/main.js",
"chars": 3741,
"preview": "/*global require*/\n\nrequire.config({\n shim: {\n\n },\n paths: {\n\t snap: 'vendor/snap.svg',\n\t tweenlite: 'ven"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Color.js",
"chars": 1031,
"preview": "/**\n * @class Color\n * @author Matthew Wagerfield\n */\nFSS.Color = function(hex, opacity) {\n this.rgba = FSS.Vector4.cre"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Core.js",
"chars": 1525,
"preview": "/**\n * Defines the Flat Surface Shader namespace for all the awesomeness to exist upon.\n * @author Matthew Wagerfield\n *"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Geometry.js",
"chars": 479,
"preview": "/**\n * @class Geometry\n * @author Matthew Wagerfield\n */\nFSS.Geometry = function() {\n this.vertices = [];\n this.triang"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Light.js",
"chars": 326,
"preview": "/**\n * @class Light\n * @author Matthew Wagerfield\n */\nFSS.Light = function(ambient, diffuse) {\n FSS.Object.call(this);\n"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Material.js",
"chars": 244,
"preview": "/**\n * @class Material\n * @author Matthew Wagerfield\n */\nFSS.Material = function(ambient, diffuse) {\n this.ambient = ne"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Math.js",
"chars": 326,
"preview": "/**\n * @object Math Augmentation\n * @author Matthew Wagerfield\n */\nMath.PIM2 = Math.PI*2;\nMath.PID2 = Math.PI/2;\nMath.ra"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Mesh.js",
"chars": 2028,
"preview": "/**\n * @class Mesh\n * @author Matthew Wagerfield\n */\nFSS.Mesh = function(geometry, material) {\n FSS.Object.call(this);\n"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Object.js",
"chars": 254,
"preview": "/**\n * @class Object\n * @author Matthew Wagerfield\n */\nFSS.Object = function() {\n this.position = FSS.Vector3.create();"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Plane.js",
"chars": 1233,
"preview": "/**\n * @class Plane\n * @author Matthew Wagerfield\n */\nFSS.Plane = function(width, height, segments, slices, s) {\n FSS.G"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Renderer.js",
"chars": 547,
"preview": "/**\n * @class Renderer\n * @author Matthew Wagerfield\n */\nFSS.Renderer = function() {\n this.width = 0;\n this.height = 0"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/SVGRenderer.js",
"chars": 1753,
"preview": "/**\n * @class SVG Renderer\n * @author Matthew Wagerfield\n */\nFSS.SVGRenderer = function(s) {\n FSS.Renderer.call(this);\n"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Scene.js",
"chars": 738,
"preview": "/**\n * @class Scene\n * @author Matthew Wagerfield\n */\nFSS.Scene = function() {\n this.meshes = [];\n this.lights = [];\n}"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Triangle.js",
"chars": 1293,
"preview": "/**\n * @class Triangle\n * @author Matthew Wagerfield\n */\nFSS.Triangle = function(a, b, c, s) {\n this.a = a || new FSS.V"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Vector3.js",
"chars": 4477,
"preview": "/**\n * @object Vector3\n * @author Matthew Wagerfield\n */\nFSS.Vector3 = {\n create: function(x, y, z) {\n var vector = "
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Vector4.js",
"chars": 1749,
"preview": "/**\n * @object Vector4\n * @author Matthew Wagerfield\n */\nFSS.Vector4 = {\n create: function(x, y, z, w) {\n var vector"
},
{
"path": "demos/snap-ad/src/js/vendor/fss/Vertex.js",
"chars": 268,
"preview": "/**\n * @class Vertex\n * @author Matthew Wagerfield\n */\nFSS.Vertex = function(x, y, z) {\n this.position = FSS.Vector3.cr"
},
{
"path": "demos/snap-ad/src/js/vendor/fss.js",
"chars": 19715,
"preview": "//============================================================\n//\n// Copyright (C) 2013 Matthew Wagerfield\n//\n// Twitter"
},
{
"path": "demos/snap-ad/src/js/vendor/require.js",
"chars": 81102,
"preview": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved"
},
{
"path": "demos/snap-ad/src/js/vendor/snap.svg-min.js",
"chars": 66852,
"preview": "// Snap.svg 0.2.0\n// \n// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n// \n// Licensed under the A"
},
{
"path": "demos/snap-ad/src/js/vendor/snap.svg.js",
"chars": 223169,
"preview": "// Snap.svg 0.2.0\n// \n// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n// \n// Licensed under the A"
},
{
"path": "demos/snap-ad/src/sass/screen.scss",
"chars": 941,
"preview": "@import 'compass/css3';\n\n.base-font{\n\tfont-family: 'Open Sans', serif;\n}\n\n.snap-font{\n\tfont-family: 'Source Sans Pro', s"
},
{
"path": "demos/snap-mascot/crocodile-1.html",
"chars": 9953,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/snap-mascot/crocodile-2.html",
"chars": 27319,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/snap-mascot/index.html",
"chars": 996,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/snap-mascot/snap-logo.html",
"chars": 5314,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "demos/snap-mascot/style.css",
"chars": 234,
"preview": "html {\n overflow: hidden;\n}\n\nbody {\n background: #eee;\n text-align: center;\n}\n\nsvg {\n display: inline-block;"
},
{
"path": "demos/tutorial/1.html",
"chars": 7081,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Tutorial</title>\n <link"
},
{
"path": "demos/tutorial/2.html",
"chars": 7341,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Tutorial</title>\n <link"
},
{
"path": "demos/tutorial/3.html",
"chars": 7637,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Tutorial</title>\n <link"
},
{
"path": "demos/tutorial/4.html",
"chars": 6853,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Tutorial</title>\n <link"
},
{
"path": "demos/tutorial/index.html",
"chars": 9498,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Tutorial</title>\n <link"
},
{
"path": "demos/tutorial/tutorial.html",
"chars": 1378,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Snap.svg</title>\n <styl"
},
{
"path": "dist/snap.svg-min.js",
"chars": 82391,
"preview": "// Snap.svg 0.5.1\n//\n// Copyright (c) 2013 – 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under "
},
{
"path": "dist/snap.svg.js",
"chars": 281806,
"preview": "// Snap.svg 0.5.1\n//\n// Copyright (c) 2013 – 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under "
},
{
"path": "doc/css/dr.css",
"chars": 2615,
"preview": "#content section.code {\n display: block;\n font-weight: 400;\n background: #181818;\n -moz-border-radius: 10px;"
},
{
"path": "doc/css/main.css",
"chars": 201447,
"preview": "html,body{\n margin:0;\n padding:0;\n height: 100%;\n}\nbody {\n font-family: source-sans-pro, sans-serif;\n position: rel"
},
{
"path": "doc/css/prism.css",
"chars": 3633,
"preview": "/**\n * prism.js Twilight theme\n * Based (more or less) on the Twilight theme originally of Textmate fame.\n * @author Rem"
},
{
"path": "doc/css/topcoat-desktop-light.css",
"chars": 86052,
"preview": "/**\n*\n* Copyright 2012 Adobe Systems Inc.;\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may"
},
{
"path": "doc/fonts/stylesheet.css",
"chars": 1849,
"preview": "\n@font-face {\n font-family: 'source-sans-pro';\n src: url('sourcesanspro-light-webfont.eot');\n src: url('sources"
},
{
"path": "doc/js/prism.js",
"chars": 5399,
"preview": "/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-lic"
},
{
"path": "doc/reference.html",
"chars": 660512,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE="
},
{
"path": "dr.json",
"chars": 1921,
"preview": "{\n \"title\": \"Snap.svg\",\n \"output\": \"doc/reference.html\",\n \"template\": \"template.dot\",\n \"files\": [{\n \""
},
{
"path": "history.md",
"chars": 1901,
"preview": "#0.5.1\n\n* Bug fix\n\n#0.5.0\n\n* Added color palettes for Material and FlatUI\n* Added methods for gradients: `Element.stops("
},
{
"path": "package.json",
"chars": 1530,
"preview": "{\n \"name\": \"snapsvg\",\n \"version\": \"0.5.1\",\n \"description\": \"JavaScript Vector Library\",\n \"main\": \"./dist/sna"
},
{
"path": "src/align.js",
"chars": 3185,
"preview": "// Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/amd-banner.js",
"chars": 577,
"preview": "(function (glob, factory) {\n // AMD support\n if (typeof define == \"function\" && define.amd) {\n // Define as"
},
{
"path": "src/amd-footer.js",
"chars": 17,
"preview": "return Snap;\n}));"
},
{
"path": "src/animation.js",
"chars": 7396,
"preview": "// Copyright (c) 2016 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/attr.js",
"chars": 16001,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/attradd.js",
"chars": 3013,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/class.js",
"chars": 4715,
"preview": "// Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/colors.js",
"chars": 6300,
"preview": "// Copyright (c) 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/copy.js",
"chars": 675,
"preview": "// Snap.svg @VERSION\n//\n// Copyright (c) 2013 – 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed und"
},
{
"path": "src/element.js",
"chars": 25185,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/equal.js",
"chars": 6710,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/filter.js",
"chars": 11000,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/matrix.js",
"chars": 12011,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/mina.js",
"chars": 10080,
"preview": "// Copyright (c) 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/mouse.js",
"chars": 16281,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n// \n// Licensed under the Apache License, Version"
},
{
"path": "src/paper.js",
"chars": 25359,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/path.js",
"chars": 53040,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/set.js",
"chars": 10652,
"preview": "// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, Version "
},
{
"path": "src/svg.js",
"chars": 54312,
"preview": "// Copyright (c) 2013 - 2017 Adobe Systems Incorporated. All rights reserved.\n//\n// Licensed under the Apache License, V"
},
{
"path": "template.dot",
"chars": 8823,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE="
},
{
"path": "test/attradd.js",
"chars": 1132,
"preview": "describe(\"Attributes += methods\", function () {\n var s, r;\n beforeEach(function () {\n s = Snap(100, 100);\n "
},
{
"path": "test/attrs.js",
"chars": 6508,
"preview": "describe(\"Attributes\", function () {\n var s, r;\n beforeEach(function () {\n s = Snap(100, 100);\n r = "
},
{
"path": "test/class.js",
"chars": 1859,
"preview": "describe(\"Class methods\", function () {\n var s, r;\n beforeEach(function () {\n s = Snap(100, 100);\n r"
},
{
"path": "test/colors.js",
"chars": 6244,
"preview": "describe(\"Colours\", function () {\n it(\"parses hex colour\", function () {\n expect(Snap.color(\"#fC0\").hex).to.be"
},
{
"path": "test/element.js",
"chars": 24637,
"preview": "describe(\"Element methods\", function () {\n var s;\n beforeEach(function () {\n s = Snap(100, 100);\n });\n "
},
{
"path": "test/filter.js",
"chars": 7295,
"preview": "describe(\"Filter methods\", function () {\n it(\"Snap.filter.blur\", function() {\n var str = Snap.filter.blur(3);\n"
},
{
"path": "test/gradients.js",
"chars": 2623,
"preview": "describe(\"Gradients\", function () {\n var s,\n r;\n beforeEach(function () {\n s = Snap(100, 100);\n "
},
{
"path": "test/matrix.js",
"chars": 6329,
"preview": "describe(\"Matrix methods\", function () {\n it(\"Matrix.add - matrix\", function() {\n var matrix1 = new Snap.Matri"
},
{
"path": "test/mina.js",
"chars": 2944,
"preview": "describe(\"Mina methods\", function () {\n var s;\n beforeEach(function () {\n s = Snap(100, 100);\n });\n a"
},
{
"path": "test/paper.js",
"chars": 5237,
"preview": "describe(\"Check for Paper Creation\", function () {\n it(\"creates simple paper 20 × 10\", function () {\n var s = "
},
{
"path": "test/path.js",
"chars": 16559,
"preview": "describe(\"Path methods\", function () {\n it(\"Snap.path.getTotalLength\", function () {\n expect(+Snap.path.getTot"
},
{
"path": "test/primitives.js",
"chars": 5550,
"preview": "describe(\"Primitives creation\", function () {\n var s;\n beforeEach(function () {\n s = Snap(100, 100);\n })"
},
{
"path": "test/res/file-for-ajax.txt",
"chars": 7,
"preview": "success"
},
{
"path": "test/set.js",
"chars": 8386,
"preview": "describe(\"Set methods\", function () {\n var s;\n beforeEach(function () {\n s = Snap(100, 100);\n });\n af"
},
{
"path": "test/snap-tests.js",
"chars": 16222,
"preview": "describe(\"Snap methods\", function () {\n it(\"Snap.Matrix - six params\", function () {\n var matrix = new Snap.Ma"
},
{
"path": "test/system.js",
"chars": 299,
"preview": "describe(\"System check\", function () {\n it(\"Snap exists\", function () {\n expect(Snap).to.be.a(\"function\");\n "
},
{
"path": "test/test.html",
"chars": 2044,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"copyright\" content=\"Copyr"
},
{
"path": "test/test.js",
"chars": 330,
"preview": "var page = require(\"webpage\").create();\n\npage.open(\"test.html\", function (status) {\n var errors = 0;\n if (status ="
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the adobe-webplatform/Snap.svg GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 124 files (3.2 MB), approximately 857.0k tokens, and a symbol index with 724 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.