├── LICENSE-MIT ├── README.md ├── app ├── .DS_Store ├── app.js ├── collections │ └── company.js ├── dummy_data_generator.js ├── models │ └── company.js ├── vendor │ ├── Faker.js │ ├── backbone-localstorage.js │ ├── backbone.js │ ├── jquery-1.7.1.js │ └── underscore.js └── views │ ├── company_list_item_view.js │ ├── company_list_view.js │ └── company_marker_view.js ├── css ├── bootstrap.spacelab.min.css └── style.css ├── img ├── buildings_32x32.png ├── buildings_32x32_selected.png ├── glyphicons-halflings-white.png └── glyphicons-halflings.png ├── index.html └── screenshots └── backbonejs_google_maps01.png /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Iván Loire 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Backbone.js with Google Maps demo 2 | 3 | ![Backbone.js with Google Maps demo](https://raw.github.com/iloire/backbonejs-googlemaps-demo/master/screenshots/backbonejs_google_maps01.png) 4 | 5 | Don't expect anything fancy. Just a simple demo of how to use Backbone.js with Google Maps and some interaction with markers and views.. 6 | 7 | ## Getting Started 8 | 9 | Open index.html. 10 | 11 | ## Online demo in GitHub (gh-pages) 12 | 13 | http://iloire.github.com/backbonejs-googlemaps-demo/ 14 | 15 | ## Release History 16 | ### 0.1.0 Initial release 17 | 18 | ## License 19 | Copyright (c) 2012 Iván Loire 20 | Licensed under the MIT license. 21 | -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloire/backbonejs-googlemaps-demo/6da7143b2fdbcabcf71b67d460d35381e03e60a6/app/.DS_Store -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | 2 | // global for the sake of this example 3 | var Companies = new CompanyList(); 4 | var App = null; 5 | 6 | /** 7 | * The App 8 | * Our overall **AppView** is the top-level piece of UI. 9 | */ 10 | var AppView = Backbone.View.extend({ 11 | 12 | el: $("#hub"), 13 | 14 | //-------------------------------------- 15 | // Event wiring (events and event handlers) 16 | 17 | events: { 18 | 'click #btn_content' : 'show_content', 19 | 'click #btn_map' : 'show_map' 20 | }, 21 | 22 | show_content: function() { //triggers "content" mode 23 | var self = this; 24 | var top = 200; 25 | var speed = 600; 26 | 27 | // set content position and fade in 28 | self.main.animate({top: (top) + 'px'}, speed, function() { 29 | self.main.fadeIn(); 30 | }); 31 | 32 | self.companies_holder.fadeOut(); 33 | 34 | // controls to switch back to map 35 | self.controls.hide().css({top: (top - 100) + 'px'}); 36 | setTimeout(function() { 37 | self.content_controls.fadeIn(); 38 | }, 2 * speed); 39 | 40 | // resize map canvas 41 | self.map_canvas.animate({height: (top) + 'px'}, speed); 42 | }, 43 | 44 | show_map: function() { // triggers "map" mode 45 | var self = this; 46 | var speed = 800; 47 | 48 | // hide content 49 | self.main.fadeOut(); 50 | 51 | // hide controls 52 | self.controls.hide(); 53 | 54 | self.companies_holder.fadeIn(); 55 | 56 | // resize map canvas. make map 100% 57 | self.map_canvas.animate({height: '100%'}, speed); 58 | 59 | setTimeout(function() { 60 | // show map controls 61 | self.map_controls.css({top: '80%'}); 62 | self.map_controls.fadeIn(); 63 | }, speed); 64 | }, 65 | 66 | // END Events and event handlers 67 | //---------------------------------- 68 | 69 | 70 | //-------------------------------------- 71 | // Initialise map 72 | //-------------------------------------- 73 | _initialize_map : function() { 74 | var center = new google.maps.LatLng(41.63, -1); 75 | var styles = [ 76 | { 77 | elementType: "geometry", 78 | stylers: [ 79 | { lightness: 33 }, 80 | { saturation: -90 } 81 | ] 82 | } 83 | ]; 84 | 85 | var mapOptions = { 86 | zoom: 9, 87 | mapTypeId: google.maps.MapTypeId.ROADMAP, 88 | center: center, 89 | styles: styles 90 | }; 91 | this.map = new google.maps.Map(document.getElementById('map_canvas'), 92 | mapOptions); 93 | }, 94 | 95 | 96 | //-------------------------------------- 97 | // Initialise app 98 | //-------------------------------------- 99 | 100 | initialize: function() { 101 | var self = this; 102 | 103 | // cache DOM elements for faster access 104 | self.main = $('#main'); 105 | self.controls = $('.nav_controls'); 106 | self.content_controls = $('#content_controls'); 107 | self.map_controls = $('#map_controls'); 108 | self.map_canvas = $('#map_canvas'); 109 | self.header = $('header'); 110 | self.companies_holder = $('#companies_holder'); 111 | 112 | // initialize map 113 | self._initialize_map(); 114 | 115 | // Initial control positions 116 | // Move header up (out of window) 117 | self.header.css({top:'-1000px'}); 118 | self.header.animate({top: '0px'}, 1500); 119 | 120 | // hide all controls 121 | self.controls.hide(); 122 | self.controls.css({top: '80%'}); 123 | 124 | // self.map_controls.fadeIn(); 125 | setTimeout(function() { 126 | self.map_controls.fadeIn(); 127 | }, 1000); 128 | 129 | setTimeout(function() { // fetch data with some delay 130 | Companies.fetch(); 131 | // create views 132 | var list_view = new CompanyListView({model: Companies, map: self.map}); 133 | }, 2000); 134 | } 135 | }); 136 | 137 | // Load the application once the DOM is ready, using `jQuery.ready`: 138 | $(function() { 139 | App = new AppView(); 140 | }); 141 | -------------------------------------------------------------------------------- /app/collections/company.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Company Collection 4 | * The collection of companies is backed by *localStorage* instead of a remote 5 | * server. 6 | */ 7 | 8 | var CompanyList = Backbone.Collection.extend({ 9 | 10 | // reference to this collection's model. 11 | model: Company, 12 | 13 | localStorage: new Store("company-cachirulo"), 14 | 15 | add_new: function(company) { 16 | this.create(company); 17 | }, 18 | 19 | // companies are sorted by their name 20 | comparator: function(company) { 21 | return company.get('name'); 22 | }, 23 | 24 | remove_all: function() { 25 | var model; 26 | while (model = this.pop()) { 27 | model.destroy(); 28 | } 29 | } 30 | }); -------------------------------------------------------------------------------- /app/dummy_data_generator.js: -------------------------------------------------------------------------------- 1 | 2 | var dummy_data_generator = { 3 | 4 | 'reset' : function() { 5 | Companies.remove_all(); 6 | }, 7 | 8 | 'get_dummy_company': function() { 9 | var rnd_id = (new Date).getTime(); 10 | var company = { 11 | company_id : rnd_id, 12 | name : Faker.Company.companyName(), 13 | address: Faker.Address.streetAddress(), 14 | pos: {lat: 41 + Math.random(), lon: -1.3 + Math.random()} 15 | }; 16 | 17 | company.descr = '
'+ 18 | '
'+ 19 | '
'+ 20 | '

' + company.name + ' ' + company.address + '

'+ 21 | '
'+ 22 | '' + 23 | '

' + Faker.Lorem.paragraph() + '

' + 24 | '

' + Faker.Lorem.paragraph() + '

' + 25 | '

' + Faker.Lorem.paragraph() + '

' + 26 | '
'+ 27 | '
'; 28 | 29 | return company; 30 | }, 31 | 32 | 'repopulate' : function() { 33 | Companies.remove_all(); 34 | for (var i = 0, l = 10; i < l ; i++) { 35 | Companies.add_new(this.get_dummy_company()); 36 | } 37 | } 38 | }; 39 | 40 | dummy_data_generator.repopulate(); 41 | -------------------------------------------------------------------------------- /app/models/company.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Company Model 4 | */ 5 | 6 | var Company = Backbone.Model.extend({ 7 | 8 | initialize: function() {}, 9 | 10 | localStorage: new Store("company-cachirulo"), 11 | 12 | clear: function() { 13 | this.destroy(); 14 | } 15 | 16 | }); -------------------------------------------------------------------------------- /app/vendor/Faker.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010 Matthew Bergman & Marak Squires http://github.com/marak/Faker.js/ 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | The above copyright notice and this permission notice shall be 11 | included in all copies or substantial portions of the Software. 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 16 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 17 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 18 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | /*************** AUTOGENERATED @ 1280636665409 *************** 21 | WARNING: THIS FILE WAS AUTOGENERATED BY THE FAKER BUILD SCRIPT 22 | MODIFYING THIS FILE IS FINE, BUT YOU REALLY SHOULD BE MODIFYING 23 | THE LIBRARY DIRECTLY AND REGENERATING THIS FILE USING BUILD.js!!!! 24 | Faker.js - Written by Matthew Bergman and Marak Squires 25 | 26 | ## USAGE 27 | 28 | ### browser - 29 | 30 | 35 | ### node.js - 36 | var Faker = require('./Faker'); 37 | var randomName = Faker.Name.findName(); // Rowan Nikolaus 38 | var randomEmail = Faker.Internet.email(); // Kassandra.Haley@erich.biz 39 | var randomCard = Faker.Helpers.createCard(); // random contact card containing many properties 40 | */ 41 | var Faker = {}; 42 | Faker.version = "0.2.0"; 43 | Faker.Name = {}; 44 | Faker.Name.findName = function () { 45 | var r = Helpers.randomNumber(8); 46 | switch(r) 47 | { 48 | case 0: 49 | return Helpers.randomize(definitions.name_prefix()) + " " + Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); 50 | break; 51 | case 1: 52 | return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); + " " + Helpers.randomize(definitions.name_suffix); 53 | break; 54 | } 55 | 56 | return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); 57 | 58 | }; 59 | 60 | Faker.Name.firstName = function () { 61 | return Helpers.randomize(definitions.first_name()); 62 | }; 63 | 64 | Faker.Name.lastName = function () { 65 | return Helpers.randomize(definitions.last_name()); 66 | }; 67 | 68 | Faker.Address = {}; 69 | Faker.Address.zipCode = function () { 70 | return Helpers.replaceSymbolWithNumber(Helpers.randomize(["#####", '#####-####'])); 71 | }; 72 | 73 | Faker.Address.zipCodeFormat = function ( format ) { 74 | return Helpers.replaceSymbolWithNumber( ["#####", '#####-####'][format] ); 75 | }; 76 | 77 | Faker.Address.city = function () { 78 | switch(Helpers.randomNumber(3)) 79 | { 80 | case 0: 81 | return Helpers.randomize(definitions.city_prefix()) + " " + Helpers.randomize(definitions.first_name()) + Helpers.randomize(definitions.city_suffix()); 82 | break; 83 | case 1: 84 | return Helpers.randomize(definitions.city_prefix()) + " " + Helpers.randomize(definitions.first_name()); 85 | break; 86 | case 2: 87 | return Helpers.randomize(definitions.first_name()) + Helpers.randomize(definitions.city_suffix()); 88 | break; 89 | case 3: 90 | return Helpers.randomize(definitions.last_name()) + Helpers.randomize(definitions.city_suffix()); 91 | break; 92 | } 93 | }; 94 | 95 | Faker.Address.streetName = function () { 96 | switch(Helpers.randomNumber(1)) 97 | { 98 | case 0: 99 | return Helpers.randomize(definitions.last_name()) + " " + Helpers.randomize(definitions.street_suffix()); 100 | break; 101 | case 1: 102 | return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.street_suffix()); 103 | break; 104 | } 105 | }; 106 | 107 | Faker.Address.streetAddress = function (i) { 108 | if( typeof i == 'undefined'){ var i = false;} 109 | var address = ""; 110 | switch(Helpers.randomNumber(2)) 111 | { 112 | case 0: 113 | address = Helpers.replaceSymbolWithNumber("#####") + " " + this.streetName(); 114 | break; 115 | case 1: 116 | address = Helpers.replaceSymbolWithNumber("####") + " " + this.streetName(); 117 | break; 118 | case 2: 119 | address = Helpers.replaceSymbolWithNumber("###") + " " + this.streetName(); 120 | break; 121 | } 122 | var full_address = i ? address + " " + this.secondaryAddress() : address; 123 | return full_address; 124 | }; 125 | 126 | Faker.Address.secondaryAddress = function () { 127 | return Helpers.replaceSymbolWithNumber(Helpers.randomize( 128 | [ 129 | 'Apt. ###', 130 | 'Suite ###' 131 | ] 132 | ) 133 | ); 134 | }; 135 | 136 | Faker.Address.ukCounty = function (){ 137 | return Helpers.randomize(definitions.uk_county()); 138 | }; 139 | 140 | Faker.Address.ukCountry = function (){ 141 | return Helpers.randomize(definitions.uk_country()); 142 | }; 143 | 144 | Faker.Address.usState = function ( abbr ) { 145 | return Helpers.randomize( definitions[ abbr ? 'us_state_abbr' : 'us_state']() ); 146 | }; 147 | 148 | Faker.PhoneNumber = {}; 149 | Faker.PhoneNumber.phoneNumber = function (){ 150 | 151 | return Helpers.replaceSymbolWithNumber(Helpers.randomize(definitions.phone_formats())); 152 | 153 | }; 154 | 155 | Faker.PhoneNumber.phoneNumberFormat = function ( format ){ 156 | return Helpers.replaceSymbolWithNumber(definitions.phone_formats()[format]); 157 | }; 158 | 159 | Faker.Internet = {}; 160 | Faker.Internet.email = function () { 161 | return this.userName() + "@" + this.domainName(); 162 | }; 163 | 164 | Faker.Internet.userName = function () { 165 | switch(Helpers.randomNumber(2)) 166 | { 167 | case 0: 168 | return Helpers.randomize(definitions.first_name()); 169 | break; 170 | case 1: 171 | return Helpers.randomize(definitions.first_name()) + Helpers.randomize([".", "_"]) + Helpers.randomize(definitions.last_name()) ; 172 | break; 173 | } 174 | }; 175 | 176 | Faker.Internet.domainName = function () { 177 | return this.domainWord() + "." + Helpers.randomize(definitions.domain_suffix()); 178 | }; 179 | 180 | Faker.Internet.domainWord = function () { 181 | return Helpers.randomize(definitions.first_name()).toLowerCase(); 182 | }; 183 | 184 | Faker.Company = {}; 185 | Faker.Company.companyName = function ( format ) { 186 | switch( ( format ? format : Helpers.randomNumber(3) ) ) 187 | { 188 | case 0: 189 | return Helpers.randomize(definitions.last_name()) + " " + this.companySuffix(); 190 | break; 191 | case 1: 192 | return Helpers.randomize(definitions.last_name()) + "-" + Helpers.randomize(definitions.last_name()) ; 193 | break; 194 | case 2: 195 | return Helpers.randomize(definitions.last_name()) + "," + Helpers.randomize(definitions.last_name()) + " and " + Helpers.randomize(definitions.last_name()); 196 | break; 197 | } 198 | }; 199 | 200 | Faker.Company.companySuffix = function () { 201 | return Helpers.randomize(["Inc", "and\ Sons", "LLC", "Group", "and\ Daughters"]); 202 | }; 203 | 204 | Faker.Company.catchPhrase = function () { 205 | return Helpers.randomize(definitions.catch_phrase_adjective()) + " " + Helpers.randomize(definitions.catch_phrase_descriptor()) + " "+ Helpers.randomize(definitions.catch_phrase_noun()); 206 | }; 207 | 208 | Faker.Company.bs = function () { 209 | return Helpers.randomize(definitions.bs_adjective()) + " " + Helpers.randomize(definitions.bs_buzz()) + " "+ Helpers.randomize(definitions.bs_noun()); 210 | }; 211 | 212 | Faker.Lorem = {}; 213 | Faker.Lorem.words = function (num){ 214 | if( typeof num == 'undefined'){ var num = 3;} 215 | return Helpers.shuffle(definitions.lorem()).slice(0, num); 216 | //Words.shuffle[0, num] 217 | }; 218 | 219 | Faker.Lorem.sentence = function (wordCount){ 220 | if( typeof wordCount == 'undefined'){ var wordCount = 3;} 221 | 222 | // strange issue with the node_min_test failing for captialize, please fix and add this back 223 | //return this.words(wordCount + Helpers.randomNumber(7)).join(' ').capitalize(); 224 | 225 | return this.words(wordCount + Helpers.randomNumber(7)).join(' '); 226 | }; 227 | 228 | Faker.Lorem.sentences = function (sentenceCount){ 229 | if( typeof sentenceCount == 'undefined'){ var sentenceCount = 3;} 230 | var sentences = []; 231 | for(sentenceCount; sentenceCount >= 0; sentenceCount--){ 232 | sentences.push(this.sentence()); 233 | } 234 | return sentences.join("\n"); 235 | }; 236 | 237 | Faker.Lorem.paragraph = function (sentenceCount){ 238 | if( typeof sentenceCount == 'undefined'){ var sentenceCount = 3;} 239 | return this.sentences(sentenceCount + Helpers.randomNumber(3)); 240 | }; 241 | 242 | Faker.Lorem.paragraphs = function (paragraphCount){ 243 | if( typeof paragraphCount == 'undefined'){ var paragraphCount = 3;} 244 | var paragraphs = []; 245 | for(paragraphCount; paragraphCount >= 0; paragraphCount--){ 246 | paragraphs.push(this.paragraph()); 247 | } 248 | return paragraphs.join("\n \r\t"); 249 | }; 250 | 251 | Faker.Helpers = {}; 252 | Faker.Helpers.randomNumber = function (range) { 253 | r = Math.floor(Math.random()*range); 254 | return r; 255 | }; 256 | 257 | Faker.Helpers.randomize = function (array) { 258 | r = Math.floor(Math.random()*array.length); 259 | return array[r]; 260 | }; 261 | 262 | Faker.Helpers.replaceSymbolWithNumber = function (string, symbol){ 263 | 264 | // default symbol is '#' 265 | if(typeof symbol == 'undefined'){ 266 | var symbol = '#'; 267 | } 268 | 269 | var str = ''; 270 | for(var i = 0; i < string.length; i++){ 271 | if(string[i] == symbol){ 272 | str += Math.floor(Math.random()*10); 273 | } 274 | else{ 275 | str += string[i]; 276 | } 277 | } 278 | return str; 279 | }; 280 | 281 | Faker.Helpers.shuffle = function (o){ 282 | for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); 283 | return o; 284 | }; 285 | 286 | Faker.Helpers.generateDataSet = function (size){ 287 | 288 | }; 289 | 290 | Faker.Helpers.createCard = function (){ 291 | 292 | return { 293 | "name":Faker.Name.findName(), 294 | "username":Faker.Internet.userName(), 295 | "email":Faker.Internet.email(), 296 | "address":{ 297 | "streetA":Faker.Address.streetName(), 298 | "streetB":Faker.Address.streetAddress(), 299 | "streetC":Faker.Address.streetAddress(true), 300 | "streetD":Faker.Address.secondaryAddress(), 301 | "city":Faker.Address.city(), 302 | "ukCounty":Faker.Address.ukCounty(), 303 | "ukCountry":Faker.Address.ukCountry(), 304 | "zipcode":Faker.Address.zipCode() 305 | }, 306 | "phone":Faker.PhoneNumber.phoneNumber(), 307 | "website":Faker.Internet.domainName(), 308 | "company":{ 309 | "name":Faker.Company.companyName(), 310 | "catchPhrase":Faker.Company.catchPhrase(), 311 | "bs":Faker.Company.bs(), 312 | }, 313 | "posts":[ 314 | { 315 | "words":Faker.Lorem.words(), 316 | "sentence":Faker.Lorem.sentence(), 317 | "sentences":Faker.Lorem.sentences(), 318 | "paragraph":Faker.Lorem.paragraph() 319 | }, 320 | { 321 | "words":Faker.Lorem.words(), 322 | "sentence":Faker.Lorem.sentence(), 323 | "sentences":Faker.Lorem.sentences(), 324 | "paragraph":Faker.Lorem.paragraph() 325 | }, 326 | { 327 | "words":Faker.Lorem.words(), 328 | "sentence":Faker.Lorem.sentence(), 329 | "sentences":Faker.Lorem.sentences(), 330 | "paragraph":Faker.Lorem.paragraph() 331 | } 332 | ] 333 | }; 334 | }; 335 | 336 | Faker.Helpers.userCard = function (){ 337 | 338 | return { 339 | "name":Faker.Name.findName(), 340 | "username":Faker.Internet.userName(), 341 | "email":Faker.Internet.email(), 342 | "address":{ 343 | "street":Faker.Address.streetName(true), 344 | "suite":Faker.Address.secondaryAddress(), 345 | "city":Faker.Address.city(), 346 | "zipcode":Faker.Address.zipCode() 347 | }, 348 | "phone":Faker.PhoneNumber.phoneNumber(), 349 | "website":Faker.Internet.domainName(), 350 | "company":{ 351 | "name":Faker.Company.companyName(), 352 | "catchPhrase":Faker.Company.catchPhrase(), 353 | "bs":Faker.Company.bs(), 354 | }, 355 | }; 356 | }; 357 | 358 | Faker.definitions = {}; 359 | Faker.definitions.first_name = function (){return ["Aaliyah","Aaron","Abagail","Abbey","Abbie","Abbigail","Abby","Abdiel","Abdul","Abdullah","Abe","Abel","Abelardo","Abigail","Abigale","Abigayle","Abner","Abraham","Ada","Adah","Adalberto","Adaline","Adam","Adan","Addie","Addison","Adela","Adelbert","Adele","Adelia","Adeline","Adell","Adella","Adelle","Aditya","Adolf","Adolfo","Adolph","Adolphus","Adonis","Adrain","Adrian","Adriana","Adrianna","Adriel","Adrien","Adrienne","Afton","Aglae","Agnes","Agustin","Agustina","Ahmad","Ahmed","Aida","Aidan","Aiden","Aileen","Aimee","Aisha","Aiyana","Akeem","Al","Alaina","Alan","Alana","Alanis","Alanna","Alayna","Alba","Albert","Alberta","Albertha","Alberto","Albin","Albina","Alda","Alden","Alec","Aleen","Alejandra","Alejandrin","Alek","Alena","Alene","Alessandra","Alessandro","Alessia","Aletha","Alex","Alexa","Alexander","Alexandra","Alexandre","Alexandrea","Alexandria","Alexandrine","Alexandro","Alexane","Alexanne","Alexie","Alexis","Alexys","Alexzander","Alf","Alfonso","Alfonzo","Alford","Alfred","Alfreda","Alfredo","Ali","Alia","Alice","Alicia","Alisa","Alisha","Alison","Alivia","Aliya","Aliyah","Aliza","Alize","Allan","Allen","Allene","Allie","Allison","Ally","Alphonso","Alta","Althea","Alva","Alvah","Alvena","Alvera","Alverta","Alvina","Alvis","Alyce","Alycia","Alysa","Alysha","Alyson","Alysson","Amalia","Amanda","Amani","Amara","Amari","Amaya","Amber","Ambrose","Amelia","Amelie","Amely","America","Americo","Amie","Amina","Amir","Amira","Amiya","Amos","Amparo","Amy","Amya","Ana","Anabel","Anabelle","Anahi","Anais","Anastacio","Anastasia","Anderson","Andre","Andreane","Andreanne","Andres","Andrew","Andy","Angel","Angela","Angelica","Angelina","Angeline","Angelita","Angelo","Angie","Angus","Anibal","Anika","Anissa","Anita","Aniya","Aniyah","Anjali","Anna","Annabel","Annabell","Annabelle","Annalise","Annamae","Annamarie","Anne","Annetta","Annette","Annie","Ansel","Ansley","Anthony","Antoinette","Antone","Antonetta","Antonette","Antonia","Antonietta","Antonina","Antonio","Antwan","Antwon","Anya","April","Ara","Araceli","Aracely","Arch","Archibald","Ardella","Arden","Ardith","Arely","Ari","Ariane","Arianna","Aric","Ariel","Arielle","Arjun","Arlene","Arlie","Arlo","Armand","Armando","Armani","Arnaldo","Arne","Arno","Arnold","Arnoldo","Arnulfo","Aron","Art","Arthur","Arturo","Arvel","Arvid","Arvilla","Aryanna","Asa","Asha","Ashlee","Ashleigh","Ashley","Ashly","Ashlynn","Ashton","Ashtyn","Asia","Assunta","Astrid","Athena","Aubree","Aubrey","Audie","Audra","Audreanne","Audrey","August","Augusta","Augustine","Augustus","Aurelia","Aurelie","Aurelio","Aurore","Austen","Austin","Austyn","Autumn","Ava","Avery","Avis","Axel","Ayana","Ayden","Ayla","Aylin","Baby","Bailee","Bailey","Barbara","Barney","Baron","Barrett","Barry","Bart","Bartholome","Barton","Baylee","Beatrice","Beau","Beaulah","Bell","Bella","Belle","Ben","Benedict","Benjamin","Bennett","Bennie","Benny","Benton","Berenice","Bernadette","Bernadine","Bernard","Bernardo","Berneice","Bernhard","Bernice","Bernie","Berniece","Bernita","Berry","Bert","Berta","Bertha","Bertram","Bertrand","Beryl","Bessie","Beth","Bethany","Bethel","Betsy","Bette","Bettie","Betty","Bettye","Beulah","Beverly","Bianka","Bill","Billie","Billy","Birdie","Blair","Blaise","Blake","Blanca","Blanche","Blaze","Bo","Bobbie","Bobby","Bonita","Bonnie","Boris","Boyd","Brad","Braden","Bradford","Bradley","Bradly","Brady","Braeden","Brain","Brandi","Brando","Brandon","Brandt","Brandy","Brandyn","Brannon","Branson","Brant","Braulio","Braxton","Brayan","Breana","Breanna","Breanne","Brenda","Brendan","Brenden","Brendon","Brenna","Brennan","Brennon","Brent","Bret","Brett","Bria","Brian","Briana","Brianne","Brice","Bridget","Bridgette","Bridie","Brielle","Brigitte","Brionna","Brisa","Britney","Brittany","Brock","Broderick","Brody","Brook","Brooke","Brooklyn","Brooks","Brown","Bruce","Bryana","Bryce","Brycen","Bryon","Buck","Bud","Buddy","Buford","Bulah","Burdette","Burley","Burnice","Buster","Cade","Caden","Caesar","Caitlyn","Cale","Caleb","Caleigh","Cali","Calista","Callie","Camden","Cameron","Camila","Camilla","Camille","Camren","Camron","Camryn","Camylle","Candace","Candelario","Candice","Candida","Candido","Cara","Carey","Carissa","Carlee","Carleton","Carley","Carli","Carlie","Carlo","Carlos","Carlotta","Carmel","Carmela","Carmella","Carmelo","Carmen","Carmine","Carol","Carolanne","Carole","Carolina","Caroline","Carolyn","Carolyne","Carrie","Carroll","Carson","Carter","Cary","Casandra","Casey","Casimer","Casimir","Casper","Cassandra","Cassandre","Cassidy","Cassie","Catalina","Caterina","Catharine","Catherine","Cathrine","Cathryn","Cathy","Cayla","Ceasar","Cecelia","Cecil","Cecile","Cecilia","Cedrick","Celestine","Celestino","Celia","Celine","Cesar","Chad","Chadd","Chadrick","Chaim","Chance","Chandler","Chanel","Chanelle","Charity","Charlene","Charles","Charley","Charlie","Charlotte","Chase","Chasity","Chauncey","Chaya","Chaz","Chelsea","Chelsey","Chelsie","Chesley","Chester","Chet","Cheyanne","Cheyenne","Chloe","Chris","Christ","Christa","Christelle","Christian","Christiana","Christina","Christine","Christop","Christophe","Christopher","Christy","Chyna","Ciara","Cicero","Cielo","Cierra","Cindy","Citlalli","Clair","Claire","Clara","Clarabelle","Clare","Clarissa","Clark","Claud","Claude","Claudia","Claudie","Claudine","Clay","Clemens","Clement","Clementina","Clementine","Clemmie","Cleo","Cleora","Cleta","Cletus","Cleve","Cleveland","Clifford","Clifton","Clint","Clinton","Clotilde","Clovis","Cloyd","Clyde","Coby","Cody","Colby","Cole","Coleman","Colin","Colleen","Collin","Colt","Colten","Colton","Columbus","Concepcion","Conner","Connie","Connor","Conor","Conrad","Constance","Constantin","Consuelo","Cooper","Cora","Coralie","Corbin","Cordelia","Cordell","Cordia","Cordie","Corene","Corine","Cornelius","Cornell","Corrine","Cortez","Cortney","Cory","Coty","Courtney","Coy","Craig","Crawford","Creola","Cristal","Cristian","Cristina","Cristobal","Cristopher","Cruz","Crystal","Crystel","Cullen","Curt","Curtis","Cydney","Cynthia","Cyril","Cyrus","Dagmar","Dahlia","Daija","Daisha","Daisy","Dakota","Dale","Dallas","Dallin","Dalton","Damaris","Dameon","Damian","Damien","Damion","Damon","Dan","Dana","Dandre","Dane","D'angelo","Dangelo","Danial","Daniela","Daniella","Danielle","Danika","Dannie","Danny","Dante","Danyka","Daphne","Daphnee","Daphney","Darby","Daren","Darian","Dariana","Darien","Dario","Darion","Darius","Darlene","Daron","Darrel","Darrell","Darren","Darrick","Darrin","Darrion","Darron","Darryl","Darwin","Daryl","Dashawn","Dasia","Dave","David","Davin","Davion","Davon","Davonte","Dawn","Dawson","Dax","Dayana","Dayna","Dayne","Dayton","Dean","Deangelo","Deanna","Deborah","Declan","Dedric","Dedrick","Dee","Deion","Deja","Dejah","Dejon","Dejuan","Delaney","Delbert","Delfina","Delia","Delilah","Dell","Della","Delmer","Delores","Delpha","Delphia","Delphine","Delta","Demarco","Demarcus","Demario","Demetris","Demetrius","Demond","Dena","Denis","Dennis","Deon","Deondre","Deontae","Deonte","Dereck","Derek","Derick","Deron","Derrick","Deshaun","Deshawn","Desiree","Desmond","Dessie","Destany","Destin","Destinee","Destiney","Destini","Destiny","Devan","Devante","Deven","Devin","Devon","Devonte","Devyn","Dewayne","Dewitt","Dexter","Diamond","Diana","Dianna","Diego","Dillan","Dillon","Dimitri","Dina","Dino","Dion","Dixie","Dock","Dolly","Dolores","Domenic","Domenica","Domenick","Domenico","Domingo","Dominic","Dominique","Don","Donald","Donato","Donavon","Donna","Donnell","Donnie","Donny","Dora","Dorcas","Dorian","Doris","Dorothea","Dorothy","Dorris","Dortha","Dorthy","Doug","Douglas","Dovie","Doyle","Drake","Drew","Duane","Dudley","Dulce","Duncan","Durward","Dustin","Dusty","Dwight","Dylan","Earl","Earlene","Earline","Earnest","Earnestine","Easter","Easton","Ebba","Ebony","Ed","Eda","Edd","Eddie","Eden","Edgar","Edgardo","Edison","Edmond","Edmund","Edna","Eduardo","Edward","Edwardo","Edwin","Edwina","Edyth","Edythe","Effie","Efrain","Efren","Eileen","Einar","Eino","Eladio","Elaina","Elbert","Elda","Eldon","Eldora","Eldred","Eldridge","Eleanora","Eleanore","Eleazar","Electa","Elena","Elenor","Elenora","Eleonore","Elfrieda","Eli","Elian","Eliane","Elias","Eliezer","Elijah","Elinor","Elinore","Elisa","Elisabeth","Elise","Eliseo","Elisha","Elissa","Eliza","Elizabeth","Ella","Ellen","Ellie","Elliot","Elliott","Ellis","Ellsworth","Elmer","Elmira","Elmo","Elmore","Elna","Elnora","Elody","Eloisa","Eloise","Elouise","Eloy","Elroy","Elsa","Else","Elsie","Elta","Elton","Elva","Elvera","Elvie","Elvis","Elwin","Elwyn","Elyse","Elyssa","Elza","Emanuel","Emelia","Emelie","Emely","Emerald","Emerson","Emery","Emie","Emil","Emile","Emilia","Emiliano","Emilie","Emilio","Emily","Emma","Emmalee","Emmanuel","Emmanuelle","Emmet","Emmett","Emmie","Emmitt","Emmy","Emory","Ena","Enid","Enoch","Enola","Enos","Enrico","Enrique","Ephraim","Era","Eriberto","Eric","Erica","Erich","Erick","Ericka","Erik","Erika","Erin","Erling","Erna","Ernest","Ernestina","Ernestine","Ernesto","Ernie","Ervin","Erwin","Eryn","Esmeralda","Esperanza","Esta","Esteban","Estefania","Estel","Estell","Estella","Estelle","Estevan","Esther","Estrella","Etha","Ethan","Ethel","Ethelyn","Ethyl","Ettie","Eudora","Eugene","Eugenia","Eula","Eulah","Eulalia","Euna","Eunice","Eusebio","Eva","Evalyn","Evan","Evangeline","Evans","Eve","Eveline","Evelyn","Everardo","Everett","Everette","Evert","Evie","Ewald","Ewell","Ezekiel","Ezequiel","Ezra","Fabian","Fabiola","Fae","Fannie","Fanny","Fatima","Faustino","Fausto","Favian","Fay","Faye","Federico","Felicia","Felicita","Felicity","Felipa","Felipe","Felix","Felton","Fermin","Fern","Fernando","Ferne","Fidel","Filiberto","Filomena","Finn","Fiona","Flavie","Flavio","Fleta","Fletcher","Flo","Florence","Florencio","Florian","Florida","Florine","Flossie","Floy","Floyd","Ford","Forest","Forrest","Foster","Frances","Francesca","Francesco","Francis","Francisca","Francisco","Franco","Frank","Frankie","Franz","Fred","Freda","Freddie","Freddy","Frederic","Frederick","Frederik","Frederique","Fredrick","Fredy","Freeda","Freeman","Freida","Frida","Frieda","Friedrich","Fritz","Furman","Gabe","Gabriel","Gabriella","Gabrielle","Gaetano","Gage","Gail","Gardner","Garett","Garfield","Garland","Garnet","Garnett","Garret","Garrett","Garrick","Garrison","Garry","Garth","Gaston","Gavin","Gay","Gayle","Gaylord","Gene","General","Genesis","Genevieve","Gennaro","Genoveva","Geo","Geoffrey","George","Georgette","Georgiana","Georgianna","Geovanni","Geovanny","Geovany","Gerald","Geraldine","Gerard","Gerardo","Gerda","Gerhard","Germaine","German","Gerry","Gerson","Gertrude","Gia","Gianni","Gideon","Gilbert","Gilberto","Gilda","Giles","Gillian","Gina","Gino","Giovani","Giovanna","Giovanni","Giovanny","Gisselle","Giuseppe","Gladyce","Gladys","Glen","Glenda","Glenna","Glennie","Gloria","Godfrey","Golda","Golden","Gonzalo","Gordon","Grace","Gracie","Graciela","Grady","Graham","Grant","Granville","Grayce","Grayson","Green","Greg","Gregg","Gregoria","Gregorio","Gregory","Greta","Gretchen","Greyson","Griffin","Grover","Guadalupe","Gudrun","Guido","Guillermo","Guiseppe","Gunnar","Gunner","Gus","Gussie","Gust","Gustave","Guy","Gwen","Gwendolyn","Hadley","Hailee","Hailey","Hailie","Hal","Haleigh","Haley","Halie","Halle","Hallie","Hank","Hanna","Hannah","Hans","Hardy","Harley","Harmon","Harmony","Harold","Harrison","Harry","Harvey","Haskell","Hassan","Hassie","Hattie","Haven","Hayden","Haylee","Hayley","Haylie","Hazel","Hazle","Heath","Heather","Heaven","Heber","Hector","Heidi","Helen","Helena","Helene","Helga","Hellen","Helmer","Heloise","Henderson","Henri","Henriette","Henry","Herbert","Herman","Hermann","Hermina","Herminia","Herminio","Hershel","Herta","Hertha","Hester","Hettie","Hilario","Hilbert","Hilda","Hildegard","Hillard","Hillary","Hilma","Hilton","Hipolito","Hiram","Hobart","Holden","Hollie","Hollis","Holly","Hope","Horace","Horacio","Hortense","Hosea","Houston","Howard","Howell","Hoyt","Hubert","Hudson","Hugh","Hulda","Humberto","Hunter","Hyman","Ian","Ibrahim","Icie","Ida","Idell","Idella","Ignacio","Ignatius","Ike","Ila","Ilene","Iliana","Ima","Imani","Imelda","Immanuel","Imogene","Ines","Irma","Irving","Irwin","Isaac","Isabel","Isabell","Isabella","Isabelle","Isac","Isadore","Isai","Isaiah","Isaias","Isidro","Ismael","Isobel","Isom","Israel","Issac","Itzel","Iva","Ivah","Ivory","Ivy","Izabella","Izaiah","Jabari","Jace","Jacey","Jacinthe","Jacinto","Jack","Jackeline","Jackie","Jacklyn","Jackson","Jacky","Jaclyn","Jacquelyn","Jacques","Jacynthe","Jada","Jade","Jaden","Jadon","Jadyn","Jaeden","Jaida","Jaiden","Jailyn","Jaime","Jairo","Jakayla","Jake","Jakob","Jaleel","Jalen","Jalon","Jalyn","Jamaal","Jamal","Jamar","Jamarcus","Jamel","Jameson","Jamey","Jamie","Jamil","Jamir","Jamison","Jammie","Jan","Jana","Janae","Jane","Janelle","Janessa","Janet","Janice","Janick","Janie","Janis","Janiya","Jannie","Jany","Jaquan","Jaquelin","Jaqueline","Jared","Jaren","Jarod","Jaron","Jarred","Jarrell","Jarret","Jarrett","Jarrod","Jarvis","Jasen","Jasmin","Jason","Jasper","Jaunita","Javier","Javon","Javonte","Jay","Jayce","Jaycee","Jayda","Jayde","Jayden","Jaydon","Jaylan","Jaylen","Jaylin","Jaylon","Jayme","Jayne","Jayson","Jazlyn","Jazmin","Jazmyn","Jazmyne","Jean","Jeanette","Jeanie","Jeanne","Jed","Jedediah","Jedidiah","Jeff","Jefferey","Jeffery","Jeffrey","Jeffry","Jena","Jenifer","Jennie","Jennifer","Jennings","Jennyfer","Jensen","Jerad","Jerald","Jeramie","Jeramy","Jerel","Jeremie","Jeremy","Jermain","Jermaine","Jermey","Jerod","Jerome","Jeromy","Jerrell","Jerrod","Jerrold","Jerry","Jess","Jesse","Jessica","Jessie","Jessika","Jessy","Jessyca","Jesus","Jett","Jettie","Jevon","Jewel","Jewell","Jillian","Jimmie","Jimmy","Jo","Joan","Joana","Joanie","Joanne","Joannie","Joanny","Joany","Joaquin","Jocelyn","Jodie","Jody","Joe","Joel","Joelle","Joesph","Joey","Johan","Johann","Johanna","Johathan","John","Johnathan","Johnathon","Johnnie","Johnny","Johnpaul","Johnson","Jolie","Jon","Jonas","Jonatan","Jonathan","Jonathon","Jordan","Jordane","Jordi","Jordon","Jordy","Jordyn","Jorge","Jose","Josefa","Josefina","Joseph","Josephine","Josh","Joshua","Joshuah","Josiah","Josiane","Josianne","Josie","Josue","Jovan","Jovani","Jovanny","Jovany","Joy","Joyce","Juana","Juanita","Judah","Judd","Jude","Judge","Judson","Judy","Jules","Julia","Julian","Juliana","Julianne","Julie","Julien","Juliet","Julio","Julius","June","Junior","Junius","Justen","Justice","Justina","Justine","Juston","Justus","Justyn","Juvenal","Juwan","Kacey","Kaci","Kacie","Kade","Kaden","Kadin","Kaela","Kaelyn","Kaia","Kailee","Kailey","Kailyn","Kaitlin","Kaitlyn","Kale","Kaleb","Kaleigh","Kaley","Kali","Kallie","Kameron","Kamille","Kamren","Kamron","Kamryn","Kane","Kara","Kareem","Karelle","Karen","Kari","Kariane","Karianne","Karina","Karine","Karl","Karlee","Karley","Karli","Karlie","Karolann","Karson","Kasandra","Kasey","Kassandra","Katarina","Katelin","Katelyn","Katelynn","Katharina","Katherine","Katheryn","Kathleen","Kathlyn","Kathryn","Kathryne","Katlyn","Katlynn","Katrina","Katrine","Kattie","Kavon","Kay","Kaya","Kaycee","Kayden","Kayla","Kaylah","Kaylee","Kayleigh","Kayley","Kayli","Kaylie","Kaylin","Keagan","Keanu","Keara","Keaton","Keegan","Keeley","Keely","Keenan","Keira","Keith","Kellen","Kelley","Kelli","Kellie","Kelly","Kelsi","Kelsie","Kelton","Kelvin","Ken","Kendall","Kendra","Kendrick","Kenna","Kennedi","Kennedy","Kenneth","Kennith","Kenny","Kenton","Kenya","Kenyatta","Kenyon","Keon","Keshaun","Keshawn","Keven","Kevin","Kevon","Keyon","Keyshawn","Khalid","Khalil","Kian","Kiana","Kianna","Kiara","Kiarra","Kiel","Kiera","Kieran","Kiley","Kim","Kimberly","King","Kip","Kira","Kirk","Kirsten","Kirstin","Kitty","Kobe","Koby","Kody","Kolby","Kole","Korbin","Korey","Kory","Kraig","Kris","Krista","Kristian","Kristin","Kristina","Kristofer","Kristoffer","Kristopher","Kristy","Krystal","Krystel","Krystina","Kurt","Kurtis","Kyla","Kyle","Kylee","Kyleigh","Kyler","Kylie","Kyra","Lacey","Lacy","Ladarius","Lafayette","Laila","Laisha","Lamar","Lambert","Lamont","Lance","Landen","Lane","Laney","Larissa","Laron","Larry","Larue","Laura","Laurel","Lauren","Laurence","Lauretta","Lauriane","Laurianne","Laurie","Laurine","Laury","Lauryn","Lavada","Lavern","Laverna","Laverne","Lavina","Lavinia","Lavon","Lavonne","Lawrence","Lawson","Layla","Layne","Lazaro","Lea","Leann","Leanna","Leanne","Leatha","Leda","Lee","Leif","Leila","Leilani","Lela","Lelah","Leland","Lelia","Lempi","Lemuel","Lenna","Lennie","Lenny","Lenora","Lenore","Leo","Leola","Leon","Leonard","Leonardo","Leone","Leonel","Leonie","Leonor","Leonora","Leopold","Leopoldo","Leora","Lera","Lesley","Leslie","Lesly","Lessie","Lester","Leta","Letha","Letitia","Levi","Lew","Lewis","Lexi","Lexie","Lexus","Lia","Liam","Liana","Libbie","Libby","Lila","Lilian","Liliana","Liliane","Lilla","Lillian","Lilliana","Lillie","Lilly","Lily","Lilyan","Lina","Lincoln","Linda","Lindsay","Lindsey","Linnea","Linnie","Linwood","Lionel","Lisa","Lisandro","Lisette","Litzy","Liza","Lizeth","Lizzie","Llewellyn","Lloyd","Logan","Lois","Lola","Lolita","Loma","Lon","London","Lonie","Lonnie","Lonny","Lonzo","Lora","Loraine","Loren","Lorena","Lorenz","Lorenza","Lorenzo","Lori","Lorine","Lorna","Lottie","Lou","Louie","Louisa","Lourdes","Louvenia","Lowell","Loy","Loyal","Loyce","Lucas","Luciano","Lucie","Lucienne","Lucile","Lucinda","Lucio","Lucious","Lucius","Lucy","Ludie","Ludwig","Lue","Luella","Luigi","Luis","Luisa","Lukas","Lula","Lulu","Luna","Lupe","Lura","Lurline","Luther","Luz","Lyda","Lydia","Lyla","Lynn","Lyric","Lysanne","Mabel","Mabelle","Mable","Mac","Macey","Maci","Macie","Mack","Mackenzie","Macy","Madaline","Madalyn","Maddison","Madeline","Madelyn","Madelynn","Madge","Madie","Madilyn","Madisen","Madison","Madisyn","Madonna","Madyson","Mae","Maegan","Maeve","Mafalda","Magali","Magdalen","Magdalena","Maggie","Magnolia","Magnus","Maia","Maida","Maiya","Major","Makayla","Makenna","Makenzie","Malachi","Malcolm","Malika","Malinda","Mallie","Mallory","Malvina","Mandy","Manley","Manuel","Manuela","Mara","Marc","Marcel","Marcelina","Marcelino","Marcella","Marcelle","Marcellus","Marcelo","Marcia","Marco","Marcos","Marcus","Margaret","Margarete","Margarett","Margaretta","Margarette","Margarita","Marge","Margie","Margot","Margret","Marguerite","Maria","Mariah","Mariam","Marian","Mariana","Mariane","Marianna","Marianne","Mariano","Maribel","Marie","Mariela","Marielle","Marietta","Marilie","Marilou","Marilyne","Marina","Mario","Marion","Marisa","Marisol","Maritza","Marjolaine","Marjorie","Marjory","Mark","Markus","Marlee","Marlen","Marlene","Marley","Marlin","Marlon","Marques","Marquis","Marquise","Marshall","Marta","Martin","Martina","Martine","Marty","Marvin","Mary","Maryam","Maryjane","Maryse","Mason","Mateo","Mathew","Mathias","Mathilde","Matilda","Matilde","Matt","Matteo","Mattie","Maud","Maude","Maudie","Maureen","Maurice","Mauricio","Maurine","Maverick","Mavis","Max","Maxie","Maxime","Maximilian","Maximillia","Maximillian","Maximo","Maximus","Maxine","Maxwell","May","Maya","Maybell","Maybelle","Maye","Maymie","Maynard","Mayra","Mazie","Mckayla","Mckenna","Mckenzie","Meagan","Meaghan","Meda","Megane","Meggie","Meghan","Mekhi","Melany","Melba","Melisa","Melissa","Mellie","Melody","Melvin","Melvina","Melyna","Melyssa","Mercedes","Meredith","Merl","Merle","Merlin","Merritt","Mertie","Mervin","Meta","Mia","Micaela","Micah","Michael","Michaela","Michale","Micheal","Michel","Michele","Michelle","Miguel","Mikayla","Mike","Mikel","Milan","Miles","Milford","Miller","Millie","Milo","Milton","Mina","Minerva","Minnie","Miracle","Mireille","Mireya","Misael","Missouri","Misty","Mitchel","Mitchell","Mittie","Modesta","Modesto","Mohamed","Mohammad","Mohammed","Moises","Mollie","Molly","Mona","Monica","Monique","Monroe","Monserrat","Monserrate","Montana","Monte","Monty","Morgan","Moriah","Morris","Mortimer","Morton","Mose","Moses","Moshe","Mossie","Mozell","Mozelle","Muhammad","Muriel","Murl","Murphy","Murray","Mustafa","Mya","Myah","Mylene","Myles","Myra","Myriam","Myrl","Myrna","Myron","Myrtice","Myrtie","Myrtis","Myrtle","Nadia","Nakia","Name","Nannie","Naomi","Naomie","Napoleon","Narciso","Nash","Nasir","Nat","Natalia","Natalie","Natasha","Nathan","Nathanael","Nathanial","Nathaniel","Nathen","Nayeli","Neal","Ned","Nedra","Neha","Neil","Nelda","Nella","Nelle","Nellie","Nels","Nelson","Neoma","Nestor","Nettie","Neva","Newell","Newton","Nia","Nicholas","Nicholaus","Nichole","Nick","Nicklaus","Nickolas","Nico","Nicola","Nicolas","Nicole","Nicolette","Nigel","Nikita","Nikki","Nikko","Niko","Nikolas","Nils","Nina","Noah","Noble","Noe","Noel","Noelia","Noemi","Noemie","Noemy","Nola","Nolan","Nona","Nora","Norbert","Norberto","Norene","Norma","Norris","Norval","Norwood","Nova","Novella","Nya","Nyah","Nyasia","Obie","Oceane","Ocie","Octavia","Oda","Odell","Odessa","Odie","Ofelia","Okey","Ola","Olaf","Ole","Olen","Oleta","Olga","Olin","Oliver","Ollie","Oma","Omari","Omer","Ona","Onie","Opal","Ophelia","Ora","Oral","Oran","Oren","Orie","Orin","Orion","Orland","Orlando","Orlo","Orpha","Orrin","Orval","Orville","Osbaldo","Osborne","Oscar","Osvaldo","Oswald","Oswaldo","Otha","Otho","Otilia","Otis","Ottilie","Ottis","Otto","Ova","Owen","Ozella","Pablo","Paige","Palma","Pamela","Pansy","Paolo","Paris","Parker","Pascale","Pasquale","Pat","Patience","Patricia","Patrick","Patsy","Pattie","Paul","Paula","Pauline","Paxton","Payton","Pearl","Pearlie","Pearline","Pedro","Peggie","Penelope","Percival","Percy","Perry","Pete","Peter","Petra","Peyton","Philip","Phoebe","Phyllis","Pierce","Pierre","Pietro","Pink","Pinkie","Piper","Polly","Porter","Precious","Presley","Preston","Price","Prince","Princess","Priscilla","Providenci","Prudence","Queen","Queenie","Quentin","Quincy","Quinn","Quinten","Quinton","Rachael","Rachel","Rachelle","Rae","Raegan","Rafael","Rafaela","Raheem","Rahsaan","Rahul","Raina","Raleigh","Ralph","Ramiro","Ramon","Ramona","Randal","Randall","Randi","Randy","Ransom","Raoul","Raphael","Raphaelle","Raquel","Rashad","Rashawn","Rasheed","Raul","Raven","Ray","Raymond","Raymundo","Reagan","Reanna","Reba","Rebeca","Rebecca","Rebeka","Rebekah","Reece","Reed","Reese","Regan","Reggie","Reginald","Reid","Reilly","Reina","Reinhold","Remington","Rene","Renee","Ressie","Reta","Retha","Retta","Reuben","Reva","Rex","Rey","Reyes","Reymundo","Reyna","Reynold","Rhea","Rhett","Rhianna","Rhiannon","Rhoda","Ricardo","Richard","Richie","Richmond","Rick","Rickey","Rickie","Ricky","Rico","Rigoberto","Riley","Rita","River","Robb","Robbie","Robert","Roberta","Roberto","Robin","Robyn","Rocio","Rocky","Rod","Roderick","Rodger","Rodolfo","Rodrick","Rodrigo","Roel","Rogelio","Roger","Rogers","Rolando","Rollin","Roma","Romaine","Roman","Ron","Ronaldo","Ronny","Roosevelt","Rory","Rosa","Rosalee","Rosalia","Rosalind","Rosalinda","Rosalyn","Rosamond","Rosanna","Rosario","Roscoe","Rose","Rosella","Roselyn","Rosemarie","Rosemary","Rosendo","Rosetta","Rosie","Rosina","Roslyn","Ross","Rossie","Rowan","Rowena","Rowland","Roxane","Roxanne","Roy","Royal","Royce","Rozella","Ruben","Rubie","Ruby","Rubye","Rudolph","Rudy","Rupert","Russ","Russel","Russell","Rusty","Ruth","Ruthe","Ruthie","Ryan","Ryann","Ryder","Rylan","Rylee","Ryleigh","Ryley","Sabina","Sabrina","Sabryna","Sadie","Sadye","Sage","Saige","Sallie","Sally","Salma","Salvador","Salvatore","Sam","Samanta","Samantha","Samara","Samir","Sammie","Sammy","Samson","Sandra","Sandrine","Sandy","Sanford","Santa","Santiago","Santina","Santino","Santos","Sarah","Sarai","Sarina","Sasha","Saul","Savanah","Savanna","Savannah","Savion","Scarlett","Schuyler","Scot","Scottie","Scotty","Seamus","Sean","Sebastian","Sedrick","Selena","Selina","Selmer","Serena","Serenity","Seth","Shad","Shaina","Shakira","Shana","Shane","Shanel","Shanelle","Shania","Shanie","Shaniya","Shanna","Shannon","Shanny","Shanon","Shany","Sharon","Shaun","Shawn","Shawna","Shaylee","Shayna","Shayne","Shea","Sheila","Sheldon","Shemar","Sheridan","Sherman","Sherwood","Shirley","Shyann","Shyanne","Sibyl","Sid","Sidney","Sienna","Sierra","Sigmund","Sigrid","Sigurd","Silas","Sim","Simeon","Simone","Sincere","Sister","Skye","Skyla","Skylar","Sofia","Soledad","Solon","Sonia","Sonny","Sonya","Sophia","Sophie","Spencer","Stacey","Stacy","Stan","Stanford","Stanley","Stanton","Stefan","Stefanie","Stella","Stephan","Stephania","Stephanie","Stephany","Stephen","Stephon","Sterling","Steve","Stevie","Stewart","Stone","Stuart","Summer","Sunny","Susan","Susana","Susanna","Susie","Suzanne","Sven","Syble","Sydnee","Sydney","Sydni","Sydnie","Sylvan","Sylvester","Sylvia","Tabitha","Tad","Talia","Talon","Tamara","Tamia","Tania","Tanner","Tanya","Tara","Taryn","Tate","Tatum","Tatyana","Taurean","Tavares","Taya","Taylor","Teagan","Ted","Telly","Terence","Teresa","Terrance","Terrell","Terrence","Terrill","Terry","Tess","Tessie","Tevin","Thad","Thaddeus","Thalia","Thea","Thelma","Theo","Theodora","Theodore","Theresa","Therese","Theresia","Theron","Thomas","Thora","Thurman","Tia","Tiana","Tianna","Tiara","Tierra","Tiffany","Tillman","Timmothy","Timmy","Timothy","Tina","Tito","Titus","Tobin","Toby","Tod","Tom","Tomas","Tomasa","Tommie","Toney","Toni","Tony","Torey","Torrance","Torrey","Toy","Trace","Tracey","Tracy","Travis","Travon","Tre","Tremaine","Tremayne","Trent","Trenton","Tressa","Tressie","Treva","Trever","Trevion","Trevor","Trey","Trinity","Trisha","Tristian","Tristin","Triston","Troy","Trudie","Trycia","Trystan","Turner","Twila","Tyler","Tyra","Tyree","Tyreek","Tyrel","Tyrell","Tyrese","Tyrique","Tyshawn","Tyson","Ubaldo","Ulices","Ulises","Una","Unique","Urban","Uriah","Uriel","Ursula","Vada","Valentin","Valentina","Valentine","Valerie","Vallie","Van","Vance","Vanessa","Vaughn","Veda","Velda","Vella","Velma","Velva","Vena","Verda","Verdie","Vergie","Verla","Verlie","Vern","Verna","Verner","Vernice","Vernie","Vernon","Verona","Veronica","Vesta","Vicenta","Vicente","Vickie","Vicky","Victor","Victoria","Vida","Vidal","Vilma","Vince","Vincent","Vincenza","Vincenzo","Vinnie","Viola","Violet","Violette","Virgie","Virgil","Virginia","Virginie","Vita","Vito","Viva","Vivian","Viviane","Vivianne","Vivien","Vivienne","Vladimir","Wade","Waino","Waldo","Walker","Wallace","Walter","Walton","Wanda","Ward","Warren","Watson","Wava","Waylon","Wayne","Webster","Weldon","Wellington","Wendell","Wendy","Werner","Westley","Weston","Whitney","Wilber","Wilbert","Wilburn","Wiley","Wilford","Wilfred","Wilfredo","Wilfrid","Wilhelm","Wilhelmine","Will","Willa","Willard","William","Willie","Willis","Willow","Willy","Wilma","Wilmer","Wilson","Wilton","Winfield","Winifred","Winnifred","Winona","Winston","Woodrow","Wyatt","Wyman","Xander","Xavier","Xzavier","Yadira","Yasmeen","Yasmin","Yasmine","Yazmin","Yesenia","Yessenia","Yolanda","Yoshiko","Yvette","Yvonne","Zachariah","Zachary","Zachery","Zack","Zackary","Zackery","Zakary","Zander","Zane","Zaria","Zechariah","Zelda","Zella","Zelma","Zena","Zetta","Zion","Zita","Zoe","Zoey","Zoie","Zoila","Zola","Zora","Zul"];}; 360 | 361 | Faker.definitions.last_name = function (){return["Abbott","Abernathy","Abshire","Adams","Altenwerth","Anderson","Ankunding","Armstrong","Auer","Aufderhar","Bahringer","Bailey","Balistreri","Barrows","Bartell","Bartoletti","Barton","Bashirian","Batz","Bauch","Baumbach","Bayer","Beahan","Beatty","Bechtelar","Becker","Bednar","Beer","Beier","Berge","Bergnaum","Bergstrom","Bernhard","Bernier","Bins","Blanda","Blick","Block","Bode","Boehm","Bogan","Bogisich","Borer","Bosco","Botsford","Boyer","Boyle","Bradtke","Brakus","Braun","Breitenberg","Brekke","Brown","Bruen","Buckridge","Carroll","Carter","Cartwright","Casper","Cassin","Champlin","Christiansen","Cole","Collier","Collins","Conn","Connelly","Conroy","Considine","Corkery","Cormier","Corwin","Cremin","Crist","Crona","Cronin","Crooks","Cruickshank","Cummerata","Cummings","Dach","D'Amore","Daniel","Dare","Daugherty","Davis","Deckow","Denesik","Dibbert","Dickens","Dicki","Dickinson","Dietrich","Donnelly","Dooley","Douglas","Doyle","DuBuque","Durgan","Ebert","Effertz","Eichmann","Emard","Emmerich","Erdman","Ernser","Fadel","Fahey","Farrell","Fay","Feeney","Feest","Feil","Ferry","Fisher","Flatley","Frami","Franecki","Friesen","Fritsch","Funk","Gaylord","Gerhold","Gerlach","Gibson","Gislason","Gleason","Gleichner","Glover","Goldner","Goodwin","Gorczany","Gottlieb","Goyette","Grady","Graham","Grant","Green","Greenfelder","Greenholt","Grimes","Gulgowski","Gusikowski","Gutkowski","Gu�ann","Haag","Hackett","Hagenes","Hahn","Haley","Halvorson","Hamill","Hammes","Hand","Hane","Hansen","Harber","Harris","Har�ann","Harvey","Hauck","Hayes","Heaney","Heathcote","Hegmann","Heidenreich","Heller","Herman","Hermann","Hermiston","Herzog","Hessel","Hettinger","Hickle","Hilll","Hills","Hilpert","Hintz","Hirthe","Hodkiewicz","Hoeger","Homenick","Hoppe","Howe","Howell","Hudson","Huel","Huels","Hyatt","Jacobi","Jacobs","Jacobson","Jakubowski","Jaskolski","Jast","Jenkins","Jerde","Jewess","Johns","Johnson","Johnston","Jones","Kassulke","Kautzer","Keebler","Keeling","Kemmer","Kerluke","Kertzmann","Kessler","Kiehn","Kihn","Kilback","King","Kirlin","Klein","Kling","Klocko","Koch","Koelpin","Koepp","Kohler","Konopelski","Koss","Kovacek","Kozey","Krajcik","Kreiger","Kris","Kshlerin","Kub","Kuhic","Kuhlman","Kuhn","Kulas","Kunde","Kunze","Kuphal","Kutch","Kuvalis","Labadie","Lakin","Lang","Langosh","Langworth","Larkin","Larson","Leannon","Lebsack","Ledner","Leffler","Legros","Lehner","Lemke","Lesch","Leuschke","Lind","Lindgren","Littel","Little","Lockman","Lowe","Lubowitz","Lueilwitz","Luettgen","Lynch","Macejkovic","Maggio","Mann","Mante","Marks","Marquardt","Marvin","Mayer","Mayert","McClure","McCullough","McDermott","McGlynn","McKenzie","McLaughlin","Medhurst","Mertz","Metz","Miller","Mills","Mitchell","Moen","Mohr","Monahan","Moore","Morar","Morissette","Mosciski","Mraz","Mueller","Muller","Murazik","Murphy","Murray","Nader","Nicolas","Nienow","Nikolaus","Nitzsche","Nolan","Oberbrunner","O'Connell","O'Conner","O'Hara","O'Keefe","O'Kon","Okuneva","Olson","Ondricka","O'Reilly","Orn","Ortiz","Osinski","Pacocha","Padberg","Pagac","Parisian","Parker","Paucek","Pfannerstill","Pfeffer","Pollich","Pouros","Powlowski","Predovic","Price","Prohaska","Prosacco","Purdy","Quigley","Quitzon","Rath","Ratke","Rau","Raynor","Reichel","Reichert","Reilly","Reinger","Rempel","Renner","Reynolds","Rice","Rippin","Ritchie","Robel","Roberts","Rodriguez","Rogahn","Rohan","Rolfson","Romaguera","Roob","Rosenbaum","Rowe","Ruecker","Runolfsdottir","Runolfsson","Runte","Russel","Rutherford","Ryan","Sanford","Satterfield","Sauer","Sawayn","Schaden","Schaefer","Schamberger","Schiller","Schimmel","Schinner","Schmeler","Schmidt","Schmitt","Schneider","Schoen","Schowalter","Schroeder","Schulist","Schultz","Schumm","Schuppe","Schuster","Senger","Shanahan","Shields","Simonis","Sipes","Skiles","Smith","Smitham","Spencer","Spinka","Sporer","Stamm","Stanton","Stark","Stehr","Steuber","Stiedemann","Stokes","Stoltenberg","Stracke","Streich","Stroman","Strosin","Swaniawski","Swift","Terry","Thiel","Thompson","Tillman","Torp","Torphy","Towne","Toy","Trantow","Tremblay","Treutel","Tromp","Turcotte","Turner","Ullrich","Upton","Vandervort","Veum","Volkman","Von","VonRueden","Waelchi","Walker","Walsh","Walter","Ward","Waters","Watsica","Weber","Wehner","Weimann","Weissnat","Welch","West","White","Wiegand","Wilderman","Wilkinson","Will","Williamson","Willms","Windler","Wintheiser","Wisoky","Wisozk","Witting","Wiza","Wolf","Wolff","Wuckert","Wunsch","Wyman","Yost","Yundt","Zboncak","Zemlak","Ziemann","Zieme","Zulauf"];}; 362 | 363 | Faker.definitions.name_prefix = function (){return ["Mr.", "Mrs.", "Ms.", "Miss", "Dr."];}; 364 | 365 | Faker.definitions.name_suffix = function (){return ["Jr.", "Sr.", "I", "II", "III", "IV", "V", "MD", "DDS", "PhD", "DVM"];}; 366 | 367 | Faker.definitions.us_state = function (){return ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];}; 368 | 369 | Faker.definitions.us_state_abbr = function (){return ["AL", "AK", "AS", "AZ", "AR", "CA", "CO", 'CT', "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY", "AE", "AA", "AP"];}; 370 | 371 | Faker.definitions.city_prefix = function (){return ["North", "East", "West", "South", "New", "Lake", "Port"];}; 372 | 373 | Faker.definitions.city_suffix = function (){return ["town", "ton", "land", "ville", "berg", "burgh", "borough", "bury", "view", "port", "mouth", "stad", "furt", "chester", "mouth", "fort", "haven", "side", "shire"];}; 374 | 375 | Faker.definitions.street_suffix = function (){return ["Alley","Avenue","Branch","Bridge","Brook","Brooks","Burg","Burgs","Bypass","Camp","Canyon","Cape","Causeway","Center","Centers","Circle","Circles","Cliff","Cliffs","Club","Common","Corner","Corners","Course","Court","Courts","Cove","Coves","Creek","Crescent","Crest","Crossing","Crossroad","Curve","Dale","Dam","Divide","Drive","Drive","Drives","Estate","Estates","Expressway","Extension","Extensions","Fall","Falls","Ferry","Field","Fields","Flat","Flats","Ford","Fords","Forest","Forge","Forges","Fork","Forks","Fort","Freeway","Garden","Gardens","Gateway","Glen","Glens","Green","Greens","Grove","Groves","Harbor","Harbors","Haven","Heights","Highway","Hill","Hills","Hollow","Inlet","Inlet","Island","Island","Islands","Islands","Isle","Isle","Junction","Junctions","Key","Keys","Knoll","Knolls","Lake","Lakes","Land","Landing","Lane","Light","Lights","Loaf","Lock","Locks","Locks","Lodge","Lodge","Loop","Mall","Manor","Manors","Meadow","Meadows","Mews","Mill","Mills","Mission","Mission","Motorway","Mount","Mountain","Mountain","Mountains","Mountains","Neck","Orchard","Oval","Overpass","Park","Parks","Parkway","Parkways","Pass","Passage","Path","Pike","Pine","Pines","Place","Plain","Plains","Plains","Plaza","Plaza","Point","Points","Port","Port","Ports","Ports","Prairie","Prairie","Radial","Ramp","Ranch","Rapid","Rapids","Rest","Ridge","Ridges","River","Road","Road","Roads","Roads","Route","Row","Rue","Run","Shoal","Shoals","Shore","Shores","Skyway","Spring","Springs","Springs","Spur","Spurs","Square","Square","Squares","Squares","Station","Station","Stravenue","Stravenue","Stream","Stream","Street","Street","Streets","Summit","Summit","Terrace","Throughway","Trace","Track","Trafficway","Trail","Trail","Tunnel","Tunnel","Turnpike","Turnpike","Underpass","Union","Unions","Valley","Valleys","Via","Viaduct","View","Views","Village","Village","","Villages","Ville","Vista","Vista","Walk","Walks","Wall","Way","Ways","Well","Wells"];}; 376 | 377 | Faker.definitions.uk_county = function (){return ['Avon', 'Bedfordshire', 'Berkshire', 'Borders', 'Buckinghamshire', 'Cambridgeshire', 'Central', 'Cheshire', 'Cleveland', 'Clwyd', 'Cornwall', 'County Antrim', 'County Armagh', 'County Down', 'County Fermanagh', 'County Londonderry', 'County Tyrone', 'Cumbria', 'Derbyshire', 'Devon', 'Dorset', 'Dumfries and Galloway', 'Durham', 'Dyfed', 'East Sussex', 'Essex', 'Fife', 'Gloucestershire', 'Grampian', 'Greater Manchester', 'Gwent', 'Gwynedd County', 'Hampshire', 'Herefordshire', 'Hertfordshire', 'Highlands and Islands', 'Humberside', 'Isle of Wight', 'Kent', 'Lancashire', 'Leicestershire', 'Lincolnshire', 'Lothian', 'Merseyside', 'Mid Glamorgan', 'Norfolk', 'North Yorkshire', 'Northamptonshire', 'Northumberland', 'Nottinghamshire', 'Oxfordshire', 'Powys', 'Rutland', 'Shropshire', 'Somerset', 'South Glamorgan', 'South Yorkshire', 'Staffordshire', 'Strathclyde', 'Suffolk', 'Surrey', 'Tayside', 'Tyne and Wear', 'Warwickshire', 'West Glamorgan', 'West Midlands', 'West Sussex', 'West Yorkshire', 'Wiltshire', 'Worcestershire'];}; 378 | 379 | Faker.definitions.uk_country = function (){return ['England', 'Scotland', 'Wales', 'Northern Ireland'];}; 380 | 381 | Faker.definitions.catch_phrase_adjective = function (){return ["Adaptive", "Advanced", "Ameliorated", "Assimilated", "Automated", "Balanced", "Business-focused", "Centralized", "Cloned", "Compatible", "Configurable", "Cross-group", "Cross-platform", "Customer-focused", "Customizable", "Decentralized", "De-engineered", "Devolved", "Digitized", "Distributed", "Diverse", "Down-sized", "Enhanced", "Enterprise-wide", "Ergonomic", "Exclusive", "Expanded", "Extended", "Face to face", "Focused", "Front-line", "Fully-configurable", "Function-based", "Fundamental", "Future-proofed", "Grass-roots", "Horizontal", "Implemented", "Innovative", "Integrated", "Intuitive", "Inverse", "Managed", "Mandatory", "Monitored", "Multi-channelled", "Multi-lateral", "Multi-layered", "Multi-tiered", "Networked", "Object-based", "Open-architected", "Open-source", "Operative", "Optimized", "Optional", "Organic", "Organized", "Persevering", "Persistent", "Phased", "Polarised", "Pre-emptive", "Proactive", "Profit-focused", "Profound", "Programmable", "Progressive", "Public-key", "Quality-focused", "Reactive", "Realigned", "Re-contextualized", "Re-engineered", "Reduced", "Reverse-engineered", "Right-sized", "Robust", "Seamless", "Secured", "Self-enabling", "Sharable", "Stand-alone", "Streamlined", "Switchable", "Synchronised", "Synergistic", "Synergized", "Team-oriented", "Total", "Triple-buffered", "Universal", "Up-sized", "Upgradable", "User-centric", "User-friendly", "Versatile", "Virtual", "Visionary", "Vision-oriented"];}; 382 | 383 | Faker.definitions.catch_phrase_descriptor = function (){return ["24 hour", "24/7", "3rd generation", "4th generation", "5th generation", "6th generation", "actuating", "analyzing", "assymetric", "asynchronous", "attitude-oriented", "background", "bandwidth-monitored", "bi-directional", "bifurcated", "bottom-line", "clear-thinking", "client-driven", "client-server", "coherent", "cohesive", "composite", "context-sensitive", "contextually-based", "content-based", "dedicated", "demand-driven", "didactic", "directional", "discrete", "disintermediate", "dynamic", "eco-centric", "empowering", "encompassing", "even-keeled", "executive", "explicit", "exuding", "fault-tolerant", "foreground", "fresh-thinking", "full-range", "global", "grid-enabled", "heuristic", "high-level", "holistic", "homogeneous", "human-resource", "hybrid", "impactful", "incremental", "intangible", "interactive", "intermediate", "leading edge", "local", "logistical", "maximized", "methodical", "mission-critical", "mobile", "modular", "motivating", "multimedia", "multi-state", "multi-tasking", "national", "needs-based", "neutral", "next generation", "non-volatile", "object-oriented", "optimal", "optimizing", "radical", "real-time", "reciprocal", "regional", "responsive", "scalable", "secondary", "solution-oriented", "stable", "static", "systematic", "systemic", "system-worthy", "tangible", "tertiary", "transitional", "uniform", "upward-trending", "user-facing", "value-added", "web-enabled", "well-modulated", "zero administration", "zero defect", "zero tolerance"];}; 384 | 385 | Faker.definitions.catch_phrase_noun = function (){return ["ability", "access", "adapter", "algorithm", "alliance", "analyzer", "application", "approach", "architecture", "archive", "artificial intelligence", "array", "attitude", "benchmark", "budgetary management", "capability", "capacity", "challenge", "circuit", "collaboration", "complexity", "concept", "conglomeration", "contingency", "core", "customer loyalty", "database", "data-warehouse", "definition", "emulation", "encoding", "encryption", "extranet", "firmware", "flexibility", "focus group", "forecast", "frame", "framework", "function", "functionalities", "Graphic Interface", "groupware", "Graphical User Interface", "hardware", "help-desk", "hierarchy", "hub", "implementation", "info-mediaries", "infrastructure", "initiative", "installation", "instruction set", "interface", "internet solution", "intranet", "knowledge user", "knowledge base", "local area network", "leverage", "matrices", "matrix", "methodology", "middleware", "migration", "model", "moderator", "monitoring", "moratorium", "neural-net", "open architecture", "open system", "orchestration", "paradigm", "parallelism", "policy", "portal", "pricing structure", "process improvement", "product", "productivity", "project", "projection", "protocol", "secured line", "service-desk", "software", "solution", "standardization", "strategy", "structure", "success", "superstructure", "support", "synergy", "system engine", "task-force", "throughput", "time-frame", "toolset", "utilisation", "website", "workforce"];}; 386 | 387 | Faker.definitions.bs_adjective = function (){return ["implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace", "enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize", "morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate", "synergize", "strategize", "deploy", "brand", "grow", "target", "syndicate", "synthesize", "deliver", "mesh", "incubate", "engage", "maximize", "benchmark", "expedite", "reintermediate", "whiteboard", "visualize", "repurpose", "innovate", "scale", "unleash", "drive", "extend", "engineer", "revolutionize", "generate", "exploit", "transition", "e-enable", "iterate", "cultivate", "matrix", "productize", "redefine", "recontextualize"];}; 388 | 389 | Faker.definitions.bs_buzz = function (){return ["clicks-and-mortar", "value-added", "vertical", "proactive", "robust", "revolutionary", "scalable", "leading-edge", "innovative", "intuitive", "strategic", "e-business", "mission-critical", "sticky", "one-to-one", "24/7", "end-to-end", "global", "B2B", "B2C", "granular", "frictionless", "virtual", "viral", "dynamic", "24/365", "best-of-breed", "killer", "magnetic", "bleeding-edge", "web-enabled", "interactive", "dot-com", "sexy", "back-end", "real-time", "efficient", "front-end", "distributed", "seamless", "extensible", "turn-key", "world-class", "open-source", "cross-platform", "cross-media", "synergistic", "bricks-and-clicks", "out-of-the-box", "enterprise", "integrated", "impactful", "wireless", "transparent", "next-generation", "cutting-edge", "user-centric", "visionary", "customized", "ubiquitous", "plug-and-play", "collaborative", "compelling", "holistic", "rich"];}; 390 | 391 | Faker.definitions.bs_noun = function (){return ["synergies", "web-readiness", "paradigms", "markets", "partnerships", "infrastructures", "platforms", "initiatives", "channels", "eyeballs", "communities", "ROI", "solutions", "e-tailers", "e-services", "action-items", "portals", "niches", "technologies", "content", "vortals", "supply-chains", "convergence", "relationships", "architectures", "interfaces", "e-markets", "e-commerce", "systems", "bandwidth", "infomediaries", "models", "mindshare", "deliverables", "users", "schemas", "networks", "applications", "metrics", "e-business", "functionalities", "experiences", "web services", "methodologies"];}; 392 | 393 | Faker.definitions.domain_suffix = function (){return ["co.uk", "com", "us", "uk", "ca", "biz", "info", "name"];}; 394 | 395 | Faker.definitions.lorem = function (){return ["alias","consequatur","aut","perferendis","sit","voluptatem","accusantium","doloremque","aperiam","eaque","ipsa","quae","ab","illo","inventore","veritatis","et","quasi","architecto","beatae","vitae","dicta","sunt","explicabo","aspernatur","aut","odit","aut","fugit","sed","quia","consequuntur","magni","dolores","eos","qui","ratione","voluptatem","sequi","nesciunt","neque","dolorem","ipsum","quia","dolor","sit","amet","consectetur","adipisci","velit","sed","quia","non","numquam","eius","modi","tempora","incidunt","ut","labore","et","dolore","magnam","aliquam","quaerat","voluptatem","ut","enim","ad","minima","veniam","quis","nostrum","exercitationem","ullam","corporis","nemo","enim","ipsam","voluptatem","quia","voluptas","sit","suscipit","laboriosam","nisi","ut","aliquid","ex","ea","commodi","consequatur","quis","autem","vel","eum","iure","reprehenderit","qui","in","ea","voluptate","velit","esse","quam","nihil","molestiae","et","iusto","odio","dignissimos","ducimus","qui","blanditiis","praesentium","laudantium","totam","rem","voluptatum","deleniti","atque","corrupti","quos","dolores","et","quas","molestias","excepturi","sint","occaecati","cupiditate","non","provident","sed","ut","perspiciatis","unde","omnis","iste","natus","error","similique","sunt","in","culpa","qui","officia","deserunt","mollitia","animi","id","est","laborum","et","dolorum","fuga","et","harum","quidem","rerum","facilis","est","et","expedita","distinctio","nam","libero","tempore","cum","soluta","nobis","est","eligendi","optio","cumque","nihil","impedit","quo","porro","quisquam","est","qui","minus","id","quod","maxime","placeat","facere","possimus","omnis","voluptas","assumenda","est","omnis","dolor","repellendus","temporibus","autem","quibusdam","et","aut","consequatur","vel","illum","qui","dolorem","eum","fugiat","quo","voluptas","nulla","pariatur","at","vero","eos","et","accusamus","officiis","debitis","aut","rerum","necessitatibus","saepe","eveniet","ut","et","voluptates","repudiandae","sint","et","molestiae","non","recusandae","itaque","earum","rerum","hic","tenetur","a","sapiente","delectus","ut","aut","reiciendis","voluptatibus","maiores","doloribus","asperiores","repellat"];}; 396 | 397 | Faker.definitions.phone_formats = function (){return [ 398 | '###-###-####', 399 | '(###)###-####', 400 | '1-###-###-####', 401 | '###.###.####', 402 | '###-###-####', 403 | '(###)###-####', 404 | '1-###-###-####', 405 | '###.###.####', 406 | '###-###-#### x###', 407 | '(###)###-#### x###', 408 | '1-###-###-#### x###', 409 | '###.###.#### x###', 410 | '###-###-#### x####', 411 | '(###)###-#### x####', 412 | '1-###-###-#### x####', 413 | '###.###.#### x####', 414 | '###-###-#### x#####', 415 | '(###)###-#### x#####', 416 | '1-###-###-#### x#####', 417 | '###.###.#### x#####' 418 | ];}; 419 | var definitions = Faker.definitions; 420 | var Helpers = Faker.Helpers; 421 | if(typeof exports != "undefined"){for(var prop in Faker){exports[prop] = Faker[prop];}} -------------------------------------------------------------------------------- /app/vendor/backbone-localstorage.js: -------------------------------------------------------------------------------- 1 | // A simple module to replace `Backbone.sync` with *localStorage*-based 2 | // persistence. Models are given GUIDS, and saved into a JSON object. Simple 3 | // as that. 4 | 5 | // Generate four random hex digits. 6 | function S4() { 7 | return (((1+Math.random())*0x10000)|0).toString(16).substring(1); 8 | }; 9 | 10 | // Generate a pseudo-GUID by concatenating random hexadecimal. 11 | function guid() { 12 | return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); 13 | }; 14 | 15 | // Our Store is represented by a single JS object in *localStorage*. Create it 16 | // with a meaningful name, like the name you'd give a table. 17 | var Store = function(name) { 18 | this.name = name; 19 | var store = localStorage.getItem(this.name); 20 | this.data = (store && JSON.parse(store)) || {}; 21 | }; 22 | 23 | _.extend(Store.prototype, { 24 | 25 | // Save the current state of the **Store** to *localStorage*. 26 | save: function() { 27 | localStorage.setItem(this.name, JSON.stringify(this.data)); 28 | }, 29 | 30 | // Add a model, giving it a (hopefully)-unique GUID, if it doesn't already 31 | // have an id of it's own. 32 | create: function(model) { 33 | if (!model.id) model.set(model.idAttribute, guid()); 34 | this.data[model.id] = model; 35 | this.save(); 36 | return model; 37 | }, 38 | 39 | // Update a model by replacing its copy in `this.data`. 40 | update: function(model) { 41 | this.data[model.id] = model; 42 | this.save(); 43 | return model; 44 | }, 45 | 46 | // Retrieve a model from `this.data` by id. 47 | find: function(model) { 48 | return this.data[model.id]; 49 | }, 50 | 51 | // Return the array of all models currently in storage. 52 | findAll: function() { 53 | return _.values(this.data); 54 | }, 55 | 56 | // Delete a model from `this.data`, returning it. 57 | destroy: function(model) { 58 | delete this.data[model.id]; 59 | this.save(); 60 | return model; 61 | } 62 | 63 | }); 64 | 65 | // Override `Backbone.sync` to use delegate to the model or collection's 66 | // *localStorage* property, which should be an instance of `Store`. 67 | Backbone.sync = function(method, model, options) { 68 | 69 | var resp; 70 | var store = model.localStorage || model.collection.localStorage; 71 | 72 | switch (method) { 73 | case "read": resp = model.id ? store.find(model) : store.findAll(); break; 74 | case "create": resp = store.create(model); break; 75 | case "update": resp = store.update(model); break; 76 | case "delete": resp = store.destroy(model); break; 77 | } 78 | 79 | if (resp) { 80 | options.success(resp); 81 | } else { 82 | options.error("Record not found"); 83 | } 84 | }; -------------------------------------------------------------------------------- /app/vendor/backbone.js: -------------------------------------------------------------------------------- 1 | // Backbone.js 0.9.2 2 | 3 | // (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. 4 | // Backbone may be freely distributed under the MIT license. 5 | // For all details and documentation: 6 | // http://backbonejs.org 7 | 8 | (function(){ 9 | 10 | // Initial Setup 11 | // ------------- 12 | 13 | // Save a reference to the global object (`window` in the browser, `global` 14 | // on the server). 15 | var root = this; 16 | 17 | // Save the previous value of the `Backbone` variable, so that it can be 18 | // restored later on, if `noConflict` is used. 19 | var previousBackbone = root.Backbone; 20 | 21 | // Create a local reference to splice. 22 | var splice = Array.prototype.splice; 23 | 24 | // The top-level namespace. All public Backbone classes and modules will 25 | // be attached to this. Exported for both CommonJS and the browser. 26 | var Backbone; 27 | if (typeof exports !== 'undefined') { 28 | Backbone = exports; 29 | } else { 30 | Backbone = root.Backbone = {}; 31 | } 32 | 33 | // Current version of the library. Keep in sync with `package.json`. 34 | Backbone.VERSION = '0.9.2'; 35 | 36 | // Require Underscore, if we're on the server, and it's not already present. 37 | var _ = root._; 38 | if (!_ && (typeof require !== 'undefined')) _ = require('underscore'); 39 | 40 | // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable. 41 | Backbone.$ = root.jQuery || root.Zepto || root.ender; 42 | 43 | // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable 44 | // to its previous owner. Returns a reference to this Backbone object. 45 | Backbone.noConflict = function() { 46 | root.Backbone = previousBackbone; 47 | return this; 48 | }; 49 | 50 | // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option 51 | // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and 52 | // set a `X-Http-Method-Override` header. 53 | Backbone.emulateHTTP = false; 54 | 55 | // Turn on `emulateJSON` to support legacy servers that can't deal with direct 56 | // `application/json` requests ... will encode the body as 57 | // `application/x-www-form-urlencoded` instead and will send the model in a 58 | // form param named `model`. 59 | Backbone.emulateJSON = false; 60 | 61 | // Backbone.Events 62 | // ----------------- 63 | 64 | // Regular expression used to split event strings 65 | var eventSplitter = /\s+/; 66 | 67 | // A module that can be mixed in to *any object* in order to provide it with 68 | // custom events. You may bind with `on` or remove with `off` callback functions 69 | // to an event; `trigger`-ing an event fires all callbacks in succession. 70 | // 71 | // var object = {}; 72 | // _.extend(object, Backbone.Events); 73 | // object.on('expand', function(){ alert('expanded'); }); 74 | // object.trigger('expand'); 75 | // 76 | var Events = Backbone.Events = { 77 | 78 | // Bind one or more space separated events, `events`, to a `callback` 79 | // function. Passing `"all"` will bind the callback to all events fired. 80 | on: function(events, callback, context) { 81 | var calls, event, list; 82 | if (!callback) return this; 83 | 84 | events = events.split(eventSplitter); 85 | calls = this._callbacks || (this._callbacks = {}); 86 | 87 | while (event = events.shift()) { 88 | list = calls[event] || (calls[event] = []); 89 | list.push(callback, context); 90 | } 91 | 92 | return this; 93 | }, 94 | 95 | // Remove one or many callbacks. If `context` is null, removes all callbacks 96 | // with that function. If `callback` is null, removes all callbacks for the 97 | // event. If `events` is null, removes all bound callbacks for all events. 98 | off: function(events, callback, context) { 99 | var event, calls, list, i; 100 | 101 | // No events, or removing *all* events. 102 | if (!(calls = this._callbacks)) return this; 103 | if (!(events || callback || context)) { 104 | delete this._callbacks; 105 | return this; 106 | } 107 | 108 | events = events ? events.split(eventSplitter) : _.keys(calls); 109 | 110 | // Loop through the callback list, splicing where appropriate. 111 | while (event = events.shift()) { 112 | if (!(list = calls[event]) || !(callback || context)) { 113 | delete calls[event]; 114 | continue; 115 | } 116 | 117 | for (i = list.length - 2; i >= 0; i -= 2) { 118 | if (!(callback && list[i] !== callback || context && list[i + 1] !== context)) { 119 | list.splice(i, 2); 120 | } 121 | } 122 | } 123 | 124 | return this; 125 | }, 126 | 127 | // Trigger one or many events, firing all bound callbacks. Callbacks are 128 | // passed the same arguments as `trigger` is, apart from the event name 129 | // (unless you're listening on `"all"`, which will cause your callback to 130 | // receive the true name of the event as the first argument). 131 | trigger: function(events) { 132 | var event, calls, list, i, length, args, all, rest; 133 | if (!(calls = this._callbacks)) return this; 134 | 135 | rest = []; 136 | events = events.split(eventSplitter); 137 | 138 | // Fill up `rest` with the callback arguments. Since we're only copying 139 | // the tail of `arguments`, a loop is much faster than Array#slice. 140 | for (i = 1, length = arguments.length; i < length; i++) { 141 | rest[i - 1] = arguments[i]; 142 | } 143 | 144 | // For each event, walk through the list of callbacks twice, first to 145 | // trigger the event, then to trigger any `"all"` callbacks. 146 | while (event = events.shift()) { 147 | // Copy callback lists to prevent modification. 148 | if (all = calls.all) all = all.slice(); 149 | if (list = calls[event]) list = list.slice(); 150 | 151 | // Execute event callbacks. 152 | if (list) { 153 | for (i = 0, length = list.length; i < length; i += 2) { 154 | list[i].apply(list[i + 1] || this, rest); 155 | } 156 | } 157 | 158 | // Execute "all" callbacks. 159 | if (all) { 160 | args = [event].concat(rest); 161 | for (i = 0, length = all.length; i < length; i += 2) { 162 | all[i].apply(all[i + 1] || this, args); 163 | } 164 | } 165 | } 166 | 167 | return this; 168 | } 169 | 170 | }; 171 | 172 | // Aliases for backwards compatibility. 173 | Events.bind = Events.on; 174 | Events.unbind = Events.off; 175 | 176 | // Backbone.Model 177 | // -------------- 178 | 179 | // Create a new model, with defined attributes. A client id (`cid`) 180 | // is automatically generated and assigned for you. 181 | var Model = Backbone.Model = function(attributes, options) { 182 | var defaults; 183 | attributes || (attributes = {}); 184 | if (options && options.collection) this.collection = options.collection; 185 | if (options && options.parse) attributes = this.parse(attributes); 186 | if (defaults = getValue(this, 'defaults')) { 187 | attributes = _.extend({}, defaults, attributes); 188 | } 189 | this.attributes = {}; 190 | this._escapedAttributes = {}; 191 | this.cid = _.uniqueId('c'); 192 | this.changed = {}; 193 | this._silent = {}; 194 | this._pending = {}; 195 | this.set(attributes, {silent: true}); 196 | // Reset change tracking. 197 | this.changed = {}; 198 | this._silent = {}; 199 | this._pending = {}; 200 | this._previousAttributes = _.clone(this.attributes); 201 | this.initialize.apply(this, arguments); 202 | }; 203 | 204 | // Attach all inheritable methods to the Model prototype. 205 | _.extend(Model.prototype, Events, { 206 | 207 | // A hash of attributes whose current and previous value differ. 208 | changed: null, 209 | 210 | // A hash of attributes that have silently changed since the last time 211 | // `change` was called. Will become pending attributes on the next call. 212 | _silent: null, 213 | 214 | // A hash of attributes that have changed since the last `'change'` event 215 | // began. 216 | _pending: null, 217 | 218 | // The default name for the JSON `id` attribute is `"id"`. MongoDB and 219 | // CouchDB users may want to set this to `"_id"`. 220 | idAttribute: 'id', 221 | 222 | // Initialize is an empty function by default. Override it with your own 223 | // initialization logic. 224 | initialize: function(){}, 225 | 226 | // Return a copy of the model's `attributes` object. 227 | toJSON: function(options) { 228 | return _.clone(this.attributes); 229 | }, 230 | 231 | // Proxy `Backbone.sync` by default. 232 | sync: function() { 233 | return Backbone.sync.apply(this, arguments); 234 | }, 235 | 236 | // Get the value of an attribute. 237 | get: function(attr) { 238 | return this.attributes[attr]; 239 | }, 240 | 241 | // Get the HTML-escaped value of an attribute. 242 | escape: function(attr) { 243 | var html; 244 | if (html = this._escapedAttributes[attr]) return html; 245 | var val = this.get(attr); 246 | return this._escapedAttributes[attr] = _.escape(val == null ? '' : '' + val); 247 | }, 248 | 249 | // Returns `true` if the attribute contains a value that is not null 250 | // or undefined. 251 | has: function(attr) { 252 | return this.get(attr) != null; 253 | }, 254 | 255 | // Set a hash of model attributes on the object, firing `"change"` unless 256 | // you choose to silence it. 257 | set: function(key, value, options) { 258 | var attrs, attr, val; 259 | 260 | // Handle both `"key", value` and `{key: value}` -style arguments. 261 | if (_.isObject(key) || key == null) { 262 | attrs = key; 263 | options = value; 264 | } else { 265 | attrs = {}; 266 | attrs[key] = value; 267 | } 268 | 269 | // Extract attributes and options. 270 | options || (options = {}); 271 | if (!attrs) return this; 272 | if (attrs instanceof Model) attrs = attrs.attributes; 273 | if (options.unset) for (attr in attrs) attrs[attr] = void 0; 274 | 275 | // Run validation. 276 | if (!this._validate(attrs, options)) return false; 277 | 278 | // Check for changes of `id`. 279 | if (this.idAttribute in attrs) this.id = attrs[this.idAttribute]; 280 | 281 | var changes = options.changes = {}; 282 | var now = this.attributes; 283 | var escaped = this._escapedAttributes; 284 | var prev = this._previousAttributes || {}; 285 | 286 | // For each `set` attribute... 287 | for (attr in attrs) { 288 | val = attrs[attr]; 289 | 290 | // If the new and current value differ, record the change. 291 | if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) { 292 | delete escaped[attr]; 293 | (options.silent ? this._silent : changes)[attr] = true; 294 | } 295 | 296 | // Update or delete the current value. 297 | options.unset ? delete now[attr] : now[attr] = val; 298 | 299 | // If the new and previous value differ, record the change. If not, 300 | // then remove changes for this attribute. 301 | if (!_.isEqual(prev[attr], val) || (_.has(now, attr) !== _.has(prev, attr))) { 302 | this.changed[attr] = val; 303 | if (!options.silent) this._pending[attr] = true; 304 | } else { 305 | delete this.changed[attr]; 306 | delete this._pending[attr]; 307 | } 308 | } 309 | 310 | // Fire the `"change"` events. 311 | if (!options.silent) this.change(options); 312 | return this; 313 | }, 314 | 315 | // Remove an attribute from the model, firing `"change"` unless you choose 316 | // to silence it. `unset` is a noop if the attribute doesn't exist. 317 | unset: function(attr, options) { 318 | options = _.extend({}, options, {unset: true}); 319 | return this.set(attr, null, options); 320 | }, 321 | 322 | // Clear all attributes on the model, firing `"change"` unless you choose 323 | // to silence it. 324 | clear: function(options) { 325 | options = _.extend({}, options, {unset: true}); 326 | return this.set(_.clone(this.attributes), options); 327 | }, 328 | 329 | // Fetch the model from the server. If the server's representation of the 330 | // model differs from its current attributes, they will be overriden, 331 | // triggering a `"change"` event. 332 | fetch: function(options) { 333 | options = options ? _.clone(options) : {}; 334 | var model = this; 335 | var success = options.success; 336 | options.success = function(resp, status, xhr) { 337 | if (!model.set(model.parse(resp, xhr), options)) return false; 338 | if (success) success(model, resp, options); 339 | model.trigger('sync', model, resp, options); 340 | }; 341 | options.error = Backbone.wrapError(options.error, model, options); 342 | return this.sync('read', this, options); 343 | }, 344 | 345 | // Set a hash of model attributes, and sync the model to the server. 346 | // If the server returns an attributes hash that differs, the model's 347 | // state will be `set` again. 348 | save: function(key, value, options) { 349 | var attrs, current, done; 350 | 351 | // Handle both `("key", value)` and `({key: value})` -style calls. 352 | if (_.isObject(key) || key == null) { 353 | attrs = key; 354 | options = value; 355 | } else { 356 | attrs = {}; 357 | attrs[key] = value; 358 | } 359 | options = options ? _.clone(options) : {}; 360 | 361 | // If we're "wait"-ing to set changed attributes, validate early. 362 | if (options.wait) { 363 | if (!this._validate(attrs, options)) return false; 364 | current = _.clone(this.attributes); 365 | } 366 | 367 | // Regular saves `set` attributes before persisting to the server. 368 | var silentOptions = _.extend({}, options, {silent: true}); 369 | if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) { 370 | return false; 371 | } 372 | 373 | // Do not persist invalid models. 374 | if (!attrs && !this.isValid()) return false; 375 | 376 | // After a successful server-side save, the client is (optionally) 377 | // updated with the server-side state. 378 | var model = this; 379 | var success = options.success; 380 | options.success = function(resp, status, xhr) { 381 | done = true; 382 | var serverAttrs = model.parse(resp, xhr); 383 | if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs); 384 | if (!model.set(serverAttrs, options)) return false; 385 | if (success) success(model, resp, options); 386 | model.trigger('sync', model, resp, options); 387 | }; 388 | 389 | // Finish configuring and sending the Ajax request. 390 | options.error = Backbone.wrapError(options.error, model, options); 391 | var xhr = this.sync(this.isNew() ? 'create' : 'update', this, options); 392 | 393 | // When using `wait`, reset attributes to original values unless 394 | // `success` has been called already. 395 | if (!done && options.wait) { 396 | this.clear(silentOptions); 397 | this.set(current, silentOptions); 398 | } 399 | 400 | return xhr; 401 | }, 402 | 403 | // Destroy this model on the server if it was already persisted. 404 | // Optimistically removes the model from its collection, if it has one. 405 | // If `wait: true` is passed, waits for the server to respond before removal. 406 | destroy: function(options) { 407 | options = options ? _.clone(options) : {}; 408 | var model = this; 409 | var success = options.success; 410 | 411 | var destroy = function() { 412 | model.trigger('destroy', model, model.collection, options); 413 | }; 414 | 415 | options.success = function(resp) { 416 | if (options.wait || model.isNew()) destroy(); 417 | if (success) success(model, resp, options); 418 | if (!model.isNew()) model.trigger('sync', model, resp, options); 419 | }; 420 | 421 | if (this.isNew()) { 422 | options.success(); 423 | return false; 424 | } 425 | 426 | options.error = Backbone.wrapError(options.error, model, options); 427 | var xhr = this.sync('delete', this, options); 428 | if (!options.wait) destroy(); 429 | return xhr; 430 | }, 431 | 432 | // Default URL for the model's representation on the server -- if you're 433 | // using Backbone's restful methods, override this to change the endpoint 434 | // that will be called. 435 | url: function() { 436 | var base = getValue(this, 'urlRoot') || getValue(this.collection, 'url') || urlError(); 437 | if (this.isNew()) return base; 438 | return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id); 439 | }, 440 | 441 | // **parse** converts a response into the hash of attributes to be `set` on 442 | // the model. The default implementation is just to pass the response along. 443 | parse: function(resp, xhr) { 444 | return resp; 445 | }, 446 | 447 | // Create a new model with identical attributes to this one. 448 | clone: function() { 449 | return new this.constructor(this.attributes); 450 | }, 451 | 452 | // A model is new if it has never been saved to the server, and lacks an id. 453 | isNew: function() { 454 | return this.id == null; 455 | }, 456 | 457 | // Call this method to manually fire a `"change"` event for this model and 458 | // a `"change:attribute"` event for each changed attribute. 459 | // Calling this will cause all objects observing the model to update. 460 | change: function(options) { 461 | options || (options = {}); 462 | var changing = this._changing; 463 | this._changing = true; 464 | 465 | // Silent changes become pending changes. 466 | for (var attr in this._silent) this._pending[attr] = true; 467 | 468 | // Silent changes are triggered. 469 | var changes = _.extend({}, options.changes, this._silent); 470 | this._silent = {}; 471 | for (var attr in changes) { 472 | this.trigger('change:' + attr, this, this.get(attr), options); 473 | } 474 | if (changing) return this; 475 | 476 | // Continue firing `"change"` events while there are pending changes. 477 | while (!_.isEmpty(this._pending)) { 478 | this._pending = {}; 479 | this.trigger('change', this, options); 480 | // Pending and silent changes still remain. 481 | for (var attr in this.changed) { 482 | if (this._pending[attr] || this._silent[attr]) continue; 483 | delete this.changed[attr]; 484 | } 485 | this._previousAttributes = _.clone(this.attributes); 486 | } 487 | 488 | this._changing = false; 489 | return this; 490 | }, 491 | 492 | // Determine if the model has changed since the last `"change"` event. 493 | // If you specify an attribute name, determine if that attribute has changed. 494 | hasChanged: function(attr) { 495 | if (attr == null) return !_.isEmpty(this.changed); 496 | return _.has(this.changed, attr); 497 | }, 498 | 499 | // Return an object containing all the attributes that have changed, or 500 | // false if there are no changed attributes. Useful for determining what 501 | // parts of a view need to be updated and/or what attributes need to be 502 | // persisted to the server. Unset attributes will be set to undefined. 503 | // You can also pass an attributes object to diff against the model, 504 | // determining if there *would be* a change. 505 | changedAttributes: function(diff) { 506 | if (!diff) return this.hasChanged() ? _.clone(this.changed) : false; 507 | var val, changed = false, old = this._previousAttributes; 508 | for (var attr in diff) { 509 | if (_.isEqual(old[attr], (val = diff[attr]))) continue; 510 | (changed || (changed = {}))[attr] = val; 511 | } 512 | return changed; 513 | }, 514 | 515 | // Get the previous value of an attribute, recorded at the time the last 516 | // `"change"` event was fired. 517 | previous: function(attr) { 518 | if (attr == null || !this._previousAttributes) return null; 519 | return this._previousAttributes[attr]; 520 | }, 521 | 522 | // Get all of the attributes of the model at the time of the previous 523 | // `"change"` event. 524 | previousAttributes: function() { 525 | return _.clone(this._previousAttributes); 526 | }, 527 | 528 | // Check if the model is currently in a valid state. It's only possible to 529 | // get into an *invalid* state if you're using silent changes. 530 | isValid: function() { 531 | return !this.validate || !this.validate(this.attributes); 532 | }, 533 | 534 | // Run validation against the next complete set of model attributes, 535 | // returning `true` if all is well. If a specific `error` callback has 536 | // been passed, call that instead of firing the general `"error"` event. 537 | _validate: function(attrs, options) { 538 | if (options.silent || !this.validate) return true; 539 | attrs = _.extend({}, this.attributes, attrs); 540 | var error = this.validate(attrs, options); 541 | if (!error) return true; 542 | if (options && options.error) { 543 | options.error(this, error, options); 544 | } else { 545 | this.trigger('error', this, error, options); 546 | } 547 | return false; 548 | } 549 | 550 | }); 551 | 552 | // Backbone.Collection 553 | // ------------------- 554 | 555 | // Provides a standard collection class for our sets of models, ordered 556 | // or unordered. If a `comparator` is specified, the Collection will maintain 557 | // its models in sort order, as they're added and removed. 558 | var Collection = Backbone.Collection = function(models, options) { 559 | options || (options = {}); 560 | if (options.model) this.model = options.model; 561 | if (options.comparator !== void 0) this.comparator = options.comparator; 562 | this._reset(); 563 | this.initialize.apply(this, arguments); 564 | if (models) this.reset(models, {silent: true, parse: options.parse}); 565 | }; 566 | 567 | // Define the Collection's inheritable methods. 568 | _.extend(Collection.prototype, Events, { 569 | 570 | // The default model for a collection is just a **Backbone.Model**. 571 | // This should be overridden in most cases. 572 | model: Model, 573 | 574 | // Initialize is an empty function by default. Override it with your own 575 | // initialization logic. 576 | initialize: function(){}, 577 | 578 | // The JSON representation of a Collection is an array of the 579 | // models' attributes. 580 | toJSON: function(options) { 581 | return this.map(function(model){ return model.toJSON(options); }); 582 | }, 583 | 584 | // Proxy `Backbone.sync` by default. 585 | sync: function() { 586 | return Backbone.sync.apply(this, arguments); 587 | }, 588 | 589 | // Add a model, or list of models to the set. Pass **silent** to avoid 590 | // firing the `add` event for every new model. 591 | add: function(models, options) { 592 | var i, index, length, model, cid, id, cids = {}, ids = {}, dups = []; 593 | options || (options = {}); 594 | models = _.isArray(models) ? models.slice() : [models]; 595 | 596 | // Begin by turning bare objects into model references, and preventing 597 | // invalid models or duplicate models from being added. 598 | for (i = 0, length = models.length; i < length; i++) { 599 | if (!(model = models[i] = this._prepareModel(models[i], options))) { 600 | throw new Error("Can't add an invalid model to a collection"); 601 | } 602 | cid = model.cid; 603 | id = model.id; 604 | if (cids[cid] || this._byCid[cid] || ((id != null) && (ids[id] || this._byId[id]))) { 605 | dups.push(i); 606 | continue; 607 | } 608 | cids[cid] = ids[id] = model; 609 | } 610 | 611 | // Remove duplicates. 612 | i = dups.length; 613 | while (i--) { 614 | dups[i] = models.splice(dups[i], 1)[0]; 615 | } 616 | 617 | // Listen to added models' events, and index models for lookup by 618 | // `id` and by `cid`. 619 | for (i = 0, length = models.length; i < length; i++) { 620 | (model = models[i]).on('all', this._onModelEvent, this); 621 | this._byCid[model.cid] = model; 622 | if (model.id != null) this._byId[model.id] = model; 623 | } 624 | 625 | // Insert models into the collection, re-sorting if needed, and triggering 626 | // `add` events unless silenced. 627 | this.length += length; 628 | index = options.at != null ? options.at : this.models.length; 629 | splice.apply(this.models, [index, 0].concat(models)); 630 | 631 | // Merge in duplicate models. 632 | if (options.merge) { 633 | for (i = 0, length = dups.length; i < length; i++) { 634 | if (model = this._byId[dups[i].id]) model.set(dups[i], options); 635 | } 636 | } 637 | 638 | // Sort the collection if appropriate. 639 | if (this.comparator && options.at == null) this.sort({silent: true}); 640 | 641 | if (options.silent) return this; 642 | for (i = 0, length = this.models.length; i < length; i++) { 643 | if (!cids[(model = this.models[i]).cid]) continue; 644 | options.index = i; 645 | model.trigger('add', model, this, options); 646 | } 647 | 648 | return this; 649 | }, 650 | 651 | // Remove a model, or a list of models from the set. Pass silent to avoid 652 | // firing the `remove` event for every model removed. 653 | remove: function(models, options) { 654 | var i, l, index, model; 655 | options || (options = {}); 656 | models = _.isArray(models) ? models.slice() : [models]; 657 | for (i = 0, l = models.length; i < l; i++) { 658 | model = this.getByCid(models[i]) || this.get(models[i]); 659 | if (!model) continue; 660 | delete this._byId[model.id]; 661 | delete this._byCid[model.cid]; 662 | index = this.indexOf(model); 663 | this.models.splice(index, 1); 664 | this.length--; 665 | if (!options.silent) { 666 | options.index = index; 667 | model.trigger('remove', model, this, options); 668 | } 669 | this._removeReference(model); 670 | } 671 | return this; 672 | }, 673 | 674 | // Add a model to the end of the collection. 675 | push: function(model, options) { 676 | model = this._prepareModel(model, options); 677 | this.add(model, options); 678 | return model; 679 | }, 680 | 681 | // Remove a model from the end of the collection. 682 | pop: function(options) { 683 | var model = this.at(this.length - 1); 684 | this.remove(model, options); 685 | return model; 686 | }, 687 | 688 | // Add a model to the beginning of the collection. 689 | unshift: function(model, options) { 690 | model = this._prepareModel(model, options); 691 | this.add(model, _.extend({at: 0}, options)); 692 | return model; 693 | }, 694 | 695 | // Remove a model from the beginning of the collection. 696 | shift: function(options) { 697 | var model = this.at(0); 698 | this.remove(model, options); 699 | return model; 700 | }, 701 | 702 | // Slice out a sub-array of models from the collection. 703 | slice: function(begin, end) { 704 | return this.models.slice(begin, end); 705 | }, 706 | 707 | // Get a model from the set by id. 708 | get: function(id) { 709 | if (id == null) return void 0; 710 | return this._byId[id.id != null ? id.id : id]; 711 | }, 712 | 713 | // Get a model from the set by client id. 714 | getByCid: function(cid) { 715 | return cid && this._byCid[cid.cid || cid]; 716 | }, 717 | 718 | // Get the model at the given index. 719 | at: function(index) { 720 | return this.models[index]; 721 | }, 722 | 723 | // Return models with matching attributes. Useful for simple cases of `filter`. 724 | where: function(attrs) { 725 | if (_.isEmpty(attrs)) return []; 726 | return this.filter(function(model) { 727 | for (var key in attrs) { 728 | if (attrs[key] !== model.get(key)) return false; 729 | } 730 | return true; 731 | }); 732 | }, 733 | 734 | // Force the collection to re-sort itself. You don't need to call this under 735 | // normal circumstances, as the set will maintain sort order as each item 736 | // is added. 737 | sort: function(options) { 738 | options || (options = {}); 739 | if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); 740 | var boundComparator = _.bind(this.comparator, this); 741 | if (this.comparator.length === 1) { 742 | this.models = this.sortBy(boundComparator); 743 | } else { 744 | this.models.sort(boundComparator); 745 | } 746 | if (!options.silent) this.trigger('reset', this, options); 747 | return this; 748 | }, 749 | 750 | // Pluck an attribute from each model in the collection. 751 | pluck: function(attr) { 752 | return _.map(this.models, function(model){ return model.get(attr); }); 753 | }, 754 | 755 | // When you have more items than you want to add or remove individually, 756 | // you can reset the entire set with a new list of models, without firing 757 | // any `add` or `remove` events. Fires `reset` when finished. 758 | reset: function(models, options) { 759 | models || (models = []); 760 | options || (options = {}); 761 | for (var i = 0, l = this.models.length; i < l; i++) { 762 | this._removeReference(this.models[i]); 763 | } 764 | this._reset(); 765 | this.add(models, _.extend({silent: true}, options)); 766 | if (!options.silent) this.trigger('reset', this, options); 767 | return this; 768 | }, 769 | 770 | // Fetch the default set of models for this collection, resetting the 771 | // collection when they arrive. If `add: true` is passed, appends the 772 | // models to the collection instead of resetting. 773 | fetch: function(options) { 774 | options = options ? _.clone(options) : {}; 775 | if (options.parse === void 0) options.parse = true; 776 | var collection = this; 777 | var success = options.success; 778 | options.success = function(resp, status, xhr) { 779 | collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options); 780 | if (success) success(collection, resp, options); 781 | collection.trigger('sync', collection, resp, options); 782 | }; 783 | options.error = Backbone.wrapError(options.error, collection, options); 784 | return this.sync('read', this, options); 785 | }, 786 | 787 | // Create a new instance of a model in this collection. Add the model to the 788 | // collection immediately, unless `wait: true` is passed, in which case we 789 | // wait for the server to agree. 790 | create: function(model, options) { 791 | var coll = this; 792 | options = options ? _.clone(options) : {}; 793 | model = this._prepareModel(model, options); 794 | if (!model) return false; 795 | if (!options.wait) coll.add(model, options); 796 | var success = options.success; 797 | options.success = function(model, resp, options) { 798 | if (options.wait) coll.add(model, options); 799 | if (success) success(model, resp, options); 800 | }; 801 | model.save(null, options); 802 | return model; 803 | }, 804 | 805 | // **parse** converts a response into a list of models to be added to the 806 | // collection. The default implementation is just to pass it through. 807 | parse: function(resp, xhr) { 808 | return resp; 809 | }, 810 | 811 | // Create a new collection with an identical list of models as this one. 812 | clone: function() { 813 | return new this.constructor(this.models); 814 | }, 815 | 816 | // Proxy to _'s chain. Can't be proxied the same way the rest of the 817 | // underscore methods are proxied because it relies on the underscore 818 | // constructor. 819 | chain: function() { 820 | return _(this.models).chain(); 821 | }, 822 | 823 | // Reset all internal state. Called when the collection is reset. 824 | _reset: function(options) { 825 | this.length = 0; 826 | this.models = []; 827 | this._byId = {}; 828 | this._byCid = {}; 829 | }, 830 | 831 | // Prepare a model or hash of attributes to be added to this collection. 832 | _prepareModel: function(attrs, options) { 833 | if (attrs instanceof Model) { 834 | if (!attrs.collection) attrs.collection = this; 835 | return attrs; 836 | } 837 | options || (options = {}); 838 | options.collection = this; 839 | var model = new this.model(attrs, options); 840 | if (!model._validate(model.attributes, options)) return false; 841 | return model; 842 | }, 843 | 844 | // Internal method to remove a model's ties to a collection. 845 | _removeReference: function(model) { 846 | if (this === model.collection) delete model.collection; 847 | model.off('all', this._onModelEvent, this); 848 | }, 849 | 850 | // Internal method called every time a model in the set fires an event. 851 | // Sets need to update their indexes when models change ids. All other 852 | // events simply proxy through. "add" and "remove" events that originate 853 | // in other collections are ignored. 854 | _onModelEvent: function(event, model, collection, options) { 855 | if ((event === 'add' || event === 'remove') && collection !== this) return; 856 | if (event === 'destroy') this.remove(model, options); 857 | if (model && event === 'change:' + model.idAttribute) { 858 | delete this._byId[model.previous(model.idAttribute)]; 859 | if (model.id != null) this._byId[model.id] = model; 860 | } 861 | this.trigger.apply(this, arguments); 862 | } 863 | 864 | }); 865 | 866 | // Underscore methods that we want to implement on the Collection. 867 | var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find', 868 | 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 869 | 'include', 'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex', 870 | 'toArray', 'size', 'first', 'initial', 'rest', 'last', 'without', 'indexOf', 871 | 'shuffle', 'lastIndexOf', 'isEmpty', 'groupBy']; 872 | 873 | // Mix in each Underscore method as a proxy to `Collection#models`. 874 | _.each(methods, function(method) { 875 | Collection.prototype[method] = function() { 876 | return _[method].apply(_, [this.models].concat(_.toArray(arguments))); 877 | }; 878 | }); 879 | 880 | // Backbone.Router 881 | // ------------------- 882 | 883 | // Routers map faux-URLs to actions, and fire events when routes are 884 | // matched. Creating a new one sets its `routes` hash, if not set statically. 885 | var Router = Backbone.Router = function(options) { 886 | options || (options = {}); 887 | if (options.routes) this.routes = options.routes; 888 | this._bindRoutes(); 889 | this.initialize.apply(this, arguments); 890 | }; 891 | 892 | // Cached regular expressions for matching named param parts and splatted 893 | // parts of route strings. 894 | var namedParam = /:\w+/g; 895 | var splatParam = /\*\w+/g; 896 | var escapeRegExp = /[-[\]{}()+?.,\\^$|#\s]/g; 897 | 898 | // Set up all inheritable **Backbone.Router** properties and methods. 899 | _.extend(Router.prototype, Events, { 900 | 901 | // Initialize is an empty function by default. Override it with your own 902 | // initialization logic. 903 | initialize: function(){}, 904 | 905 | // Manually bind a single named route to a callback. For example: 906 | // 907 | // this.route('search/:query/p:num', 'search', function(query, num) { 908 | // ... 909 | // }); 910 | // 911 | route: function(route, name, callback) { 912 | Backbone.history || (Backbone.history = new History); 913 | if (!_.isRegExp(route)) route = this._routeToRegExp(route); 914 | if (!callback) callback = this[name]; 915 | Backbone.history.route(route, _.bind(function(fragment) { 916 | var args = this._extractParameters(route, fragment); 917 | callback && callback.apply(this, args); 918 | this.trigger.apply(this, ['route:' + name].concat(args)); 919 | Backbone.history.trigger('route', this, name, args); 920 | }, this)); 921 | return this; 922 | }, 923 | 924 | // Simple proxy to `Backbone.history` to save a fragment into the history. 925 | navigate: function(fragment, options) { 926 | Backbone.history.navigate(fragment, options); 927 | }, 928 | 929 | // Bind all defined routes to `Backbone.history`. We have to reverse the 930 | // order of the routes here to support behavior where the most general 931 | // routes can be defined at the bottom of the route map. 932 | _bindRoutes: function() { 933 | if (!this.routes) return; 934 | var routes = []; 935 | for (var route in this.routes) { 936 | routes.unshift([route, this.routes[route]]); 937 | } 938 | for (var i = 0, l = routes.length; i < l; i++) { 939 | this.route(routes[i][0], routes[i][1], this[routes[i][1]]); 940 | } 941 | }, 942 | 943 | // Convert a route string into a regular expression, suitable for matching 944 | // against the current location hash. 945 | _routeToRegExp: function(route) { 946 | route = route.replace(escapeRegExp, '\\$&') 947 | .replace(namedParam, '([^\/]+)') 948 | .replace(splatParam, '(.*?)'); 949 | return new RegExp('^' + route + '$'); 950 | }, 951 | 952 | // Given a route, and a URL fragment that it matches, return the array of 953 | // extracted parameters. 954 | _extractParameters: function(route, fragment) { 955 | return route.exec(fragment).slice(1); 956 | } 957 | 958 | }); 959 | 960 | // Backbone.History 961 | // ---------------- 962 | 963 | // Handles cross-browser history management, based on URL fragments. If the 964 | // browser does not support `onhashchange`, falls back to polling. 965 | var History = Backbone.History = function(options) { 966 | this.handlers = []; 967 | _.bindAll(this, 'checkUrl'); 968 | this.location = options && options.location || root.location; 969 | this.history = options && options.history || root.history; 970 | }; 971 | 972 | // Cached regex for cleaning leading hashes and slashes . 973 | var routeStripper = /^[#\/]/; 974 | 975 | // Cached regex for detecting MSIE. 976 | var isExplorer = /msie [\w.]+/; 977 | 978 | // Cached regex for removing a trailing slash. 979 | var trailingSlash = /\/$/; 980 | 981 | // Has the history handling already been started? 982 | History.started = false; 983 | 984 | // Set up all inheritable **Backbone.History** properties and methods. 985 | _.extend(History.prototype, Events, { 986 | 987 | // The default interval to poll for hash changes, if necessary, is 988 | // twenty times a second. 989 | interval: 50, 990 | 991 | // Gets the true hash value. Cannot use location.hash directly due to bug 992 | // in Firefox where location.hash will always be decoded. 993 | getHash: function(window) { 994 | var match = (window || this).location.href.match(/#(.*)$/); 995 | return match ? match[1] : ''; 996 | }, 997 | 998 | // Get the cross-browser normalized URL fragment, either from the URL, 999 | // the hash, or the override. 1000 | getFragment: function(fragment, forcePushState) { 1001 | if (fragment == null) { 1002 | if (this._hasPushState || !this._wantsHashChange || forcePushState) { 1003 | fragment = this.location.pathname; 1004 | var root = this.options.root.replace(trailingSlash, ''); 1005 | if (!fragment.indexOf(root)) fragment = fragment.substr(root.length); 1006 | } else { 1007 | fragment = this.getHash(); 1008 | } 1009 | } 1010 | return decodeURIComponent(fragment.replace(routeStripper, '')); 1011 | }, 1012 | 1013 | // Start the hash change handling, returning `true` if the current URL matches 1014 | // an existing route, and `false` otherwise. 1015 | start: function(options) { 1016 | if (History.started) throw new Error("Backbone.history has already been started"); 1017 | History.started = true; 1018 | 1019 | // Figure out the initial configuration. Do we need an iframe? 1020 | // Is pushState desired ... is it available? 1021 | this.options = _.extend({}, {root: '/'}, this.options, options); 1022 | this._wantsHashChange = this.options.hashChange !== false; 1023 | this._wantsPushState = !!this.options.pushState; 1024 | this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState); 1025 | var fragment = this.getFragment(); 1026 | var docMode = document.documentMode; 1027 | var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7)); 1028 | 1029 | // Normalize root to always include trailing slash 1030 | if (!trailingSlash.test(this.options.root)) this.options.root += '/'; 1031 | 1032 | if (oldIE && this._wantsHashChange) { 1033 | this.iframe = Backbone.$('